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 _home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @jupyter-widgets/base */ "@jupyter-widgets/base");
/* harmony import */ var _jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ "./node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var lodash_extend__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/extend */ "./node_modules/lodash/extend.js");
/* harmony import */ var lodash_extend__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_extend__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var vitessce__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! vitessce */ "./node_modules/vitessce/dist/umd/production/index.min.js");
/* harmony import */ var vitessce__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(vitessce__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../package.json */ "./package.json");
var _package_json__WEBPACK_IMPORTED_MODULE_12___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ "./package.json", 1);
/* harmony import */ var vitessce_dist_es_production_static_css_index_css__WEBPACK_IMPORTED_MODULE_13__ = __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_13___default = /*#__PURE__*/__webpack_require__.n(vitessce_dist_es_production_static_css_index_css__WEBPACK_IMPORTED_MODULE_13__);
/* harmony import */ var _widget_css__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./widget.css */ "./lib/widget.css");
/* harmony import */ var _widget_css__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_widget_css__WEBPACK_IMPORTED_MODULE_14__);














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

var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; // The jupyter server may be running through a proxy,
// which means that the client needs to prepend the part of the URL before /proxy/8000 such as
// https://hub.gke2.mybinder.org/user/vitessce-vitessce-python-swi31vcv/proxy/8000/A/0/cells

function prependBaseUrl(config, proxy) {
  if (!proxy) {
    return config;
  }

  var _URL = new URL(window.location.href),
      origin = _URL.origin;

  var baseUrl;
  var jupyterLabConfigEl = document.getElementById('jupyter-config-data');

  if (jupyterLabConfigEl) {
    // This is jupyter lab
    baseUrl = JSON.parse(jupyterLabConfigEl.textContent || '').baseUrl;
  } else {
    // This is jupyter notebook
    baseUrl = document.getElementsByTagName('body')[0].getAttribute('data-base-url');
  }

  return Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__["default"])({}, config), {}, {
    datasets: config.datasets.map(function (d) {
      return Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__["default"])({}, d), {}, {
        files: d.files.map(function (f) {
          return Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__["default"])(Object(_home_runner_work_vitessce_python_vitessce_python_js_node_modules_babel_preset_react_app_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_6__["default"])({}, f), {}, {
            url: "".concat(origin).concat(baseUrl).concat(f.url)
          });
        })
      });
    })
  });
}

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

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

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

    function handleMouseLeave(event) {
      var _event$relatedTarget$;

      if (event.relatedTarget === null || event.relatedTarget && ((_event$relatedTarget$ = event.relatedTarget.closest('.jp-Notebook')) === null || _event$relatedTarget$ === void 0 ? void 0 : _event$relatedTarget$.length)) return;
      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_8__["useCallback"])(function (config) {
    model.set('config', config);
    model.save_changes();
  }, [model]);
  return react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement('div', {
    className: 'vitessce-widget',
    ref: divRef,
    style: {
      height: "".concat(height, "px")
    }
  }, react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(vitessce__WEBPACK_IMPORTED_MODULE_11__["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_7__["DOMWidgetModel"].extend({
  defaults: lodash_extend__WEBPACK_IMPORTED_MODULE_10___default()(_jupyter_widgets_base__WEBPACK_IMPORTED_MODULE_7__["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_12__.version,
    _view_module_version: _package_json__WEBPACK_IMPORTED_MODULE_12__.version,
    config: {},
    height: 600,
    theme: 'auto',
    proxy: false
  })
});
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_9___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_8___default.a.createElement(VitessceWidget, {
        model: model,
        view: view
      });
    }
  }, {
    key: "remove",
    value: function remove() {
      react_dom__WEBPACK_IMPORTED_MODULE_9___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_7__["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/defineProperty.js":
/*!*******************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty.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 _defineProperty; });
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}

/***/ }),

/***/ "./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/objectSpread2.js":
/*!******************************************************************************************************!*\
  !*** ./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.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 _objectSpread2; });
/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ "./node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty.js");


function ownKeys(object, enumerableOnly) {
  var keys = Object.keys(object);

  if (Object.getOwnPropertySymbols) {
    var symbols = Object.getOwnPropertySymbols(object);
    if (enumerableOnly) symbols = symbols.filter(function (sym) {
      return Object.getOwnPropertyDescriptor(object, sym).enumerable;
    });
    keys.push.apply(keys, symbols);
  }

  return keys;
}

function _objectSpread2(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) {
        Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(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;
}

/***/ }),

/***/ "./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}\n\n.vitessce-container .layer-controller-container select {\n    height: revert;\n}\n\nhtml {\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.welcome-container .row>div>.card{margin:1rem 0}.vitessce-container.vitessce-theme-dark .welcome-beta-header{background-color:#93e5c3;padding:1rem}.vitessce-container.vitessce-theme-dark .welcome-beta-header p{margin:0;color:#222222}.vitessce-container.vitessce-theme-dark .welcome-beta-header p a{color:#000;text-decoration:underline;font-weight:600}.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:6px;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,.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.welcome-container .row>div>.card{margin:1rem 0}.vitessce-container.vitessce-theme-light .welcome-beta-header{background-color:#93e5c3;padding:1rem}.vitessce-container.vitessce-theme-light .welcome-beta-header p{margin:0;color:#222222}.vitessce-container.vitessce-theme-light .welcome-beta-header p a{color:#000;text-decoration:underline;font-weight:600}.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:6px;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,.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/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 v17.0.2
 * 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 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");

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

// by calls to these methods by a Babel plugin.
//
// In PROD (or in packages without access to React internals),
// they are left as they are instead.

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

    printWarning('warn', format, args);
  }
}
function error(format) {
  {
    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      args[_key2 - 1] = arguments[_key2];
    }

    printWarning('error', format, args);
  }
}

function printWarning(level, format, args) {
  // When changing this logic, you might want to also
  // update consoleWithStackDev.www.js as well.
  {
    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
    var stack = ReactDebugCurrentFrame.getStackAddendum();

    if (stack !== '') {
      format += '%s';
      args = args.concat([stack]);
    }

    var argsWithFormat = args.map(function (item) {
      return '' + item;
    }); // Careful: RN currently depends on this prefix

    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
    // breaks IE9: https://github.com/facebook/react/issues/13610
    // eslint-disable-next-line react-internal/no-production-logging

    Function.prototype.apply.call(console[level], console, argsWithFormat);
  }
}

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

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 DehydratedFragment = 18;
var SuspenseListComponent = 19;
var FundamentalComponent = 20;
var ScopeComponent = 21;
var Block = 22;
var OffscreenComponent = 23;
var LegacyHiddenComponent = 24;

// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.

var enableProfilerTimer = true; // Record durations for commit and passive effects phases.

var enableFundamentalAPI = false; // Experimental Scope support.
var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)
var warnAboutStringRefs = false;

var allNativeEvents = new Set();
/**
 * 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

function registerTwoPhaseEvent(registrationName, dependencies) {
  registerDirectEvent(registrationName, dependencies);
  registerDirectEvent(registrationName + 'Capture', dependencies);
}
function registerDirectEvent(registrationName, dependencies) {
  {
    if (registrationNameDependencies[registrationName]) {
      error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
    }
  }

  registrationNameDependencies[registrationName] = dependencies;

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

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

  for (var i = 0; i < dependencies.length; i++) {
    allNativeEvents.add(dependencies[i]);
  }
}

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

// 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 filter 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;

  {
    error('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, removeEmptyString) {
  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;
  this.removeEmptyString = removeEmptyString;
} // 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.

var reservedProps = ['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'];
reservedProps.forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false, // sanitizeURL
  false);
}); // 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
  false);
}); // 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
  false);
}); // 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
  false);
}); // 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', 'disableRemotePlayback', '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
  false);
}); // 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' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false, // sanitizeURL
  false);
}); // These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.

['capture', 'download' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false, // sanitizeURL
  false);
}); // These are HTML attributes that must be positive numbers.

['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false, // sanitizeURL
  false);
}); // 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
  false);
});
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 attribute filter.
// Some of these attributes can be hard to find. This list was created by
// scraping 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' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (attributeName) {
  var name = attributeName.replace(CAMELIZE, capitalize);
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, null, // attributeNamespace
  false, // sanitizeURL
  false);
}); // String SVG attributes with the xlink namespace.

['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].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
  false);
}); // String SVG attributes with the xml namespace.

['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].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
  false);
}); // 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
  false);
}); // 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, // sanitizeURL
false);
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
  attributeName.toLowerCase(), // attributeName
  null, // attributeNamespace
  true, // sanitizeURL
  true);
});

// 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 (!didWarn && isJavaScriptProtocol.test(url)) {
      didWarn = true;

      error('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 ( 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 the object is an opaque reference ID, it's expected that
    // the next prop is different than the server value, so just return
    // expected


    if (isOpaqueHydratingObject(expected)) {
      return expected;
    }

    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;

    if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
      // If attribute type is boolean, we know for sure it won't be an execution sink
      // and we won't require Trusted Type here.
      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.toString());
      }
    }

    if (attributeNamespace) {
      node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
    } else {
      node.setAttribute(attributeName, attributeValue);
    }
  }
}

// ATTENTION
// When adding new symbols to this file,
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// 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 REACT_ELEMENT_TYPE = 0xeac7;
var REACT_PORTAL_TYPE = 0xeaca;
var REACT_FRAGMENT_TYPE = 0xeacb;
var REACT_STRICT_MODE_TYPE = 0xeacc;
var REACT_PROFILER_TYPE = 0xead2;
var REACT_PROVIDER_TYPE = 0xeacd;
var REACT_CONTEXT_TYPE = 0xeace;
var REACT_FORWARD_REF_TYPE = 0xead0;
var REACT_SUSPENSE_TYPE = 0xead1;
var REACT_SUSPENSE_LIST_TYPE = 0xead8;
var REACT_MEMO_TYPE = 0xead3;
var REACT_LAZY_TYPE = 0xead4;
var REACT_BLOCK_TYPE = 0xead9;
var REACT_SERVER_BLOCK_TYPE = 0xeada;
var REACT_FUNDAMENTAL_TYPE = 0xead5;
var REACT_SCOPE_TYPE = 0xead7;
var REACT_OPAQUE_ID_TYPE = 0xeae0;
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
var REACT_OFFSCREEN_TYPE = 0xeae2;
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;

if (typeof Symbol === 'function' && Symbol.for) {
  var symbolFor = Symbol.for;
  REACT_ELEMENT_TYPE = symbolFor('react.element');
  REACT_PORTAL_TYPE = symbolFor('react.portal');
  REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
  REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
  REACT_PROFILER_TYPE = symbolFor('react.profiler');
  REACT_PROVIDER_TYPE = symbolFor('react.provider');
  REACT_CONTEXT_TYPE = symbolFor('react.context');
  REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
  REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
  REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
  REACT_MEMO_TYPE = symbolFor('react.memo');
  REACT_LAZY_TYPE = symbolFor('react.lazy');
  REACT_BLOCK_TYPE = symbolFor('react.block');
  REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
  REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
  REACT_SCOPE_TYPE = symbolFor('react.scope');
  REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
  REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
  REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
  REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
}

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

// Helpers to patch console.logs to avoid logging during side-effect free
// replaying on render function. This currently only patches the object
// lazily which won't cover if the log function was extracted eagerly.
// We could also eagerly patch the method.
var disabledDepth = 0;
var prevLog;
var prevInfo;
var prevWarn;
var prevError;
var prevGroup;
var prevGroupCollapsed;
var prevGroupEnd;

function disabledLog() {}

disabledLog.__reactDisabledLog = true;
function disableLogs() {
  {
    if (disabledDepth === 0) {
      /* eslint-disable react-internal/no-production-logging */
      prevLog = console.log;
      prevInfo = console.info;
      prevWarn = console.warn;
      prevError = console.error;
      prevGroup = console.group;
      prevGroupCollapsed = console.groupCollapsed;
      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099

      var props = {
        configurable: true,
        enumerable: true,
        value: disabledLog,
        writable: true
      }; // $FlowFixMe Flow thinks console is immutable.

      Object.defineProperties(console, {
        info: props,
        log: props,
        warn: props,
        error: props,
        group: props,
        groupCollapsed: props,
        groupEnd: props
      });
      /* eslint-enable react-internal/no-production-logging */
    }

    disabledDepth++;
  }
}
function reenableLogs() {
  {
    disabledDepth--;

    if (disabledDepth === 0) {
      /* eslint-disable react-internal/no-production-logging */
      var props = {
        configurable: true,
        enumerable: true,
        writable: true
      }; // $FlowFixMe Flow thinks console is immutable.

      Object.defineProperties(console, {
        log: _assign({}, props, {
          value: prevLog
        }),
        info: _assign({}, props, {
          value: prevInfo
        }),
        warn: _assign({}, props, {
          value: prevWarn
        }),
        error: _assign({}, props, {
          value: prevError
        }),
        group: _assign({}, props, {
          value: prevGroup
        }),
        groupCollapsed: _assign({}, props, {
          value: prevGroupCollapsed
        }),
        groupEnd: _assign({}, props, {
          value: prevGroupEnd
        })
      });
      /* eslint-enable react-internal/no-production-logging */
    }

    if (disabledDepth < 0) {
      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
    }
  }
}

var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
var prefix;
function describeBuiltInComponentFrame(name, source, ownerFn) {
  {
    if (prefix === undefined) {
      // Extract the VM specific prefix used by each line.
      try {
        throw Error();
      } catch (x) {
        var match = x.stack.trim().match(/\n( *(at )?)/);
        prefix = match && match[1] || '';
      }
    } // We use the prefix to ensure our stacks line up with native stack frames.


    return '\n' + prefix + name;
  }
}
var reentry = false;
var componentFrameCache;

{
  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
  componentFrameCache = new PossiblyWeakMap();
}

function describeNativeComponentFrame(fn, construct) {
  // If something asked for a stack inside a fake render, it should get ignored.
  if (!fn || reentry) {
    return '';
  }

  {
    var frame = componentFrameCache.get(fn);

    if (frame !== undefined) {
      return frame;
    }
  }

  var control;
  reentry = true;
  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.

  Error.prepareStackTrace = undefined;
  var previousDispatcher;

  {
    previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
    // for warnings.

    ReactCurrentDispatcher.current = null;
    disableLogs();
  }

  try {
    // This should throw.
    if (construct) {
      // Something should be setting the props in the constructor.
      var Fake = function () {
        throw Error();
      }; // $FlowFixMe


      Object.defineProperty(Fake.prototype, 'props', {
        set: function () {
          // We use a throwing setter instead of frozen or non-writable props
          // because that won't throw in a non-strict mode function.
          throw Error();
        }
      });

      if (typeof Reflect === 'object' && Reflect.construct) {
        // We construct a different control for this case to include any extra
        // frames added by the construct call.
        try {
          Reflect.construct(Fake, []);
        } catch (x) {
          control = x;
        }

        Reflect.construct(fn, [], Fake);
      } else {
        try {
          Fake.call();
        } catch (x) {
          control = x;
        }

        fn.call(Fake.prototype);
      }
    } else {
      try {
        throw Error();
      } catch (x) {
        control = x;
      }

      fn();
    }
  } catch (sample) {
    // This is inlined manually because closure doesn't do it for us.
    if (sample && control && typeof sample.stack === 'string') {
      // This extracts the first frame from the sample that isn't also in the control.
      // Skipping one frame that we assume is the frame that calls the two.
      var sampleLines = sample.stack.split('\n');
      var controlLines = control.stack.split('\n');
      var s = sampleLines.length - 1;
      var c = controlLines.length - 1;

      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
        // We expect at least one stack frame to be shared.
        // Typically this will be the root most one. However, stack frames may be
        // cut off due to maximum stack limits. In this case, one maybe cut off
        // earlier than the other. We assume that the sample is longer or the same
        // and there for cut off earlier. So we should find the root most frame in
        // the sample somewhere in the control.
        c--;
      }

      for (; s >= 1 && c >= 0; s--, c--) {
        // Next we find the first one that isn't the same which should be the
        // frame that called our sample function and the control.
        if (sampleLines[s] !== controlLines[c]) {
          // In V8, the first line is describing the message but other VMs don't.
          // If we're about to return the first line, and the control is also on the same
          // line, that's a pretty good indicator that our sample threw at same line as
          // the control. I.e. before we entered the sample frame. So we ignore this result.
          // This can happen if you passed a class to function component, or non-function.
          if (s !== 1 || c !== 1) {
            do {
              s--;
              c--; // We may still have similar intermediate frames from the construct call.
              // The next one that isn't the same should be our match though.

              if (c < 0 || sampleLines[s] !== controlLines[c]) {
                // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
                var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');

                {
                  if (typeof fn === 'function') {
                    componentFrameCache.set(fn, _frame);
                  }
                } // Return the line we found.


                return _frame;
              }
            } while (s >= 1 && c >= 0);
          }

          break;
        }
      }
    }
  } finally {
    reentry = false;

    {
      ReactCurrentDispatcher.current = previousDispatcher;
      reenableLogs();
    }

    Error.prepareStackTrace = previousPrepareStackTrace;
  } // Fallback to just using the name if we couldn't make it throw.


  var name = fn ? fn.displayName || fn.name : '';
  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';

  {
    if (typeof fn === 'function') {
      componentFrameCache.set(fn, syntheticFrame);
    }
  }

  return syntheticFrame;
}

function describeClassComponentFrame(ctor, source, ownerFn) {
  {
    return describeNativeComponentFrame(ctor, true);
  }
}
function describeFunctionComponentFrame(fn, source, ownerFn) {
  {
    return describeNativeComponentFrame(fn, false);
  }
}

function shouldConstruct(Component) {
  var prototype = Component.prototype;
  return !!(prototype && prototype.isReactComponent);
}

function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {

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

  if (typeof type === 'function') {
    {
      return describeNativeComponentFrame(type, shouldConstruct(type));
    }
  }

  if (typeof type === 'string') {
    return describeBuiltInComponentFrame(type);
  }

  switch (type) {
    case REACT_SUSPENSE_TYPE:
      return describeBuiltInComponentFrame('Suspense');

    case REACT_SUSPENSE_LIST_TYPE:
      return describeBuiltInComponentFrame('SuspenseList');
  }

  if (typeof type === 'object') {
    switch (type.$$typeof) {
      case REACT_FORWARD_REF_TYPE:
        return describeFunctionComponentFrame(type.render);

      case REACT_MEMO_TYPE:
        // Memo may contain any component type so we recursively resolve it.
        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);

      case REACT_BLOCK_TYPE:
        return describeFunctionComponentFrame(type._render);

      case REACT_LAZY_TYPE:
        {
          var lazyComponent = type;
          var payload = lazyComponent._payload;
          var init = lazyComponent._init;

          try {
            // Lazy may contain any component type so we recursively resolve it.
            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
          } catch (x) {}
        }
    }
  }

  return '';
}

function describeFiber(fiber) {
  var owner =  fiber._debugOwner ? fiber._debugOwner.type : null ;
  var source =  fiber._debugSource ;

  switch (fiber.tag) {
    case HostComponent:
      return describeBuiltInComponentFrame(fiber.type);

    case LazyComponent:
      return describeBuiltInComponentFrame('Lazy');

    case SuspenseComponent:
      return describeBuiltInComponentFrame('Suspense');

    case SuspenseListComponent:
      return describeBuiltInComponentFrame('SuspenseList');

    case FunctionComponent:
    case IndeterminateComponent:
    case SimpleMemoComponent:
      return describeFunctionComponentFrame(fiber.type);

    case ForwardRef:
      return describeFunctionComponentFrame(fiber.type.render);

    case Block:
      return describeFunctionComponentFrame(fiber.type._render);

    case ClassComponent:
      return describeClassComponentFrame(fiber.type);

    default:
      return '';
  }
}

function getStackByFiberInDevAndProd(workInProgress) {
  try {
    var info = '';
    var node = workInProgress;

    do {
      info += describeFiber(node);
      node = node.return;
    } while (node);

    return info;
  } catch (x) {
    return '\nError generating stack: ' + x.message + '\n' + x.stack;
  }
}

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

function getContextName(type) {
  return type.displayName || 'Context';
}

function getComponentName(type) {
  if (type == null) {
    // Host root, text node or just invalid type.
    return null;
  }

  {
    if (typeof type.tag === 'number') {
      error('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:
        var context = type;
        return getContextName(context) + '.Consumer';

      case REACT_PROVIDER_TYPE:
        var provider = type;
        return getContextName(provider._context) + '.Provider';

      case REACT_FORWARD_REF_TYPE:
        return getWrappedName(type, type.render, 'ForwardRef');

      case REACT_MEMO_TYPE:
        return getComponentName(type.type);

      case REACT_BLOCK_TYPE:
        return getComponentName(type._render);

      case REACT_LAZY_TYPE:
        {
          var lazyComponent = type;
          var payload = lazyComponent._payload;
          var init = lazyComponent._init;

          try {
            return getComponentName(init(payload));
          } catch (x) {
            return null;
          }
        }
    }
  }

  return null;
}

var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
var current = null;
var isRendering = false;
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);
  }
}

function resetCurrentFiber() {
  {
    ReactDebugCurrentFrame.getCurrentStack = null;
    current = null;
    isRendering = false;
  }
}
function setCurrentFiber(fiber) {
  {
    ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
    current = fiber;
    isRendering = false;
  }
}
function setIsRendering(rendering) {
  {
    isRendering = rendering;
  }
}
function getIsRendering() {
  {
    return isRendering;
  }
}

// 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 hasReadOnlyValue = {
  button: true,
  checkbox: true,
  image: true,
  hidden: true,
  radio: true,
  reset: true,
  submit: true
};
function checkControlledValueProps(tagName, props) {
  {
    if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
      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`.');
    }

    if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
      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`.');
    }
  }
}

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

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

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) {
  {
    checkControlledValueProps('input', props);

    if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
      error('%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://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);

      didWarnCheckedDefaultChecked = true;
    }

    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
      error('%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://reactjs.org/link/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) {
      error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');

      didWarnUncontrolledToControlled = true;
    }

    if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
      error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');

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

  {
    // 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));
    }
  }

  {
    // 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) {
      {
        // 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;
        }
      }
    }

    {
      // 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 = '';
  }

  {
    // 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(otherNode);

      if (!otherProps) {
        {
          throw 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' || getActiveElement(node.ownerDocument) !== node) {
    if (value == null) {
      node.defaultValue = toString(node._wrapperState.initialValue);
    } else if (node.defaultValue !== toString(value)) {
      node.defaultValue = toString(value);
    }
  }
}

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 code path too.
  });
  return content;
}
/**
 * Implements an <option> host component that warns when `selected` is set.
 */


function validateProps(element, props) {
  {
    // This mirrors the code path 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;

          error('Only strings and numbers are supported as <option> children.');
        }
      });
    } // TODO: Remove support for `selected` in <option>.


    if (props.selected != null && !didWarnSelectedSetOnOption) {
      error('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;
}

var didWarnValueDefaultValue$1;

{
  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) {
  {
    checkControlledValueProps('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) {
        error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
      } else if (!props.multiple && isArray) {
        error('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) {
      error('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://reactjs.org/link/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$1(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;

  if (!(props.dangerouslySetInnerHTML == null)) {
    {
      throw 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;

  {
    checkControlledValueProps('textarea', props);

    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
      error('%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://reactjs.org/link/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 children = props.children,
        defaultValue = props.defaultValue;

    if (children != null) {
      {
        error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
      }

      {
        if (!(defaultValue == null)) {
          {
            throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
          }
        }

        if (Array.isArray(children)) {
          if (!(children.length <= 1)) {
            {
              throw 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) {
    if (textContent !== '' && textContent !== null) {
      node.value = textContent;
    }
  }
}
function restoreControlledState$2(element, props) {
  // DOM component is still mounted; update
  updateWrapper$1(element, props);
}

var HTML_NAMESPACE = '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,
  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;
  }
}
function getChildNamespace(parentNamespace, type) {
  if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
    // No (or default) parent namespace: potential entry point.
    return getIntrinsicNamespace(type);
  }

  if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
    // We're leaving SVG.
    return HTML_NAMESPACE;
  } // 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;
  }
};

var reusableSVGContainer;
/**
 * Set the innerHTML property of a node
 *
 * @param {DOMElement} node
 * @param {string} html
 * @internal
 */

var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
  if (node.namespaceURI === Namespaces.svg) {

    if (!('innerHTML' in node)) {
      // 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
      reusableSVGContainer = reusableSVGContainer || document.createElement('div');
      reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
      var svgNode = reusableSVGContainer.firstChild;

      while (node.firstChild) {
        node.removeChild(node.firstChild);
      }

      while (svgNode.firstChild) {
        node.appendChild(svgNode.firstChild);
      }

      return;
    }
  }

  node.innerHTML = html;
});

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

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

    error('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;

    error('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;

    error("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;

    error('`NaN` is an invalid value for the `%s` css style property.', name);
  };

  var warnStyleValueIsInfinity = function (name, value) {
    if (warnedForInfinityValue) {
      return;
    }

    warnedForInfinityValue = true;

    error('`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 (!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;

        error('%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 list 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.

};

// `omittedCloseTags` except that `menuitem` should still have its closing tag.

var voidElementTags = _assign({
  menuitem: true
}, omittedCloseTags);

var HTML = '__html';

function assertValidProps(tag, props) {
  if (!props) {
    return;
  } // Note the use of `==` which checks for null or undefined.


  if (voidElementTags[tag]) {
    if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
      {
        throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
      }
    }
  }

  if (props.dangerouslySetInnerHTML != null) {
    if (!(props.children == null)) {
      {
        throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
      }
    }

    if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
      {
        throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
      }
    }
  }

  {
    if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
      error('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.');
    }
  }

  if (!(props.style == null || typeof props.style === 'object')) {
    {
      throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
    }
  }
}

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 list 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 allowed attribute list, 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',
  disableremoteplayback: 'disableRemotePlayback',
  download: 'download',
  draggable: 'draggable',
  enctype: 'encType',
  enterkeyhint: 'enterKeyHint',
  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$1 = Object.prototype.hasOwnProperty;

function validateProperty(tagName, name) {
  {
    if (hasOwnProperty$1.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) {
        error('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) {
        error('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) {
        error('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) {
      error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
    } else if (invalidProps.length > 1) {
      error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', 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) {
        error('`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 {
        error('`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, eventRegistry) {
    if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
      return true;
    }

    var lowerCasedName = name.toLowerCase();

    if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
      error('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 (eventRegistry != null) {
      var registrationNameDependencies = eventRegistry.registrationNameDependencies,
          possibleRegistrationNames = eventRegistry.possibleRegistrationNames;

      if (registrationNameDependencies.hasOwnProperty(name)) {
        return true;
      }

      var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;

      if (registrationName != null) {
        error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);

        warnedProperties$1[name] = true;
        return true;
      }

      if (EVENT_NAME_REGEX.test(name)) {
        error('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)) {
        error('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') {
      error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');

      warnedProperties$1[name] = true;
      return true;
    }

    if (lowerCasedName === 'aria') {
      error('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') {
      error('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)) {
      error('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) {
        error('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.
      error('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) {
        error('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 {
        error('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) {
      error('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, eventRegistry) {
  {
    var unknownProps = [];

    for (var key in props) {
      var isValid = validateProperty$1(type, key, props[key], eventRegistry);

      if (!isValid) {
        unknownProps.push(key);
      }
    }

    var unknownPropString = unknownProps.map(function (prop) {
      return '`' + prop + '`';
    }).join(', ');

    if (unknownProps.length === 1) {
      error('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://reactjs.org/link/attribute-behavior ', unknownPropString, type);
    } else if (unknownProps.length > 1) {
      error('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://reactjs.org/link/attribute-behavior ', unknownPropString, type);
    }
  }
};

function validateProperties$2(type, props, eventRegistry) {
  if (isCustomComponent(type, props)) {
    return;
  }

  warnUnknownProperties(type, props, eventRegistry);
}

var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
var IS_NON_DELEGATED = 1 << 1;
var IS_CAPTURE_PHASE = 1 << 2;
var IS_REPLAYED = 1 << 4;
// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
// we call willDeferLaterForLegacyFBSupport, thus not bailing out
// will result in endless cycles like an infinite loop.
// We also don't want to defer during event replaying.

var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;

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

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

  if (!(typeof restoreImpl === 'function')) {
    {
      throw 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 stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.

  if (stateNode) {
    var _props = getFiberCurrentPropsFromNode(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]);
    }
  }
}

// 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, d) {
  return fn(a, b, c, d);
};

var flushDiscreteUpdatesImpl = function () {};

var batchedEventUpdatesImpl = batchedUpdatesImpl;
var isInsideEventHandler = false;
var isBatchingEventUpdates = 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 (isBatchingEventUpdates) {
    // If we are currently inside another batch, we need to wait until it
    // fully completes before restoring state.
    return fn(a, b);
  }

  isBatchingEventUpdates = true;

  try {
    return batchedEventUpdatesImpl(fn, a, b);
  } finally {
    isBatchingEventUpdates = false;
    finishEventHandler();
  }
}
function discreteUpdates(fn, a, b, c, d) {
  var prevIsInsideEventHandler = isInsideEventHandler;
  isInsideEventHandler = true;

  try {
    return discreteUpdatesImpl(fn, a, b, c, d);
  } finally {
    isInsideEventHandler = prevIsInsideEventHandler;

    if (!isInsideEventHandler) {
      finishEventHandler();
    }
  }
}
function flushDiscreteUpdatesIfNeeded(timeStamp) {
  {
    if (!isInsideEventHandler) {
      flushDiscreteUpdatesImpl();
    }
  }
}
function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
  batchedUpdatesImpl = _batchedUpdatesImpl;
  discreteUpdatesImpl = _discreteUpdatesImpl;
  flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
  batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
}

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':
    case 'onMouseEnter':
      return !!(props.disabled && isInteractive(type));

    default:
      return false;
  }
}
/**
 * @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 stateNode = inst.stateNode;

  if (stateNode === null) {
    // Work in progress (ex: onload events in incremental mode).
    return null;
  }

  var props = getFiberCurrentPropsFromNode(stateNode);

  if (props === null) {
    // Work in progress.
    return null;
  }

  var listener = props[registrationName];

  if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
    return null;
  }

  if (!(!listener || typeof listener === 'function')) {
    {
      throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
    }
  }

  return listener;
}

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

function invokeGuardedCallbackProd(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);
  }
}

var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;

{
  // 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');

    invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(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.
      if (!(typeof document !== 'undefined')) {
        {
          throw 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');
      var didCall = false; // 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');

      function restoreAfterDispatch() {
        // 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;
        }
      } // 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() {
        didCall = true;
        restoreAfterDispatch();
        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; // 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 (didCall && 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://reactjs.org/link/crossorigin-error for more information.');
        }

        this.onError(error);
      } // Remove our event listeners


      window.removeEventListener('error', handleWindowError);

      if (!didCall) {
        // Something went really wrong, and our event was not dispatched.
        // https://github.com/facebook/react/issues/16734
        // https://github.com/facebook/react/issues/16585
        // Fall back to the production implementation.
        restoreAfterDispatch();
        return invokeGuardedCallbackProd.apply(this, arguments);
      }
    };
  }
}

var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;

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 {
    {
      {
        throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
      }
    }
  }
}

/**
 * `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.
 */
function get(key) {
  return key._reactInternals;
}
function has(key) {
  return key._reactInternals !== undefined;
}
function set(key, value) {
  key._reactInternals = value;
}

// Don't change these two values. They're used by React Dev Tools.
var NoFlags =
/*                      */
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; // TODO (effects) Remove this bit once the new reconciler is synced to the old.

var PassiveUnmountPendingDev =
/*     */
8192;
var Hydrating =
/*                    */
1024;
var HydratingAndUpdate =
/*           */
1028; // Passive & Update & Callback & Ref & Snapshot

var LifecycleEffectMask =
/*          */
932; // Union of all host effects

var HostEffectMask =
/*               */
2047; // These are not really side effects, but we still reuse this field.

var Incomplete =
/*                   */
2048;
var ShouldCapture =
/*                */
4096;
var ForceUpdateForLegacySuspense =
/* */
16384; // Static tags describe aspects of a fiber that are not specific to a render,

var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
function getNearestMountedFiber(fiber) {
  var node = fiber;
  var nearestMounted = 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.
    var nextNode = node;

    do {
      node = nextNode;

      if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
        // This is an insertion or in-progress hydration. The nearest possible
        // mounted fiber is the parent but we need to continue to figure out
        // if that one is still mounted.
        nearestMounted = node.return;
      }

      nextNode = node.return;
    } while (nextNode);
  } else {
    while (node.return) {
      node = node.return;
    }
  }

  if (node.tag === HostRoot) {
    // TODO: Check if this was a nested HostRoot when used with
    // renderContainerIntoSubtree.
    return nearestMounted;
  } // If we didn't hit the root, that means that we're in an disconnected tree
  // that has been unmounted.


  return null;
}
function getSuspenseInstanceFromFiber(fiber) {
  if (fiber.tag === SuspenseComponent) {
    var suspenseState = fiber.memoizedState;

    if (suspenseState === null) {
      var current = fiber.alternate;

      if (current !== null) {
        suspenseState = current.memoizedState;
      }
    }

    if (suspenseState !== null) {
      return suspenseState.dehydrated;
    }
  }

  return null;
}
function getContainerFromFiber(fiber) {
  return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
}
function isFiberMounted(fiber) {
  return getNearestMountedFiber(fiber) === fiber;
}
function isMounted(component) {
  {
    var owner = ReactCurrentOwner.current;

    if (owner !== null && owner.tag === ClassComponent) {
      var ownerFiber = owner;
      var instance = ownerFiber.stateNode;

      if (!instance._warnedAboutRefsInRender) {
        error('%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');
      }

      instance._warnedAboutRefsInRender = true;
    }
  }

  var fiber = get(component);

  if (!fiber) {
    return false;
  }

  return getNearestMountedFiber(fiber) === fiber;
}

function assertIsMounted(fiber) {
  if (!(getNearestMountedFiber(fiber) === fiber)) {
    {
      throw 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 nearestMounted = getNearestMountedFiber(fiber);

    if (!(nearestMounted !== null)) {
      {
        throw Error( "Unable to find node on an unmounted component." );
      }
    }

    if (nearestMounted !== fiber) {
      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.


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

        if (!didFindChild) {
          {
            throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
          }
        }
      }
    }

    if (!(a.alternate === b)) {
      {
        throw 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.


  if (!(a.tag === HostRoot)) {
    {
      throw 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 || enableFundamentalAPI ) {
      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 doesFiberContain(parentFiber, childFiber) {
  var node = childFiber;
  var parentFiberAlternate = parentFiber.alternate;

  while (node !== null) {
    if (node === parentFiber || node === parentFiberAlternate) {
      return true;
    }

    node = node.return;
  }

  return false;
}

var attemptUserBlockingHydration;
function setAttemptUserBlockingHydration(fn) {
  attemptUserBlockingHydration = fn;
}
var attemptContinuousHydration;
function setAttemptContinuousHydration(fn) {
  attemptContinuousHydration = fn;
}
var attemptHydrationAtCurrentPriority;
function setAttemptHydrationAtCurrentPriority(fn) {
  attemptHydrationAtCurrentPriority = fn;
}
var attemptHydrationAtPriority;
function setAttemptHydrationAtPriority(fn) {
  attemptHydrationAtPriority = fn;
} // TODO: Upgrade this definition once we're on a newer version of Flow that
var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.

var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
// if the last target was dehydrated.

var queuedFocus = null;
var queuedDrag = null;
var queuedMouse = null; // For pointer events there can be one latest event per pointerId.

var queuedPointers = new Map();
var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.

var queuedExplicitHydrationTargets = [];
function hasQueuedDiscreteEvents() {
  return queuedDiscreteEvents.length > 0;
}
var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
function isReplayableDiscreteEvent(eventType) {
  return discreteReplayableEvents.indexOf(eventType) > -1;
}

function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  return {
    blockedOn: blockedOn,
    domEventName: domEventName,
    eventSystemFlags: eventSystemFlags | IS_REPLAYED,
    nativeEvent: nativeEvent,
    targetContainers: [targetContainer]
  };
}

function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
  queuedDiscreteEvents.push(queuedEvent);
} // Resets the replaying for this type of continuous event to no event.

function clearIfContinuousEvent(domEventName, nativeEvent) {
  switch (domEventName) {
    case 'focusin':
    case 'focusout':
      queuedFocus = null;
      break;

    case 'dragenter':
    case 'dragleave':
      queuedDrag = null;
      break;

    case 'mouseover':
    case 'mouseout':
      queuedMouse = null;
      break;

    case 'pointerover':
    case 'pointerout':
      {
        var pointerId = nativeEvent.pointerId;
        queuedPointers.delete(pointerId);
        break;
      }

    case 'gotpointercapture':
    case 'lostpointercapture':
      {
        var _pointerId = nativeEvent.pointerId;
        queuedPointerCaptures.delete(_pointerId);
        break;
      }
  }
}

function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
    var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);

    if (blockedOn !== null) {
      var _fiber2 = getInstanceFromNode(blockedOn);

      if (_fiber2 !== null) {
        // Attempt to increase the priority of this target.
        attemptContinuousHydration(_fiber2);
      }
    }

    return queuedEvent;
  } // If we have already queued this exact event, then it's because
  // the different event systems have different DOM event listeners.
  // We can accumulate the flags, and the targetContainers, and
  // store a single event to be replayed.


  existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
  var targetContainers = existingQueuedEvent.targetContainers;

  if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
    targetContainers.push(targetContainer);
  }

  return existingQueuedEvent;
}

function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  // These set relatedTarget to null because the replayed event will be treated as if we
  // moved from outside the window (no target) onto the target once it hydrates.
  // Instead of mutating we could clone the event.
  switch (domEventName) {
    case 'focusin':
      {
        var focusEvent = nativeEvent;
        queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
        return true;
      }

    case 'dragenter':
      {
        var dragEvent = nativeEvent;
        queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
        return true;
      }

    case 'mouseover':
      {
        var mouseEvent = nativeEvent;
        queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
        return true;
      }

    case 'pointerover':
      {
        var pointerEvent = nativeEvent;
        var pointerId = pointerEvent.pointerId;
        queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
        return true;
      }

    case 'gotpointercapture':
      {
        var _pointerEvent = nativeEvent;
        var _pointerId2 = _pointerEvent.pointerId;
        queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
        return true;
      }
  }

  return false;
} // Check if this target is unblocked. Returns true if it's unblocked.

function attemptExplicitHydrationTarget(queuedTarget) {
  // TODO: This function shares a lot of logic with attemptToDispatchEvent.
  // Try to unify them. It's a bit tricky since it would require two return
  // values.
  var targetInst = getClosestInstanceFromNode(queuedTarget.target);

  if (targetInst !== null) {
    var nearestMounted = getNearestMountedFiber(targetInst);

    if (nearestMounted !== null) {
      var tag = nearestMounted.tag;

      if (tag === SuspenseComponent) {
        var instance = getSuspenseInstanceFromFiber(nearestMounted);

        if (instance !== null) {
          // We're blocked on hydrating this boundary.
          // Increase its priority.
          queuedTarget.blockedOn = instance;
          attemptHydrationAtPriority(queuedTarget.lanePriority, function () {
            Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
              attemptHydrationAtCurrentPriority(nearestMounted);
            });
          });
          return;
        }
      } else if (tag === HostRoot) {
        var root = nearestMounted.stateNode;

        if (root.hydrate) {
          queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
          // a root other than sync.

          return;
        }
      }
    }
  }

  queuedTarget.blockedOn = null;
}

function attemptReplayContinuousQueuedEvent(queuedEvent) {
  if (queuedEvent.blockedOn !== null) {
    return false;
  }

  var targetContainers = queuedEvent.targetContainers;

  while (targetContainers.length > 0) {
    var targetContainer = targetContainers[0];
    var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);

    if (nextBlockedOn !== null) {
      // We're still blocked. Try again later.
      var _fiber3 = getInstanceFromNode(nextBlockedOn);

      if (_fiber3 !== null) {
        attemptContinuousHydration(_fiber3);
      }

      queuedEvent.blockedOn = nextBlockedOn;
      return false;
    } // This target container was successfully dispatched. Try the next.


    targetContainers.shift();
  }

  return true;
}

function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
  if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
    map.delete(key);
  }
}

function replayUnblockedEvents() {
  hasScheduledReplayAttempt = false; // First replay discrete events.

  while (queuedDiscreteEvents.length > 0) {
    var nextDiscreteEvent = queuedDiscreteEvents[0];

    if (nextDiscreteEvent.blockedOn !== null) {
      // We're still blocked.
      // Increase the priority of this boundary to unblock
      // the next discrete event.
      var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);

      if (_fiber4 !== null) {
        attemptUserBlockingHydration(_fiber4);
      }

      break;
    }

    var targetContainers = nextDiscreteEvent.targetContainers;

    while (targetContainers.length > 0) {
      var targetContainer = targetContainers[0];
      var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);

      if (nextBlockedOn !== null) {
        // We're still blocked. Try again later.
        nextDiscreteEvent.blockedOn = nextBlockedOn;
        break;
      } // This target container was successfully dispatched. Try the next.


      targetContainers.shift();
    }

    if (nextDiscreteEvent.blockedOn === null) {
      // We've successfully replayed the first event. Let's try the next one.
      queuedDiscreteEvents.shift();
    }
  } // Next replay any continuous events.


  if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
    queuedFocus = null;
  }

  if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
    queuedDrag = null;
  }

  if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
    queuedMouse = null;
  }

  queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
  queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
}

function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
  if (queuedEvent.blockedOn === unblocked) {
    queuedEvent.blockedOn = null;

    if (!hasScheduledReplayAttempt) {
      hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
      // now unblocked. This first might not actually be unblocked yet.
      // We could check it early to avoid scheduling an unnecessary callback.

      Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
    }
  }
}

function retryIfBlockedOn(unblocked) {
  // Mark anything that was blocked on this as no longer blocked
  // and eligible for a replay.
  if (queuedDiscreteEvents.length > 0) {
    scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
    // worth it because we expect very few discrete events to queue up and once
    // we are actually fully unblocked it will be fast to replay them.

    for (var i = 1; i < queuedDiscreteEvents.length; i++) {
      var queuedEvent = queuedDiscreteEvents[i];

      if (queuedEvent.blockedOn === unblocked) {
        queuedEvent.blockedOn = null;
      }
    }
  }

  if (queuedFocus !== null) {
    scheduleCallbackIfUnblocked(queuedFocus, unblocked);
  }

  if (queuedDrag !== null) {
    scheduleCallbackIfUnblocked(queuedDrag, unblocked);
  }

  if (queuedMouse !== null) {
    scheduleCallbackIfUnblocked(queuedMouse, unblocked);
  }

  var unblock = function (queuedEvent) {
    return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
  };

  queuedPointers.forEach(unblock);
  queuedPointerCaptures.forEach(unblock);

  for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
    var queuedTarget = queuedExplicitHydrationTargets[_i];

    if (queuedTarget.blockedOn === unblocked) {
      queuedTarget.blockedOn = null;
    }
  }

  while (queuedExplicitHydrationTargets.length > 0) {
    var nextExplicitTarget = queuedExplicitHydrationTargets[0];

    if (nextExplicitTarget.blockedOn !== null) {
      // We're still blocked.
      break;
    } else {
      attemptExplicitHydrationTarget(nextExplicitTarget);

      if (nextExplicitTarget.blockedOn === null) {
        // We're unblocked.
        queuedExplicitHydrationTargets.shift();
      }
    }
  }
}

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

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

var ANIMATION_END = getVendorPrefixedEventName('animationend');
var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
var ANIMATION_START = getVendorPrefixedEventName('animationstart');
var TRANSITION_END = getVendorPrefixedEventName('transitionend');

var topLevelEventsToReactNames = new Map();
var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
// the code required to apply the same logic for event prioritization and that of the
// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
// duplication (for which there would be quite a bit). For the events that are not needed
// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
// array of top level events.
// Lastly, we ignore prettier so we can keep the formatting sane.
// prettier-ignore

var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!
'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!
'focusout', 'blur', // Careful!
'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange'];
var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];


var userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore

var continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting'];
/**
 * Turns
 * ['abort', ...]
 *
 * into
 *
 * topLevelEventsToReactNames = new Map([
 *   ['abort', 'onAbort'],
 * ]);
 *
 * and registers them.
 */

function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {
  // As the event types are in pairs of two, we need to iterate
  // through in twos. The events are in pairs of two to save code
  // and improve init perf of processing this array, as it will
  // result in far fewer object allocations and property accesses
  // if we only use three arrays to process all the categories of
  // instead of tuples.
  for (var i = 0; i < eventTypes.length; i += 2) {
    var topEvent = eventTypes[i];
    var event = eventTypes[i + 1];
    var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
    var reactName = 'on' + capitalizedEvent;
    eventPriorities.set(topEvent, priority);
    topLevelEventsToReactNames.set(topEvent, reactName);
    registerTwoPhaseEvent(reactName, [topEvent]);
  }
}

function setEventPriorities(eventTypes, priority) {
  for (var i = 0; i < eventTypes.length; i++) {
    eventPriorities.set(eventTypes[i], priority);
  }
}

function getEventPriorityForPluginSystem(domEventName) {
  var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might
  // want to warn if we can't detect the priority
  // for the event.

  return priority === undefined ? ContinuousEvent : priority;
}
function registerSimpleEvents() {
  registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
  registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
  registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);
  setEventPriorities(otherDiscreteEvents, DiscreteEvent);
}

var Scheduler_now = Scheduler.unstable_now;

{
  // Provide explicit error message when production+profiling bundle of e.g.
  // react-dom is used with production (non-profiling) bundle of
  // scheduler/tracing
  if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
    {
      throw 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 https://reactjs.org/link/profiling" );
    }
  }
}
// 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 = 98;
var NormalPriority = 97;
var LowPriority = 96;
var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.

var NoPriority = 90;
var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.

var SyncLanePriority = 15;
var SyncBatchedLanePriority = 14;
var InputDiscreteHydrationLanePriority = 13;
var InputDiscreteLanePriority = 12;
var InputContinuousHydrationLanePriority = 11;
var InputContinuousLanePriority = 10;
var DefaultHydrationLanePriority = 9;
var DefaultLanePriority = 8;
var TransitionHydrationPriority = 7;
var TransitionPriority = 6;
var RetryLanePriority = 5;
var SelectiveHydrationLanePriority = 4;
var IdleHydrationLanePriority = 3;
var IdleLanePriority = 2;
var OffscreenLanePriority = 1;
var NoLanePriority = 0;
var TotalLanes = 31;
var NoLanes =
/*                        */
0;
var NoLane =
/*                          */
0;
var SyncLane =
/*                        */
1;
var SyncBatchedLane =
/*                 */
2;
var InputDiscreteHydrationLane =
/*      */
4;
var InputDiscreteLanes =
/*                    */
24;
var InputContinuousHydrationLane =
/*           */
32;
var InputContinuousLanes =
/*                  */
192;
var DefaultHydrationLane =
/*            */
256;
var DefaultLanes =
/*                   */
3584;
var TransitionHydrationLane =
/*                */
4096;
var TransitionLanes =
/*                       */
4186112;
var RetryLanes =
/*                            */
62914560;
var SomeRetryLane =
/*                  */
33554432;
var SelectiveHydrationLane =
/*          */
67108864;
var NonIdleLanes =
/*                                 */
134217727;
var IdleHydrationLane =
/*               */
134217728;
var IdleLanes =
/*                             */
805306368;
var OffscreenLane =
/*                   */
1073741824;
var NoTimestamp = -1;
function setCurrentUpdateLanePriority(newLanePriority) {
} // "Registers" used to "return" multiple values
// Used by getHighestPriorityLanes and getNextLanes:

var return_highestLanePriority = DefaultLanePriority;

function getHighestPriorityLanes(lanes) {
  if ((SyncLane & lanes) !== NoLanes) {
    return_highestLanePriority = SyncLanePriority;
    return SyncLane;
  }

  if ((SyncBatchedLane & lanes) !== NoLanes) {
    return_highestLanePriority = SyncBatchedLanePriority;
    return SyncBatchedLane;
  }

  if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {
    return_highestLanePriority = InputDiscreteHydrationLanePriority;
    return InputDiscreteHydrationLane;
  }

  var inputDiscreteLanes = InputDiscreteLanes & lanes;

  if (inputDiscreteLanes !== NoLanes) {
    return_highestLanePriority = InputDiscreteLanePriority;
    return inputDiscreteLanes;
  }

  if ((lanes & InputContinuousHydrationLane) !== NoLanes) {
    return_highestLanePriority = InputContinuousHydrationLanePriority;
    return InputContinuousHydrationLane;
  }

  var inputContinuousLanes = InputContinuousLanes & lanes;

  if (inputContinuousLanes !== NoLanes) {
    return_highestLanePriority = InputContinuousLanePriority;
    return inputContinuousLanes;
  }

  if ((lanes & DefaultHydrationLane) !== NoLanes) {
    return_highestLanePriority = DefaultHydrationLanePriority;
    return DefaultHydrationLane;
  }

  var defaultLanes = DefaultLanes & lanes;

  if (defaultLanes !== NoLanes) {
    return_highestLanePriority = DefaultLanePriority;
    return defaultLanes;
  }

  if ((lanes & TransitionHydrationLane) !== NoLanes) {
    return_highestLanePriority = TransitionHydrationPriority;
    return TransitionHydrationLane;
  }

  var transitionLanes = TransitionLanes & lanes;

  if (transitionLanes !== NoLanes) {
    return_highestLanePriority = TransitionPriority;
    return transitionLanes;
  }

  var retryLanes = RetryLanes & lanes;

  if (retryLanes !== NoLanes) {
    return_highestLanePriority = RetryLanePriority;
    return retryLanes;
  }

  if (lanes & SelectiveHydrationLane) {
    return_highestLanePriority = SelectiveHydrationLanePriority;
    return SelectiveHydrationLane;
  }

  if ((lanes & IdleHydrationLane) !== NoLanes) {
    return_highestLanePriority = IdleHydrationLanePriority;
    return IdleHydrationLane;
  }

  var idleLanes = IdleLanes & lanes;

  if (idleLanes !== NoLanes) {
    return_highestLanePriority = IdleLanePriority;
    return idleLanes;
  }

  if ((OffscreenLane & lanes) !== NoLanes) {
    return_highestLanePriority = OffscreenLanePriority;
    return OffscreenLane;
  }

  {
    error('Should have found matching lanes. This is a bug in React.');
  } // This shouldn't be reachable, but as a fallback, return the entire bitmask.


  return_highestLanePriority = DefaultLanePriority;
  return lanes;
}

function schedulerPriorityToLanePriority(schedulerPriorityLevel) {
  switch (schedulerPriorityLevel) {
    case ImmediatePriority:
      return SyncLanePriority;

    case UserBlockingPriority:
      return InputContinuousLanePriority;

    case NormalPriority:
    case LowPriority:
      // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
      return DefaultLanePriority;

    case IdlePriority:
      return IdleLanePriority;

    default:
      return NoLanePriority;
  }
}
function lanePriorityToSchedulerPriority(lanePriority) {
  switch (lanePriority) {
    case SyncLanePriority:
    case SyncBatchedLanePriority:
      return ImmediatePriority;

    case InputDiscreteHydrationLanePriority:
    case InputDiscreteLanePriority:
    case InputContinuousHydrationLanePriority:
    case InputContinuousLanePriority:
      return UserBlockingPriority;

    case DefaultHydrationLanePriority:
    case DefaultLanePriority:
    case TransitionHydrationPriority:
    case TransitionPriority:
    case SelectiveHydrationLanePriority:
    case RetryLanePriority:
      return NormalPriority;

    case IdleHydrationLanePriority:
    case IdleLanePriority:
    case OffscreenLanePriority:
      return IdlePriority;

    case NoLanePriority:
      return NoPriority;

    default:
      {
        {
          throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
        }
      }

  }
}
function getNextLanes(root, wipLanes) {
  // Early bailout if there's no pending work left.
  var pendingLanes = root.pendingLanes;

  if (pendingLanes === NoLanes) {
    return_highestLanePriority = NoLanePriority;
    return NoLanes;
  }

  var nextLanes = NoLanes;
  var nextLanePriority = NoLanePriority;
  var expiredLanes = root.expiredLanes;
  var suspendedLanes = root.suspendedLanes;
  var pingedLanes = root.pingedLanes; // Check if any work has expired.

  if (expiredLanes !== NoLanes) {
    nextLanes = expiredLanes;
    nextLanePriority = return_highestLanePriority = SyncLanePriority;
  } else {
    // Do not work on any idle work until all the non-idle work has finished,
    // even if the work is suspended.
    var nonIdlePendingLanes = pendingLanes & NonIdleLanes;

    if (nonIdlePendingLanes !== NoLanes) {
      var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;

      if (nonIdleUnblockedLanes !== NoLanes) {
        nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
        nextLanePriority = return_highestLanePriority;
      } else {
        var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;

        if (nonIdlePingedLanes !== NoLanes) {
          nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
          nextLanePriority = return_highestLanePriority;
        }
      }
    } else {
      // The only remaining work is Idle.
      var unblockedLanes = pendingLanes & ~suspendedLanes;

      if (unblockedLanes !== NoLanes) {
        nextLanes = getHighestPriorityLanes(unblockedLanes);
        nextLanePriority = return_highestLanePriority;
      } else {
        if (pingedLanes !== NoLanes) {
          nextLanes = getHighestPriorityLanes(pingedLanes);
          nextLanePriority = return_highestLanePriority;
        }
      }
    }
  }

  if (nextLanes === NoLanes) {
    // This should only be reachable if we're suspended
    // TODO: Consider warning in this path if a fallback timer is not scheduled.
    return NoLanes;
  } // If there are higher priority lanes, we'll include them even if they
  // are suspended.


  nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt
  // it and we'll lose our progress. We should only do this if the new lanes are
  // higher priority.

  if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
  // bother waiting until the root is complete.
  (wipLanes & suspendedLanes) === NoLanes) {
    getHighestPriorityLanes(wipLanes);
    var wipLanePriority = return_highestLanePriority;

    if (nextLanePriority <= wipLanePriority) {
      return wipLanes;
    } else {
      return_highestLanePriority = nextLanePriority;
    }
  } // Check for entangled lanes and add them to the batch.
  //
  // A lane is said to be entangled with another when it's not allowed to render
  // in a batch that does not also include the other lane. Typically we do this
  // when multiple updates have the same source, and we only want to respond to
  // the most recent event from that source.
  //
  // Note that we apply entanglements *after* checking for partial work above.
  // This means that if a lane is entangled during an interleaved event while
  // it's already rendering, we won't interrupt it. This is intentional, since
  // entanglement is usually "best effort": we'll try our best to render the
  // lanes in the same batch, but it's not worth throwing out partially
  // completed work in order to do it.
  //
  // For those exceptions where entanglement is semantically important, like
  // useMutableSource, we should ensure that there is no partial work at the
  // time we apply the entanglement.


  var entangledLanes = root.entangledLanes;

  if (entangledLanes !== NoLanes) {
    var entanglements = root.entanglements;
    var lanes = nextLanes & entangledLanes;

    while (lanes > 0) {
      var index = pickArbitraryLaneIndex(lanes);
      var lane = 1 << index;
      nextLanes |= entanglements[index];
      lanes &= ~lane;
    }
  }

  return nextLanes;
}
function getMostRecentEventTime(root, lanes) {
  var eventTimes = root.eventTimes;
  var mostRecentEventTime = NoTimestamp;

  while (lanes > 0) {
    var index = pickArbitraryLaneIndex(lanes);
    var lane = 1 << index;
    var eventTime = eventTimes[index];

    if (eventTime > mostRecentEventTime) {
      mostRecentEventTime = eventTime;
    }

    lanes &= ~lane;
  }

  return mostRecentEventTime;
}

function computeExpirationTime(lane, currentTime) {
  // TODO: Expiration heuristic is constant per lane, so could use a map.
  getHighestPriorityLanes(lane);
  var priority = return_highestLanePriority;

  if (priority >= InputContinuousLanePriority) {
    // User interactions should expire slightly more quickly.
    //
    // NOTE: This is set to the corresponding constant as in Scheduler.js. When
    // we made it larger, a product metric in www regressed, suggesting there's
    // a user interaction that's being starved by a series of synchronous
    // updates. If that theory is correct, the proper solution is to fix the
    // starvation. However, this scenario supports the idea that expiration
    // times are an important safeguard when starvation does happen.
    //
    // Also note that, in the case of user input specifically, this will soon no
    // longer be an issue because we plan to make user input synchronous by
    // default (until you enter `startTransition`, of course.)
    //
    // If weren't planning to make these updates synchronous soon anyway, I
    // would probably make this number a configurable parameter.
    return currentTime + 250;
  } else if (priority >= TransitionPriority) {
    return currentTime + 5000;
  } else {
    // Anything idle priority or lower should never expire.
    return NoTimestamp;
  }
}

function markStarvedLanesAsExpired(root, currentTime) {
  // TODO: This gets called every time we yield. We can optimize by storing
  // the earliest expiration time on the root. Then use that to quickly bail out
  // of this function.
  var pendingLanes = root.pendingLanes;
  var suspendedLanes = root.suspendedLanes;
  var pingedLanes = root.pingedLanes;
  var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
  // expiration time. If so, we'll assume the update is being starved and mark
  // it as expired to force it to finish.

  var lanes = pendingLanes;

  while (lanes > 0) {
    var index = pickArbitraryLaneIndex(lanes);
    var lane = 1 << index;
    var expirationTime = expirationTimes[index];

    if (expirationTime === NoTimestamp) {
      // Found a pending lane with no expiration time. If it's not suspended, or
      // if it's pinged, assume it's CPU-bound. Compute a new expiration time
      // using the current time.
      if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
        // Assumes timestamps are monotonically increasing.
        expirationTimes[index] = computeExpirationTime(lane, currentTime);
      }
    } else if (expirationTime <= currentTime) {
      // This lane expired
      root.expiredLanes |= lane;
    }

    lanes &= ~lane;
  }
} // This returns the highest priority pending lanes regardless of whether they
function getLanesToRetrySynchronouslyOnError(root) {
  var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;

  if (everythingButOffscreen !== NoLanes) {
    return everythingButOffscreen;
  }

  if (everythingButOffscreen & OffscreenLane) {
    return OffscreenLane;
  }

  return NoLanes;
}
function returnNextLanesPriority() {
  return return_highestLanePriority;
}
function includesNonIdleWork(lanes) {
  return (lanes & NonIdleLanes) !== NoLanes;
}
function includesOnlyRetries(lanes) {
  return (lanes & RetryLanes) === lanes;
}
function includesOnlyTransitions(lanes) {
  return (lanes & TransitionLanes) === lanes;
} // To ensure consistency across multiple updates in the same event, this should
// be a pure function, so that it always returns the same lane for given inputs.

function findUpdateLane(lanePriority, wipLanes) {
  switch (lanePriority) {
    case NoLanePriority:
      break;

    case SyncLanePriority:
      return SyncLane;

    case SyncBatchedLanePriority:
      return SyncBatchedLane;

    case InputDiscreteLanePriority:
      {
        var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);

        if (_lane === NoLane) {
          // Shift to the next priority level
          return findUpdateLane(InputContinuousLanePriority, wipLanes);
        }

        return _lane;
      }

    case InputContinuousLanePriority:
      {
        var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);

        if (_lane2 === NoLane) {
          // Shift to the next priority level
          return findUpdateLane(DefaultLanePriority, wipLanes);
        }

        return _lane2;
      }

    case DefaultLanePriority:
      {
        var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);

        if (_lane3 === NoLane) {
          // If all the default lanes are already being worked on, look for a
          // lane in the transition range.
          _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);

          if (_lane3 === NoLane) {
            // All the transition lanes are taken, too. This should be very
            // rare, but as a last resort, pick a default lane. This will have
            // the effect of interrupting the current work-in-progress render.
            _lane3 = pickArbitraryLane(DefaultLanes);
          }
        }

        return _lane3;
      }

    case TransitionPriority: // Should be handled by findTransitionLane instead

    case RetryLanePriority:
      // Should be handled by findRetryLane instead
      break;

    case IdleLanePriority:
      var lane = pickArbitraryLane(IdleLanes & ~wipLanes);

      if (lane === NoLane) {
        lane = pickArbitraryLane(IdleLanes);
      }

      return lane;
  }

  {
    {
      throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
    }
  }
} // To ensure consistency across multiple updates in the same event, this should
// be pure function, so that it always returns the same lane for given inputs.

function findTransitionLane(wipLanes, pendingLanes) {
  // First look for lanes that are completely unclaimed, i.e. have no
  // pending work.
  var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);

  if (lane === NoLane) {
    // If all lanes have pending work, look for a lane that isn't currently
    // being worked on.
    lane = pickArbitraryLane(TransitionLanes & ~wipLanes);

    if (lane === NoLane) {
      // If everything is being worked on, pick any lane. This has the
      // effect of interrupting the current work-in-progress.
      lane = pickArbitraryLane(TransitionLanes);
    }
  }

  return lane;
} // To ensure consistency across multiple updates in the same event, this should
// be pure function, so that it always returns the same lane for given inputs.

function findRetryLane(wipLanes) {
  // This is a fork of `findUpdateLane` designed specifically for Suspense
  // "retries" — a special update that attempts to flip a Suspense boundary
  // from its placeholder state to its primary/resolved state.
  var lane = pickArbitraryLane(RetryLanes & ~wipLanes);

  if (lane === NoLane) {
    lane = pickArbitraryLane(RetryLanes);
  }

  return lane;
}

function getHighestPriorityLane(lanes) {
  return lanes & -lanes;
}

function getLowestPriorityLane(lanes) {
  // This finds the most significant non-zero bit.
  var index = 31 - clz32(lanes);
  return index < 0 ? NoLanes : 1 << index;
}

function getEqualOrHigherPriorityLanes(lanes) {
  return (getLowestPriorityLane(lanes) << 1) - 1;
}

function pickArbitraryLane(lanes) {
  // This wrapper function gets inlined. Only exists so to communicate that it
  // doesn't matter which bit is selected; you can pick any bit without
  // affecting the algorithms where its used. Here I'm using
  // getHighestPriorityLane because it requires the fewest operations.
  return getHighestPriorityLane(lanes);
}

function pickArbitraryLaneIndex(lanes) {
  return 31 - clz32(lanes);
}

function laneToIndex(lane) {
  return pickArbitraryLaneIndex(lane);
}

function includesSomeLane(a, b) {
  return (a & b) !== NoLanes;
}
function isSubsetOfLanes(set, subset) {
  return (set & subset) === subset;
}
function mergeLanes(a, b) {
  return a | b;
}
function removeLanes(set, subset) {
  return set & ~subset;
} // Seems redundant, but it changes the type from a single lane (used for
// updates) to a group of lanes (used for flushing work).

function laneToLanes(lane) {
  return lane;
}
function higherPriorityLane(a, b) {
  // This works because the bit ranges decrease in priority as you go left.
  return a !== NoLane && a < b ? a : b;
}
function createLaneMap(initial) {
  // Intentionally pushing one by one.
  // https://v8.dev/blog/elements-kinds#avoid-creating-holes
  var laneMap = [];

  for (var i = 0; i < TotalLanes; i++) {
    laneMap.push(initial);
  }

  return laneMap;
}
function markRootUpdated(root, updateLane, eventTime) {
  root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But
  // it's not practical to try every single possible combination. We need a
  // heuristic to decide which lanes to attempt to render, and in which batches.
  // For now, we use the same heuristic as in the old ExpirationTimes model:
  // retry any lane at equal or lower priority, but don't try updates at higher
  // priority without also including the lower priority updates. This works well
  // when considering updates across different priority levels, but isn't
  // sufficient for updates within the same priority, since we want to treat
  // those updates as parallel.
  // Unsuspend any update at equal or lower priority.

  var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111

  root.suspendedLanes &= higherPriorityLanes;
  root.pingedLanes &= higherPriorityLanes;
  var eventTimes = root.eventTimes;
  var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
  // recent event, and we assume time is monotonically increasing.

  eventTimes[index] = eventTime;
}
function markRootSuspended(root, suspendedLanes) {
  root.suspendedLanes |= suspendedLanes;
  root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.

  var expirationTimes = root.expirationTimes;
  var lanes = suspendedLanes;

  while (lanes > 0) {
    var index = pickArbitraryLaneIndex(lanes);
    var lane = 1 << index;
    expirationTimes[index] = NoTimestamp;
    lanes &= ~lane;
  }
}
function markRootPinged(root, pingedLanes, eventTime) {
  root.pingedLanes |= root.suspendedLanes & pingedLanes;
}
function markDiscreteUpdatesExpired(root) {
  root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;
}
function hasDiscreteLanes(lanes) {
  return (lanes & InputDiscreteLanes) !== NoLanes;
}
function markRootMutableRead(root, updateLane) {
  root.mutableReadLanes |= updateLane & root.pendingLanes;
}
function markRootFinished(root, remainingLanes) {
  var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
  root.pendingLanes = remainingLanes; // Let's try everything again

  root.suspendedLanes = 0;
  root.pingedLanes = 0;
  root.expiredLanes &= remainingLanes;
  root.mutableReadLanes &= remainingLanes;
  root.entangledLanes &= remainingLanes;
  var entanglements = root.entanglements;
  var eventTimes = root.eventTimes;
  var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work

  var lanes = noLongerPendingLanes;

  while (lanes > 0) {
    var index = pickArbitraryLaneIndex(lanes);
    var lane = 1 << index;
    entanglements[index] = NoLanes;
    eventTimes[index] = NoTimestamp;
    expirationTimes[index] = NoTimestamp;
    lanes &= ~lane;
  }
}
function markRootEntangled(root, entangledLanes) {
  root.entangledLanes |= entangledLanes;
  var entanglements = root.entanglements;
  var lanes = entangledLanes;

  while (lanes > 0) {
    var index = pickArbitraryLaneIndex(lanes);
    var lane = 1 << index;
    entanglements[index] |= entangledLanes;
    lanes &= ~lane;
  }
}
var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.
// Based on:
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32

var log = Math.log;
var LN2 = Math.LN2;

function clz32Fallback(lanes) {
  if (lanes === 0) {
    return 32;
  }

  return 31 - (log(lanes) / LN2 | 0) | 0;
}

// Intentionally not named imports because Rollup would use dynamic dispatch for
var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority,
    runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?

var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
// We'd like to remove this but it's not clear if this is safe.

function setEnabled(enabled) {
  _enabled = !!enabled;
}
function isEnabled() {
  return _enabled;
}
function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
  var eventPriority = getEventPriorityForPluginSystem(domEventName);
  var listenerWrapper;

  switch (eventPriority) {
    case DiscreteEvent:
      listenerWrapper = dispatchDiscreteEvent;
      break;

    case UserBlockingEvent:
      listenerWrapper = dispatchUserBlockingUpdate;
      break;

    case ContinuousEvent:
    default:
      listenerWrapper = dispatchEvent;
      break;
  }

  return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
}

function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
  {
    flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
  }

  discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);
}

function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {
  {
    runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));
  }
}

function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  if (!_enabled) {
    return;
  }

  var allowReplay = true;

  {
    // TODO: replaying capture phase events is currently broken
    // because we used to do it during top-level native bubble handlers
    // but now we use different bubble and capture handlers.
    // In eager mode, we attach capture listeners early, so we need
    // to filter them out until we fix the logic to handle them correctly.
    // This could've been outside the flag but I put it inside to reduce risk.
    allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;
  }

  if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {
    // If we already have a queue of discrete events, and this is another discrete
    // event, then we can't dispatch it regardless of its target, since they
    // need to dispatch in order.
    queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
    domEventName, eventSystemFlags, targetContainer, nativeEvent);
    return;
  }

  var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);

  if (blockedOn === null) {
    // We successfully dispatched this event.
    if (allowReplay) {
      clearIfContinuousEvent(domEventName, nativeEvent);
    }

    return;
  }

  if (allowReplay) {
    if (isReplayableDiscreteEvent(domEventName)) {
      // This this to be replayed later once the target is available.
      queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
      return;
    }

    if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
      return;
    } // We need to clear only if we didn't queue because
    // queueing is accummulative.


    clearIfContinuousEvent(domEventName, nativeEvent);
  } // This is not replayable so we'll invoke it but without a target,
  // in case the event system needs to trace it.


  dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.

function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
  // TODO: Warn if _enabled is false.
  var nativeEventTarget = getEventTarget(nativeEvent);
  var targetInst = getClosestInstanceFromNode(nativeEventTarget);

  if (targetInst !== null) {
    var nearestMounted = getNearestMountedFiber(targetInst);

    if (nearestMounted === null) {
      // This tree has been unmounted already. Dispatch without a target.
      targetInst = null;
    } else {
      var tag = nearestMounted.tag;

      if (tag === SuspenseComponent) {
        var instance = getSuspenseInstanceFromFiber(nearestMounted);

        if (instance !== null) {
          // Queue the event to be replayed later. Abort dispatching since we
          // don't want this event dispatched twice through the event system.
          // TODO: If this is the first discrete event in the queue. Schedule an increased
          // priority for this boundary.
          return instance;
        } // This shouldn't happen, something went wrong but to avoid blocking
        // the whole system, dispatch the event without a target.
        // TODO: Warn.


        targetInst = null;
      } else if (tag === HostRoot) {
        var root = nearestMounted.stateNode;

        if (root.hydrate) {
          // If this happens during a replay something went wrong and it might block
          // the whole system.
          return getContainerFromFiber(nearestMounted);
        }

        targetInst = null;
      } else if (nearestMounted !== 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;
      }
    }
  }

  dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.

  return null;
}

function addEventBubbleListener(target, eventType, listener) {
  target.addEventListener(eventType, listener, false);
  return listener;
}
function addEventCaptureListener(target, eventType, listener) {
  target.addEventListener(eventType, listener, true);
  return listener;
}
function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
  target.addEventListener(eventType, listener, {
    capture: true,
    passive: passive
  });
  return listener;
}
function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
  target.addEventListener(eventType, listener, {
    passive: passive
  });
  return listener;
}

/**
 * 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;
  var startValue = startText;
  var startLength = startValue.length;
  var end;
  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;
}

/**
 * `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;
  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;
}

function functionThatReturnsTrue() {
  return true;
}

function functionThatReturnsFalse() {
  return false;
} // This is intentionally a factory so that we have different returned constructors.
// If we had a single constructor, it would be megamorphic and engines would deopt.


function createSyntheticEvent(Interface) {
  /**
   * 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.
   */
  function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
    this._reactName = reactName;
    this._targetInst = targetInst;
    this.type = reactEventType;
    this.nativeEvent = nativeEvent;
    this.target = nativeEventTarget;
    this.currentTarget = null;

    for (var _propName in Interface) {
      if (!Interface.hasOwnProperty(_propName)) {
        continue;
      }

      var normalize = Interface[_propName];

      if (normalize) {
        this[_propName] = normalize(nativeEvent);
      } 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(SyntheticBaseEvent.prototype, {
    preventDefault: function () {
      this.defaultPrevented = true;
      var event = this.nativeEvent;

      if (!event) {
        return;
      }

      if (event.preventDefault) {
        event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
      } 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(); // $FlowFixMe - flow is not aware of `unknown` in IE
      } 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 () {// Modern event system doesn't use pooling.
    },

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

  return SyntheticBaseEvent;
}
/**
 * @interface Event
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */


var EventInterface = {
  eventPhase: 0,
  bubbles: 0,
  cancelable: 0,
  timeStamp: function (event) {
    return event.timeStamp || Date.now();
  },
  defaultPrevented: 0,
  isTrusted: 0
};
var SyntheticEvent = createSyntheticEvent(EventInterface);

var UIEventInterface = _assign({}, EventInterface, {
  view: 0,
  detail: 0
});

var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
var lastMovementX;
var lastMovementY;
var lastMouseEvent;

function updateMouseMovementPolyfillState(event) {
  if (event !== lastMouseEvent) {
    if (lastMouseEvent && event.type === 'mousemove') {
      lastMovementX = event.screenX - lastMouseEvent.screenX;
      lastMovementY = event.screenY - lastMouseEvent.screenY;
    } else {
      lastMovementX = 0;
      lastMovementY = 0;
    }

    lastMouseEvent = event;
  }
}
/**
 * @interface MouseEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */


var MouseEventInterface = _assign({}, UIEventInterface, {
  screenX: 0,
  screenY: 0,
  clientX: 0,
  clientY: 0,
  pageX: 0,
  pageY: 0,
  ctrlKey: 0,
  shiftKey: 0,
  altKey: 0,
  metaKey: 0,
  getModifierState: getEventModifierState,
  button: 0,
  buttons: 0,
  relatedTarget: function (event) {
    if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
    return event.relatedTarget;
  },
  movementX: function (event) {
    if ('movementX' in event) {
      return event.movementX;
    }

    updateMouseMovementPolyfillState(event);
    return lastMovementX;
  },
  movementY: function (event) {
    if ('movementY' in event) {
      return event.movementY;
    } // Don't need to call updateMouseMovementPolyfillState() here
    // because it's guaranteed to have already run when movementX
    // was copied.


    return lastMovementY;
  }
});

var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
/**
 * @interface DragEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var DragEventInterface = _assign({}, MouseEventInterface, {
  dataTransfer: 0
});

var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
/**
 * @interface FocusEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var FocusEventInterface = _assign({}, UIEventInterface, {
  relatedTarget: 0
});

var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
/**
 * @interface Event
 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
 */

var AnimationEventInterface = _assign({}, EventInterface, {
  animationName: 0,
  elapsedTime: 0,
  pseudoElement: 0
});

var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
/**
 * @interface Event
 * @see http://www.w3.org/TR/clipboard-apis/
 */

var ClipboardEventInterface = _assign({}, EventInterface, {
  clipboardData: function (event) {
    return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
  }
});

var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
/**
 * @interface Event
 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
 */

var CompositionEventInterface = _assign({}, EventInterface, {
  data: 0
});

var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
/**
 * @interface Event
 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
 *      /#events-inputevents
 */
// Happens to share the same list for now.

var SyntheticInputEvent = SyntheticCompositionEvent;
/**
 * 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 '';
}
/**
 * Translation from modifier key to the associated property in the event.
 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
 */


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.

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;
}
/**
 * @interface KeyboardEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */


var KeyboardEventInterface = _assign({}, UIEventInterface, {
  key: getEventKey,
  code: 0,
  location: 0,
  ctrlKey: 0,
  shiftKey: 0,
  altKey: 0,
  metaKey: 0,
  repeat: 0,
  locale: 0,
  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;
  }
});

var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
/**
 * @interface PointerEvent
 * @see http://www.w3.org/TR/pointerevents/
 */

var PointerEventInterface = _assign({}, MouseEventInterface, {
  pointerId: 0,
  width: 0,
  height: 0,
  pressure: 0,
  tangentialPressure: 0,
  tiltX: 0,
  tiltY: 0,
  twist: 0,
  pointerType: 0,
  isPrimary: 0
});

var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
/**
 * @interface TouchEvent
 * @see http://www.w3.org/TR/touch-events/
 */

var TouchEventInterface = _assign({}, UIEventInterface, {
  touches: 0,
  targetTouches: 0,
  changedTouches: 0,
  altKey: 0,
  metaKey: 0,
  ctrlKey: 0,
  shiftKey: 0,
  getModifierState: getEventModifierState
});

var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
/**
 * @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 TransitionEventInterface = _assign({}, EventInterface, {
  propertyName: 0,
  elapsedTime: 0,
  pseudoElement: 0
});

var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
/**
 * @interface WheelEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var WheelEventInterface = _assign({}, MouseEventInterface, {
  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: 0,
  // 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: 0
});

var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);

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

function registerEvents() {
  registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
  registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
  registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
  registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
} // 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.
 */


function getCompositionEventType(domEventName) {
  switch (domEventName) {
    case 'compositionstart':
      return 'onCompositionStart';

    case 'compositionend':
      return 'onCompositionEnd';

    case 'compositionupdate':
      return 'onCompositionUpdate';
  }
}
/**
 * Does our fallback best-guess model think this event signifies that
 * composition has begun?
 */


function isFallbackCompositionStart(domEventName, nativeEvent) {
  return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
}
/**
 * Does our fallback mode think that this event is the end of composition?
 */


function isFallbackCompositionEnd(domEventName, nativeEvent) {
  switch (domEventName) {
    case 'keyup':
      // Command keys insert or clear IME input.
      return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;

    case 'keydown':
      // Expect IME keyCode on each keydown. If we get any other
      // code we must have exited earlier.
      return nativeEvent.keyCode !== START_KEYCODE;

    case 'keypress':
    case 'mousedown':
    case 'focusout':
      // 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(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
  var eventType;
  var fallbackData;

  if (canUseCompositionEvent) {
    eventType = getCompositionEventType(domEventName);
  } else if (!isComposing) {
    if (isFallbackCompositionStart(domEventName, nativeEvent)) {
      eventType = 'onCompositionStart';
    }
  } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
    eventType = 'onCompositionEnd';
  }

  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 === 'onCompositionStart') {
      isComposing = initialize(nativeEventTarget);
    } else if (eventType === 'onCompositionEnd') {
      if (isComposing) {
        fallbackData = getData();
      }
    }
  }

  var listeners = accumulateTwoPhaseListeners(targetInst, eventType);

  if (listeners.length > 0) {
    var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
    dispatchQueue.push({
      event: event,
      listeners: listeners
    });

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

function getNativeBeforeInputChars(domEventName, nativeEvent) {
  switch (domEventName) {
    case 'compositionend':
      return getDataFromCustomEvent(nativeEvent);

    case 'keypress':
      /**
       * 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 'textInput':
      // 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.
 */


function getFallbackBeforeInputChars(domEventName, 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 (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
      var chars = getData();
      reset();
      isComposing = false;
      return chars;
    }

    return null;
  }

  switch (domEventName) {
    case '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 'keypress':
      /**
       * 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 'compositionend':
      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(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
  var chars;

  if (canUseTextInputEvent) {
    chars = getNativeBeforeInputChars(domEventName, nativeEvent);
  } else {
    chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
  } // If no characters are being inserted, no BeforeInput event should
  // be fired.


  if (!chars) {
    return null;
  }

  var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');

  if (listeners.length > 0) {
    var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
    dispatchQueue.push({
      event: event,
      listeners: listeners
    });
    event.data = chars;
  }
}
/**
 * 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.
 */


function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
  extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
  extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
}

/**
 * @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;
}

/**
 * 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 registerEvents$1() {
  registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
}

function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
  // Flag this event loop as needing state restore.
  enqueueStateRestore(target);
  var listeners = accumulateTwoPhaseListeners(inst, 'onChange');

  if (listeners.length > 0) {
    var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
    dispatchQueue.push({
      event: event,
      listeners: listeners
    });
  }
}
/**
 * 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 dispatchQueue = [];
  createAndAccumulateChangeEvent(dispatchQueue, 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, dispatchQueue);
}

function runEventInBatch(dispatchQueue) {
  processDispatchQueue(dispatchQueue, 0);
}

function getInstIfValueChanged(targetInst) {
  var targetNode = getNodeFromInstance(targetInst);

  if (updateValueIfChanged(targetNode)) {
    return targetInst;
  }
}

function getTargetInstForChangeEvent(domEventName, targetInst) {
  if (domEventName === '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(domEventName, target, targetInst) {
  if (domEventName === 'focusin') {
    // 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 (domEventName === 'focusout') {
    stopWatchingForValueChange();
  }
} // For IE8 and IE9.


function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
  if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
    // 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(domEventName, targetInst) {
  if (domEventName === 'click') {
    return getInstIfValueChanged(targetInst);
  }
}

function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
  if (domEventName === 'input' || domEventName === 'change') {
    return getInstIfValueChanged(targetInst);
  }
}

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

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

  {
    // 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
 */


function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
  var getTargetInstFunc, handleEventFunc;

  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(domEventName, targetInst);

    if (inst) {
      createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
      return;
    }
  }

  if (handleEventFunc) {
    handleEventFunc(domEventName, targetNode, targetInst);
  } // When blurring, set the value attribute for number inputs


  if (domEventName === 'focusout') {
    handleControlledInputBlur(targetNode);
  }
}

function registerEvents$2() {
  registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
  registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
  registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
  registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
}
/**
 * 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.
 */


function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
  var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
  var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';

  if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {
    // If this is an over event with a target, we might have already dispatched
    // the event in the out event of the other target. If this is replayed,
    // then it's because we couldn't dispatch against this target previously
    // so we have to do it now instead.
    var related = nativeEvent.relatedTarget || nativeEvent.fromElement;

    if (related) {
      // If the related node is managed by React, we can assume that we have
      // already dispatched the corresponding events during its mouseout.
      if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
        return;
      }
    }
  }

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

  var win; // TODO: why is this nullable in the types but we read from it?

  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;
  var to;

  if (isOutEvent) {
    var _related = nativeEvent.relatedTarget || nativeEvent.toElement;

    from = targetInst;
    to = _related ? getClosestInstanceFromNode(_related) : null;

    if (to !== null) {
      var nearestMounted = getNearestMountedFiber(to);

      if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
        to = null;
      }
    }
  } else {
    // Moving to a node from outside the window.
    from = null;
    to = targetInst;
  }

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

  var SyntheticEventCtor = SyntheticMouseEvent;
  var leaveEventType = 'onMouseLeave';
  var enterEventType = 'onMouseEnter';
  var eventTypePrefix = 'mouse';

  if (domEventName === 'pointerout' || domEventName === 'pointerover') {
    SyntheticEventCtor = SyntheticPointerEvent;
    leaveEventType = 'onPointerLeave';
    enterEventType = 'onPointerEnter';
    eventTypePrefix = 'pointer';
  }

  var fromNode = from == null ? win : getNodeFromInstance(from);
  var toNode = to == null ? win : getNodeFromInstance(to);
  var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
  leave.target = fromNode;
  leave.relatedTarget = toNode;
  var enter = null; // We should only process this nativeEvent if we are processing
  // the first ancestor. Next time, we will ignore the event.

  var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);

  if (nativeTargetInst === targetInst) {
    var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
    enterEvent.target = toNode;
    enterEvent.relatedTarget = fromNode;
    enter = enterEvent;
  }

  accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
}

/**
 * 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 objectIs = typeof Object.is === 'function' ? Object.is : is;

var hasOwnProperty$2 = 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 (objectIs(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$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
      return false;
    }
  }

  return true;
}

/**
 * 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(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(input) {
  var selection;

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

function registerEvents$3() {
  registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
}

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

function getSelection$1(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.
 */


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(dispatchQueue, 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;
  } // Only fire when selection has actually changed.


  var currentSelection = getSelection$1(activeElement$1);

  if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
    lastSelection = currentSelection;
    var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');

    if (listeners.length > 0) {
      var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
      dispatchQueue.push({
        event: event,
        listeners: listeners
      });
      event.target = activeElement$1;
    }
  }
}
/**
 * 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.
 */


function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {

  var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;

  switch (domEventName) {
    // Track the input node that has focus.
    case 'focusin':
      if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
        activeElement$1 = targetNode;
        activeElementInst$1 = targetInst;
        lastSelection = null;
      }

      break;

    case 'focusout':
      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 'mousedown':
      mouseDown = true;
      break;

    case 'contextmenu':
    case 'mouseup':
    case 'dragend':
      mouseDown = false;
      constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
      break;
    // 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 'selectionchange':
      if (skipSelectionChangeEvent) {
        break;
      }

    // falls through

    case 'keydown':
    case 'keyup':
      constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
  }
}

function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
  var reactName = topLevelEventsToReactNames.get(domEventName);

  if (reactName === undefined) {
    return;
  }

  var SyntheticEventCtor = SyntheticEvent;
  var reactEventType = domEventName;

  switch (domEventName) {
    case 'keypress':
      // 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;
      }

    /* falls through */

    case 'keydown':
    case 'keyup':
      SyntheticEventCtor = SyntheticKeyboardEvent;
      break;

    case 'focusin':
      reactEventType = 'focus';
      SyntheticEventCtor = SyntheticFocusEvent;
      break;

    case 'focusout':
      reactEventType = 'blur';
      SyntheticEventCtor = SyntheticFocusEvent;
      break;

    case 'beforeblur':
    case 'afterblur':
      SyntheticEventCtor = SyntheticFocusEvent;
      break;

    case 'click':
      // Firefox creates a click event on right mouse clicks. This removes the
      // unwanted click events.
      if (nativeEvent.button === 2) {
        return;
      }

    /* falls through */

    case 'auxclick':
    case 'dblclick':
    case 'mousedown':
    case 'mousemove':
    case 'mouseup': // TODO: Disabled elements should not respond to mouse events

    /* falls through */

    case 'mouseout':
    case 'mouseover':
    case 'contextmenu':
      SyntheticEventCtor = SyntheticMouseEvent;
      break;

    case 'drag':
    case 'dragend':
    case 'dragenter':
    case 'dragexit':
    case 'dragleave':
    case 'dragover':
    case 'dragstart':
    case 'drop':
      SyntheticEventCtor = SyntheticDragEvent;
      break;

    case 'touchcancel':
    case 'touchend':
    case 'touchmove':
    case 'touchstart':
      SyntheticEventCtor = SyntheticTouchEvent;
      break;

    case ANIMATION_END:
    case ANIMATION_ITERATION:
    case ANIMATION_START:
      SyntheticEventCtor = SyntheticAnimationEvent;
      break;

    case TRANSITION_END:
      SyntheticEventCtor = SyntheticTransitionEvent;
      break;

    case 'scroll':
      SyntheticEventCtor = SyntheticUIEvent;
      break;

    case 'wheel':
      SyntheticEventCtor = SyntheticWheelEvent;
      break;

    case 'copy':
    case 'cut':
    case 'paste':
      SyntheticEventCtor = SyntheticClipboardEvent;
      break;

    case 'gotpointercapture':
    case 'lostpointercapture':
    case 'pointercancel':
    case 'pointerdown':
    case 'pointermove':
    case 'pointerout':
    case 'pointerover':
    case 'pointerup':
      SyntheticEventCtor = SyntheticPointerEvent;
      break;
  }

  var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;

  {
    // Some events don't bubble in the browser.
    // In the past, React has always bubbled them, but this can be surprising.
    // We're going to try aligning closer to the browser behavior by not bubbling
    // them in React either. We'll start by not bubbling onScroll, and then expand.
    var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
    // nonDelegatedEvents list in DOMPluginEventSystem.
    // Then we can remove this special list.
    // This is a breaking change that can wait until React 18.
    domEventName === 'scroll';

    var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);

    if (_listeners.length > 0) {
      // Intentionally create event lazily.
      var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);

      dispatchQueue.push({
        event: _event,
        listeners: _listeners
      });
    }
  }
}

// TODO: remove top-level side effect.
registerSimpleEvents();
registerEvents$2();
registerEvents$1();
registerEvents$3();
registerEvents();

function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
  // TODO: we should remove the concept of a "SimpleEventPlugin".
  // This is the basic functionality of the event system. All
  // the other plugins are essentially polyfills. So the plugin
  // should probably be inlined somewhere and have its logic
  // be core the to event system. This would potentially allow
  // us to ship builds of React without the polyfilled plugins below.
  extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
  var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
  // event's native "bubble" phase, which means that we're
  // not in the capture phase. That's because we emulate
  // the capture phase here still. This is a trade-off,
  // because in an ideal world we would not emulate and use
  // the phases properly, like we do with the SimpleEvent
  // plugin. However, the plugins below either expect
  // emulation (EnterLeave) or use state localized to that
  // plugin (BeforeInput, Change, Select). The state in
  // these modules complicates things, as you'll essentially
  // get the case where the capture phase event might change
  // state, only for the following bubble event to come in
  // later and not trigger anything as the state now
  // invalidates the heuristics of the event plugin. We
  // could alter all these plugins to work in such ways, but
  // that might cause other unknown side-effects that we
  // can't forsee right now.

  if (shouldProcessPolyfillPlugins) {
    extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
    extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
    extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
    extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
  }
} // List of events that need to be individually attached to media elements.


var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
// set them on the actual target element itself. This is primarily
// because these events do not consistently bubble in the DOM.

var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));

function executeDispatch(event, listener, currentTarget) {
  var type = event.type || 'unknown-event';
  event.currentTarget = currentTarget;
  invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
  event.currentTarget = null;
}

function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
  var previousInstance;

  if (inCapturePhase) {
    for (var i = dispatchListeners.length - 1; i >= 0; i--) {
      var _dispatchListeners$i = dispatchListeners[i],
          instance = _dispatchListeners$i.instance,
          currentTarget = _dispatchListeners$i.currentTarget,
          listener = _dispatchListeners$i.listener;

      if (instance !== previousInstance && event.isPropagationStopped()) {
        return;
      }

      executeDispatch(event, listener, currentTarget);
      previousInstance = instance;
    }
  } else {
    for (var _i = 0; _i < dispatchListeners.length; _i++) {
      var _dispatchListeners$_i = dispatchListeners[_i],
          _instance = _dispatchListeners$_i.instance,
          _currentTarget = _dispatchListeners$_i.currentTarget,
          _listener = _dispatchListeners$_i.listener;

      if (_instance !== previousInstance && event.isPropagationStopped()) {
        return;
      }

      executeDispatch(event, _listener, _currentTarget);
      previousInstance = _instance;
    }
  }
}

function processDispatchQueue(dispatchQueue, eventSystemFlags) {
  var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;

  for (var i = 0; i < dispatchQueue.length; i++) {
    var _dispatchQueue$i = dispatchQueue[i],
        event = _dispatchQueue$i.event,
        listeners = _dispatchQueue$i.listeners;
    processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); //  event system doesn't use pooling.
  } // This would be a good time to rethrow if any of the event handlers threw.


  rethrowCaughtError();
}

function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
  var nativeEventTarget = getEventTarget(nativeEvent);
  var dispatchQueue = [];
  extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
  processDispatchQueue(dispatchQueue, eventSystemFlags);
}

function listenToNonDelegatedEvent(domEventName, targetElement) {
  var isCapturePhaseListener = false;
  var listenerSet = getEventListenerSet(targetElement);
  var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);

  if (!listenerSet.has(listenerSetKey)) {
    addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
    listenerSet.add(listenerSetKey);
  }
}
var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
function listenToAllSupportedEvents(rootContainerElement) {
  {
    if (rootContainerElement[listeningMarker]) {
      // Performance optimization: don't iterate through events
      // for the same portal container or root node more than once.
      // TODO: once we remove the flag, we may be able to also
      // remove some of the bookkeeping maps used for laziness.
      return;
    }

    rootContainerElement[listeningMarker] = true;
    allNativeEvents.forEach(function (domEventName) {
      if (!nonDelegatedEvents.has(domEventName)) {
        listenToNativeEvent(domEventName, false, rootContainerElement, null);
      }

      listenToNativeEvent(domEventName, true, rootContainerElement, null);
    });
  }
}
function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {
  var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
  var target = rootContainerElement; // selectionchange needs to be attached to the document
  // otherwise it won't capture incoming events that are only
  // triggered on the document directly.

  if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {
    target = rootContainerElement.ownerDocument;
  } // If the event can be delegated (or is capture phase), we can
  // register it to the root container. Otherwise, we should
  // register the event to the target element and mark it as
  // a non-delegated event.


  if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {
    // For all non-delegated events, apart from scroll, we attach
    // their event listeners to the respective elements that their
    // events fire on. That means we can skip this step, as event
    // listener has already been added previously. However, we
    // special case the scroll event because the reality is that any
    // element can scroll.
    // TODO: ideally, we'd eventually apply the same logic to all
    // events from the nonDelegatedEvents list. Then we can remove
    // this special case and use the same logic for all events.
    if (domEventName !== 'scroll') {
      return;
    }

    eventSystemFlags |= IS_NON_DELEGATED;
    target = targetElement;
  }

  var listenerSet = getEventListenerSet(target);
  var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then
  // we need to trap an event listener onto the target.

  if (!listenerSet.has(listenerSetKey)) {
    if (isCapturePhaseListener) {
      eventSystemFlags |= IS_CAPTURE_PHASE;
    }

    addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
    listenerSet.add(listenerSetKey);
  }
}

function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
  var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
  // active and not passive.

  var isPassiveListener = undefined;

  if (passiveBrowserEventsSupported) {
    // Browsers introduced an intervention, making these events
    // passive by default on document. React doesn't bind them
    // to document anymore, but changing this now would undo
    // the performance wins from the change. So we emulate
    // the existing behavior manually on the roots now.
    // https://github.com/facebook/react/issues/19651
    if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
      isPassiveListener = true;
    }
  }

  targetContainer =  targetContainer;
  var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we


  if (isCapturePhaseListener) {
    if (isPassiveListener !== undefined) {
      unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
    } else {
      unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
    }
  } else {
    if (isPassiveListener !== undefined) {
      unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
    } else {
      unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
    }
  }
}

function isMatchingRootContainer(grandContainer, targetContainer) {
  return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
}

function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
  var ancestorInst = targetInst;

  if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
    var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we

    if (targetInst !== null) {
      // The below logic attempts to work out if we need to change
      // the target fiber to a different ancestor. We had similar logic
      // in the legacy event system, except the big difference between
      // systems is that the modern event system now has an event listener
      // attached to each React Root and React Portal Root. Together,
      // the DOM nodes representing these roots are the "rootContainer".
      // To figure out which ancestor instance we should use, we traverse
      // up the fiber tree from the target instance and attempt to find
      // root boundaries that match that of our current "rootContainer".
      // If we find that "rootContainer", we find the parent fiber
      // sub-tree for that root and make that our ancestor instance.
      var node = targetInst;

      mainLoop: while (true) {
        if (node === null) {
          return;
        }

        var nodeTag = node.tag;

        if (nodeTag === HostRoot || nodeTag === HostPortal) {
          var container = node.stateNode.containerInfo;

          if (isMatchingRootContainer(container, targetContainerNode)) {
            break;
          }

          if (nodeTag === HostPortal) {
            // The target is a portal, but it's not the rootContainer we're looking for.
            // Normally portals handle their own events all the way down to the root.
            // So we should be able to stop now. However, we don't know if this portal
            // was part of *our* root.
            var grandNode = node.return;

            while (grandNode !== null) {
              var grandTag = grandNode.tag;

              if (grandTag === HostRoot || grandTag === HostPortal) {
                var grandContainer = grandNode.stateNode.containerInfo;

                if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
                  // This is the rootContainer we're looking for and we found it as
                  // a parent of the Portal. That means we can ignore it because the
                  // Portal will bubble through to us.
                  return;
                }
              }

              grandNode = grandNode.return;
            }
          } // Now we need to find it's corresponding host fiber in the other
          // tree. To do this we can use getClosestInstanceFromNode, but we
          // need to validate that the fiber is a host instance, otherwise
          // we need to traverse up through the DOM till we find the correct
          // node that is from the other tree.


          while (container !== null) {
            var parentNode = getClosestInstanceFromNode(container);

            if (parentNode === null) {
              return;
            }

            var parentTag = parentNode.tag;

            if (parentTag === HostComponent || parentTag === HostText) {
              node = ancestorInst = parentNode;
              continue mainLoop;
            }

            container = container.parentNode;
          }
        }

        node = node.return;
      }
    }
  }

  batchedEventUpdates(function () {
    return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
  });
}

function createDispatchListener(instance, listener, currentTarget) {
  return {
    instance: instance,
    listener: listener,
    currentTarget: currentTarget
  };
}

function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {
  var captureName = reactName !== null ? reactName + 'Capture' : null;
  var reactEventName = inCapturePhase ? captureName : reactName;
  var listeners = [];
  var instance = targetFiber;
  var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.

  while (instance !== null) {
    var _instance2 = instance,
        stateNode = _instance2.stateNode,
        tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)

    if (tag === HostComponent && stateNode !== null) {
      lastHostComponent = stateNode; // createEventHandle listeners


      if (reactEventName !== null) {
        var listener = getListener(instance, reactEventName);

        if (listener != null) {
          listeners.push(createDispatchListener(instance, listener, lastHostComponent));
        }
      }
    } // If we are only accumulating events for the target, then we don't
    // continue to propagate through the React fiber tree to find other
    // listeners.


    if (accumulateTargetOnly) {
      break;
    }

    instance = instance.return;
  }

  return listeners;
} // We should only use this function for:
// - BeforeInputEventPlugin
// - ChangeEventPlugin
// - SelectEventPlugin
// This is because we only process these plugins
// in the bubble phase, so we need to accumulate two
// phase event listeners (via emulation).

function accumulateTwoPhaseListeners(targetFiber, reactName) {
  var captureName = reactName + 'Capture';
  var listeners = [];
  var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.

  while (instance !== null) {
    var _instance3 = instance,
        stateNode = _instance3.stateNode,
        tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)

    if (tag === HostComponent && stateNode !== null) {
      var currentTarget = stateNode;
      var captureListener = getListener(instance, captureName);

      if (captureListener != null) {
        listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
      }

      var bubbleListener = getListener(instance, reactName);

      if (bubbleListener != null) {
        listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
      }
    }

    instance = instance.return;
  }

  return listeners;
}

function getParent(inst) {
  if (inst === null) {
    return null;
  }

  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 nodeA = instA;
  var nodeB = instB;
  var depthA = 0;

  for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
    depthA++;
  }

  var depthB = 0;

  for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
    depthB++;
  } // If A is deeper, crawl up.


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


  while (depthB - depthA > 0) {
    nodeB = getParent(nodeB);
    depthB--;
  } // Walk in lockstep until we find a match.


  var depth = depthA;

  while (depth--) {
    if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
      return nodeA;
    }

    nodeA = getParent(nodeA);
    nodeB = getParent(nodeB);
  }

  return null;
}

function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
  var registrationName = event._reactName;
  var listeners = [];
  var instance = target;

  while (instance !== null) {
    if (instance === common) {
      break;
    }

    var _instance4 = instance,
        alternate = _instance4.alternate,
        stateNode = _instance4.stateNode,
        tag = _instance4.tag;

    if (alternate !== null && alternate === common) {
      break;
    }

    if (tag === HostComponent && stateNode !== null) {
      var currentTarget = stateNode;

      if (inCapturePhase) {
        var captureListener = getListener(instance, registrationName);

        if (captureListener != null) {
          listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
        }
      } else if (!inCapturePhase) {
        var bubbleListener = getListener(instance, registrationName);

        if (bubbleListener != null) {
          listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
        }
      }
    }

    instance = instance.return;
  }

  if (listeners.length !== 0) {
    dispatchQueue.push({
      event: event,
      listeners: listeners
    });
  }
} // We should only use this function for:
// - EnterLeaveEventPlugin
// This is because we only process this plugin
// in the bubble phase, so we need to accumulate two
// phase event listeners.


function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
  var common = from && to ? getLowestCommonAncestor(from, to) : null;

  if (from !== null) {
    accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
  }

  if (to !== null && enterEvent !== null) {
    accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
  }
}
function getListenerSetKey(domEventName, capture) {
  return domEventName + "__" + (capture ? 'capture' : 'bubble');
}

var didWarnInvalidHydration = false;
var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
var AUTOFOCUS = 'autoFocus';
var CHILDREN = 'children';
var STYLE = 'style';
var HTML$1 = '__html';
var HTML_NAMESPACE$1 = Namespaces.html;
var warnedUnknownTags;
var suppressHydrationWarning;
var validatePropertiesInDevelopment;
var warnForTextDifference;
var warnForPropDifference;
var warnForExtraAttributes;
var warnForInvalidEventListener;
var canDiffStyleForHydrationWarning;
var normalizeMarkupForTextOrAttribute;
var normalizeHTML;

{
  warnedUnknownTags = {
    // 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, {
      registrationNameDependencies: registrationNameDependencies,
      possibleRegistrationNames: possibleRegistrationNames
    });
  }; // 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;

    error('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;

    error('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);
    });

    error('Extra attributes from the server: %s', names);
  };

  warnForInvalidEventListener = function (registrationName, listener) {
    if (listener === false) {
      error('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 {
      error('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$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
    testElement.innerHTML = html;
    return testElement.innerHTML;
  };
}

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.
  // https://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) {
      {
        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$1] : 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 (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        if ( typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }

        if (propKey === 'onScroll') {
          listenToNonDelegatedEvent('scroll', domElement);
        }
      }
    } 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) {
      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; // We create tags in the namespace of their parent container, except HTML
  // tags get no namespace.

  var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
  var domElement;
  var namespaceURI = parentNamespace;

  if (namespaceURI === HTML_NAMESPACE$1) {
    namespaceURI = getIntrinsicNamespace(type);
  }

  if (namespaceURI === HTML_NAMESPACE$1) {
    {
      isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
      // allow <SVG> or <mATH>.

      if (!isCustomComponentTag && type !== type.toLowerCase()) {
        error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
      }
    }

    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$1) {
      if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
        warnedUnknownTags[type] = true;

        error('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);
  } // TODO: Make sure that we check isMounted before firing any of these events.


  var props;

  switch (tag) {
    case 'dialog':
      listenToNonDelegatedEvent('cancel', domElement);
      listenToNonDelegatedEvent('close', domElement);
      props = rawProps;
      break;

    case 'iframe':
    case 'object':
    case 'embed':
      // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the load event.
      listenToNonDelegatedEvent('load', domElement);
      props = rawProps;
      break;

    case 'video':
    case 'audio':
      // We listen to these events in case to ensure emulated bubble
      // listeners still fire for all the media events.
      for (var i = 0; i < mediaEventTypes.length; i++) {
        listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
      }

      props = rawProps;
      break;

    case 'source':
      // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the error event.
      listenToNonDelegatedEvent('error', domElement);
      props = rawProps;
      break;

    case 'img':
    case 'image':
    case 'link':
      // We listen to these events in case to ensure emulated bubble
      // listeners still fire for error and load events.
      listenToNonDelegatedEvent('error', domElement);
      listenToNonDelegatedEvent('load', domElement);
      props = rawProps;
      break;

    case 'details':
      // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the toggle event.
      listenToNonDelegatedEvent('toggle', domElement);
      props = rawProps;
      break;

    case 'input':
      initWrapperState(domElement, rawProps);
      props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the invalid event.

      listenToNonDelegatedEvent('invalid', domElement);

      break;

    case 'option':
      validateProps(domElement, rawProps);
      props = getHostProps$1(domElement, rawProps);
      break;

    case 'select':
      initWrapperState$1(domElement, rawProps);
      props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the invalid event.

      listenToNonDelegatedEvent('invalid', domElement);

      break;

    case 'textarea':
      initWrapperState$2(domElement, rawProps);
      props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the invalid event.

      listenToNonDelegatedEvent('invalid', domElement);

      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);
      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;
  var nextProps;

  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;
  var styleName;
  var styleUpdates = null;

  for (propKey in lastProps) {
    if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
      continue;
    }

    if (propKey === STYLE) {
      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) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.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 allowed property list 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) {
      {
        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$1] : undefined;
      var lastHtml = lastProp ? lastProp[HTML$1] : undefined;

      if (nextHtml != null) {
        if (lastHtml !== nextHtml) {
          (updatePayload = updatePayload || []).push(propKey, nextHtml);
        }
      }
    } else if (propKey === CHILDREN) {
      if (typeof nextProp === 'string' || typeof nextProp === 'number') {
        (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
      }
    } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        // We eagerly listen to this even though we haven't committed yet.
        if ( typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }

        if (propKey === 'onScroll') {
          listenToNonDelegatedEvent('scroll', domElement);
        }
      }

      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 if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {
      // If we encounter useOpaqueReference's opaque object, this means we are hydrating.
      // In this case, call the opaque object's toString function which generates a new client
      // ID so client and server IDs match and throws to rerender.
      nextProp.toString();
    } else {
      // For any other property we always add it to the queue and then we
      // filter it out using the allowed property list during the commit.
      (updatePayload = updatePayload || []).push(propKey, nextProp);
    }
  }

  if (styleUpdates) {
    {
      validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
    }

    (updatePayload = updatePayload || []).push(STYLE, 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;
  }
}

function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
  var isCustomComponentTag;
  var extraAttributeNames;

  {
    suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
    isCustomComponentTag = isCustomComponent(tag, rawProps);
    validatePropertiesInDevelopment(tag, rawProps);
  } // TODO: Make sure that we check isMounted before firing any of these events.


  switch (tag) {
    case 'dialog':
      listenToNonDelegatedEvent('cancel', domElement);
      listenToNonDelegatedEvent('close', domElement);
      break;

    case 'iframe':
    case 'object':
    case 'embed':
      // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the load event.
      listenToNonDelegatedEvent('load', domElement);
      break;

    case 'video':
    case 'audio':
      // We listen to these events in case to ensure emulated bubble
      // listeners still fire for all the media events.
      for (var i = 0; i < mediaEventTypes.length; i++) {
        listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
      }

      break;

    case 'source':
      // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the error event.
      listenToNonDelegatedEvent('error', domElement);
      break;

    case 'img':
    case 'image':
    case 'link':
      // We listen to these events in case to ensure emulated bubble
      // listeners still fire for error and load events.
      listenToNonDelegatedEvent('error', domElement);
      listenToNonDelegatedEvent('load', domElement);
      break;

    case 'details':
      // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the toggle event.
      listenToNonDelegatedEvent('toggle', domElement);
      break;

    case 'input':
      initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the invalid event.

      listenToNonDelegatedEvent('invalid', domElement);

      break;

    case 'option':
      validateProps(domElement, rawProps);
      break;

    case 'select':
      initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the invalid event.

      listenToNonDelegatedEvent('invalid', domElement);

      break;

    case 'textarea':
      initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
      // listeners still fire for the invalid event.

      listenToNonDelegatedEvent('invalid', domElement);

      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 allowed
        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 ( !suppressHydrationWarning) {
            warnForTextDifference(domElement.textContent, nextProp);
          }

          updatePayload = [CHILDREN, nextProp];
        }
      } else if (typeof nextProp === 'number') {
        if (domElement.textContent !== '' + nextProp) {
          if ( !suppressHydrationWarning) {
            warnForTextDifference(domElement.textContent, nextProp);
          }

          updatePayload = [CHILDREN, '' + nextProp];
        }
      }
    } else if (registrationNameDependencies.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        if ( typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }

        if (propKey === 'onScroll') {
          listenToNonDelegatedEvent('scroll', domElement);
        }
      }
    } else if ( // 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) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
      // TODO: Only ignore them on controlled tags.
      propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
        var serverHTML = domElement.innerHTML;
        var nextHtml = nextProp ? nextProp[HTML$1] : undefined;

        if (nextHtml != null) {
          var expectedHTML = normalizeHTML(domElement, nextHtml);

          if (expectedHTML !== serverHTML) {
            warnForPropDifference(propKey, serverHTML, expectedHTML);
          }
        }
      } else if (propKey === STYLE) {
        // $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$1) {
            ownNamespace = getIntrinsicNamespace(tag);
          }

          if (ownNamespace === HTML_NAMESPACE$1) {
            // $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);
      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;

    error('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;

    error('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;

    error('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;

    error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
  }
}
function restoreControlledState$3(domElement, tag, props) {
  switch (tag) {
    case 'input':
      restoreControlledState(domElement, props);
      return;

    case 'textarea':
      restoreControlledState$2(domElement, props);
      return;

    case 'select':
      restoreControlledState$1(domElement, props);
      return;
  }
}

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) {
      if (childTag != null) {
        error('validateDOMNesting: when childText is passed, childTag should be null');
      }

      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 warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;

    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>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
      }

      error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
    } else {
      error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
    }
  };
}

var SUPPRESS_HYDRATION_WARNING$1;

{
  SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
}

var SUSPENSE_START_DATA = '$';
var SUSPENSE_END_DATA = '/$';
var SUSPENSE_PENDING_START_DATA = '$?';
var SUSPENSE_FALLBACK_START_DATA = '$!';
var STYLE$1 = '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;
  var namespace;
  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
    };
  }
}
function getChildHostContext(parentHostContext, type, rootContainerInstance) {
  {
    var parentHostContextDev = parentHostContext;
    var namespace = getChildNamespace(parentHostContextDev.namespace, type);
    var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
    return {
      namespace: namespace,
      ancestorInfo: ancestorInfo
    };
  }
}
function getPublicInstance(instance) {
  return instance;
}
function prepareForCommit(containerInfo) {
  eventsEnabled = isEnabled();
  selectionInformation = getSelectionInformation();
  var activeInstance = null;

  setEnabled(false);
  return activeInstance;
}
function resetAfterCommit(containerInfo) {
  restoreSelection(selectionInformation);
  setEnabled(eventsEnabled);
  eventsEnabled = null;
  selectionInformation = null;
}
function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
  var parentNamespace;

  {
    // 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);
}
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 createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
  {
    var hostContextDev = hostContext;
    validateDOMNesting(null, text, hostContextDev.ancestorInfo);
  }

  var textNode = createTextNode(text, rootContainerInstance);
  precacheFiberNode(internalInstanceHandle, textNode);
  return textNode;
}
// 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; // -------------------
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;

  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 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$1];
  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;
}
function clearContainer(container) {
  if (container.nodeType === ELEMENT_NODE) {
    container.textContent = '';
  } else if (container.nodeType === DOCUMENT_NODE) {
    var body = container.body;

    if (body != null) {
      body.textContent = '';
    }
  }
} // -------------------
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 isSuspenseInstancePending(instance) {
  return instance.data === SUSPENSE_PENDING_START_DATA;
}
function isSuspenseInstanceFallback(instance) {
  return instance.data === SUSPENSE_FALLBACK_START_DATA;
}

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

  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;

  {
    var hostContextDev = hostContext;
    parentNamespace = hostContextDev.namespace;
  }

  return diffHydratedProperties(instance, type, props, parentNamespace);
}
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 || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
        depth++;
      }
    }

    node = node.nextSibling;
  } // TODO: Warn, we didn't find the end comment boundary.


  return null;
} // Returns the SuspenseInstance if this node is a direct child of a
// SuspenseInstance. I.e. if its previous sibling is a Comment with
// SUSPENSE_x_START_DATA. Otherwise, null.

function getParentSuspenseInstance(targetInstance) {
  var node = targetInstance.previousSibling; // 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_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
        if (depth === 0) {
          return node;
        } else {
          depth--;
        }
      } else if (data === SUSPENSE_END_DATA) {
        depth++;
      }
    }

    node = node.previousSibling;
  }

  return null;
}
function commitHydratedContainer(container) {
  // Retry if any event replaying was blocked on this.
  retryIfBlockedOn(container);
}
function commitHydratedSuspenseInstance(suspenseInstance) {
  // Retry if any event replaying was blocked on this.
  retryIfBlockedOn(suspenseInstance);
}
function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
  {
    warnForUnmatchedText(textInstance, text);
  }
}
function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
    warnForUnmatchedText(textInstance, text);
  }
}
function didNotHydrateContainerInstance(parentContainer, instance) {
  {
    if (instance.nodeType === ELEMENT_NODE) {
      warnForDeletedHydratableElement(parentContainer, instance);
    } else if (instance.nodeType === COMMENT_NODE) ; else {
      warnForDeletedHydratableText(parentContainer, instance);
    }
  }
}
function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
    if (instance.nodeType === ELEMENT_NODE) {
      warnForDeletedHydratableElement(parentInstance, instance);
    } else if (instance.nodeType === COMMENT_NODE) ; else {
      warnForDeletedHydratableText(parentInstance, instance);
    }
  }
}
function didNotFindHydratableContainerInstance(parentContainer, type, props) {
  {
    warnForInsertedHydratedElement(parentContainer, type);
  }
}
function didNotFindHydratableContainerTextInstance(parentContainer, text) {
  {
    warnForInsertedHydratedText(parentContainer, text);
  }
}
function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
    warnForInsertedHydratedElement(parentInstance, type);
  }
}
function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
    warnForInsertedHydratedText(parentInstance, text);
  }
}
function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
}
var clientId = 0;
function makeClientIdInDEV(warnOnAccessInDEV) {
  var id = 'r:' + (clientId++).toString(36);
  return {
    toString: function () {
      warnOnAccessInDEV();
      return id;
    },
    valueOf: function () {
      warnOnAccessInDEV();
      return id;
    }
  };
}
function isOpaqueHydratingObject(value) {
  return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;
}
function makeOpaqueHydratingObject(attemptToReadValue) {
  return {
    $$typeof: REACT_OPAQUE_ID_TYPE,
    toString: attemptToReadValue,
    valueOf: attemptToReadValue
  };
}
function preparePortalMount(portalInstance) {
  {
    listenToAllSupportedEvents(portalInstance);
  }
}

var randomKey = Math.random().toString(36).slice(2);
var internalInstanceKey = '__reactFiber$' + randomKey;
var internalPropsKey = '__reactProps$' + randomKey;
var internalContainerInstanceKey = '__reactContainer$' + randomKey;
var internalEventHandlersKey = '__reactEvents$' + randomKey;
function precacheFiberNode(hostInst, node) {
  node[internalInstanceKey] = hostInst;
}
function markContainerAsRoot(hostRoot, node) {
  node[internalContainerInstanceKey] = hostRoot;
}
function unmarkContainerAsRoot(node) {
  node[internalContainerInstanceKey] = null;
}
function isContainerMarkedAsRoot(node) {
  return !!node[internalContainerInstanceKey];
} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
// If the target node is part of a hydrated or not yet rendered subtree, then
// this may also return a SuspenseComponent or HostRoot to indicate that.
// Conceptually the HostRoot fiber is a child of the Container node. So if you
// pass the Container node as the targetNode, you will not actually get the
// HostRoot back. To get to the HostRoot, you need to pass a child of it.
// The same thing applies to Suspense boundaries.

function getClosestInstanceFromNode(targetNode) {
  var targetInst = targetNode[internalInstanceKey];

  if (targetInst) {
    // Don't return HostRoot or SuspenseComponent here.
    return targetInst;
  } // If the direct event target isn't a React owned DOM node, we need to look
  // to see if one of its parents is a React owned DOM node.


  var parentNode = targetNode.parentNode;

  while (parentNode) {
    // We'll check if this is a container root that could include
    // React nodes in the future. We need to check this first because
    // if we're a child of a dehydrated container, we need to first
    // find that inner container before moving on to finding the parent
    // instance. Note that we don't check this field on  the targetNode
    // itself because the fibers are conceptually between the container
    // node and the first child. It isn't surrounding the container node.
    // If it's not a container, we check if it's an instance.
    targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];

    if (targetInst) {
      // Since this wasn't the direct target of the event, we might have
      // stepped past dehydrated DOM nodes to get here. However they could
      // also have been non-React nodes. We need to answer which one.
      // If we the instance doesn't have any children, then there can't be
      // a nested suspense boundary within it. So we can use this as a fast
      // bailout. Most of the time, when people add non-React children to
      // the tree, it is using a ref to a child-less DOM node.
      // Normally we'd only need to check one of the fibers because if it
      // has ever gone from having children to deleting them or vice versa
      // it would have deleted the dehydrated boundary nested inside already.
      // However, since the HostRoot starts out with an alternate it might
      // have one on the alternate so we need to check in case this was a
      // root.
      var alternate = targetInst.alternate;

      if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
        // Next we need to figure out if the node that skipped past is
        // nested within a dehydrated boundary and if so, which one.
        var suspenseInstance = getParentSuspenseInstance(targetNode);

        while (suspenseInstance !== null) {
          // We found a suspense instance. That means that we haven't
          // hydrated it yet. Even though we leave the comments in the
          // DOM after hydrating, and there are boundaries in the DOM
          // that could already be hydrated, we wouldn't have found them
          // through this pass since if the target is hydrated it would
          // have had an internalInstanceKey on it.
          // Let's get the fiber associated with the SuspenseComponent
          // as the deepest instance.
          var targetSuspenseInst = suspenseInstance[internalInstanceKey];

          if (targetSuspenseInst) {
            return targetSuspenseInst;
          } // If we don't find a Fiber on the comment, it might be because
          // we haven't gotten to hydrate it yet. There might still be a
          // parent boundary that hasn't above this one so we need to find
          // the outer most that is known.


          suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
          // host component also hasn't hydrated yet. We can return it
          // below since it will bail out on the isMounted check later.
        }
      }

      return targetInst;
    }

    targetNode = parentNode;
    parentNode = targetNode.parentNode;
  }

  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(node) {
  var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];

  if (inst) {
    if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
      return inst;
    } else {
      return null;
    }
  }

  return null;
}
/**
 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
 * DOM node.
 */

function getNodeFromInstance(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.


  {
    {
      throw Error( "getNodeFromInstance: Invalid argument." );
    }
  }
}
function getFiberCurrentPropsFromNode(node) {
  return node[internalPropsKey] || null;
}
function updateFiberProps(node, props) {
  node[internalPropsKey] = props;
}
function getEventListenerSet(node) {
  var elementListenerSet = node[internalEventHandlersKey];

  if (elementListenerSet === undefined) {
    elementListenerSet = node[internalEventHandlersKey] = new Set();
  }

  return elementListenerSet;
}

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

function setCurrentlyValidatingElement(element) {
  {
    if (element) {
      var owner = element._owner;
      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
    } else {
      ReactDebugCurrentFrame$1.setExtraStackFrame(null);
    }
  }
}

function checkPropTypes(typeSpecs, values, location, componentName, element) {
  {
    // $FlowFixMe This is okay but Flow doesn't know it.
    var has = Function.call.bind(Object.prototype.hasOwnProperty);

    for (var typeSpecName in typeSpecs) {
      if (has(typeSpecs, typeSpecName)) {
        var error$1 = void 0; // 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] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
            err.name = 'Invariant Violation';
            throw err;
          }

          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
        } catch (ex) {
          error$1 = ex;
        }

        if (error$1 && !(error$1 instanceof Error)) {
          setCurrentlyValidatingElement(element);

          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);

          setCurrentlyValidatingElement(null);
        }

        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
          // Only monitor this failure once because there tends to be a lot of the
          // same error.
          loggedTypeFailures[error$1.message] = true;
          setCurrentlyValidatingElement(element);

          error('Failed %s type: %s', location, error$1.message);

          setCurrentlyValidatingElement(null);
        }
      }
    }
  }
}

var valueStack = [];
var fiberStack;

{
  fiberStack = [];
}

var index = -1;

function createCursor(defaultValue) {
  return {
    current: defaultValue
  };
}

function pop(cursor, fiber) {
  if (index < 0) {
    {
      error('Unexpected pop.');
    }

    return;
  }

  {
    if (fiber !== fiberStack[index]) {
      error('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;

{
  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 (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) {
  {
    var instance = workInProgress.stateNode;
    instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
    instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
  }
}

function getMaskedContext(workInProgress, unmaskedContext) {
  {
    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);
    } // 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() {
  {
    return didPerformWorkStackCursor.current;
  }
}

function isContextProvider(type) {
  {
    var childContextTypes = type.childContextTypes;
    return childContextTypes !== null && childContextTypes !== undefined;
  }
}

function popContext(fiber) {
  {
    pop(didPerformWorkStackCursor, fiber);
    pop(contextStackCursor, fiber);
  }
}

function popTopLevelContextObject(fiber) {
  {
    pop(didPerformWorkStackCursor, fiber);
    pop(contextStackCursor, fiber);
  }
}

function pushTopLevelContextObject(fiber, context, didChange) {
  {
    if (!(contextStackCursor.current === emptyContextObject)) {
      {
        throw 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) {
  {
    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;

          error('%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 = instance.getChildContext();

    for (var contextKey in childContext) {
      if (!(contextKey in childContextTypes)) {
        {
          throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
        }
      }
    }

    {
      var name = getComponentName(type) || 'Unknown';
      checkPropTypes(childContextTypes, childContext, 'child context', name);
    }

    return _assign({}, parentContext, childContext);
  }
}

function pushContextProvider(workInProgress) {
  {
    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) {
  {
    var instance = workInProgress.stateNode;

    if (!instance) {
      {
        throw 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) {
  {
    // Currently this is only used with renderSubtreeIntoContainer; not sure if it
    // makes sense elsewhere
    if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
      {
        throw 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);

    {
      {
        throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." );
      }
    }
  }
}

var LegacyRoot = 0;
var BlockingRoot = 1;
var ConcurrentRoot = 2;

var rendererID = null;
var injectedHook = 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) {
    {
      error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
    } // DevTools exists, even though it doesn't support Fiber.


    return true;
  }

  try {
    rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.

    injectedHook = hook;
  } catch (err) {
    // Catch all errors because it is unsafe to throw during initialization.
    {
      error('React instrumentation encountered an error: %s.', err);
    }
  } // DevTools exists


  return true;
}
function onScheduleRoot(root, children) {
  {
    if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
      try {
        injectedHook.onScheduleFiberRoot(rendererID, root, children);
      } catch (err) {
        if ( !hasLoggedError) {
          hasLoggedError = true;

          error('React instrumentation encountered an error: %s', err);
        }
      }
    }
  }
}
function onCommitRoot(root, priorityLevel) {
  if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
    try {
      var didError = (root.current.flags & DidCapture) === DidCapture;

      if (enableProfilerTimer) {
        injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
      } else {
        injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
      }
    } catch (err) {
      {
        if (!hasLoggedError) {
          hasLoggedError = true;

          error('React instrumentation encountered an error: %s', err);
        }
      }
    }
  }
}
function onCommitUnmount(fiber) {
  if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
    try {
      injectedHook.onCommitFiberUnmount(rendererID, fiber);
    } catch (err) {
      {
        if (!hasLoggedError) {
          hasLoggedError = true;

          error('React instrumentation encountered an error: %s', err);
        }
      }
    }
  }
}

var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
    Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
    Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
    Scheduler_shouldYield = Scheduler.unstable_shouldYield,
    Scheduler_requestPaint = Scheduler.unstable_requestPaint,
    Scheduler_now$1 = Scheduler.unstable_now,
    Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
    Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
    Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
    Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
    Scheduler_LowPriority = Scheduler.unstable_LowPriority,
    Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;

{
  // Provide explicit error message when production+profiling bundle of e.g.
  // react-dom is used with production (non-profiling) bundle of
  // scheduler/tracing
  if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
    {
      throw 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 https://reactjs.org/link/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$1 = 99;
var UserBlockingPriority$2 = 98;
var NormalPriority$1 = 97;
var LowPriority$1 = 96;
var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.

var NoPriority$1 = 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$1 = Scheduler_now$1(); // 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$1 < 10000 ? Scheduler_now$1 : function () {
  return Scheduler_now$1() - initialTimeMs$1;
};
function getCurrentPriorityLevel() {
  switch (Scheduler_getCurrentPriorityLevel()) {
    case Scheduler_ImmediatePriority:
      return ImmediatePriority$1;

    case Scheduler_UserBlockingPriority:
      return UserBlockingPriority$2;

    case Scheduler_NormalPriority:
      return NormalPriority$1;

    case Scheduler_LowPriority:
      return LowPriority$1;

    case Scheduler_IdlePriority:
      return IdlePriority$1;

    default:
      {
        {
          throw Error( "Unknown priority level." );
        }
      }

  }
}

function reactPriorityToSchedulerPriority(reactPriorityLevel) {
  switch (reactPriorityLevel) {
    case ImmediatePriority$1:
      return Scheduler_ImmediatePriority;

    case UserBlockingPriority$2:
      return Scheduler_UserBlockingPriority;

    case NormalPriority$1:
      return Scheduler_NormalPriority;

    case LowPriority$1:
      return Scheduler_LowPriority;

    case IdlePriority$1:
      return Scheduler_IdlePriority;

    default:
      {
        {
          throw Error( "Unknown priority level." );
        }
      }

  }
}

function runWithPriority$1(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) {
    var node = immediateQueueCallbackNode;
    immediateQueueCallbackNode = null;
    Scheduler_cancelCallback(node);
  }

  flushSyncCallbackQueueImpl();
}

function flushSyncCallbackQueueImpl() {
  if (!isFlushingSyncQueue && syncQueue !== null) {
    // Prevent re-entrancy.
    isFlushingSyncQueue = true;
    var i = 0;

    {
      try {
        var _isSync2 = true;
        var _queue = syncQueue;
        runWithPriority$1(ImmediatePriority$1, function () {
          for (; i < _queue.length; i++) {
            var callback = _queue[i];

            do {
              callback = callback(_isSync2);
            } 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;
      }
    }
  }
}

// TODO: this is special because it gets imported during build.
var ReactVersion = '17.0.2';

var NoMode = 0;
var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
// tag instead

var BlockingMode = 2;
var ConcurrentMode = 4;
var ProfileMode = 8;
var DebugTracingMode = 16;

var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
var NoTransition = 0;
function requestCurrentTransition() {
  return ReactCurrentBatchConfig.transition;
}

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

      error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles 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);

      error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles 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://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
    }

    if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
      var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);

      error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles 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);

      warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles 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 18.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);

      warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles 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://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.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);

      warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles 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 18.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) {
      error('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) {
      if (fiberArray.length === 0) {
        return;
      }

      var firstFiber = fiberArray[0];
      var uniqueNames = new Set();
      fiberArray.forEach(function (fiber) {
        uniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutLegacyContext.add(fiber.type);
      });
      var sortedNames = setToSortedString(uniqueNames);

      try {
        setCurrentFiber(firstFiber);

        error('Legacy context API has been detected within a strict-mode tree.' + '\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: https://reactjs.org/link/legacy-context', sortedNames);
      } finally {
        resetCurrentFiber();
      }
    });
  };

  ReactStrictModeWarnings.discardPendingWarnings = function () {
    pendingComponentWillMountWarnings = [];
    pendingUNSAFE_ComponentWillMountWarnings = [];
    pendingComponentWillReceivePropsWarnings = [];
    pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
    pendingComponentWillUpdateWarnings = [];
    pendingUNSAFE_ComponentWillUpdateWarnings = [];
    pendingLegacyContextWarning = new Map();
  };
}

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

// 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 valueCursor = createCursor(null);
var rendererSigil;

{
  // 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;

  {
    push(valueCursor, context._currentValue, providerFiber);
    context._currentValue = nextValue;

    {
      if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
        error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
      }

      context._currentRenderer = rendererSigil;
    }
  }
}
function popProvider(providerFiber) {
  var currentValue = valueCursor.current;
  pop(valueCursor, providerFiber);
  var context = providerFiber.type._context;

  {
    context._currentValue = currentValue;
  }
}
function calculateChangedBits(context, newValue, oldValue) {
  if (objectIs(oldValue, newValue)) {
    // No change
    return 0;
  } else {
    var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;

    {
      if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
        error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
      }
    }

    return changedBits | 0;
  }
}
function scheduleWorkOnParentPath(parent, renderLanes) {
  // Update the child lanes of all the ancestors, including the alternates.
  var node = parent;

  while (node !== null) {
    var alternate = node.alternate;

    if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
      node.childLanes = mergeLanes(node.childLanes, renderLanes);

      if (alternate !== null) {
        alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
      }
    } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
      alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
    } 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, renderLanes) {
  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(NoTimestamp, pickArbitraryLane(renderLanes));
            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);
          }

          fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
          var alternate = fiber.alternate;

          if (alternate !== null) {
            alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
          }

          scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.

          list.lanes = mergeLanes(list.lanes, renderLanes); // 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 {
      // 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, renderLanes) {
  currentlyRenderingFiber = workInProgress;
  lastContextDependency = null;
  lastContextWithAllBitsObserved = null;
  var dependencies = workInProgress.dependencies;

  if (dependencies !== null) {
    var firstContext = dependencies.firstContext;

    if (firstContext !== null) {
      if (includesSomeLane(dependencies.lanes, renderLanes)) {
        // 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.
    if (isDisallowedContextReadInDEV) {
      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().');
    }
  }

  if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {
    var resolvedObservedBits; // 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) {
      if (!(currentlyRenderingFiber !== null)) {
        {
          throw 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 = {
        lanes: NoLanes,
        firstContext: contextItem,
        responders: null
      };
    } else {
      // Append a new context item.
      lastContextDependency = lastContextDependency.next = contextItem;
    }
  }

  return  context._currentValue ;
}

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;
var currentlyProcessingQueue;

{
  didWarnUpdateInsideUpdate = false;
  currentlyProcessingQueue = null;
}

function initializeUpdateQueue(fiber) {
  var queue = {
    baseState: fiber.memoizedState,
    firstBaseUpdate: null,
    lastBaseUpdate: null,
    shared: {
      pending: null
    },
    effects: null
  };
  fiber.updateQueue = queue;
}
function cloneUpdateQueue(current, workInProgress) {
  // Clone the update queue from current. Unless it's already a clone.
  var queue = workInProgress.updateQueue;
  var currentQueue = current.updateQueue;

  if (queue === currentQueue) {
    var clone = {
      baseState: currentQueue.baseState,
      firstBaseUpdate: currentQueue.firstBaseUpdate,
      lastBaseUpdate: currentQueue.lastBaseUpdate,
      shared: currentQueue.shared,
      effects: currentQueue.effects
    };
    workInProgress.updateQueue = clone;
  }
}
function createUpdate(eventTime, lane) {
  var update = {
    eventTime: eventTime,
    lane: lane,
    tag: UpdateState,
    payload: null,
    callback: null,
    next: null
  };
  return update;
}
function enqueueUpdate(fiber, update) {
  var updateQueue = fiber.updateQueue;

  if (updateQueue === null) {
    // Only occurs if the fiber has been unmounted.
    return;
  }

  var sharedQueue = updateQueue.shared;
  var pending = sharedQueue.pending;

  if (pending === null) {
    // This is the first update. Create a circular list.
    update.next = update;
  } else {
    update.next = pending.next;
    pending.next = update;
  }

  sharedQueue.pending = update;

  {
    if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
      error('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, capturedUpdate) {
  // Captured updates are updates that are thrown by a child during the render
  // phase. They should be discarded if the render is aborted. Therefore,
  // we should only put them on the work-in-progress queue, not the current one.
  var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.

  var current = workInProgress.alternate;

  if (current !== null) {
    var currentQueue = current.updateQueue;

    if (queue === currentQueue) {
      // The work-in-progress queue is the same as current. This happens when
      // we bail out on a parent fiber that then captures an error thrown by
      // a child. Since we want to append the update only to the work-in
      // -progress queue, we need to clone the updates. We usually clone during
      // processUpdateQueue, but that didn't happen in this case because we
      // skipped over the parent when we bailed out.
      var newFirst = null;
      var newLast = null;
      var firstBaseUpdate = queue.firstBaseUpdate;

      if (firstBaseUpdate !== null) {
        // Loop through the updates and clone them.
        var update = firstBaseUpdate;

        do {
          var clone = {
            eventTime: update.eventTime,
            lane: update.lane,
            tag: update.tag,
            payload: update.payload,
            callback: update.callback,
            next: null
          };

          if (newLast === null) {
            newFirst = newLast = clone;
          } else {
            newLast.next = clone;
            newLast = clone;
          }

          update = update.next;
        } while (update !== null); // Append the captured update the end of the cloned list.


        if (newLast === null) {
          newFirst = newLast = capturedUpdate;
        } else {
          newLast.next = capturedUpdate;
          newLast = capturedUpdate;
        }
      } else {
        // There are no base updates.
        newFirst = newLast = capturedUpdate;
      }

      queue = {
        baseState: currentQueue.baseState,
        firstBaseUpdate: newFirst,
        lastBaseUpdate: newLast,
        shared: currentQueue.shared,
        effects: currentQueue.effects
      };
      workInProgress.updateQueue = queue;
      return;
    }
  } // Append the update to the end of the list.


  var lastBaseUpdate = queue.lastBaseUpdate;

  if (lastBaseUpdate === null) {
    queue.firstBaseUpdate = capturedUpdate;
  } else {
    lastBaseUpdate.next = capturedUpdate;
  }

  queue.lastBaseUpdate = capturedUpdate;
}

function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
  switch (update.tag) {
    case ReplaceState:
      {
        var payload = update.payload;

        if (typeof payload === 'function') {
          // Updater function
          {
            enterDisallowedContextReadInDEV();
          }

          var nextState = payload.call(instance, prevState, nextProps);

          {
            if ( workInProgress.mode & StrictMode) {
              disableLogs();

              try {
                payload.call(instance, prevState, nextProps);
              } finally {
                reenableLogs();
              }
            }

            exitDisallowedContextReadInDEV();
          }

          return nextState;
        } // State object


        return payload;
      }

    case CaptureUpdate:
      {
        workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
      }
    // Intentional fallthrough

    case UpdateState:
      {
        var _payload = update.payload;
        var partialState;

        if (typeof _payload === 'function') {
          // Updater function
          {
            enterDisallowedContextReadInDEV();
          }

          partialState = _payload.call(instance, prevState, nextProps);

          {
            if ( workInProgress.mode & StrictMode) {
              disableLogs();

              try {
                _payload.call(instance, prevState, nextProps);
              } finally {
                reenableLogs();
              }
            }

            exitDisallowedContextReadInDEV();
          }
        } else {
          // Partial state object
          partialState = _payload;
        }

        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, props, instance, renderLanes) {
  // This is always non-null on a ClassComponent or HostRoot
  var queue = workInProgress.updateQueue;
  hasForceUpdate = false;

  {
    currentlyProcessingQueue = queue.shared;
  }

  var firstBaseUpdate = queue.firstBaseUpdate;
  var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.

  var pendingQueue = queue.shared.pending;

  if (pendingQueue !== null) {
    queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
    // and last so that it's non-circular.

    var lastPendingUpdate = pendingQueue;
    var firstPendingUpdate = lastPendingUpdate.next;
    lastPendingUpdate.next = null; // Append pending updates to base queue

    if (lastBaseUpdate === null) {
      firstBaseUpdate = firstPendingUpdate;
    } else {
      lastBaseUpdate.next = firstPendingUpdate;
    }

    lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
    // we need to transfer the updates to that queue, too. Because the base
    // queue is a singly-linked list with no cycles, we can append to both
    // lists and take advantage of structural sharing.
    // TODO: Pass `current` as argument

    var current = workInProgress.alternate;

    if (current !== null) {
      // This is always non-null on a ClassComponent or HostRoot
      var currentQueue = current.updateQueue;
      var currentLastBaseUpdate = currentQueue.lastBaseUpdate;

      if (currentLastBaseUpdate !== lastBaseUpdate) {
        if (currentLastBaseUpdate === null) {
          currentQueue.firstBaseUpdate = firstPendingUpdate;
        } else {
          currentLastBaseUpdate.next = firstPendingUpdate;
        }

        currentQueue.lastBaseUpdate = lastPendingUpdate;
      }
    }
  } // These values may change as we process the queue.


  if (firstBaseUpdate !== null) {
    // Iterate through the list of updates to compute the result.
    var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
    // from the original lanes.

    var newLanes = NoLanes;
    var newBaseState = null;
    var newFirstBaseUpdate = null;
    var newLastBaseUpdate = null;
    var update = firstBaseUpdate;

    do {
      var updateLane = update.lane;
      var updateEventTime = update.eventTime;

      if (!isSubsetOfLanes(renderLanes, updateLane)) {
        // Priority is insufficient. Skip this update. If this is the first
        // skipped update, the previous update/state is the new base
        // update/state.
        var clone = {
          eventTime: updateEventTime,
          lane: updateLane,
          tag: update.tag,
          payload: update.payload,
          callback: update.callback,
          next: null
        };

        if (newLastBaseUpdate === null) {
          newFirstBaseUpdate = newLastBaseUpdate = clone;
          newBaseState = newState;
        } else {
          newLastBaseUpdate = newLastBaseUpdate.next = clone;
        } // Update the remaining priority in the queue.


        newLanes = mergeLanes(newLanes, updateLane);
      } else {
        // This update does have sufficient priority.
        if (newLastBaseUpdate !== null) {
          var _clone = {
            eventTime: updateEventTime,
            // This update is going to be committed so we never want uncommit
            // it. Using NoLane works because 0 is a subset of all bitmasks, so
            // this will never be skipped by the check above.
            lane: NoLane,
            tag: update.tag,
            payload: update.payload,
            callback: update.callback,
            next: null
          };
          newLastBaseUpdate = newLastBaseUpdate.next = _clone;
        } // Process this update.


        newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
        var callback = update.callback;

        if (callback !== null) {
          workInProgress.flags |= Callback;
          var effects = queue.effects;

          if (effects === null) {
            queue.effects = [update];
          } else {
            effects.push(update);
          }
        }
      }

      update = update.next;

      if (update === null) {
        pendingQueue = queue.shared.pending;

        if (pendingQueue === null) {
          break;
        } else {
          // An update was scheduled from inside a reducer. Add the new
          // pending updates to the end of the list and keep processing.
          var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
          // unravel them when transferring them to the base queue.

          var _firstPendingUpdate = _lastPendingUpdate.next;
          _lastPendingUpdate.next = null;
          update = _firstPendingUpdate;
          queue.lastBaseUpdate = _lastPendingUpdate;
          queue.shared.pending = null;
        }
      }
    } while (true);

    if (newLastBaseUpdate === null) {
      newBaseState = newState;
    }

    queue.baseState = newBaseState;
    queue.firstBaseUpdate = newFirstBaseUpdate;
    queue.lastBaseUpdate = newLastBaseUpdate; // 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.

    markSkippedUpdateLanes(newLanes);
    workInProgress.lanes = newLanes;
    workInProgress.memoizedState = newState;
  }

  {
    currentlyProcessingQueue = null;
  }
}

function callCallback(callback, context) {
  if (!(typeof callback === 'function')) {
    {
      throw 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) {
  // Commit the effects
  var effects = finishedQueue.effects;
  finishedQueue.effects = null;

  if (effects !== null) {
    for (var i = 0; i < effects.length; i++) {
      var effect = effects[i];
      var callback = effect.callback;

      if (callback !== null) {
        effect.callback = null;
        callCallback(callback, instance);
      }
    }
  }
}

var fakeInternalInstance = {};
var isArray = 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;
var didWarnAboutUninitializedState;
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
var didWarnAboutLegacyLifecyclesAndDerivedState;
var didWarnAboutUndefinedDerivedState;
var warnOnUndefinedDerivedState;
var warnOnInvalidCallback;
var didWarnAboutDirectlyAssigningPropsToState;
var didWarnAboutContextTypeAndContextTypes;
var didWarnAboutInvalidateContextType;

{
  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 = function (callback, callerName) {
    if (callback === null || typeof callback === 'function') {
      return;
    }

    var key = callerName + '_' + callback;

    if (!didWarnOnInvalidCallback.has(key)) {
      didWarnOnInvalidCallback.add(key);

      error('%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);

        error('%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 () {
      {
        {
          throw 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 ( workInProgress.mode & StrictMode) {
      disableLogs();

      try {
        // Invoke the function an extra time to help detect side-effects.
        getDerivedStateFromProps(nextProps, prevState);
      } finally {
        reenableLogs();
      }
    }
  }

  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.

  if (workInProgress.lanes === NoLanes) {
    // Queue is always non-null for classes
    var updateQueue = workInProgress.updateQueue;
    updateQueue.baseState = memoizedState;
  }
}
var classComponentUpdater = {
  isMounted: isMounted,
  enqueueSetState: function (inst, payload, callback) {
    var fiber = get(inst);
    var eventTime = requestEventTime();
    var lane = requestUpdateLane(fiber);
    var update = createUpdate(eventTime, lane);
    update.payload = payload;

    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback(callback, 'setState');
      }

      update.callback = callback;
    }

    enqueueUpdate(fiber, update);
    scheduleUpdateOnFiber(fiber, lane, eventTime);
  },
  enqueueReplaceState: function (inst, payload, callback) {
    var fiber = get(inst);
    var eventTime = requestEventTime();
    var lane = requestUpdateLane(fiber);
    var update = createUpdate(eventTime, lane);
    update.tag = ReplaceState;
    update.payload = payload;

    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback(callback, 'replaceState');
      }

      update.callback = callback;
    }

    enqueueUpdate(fiber, update);
    scheduleUpdateOnFiber(fiber, lane, eventTime);
  },
  enqueueForceUpdate: function (inst, callback) {
    var fiber = get(inst);
    var eventTime = requestEventTime();
    var lane = requestUpdateLane(fiber);
    var update = createUpdate(eventTime, lane);
    update.tag = ForceUpdate;

    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback(callback, 'forceUpdate');
      }

      update.callback = callback;
    }

    enqueueUpdate(fiber, update);
    scheduleUpdateOnFiber(fiber, lane, eventTime);
  }
};

function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
  var instance = workInProgress.stateNode;

  if (typeof instance.shouldComponentUpdate === 'function') {
    {
      if ( workInProgress.mode & StrictMode) {
        disableLogs();

        try {
          // Invoke the function an extra time to help detect side-effects.
          instance.shouldComponentUpdate(newProps, newState, nextContext);
        } finally {
          reenableLogs();
        }
      }
    }

    var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);

    {
      if (shouldUpdate === undefined) {
        error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');
      }
    }

    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') {
        error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
      } else {
        error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
      }
    }

    if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
      error('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);
    }

    if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
      error('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);
    }

    if (instance.propTypes) {
      error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
    }

    if (instance.contextType) {
      error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
    }

    {
      if (instance.contextTypes) {
        error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
      }

      if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
        didWarnAboutContextTypeAndContextTypes.add(ctor);

        error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
      }
    }

    if (typeof instance.componentShouldUpdate === 'function') {
      error('%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);
    }

    if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
      error('%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');
    }

    if (typeof instance.componentDidUnmount === 'function') {
      error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
    }

    if (typeof instance.componentDidReceiveProps === 'function') {
      error('%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);
    }

    if (typeof instance.componentWillRecieveProps === 'function') {
      error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
    }

    if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
      error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
    }

    var hasMutatedProps = instance.props !== newProps;

    if (instance.props !== undefined && hasMutatedProps) {
      error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
    }

    if (instance.defaultProps) {
      error('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);
    }

    if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
      didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);

      error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
    }

    if (typeof instance.getDerivedStateFromProps === 'function') {
      error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
    }

    if (typeof instance.getDerivedStateFromError === 'function') {
      error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
    }

    if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
      error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
    }

    var _state = instance.state;

    if (_state && (typeof _state !== 'object' || isArray(_state))) {
      error('%s.state: must be set to an object or null', name);
    }

    if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
      error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
    }
  }
}

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) {
  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(', ') + '}.';
        }

        error('%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 {
    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 ( workInProgress.mode & StrictMode) {
      disableLogs();

      try {
        new ctor(props, context); // eslint-disable-line no-new
      } finally {
        reenableLogs();
      }
    }
  }

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

        error('`%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);

          error('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://reactjs.org/link/unsafe-component-lifecycles', _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) {
  var oldState = instance.state;

  if (typeof instance.componentWillMount === 'function') {
    instance.componentWillMount();
  }

  if (typeof instance.UNSAFE_componentWillMount === 'function') {
    instance.UNSAFE_componentWillMount();
  }

  if (oldState !== instance.state) {
    {
      error('%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;

  if (typeof instance.componentWillReceiveProps === 'function') {
    instance.componentWillReceiveProps(newProps, nextContext);
  }

  if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
    instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  }

  if (instance.state !== oldState) {
    {
      var componentName = getComponentName(workInProgress.type) || 'Component';

      if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
        didWarnAboutStateAssignmentForComponent.add(componentName);

        error('%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, renderLanes) {
  {
    checkClassInstance(workInProgress, ctor, newProps);
  }

  var instance = workInProgress.stateNode;
  instance.props = newProps;
  instance.state = workInProgress.memoizedState;
  instance.refs = emptyRefsObject;
  initializeUpdateQueue(workInProgress);
  var contextType = ctor.contextType;

  if (typeof contextType === 'object' && contextType !== null) {
    instance.context = readContext(contextType);
  } 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);

        error('%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);
    }

    {
      ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
    }
  }

  processUpdateQueue(workInProgress, newProps, instance, renderLanes);
  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.

    processUpdateQueue(workInProgress, newProps, instance, renderLanes);
    instance.state = workInProgress.memoizedState;
  }

  if (typeof instance.componentDidMount === 'function') {
    workInProgress.flags |= Update;
  }
}

function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
  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 {
    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;
  processUpdateQueue(workInProgress, newProps, instance, renderLanes);
  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.flags |= 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')) {
      if (typeof instance.componentWillMount === 'function') {
        instance.componentWillMount();
      }

      if (typeof instance.UNSAFE_componentWillMount === 'function') {
        instance.UNSAFE_componentWillMount();
      }
    }

    if (typeof instance.componentDidMount === 'function') {
      workInProgress.flags |= 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.flags |= 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, renderLanes) {
  var instance = workInProgress.stateNode;
  cloneUpdateQueue(current, workInProgress);
  var unresolvedOldProps = workInProgress.memoizedProps;
  var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
  instance.props = oldProps;
  var unresolvedNewProps = workInProgress.pendingProps;
  var oldContext = instance.context;
  var contextType = ctor.contextType;
  var nextContext = emptyContextObject;

  if (typeof contextType === 'object' && contextType !== null) {
    nextContext = readContext(contextType);
  } else {
    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 (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
    }
  }

  resetHasForceUpdateBeforeProcessing();
  var oldState = workInProgress.memoizedState;
  var newState = instance.state = oldState;
  processUpdateQueue(workInProgress, newProps, instance, renderLanes);
  newState = workInProgress.memoizedState;

  if (unresolvedOldProps === unresolvedNewProps && 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 (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.flags |= Update;
      }
    }

    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.flags |= 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')) {
      if (typeof instance.componentWillUpdate === 'function') {
        instance.componentWillUpdate(newProps, newState, nextContext);
      }

      if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
        instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
      }
    }

    if (typeof instance.componentDidUpdate === 'function') {
      workInProgress.flags |= Update;
    }

    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      workInProgress.flags |= 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 (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.flags |= Update;
      }
    }

    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.flags |= 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;
var didWarnAboutGenerators;
var didWarnAboutStringRefs;
var ownerHasKeyUseWarning;
var ownerHasFunctionTypeWarning;

var warnForMissingKey = function (child, returnFiber) {};

{
  didWarnAboutMaps = false;
  didWarnAboutGenerators = false;
  didWarnAboutStringRefs = {};
  /**
   * 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, returnFiber) {
    if (child === null || typeof child !== 'object') {
      return;
    }

    if (!child._store || child._store.validated || child.key != null) {
      return;
    }

    if (!(typeof child._store === 'object')) {
      {
        throw 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 componentName = getComponentName(returnFiber.type) || 'Component';

    if (ownerHasKeyUseWarning[componentName]) {
      return;
    }

    ownerHasKeyUseWarning[componentName] = true;

    error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
  };
}

var isArray$1 = Array.isArray;

function coerceRef(returnFiber, current, element) {
  var mixedRef = element.ref;

  if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
    {
      // TODO: Clean this up once we turn on the string ref warning for
      // everyone, because the strict mode case will no longer be relevant
      if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
      // because these cannot be automatically converted to an arrow function
      // using a codemod. Therefore, we don't have to warn about string refs again.
      !(element._owner && element._self && element._owner.stateNode !== element._self)) {
        var componentName = getComponentName(returnFiber.type) || 'Component';

        if (!didWarnAboutStringRefs[componentName]) {
          {
            error('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 useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);
          }

          didWarnAboutStringRefs[componentName] = true;
        }
      }
    }

    if (element._owner) {
      var owner = element._owner;
      var inst;

      if (owner) {
        var ownerFiber = owner;

        if (!(ownerFiber.tag === ClassComponent)) {
          {
            throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref" );
          }
        }

        inst = ownerFiber.stateNode;
      }

      if (!inst) {
        {
          throw 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 !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
        return current.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 {
      if (!(typeof mixedRef === 'string')) {
        {
          throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." );
        }
      }

      if (!element._owner) {
        {
          throw 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://reactjs.org/link/refs-must-have-owner for more information." );
        }
      }
    }
  }

  return mixedRef;
}

function throwOnInvalidObjectType(returnFiber, newChild) {
  if (returnFiber.type !== 'textarea') {
    {
      {
        throw 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) + "). If you meant to render a collection of children, use an array instead." );
      }
    }
  }
}

function warnOnFunctionType(returnFiber) {
  {
    var componentName = getComponentName(returnFiber.type) || 'Component';

    if (ownerHasFunctionTypeWarning[componentName]) {
      return;
    }

    ownerHasFunctionTypeWarning[componentName] = true;

    error('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.');
  }
} // We avoid inlining this to avoid potential deopts from using try/catch.
// 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.flags = 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
    // instead.
    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) {
    // 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);
    clone.index = 0;
    clone.sibling = null;
    return clone;
  }

  function placeChild(newFiber, lastPlacedIndex, newIndex) {
    newFiber.index = newIndex;

    if (!shouldTrackSideEffects) {
      // Noop.
      return lastPlacedIndex;
    }

    var current = newFiber.alternate;

    if (current !== null) {
      var oldIndex = current.index;

      if (oldIndex < lastPlacedIndex) {
        // This is a move.
        newFiber.flags = Placement;
        return lastPlacedIndex;
      } else {
        // This item can stay in place.
        return oldIndex;
      }
    } else {
      // This is an insertion.
      newFiber.flags = 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.flags = Placement;
    }

    return newFiber;
  }

  function updateTextNode(returnFiber, current, textContent, lanes) {
    if (current === null || current.tag !== HostText) {
      // Insert
      var created = createFiberFromText(textContent, returnFiber.mode, lanes);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current, textContent);
      existing.return = returnFiber;
      return existing;
    }
  }

  function updateElement(returnFiber, current, element, lanes) {
    if (current !== null) {
      if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
       isCompatibleFamilyForHotReloading(current, element) )) {
        // Move based on index
        var existing = useFiber(current, element.props);
        existing.ref = coerceRef(returnFiber, current, element);
        existing.return = returnFiber;

        {
          existing._debugSource = element._source;
          existing._debugOwner = element._owner;
        }

        return existing;
      }
    } // Insert


    var created = createFiberFromElement(element, returnFiber.mode, lanes);
    created.ref = coerceRef(returnFiber, current, element);
    created.return = returnFiber;
    return created;
  }

  function updatePortal(returnFiber, current, portal, lanes) {
    if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
      // Insert
      var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current, portal.children || []);
      existing.return = returnFiber;
      return existing;
    }
  }

  function updateFragment(returnFiber, current, fragment, lanes, key) {
    if (current === null || current.tag !== Fragment) {
      // Insert
      var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current, fragment);
      existing.return = returnFiber;
      return existing;
    }
  }

  function createChild(returnFiber, newChild, lanes) {
    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, lanes);
      created.return = returnFiber;
      return created;
    }

    if (typeof newChild === 'object' && newChild !== null) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          {
            var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);

            _created.ref = coerceRef(returnFiber, null, newChild);
            _created.return = returnFiber;
            return _created;
          }

        case REACT_PORTAL_TYPE:
          {
            var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);

            _created2.return = returnFiber;
            return _created2;
          }
      }

      if (isArray$1(newChild) || getIteratorFn(newChild)) {
        var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);

        _created3.return = returnFiber;
        return _created3;
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType(returnFiber);
      }
    }

    return null;
  }

  function updateSlot(returnFiber, oldFiber, newChild, lanes) {
    // 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, lanes);
    }

    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, lanes, key);
              }

              return updateElement(returnFiber, oldFiber, newChild, lanes);
            } else {
              return null;
            }
          }

        case REACT_PORTAL_TYPE:
          {
            if (newChild.key === key) {
              return updatePortal(returnFiber, oldFiber, newChild, lanes);
            } else {
              return null;
            }
          }
      }

      if (isArray$1(newChild) || getIteratorFn(newChild)) {
        if (key !== null) {
          return null;
        }

        return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType(returnFiber);
      }
    }

    return null;
  }

  function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
    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, lanes);
    }

    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, lanes, newChild.key);
            }

            return updateElement(returnFiber, _matchedFiber, newChild, lanes);
          }

        case REACT_PORTAL_TYPE:
          {
            var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;

            return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
          }

      }

      if (isArray$1(newChild) || getIteratorFn(newChild)) {
        var _matchedFiber3 = existingChildren.get(newIdx) || null;

        return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType(returnFiber);
      }
    }

    return null;
  }
  /**
   * Warns if there is a duplicate or missing key
   */


  function warnOnInvalidKey(child, knownKeys, returnFiber) {
    {
      if (typeof child !== 'object' || child === null) {
        return knownKeys;
      }

      switch (child.$$typeof) {
        case REACT_ELEMENT_TYPE:
        case REACT_PORTAL_TYPE:
          warnForMissingKey(child, returnFiber);
          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;
          }

          error('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;
      }
    }

    return knownKeys;
  }

  function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
    // 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, returnFiber);
      }
    }

    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], lanes);

      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], lanes);

        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], lanes);

      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, lanes) {
    // This is the same implementation as reconcileChildrenArray(),
    // but using the iterator instead.
    var iteratorFn = getIteratorFn(newChildrenIterable);

    if (!(typeof iteratorFn === 'function')) {
      {
        throw 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') {
        if (!didWarnAboutGenerators) {
          error('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.');
        }

        didWarnAboutGenerators = true;
      } // Warn about using Maps as children


      if (newChildrenIterable.entries === iteratorFn) {
        if (!didWarnAboutMaps) {
          error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
        }

        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, returnFiber);
        }
      }
    }

    var newChildren = iteratorFn.call(newChildrenIterable);

    if (!(newChildren != null)) {
      {
        throw 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, lanes);

      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, lanes);

        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, lanes);

      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, lanes) {
    // 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);
      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, lanes);
    created.return = returnFiber;
    return created;
  }

  function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
    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) {
        switch (child.tag) {
          case Fragment:
            {
              if (element.type === REACT_FRAGMENT_TYPE) {
                deleteRemainingChildren(returnFiber, child.sibling);
                var existing = useFiber(child, element.props.children);
                existing.return = returnFiber;

                {
                  existing._debugSource = element._source;
                  existing._debugOwner = element._owner;
                }

                return existing;
              }

              break;
            }

          case Block:

          // We intentionally fallthrough here if enableBlocksAPI is not on.
          // eslint-disable-next-lined no-fallthrough

          default:
            {
              if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
               isCompatibleFamilyForHotReloading(child, element) )) {
                deleteRemainingChildren(returnFiber, child.sibling);

                var _existing3 = useFiber(child, element.props);

                _existing3.ref = coerceRef(returnFiber, child, element);
                _existing3.return = returnFiber;

                {
                  _existing3._debugSource = element._source;
                  _existing3._debugOwner = element._owner;
                }

                return _existing3;
              }

              break;
            }
        } // Didn't match.


        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, lanes, element.key);
      created.return = returnFiber;
      return created;
    } else {
      var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);

      _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
      _created4.return = returnFiber;
      return _created4;
    }
  }

  function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
    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 || []);
          existing.return = returnFiber;
          return existing;
        } else {
          deleteRemainingChildren(returnFiber, child);
          break;
        }
      } else {
        deleteChild(returnFiber, child);
      }

      child = child.sibling;
    }

    var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
    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, lanes) {
    // 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, lanes));

        case REACT_PORTAL_TYPE:
          return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));

      }
    }

    if (typeof newChild === 'string' || typeof newChild === 'number') {
      return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
    }

    if (isArray$1(newChild)) {
      return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
    }

    if (getIteratorFn(newChild)) {
      return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
    }

    if (isObject) {
      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType(returnFiber);
      }
    }

    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 Block:
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            {
              {
                throw Error( (getComponentName(returnFiber.type) || '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, workInProgress) {
  if (!(current === null || workInProgress.child === current.child)) {
    {
      throw Error( "Resuming work not yet implemented." );
    }
  }

  if (workInProgress.child === null) {
    return;
  }

  var currentChild = workInProgress.child;
  var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
  workInProgress.child = newChild;
  newChild.return = workInProgress;

  while (currentChild.sibling !== null) {
    currentChild = currentChild.sibling;
    newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
    newChild.return = workInProgress;
  }

  newChild.sibling = null;
} // Reset a workInProgress child set to prepare it for a second pass.

function resetChildFibers(workInProgress, lanes) {
  var child = workInProgress.child;

  while (child !== null) {
    resetWorkInProgress(child, lanes);
    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) {
  if (!(c !== NO_CONTEXT)) {
    {
      throw 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); // 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);
}

function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
  // If it was the primary children that just suspended, capture and render the
  // fallback. Otherwise, don't capture and bubble to the next boundary.
  var nextState = workInProgress.memoizedState;

  if (nextState !== null) {
    if (nextState.dehydrated !== null) {
      // A dehydrated boundary always captures.
      return true;
    }

    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) {
        var dehydrated = state.dehydrated;

        if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
          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.flags & DidCapture) !== NoFlags;

      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 NoFlags$1 =
/*  */
0; // Represents whether effect should fire.

var HasEffect =
/* */
1; // Represents the phase in which the effect (not the clean-up) fires.

var Layout =
/*    */
2;
var Passive$1 =
/*   */
4;

// This may have been an insertion or a hydration.

var hydrationParentFiber = null;
var nextHydratableInstance = null;
var isHydrating = false;

function enterHydrationState(fiber) {

  var parentInstance = fiber.stateNode.containerInfo;
  nextHydratableInstance = getFirstHydratableChild(parentInstance);
  hydrationParentFiber = 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.flags = 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.flags = fiber.flags & ~Hydrating | 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);
              break;

            case HostText:
              var text = fiber.pendingProps;
              didNotFindHydratableContainerTextInstance(parentContainer, text);
              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);
              break;

            case HostText:
              var _text = fiber.pendingProps;
              didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
              break;

            case SuspenseComponent:
              didNotFindHydratableSuspenseInstance(parentType, parentProps);
              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);

        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:
      {

        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) {

  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) {

  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) {

  var suspenseState = fiber.memoizedState;
  var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;

  if (!suspenseInstance) {
    {
      throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
    }
  }

  return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
}

function popToNextHostParent(fiber) {
  var parent = fiber.return;

  while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
    parent = parent.return;
  }

  hydrationParentFiber = parent;
}

function popHydrationState(fiber) {

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

  if (fiber.tag === SuspenseComponent) {
    nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
  } else {
    nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
  }

  return true;
}

function resetHydrationState() {

  hydrationParentFiber = null;
  nextHydratableInstance = null;
  isHydrating = false;
}

function getIsHydrating() {
  return isHydrating;
}

// and should be reset before starting a new render.
// This tracks which mutable sources need to be reset after a render.

var workInProgressSources = [];
var rendererSigil$1;

{
  // Used to detect multiple renderers using the same mutable source.
  rendererSigil$1 = {};
}

function markSourceAsDirty(mutableSource) {
  workInProgressSources.push(mutableSource);
}
function resetWorkInProgressVersions() {
  for (var i = 0; i < workInProgressSources.length; i++) {
    var mutableSource = workInProgressSources[i];

    {
      mutableSource._workInProgressVersionPrimary = null;
    }
  }

  workInProgressSources.length = 0;
}
function getWorkInProgressVersion(mutableSource) {
  {
    return mutableSource._workInProgressVersionPrimary;
  }
}
function setWorkInProgressVersion(mutableSource, version) {
  {
    mutableSource._workInProgressVersionPrimary = version;
  }

  workInProgressSources.push(mutableSource);
}
function warnAboutMultipleRenderersDEV(mutableSource) {
  {
    {
      if (mutableSource._currentPrimaryRenderer == null) {
        mutableSource._currentPrimaryRenderer = rendererSigil$1;
      } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {
        error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');
      }
    }
  }
} // Eager reads the version of a mutable source and stores it on the root.

var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
    ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
var didWarnAboutMismatchedHooksForComponent;
var didWarnAboutUseOpaqueIdentifier;

{
  didWarnAboutUseOpaqueIdentifier = {};
  didWarnAboutMismatchedHooksForComponent = new Set();
}

// These are set right before calling the component.
var renderLanes = NoLanes; // 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 workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
// does not get reset if we do another render pass; only when we're completely
// finished evaluating this component. This is an optimization so we know
// whether we need to clear render phase updates after a throw.

var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This
// gets reset after each attempt.
// TODO: Maybe there's some way to consolidate this with
// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.

var didScheduleRenderPhaseUpdateDuringThisPass = false;
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.
      error('%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;
        }

        error('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://reactjs.org/link/rules-of-hooks\n\n' + '   Previous render            Next render\n' + '   ------------------------------------------------------\n' + '%s' + '   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
      }
    }
  }
}

function throwInvalidHookError() {
  {
    {
      throw 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://reactjs.org/link/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) {
    {
      error('%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) {
      error('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 (objectIs(nextDeps[i], prevDeps[i])) {
      continue;
    }

    return false;
  }

  return true;
}

function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
  renderLanes = nextRenderLanes;
  currentlyRenderingFiber$1 = workInProgress;

  {
    hookTypesDev = current !== null ? current._debugHookTypes : null;
    hookTypesUpdateIndexDev = -1; // Used for hot reloading:

    ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
  }

  workInProgress.memoizedState = null;
  workInProgress.updateQueue = null;
  workInProgress.lanes = NoLanes; // The following should have already been reset
  // currentHook = null;
  // workInProgressHook = null;
  // didScheduleRenderPhaseUpdate = false;
  // 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 memoizedState === null.
  // This is tricky because it's valid for certain types of components (e.g. React.lazy)
  // Using memoizedState 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 memoizedState would be null during updates and mounts.

  {
    if (current !== null && current.memoizedState !== 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, secondArg); // Check if there was a render phase update

  if (didScheduleRenderPhaseUpdateDuringThisPass) {
    // Keep rendering in a loop for as long as render phase updates continue to
    // be scheduled. Use a counter to prevent infinite loops.
    var numberOfReRenders = 0;

    do {
      didScheduleRenderPhaseUpdateDuringThisPass = false;

      if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
        {
          throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
        }
      }

      numberOfReRenders += 1;

      {
        // Even when hot reloading, allow dependencies to stabilize
        // after first render to prevent infinite render phase updates.
        ignorePreviousDependencies = false;
      } // Start over from the beginning of the list


      currentHook = null;
      workInProgressHook = null;
      workInProgress.updateQueue = null;

      {
        // Also validate hook order for cascading updates.
        hookTypesUpdateIndexDev = -1;
      }

      ReactCurrentDispatcher$1.current =  HooksDispatcherOnRerenderInDEV ;
      children = Component(props, secondArg);
    } while (didScheduleRenderPhaseUpdateDuringThisPass);
  } // 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;

  {
    workInProgress._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;
  renderLanes = NoLanes;
  currentlyRenderingFiber$1 = null;
  currentHook = null;
  workInProgressHook = null;

  {
    currentHookNameInDev = null;
    hookTypesDev = null;
    hookTypesUpdateIndexDev = -1;
  }

  didScheduleRenderPhaseUpdate = false;

  if (!!didRenderTooFewHooks) {
    {
      throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." );
    }
  }

  return children;
}
function bailoutHooks(current, workInProgress, lanes) {
  workInProgress.updateQueue = current.updateQueue;
  workInProgress.flags &= ~(Passive | Update);
  current.lanes = removeLanes(current.lanes, lanes);
}
function resetHooksAfterThrow() {
  // 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;

  if (didScheduleRenderPhaseUpdate) {
    // There were render phase updates. These are only valid for this render
    // phase, which we are now aborting. Remove the updates from the queues so
    // they do not persist to the next render. Do not remove updates from hooks
    // that weren't processed.
    //
    // Only reset the updates from the queue if it has a clone. If it does
    // not have a clone, that means it wasn't processed, and the updates were
    // scheduled before we entered the render phase.
    var hook = currentlyRenderingFiber$1.memoizedState;

    while (hook !== null) {
      var queue = hook.queue;

      if (queue !== null) {
        queue.pending = null;
      }

      hook = hook.next;
    }

    didScheduleRenderPhaseUpdate = false;
  }

  renderLanes = NoLanes;
  currentlyRenderingFiber$1 = null;
  currentHook = null;
  workInProgressHook = null;

  {
    hookTypesDev = null;
    hookTypesUpdateIndexDev = -1;
    currentHookNameInDev = null;
    isUpdatingOpaqueValueInRenderPhase = false;
  }

  didScheduleRenderPhaseUpdateDuringThisPass = false;
}

function mountWorkInProgressHook() {
  var hook = {
    memoizedState: null,
    baseState: null,
    baseQueue: null,
    queue: null,
    next: null
  };

  if (workInProgressHook === null) {
    // This is the first hook in the list
    currentlyRenderingFiber$1.memoizedState = 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.
  var nextCurrentHook;

  if (currentHook === null) {
    var current = currentlyRenderingFiber$1.alternate;

    if (current !== null) {
      nextCurrentHook = current.memoizedState;
    } else {
      nextCurrentHook = null;
    }
  } else {
    nextCurrentHook = currentHook.next;
  }

  var nextWorkInProgressHook;

  if (workInProgressHook === null) {
    nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
  } else {
    nextWorkInProgressHook = workInProgressHook.next;
  }

  if (nextWorkInProgressHook !== null) {
    // There's already a work-in-progress. Reuse it.
    workInProgressHook = nextWorkInProgressHook;
    nextWorkInProgressHook = workInProgressHook.next;
    currentHook = nextCurrentHook;
  } else {
    // Clone from the current hook.
    if (!(nextCurrentHook !== null)) {
      {
        throw Error( "Rendered more hooks than during the previous render." );
      }
    }

    currentHook = nextCurrentHook;
    var newHook = {
      memoizedState: currentHook.memoizedState,
      baseState: currentHook.baseState,
      baseQueue: currentHook.baseQueue,
      queue: currentHook.queue,
      next: null
    };

    if (workInProgressHook === null) {
      // This is the first hook in the list.
      currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
    } else {
      // Append to the end of the list.
      workInProgressHook = workInProgressHook.next = newHook;
    }
  }

  return workInProgressHook;
}

function createFunctionComponentUpdateQueue() {
  return {
    lastEffect: null
  };
}

function basicStateReducer(state, action) {
  // $FlowFixMe: Flow doesn't like mixed types
  return typeof action === 'function' ? action(state) : action;
}

function mountReducer(reducer, initialArg, init) {
  var hook = mountWorkInProgressHook();
  var initialState;

  if (init !== undefined) {
    initialState = init(initialArg);
  } else {
    initialState = initialArg;
  }

  hook.memoizedState = hook.baseState = initialState;
  var queue = hook.queue = {
    pending: null,
    dispatch: null,
    lastRenderedReducer: reducer,
    lastRenderedState: initialState
  };
  var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
  return [hook.memoizedState, dispatch];
}

function updateReducer(reducer, initialArg, init) {
  var hook = updateWorkInProgressHook();
  var queue = hook.queue;

  if (!(queue !== null)) {
    {
      throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
    }
  }

  queue.lastRenderedReducer = reducer;
  var current = currentHook; // The last rebase update that is NOT part of the base state.

  var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.

  var pendingQueue = queue.pending;

  if (pendingQueue !== null) {
    // We have new updates that haven't been processed yet.
    // We'll add them to the base queue.
    if (baseQueue !== null) {
      // Merge the pending queue and the base queue.
      var baseFirst = baseQueue.next;
      var pendingFirst = pendingQueue.next;
      baseQueue.next = pendingFirst;
      pendingQueue.next = baseFirst;
    }

    {
      if (current.baseQueue !== baseQueue) {
        // Internal invariant that should never happen, but feasibly could in
        // the future if we implement resuming, or some form of that.
        error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');
      }
    }

    current.baseQueue = baseQueue = pendingQueue;
    queue.pending = null;
  }

  if (baseQueue !== null) {
    // We have a queue to process.
    var first = baseQueue.next;
    var newState = current.baseState;
    var newBaseState = null;
    var newBaseQueueFirst = null;
    var newBaseQueueLast = null;
    var update = first;

    do {
      var updateLane = update.lane;

      if (!isSubsetOfLanes(renderLanes, updateLane)) {
        // Priority is insufficient. Skip this update. If this is the first
        // skipped update, the previous update/state is the new base
        // update/state.
        var clone = {
          lane: updateLane,
          action: update.action,
          eagerReducer: update.eagerReducer,
          eagerState: update.eagerState,
          next: null
        };

        if (newBaseQueueLast === null) {
          newBaseQueueFirst = newBaseQueueLast = clone;
          newBaseState = newState;
        } else {
          newBaseQueueLast = newBaseQueueLast.next = clone;
        } // Update the remaining priority in the queue.
        // TODO: Don't need to accumulate this. Instead, we can remove
        // renderLanes from the original lanes.


        currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
        markSkippedUpdateLanes(updateLane);
      } else {
        // This update does have sufficient priority.
        if (newBaseQueueLast !== null) {
          var _clone = {
            // This update is going to be committed so we never want uncommit
            // it. Using NoLane works because 0 is a subset of all bitmasks, so
            // this will never be skipped by the check above.
            lane: NoLane,
            action: update.action,
            eagerReducer: update.eagerReducer,
            eagerState: update.eagerState,
            next: null
          };
          newBaseQueueLast = newBaseQueueLast.next = _clone;
        } // 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 action = update.action;
          newState = reducer(newState, action);
        }
      }

      update = update.next;
    } while (update !== null && update !== first);

    if (newBaseQueueLast === null) {
      newBaseState = newState;
    } else {
      newBaseQueueLast.next = newBaseQueueFirst;
    } // Mark that the fiber performed work, but only if the new state is
    // different from the current state.


    if (!objectIs(newState, hook.memoizedState)) {
      markWorkInProgressReceivedUpdate();
    }

    hook.memoizedState = newState;
    hook.baseState = newBaseState;
    hook.baseQueue = newBaseQueueLast;
    queue.lastRenderedState = newState;
  }

  var dispatch = queue.dispatch;
  return [hook.memoizedState, dispatch];
}

function rerenderReducer(reducer, initialArg, init) {
  var hook = updateWorkInProgressHook();
  var queue = hook.queue;

  if (!(queue !== null)) {
    {
      throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
    }
  }

  queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
  // work-in-progress hook.

  var dispatch = queue.dispatch;
  var lastRenderPhaseUpdate = queue.pending;
  var newState = hook.memoizedState;

  if (lastRenderPhaseUpdate !== null) {
    // The queue doesn't persist past this render pass.
    queue.pending = null;
    var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
    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 !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
    // different from the current state.


    if (!objectIs(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.baseQueue === null) {
      hook.baseState = newState;
    }

    queue.lastRenderedState = newState;
  }

  return [newState, dispatch];
}

function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
  {
    warnAboutMultipleRenderersDEV(source);
  }

  var getVersion = source._getVersion;
  var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?

  var isSafeToReadFromSource = false; // Check the version first.
  // If this render has already been started with a specific version,
  // we can use it alone to determine if we can safely read from the source.

  var currentRenderVersion = getWorkInProgressVersion(source);

  if (currentRenderVersion !== null) {
    // It's safe to read if the store hasn't been mutated since the last time
    // we read something.
    isSafeToReadFromSource = currentRenderVersion === version;
  } else {
    // If there's no version, then this is the first time we've read from the
    // source during the current render pass, so we need to do a bit more work.
    // What we need to determine is if there are any hooks that already
    // subscribed to the source, and if so, whether there are any pending
    // mutations that haven't been synchronized yet.
    //
    // If there are no pending mutations, then `root.mutableReadLanes` will be
    // empty, and we know we can safely read.
    //
    // If there *are* pending mutations, we may still be able to safely read
    // if the currently rendering lanes are inclusive of the pending mutation
    // lanes, since that guarantees that the value we're about to read from
    // the source is consistent with the values that we read during the most
    // recent mutation.
    isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);

    if (isSafeToReadFromSource) {
      // If it's safe to read from this source during the current render,
      // store the version in case other components read from it.
      // A changed version number will let those components know to throw and restart the render.
      setWorkInProgressVersion(source, version);
    }
  }

  if (isSafeToReadFromSource) {
    var snapshot = getSnapshot(source._source);

    {
      if (typeof snapshot === 'function') {
        error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
      }
    }

    return snapshot;
  } else {
    // This handles the special case of a mutable source being shared between renderers.
    // In that case, if the source is mutated between the first and second renderer,
    // The second renderer don't know that it needs to reset the WIP version during unwind,
    // (because the hook only marks sources as dirty if it's written to their WIP version).
    // That would cause this tear check to throw again and eventually be visible to the user.
    // We can avoid this infinite loop by explicitly marking the source as dirty.
    //
    // This can lead to tearing in the first renderer when it resumes,
    // but there's nothing we can do about that (short of throwing here and refusing to continue the render).
    markSourceAsDirty(source);

    {
      {
        throw Error( "Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue." );
      }
    }
  }
}

function useMutableSource(hook, source, getSnapshot, subscribe) {
  var root = getWorkInProgressRoot();

  if (!(root !== null)) {
    {
      throw Error( "Expected a work-in-progress root. This is a bug in React. Please file an issue." );
    }
  }

  var getVersion = source._getVersion;
  var version = getVersion(source._source);
  var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const

  var _dispatcher$useState = dispatcher.useState(function () {
    return readFromUnsubcribedMutableSource(root, source, getSnapshot);
  }),
      currentSnapshot = _dispatcher$useState[0],
      setSnapshot = _dispatcher$useState[1];

  var snapshot = currentSnapshot; // Grab a handle to the state hook as well.
  // We use it to clear the pending update queue if we have a new source.

  var stateHook = workInProgressHook;
  var memoizedState = hook.memoizedState;
  var refs = memoizedState.refs;
  var prevGetSnapshot = refs.getSnapshot;
  var prevSource = memoizedState.source;
  var prevSubscribe = memoizedState.subscribe;
  var fiber = currentlyRenderingFiber$1;
  hook.memoizedState = {
    refs: refs,
    source: source,
    subscribe: subscribe
  }; // Sync the values needed by our subscription handler after each commit.

  dispatcher.useEffect(function () {
    refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,
    // but this hook recreates the queue in certain cases  to avoid updates from stale sources.
    // handleChange() below needs to reference the dispatch function without re-subscribing,
    // so we use a ref to ensure that it always has the latest version.

    refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.

    var maybeNewVersion = getVersion(source._source);

    if (!objectIs(version, maybeNewVersion)) {
      var maybeNewSnapshot = getSnapshot(source._source);

      {
        if (typeof maybeNewSnapshot === 'function') {
          error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
        }
      }

      if (!objectIs(snapshot, maybeNewSnapshot)) {
        setSnapshot(maybeNewSnapshot);
        var lane = requestUpdateLane(fiber);
        markRootMutableRead(root, lane);
      } // If the source mutated between render and now,
      // there may be state updates already scheduled from the old source.
      // Entangle the updates so that they render in the same batch.


      markRootEntangled(root, root.mutableReadLanes);
    }
  }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.

  dispatcher.useEffect(function () {
    var handleChange = function () {
      var latestGetSnapshot = refs.getSnapshot;
      var latestSetSnapshot = refs.setSnapshot;

      try {
        latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.

        var lane = requestUpdateLane(fiber);
        markRootMutableRead(root, lane);
      } catch (error) {
        // A selector might throw after a source mutation.
        // e.g. it might try to read from a part of the store that no longer exists.
        // In this case we should still schedule an update with React.
        // Worst case the selector will throw again and then an error boundary will handle it.
        latestSetSnapshot(function () {
          throw error;
        });
      }
    };

    var unsubscribe = subscribe(source._source, handleChange);

    {
      if (typeof unsubscribe !== 'function') {
        error('Mutable source subscribe function must return an unsubscribe function.');
      }
    }

    return unsubscribe;
  }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.
  //
  // If either the source or the subscription have changed we can't can't trust the update queue.
  // Maybe the source changed in a way that the old subscription ignored but the new one depends on.
  //
  // If the getSnapshot function changed, we also shouldn't rely on the update queue.
  // It's possible that the underlying source was mutated between the when the last "change" event fired,
  // and when the current render (with the new getSnapshot function) is processed.
  //
  // In both cases, we need to throw away pending updates (since they are no longer relevant)
  // and treat reading from the source as we do in the mount case.

  if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {
    // Create a new queue and setState method,
    // So if there are interleaved updates, they get pushed to the older queue.
    // When this becomes current, the previous queue and dispatch method will be discarded,
    // including any interleaving updates that occur.
    var newQueue = {
      pending: null,
      dispatch: null,
      lastRenderedReducer: basicStateReducer,
      lastRenderedState: snapshot
    };
    newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);
    stateHook.queue = newQueue;
    stateHook.baseQueue = null;
    snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
    stateHook.memoizedState = stateHook.baseState = snapshot;
  }

  return snapshot;
}

function mountMutableSource(source, getSnapshot, subscribe) {
  var hook = mountWorkInProgressHook();
  hook.memoizedState = {
    refs: {
      getSnapshot: getSnapshot,
      setSnapshot: null
    },
    source: source,
    subscribe: subscribe
  };
  return useMutableSource(hook, source, getSnapshot, subscribe);
}

function updateMutableSource(source, getSnapshot, subscribe) {
  var hook = updateWorkInProgressHook();
  return useMutableSource(hook, source, getSnapshot, subscribe);
}

function mountState(initialState) {
  var hook = mountWorkInProgressHook();

  if (typeof initialState === 'function') {
    // $FlowFixMe: Flow doesn't like mixed types
    initialState = initialState();
  }

  hook.memoizedState = hook.baseState = initialState;
  var queue = hook.queue = {
    pending: null,
    dispatch: null,
    lastRenderedReducer: basicStateReducer,
    lastRenderedState: initialState
  };
  var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
  return [hook.memoizedState, dispatch];
}

function updateState(initialState) {
  return updateReducer(basicStateReducer);
}

function rerenderState(initialState) {
  return rerenderReducer(basicStateReducer);
}

function pushEffect(tag, create, destroy, deps) {
  var effect = {
    tag: tag,
    create: create,
    destroy: destroy,
    deps: deps,
    // Circular
    next: null
  };
  var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;

  if (componentUpdateQueue === null) {
    componentUpdateQueue = createFunctionComponentUpdateQueue();
    currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
    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(fiberFlags, hookFlags, create, deps) {
  var hook = mountWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  currentlyRenderingFiber$1.flags |= fiberFlags;
  hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);
}

function updateEffectImpl(fiberFlags, hookFlags, 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(hookFlags, create, destroy, nextDeps);
        return;
      }
    }
  }

  currentlyRenderingFiber$1.flags |= fiberFlags;
  hook.memoizedState = pushEffect(HasEffect | hookFlags, 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, Passive$1, 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, Passive$1, create, deps);
}

function mountLayoutEffect(create, deps) {
  return mountEffectImpl(Update, Layout, create, deps);
}

function updateLayoutEffect(create, deps) {
  return updateEffectImpl(Update, Layout, 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;

    {
      if (!refObject.hasOwnProperty('current')) {
        error('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(', ') + '}');
      }
    }

    var _inst2 = create();

    refObject.current = _inst2;
    return function () {
      refObject.current = null;
    };
  }
}

function mountImperativeHandle(ref, create, deps) {
  {
    if (typeof create !== 'function') {
      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
    }
  } // 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, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}

function updateImperativeHandle(ref, create, deps) {
  {
    if (typeof create !== 'function') {
      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
    }
  } // 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, Layout, 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 mountDeferredValue(value) {
  var _mountState = mountState(value),
      prevValue = _mountState[0],
      setValue = _mountState[1];

  mountEffect(function () {
    var prevTransition = ReactCurrentBatchConfig$1.transition;
    ReactCurrentBatchConfig$1.transition = 1;

    try {
      setValue(value);
    } finally {
      ReactCurrentBatchConfig$1.transition = prevTransition;
    }
  }, [value]);
  return prevValue;
}

function updateDeferredValue(value) {
  var _updateState = updateState(),
      prevValue = _updateState[0],
      setValue = _updateState[1];

  updateEffect(function () {
    var prevTransition = ReactCurrentBatchConfig$1.transition;
    ReactCurrentBatchConfig$1.transition = 1;

    try {
      setValue(value);
    } finally {
      ReactCurrentBatchConfig$1.transition = prevTransition;
    }
  }, [value]);
  return prevValue;
}

function rerenderDeferredValue(value) {
  var _rerenderState = rerenderState(),
      prevValue = _rerenderState[0],
      setValue = _rerenderState[1];

  updateEffect(function () {
    var prevTransition = ReactCurrentBatchConfig$1.transition;
    ReactCurrentBatchConfig$1.transition = 1;

    try {
      setValue(value);
    } finally {
      ReactCurrentBatchConfig$1.transition = prevTransition;
    }
  }, [value]);
  return prevValue;
}

function startTransition(setPending, callback) {
  var priorityLevel = getCurrentPriorityLevel();

  {
    runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {
      setPending(true);
    });
    runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {
      var prevTransition = ReactCurrentBatchConfig$1.transition;
      ReactCurrentBatchConfig$1.transition = 1;

      try {
        setPending(false);
        callback();
      } finally {
        ReactCurrentBatchConfig$1.transition = prevTransition;
      }
    });
  }
}

function mountTransition() {
  var _mountState2 = mountState(false),
      isPending = _mountState2[0],
      setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`
  // never changes.


  var start = startTransition.bind(null, setPending);
  mountRef(start);
  return [start, isPending];
}

function updateTransition() {
  var _updateState2 = updateState(),
      isPending = _updateState2[0];

  var startRef = updateRef();
  var start = startRef.current;
  return [start, isPending];
}

function rerenderTransition() {
  var _rerenderState2 = rerenderState(),
      isPending = _rerenderState2[0];

  var startRef = updateRef();
  var start = startRef.current;
  return [start, isPending];
}

var isUpdatingOpaqueValueInRenderPhase = false;
function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
  {
    return isUpdatingOpaqueValueInRenderPhase;
  }
}

function warnOnOpaqueIdentifierAccessInDEV(fiber) {
  {
    // TODO: Should warn in effects and callbacks, too
    var name = getComponentName(fiber.type) || 'Unknown';

    if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {
      error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');

      didWarnAboutUseOpaqueIdentifier[name] = true;
    }
  }
}

function mountOpaqueIdentifier() {
  var makeId =  makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;

  if (getIsHydrating()) {
    var didUpgrade = false;
    var fiber = currentlyRenderingFiber$1;

    var readValue = function () {
      if (!didUpgrade) {
        // Only upgrade once. This works even inside the render phase because
        // the update is added to a shared queue, which outlasts the
        // in-progress render.
        didUpgrade = true;

        {
          isUpdatingOpaqueValueInRenderPhase = true;
          setId(makeId());
          isUpdatingOpaqueValueInRenderPhase = false;
          warnOnOpaqueIdentifierAccessInDEV(fiber);
        }
      }

      {
        {
          throw Error( "The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly." );
        }
      }
    };

    var id = makeOpaqueHydratingObject(readValue);
    var setId = mountState(id)[1];

    if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {
      currentlyRenderingFiber$1.flags |= Update | Passive;
      pushEffect(HasEffect | Passive$1, function () {
        setId(makeId());
      }, undefined, null);
    }

    return id;
  } else {
    var _id = makeId();

    mountState(_id);
    return _id;
  }
}

function updateOpaqueIdentifier() {
  var id = updateState()[0];
  return id;
}

function rerenderOpaqueIdentifier() {
  var id = rerenderState()[0];
  return id;
}

function dispatchAction(fiber, queue, action) {
  {
    if (typeof arguments[3] === 'function') {
      error("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().');
    }
  }

  var eventTime = requestEventTime();
  var lane = requestUpdateLane(fiber);
  var update = {
    lane: lane,
    action: action,
    eagerReducer: null,
    eagerState: null,
    next: null
  }; // Append the update to the end of the list.

  var pending = queue.pending;

  if (pending === null) {
    // This is the first update. Create a circular list.
    update.next = update;
  } else {
    update.next = pending.next;
    pending.next = update;
  }

  queue.pending = update;
  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.
    didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
  } else {
    if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
      // 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;

        {
          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.

          update.eagerReducer = lastRenderedReducer;
          update.eagerState = eagerState;

          if (objectIs(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);
      }
    }

    scheduleUpdateOnFiber(fiber, lane, eventTime);
  }
}

var ContextOnlyDispatcher = {
  readContext: readContext,
  useCallback: throwInvalidHookError,
  useContext: throwInvalidHookError,
  useEffect: throwInvalidHookError,
  useImperativeHandle: throwInvalidHookError,
  useLayoutEffect: throwInvalidHookError,
  useMemo: throwInvalidHookError,
  useReducer: throwInvalidHookError,
  useRef: throwInvalidHookError,
  useState: throwInvalidHookError,
  useDebugValue: throwInvalidHookError,
  useDeferredValue: throwInvalidHookError,
  useTransition: throwInvalidHookError,
  useMutableSource: throwInvalidHookError,
  useOpaqueIdentifier: throwInvalidHookError,
  unstable_isNewReconciler: enableNewReconciler
};
var HooksDispatcherOnMountInDEV = null;
var HooksDispatcherOnMountWithHookTypesInDEV = null;
var HooksDispatcherOnUpdateInDEV = null;
var HooksDispatcherOnRerenderInDEV = null;
var InvalidNestedHooksDispatcherOnMountInDEV = null;
var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
var InvalidNestedHooksDispatcherOnRerenderInDEV = null;

{
  var warnInvalidContextAccess = function () {
    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().');
  };

  var warnInvalidHookAccess = function () {
    error('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://reactjs.org/link/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();
    },
    useDeferredValue: function (value) {
      currentHookNameInDev = 'useDeferredValue';
      mountHookTypesDev();
      return mountDeferredValue(value);
    },
    useTransition: function () {
      currentHookNameInDev = 'useTransition';
      mountHookTypesDev();
      return mountTransition();
    },
    useMutableSource: function (source, getSnapshot, subscribe) {
      currentHookNameInDev = 'useMutableSource';
      mountHookTypesDev();
      return mountMutableSource(source, getSnapshot, subscribe);
    },
    useOpaqueIdentifier: function () {
      currentHookNameInDev = 'useOpaqueIdentifier';
      mountHookTypesDev();
      return mountOpaqueIdentifier();
    },
    unstable_isNewReconciler: enableNewReconciler
  };
  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();
    },
    useDeferredValue: function (value) {
      currentHookNameInDev = 'useDeferredValue';
      updateHookTypesDev();
      return mountDeferredValue(value);
    },
    useTransition: function () {
      currentHookNameInDev = 'useTransition';
      updateHookTypesDev();
      return mountTransition();
    },
    useMutableSource: function (source, getSnapshot, subscribe) {
      currentHookNameInDev = 'useMutableSource';
      updateHookTypesDev();
      return mountMutableSource(source, getSnapshot, subscribe);
    },
    useOpaqueIdentifier: function () {
      currentHookNameInDev = 'useOpaqueIdentifier';
      updateHookTypesDev();
      return mountOpaqueIdentifier();
    },
    unstable_isNewReconciler: enableNewReconciler
  };
  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();
    },
    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();
    },
    useDeferredValue: function (value) {
      currentHookNameInDev = 'useDeferredValue';
      updateHookTypesDev();
      return updateDeferredValue(value);
    },
    useTransition: function () {
      currentHookNameInDev = 'useTransition';
      updateHookTypesDev();
      return updateTransition();
    },
    useMutableSource: function (source, getSnapshot, subscribe) {
      currentHookNameInDev = 'useMutableSource';
      updateHookTypesDev();
      return updateMutableSource(source, getSnapshot, subscribe);
    },
    useOpaqueIdentifier: function () {
      currentHookNameInDev = 'useOpaqueIdentifier';
      updateHookTypesDev();
      return updateOpaqueIdentifier();
    },
    unstable_isNewReconciler: enableNewReconciler
  };
  HooksDispatcherOnRerenderInDEV = {
    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 = InvalidNestedHooksDispatcherOnRerenderInDEV;

      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 = InvalidNestedHooksDispatcherOnRerenderInDEV;

      try {
        return rerenderReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      updateHookTypesDev();
      return updateRef();
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;

      try {
        return rerenderState(initialState);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      updateHookTypesDev();
      return updateDebugValue();
    },
    useDeferredValue: function (value) {
      currentHookNameInDev = 'useDeferredValue';
      updateHookTypesDev();
      return rerenderDeferredValue(value);
    },
    useTransition: function () {
      currentHookNameInDev = 'useTransition';
      updateHookTypesDev();
      return rerenderTransition();
    },
    useMutableSource: function (source, getSnapshot, subscribe) {
      currentHookNameInDev = 'useMutableSource';
      updateHookTypesDev();
      return updateMutableSource(source, getSnapshot, subscribe);
    },
    useOpaqueIdentifier: function () {
      currentHookNameInDev = 'useOpaqueIdentifier';
      updateHookTypesDev();
      return rerenderOpaqueIdentifier();
    },
    unstable_isNewReconciler: enableNewReconciler
  };
  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();
    },
    useDeferredValue: function (value) {
      currentHookNameInDev = 'useDeferredValue';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountDeferredValue(value);
    },
    useTransition: function () {
      currentHookNameInDev = 'useTransition';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountTransition();
    },
    useMutableSource: function (source, getSnapshot, subscribe) {
      currentHookNameInDev = 'useMutableSource';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountMutableSource(source, getSnapshot, subscribe);
    },
    useOpaqueIdentifier: function () {
      currentHookNameInDev = 'useOpaqueIdentifier';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountOpaqueIdentifier();
    },
    unstable_isNewReconciler: enableNewReconciler
  };
  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();
    },
    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();
    },
    useDeferredValue: function (value) {
      currentHookNameInDev = 'useDeferredValue';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateDeferredValue(value);
    },
    useTransition: function () {
      currentHookNameInDev = 'useTransition';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateTransition();
    },
    useMutableSource: function (source, getSnapshot, subscribe) {
      currentHookNameInDev = 'useMutableSource';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateMutableSource(source, getSnapshot, subscribe);
    },
    useOpaqueIdentifier: function () {
      currentHookNameInDev = 'useOpaqueIdentifier';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateOpaqueIdentifier();
    },
    unstable_isNewReconciler: enableNewReconciler
  };
  InvalidNestedHooksDispatcherOnRerenderInDEV = {
    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 rerenderReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateRef();
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher$1.current;
      ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return rerenderState(initialState);
      } finally {
        ReactCurrentDispatcher$1.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateDebugValue();
    },
    useDeferredValue: function (value) {
      currentHookNameInDev = 'useDeferredValue';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return rerenderDeferredValue(value);
    },
    useTransition: function () {
      currentHookNameInDev = 'useTransition';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return rerenderTransition();
    },
    useMutableSource: function (source, getSnapshot, subscribe) {
      currentHookNameInDev = 'useMutableSource';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateMutableSource(source, getSnapshot, subscribe);
    },
    useOpaqueIdentifier: function () {
      currentHookNameInDev = 'useOpaqueIdentifier';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return rerenderOpaqueIdentifier();
    },
    unstable_isNewReconciler: enableNewReconciler
  };
}

var now$1 = Scheduler.unstable_now;
var commitTime = 0;
var profilerStartTime = -1;

function getCommitTime() {
  return commitTime;
}

function recordCommitTime() {

  commitTime = now$1();
}

function startProfilerTimer(fiber) {

  profilerStartTime = now$1();

  if (fiber.actualStartTime < 0) {
    fiber.actualStartTime = now$1();
  }
}

function stopProfilerTimerIfRunning(fiber) {

  profilerStartTime = -1;
}

function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {

  if (profilerStartTime >= 0) {
    var elapsedTime = now$1() - profilerStartTime;
    fiber.actualDuration += elapsedTime;

    if (overrideBaseTime) {
      fiber.selfBaseDuration = elapsedTime;
    }

    profilerStartTime = -1;
  }
}

function transferActualDuration(fiber) {
  // Transfer time spent rendering these children so we don't lose it
  // after we rerender. This is used as a helper in special cases
  // where we should count the work of multiple passes.
  var child = fiber.child;

  while (child) {
    fiber.actualDuration += child.actualDuration;
    child = child.sibling;
  }
}

var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
var didReceiveUpdate = false;
var didWarnAboutBadClass;
var didWarnAboutModulePatternComponent;
var didWarnAboutContextTypeOnFunctionComponent;
var didWarnAboutGetDerivedStateOnFunctionComponent;
var didWarnAboutFunctionRefs;
var didWarnAboutReassigningProps;
var didWarnAboutRevealOrder;
var didWarnAboutTailOptions;

{
  didWarnAboutBadClass = {};
  didWarnAboutModulePatternComponent = {};
  didWarnAboutContextTypeOnFunctionComponent = {};
  didWarnAboutGetDerivedStateOnFunctionComponent = {};
  didWarnAboutFunctionRefs = {};
  didWarnAboutReassigningProps = false;
  didWarnAboutRevealOrder = {};
  didWarnAboutTailOptions = {};
}

function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
  if (current === 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, renderLanes);
  } 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.child, nextChildren, renderLanes);
  }
}

function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {
  // 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.child, null, renderLanes); // 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
  // identities match.

  workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
}

function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
  // 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));
      }
    }
  }

  var render = Component.render;
  var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent

  var nextChildren;
  prepareToReadContext(workInProgress, renderLanes);

  {
    ReactCurrentOwner$1.current = workInProgress;
    setIsRendering(true);
    nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);

    if ( workInProgress.mode & StrictMode) {
      disableLogs();

      try {
        nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
      } finally {
        reenableLogs();
      }
    }

    setIsRendering(false);
  }

  if (current !== null && !didReceiveUpdate) {
    bailoutHooks(current, workInProgress, renderLanes);
    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  } // React DevTools reads this flag.


  workInProgress.flags |= PerformedWork;
  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  return workInProgress.child;
}

function updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
  if (current === 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, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);
    }

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

    var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);
    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));
    }
  }

  var currentChild = current.child; // This is always exactly one child

  if (!includesSomeLane(updateLanes, renderLanes)) {
    // 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.ref === workInProgress.ref) {
      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
    }
  } // React DevTools reads this flag.


  workInProgress.flags |= PerformedWork;
  var newChild = createWorkInProgress(currentChild, nextProps);
  newChild.ref = workInProgress.ref;
  newChild.return = workInProgress;
  workInProgress.child = newChild;
  return newChild;
}

function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
  // 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.
        var lazyComponent = outerMemoType;
        var payload = lazyComponent._payload;
        var init = lazyComponent._init;

        try {
          outerMemoType = init(payload);
        } catch (x) {
          outerMemoType = null;
        } // Inner propTypes will be validated in the function component path.


        var outerPropTypes = outerMemoType && outerMemoType.propTypes;

        if (outerPropTypes) {
          checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
          'prop', getComponentName(outerMemoType));
        }
      }
    }
  }

  if (current !== null) {
    var prevProps = current.memoizedProps;

    if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
     workInProgress.type === current.type )) {
      didReceiveUpdate = false;

      if (!includesSomeLane(renderLanes, updateLanes)) {
        // The pending lanes were cleared at the beginning of beginWork. We're
        // about to bail out, but there might be other lanes that weren't
        // included in the current render. Usually, the priority level of the
        // remaining updates is accumlated during the evaluation of the
        // component (i.e. when processing the update queue). But since since
        // we're bailing out early *without* evaluating the component, we need
        // to account for it here, too. Reset to the value of the current fiber.
        // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
        // because a MemoComponent fiber does not have hooks or an update queue;
        // rather, it wraps around an inner component, which may or may not
        // contains hooks.
        // TODO: Move the reset at in beginWork out of the common path so that
        // this is no longer necessary.
        workInProgress.lanes = current.lanes;
        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
      } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
        // This is a special case that only exists for legacy mode.
        // See https://github.com/facebook/react/pull/19216.
        didReceiveUpdate = true;
      }
    }
  }

  return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
}

function updateOffscreenComponent(current, workInProgress, renderLanes) {
  var nextProps = workInProgress.pendingProps;
  var nextChildren = nextProps.children;
  var prevState = current !== null ? current.memoizedState : null;

  if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {
    if ((workInProgress.mode & ConcurrentMode) === NoMode) {
      // In legacy sync mode, don't defer the subtree. Render it now.
      // TODO: Figure out what we should do in Blocking mode.
      var nextState = {
        baseLanes: NoLanes
      };
      workInProgress.memoizedState = nextState;
      pushRenderLanes(workInProgress, renderLanes);
    } else if (!includesSomeLane(renderLanes, OffscreenLane)) {
      var nextBaseLanes;

      if (prevState !== null) {
        var prevBaseLanes = prevState.baseLanes;
        nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);
      } else {
        nextBaseLanes = renderLanes;
      } // Schedule this fiber to re-render at offscreen priority. Then bailout.


      {
        markSpawnedWork(OffscreenLane);
      }

      workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);
      var _nextState = {
        baseLanes: nextBaseLanes
      };
      workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway
      // to avoid a push/pop misalignment.

      pushRenderLanes(workInProgress, nextBaseLanes);
      return null;
    } else {
      // Rendering at offscreen, so we can clear the base lanes.
      var _nextState2 = {
        baseLanes: NoLanes
      };
      workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.

      var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;
      pushRenderLanes(workInProgress, subtreeRenderLanes);
    }
  } else {
    var _subtreeRenderLanes;

    if (prevState !== null) {
      _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state

      workInProgress.memoizedState = null;
    } else {
      // We weren't previously hidden, and we still aren't, so there's nothing
      // special to do. Need to push to the stack regardless, though, to avoid
      // a push/pop misalignment.
      _subtreeRenderLanes = renderLanes;
    }

    pushRenderLanes(workInProgress, _subtreeRenderLanes);
  }

  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  return workInProgress.child;
} // Note: These happen to have identical begin phases, for now. We shouldn't hold
// ourselves to this constraint, though. If the behavior diverges, we should
// fork the function.


var updateLegacyHiddenComponent = updateOffscreenComponent;

function updateFragment(current, workInProgress, renderLanes) {
  var nextChildren = workInProgress.pendingProps;
  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  return workInProgress.child;
}

function updateMode(current, workInProgress, renderLanes) {
  var nextChildren = workInProgress.pendingProps.children;
  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  return workInProgress.child;
}

function updateProfiler(current, workInProgress, renderLanes) {
  {
    workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.
    // These are reset during render to allow the DevTools commit hook a chance to read them,

    var stateNode = workInProgress.stateNode;
    stateNode.effectDuration = 0;
    stateNode.passiveEffectDuration = 0;
  }

  var nextProps = workInProgress.pendingProps;
  var nextChildren = nextProps.children;
  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  return workInProgress.child;
}

function markRef(current, workInProgress) {
  var ref = workInProgress.ref;

  if (current === null && ref !== null || current !== null && current.ref !== ref) {
    // Schedule a Ref effect
    workInProgress.flags |= Ref;
  }
}

function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
  {
    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));
      }
    }
  }

  var context;

  {
    var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
    context = getMaskedContext(workInProgress, unmaskedContext);
  }

  var nextChildren;
  prepareToReadContext(workInProgress, renderLanes);

  {
    ReactCurrentOwner$1.current = workInProgress;
    setIsRendering(true);
    nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);

    if ( workInProgress.mode & StrictMode) {
      disableLogs();

      try {
        nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
      } finally {
        reenableLogs();
      }
    }

    setIsRendering(false);
  }

  if (current !== null && !didReceiveUpdate) {
    bailoutHooks(current, workInProgress, renderLanes);
    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  } // React DevTools reads this flag.


  workInProgress.flags |= PerformedWork;
  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  return workInProgress.child;
}

function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
  {
    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));
      }
    }
  } // 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;

  if (isContextProvider(Component)) {
    hasContext = true;
    pushContextProvider(workInProgress);
  } else {
    hasContext = false;
  }

  prepareToReadContext(workInProgress, renderLanes);
  var instance = workInProgress.stateNode;
  var shouldUpdate;

  if (instance === null) {
    if (current !== null) {
      // A class component without an instance 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.flags |= Placement;
    } // In the initial pass we might need to construct the instance.


    constructClassInstance(workInProgress, Component, nextProps);
    mountClassInstance(workInProgress, Component, nextProps, renderLanes);
    shouldUpdate = true;
  } else if (current === null) {
    // In a resume, we'll already have an instance we can reuse.
    shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);
  } else {
    shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);
  }

  var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);

  {
    var inst = workInProgress.stateNode;

    if (shouldUpdate && inst.props !== nextProps) {
      if (!didWarnAboutReassigningProps) {
        error('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');
      }

      didWarnAboutReassigningProps = true;
    }
  }

  return nextUnitOfWork;
}

function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {
  // Refs should update even if shouldComponentUpdate returns false
  markRef(current, workInProgress);
  var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;

  if (!shouldUpdate && !didCaptureError) {
    // Context providers should defer to sCU for rendering
    if (hasContext) {
      invalidateContextProvider(workInProgress, Component, false);
    }

    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  }

  var instance = workInProgress.stateNode; // Rerender

  ReactCurrentOwner$1.current = workInProgress;
  var nextChildren;

  if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
    // If we captured an error, but getDerivedStateFromError 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;

    {
      stopProfilerTimerIfRunning();
    }
  } else {
    {
      setIsRendering(true);
      nextChildren = instance.render();

      if ( workInProgress.mode & StrictMode) {
        disableLogs();

        try {
          instance.render();
        } finally {
          reenableLogs();
        }
      }

      setIsRendering(false);
    }
  } // React DevTools reads this flag.


  workInProgress.flags |= PerformedWork;

  if (current !== 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, workInProgress, nextChildren, renderLanes);
  } else {
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  } // 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, workInProgress, renderLanes) {
  pushHostRootContext(workInProgress);
  var updateQueue = workInProgress.updateQueue;

  if (!(current !== null && updateQueue !== null)) {
    {
      throw 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;
  cloneUpdateQueue(current, workInProgress);
  processUpdateQueue(workInProgress, nextProps, null, renderLanes);
  var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
  // being called "element".

  var nextChildren = nextState.element;

  if (nextChildren === prevChildren) {
    resetHydrationState();
    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
  }

  var root = workInProgress.stateNode;

  if (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.
    {
      var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;

      if (mutableSourceEagerHydrationData != null) {
        for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {
          var mutableSource = mutableSourceEagerHydrationData[i];
          var version = mutableSourceEagerHydrationData[i + 1];
          setWorkInProgressVersion(mutableSource, version);
        }
      }
    }

    var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
    workInProgress.child = child;
    var node = child;

    while (node) {
      // Mark each child as hydrating. This is a fast path to know whether this
      // tree is part of a hydrating tree. This is used to determine if a child
      // node has fully mounted yet, and for scheduling event replaying.
      // Conceptually this is similar to Placement in that a new subtree is
      // inserted into the React tree here. It just happens to not need DOM
      // mutations because it already exists.
      node.flags = node.flags & ~Placement | Hydrating;
      node = node.sibling;
    }
  } else {
    // Otherwise reset hydration state in case we aborted and resumed another
    // root.
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
    resetHydrationState();
  }

  return workInProgress.child;
}

function updateHostComponent(current, workInProgress, renderLanes) {
  pushHostContext(workInProgress);

  if (current === null) {
    tryToClaimNextHydratableInstance(workInProgress);
  }

  var type = workInProgress.type;
  var nextProps = workInProgress.pendingProps;
  var prevProps = current !== null ? current.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 has 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.flags |= ContentReset;
  }

  markRef(current, workInProgress);
  reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  return workInProgress.child;
}

function updateHostText(current, workInProgress) {
  if (current === 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, updateLanes, renderLanes) {
  if (_current !== null) {
    // A 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.flags |= Placement;
  }

  var props = workInProgress.pendingProps;
  var lazyComponent = elementType;
  var payload = lazyComponent._payload;
  var init = lazyComponent._init;
  var Component = init(payload); // Store the unwrapped component in the type.

  workInProgress.type = Component;
  var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
  var resolvedProps = resolveDefaultProps(Component, props);
  var child;

  switch (resolvedTag) {
    case FunctionComponent:
      {
        {
          validateFunctionComponentInDev(workInProgress, Component);
          workInProgress.type = Component = resolveFunctionForHotReloading(Component);
        }

        child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);
        return child;
      }

    case ClassComponent:
      {
        {
          workInProgress.type = Component = resolveClassForHotReloading(Component);
        }

        child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);
        return child;
      }

    case ForwardRef:
      {
        {
          workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
        }

        child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);
        return child;
      }

    case MemoComponent:
      {
        {
          if (workInProgress.type !== workInProgress.elementType) {
            var outerPropTypes = Component.propTypes;

            if (outerPropTypes) {
              checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
              'prop', getComponentName(Component));
            }
          }
        }

        child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
        updateLanes, renderLanes);
        return child;
      }
  }

  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.


  {
    {
      throw Error( "Element type is invalid. Received a promise that resolves to: " + Component + ". Lazy element type must resolve to a class or function." + hint );
    }
  }
}

function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
  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.flags |= 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;

  if (isContextProvider(Component)) {
    hasContext = true;
    pushContextProvider(workInProgress);
  } else {
    hasContext = false;
  }

  prepareToReadContext(workInProgress, renderLanes);
  constructClassInstance(workInProgress, Component, nextProps);
  mountClassInstance(workInProgress, Component, nextProps, renderLanes);
  return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
}

function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
  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.flags |= Placement;
  }

  var props = workInProgress.pendingProps;
  var context;

  {
    var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
    context = getMaskedContext(workInProgress, unmaskedContext);
  }

  prepareToReadContext(workInProgress, renderLanes);
  var value;

  {
    if (Component.prototype && typeof Component.prototype.render === 'function') {
      var componentName = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutBadClass[componentName]) {
        error("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);
    }

    setIsRendering(true);
    ReactCurrentOwner$1.current = workInProgress;
    value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
    setIsRendering(false);
  } // React DevTools reads this flag.


  workInProgress.flags |= PerformedWork;

  {
    // Support for module components is deprecated and is removed behind a flag.
    // Whether or not it would crash later, we want to show a good message in DEV first.
    if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
      var _componentName = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutModulePatternComponent[_componentName]) {
        error('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;
      }
    }
  }

  if ( // Run these checks in production only if the flag is off.
  // Eventually we'll delete this branch altogether.
   typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
    {
      var _componentName2 = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutModulePatternComponent[_componentName2]) {
        error('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.', _componentName2, _componentName2, _componentName2);

        didWarnAboutModulePatternComponent[_componentName2] = true;
      }
    } // Proceed under the assumption that this is a class instance


    workInProgress.tag = ClassComponent; // Throw out any hooks that were used.

    workInProgress.memoizedState = null;
    workInProgress.updateQueue = null; // 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;
    initializeUpdateQueue(workInProgress);
    var getDerivedStateFromProps = Component.getDerivedStateFromProps;

    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
    }

    adoptClassInstance(workInProgress, value);
    mountClassInstance(workInProgress, Component, props, renderLanes);
    return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
  } else {
    // Proceed under the assumption that this is a function component
    workInProgress.tag = FunctionComponent;

    {

      if ( workInProgress.mode & StrictMode) {
        disableLogs();

        try {
          value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
        } finally {
          reenableLogs();
        }
      }
    }

    reconcileChildren(null, workInProgress, value, renderLanes);

    {
      validateFunctionComponentInDev(workInProgress, Component);
    }

    return workInProgress.child;
  }
}

function validateFunctionComponentInDev(workInProgress, Component) {
  {
    if (Component) {
      if (Component.childContextTypes) {
        error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
      }
    }

    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;

        error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
      }
    }

    if (typeof Component.getDerivedStateFromProps === 'function') {
      var _componentName3 = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
        error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);

        didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
      }
    }

    if (typeof Component.contextType === 'object' && Component.contextType !== null) {
      var _componentName4 = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
        error('%s: Function components do not support contextType.', _componentName4);

        didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
      }
    }
  }
}

var SUSPENDED_MARKER = {
  dehydrated: null,
  retryLane: NoLane
};

function mountSuspenseOffscreenState(renderLanes) {
  return {
    baseLanes: renderLanes
  };
}

function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {
  return {
    baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)
  };
} // TODO: Probably should inline this back


function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
  // If we're already showing a fallback, there are cases where we need to
  // remain on that fallback regardless of whether the content has resolved.
  // For example, SuspenseList coordinates when nested content appears.
  if (current !== null) {
    var suspenseState = current.memoizedState;

    if (suspenseState === null) {
      // Currently showing content. Don't hide it, even if ForceSuspenseFallack
      // is true. More precise name might be "ForceRemainSuspenseFallback".
      // Note: This is a factoring smell. Can't remain on a fallback if there's
      // no fallback to remain on.
      return false;
    }
  } // Not currently showing content. Consult the Suspense context.


  return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
}

function getRemainingWorkInPrimaryTree(current, renderLanes) {
  // TODO: Should not remove render lanes that were pinged during this render
  return removeLanes(current.childLanes, renderLanes);
}

function updateSuspenseComponent(current, workInProgress, renderLanes) {
  var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.

  {
    if (shouldSuspend(workInProgress)) {
      workInProgress.flags |= DidCapture;
    }
  }

  var suspenseContext = suspenseStackCursor.current;
  var showFallback = false;
  var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;

  if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
    // Something in this boundary's subtree already suspended. Switch to
    // rendering the fallback children.
    showFallback = true;
    workInProgress.flags &= ~DidCapture;
  } else {
    // Attempting the main content
    if (current === null || current.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); // OK, the next part is confusing. We're about to reconcile the Suspense
  // boundary's children. This involves some custom reconcilation logic. Two
  // main reasons this is so complicated.
  //
  // First, Legacy Mode has different semantics for backwards compatibility. The
  // primary tree will commit in an inconsistent state, so when we do the
  // second pass to render the fallback, we do some exceedingly, uh, clever
  // hacks to make that not totally break. Like transferring effects and
  // deletions from hidden tree. In Concurrent Mode, it's much simpler,
  // because we bailout on the primary tree completely and leave it in its old
  // state, no effects. Same as what we do for Offscreen (except that
  // Offscreen doesn't have the first render pass).
  //
  // Second is hydration. During hydration, the Suspense fiber has a slightly
  // different layout, where the child points to a dehydrated fragment, which
  // contains the DOM rendered by the server.
  //
  // Third, even if you set all that aside, Suspense is like error boundaries in
  // that we first we try to render one tree, and if that fails, we render again
  // and switch to a different tree. Like a try/catch block. So we have to track
  // which branch we're currently rendering. Ideally we would model this using
  // a stack.

  if (current === null) {
    // Initial mount
    // 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 been a dehydrated suspense component.
    }

    var nextPrimaryChildren = nextProps.children;
    var nextFallbackChildren = nextProps.fallback;

    if (showFallback) {
      var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
      var primaryChildFragment = workInProgress.child;
      primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
      workInProgress.memoizedState = SUSPENDED_MARKER;
      return fallbackFragment;
    } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {
      // This is a CPU-bound tree. Skip this tree and show a placeholder to
      // unblock the surrounding content. Then immediately retry after the
      // initial commit.
      var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);

      var _primaryChildFragment = workInProgress.child;
      _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
      workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to
      // get it started back up to attempt the next item. While in terms of
      // priority this work has the same priority as this current render, it's
      // not part of the same transition once the transition has committed. If
      // it's sync, we still want to yield so that it can be painted.
      // Conceptually, this is really the same as pinging. We can use any
      // RetryLane even if it's the one currently rendering since we're leaving
      // it behind on this node.

      workInProgress.lanes = SomeRetryLane;

      {
        markSpawnedWork(SomeRetryLane);
      }

      return _fallbackFragment;
    } else {
      return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);
    }
  } else {
    // This is an update.
    // If the current fiber has a SuspenseState, that means it's already showing
    // a fallback.
    var prevState = current.memoizedState;

    if (prevState !== null) {

      if (showFallback) {
        var _nextFallbackChildren2 = nextProps.fallback;
        var _nextPrimaryChildren2 = nextProps.children;

        var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);

        var _primaryChildFragment3 = workInProgress.child;
        var prevOffscreenState = current.child.memoizedState;
        _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);
        _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);
        workInProgress.memoizedState = SUSPENDED_MARKER;
        return _fallbackChildFragment;
      } else {
        var _nextPrimaryChildren3 = nextProps.children;

        var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);

        workInProgress.memoizedState = null;
        return _primaryChildFragment4;
      }
    } else {
      // The current tree is not already showing a fallback.
      if (showFallback) {
        // Timed out.
        var _nextFallbackChildren3 = nextProps.fallback;
        var _nextPrimaryChildren4 = nextProps.children;

        var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);

        var _primaryChildFragment5 = workInProgress.child;
        var _prevOffscreenState = current.child.memoizedState;
        _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);
        _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the
        // fallback children.

        workInProgress.memoizedState = SUSPENDED_MARKER;
        return _fallbackChildFragment2;
      } else {
        // Still haven't timed out. Continue rendering the children, like we
        // normally do.
        var _nextPrimaryChildren5 = nextProps.children;

        var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);

        workInProgress.memoizedState = null;
        return _primaryChildFragment6;
      }
    }
  }
}

function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {
  var mode = workInProgress.mode;
  var primaryChildProps = {
    mode: 'visible',
    children: primaryChildren
  };
  var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);
  primaryChildFragment.return = workInProgress;
  workInProgress.child = primaryChildFragment;
  return primaryChildFragment;
}

function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {
  var mode = workInProgress.mode;
  var progressedPrimaryFragment = workInProgress.child;
  var primaryChildProps = {
    mode: 'hidden',
    children: primaryChildren
  };
  var primaryChildFragment;
  var fallbackChildFragment;

  if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {
    // In legacy mode, we commit the primary tree as if it successfully
    // completed, even though it's in an inconsistent state.
    primaryChildFragment = progressedPrimaryFragment;
    primaryChildFragment.childLanes = NoLanes;
    primaryChildFragment.pendingProps = primaryChildProps;

    if ( workInProgress.mode & ProfileMode) {
      // Reset the durations from the first pass so they aren't included in the
      // final amounts. This seems counterintuitive, since we're intentionally
      // not measuring part of the render phase, but this makes it match what we
      // do in Concurrent Mode.
      primaryChildFragment.actualDuration = 0;
      primaryChildFragment.actualStartTime = -1;
      primaryChildFragment.selfBaseDuration = 0;
      primaryChildFragment.treeBaseDuration = 0;
    }

    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
  } else {
    primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);
    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
  }

  primaryChildFragment.return = workInProgress;
  fallbackChildFragment.return = workInProgress;
  primaryChildFragment.sibling = fallbackChildFragment;
  workInProgress.child = primaryChildFragment;
  return fallbackChildFragment;
}

function createWorkInProgressOffscreenFiber(current, offscreenProps) {
  // The props argument to `createWorkInProgress` is `any` typed, so we use this
  // wrapper function to constrain it.
  return createWorkInProgress(current, offscreenProps);
}

function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {
  var currentPrimaryChildFragment = current.child;
  var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
  var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
    mode: 'visible',
    children: primaryChildren
  });

  if ((workInProgress.mode & BlockingMode) === NoMode) {
    primaryChildFragment.lanes = renderLanes;
  }

  primaryChildFragment.return = workInProgress;
  primaryChildFragment.sibling = null;

  if (currentFallbackChildFragment !== null) {
    // Delete the fallback child fragment
    currentFallbackChildFragment.nextEffect = null;
    currentFallbackChildFragment.flags = Deletion;
    workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
  }

  workInProgress.child = primaryChildFragment;
  return primaryChildFragment;
}

function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
  var mode = workInProgress.mode;
  var currentPrimaryChildFragment = current.child;
  var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
  var primaryChildProps = {
    mode: 'hidden',
    children: primaryChildren
  };
  var primaryChildFragment;

  if ( // In legacy mode, we commit the primary tree as if it successfully
  // completed, even though it's in an inconsistent state.
  (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
  // already cloned. In legacy mode, the only case where this isn't true is
  // when DevTools forces us to display a fallback; we skip the first render
  // pass entirely and go straight to rendering the fallback. (In Concurrent
  // Mode, SuspenseList can also trigger this scenario, but this is a legacy-
  // only codepath.)
  workInProgress.child !== currentPrimaryChildFragment) {
    var progressedPrimaryFragment = workInProgress.child;
    primaryChildFragment = progressedPrimaryFragment;
    primaryChildFragment.childLanes = NoLanes;
    primaryChildFragment.pendingProps = primaryChildProps;

    if ( workInProgress.mode & ProfileMode) {
      // Reset the durations from the first pass so they aren't included in the
      // final amounts. This seems counterintuitive, since we're intentionally
      // not measuring part of the render phase, but this makes it match what we
      // do in Concurrent Mode.
      primaryChildFragment.actualDuration = 0;
      primaryChildFragment.actualStartTime = -1;
      primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
      primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
    } // The fallback fiber was added as a deletion effect during the first pass.
    // However, since we're going to remain on the fallback, we no longer want
    // to delete it. So we need to remove it from the list. Deletions are stored
    // on the same list as effects. We want to keep the effects from the primary
    // tree. So we copy the primary child fragment's effect list, which does not
    // include the fallback deletion effect.


    var progressedLastEffect = primaryChildFragment.lastEffect;

    if (progressedLastEffect !== null) {
      workInProgress.firstEffect = primaryChildFragment.firstEffect;
      workInProgress.lastEffect = progressedLastEffect;
      progressedLastEffect.nextEffect = null;
    } else {
      // TODO: Reset this somewhere else? Lol legacy mode is so weird.
      workInProgress.firstEffect = workInProgress.lastEffect = null;
    }
  } else {
    primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);
  }

  var fallbackChildFragment;

  if (currentFallbackChildFragment !== null) {
    fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
  } else {
    fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already
    // mounted but this is a new fiber.

    fallbackChildFragment.flags |= Placement;
  }

  fallbackChildFragment.return = workInProgress;
  primaryChildFragment.return = workInProgress;
  primaryChildFragment.sibling = fallbackChildFragment;
  workInProgress.child = primaryChildFragment;
  return fallbackChildFragment;
}

function scheduleWorkOnFiber(fiber, renderLanes) {
  fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
  var alternate = fiber.alternate;

  if (alternate !== null) {
    alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
  }

  scheduleWorkOnParentPath(fiber.return, renderLanes);
}

function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
  // 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) {
        scheduleWorkOnFiber(node, renderLanes);
      }
    } else if (node.tag === SuspenseListComponent) {
      // If the tail is hidden there might not be an Suspense boundaries
      // to schedule work on. In this case we have to schedule it on the
      // list itself.
      // We don't have to traverse to the children of the list since
      // the list will propagate the change when it rerenders.
      scheduleWorkOnFiber(node, renderLanes);
    } 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':
            {
              error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());

              break;
            }

          case 'forward':
          case 'backward':
            {
              error('"%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:
            error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);

            break;
        }
      } else {
        error('%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;

        error('"%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;

        error('<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';

      error('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 {
          error('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, lastEffectBeforeRendering) {
  var renderState = workInProgress.memoizedState;

  if (renderState === null) {
    workInProgress.memoizedState = {
      isBackwards: isBackwards,
      rendering: null,
      renderingStartTime: 0,
      last: lastContentRow,
      tail: tail,
      tailMode: tailMode,
      lastEffect: lastEffectBeforeRendering
    };
  } else {
    // We can reuse the existing object from previous renders.
    renderState.isBackwards = isBackwards;
    renderState.rendering = null;
    renderState.renderingStartTime = 0;
    renderState.last = lastContentRow;
    renderState.tail = tail;
    renderState.tailMode = tailMode;
    renderState.lastEffect = lastEffectBeforeRendering;
  }
} // 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, workInProgress, renderLanes) {
  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, workInProgress, newChildren, renderLanes);
  var suspenseContext = suspenseStackCursor.current;
  var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);

  if (shouldForceFallback) {
    suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
    workInProgress.flags |= DidCapture;
  } else {
    var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;

    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, renderLanes);
    }

    suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
  }

  pushSuspenseContext(workInProgress, suspenseContext);

  if ((workInProgress.mode & BlockingMode) === NoMode) {
    // In legacy 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;

          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, workInProgress.lastEffect);
          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, workInProgress.lastEffect);
          break;
        }

      case 'together':
        {
          initSuspenseListRenderState(workInProgress, false, // isBackwards
          null, // tail
          null, // last
          undefined, workInProgress.lastEffect);
          break;
        }

      default:
        {
          // The default reveal order is the same as not having
          // a boundary.
          workInProgress.memoizedState = null;
        }
    }
  }

  return workInProgress.child;
}

function updatePortalComponent(current, workInProgress, renderLanes) {
  pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  var nextChildren = workInProgress.pendingProps;

  if (current === 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, renderLanes);
  } else {
    reconcileChildren(current, workInProgress, nextChildren, renderLanes);
  }

  return workInProgress.child;
}

var hasWarnedAboutUsingNoValuePropOnContextProvider = false;

function updateContextProvider(current, workInProgress, renderLanes) {
  var providerType = workInProgress.type;
  var context = providerType._context;
  var newProps = workInProgress.pendingProps;
  var oldProps = workInProgress.memoizedProps;
  var newValue = newProps.value;

  {
    if (!('value' in newProps)) {
      if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
        hasWarnedAboutUsingNoValuePropOnContextProvider = true;

        error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');
      }
    }

    var providerPropTypes = workInProgress.type.propTypes;

    if (providerPropTypes) {
      checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');
    }
  }

  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, workInProgress, renderLanes);
      }
    } else {
      // The context value changed. Search for matching consumers and schedule
      // them to update.
      propagateContextChange(workInProgress, context, changedBits, renderLanes);
    }
  }

  var newChildren = newProps.children;
  reconcileChildren(current, workInProgress, newChildren, renderLanes);
  return workInProgress.child;
}

var hasWarnedAboutUsingContextAsConsumer = false;

function updateContextConsumer(current, workInProgress, renderLanes) {
  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;

          error('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;

  {
    if (typeof render !== 'function') {
      error('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.');
    }
  }

  prepareToReadContext(workInProgress, renderLanes);
  var newValue = readContext(context, newProps.unstable_observedBits);
  var newChildren;

  {
    ReactCurrentOwner$1.current = workInProgress;
    setIsRendering(true);
    newChildren = render(newValue);
    setIsRendering(false);
  } // React DevTools reads this flag.


  workInProgress.flags |= PerformedWork;
  reconcileChildren(current, workInProgress, newChildren, renderLanes);
  return workInProgress.child;
}

function markWorkInProgressReceivedUpdate() {
  didReceiveUpdate = true;
}

function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
  if (current !== null) {
    // Reuse previous dependencies
    workInProgress.dependencies = current.dependencies;
  }

  {
    // Don't update "base" render times for bailouts.
    stopProfilerTimerIfRunning();
  }

  markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.

  if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
    // 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, workInProgress);
    return workInProgress.child;
  }
}

function remountFiber(current, 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.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;
      returnFiber.lastEffect = current;
    } else {
      returnFiber.firstEffect = returnFiber.lastEffect = current;
    }

    current.nextEffect = null;
    current.flags = Deletion;
    newWorkInProgress.flags |= Placement; // Restart work from the new fiber.

    return newWorkInProgress;
  }
}

function beginWork(current, workInProgress, renderLanes) {
  var updateLanes = workInProgress.lanes;

  {
    if (workInProgress._debugNeedsRemount && current !== null) {
      // This will restart the begin phase with a new fiber.
      return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
    }
  }

  if (current !== null) {
    var oldProps = current.memoizedProps;
    var newProps = workInProgress.pendingProps;

    if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
     workInProgress.type !== current.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 (!includesSomeLane(renderLanes, updateLanes)) {
      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);
          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:
          {
            // Profiler should only call onRender when one of its descendants actually rendered.
            var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);

            if (hasChildWork) {
              workInProgress.flags |= Update;
            } // Reset effect durations for the next eventual effect phase.
            // These are reset during render to allow the DevTools commit hook a chance to read them,


            var stateNode = workInProgress.stateNode;
            stateNode.effectDuration = 0;
            stateNode.passiveEffectDuration = 0;
          }

          break;

        case SuspenseComponent:
          {
            var state = workInProgress.memoizedState;

            if (state !== null) {
              // whether to retry the primary children, or to skip over it and
              // go straight to the fallback. Check the priority of the primary
              // child fragment.


              var primaryChildFragment = workInProgress.child;
              var primaryChildLanes = primaryChildFragment.childLanes;

              if (includesSomeLane(renderLanes, primaryChildLanes)) {
                // The primary children have pending work. Use the normal path
                // to attempt to render the primary children again.
                return updateSuspenseComponent(current, workInProgress, renderLanes);
              } else {
                // The primary child fragment does not have pending work marked
                // on it
                pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
                // priority. Bailout.

                var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);

                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 SuspenseListComponent:
          {
            var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;

            var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);

            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, workInProgress, renderLanes);
              } // 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.flags |= 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;
              renderState.lastEffect = 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;
            }
          }

        case OffscreenComponent:
        case LegacyHiddenComponent:
          {
            // Need to check if the tree still needs to be deferred. This is
            // almost identical to the logic used in the normal update path,
            // so we'll just enter that. The only difference is we'll bail out
            // at the next level instead of this one, because the child props
            // have not changed. Which is fine.
            // TODO: Probably should refactor `beginWork` to split the bailout
            // path from the normal path. I'm tempted to do a labeled break here
            // but I won't :)
            workInProgress.lanes = NoLanes;
            return updateOffscreenComponent(current, workInProgress, renderLanes);
          }
      }

      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
    } else {
      if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
        // This is a special case that only exists for legacy mode.
        // See https://github.com/facebook/react/pull/19216.
        didReceiveUpdate = true;
      } else {
        // An update was scheduled on this fiber, but there are no new props
        // nor legacy context. Set this to false. If an update queue or context
        // consumer produces a changed value, it will set this to true. Otherwise,
        // the component will assume the children have not changed and bail out.
        didReceiveUpdate = false;
      }
    }
  } else {
    didReceiveUpdate = false;
  } // Before entering the begin phase, clear pending update priority.
  // TODO: This assumes that we're about to evaluate the component and process
  // the update queue. However, there's an exception: SimpleMemoComponent
  // sometimes bails out later in the begin phase. This indicates that we should
  // move this assignment out of the common path and into each branch.


  workInProgress.lanes = NoLanes;

  switch (workInProgress.tag) {
    case IndeterminateComponent:
      {
        return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
      }

    case LazyComponent:
      {
        var elementType = workInProgress.elementType;
        return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);
      }

    case FunctionComponent:
      {
        var _Component = workInProgress.type;
        var unresolvedProps = workInProgress.pendingProps;
        var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
        return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);
      }

    case ClassComponent:
      {
        var _Component2 = workInProgress.type;
        var _unresolvedProps = workInProgress.pendingProps;

        var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);

        return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);
      }

    case HostRoot:
      return updateHostRoot(current, workInProgress, renderLanes);

    case HostComponent:
      return updateHostComponent(current, workInProgress, renderLanes);

    case HostText:
      return updateHostText(current, workInProgress);

    case SuspenseComponent:
      return updateSuspenseComponent(current, workInProgress, renderLanes);

    case HostPortal:
      return updatePortalComponent(current, workInProgress, renderLanes);

    case ForwardRef:
      {
        var type = workInProgress.type;
        var _unresolvedProps2 = workInProgress.pendingProps;

        var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);

        return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);
      }

    case Fragment:
      return updateFragment(current, workInProgress, renderLanes);

    case Mode:
      return updateMode(current, workInProgress, renderLanes);

    case Profiler:
      return updateProfiler(current, workInProgress, renderLanes);

    case ContextProvider:
      return updateContextProvider(current, workInProgress, renderLanes);

    case ContextConsumer:
      return updateContextConsumer(current, workInProgress, renderLanes);

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

        _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
        return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);
      }

    case SimpleMemoComponent:
      {
        return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);
      }

    case IncompleteClassComponent:
      {
        var _Component3 = workInProgress.type;
        var _unresolvedProps4 = workInProgress.pendingProps;

        var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);

        return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);
      }

    case SuspenseListComponent:
      {
        return updateSuspenseListComponent(current, workInProgress, renderLanes);
      }

    case FundamentalComponent:
      {

        break;
      }

    case ScopeComponent:
      {

        break;
      }

    case Block:
      {

        break;
      }

    case OffscreenComponent:
      {
        return updateOffscreenComponent(current, workInProgress, renderLanes);
      }

    case LegacyHiddenComponent:
      {
        return updateLegacyHiddenComponent(current, workInProgress, renderLanes);
      }
  }

  {
    {
      throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
    }
  }
}

function markUpdate(workInProgress) {
  // Tag the fiber with an update effect. This turns a Placement into
  // a PlacementAndUpdate.
  workInProgress.flags |= Update;
}

function markRef$1(workInProgress) {
  workInProgress.flags |= Ref;
}

var appendAllChildren;
var updateHostContainer;
var updateHostComponent$1;
var updateHostText$1;

{
  // 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 === HostPortal) ; 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);
    }
  };
}

function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  if (getIsHydrating()) {
    // If we're hydrating, we should consume as many items as we can
    // so we don't leave any behind.
    return;
  }

  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, renderLanes) {
  var newProps = workInProgress.pendingProps;

  switch (workInProgress.tag) {
    case IndeterminateComponent:
    case LazyComponent:
    case SimpleMemoComponent:
    case FunctionComponent:
    case ForwardRef:
    case Fragment:
    case Mode:
    case Profiler:
    case ContextConsumer:
    case MemoComponent:
      return null;

    case ClassComponent:
      {
        var Component = workInProgress.type;

        if (isContextProvider(Component)) {
          popContext(workInProgress);
        }

        return null;
      }

    case HostRoot:
      {
        popHostContainer(workInProgress);
        popTopLevelContextObject(workInProgress);
        resetWorkInProgressVersions();
        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.
          var wasHydrated = popHydrationState(workInProgress);

          if (wasHydrated) {
            // If we hydrated, then we'll need to schedule an update for
            // the commit side-effects on the root.
            markUpdate(workInProgress);
          } else if (!fiberRoot.hydrate) {
            // Schedule an effect to clear this container at the start of the next commit.
            // This handles the case of React rendering into a container with previous children.
            // It's also safe to do for updates too, because current.child would only be null
            // if the previous render was null (so the the container would already be empty).
            workInProgress.flags |= Snapshot;
          }
        }

        updateHostContainer(workInProgress);
        return null;
      }

    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 (current.ref !== workInProgress.ref) {
            markRef$1(workInProgress);
          }
        } else {
          if (!newProps) {
            if (!(workInProgress.stateNode !== null)) {
              {
                throw 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.


            return null;
          }

          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 whether we want to add them 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 need to be applied at the
              // commit-phase we mark this as such.
              markUpdate(workInProgress);
            }
          } else {
            var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
            appendAllChildren(instance, workInProgress, false, false);
            workInProgress.stateNode = instance; // 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(instance, type, newProps, rootContainerInstance)) {
              markUpdate(workInProgress);
            }
          }

          if (workInProgress.ref !== null) {
            // If there is a ref on a host node we need to schedule a callback
            markRef$1(workInProgress);
          }
        }

        return null;
      }

    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') {
            if (!(workInProgress.stateNode !== null)) {
              {
                throw 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 _wasHydrated2 = popHydrationState(workInProgress);

          if (_wasHydrated2) {
            if (prepareToHydrateHostTextInstance(workInProgress)) {
              markUpdate(workInProgress);
            }
          } else {
            workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
          }
        }

        return null;
      }

    case SuspenseComponent:
      {
        popSuspenseContext(workInProgress);
        var nextState = workInProgress.memoizedState;

        if ((workInProgress.flags & DidCapture) !== NoFlags) {
          // Something suspended. Re-render with the fallback children.
          workInProgress.lanes = renderLanes; // Do not reset the effect list.

          if ( (workInProgress.mode & ProfileMode) !== NoMode) {
            transferActualDuration(workInProgress);
          }

          return workInProgress;
        }

        var nextDidTimeout = nextState !== null;
        var prevDidTimeout = false;

        if (current === null) {
          if (workInProgress.memoizedProps.fallback !== undefined) {
            popHydrationState(workInProgress);
          }
        } else {
          var prevState = current.memoizedState;
          prevDidTimeout = prevState !== null;
        }

        if (nextDidTimeout && !prevDidTimeout) {
          // If this subtreee is running in blocking 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 & BlockingMode) !== 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();
            }
          }
        }

        {
          // 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 promise. 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 this
            // is currently timed out, too.
            workInProgress.flags |= Update;
          }
        }

        return null;
      }

    case HostPortal:
      popHostContainer(workInProgress);
      updateHostContainer(workInProgress);

      if (current === null) {
        preparePortalMount(workInProgress.stateNode.containerInfo);
      }

      return null;

    case ContextProvider:
      // Pop provider fiber
      popProvider(workInProgress);
      return null;

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

        return null;
      }

    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.
          return null;
        }

        var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;
        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.flags & DidCapture) === NoFlags);

            if (!cannotBeSuspended) {
              var row = workInProgress.child;

              while (row !== null) {
                var suspended = findFirstSuspended(row);

                if (suspended !== null) {
                  didSuspendAlready = true;
                  workInProgress.flags |= 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.flags |= 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.


                  if (renderState.lastEffect === null) {
                    workInProgress.firstEffect = null;
                  }

                  workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.

                  resetChildFibers(workInProgress, renderLanes); // 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;
              }
            }

            if (renderState.tail !== null && now() > getRenderTargetTime()) {
              // We have already passed our CPU deadline but we still have rows
              // left in the tail. We'll just give up further attempts to render
              // the main content and only render fallbacks.
              workInProgress.flags |= 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. While in terms
              // of priority this work has the same priority as this current render,
              // it's not part of the same transition once the transition has
              // committed. If it's sync, we still want to yield so that it can be
              // painted. Conceptually, this is really the same as pinging.
              // We can use any RetryLane even if it's the one currently rendering
              // since we're leaving it behind on this node.

              workInProgress.lanes = SomeRetryLane;

              {
                markSpawnedWork(SomeRetryLane);
              }
            }
          } 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.flags |= DidCapture;
              didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
              // get lost if this row ends up dropped during a second pass.

              var _newThennables = _suspended.updateQueue;

              if (_newThennables !== null) {
                workInProgress.updateQueue = _newThennables;
                workInProgress.flags |= Update;
              }

              cutOffTailIfNeeded(renderState, true); // This might have been modified.

              if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.
              ) {
                  // We need to delete the row we just rendered.
                  // Reset the effect list to what it was 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 ( // The time it took to render last row is greater than the remaining
            // time we have to render. So rendering one more row would likely
            // exceed it.
            now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {
              // 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.flags |= 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. While in terms
              // of priority this work has the same priority as this current render,
              // it's not part of the same transition once the transition has
              // committed. If it's sync, we still want to yield so that it can be
              // painted. Conceptually, this is really the same as pinging.
              // We can use any RetryLane even if it's the one currently rendering
              // since we're leaving it behind on this node.

              workInProgress.lanes = SomeRetryLane;

              {
                markSpawnedWork(SomeRetryLane);
              }
            }
          }

          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.
          // Pop a row.
          var next = renderState.tail;
          renderState.rendering = next;
          renderState.tail = next.sibling;
          renderState.lastEffect = workInProgress.lastEffect;
          renderState.renderingStartTime = now();
          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;
        }

        return null;
      }

    case FundamentalComponent:
      {

        break;
      }

    case ScopeComponent:
      {

        break;
      }

    case Block:

      break;

    case OffscreenComponent:
    case LegacyHiddenComponent:
      {
        popRenderLanes(workInProgress);

        if (current !== null) {
          var _nextState = workInProgress.memoizedState;
          var _prevState = current.memoizedState;
          var prevIsHidden = _prevState !== null;
          var nextIsHidden = _nextState !== null;

          if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {
            workInProgress.flags |= Update;
          }
        }

        return null;
      }
  }

  {
    {
      throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
    }
  }
}

function unwindWork(workInProgress, renderLanes) {
  switch (workInProgress.tag) {
    case ClassComponent:
      {
        var Component = workInProgress.type;

        if (isContextProvider(Component)) {
          popContext(workInProgress);
        }

        var flags = workInProgress.flags;

        if (flags & ShouldCapture) {
          workInProgress.flags = flags & ~ShouldCapture | DidCapture;

          if ( (workInProgress.mode & ProfileMode) !== NoMode) {
            transferActualDuration(workInProgress);
          }

          return workInProgress;
        }

        return null;
      }

    case HostRoot:
      {
        popHostContainer(workInProgress);
        popTopLevelContextObject(workInProgress);
        resetWorkInProgressVersions();
        var _flags = workInProgress.flags;

        if (!((_flags & DidCapture) === NoFlags)) {
          {
            throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
          }
        }

        workInProgress.flags = _flags & ~ShouldCapture | DidCapture;
        return workInProgress;
      }

    case HostComponent:
      {
        // TODO: popHydrationState
        popHostContext(workInProgress);
        return null;
      }

    case SuspenseComponent:
      {
        popSuspenseContext(workInProgress);

        var _flags2 = workInProgress.flags;

        if (_flags2 & ShouldCapture) {
          workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.

          if ( (workInProgress.mode & ProfileMode) !== NoMode) {
            transferActualDuration(workInProgress);
          }

          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;

    case OffscreenComponent:
    case LegacyHiddenComponent:
      popRenderLanes(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);
        resetWorkInProgressVersions();
        break;
      }

    case HostComponent:
      {
        popHostContext(interruptedWork);
        break;
      }

    case HostPortal:
      popHostContainer(interruptedWork);
      break;

    case SuspenseComponent:
      popSuspenseContext(interruptedWork);
      break;

    case SuspenseListComponent:
      popSuspenseContext(interruptedWork);
      break;

    case ContextProvider:
      popProvider(interruptedWork);
      break;

    case OffscreenComponent:
    case LegacyHiddenComponent:
      popRenderLanes(interruptedWork);
      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(boundary, errorInfo) {
  return true;
}

function logCapturedError(boundary, errorInfo) {
  try {
    var logError = showErrorDialog(boundary, errorInfo); // 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 = errorInfo.value;

    if (true) {
      var source = errorInfo.source;
      var stack = errorInfo.stack;
      var componentStack = stack !== null ? stack : ''; // 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 (boundary.tag === ClassComponent) {
          // 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); // Don't transform to our wrapper
        // For a more detailed description of this block, see:
        // https://github.com/facebook/react/pull/13384
      }

      var componentName = source ? getComponentName(source.type) : null;
      var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
      var errorBoundaryMessage;
      var errorBoundaryName = getComponentName(boundary.type);

      if (errorBoundaryName) {
        errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
      } else {
        errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
      }

      var combinedMessage = componentNameMessage + "\n" + 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); // Don't transform to our wrapper
    } else {}
  } 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 PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;

function createRootErrorUpdate(fiber, errorInfo, lane) {
  var update = createUpdate(NoTimestamp, lane); // 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);
    logCapturedError(fiber, errorInfo);
  };

  return update;
}

function createClassErrorUpdate(fiber, errorInfo, lane) {
  var update = createUpdate(NoTimestamp, lane);
  update.tag = CaptureUpdate;
  var getDerivedStateFromError = fiber.type.getDerivedStateFromError;

  if (typeof getDerivedStateFromError === 'function') {
    var error$1 = errorInfo.value;

    update.payload = function () {
      logCapturedError(fiber, errorInfo);
      return getDerivedStateFromError(error$1);
    };
  }

  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

        logCapturedError(fiber, errorInfo);
      }

      var error$1 = errorInfo.value;
      var stack = errorInfo.stack;
      this.componentDidCatch(error$1, {
        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.
          if (!includesSomeLane(fiber.lanes, SyncLane)) {
            error('%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');
          }
        }
      }
    };
  } else {
    update.callback = function () {
      markFailedErrorBoundaryForHotReloading(fiber);
    };
  }

  return update;
}

function attachPingListener(root, wakeable, lanes) {
  // Attach a listener to the promise to "ping" the root and retry. But only if
  // one does not already exist for the lanes we're currently rendering (which
  // acts like a "thread ID" here).
  var pingCache = root.pingCache;
  var threadIDs;

  if (pingCache === null) {
    pingCache = root.pingCache = new PossiblyWeakMap$1();
    threadIDs = new Set();
    pingCache.set(wakeable, threadIDs);
  } else {
    threadIDs = pingCache.get(wakeable);

    if (threadIDs === undefined) {
      threadIDs = new Set();
      pingCache.set(wakeable, threadIDs);
    }
  }

  if (!threadIDs.has(lanes)) {
    // Memoize using the thread ID to prevent redundant listeners.
    threadIDs.add(lanes);
    var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
    wakeable.then(ping, ping);
  }
}

function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
  // The source fiber did not complete.
  sourceFiber.flags |= 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 wakeable.
    var wakeable = value;

    if ((sourceFiber.mode & BlockingMode) === NoMode) {
      // Reset the memoizedState to what it was before we attempted
      // to render it.
      var currentSource = sourceFiber.alternate;

      if (currentSource) {
        sourceFiber.updateQueue = currentSource.updateQueue;
        sourceFiber.memoizedState = currentSource.memoizedState;
        sourceFiber.lanes = currentSource.lanes;
      } else {
        sourceFiber.updateQueue = null;
        sourceFiber.memoizedState = null;
      }
    }

    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
        // attach another listener to flip the boundary back to its normal state.
        var wakeables = _workInProgress.updateQueue;

        if (wakeables === null) {
          var updateQueue = new Set();
          updateQueue.add(wakeable);
          _workInProgress.updateQueue = updateQueue;
        } else {
          wakeables.add(wakeable);
        } // If the boundary is outside of blocking 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 blocking mode tree. If the Suspense is outside of it, we
        // should *not* suspend the commit.


        if ((_workInProgress.mode & BlockingMode) === NoMode) {
          _workInProgress.flags |= DidCapture;
          sourceFiber.flags |= ForceUpdateForLegacySuspense; // 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.flags &= ~(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(NoTimestamp, SyncLane);
              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.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // 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. Transitions apply
        // 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, wakeable, rootRenderLanes);
        _workInProgress.flags |= ShouldCapture;
        _workInProgress.lanes = rootRenderLanes;
        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.');
  } // 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.flags |= ShouldCapture;
          var lane = pickArbitraryLane(rootRenderLanes);
          workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);

          var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);

          enqueueCapturedUpdate(workInProgress, _update);
          return;
        }

      case ClassComponent:
        // Capture and retry
        var errorInfo = value;
        var ctor = workInProgress.type;
        var instance = workInProgress.stateNode;

        if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
          workInProgress.flags |= ShouldCapture;

          var _lane = pickArbitraryLane(rootRenderLanes);

          workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state

          var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);

          enqueueCapturedUpdate(workInProgress, _update2);
          return;
        }

        break;
    }

    workInProgress = workInProgress.return;
  } while (workInProgress !== null);
}

var didWarnAboutUndefinedSnapshotBeforeUpdate = null;

{
  didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
}

var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;

var callComponentWillUnmountWithTimer = function (current, instance) {
  instance.props = current.memoizedProps;
  instance.state = current.memoizedState;

  {
    instance.componentWillUnmount();
  }
}; // Capture errors so they don't interrupt unmounting.


function safelyCallComponentWillUnmount(current, instance) {
  {
    invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);

    if (hasCaughtError()) {
      var unmountError = clearCaughtError();
      captureCommitPhaseError(current, unmountError);
    }
  }
}

function safelyDetachRef(current) {
  var ref = current.ref;

  if (ref !== null) {
    if (typeof ref === 'function') {
      {
        invokeGuardedCallback(null, ref, null, null);

        if (hasCaughtError()) {
          var refError = clearCaughtError();
          captureCommitPhaseError(current, refError);
        }
      }
    } else {
      ref.current = null;
    }
  }
}

function safelyCallDestroy(current, destroy) {
  {
    invokeGuardedCallback(null, destroy, null);

    if (hasCaughtError()) {
      var error = clearCaughtError();
      captureCommitPhaseError(current, error);
    }
  }
}

function commitBeforeMutationLifeCycles(current, finishedWork) {
  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case SimpleMemoComponent:
    case Block:
      {
        return;
      }

    case ClassComponent:
      {
        if (finishedWork.flags & Snapshot) {
          if (current !== null) {
            var prevProps = current.memoizedProps;
            var prevState = current.memoizedState;
            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) {
                if (instance.props !== finishedWork.memoizedProps) {
                  error('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');
                }

                if (instance.state !== finishedWork.memoizedState) {
                  error('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.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }
              }
            }

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

                error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
              }
            }

            instance.__reactInternalSnapshotBeforeUpdate = snapshot;
          }
        }

        return;
      }

    case HostRoot:
      {
        {
          if (finishedWork.flags & Snapshot) {
            var root = finishedWork.stateNode;
            clearContainer(root.containerInfo);
          }
        }

        return;
      }

    case HostComponent:
    case HostText:
    case HostPortal:
    case IncompleteClassComponent:
      // Nothing to do for these component types
      return;
  }

  {
    {
      throw 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 commitHookEffectListUnmount(tag, 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 & tag) === tag) {
        // Unmount
        var destroy = effect.destroy;
        effect.destroy = undefined;

        if (destroy !== undefined) {
          destroy();
        }
      }

      effect = effect.next;
    } while (effect !== firstEffect);
  }
}

function commitHookEffectListMount(tag, 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 & tag) === tag) {
        // 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://reactjs.org/link/hooks-data-fetching';
            } else {
              addendum = ' You returned: ' + destroy;
            }

            error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);
          }
        }
      }

      effect = effect.next;
    } while (effect !== firstEffect);
  }
}

function schedulePassiveEffects(finishedWork) {
  var updateQueue = finishedWork.updateQueue;
  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;

  if (lastEffect !== null) {
    var firstEffect = lastEffect.next;
    var effect = firstEffect;

    do {
      var _effect = effect,
          next = _effect.next,
          tag = _effect.tag;

      if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {
        enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);
        enqueuePendingPassiveHookEffectMount(finishedWork, effect);
      }

      effect = next;
    } while (effect !== firstEffect);
  }
}

function commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {
  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case SimpleMemoComponent:
    case Block:
      {
        // At this point layout effects have already been destroyed (during mutation phase).
        // This is done to prevent sibling component effects from interfering with each other,
        // e.g. a destroy function in one component should never override a ref set
        // by a create function in another component during the same commit.
        {
          commitHookEffectListMount(Layout | HasEffect, finishedWork);
        }

        schedulePassiveEffects(finishedWork);
        return;
      }

    case ClassComponent:
      {
        var instance = finishedWork.stateNode;

        if (finishedWork.flags & Update) {
          if (current === null) {
            // 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) {
                if (instance.props !== finishedWork.memoizedProps) {
                  error('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');
                }

                if (instance.state !== finishedWork.memoizedState) {
                  error('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.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }
              }
            }

            {
              instance.componentDidMount();
            }
          } else {
            var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
            var prevState = current.memoizedState; // 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) {
                if (instance.props !== finishedWork.memoizedProps) {
                  error('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');
                }

                if (instance.state !== finishedWork.memoizedState) {
                  error('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.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }
              }
            }

            {
              instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
            }
          }
        } // TODO: I think this is now always non-null by the time it reaches the
        // commit phase. Consider removing the type check.


        var updateQueue = finishedWork.updateQueue;

        if (updateQueue !== null) {
          {
            if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
              if (instance.props !== finishedWork.memoizedProps) {
                error('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');
              }

              if (instance.state !== finishedWork.memoizedState) {
                error('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.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
              }
            }
          } // 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);
        }

        return;
      }

    case HostRoot:
      {
        // TODO: I think this is now always non-null by the time it reaches the
        // commit phase. Consider removing the type check.
        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);
        }

        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 === null && finishedWork.flags & Update) {
          var type = finishedWork.type;
          var props = finishedWork.memoizedProps;
          commitMount(_instance2, type, props);
        }

        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:
      {
        {
          var _finishedWork$memoize2 = finishedWork.memoizedProps,
              onCommit = _finishedWork$memoize2.onCommit,
              onRender = _finishedWork$memoize2.onRender;
          var effectDuration = finishedWork.stateNode.effectDuration;
          var commitTime = getCommitTime();

          if (typeof onRender === 'function') {
            {
              onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);
            }
          }
        }

        return;
      }

    case SuspenseComponent:
      {
        commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
        return;
      }

    case SuspenseListComponent:
    case IncompleteClassComponent:
    case FundamentalComponent:
    case ScopeComponent:
    case OffscreenComponent:
    case LegacyHiddenComponent:
      return;
  }

  {
    {
      throw 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) {
  {
    // 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) {
      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 === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; 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;

    switch (finishedWork.tag) {
      case HostComponent:
        instanceToUse = getPublicInstance(instance);
        break;

      default:
        instanceToUse = instance;
    } // Moved outside to ensure DCE works with this flag

    if (typeof ref === 'function') {
      ref(instanceToUse);
    } else {
      {
        if (!ref.hasOwnProperty('current')) {
          error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));
        }
      }

      ref.current = instanceToUse;
    }
  }
}

function commitDetachRef(current) {
  var currentRef = current.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(finishedRoot, current, renderPriorityLevel) {
  onCommitUnmount(current);

  switch (current.tag) {
    case FunctionComponent:
    case ForwardRef:
    case MemoComponent:
    case SimpleMemoComponent:
    case Block:
      {
        var updateQueue = current.updateQueue;

        if (updateQueue !== null) {
          var lastEffect = updateQueue.lastEffect;

          if (lastEffect !== null) {
            var firstEffect = lastEffect.next;
            var effect = firstEffect;

            do {
              var _effect2 = effect,
                  destroy = _effect2.destroy,
                  tag = _effect2.tag;

              if (destroy !== undefined) {
                if ((tag & Passive$1) !== NoFlags$1) {
                  enqueuePendingPassiveHookEffectUnmount(current, effect);
                } else {
                  {
                    safelyCallDestroy(current, destroy);
                  }
                }
              }

              effect = effect.next;
            } while (effect !== firstEffect);
          }
        }

        return;
      }

    case ClassComponent:
      {
        safelyDetachRef(current);
        var instance = current.stateNode;

        if (typeof instance.componentWillUnmount === 'function') {
          safelyCallComponentWillUnmount(current, instance);
        }

        return;
      }

    case HostComponent:
      {
        safelyDetachRef(current);
        return;
      }

    case HostPortal:
      {
        // TODO: this is recursive.
        // We are also not using this parent because
        // the portal will get pushed immediately.
        {
          unmountHostComponents(finishedRoot, current);
        }

        return;
      }

    case FundamentalComponent:
      {

        return;
      }

    case DehydratedFragment:
      {

        return;
      }

    case ScopeComponent:
      {

        return;
      }
  }
}

function commitNestedUnmounts(finishedRoot, 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
  // we do an inner loop while we're still inside the host node.
  var node = root;

  while (true) {
    commitUnmount(finishedRoot, node); // 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.
     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 detachFiberMutation(fiber) {
  // 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.
  // Note: we cannot null out sibling here, otherwise it can cause issues
  // with findDOMNode and how it requires the sibling field to carry out
  // traversal in a later effect. See PR #16820. We now clear the sibling
  // field after effects, see: detachFiberAfterEffects.
  //
  // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.
  // It may be required if the current component is an error boundary,
  // and one of its descendants throws while unmounting a passive effect.
  fiber.alternate = null;
  fiber.child = null;
  fiber.dependencies = null;
  fiber.firstEffect = null;
  fiber.lastEffect = null;
  fiber.memoizedProps = null;
  fiber.memoizedState = null;
  fiber.pendingProps = null;
  fiber.return = null;
  fiber.updateQueue = null;

  {
    fiber._debugOwner = null;
  }
}

function getHostParentFiber(fiber) {
  var parent = fiber.return;

  while (parent !== null) {
    if (isHostParent(parent)) {
      return parent;
    }

    parent = parent.return;
  }

  {
    {
      throw 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.
  // TODO: Find a more efficient way to do this.
  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 !== DehydratedFragment) {
      // 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.flags & 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.flags & Placement)) {
      // Found it!
      return node.stateNode;
    }
  }
}

function commitPlacement(finishedWork) {


  var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.

  var parent;
  var isContainer;
  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:

    // eslint-disable-next-line-no-fallthrough

    default:
      {
        {
          throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." );
        }
      }

  }

  if (parentFiber.flags & ContentReset) {
    // Reset the text content of the parent before doing any insertions
    resetTextContent(parent); // Clear ContentReset from the effect tag

    parentFiber.flags &= ~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.

  if (isContainer) {
    insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);
  } else {
    insertOrAppendPlacementNode(finishedWork, before, parent);
  }
}

function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  var tag = node.tag;
  var isHost = tag === HostComponent || tag === HostText;

  if (isHost || enableFundamentalAPI ) {
    var stateNode = isHost ? node.stateNode : node.stateNode.instance;

    if (before) {
      insertInContainerBefore(parent, stateNode, before);
    } else {
      appendChildToContainer(parent, stateNode);
    }
  } else if (tag === HostPortal) ; else {
    var child = node.child;

    if (child !== null) {
      insertOrAppendPlacementNodeIntoContainer(child, before, parent);
      var sibling = child.sibling;

      while (sibling !== null) {
        insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
        sibling = sibling.sibling;
      }
    }
  }
}

function insertOrAppendPlacementNode(node, before, parent) {
  var tag = node.tag;
  var isHost = tag === HostComponent || tag === HostText;

  if (isHost || enableFundamentalAPI ) {
    var stateNode = isHost ? node.stateNode : node.stateNode.instance;

    if (before) {
      insertBefore(parent, stateNode, before);
    } else {
      appendChild(parent, stateNode);
    }
  } else if (tag === HostPortal) ; else {
    var child = node.child;

    if (child !== null) {
      insertOrAppendPlacementNode(child, before, parent);
      var sibling = child.sibling;

      while (sibling !== null) {
        insertOrAppendPlacementNode(sibling, before, parent);
        sibling = sibling.sibling;
      }
    }
  }
}

function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
  // We only have the top Fiber that was deleted but we need to recurse down its
  // children to find all the terminal nodes.
  var node = current; // 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;
  var currentParentIsContainer;

  while (true) {
    if (!currentParentIsValid) {
      var parent = node.return;

      findParent: while (true) {
        if (!(parent !== null)) {
          {
            throw 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;

        }

        parent = parent.return;
      }

      currentParentIsValid = true;
    }

    if (node.tag === HostComponent || node.tag === HostText) {
      commitNestedUnmounts(finishedRoot, node); // 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 === 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(finishedRoot, node); // 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) {
      return;
    }

    while (node.sibling === null) {
      if (node.return === null || node.return === current) {
        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(finishedRoot, current, renderPriorityLevel) {
  {
    // Recursively delete all host nodes from the parent.
    // Detach refs and call componentWillUnmount() on the whole subtree.
    unmountHostComponents(finishedRoot, current);
  }

  var alternate = current.alternate;
  detachFiberMutation(current);

  if (alternate !== null) {
    detachFiberMutation(alternate);
  }
}

function commitWork(current, finishedWork) {

  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case MemoComponent:
    case SimpleMemoComponent:
    case Block:
      {
        // Layout effects are destroyed during the mutation phase so that all
        // destroy functions for all fibers are called before any create functions.
        // This prevents sibling component effects from interfering with each other,
        // e.g. a destroy function in one component should never override a ref set
        // by a create function in another component during the same commit.
        {
          commitHookEffectListUnmount(Layout | HasEffect, 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 !== null ? current.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);
          }
        }

        return;
      }

    case HostText:
      {
        if (!(finishedWork.stateNode !== null)) {
          {
            throw 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 !== null ? current.memoizedProps : newText;
        commitTextUpdate(textInstance, oldText, newText);
        return;
      }

    case HostRoot:
      {
        {
          var _root = finishedWork.stateNode;

          if (_root.hydrate) {
            // We've just hydrated. No need to hydrate again.
            _root.hydrate = false;
            commitHydratedContainer(_root.containerInfo);
          }
        }

        return;
      }

    case Profiler:
      {
        return;
      }

    case SuspenseComponent:
      {
        commitSuspenseComponent(finishedWork);
        attachSuspenseRetryListeners(finishedWork);
        return;
      }

    case SuspenseListComponent:
      {
        attachSuspenseRetryListeners(finishedWork);
        return;
      }

    case IncompleteClassComponent:
      {
        return;
      }

    case FundamentalComponent:
      {

        break;
      }

    case ScopeComponent:
      {

        break;
      }

    case OffscreenComponent:
    case LegacyHiddenComponent:
      {
        var newState = finishedWork.memoizedState;
        var isHidden = newState !== null;
        hideOrUnhideAllChildren(finishedWork, isHidden);
        return;
      }
  }

  {
    {
      throw 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;

  if (newState !== null) {
    markCommitTimeOfFallback();

    {
      // Hide the Offscreen component that contains the primary children. TODO:
      // Ideally, this effect would have been scheduled on the Offscreen fiber
      // itself. That's how unhiding works: the Offscreen component schedules an
      // effect on itself. However, in this case, the component didn't complete,
      // so the fiber was never added to the effect list in the normal path. We
      // could have appended it to the effect list in the Suspense component's
      // second pass, but doing it this way is less complicated. This would be
      // simpler if we got rid of the effect list and traversed the tree, like
      // we're planning to do.
      var primaryChildParent = finishedWork.child;
      hideOrUnhideAllChildren(primaryChildParent, true);
    }
  }
}

function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {

  var newState = finishedWork.memoizedState;

  if (newState === null) {
    var current = finishedWork.alternate;

    if (current !== null) {
      var prevState = current.memoizedState;

      if (prevState !== null) {
        var suspenseInstance = prevState.dehydrated;

        if (suspenseInstance !== null) {
          commitHydratedSuspenseInstance(suspenseInstance);
        }
      }
    }
  }
}

function attachSuspenseRetryListeners(finishedWork) {
  // If this boundary just timed out, then it will have a set of wakeables.
  // For each wakeable, attach a listener so that when it resolves, React
  // attempts to re-render the boundary in the primary (pre-timeout) state.
  var wakeables = finishedWork.updateQueue;

  if (wakeables !== null) {
    finishedWork.updateQueue = null;
    var retryCache = finishedWork.stateNode;

    if (retryCache === null) {
      retryCache = finishedWork.stateNode = new PossiblyWeakSet();
    }

    wakeables.forEach(function (wakeable) {
      // Memoize using the boundary fiber to prevent redundant listeners.
      var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);

      if (!retryCache.has(wakeable)) {
        {
          if (wakeable.__reactDoNotTraceInteractions !== true) {
            retry = tracing.unstable_wrap(retry);
          }
        }

        retryCache.add(wakeable);
        wakeable.then(retry, retry);
      }
    });
  }
} // This function detects when a Suspense boundary goes from visible to hidden.
// It returns false if the boundary is already hidden.
// TODO: Use an effect tag.


function isSuspenseBoundaryBeingHidden(current, finishedWork) {
  if (current !== null) {
    var oldState = current.memoizedState;

    if (oldState === null || oldState.dehydrated !== null) {
      var newState = finishedWork.memoizedState;
      return newState !== null && newState.dehydrated === null;
    }
  }

  return false;
}

function commitResetTextContent(current) {

  resetTextContent(current.stateNode);
}

var COMPONENT_TYPE = 0;
var HAS_PSEUDO_CLASS_TYPE = 1;
var ROLE_TYPE = 2;
var TEST_NAME_TYPE = 3;
var TEXT_TYPE = 4;

if (typeof Symbol === 'function' && Symbol.for) {
  var symbolFor$1 = Symbol.for;
  COMPONENT_TYPE = symbolFor$1('selector.component');
  HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');
  ROLE_TYPE = symbolFor$1('selector.role');
  TEST_NAME_TYPE = symbolFor$1('selector.test_id');
  TEXT_TYPE = symbolFor$1('selector.text');
}
var commitHooks = [];
function onCommitRoot$1() {
  {
    commitHooks.forEach(function (commitHook) {
      return commitHook();
    });
  }
}

var ceil = Math.ceil;
var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
    ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
    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 RetryAfterError =
/*       */
64;
var RootIncomplete = 0;
var RootFatalErrored = 1;
var RootErrored = 2;
var RootSuspended = 3;
var RootSuspendedWithDelay = 4;
var RootCompleted = 5; // 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 lanes we're rendering

var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree
// This is a superset of the lanes we started working on at the root. The only
// case where it's different from `workInProgressRootRenderLanes` is when we
// enter a subtree that is hidden and needs to be unhidden: Suspense and
// Offscreen component.
//
// Most things in the work loop should deal with workInProgressRootRenderLanes.
// Most things in begin/complete phases should deal with subtreeRenderLanes.

var subtreeRenderLanes = NoLanes;
var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.

var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown

var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's
// slightly different than `renderLanes` because `renderLanes` can change as you
// enter and exit an Offscreen tree. This value is the combination of all render
// lanes for the entire render phase.

var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only
// includes unprocessed updates, not work in bailed out children.

var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.

var workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.

var workInProgressRootPingedLanes = NoLanes;
var mostRecentlyUpdatedRoot = null; // 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; // The absolute time for when we should start giving up on rendering
// more and prefer CPU suspense heuristics instead.

var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU
// suspense heuristics and opt out of rendering more content.

var RENDER_TIMEOUT_MS = 500;

function resetRenderTimer() {
  workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;
}

function getRenderTargetTime() {
  return workInProgressRootRenderTargetTime;
}
var nextEffect = null;
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsRenderPriority = NoPriority$1;
var pendingPassiveEffectsLanes = NoLanes;
var pendingPassiveHookEffectsMount = [];
var pendingPassiveHookEffectsUnmount = [];
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; // Marks the need to reschedule pending interactions at these lanes
// 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.
// TODO: Can use a bitmask instead of an array

var spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their
// event times as simultaneous, even if the actual clock time has advanced
// between the first and second call.

var currentEventTime = NoTimestamp;
var currentEventWipLanes = NoLanes;
var currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
// We warn about state updates for unmounted components differently in this case.

var isFlushingPassiveEffects = false;
var focusedInstanceHandle = null;
var shouldFireAfterActiveInstanceBlur = false;
function getWorkInProgressRoot() {
  return workInProgressRoot;
}
function requestEventTime() {
  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
    // We're inside React, so it's fine to read the actual time.
    return now();
  } // We're not inside React, so we may be in the middle of a browser event.


  if (currentEventTime !== NoTimestamp) {
    // 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 = now();
  return currentEventTime;
}
function requestUpdateLane(fiber) {
  // Special cases
  var mode = fiber.mode;

  if ((mode & BlockingMode) === NoMode) {
    return SyncLane;
  } else if ((mode & ConcurrentMode) === NoMode) {
    return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
  } // The algorithm for assigning an update to a lane should be stable for all
  // updates at the same priority within the same event. To do this, the inputs
  // to the algorithm must be the same. For example, we use the `renderLanes`
  // to avoid choosing a lane that is already in the middle of rendering.
  //
  // However, the "included" lanes could be mutated in between updates in the
  // same event, like if you perform an update inside `flushSync`. Or any other
  // code path that might call `prepareFreshStack`.
  //
  // The trick we use is to cache the first of each of these inputs within an
  // event. Then reset the cached values once we can be sure the event is over.
  // Our heuristic for that is whenever we enter a concurrent work loop.
  //
  // We'll do the same for `currentEventPendingLanes` below.


  if (currentEventWipLanes === NoLanes) {
    currentEventWipLanes = workInProgressRootIncludedLanes;
  }

  var isTransition = requestCurrentTransition() !== NoTransition;

  if (isTransition) {
    if (currentEventPendingLanes !== NoLanes) {
      currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;
    }

    return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);
  } // TODO: Remove this dependency on the Scheduler priority.
  // To do that, we're replacing it with an update lane priority.


  var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.
  // This couples React to the Scheduler internals, so we're replacing it
  // with the currentUpdateLanePriority above. As an example of how this
  // could be problematic, if we're not inside `Scheduler.runWithPriority`,
  // then we'll get the priority of the current running Scheduler task,
  // which is probably not what we want.

  var lane;

  if ( // TODO: Temporary. We're removing the concept of discrete updates.
  (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {
    lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);
  } else {
    var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);

    lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);
  }

  return lane;
}

function requestRetryLane(fiber) {
  // This is a fork of `requestUpdateLane` designed specifically for Suspense
  // "retries" — a special update that attempts to flip a Suspense boundary
  // from its placeholder state to its primary/resolved state.
  // Special cases
  var mode = fiber.mode;

  if ((mode & BlockingMode) === NoMode) {
    return SyncLane;
  } else if ((mode & ConcurrentMode) === NoMode) {
    return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
  } // See `requestUpdateLane` for explanation of `currentEventWipLanes`


  if (currentEventWipLanes === NoLanes) {
    currentEventWipLanes = workInProgressRootIncludedLanes;
  }

  return findRetryLane(currentEventWipLanes);
}

function scheduleUpdateOnFiber(fiber, lane, eventTime) {
  checkForNestedUpdates();
  warnAboutRenderPhaseUpdatesInDEV(fiber);
  var root = markUpdateLaneFromFiberToRoot(fiber, lane);

  if (root === null) {
    warnAboutUpdateOnUnmountedFiberInDEV(fiber);
    return null;
  } // Mark that the root has a pending update.


  markRootUpdated(root, lane, eventTime);

  if (root === workInProgressRoot) {
    // Received an update to a tree that's in the middle of rendering. Mark
    // that there was an interleaved update work on this root. Unless the
    // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
    // phase update. In that case, we don't treat render phase updates as if
    // they were interleaved, for backwards compat reasons.
    {
      workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);
    }

    if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
      // The root already suspended with a delay, which means this render
      // definitely won't finish. Since we have a new update, let's mark it as
      // suspended now, right before marking the incoming update. This has the
      // effect of interrupting the current render and switching to the update.
      // TODO: Make sure this doesn't override pings that happen while we've
      // already started rendering.
      markRootSuspended$1(root, workInProgressRootRenderLanes);
    }
  } // TODO: requestUpdateLanePriority also reads the priority. Pass the
  // priority as an argument to that function and this one.


  var priorityLevel = getCurrentPriorityLevel();

  if (lane === SyncLane) {
    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, lane); // 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.

      performSyncWorkOnRoot(root);
    } else {
      ensureRootIsScheduled(root, eventTime);
      schedulePendingInteractions(root, lane);

      if (executionContext === NoContext) {
        // Flush the synchronous work now, unless 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 legacy mode.
        resetRenderTimer();
        flushSyncCallbackQueue();
      }
    }
  } else {
    // Schedule a discrete update but only if it's not Sync.
    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$1)) {
      // 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 Set([root]);
      } else {
        rootsWithPendingDiscreteUpdates.add(root);
      }
    } // Schedule other updates after in case the callback is sync.


    ensureRootIsScheduled(root, eventTime);
    schedulePendingInteractions(root, lane);
  } // We use this when assigning a lane for a transition inside
  // `requestUpdateLane`. We assume it's the same as the root being updated,
  // since in the common case of a single root app it probably is. If it's not
  // the same root, then it's not a huge deal, we just might batch more stuff
  // together more than necessary.


  mostRecentlyUpdatedRoot = root;
} // 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 markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
  // Update the source fiber's lanes
  sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
  var alternate = sourceFiber.alternate;

  if (alternate !== null) {
    alternate.lanes = mergeLanes(alternate.lanes, lane);
  }

  {
    if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
      warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
    }
  } // Walk the parent path to the root and update the child expiration time.


  var node = sourceFiber;
  var parent = sourceFiber.return;

  while (parent !== null) {
    parent.childLanes = mergeLanes(parent.childLanes, lane);
    alternate = parent.alternate;

    if (alternate !== null) {
      alternate.childLanes = mergeLanes(alternate.childLanes, lane);
    } else {
      {
        if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
          warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
        }
      }
    }

    node = parent;
    parent = parent.return;
  }

  if (node.tag === HostRoot) {
    var root = node.stateNode;
    return root;
  } else {
    return null;
  }
} // Use this function to schedule a task for a root. There's only one task per
// root; if a task was already scheduled, we'll check to make sure the priority
// of the existing task is the same as the priority of the next level that the
// root has work on. This function is called on every update, and right before
// exiting a task.


function ensureRootIsScheduled(root, currentTime) {
  var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as
  // expired so we know to work on those next.

  markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.

  var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.

  var newCallbackPriority = returnNextLanesPriority();

  if (nextLanes === NoLanes) {
    // Special case: There's nothing to work on.
    if (existingCallbackNode !== null) {
      cancelCallback(existingCallbackNode);
      root.callbackNode = null;
      root.callbackPriority = NoLanePriority;
    }

    return;
  } // Check if there's an existing task. We may be able to reuse it.


  if (existingCallbackNode !== null) {
    var existingCallbackPriority = root.callbackPriority;

    if (existingCallbackPriority === newCallbackPriority) {
      // The priority hasn't changed. We can reuse the existing task. Exit.
      return;
    } // The priority changed. Cancel the existing callback. We'll schedule a new
    // one below.


    cancelCallback(existingCallbackNode);
  } // Schedule a new callback.


  var newCallbackNode;

  if (newCallbackPriority === SyncLanePriority) {
    // Special case: Sync React callbacks are scheduled on a special
    // internal queue
    newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
  } else if (newCallbackPriority === SyncBatchedLanePriority) {
    newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));
  } else {
    var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);
    newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));
  }

  root.callbackPriority = newCallbackPriority;
  root.callbackNode = newCallbackNode;
} // This is the entry point for every concurrent task, i.e. anything that
// goes through Scheduler.


function performConcurrentWorkOnRoot(root) {
  // 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 = NoTimestamp;
  currentEventWipLanes = NoLanes;
  currentEventPendingLanes = NoLanes;

  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
    {
      throw Error( "Should not already be working." );
    }
  } // Flush any pending passive effects before deciding which lanes to work on,
  // in case they schedule additional work.


  var originalCallbackNode = root.callbackNode;
  var didFlushPassiveEffects = flushPassiveEffects();

  if (didFlushPassiveEffects) {
    // Something in the passive effect phase may have canceled the current task.
    // Check if the task node for this root was changed.
    if (root.callbackNode !== originalCallbackNode) {
      // The current task was canceled. Exit. We don't need to call
      // `ensureRootIsScheduled` because the check above implies either that
      // there's a new task, or that there's no remaining work on this root.
      return null;
    }
  } // Determine the next expiration time to work on, using the fields stored
  // on the root.


  var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);

  if (lanes === NoLanes) {
    // Defensive coding. This is never expected to happen.
    return null;
  }

  var exitStatus = renderRootConcurrent(root, lanes);

  if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
    // The render included lanes that were updated during the render phase.
    // For example, when unhiding a hidden tree, we include all the lanes
    // that were previously skipped when the tree was hidden. That set of
    // lanes is a superset of the lanes we started rendering with.
    //
    // So we'll throw out the current work and restart.
    prepareFreshStack(root, NoLanes);
  } else if (exitStatus !== RootIncomplete) {
    if (exitStatus === RootErrored) {
      executionContext |= RetryAfterError; // If an error occurred during hydration,
      // discard server response and fall back to client side render.

      if (root.hydrate) {
        root.hydrate = false;
        clearContainer(root.containerInfo);
      } // If something threw an error, try rendering one more time. We'll render
      // synchronously to block concurrent data mutations, and we'll includes
      // all pending updates are included. If it still fails after the second
      // attempt, we'll give up and commit the resulting tree.


      lanes = getLanesToRetrySynchronouslyOnError(root);

      if (lanes !== NoLanes) {
        exitStatus = renderRootSync(root, lanes);
      }
    }

    if (exitStatus === RootFatalErrored) {
      var fatalError = workInProgressRootFatalError;
      prepareFreshStack(root, NoLanes);
      markRootSuspended$1(root, lanes);
      ensureRootIsScheduled(root, now());
      throw fatalError;
    } // 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.


    var finishedWork = root.current.alternate;
    root.finishedWork = finishedWork;
    root.finishedLanes = lanes;
    finishConcurrentRender(root, exitStatus, lanes);
  }

  ensureRootIsScheduled(root, now());

  if (root.callbackNode === originalCallbackNode) {
    // The task node scheduled for this root is the same one that's
    // currently executed. Need to return a continuation.
    return performConcurrentWorkOnRoot.bind(null, root);
  }

  return null;
}

function finishConcurrentRender(root, exitStatus, lanes) {
  switch (exitStatus) {
    case RootIncomplete:
    case RootFatalErrored:
      {
        {
          {
            throw Error( "Root did not complete. This is a bug in React." );
          }
        }
      }
    // 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:
      {
        // We should have already attempted to retry this tree. If we reached
        // this point, it errored again. Commit it.
        commitRoot(root);
        break;
      }

    case RootSuspended:
      {
        markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we
        // should immediately commit it or wait a bit.

        if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
        !shouldForceFlushFallbacksInDEV()) {
          // This render only included retries, no updates. 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) {
            var nextLanes = getNextLanes(root, NoLanes);

            if (nextLanes !== NoLanes) {
              // There's additional work on this root.
              break;
            }

            var suspendedLanes = root.suspendedLanes;

            if (!isSubsetOfLanes(suspendedLanes, lanes)) {
              // We should prefer to render the fallback of at the last
              // suspended level. Ping the last suspended level to try
              // rendering it again.
              // FIXME: What if the suspended lanes are Idle? Should not restart.
              var eventTime = requestEventTime();
              markRootPinged(root, suspendedLanes);
              break;
            } // 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);
            break;
          }
        } // The work expired. Commit immediately.


        commitRoot(root);
        break;
      }

    case RootSuspendedWithDelay:
      {
        markRootSuspended$1(root, lanes);

        if (includesOnlyTransitions(lanes)) {
          // This is a transition, so we should exit without committing a
          // placeholder and without scheduling a timeout. Delay indefinitely
          // until we receive more data.
          break;
        }

        if (!shouldForceFlushFallbacksInDEV()) {
          // This is not a transition, but we did trigger an avoided state.
          // Schedule a placeholder to display after a short delay, using the Just
          // Noticeable Difference.
          // TODO: Is the JND optimization worth the added complexity? If this is
          // the only reason we track the event time, then probably not.
          // Consider removing.
          var mostRecentEventTime = getMostRecentEventTime(root, lanes);
          var eventTimeMs = mostRecentEventTime;
          var timeElapsedMs = now() - eventTimeMs;

          var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.


          if (_msUntilTimeout > 10) {
            // Instead of committing the fallback immediately, wait for more data
            // to arrive.
            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
            break;
          }
        } // Commit the placeholder.


        commitRoot(root);
        break;
      }

    case RootCompleted:
      {
        // The work completed. Ready to commit.
        commitRoot(root);
        break;
      }

    default:
      {
        {
          {
            throw Error( "Unknown root exit status." );
          }
        }
      }
  }
}

function markRootSuspended$1(root, suspendedLanes) {
  // When suspending, we should always exclude lanes that were pinged or (more
  // rarely, since we try to avoid it) updated during the render phase.
  // TODO: Lol maybe there's a better way to factor this besides this
  // obnoxiously named function :)
  suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
  suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);
  markRootSuspended(root, suspendedLanes);
} // This is the entry point for synchronous tasks that don't go
// through Scheduler


function performSyncWorkOnRoot(root) {
  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
    {
      throw Error( "Should not already be working." );
    }
  }

  flushPassiveEffects();
  var lanes;
  var exitStatus;

  if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {
    // There's a partial tree, and at least one of its lanes has expired. Finish
    // rendering it before rendering the rest of the expired work.
    lanes = workInProgressRootRenderLanes;
    exitStatus = renderRootSync(root, lanes);

    if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
      // The render included lanes that were updated during the render phase.
      // For example, when unhiding a hidden tree, we include all the lanes
      // that were previously skipped when the tree was hidden. That set of
      // lanes is a superset of the lanes we started rendering with.
      //
      // Note that this only happens when part of the tree is rendered
      // concurrently. If the whole tree is rendered synchronously, then there
      // are no interleaved events.
      lanes = getNextLanes(root, lanes);
      exitStatus = renderRootSync(root, lanes);
    }
  } else {
    lanes = getNextLanes(root, NoLanes);
    exitStatus = renderRootSync(root, lanes);
  }

  if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
    executionContext |= RetryAfterError; // If an error occurred during hydration,
    // discard server response and fall back to client side render.

    if (root.hydrate) {
      root.hydrate = false;
      clearContainer(root.containerInfo);
    } // If something threw an error, try rendering one more time. We'll render
    // synchronously to block concurrent data mutations, and we'll includes
    // all pending updates are included. If it still fails after the second
    // attempt, we'll give up and commit the resulting tree.


    lanes = getLanesToRetrySynchronouslyOnError(root);

    if (lanes !== NoLanes) {
      exitStatus = renderRootSync(root, lanes);
    }
  }

  if (exitStatus === RootFatalErrored) {
    var fatalError = workInProgressRootFatalError;
    prepareFreshStack(root, NoLanes);
    markRootSuspended$1(root, lanes);
    ensureRootIsScheduled(root, now());
    throw fatalError;
  } // We now have a consistent tree. Because this is a sync render, we
  // will commit it even if something suspended.


  var finishedWork = root.current.alternate;
  root.finishedWork = finishedWork;
  root.finishedLanes = lanes;
  commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next
  // pending level.

  ensureRootIsScheduled(root, now());
  return null;
}
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 ((executionContext & RenderContext) !== NoContext) {
        error('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 the discrete updates scheduled passive effects, flush them now so that
  // they fire before the next serial event.

  flushPassiveEffects();
}

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 (root) {
      markDiscreteUpdatesExpired(root);
      ensureRootIsScheduled(root, now());
    });
  } // 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
      resetRenderTimer();
      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
      resetRenderTimer();
      flushSyncCallbackQueue();
    }
  }
}
function discreteUpdates$1(fn, a, b, c, d) {
  var prevExecutionContext = executionContext;
  executionContext |= DiscreteEventContext;

  {
    try {
      return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));
    } finally {
      executionContext = prevExecutionContext;

      if (executionContext === NoContext) {
        // Flush the immediate callbacks that were scheduled during this batch
        resetRenderTimer();
        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
      resetRenderTimer();
      flushSyncCallbackQueue();
    }
  }
}
function flushSync(fn, a) {
  var prevExecutionContext = executionContext;

  if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {
    {
      error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
    }

    return fn(a);
  }

  executionContext |= BatchedContext;

  {
    try {
      if (fn) {
        return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));
      } else {
        return undefined;
      }
    } 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 pushRenderLanes(fiber, lanes) {
  push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
  subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
  workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
}
function popRenderLanes(fiber) {
  subtreeRenderLanes = subtreeRenderLanesCursor.current;
  pop(subtreeRenderLanesCursor, fiber);
}

function prepareFreshStack(root, lanes) {
  root.finishedWork = null;
  root.finishedLanes = NoLanes;
  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);
  workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
  workInProgressRootExitStatus = RootIncomplete;
  workInProgressRootFatalError = null;
  workInProgressRootSkippedLanes = NoLanes;
  workInProgressRootUpdatedLanes = NoLanes;
  workInProgressRootPingedLanes = NoLanes;

  {
    spawnedWorkDuringRender = null;
  }

  {
    ReactStrictModeWarnings.discardPendingWarnings();
  }
}

function handleError(root, thrownValue) {
  do {
    var erroredWork = workInProgress;

    try {
      // Reset module-level state that was set during the render phase.
      resetContextDependencies();
      resetHooksAfterThrow();
      resetCurrentFiber(); // TODO: I found and added this missing line while investigating a
      // separate issue. Write a regression test using string refs.

      ReactCurrentOwner$2.current = null;

      if (erroredWork === null || erroredWork.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.
        workInProgressRootExitStatus = RootFatalErrored;
        workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
        // sibling, or the parent if there are no siblings. But since the root
        // has no siblings nor a parent, we set it to null. Usually this is
        // handled by `completeUnitOfWork` or `unwindWork`, but since we're
        // intentionally not calling those, we need set it here.
        // TODO: Consider calling `unwindWork` to pop the contexts.

        workInProgress = null;
        return;
      }

      if (enableProfilerTimer && erroredWork.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(erroredWork, true);
      }

      throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
      completeUnitOfWork(erroredWork);
    } catch (yetAnotherThrownValue) {
      // Something in the return path also threw.
      thrownValue = yetAnotherThrownValue;

      if (workInProgress === erroredWork && erroredWork !== null) {
        // If this boundary has already errored, then we had trouble processing
        // the error. Bubble it to the next boundary.
        erroredWork = erroredWork.return;
        workInProgress = erroredWork;
      } else {
        erroredWork = workInProgress;
      }

      continue;
    } // Return to the normal work loop.


    return;
  } while (true);
}

function pushDispatcher() {
  var prevDispatcher = ReactCurrentDispatcher$2.current;
  ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;

  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.
    return ContextOnlyDispatcher;
  } else {
    return prevDispatcher;
  }
}

function popDispatcher(prevDispatcher) {
  ReactCurrentDispatcher$2.current = prevDispatcher;
}

function pushInteractions(root) {
  {
    var prevInteractions = tracing.__interactionsRef.current;
    tracing.__interactionsRef.current = root.memoizedInteractions;
    return prevInteractions;
  }
}

function popInteractions(prevInteractions) {
  {
    tracing.__interactionsRef.current = prevInteractions;
  }
}

function markCommitTimeOfFallback() {
  globalMostRecentFallbackTime = now();
}
function markSkippedUpdateLanes(lane) {
  workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
}
function renderDidSuspend() {
  if (workInProgressRootExitStatus === RootIncomplete) {
    workInProgressRootExitStatus = RootSuspended;
  }
}
function renderDidSuspendDelayIfPossible() {
  if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
    workInProgressRootExitStatus = RootSuspendedWithDelay;
  } // Check if there are updates that we skipped tree that might have unblocked
  // this render.


  if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {
    // Mark the current render as suspended so that we switch to working on
    // the updates that were skipped. Usually we only suspend at the end of
    // the render phase.
    // TODO: We should probably always mark the root as suspended immediately
    // (inside this function), since by suspending at the end of the render
    // phase introduces a potential mistake where we suspend lanes that were
    // pinged or updated while we were rendering.
    markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
  }
}
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 renderRootSync(root, lanes) {
  var prevExecutionContext = executionContext;
  executionContext |= RenderContext;
  var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
  // and prepare a fresh one. Otherwise we'll continue where we left off.

  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
    prepareFreshStack(root, lanes);
    startWorkOnPendingInteractions(root, lanes);
  }

  var prevInteractions = pushInteractions(root);

  do {
    try {
      workLoopSync();
      break;
    } catch (thrownValue) {
      handleError(root, thrownValue);
    }
  } while (true);

  resetContextDependencies();

  {
    popInteractions(prevInteractions);
  }

  executionContext = prevExecutionContext;
  popDispatcher(prevDispatcher);

  if (workInProgress !== null) {
    // This is a sync render, so we should have finished the whole tree.
    {
      {
        throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
      }
    }
  }


  workInProgressRoot = null;
  workInProgressRootRenderLanes = NoLanes;
  return workInProgressRootExitStatus;
} // The work loop is an extremely hot path. Tell Closure not to inline it.

/** @noinline */


function workLoopSync() {
  // Already timed out, so perform work without checking if we need to yield.
  while (workInProgress !== null) {
    performUnitOfWork(workInProgress);
  }
}

function renderRootConcurrent(root, lanes) {
  var prevExecutionContext = executionContext;
  executionContext |= RenderContext;
  var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
  // and prepare a fresh one. Otherwise we'll continue where we left off.

  if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
    resetRenderTimer();
    prepareFreshStack(root, lanes);
    startWorkOnPendingInteractions(root, lanes);
  }

  var prevInteractions = pushInteractions(root);

  do {
    try {
      workLoopConcurrent();
      break;
    } catch (thrownValue) {
      handleError(root, thrownValue);
    }
  } while (true);

  resetContextDependencies();

  {
    popInteractions(prevInteractions);
  }

  popDispatcher(prevDispatcher);
  executionContext = prevExecutionContext;


  if (workInProgress !== null) {

    return RootIncomplete;
  } else {


    workInProgressRoot = null;
    workInProgressRootRenderLanes = NoLanes; // Return the final exit status.

    return workInProgressRootExitStatus;
  }
}
/** @noinline */


function workLoopConcurrent() {
  // Perform work until Scheduler asks us to yield
  while (workInProgress !== null && !shouldYield()) {
    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 = unitOfWork.alternate;
  setCurrentFiber(unitOfWork);
  var next;

  if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
    startProfilerTimer(unitOfWork);
    next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
    stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
  } else {
    next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
  }

  resetCurrentFiber();
  unitOfWork.memoizedProps = unitOfWork.pendingProps;

  if (next === null) {
    // If this doesn't spawn new work, complete the current work.
    completeUnitOfWork(unitOfWork);
  } else {
    workInProgress = next;
  }

  ReactCurrentOwner$2.current = null;
}

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.
  var completedWork = 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 = completedWork.alternate;
    var returnFiber = completedWork.return; // Check if the work completed or if something threw.

    if ((completedWork.flags & Incomplete) === NoFlags) {
      setCurrentFiber(completedWork);
      var next = void 0;

      if ( (completedWork.mode & ProfileMode) === NoMode) {
        next = completeWork(current, completedWork, subtreeRenderLanes);
      } else {
        startProfilerTimer(completedWork);
        next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.

        stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
      }

      resetCurrentFiber();

      if (next !== null) {
        // Completing this fiber spawned new work. Work on that next.
        workInProgress = next;
        return;
      }

      resetChildLanes(completedWork);

      if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
      (returnFiber.flags & Incomplete) === NoFlags) {
        // 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 = completedWork.firstEffect;
        }

        if (completedWork.lastEffect !== null) {
          if (returnFiber.lastEffect !== null) {
            returnFiber.lastEffect.nextEffect = completedWork.firstEffect;
          }

          returnFiber.lastEffect = completedWork.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 flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect
        // list. PerformedWork effect is read by React DevTools but shouldn't be
        // committed.

        if (flags > PerformedWork) {
          if (returnFiber.lastEffect !== null) {
            returnFiber.lastEffect.nextEffect = completedWork;
          } else {
            returnFiber.firstEffect = completedWork;
          }

          returnFiber.lastEffect = completedWork;
        }
      }
    } 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(completedWork); // Because this fiber did not complete, don't reset its expiration time.


      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.
        _next.flags &= HostEffectMask;
        workInProgress = _next;
        return;
      }

      if ( (completedWork.mode & ProfileMode) !== NoMode) {
        // Record the render duration for the fiber that errored.
        stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.

        var actualDuration = completedWork.actualDuration;
        var child = completedWork.child;

        while (child !== null) {
          actualDuration += child.actualDuration;
          child = child.sibling;
        }

        completedWork.actualDuration = actualDuration;
      }

      if (returnFiber !== null) {
        // Mark the parent fiber as incomplete and clear its effect list.
        returnFiber.firstEffect = returnFiber.lastEffect = null;
        returnFiber.flags |= Incomplete;
      }
    }

    var siblingFiber = completedWork.sibling;

    if (siblingFiber !== null) {
      // If there is more work to do in this returnFiber, do that next.
      workInProgress = siblingFiber;
      return;
    } // Otherwise, return to the parent


    completedWork = returnFiber; // Update the next thing we're working on in case something throws.

    workInProgress = completedWork;
  } while (completedWork !== null); // We've reached the root.


  if (workInProgressRootExitStatus === RootIncomplete) {
    workInProgressRootExitStatus = RootCompleted;
  }
}

function resetChildLanes(completedWork) {
  if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`
  // to switch statement in `completeWork`.
  (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {
    // The children of this component are hidden. Don't bubble their
    // expiration times.
    return;
  }

  var newChildLanes = NoLanes; // Bubble up the earliest expiration time.

  if ( (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) {
      newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));

      if (shouldBubbleActualDurations) {
        actualDuration += child.actualDuration;
      }

      treeBaseDuration += child.treeBaseDuration;
      child = child.sibling;
    }

    var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;

    if (isTimedOutSuspense) {
      // Don't count time spent in a timed out Suspense subtree as part of the base duration.
      var primaryChildFragment = completedWork.child;

      if (primaryChildFragment !== null) {
        treeBaseDuration -= primaryChildFragment.treeBaseDuration;
      }
    }

    completedWork.actualDuration = actualDuration;
    completedWork.treeBaseDuration = treeBaseDuration;
  } else {
    var _child = completedWork.child;

    while (_child !== null) {
      newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
      _child = _child.sibling;
    }
  }

  completedWork.childLanes = newChildLanes;
}

function commitRoot(root) {
  var renderPriorityLevel = getCurrentPriorityLevel();
  runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));
  return null;
}

function commitRootImpl(root, renderPriorityLevel) {
  do {
    // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
    // means `flushPassiveEffects` will sometimes result in additional
    // passive effects. So we need to keep flushing in a loop until there are
    // no more pending effects.
    // TODO: Might be better if `flushPassiveEffects` did not automatically
    // flush synchronous work at the end, to avoid factoring hazards like this.
    flushPassiveEffects();
  } while (rootWithPendingPassiveEffects !== null);

  flushRenderPhaseStrictModeWarningsInDEV();

  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
    {
      throw Error( "Should not already be working." );
    }
  }

  var finishedWork = root.finishedWork;
  var lanes = root.finishedLanes;

  if (finishedWork === null) {

    return null;
  }

  root.finishedWork = null;
  root.finishedLanes = NoLanes;

  if (!(finishedWork !== root.current)) {
    {
      throw 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; // Update the first and last pending times on this root. The new first
  // pending time is whatever is left on the root fiber.

  var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
  markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of
  // `flushDiscreteUpdates` starts a useless render pass which may cancels
  // a scheduled timeout.

  if (rootsWithPendingDiscreteUpdates !== null) {
    if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {
      rootsWithPendingDiscreteUpdates.delete(root);
    }
  }

  if (root === workInProgressRoot) {
    // We can reset these now that they are finished.
    workInProgressRoot = null;
    workInProgress = null;
    workInProgressRootRenderLanes = NoLanes;
  } // Get the list of effects.


  var firstEffect;

  if (finishedWork.flags > 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 = pushInteractions(root); // 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.

    focusedInstanceHandle = prepareForCommit(root.containerInfo);
    shouldFireAfterActiveInstanceBlur = false;
    nextEffect = firstEffect;

    do {
      {
        invokeGuardedCallback(null, commitBeforeMutationEffects, null);

        if (hasCaughtError()) {
          if (!(nextEffect !== null)) {
            {
              throw Error( "Should be working on an effect." );
            }
          }

          var error = clearCaughtError();
          captureCommitPhaseError(nextEffect, error);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null); // We no longer need to track the active instance fiber


    focusedInstanceHandle = null;

    {
      // 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.


    nextEffect = firstEffect;

    do {
      {
        invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);

        if (hasCaughtError()) {
          if (!(nextEffect !== null)) {
            {
              throw Error( "Should be working on an effect." );
            }
          }

          var _error = clearCaughtError();

          captureCommitPhaseError(nextEffect, _error);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null);

    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.

    nextEffect = firstEffect;

    do {
      {
        invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);

        if (hasCaughtError()) {
          if (!(nextEffect !== null)) {
            {
              throw Error( "Should be working on an effect." );
            }
          }

          var _error2 = clearCaughtError();

          captureCommitPhaseError(nextEffect, _error2);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null);

    nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
    // opportunity to paint.

    requestPaint();

    {
      popInteractions(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.

    {
      recordCommitTime();
    }
  }

  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;
    pendingPassiveEffectsLanes = lanes;
    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;

      if (nextEffect.flags & Deletion) {
        detachFiberAfterEffects(nextEffect);
      }

      nextEffect = nextNextEffect;
    }
  } // Read this again, since an effect might have updated it


  remainingLanes = root.pendingLanes; // Check if there's remaining work on this root

  if (remainingLanes !== NoLanes) {
    {
      if (spawnedWorkDuringRender !== null) {
        var expirationTimes = spawnedWorkDuringRender;
        spawnedWorkDuringRender = null;

        for (var i = 0; i < expirationTimes.length; i++) {
          scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);
        }
      }

      schedulePendingInteractions(root, remainingLanes);
    }
  } else {
    // If there's no remaining work, we can clear the set of already failed
    // error boundaries.
    legacyErrorBoundariesThatAlreadyFailed = null;
  }

  {
    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, lanes);
    }
  }

  if (remainingLanes === SyncLane) {
    // 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;
  }

  onCommitRoot(finishedWork.stateNode, renderPriorityLevel);

  {
    onCommitRoot$1();
  } // Always call this before exiting `commitRoot`, to ensure that any
  // additional work on this root is scheduled.


  ensureRootIsScheduled(root, now());

  if (hasUncaughtError) {
    hasUncaughtError = false;
    var _error3 = firstUncaughtError;
    firstUncaughtError = null;
    throw _error3;
  }

  if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
    // 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) {
    var current = nextEffect.alternate;

    if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {
      if ((nextEffect.flags & Deletion) !== NoFlags) {
        if (doesFiberContain(nextEffect, focusedInstanceHandle)) {
          shouldFireAfterActiveInstanceBlur = true;
        }
      } else {
        // TODO: Move this out of the hot path using a dedicated effect tag.
        if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {
          shouldFireAfterActiveInstanceBlur = true;
        }
      }
    }

    var flags = nextEffect.flags;

    if ((flags & Snapshot) !== NoFlags) {
      setCurrentFiber(nextEffect);
      commitBeforeMutationLifeCycles(current, nextEffect);
      resetCurrentFiber();
    }

    if ((flags & Passive) !== NoFlags) {
      // If there are passive effects, schedule a callback to flush at
      // the earliest opportunity.
      if (!rootDoesHavePassiveEffects) {
        rootDoesHavePassiveEffects = true;
        scheduleCallback(NormalPriority$1, function () {
          flushPassiveEffects();
          return null;
        });
      }
    }

    nextEffect = nextEffect.nextEffect;
  }
}

function commitMutationEffects(root, renderPriorityLevel) {
  // TODO: Should probably move the bulk of this function to commitWork.
  while (nextEffect !== null) {
    setCurrentFiber(nextEffect);
    var flags = nextEffect.flags;

    if (flags & ContentReset) {
      commitResetTextContent(nextEffect);
    }

    if (flags & Ref) {
      var current = nextEffect.alternate;

      if (current !== null) {
        commitDetachRef(current);
      }
    } // 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 primaryFlags = flags & (Placement | Update | Deletion | Hydrating);

    switch (primaryFlags) {
      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.flags &= ~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.flags &= ~Placement; // Update

          var _current = nextEffect.alternate;
          commitWork(_current, nextEffect);
          break;
        }

      case Hydrating:
        {
          nextEffect.flags &= ~Hydrating;
          break;
        }

      case HydratingAndUpdate:
        {
          nextEffect.flags &= ~Hydrating; // Update

          var _current2 = nextEffect.alternate;
          commitWork(_current2, nextEffect);
          break;
        }

      case Update:
        {
          var _current3 = nextEffect.alternate;
          commitWork(_current3, nextEffect);
          break;
        }

      case Deletion:
        {
          commitDeletion(root, nextEffect);
          break;
        }
    }

    resetCurrentFiber();
    nextEffect = nextEffect.nextEffect;
  }
}

function commitLayoutEffects(root, committedLanes) {


  while (nextEffect !== null) {
    setCurrentFiber(nextEffect);
    var flags = nextEffect.flags;

    if (flags & (Update | Callback)) {
      var current = nextEffect.alternate;
      commitLifeCycles(root, current, nextEffect);
    }

    {
      if (flags & Ref) {
        commitAttachRef(nextEffect);
      }
    }

    resetCurrentFiber();
    nextEffect = nextEffect.nextEffect;
  }
}

function flushPassiveEffects() {
  // Returns whether passive effects were flushed.
  if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {
    var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;
    pendingPassiveEffectsRenderPriority = NoPriority$1;

    {
      return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
    }
  }

  return false;
}
function enqueuePendingPassiveHookEffectMount(fiber, effect) {
  pendingPassiveHookEffectsMount.push(effect, fiber);

  if (!rootDoesHavePassiveEffects) {
    rootDoesHavePassiveEffects = true;
    scheduleCallback(NormalPriority$1, function () {
      flushPassiveEffects();
      return null;
    });
  }
}
function enqueuePendingPassiveHookEffectUnmount(fiber, effect) {
  pendingPassiveHookEffectsUnmount.push(effect, fiber);

  {
    fiber.flags |= PassiveUnmountPendingDev;
    var alternate = fiber.alternate;

    if (alternate !== null) {
      alternate.flags |= PassiveUnmountPendingDev;
    }
  }

  if (!rootDoesHavePassiveEffects) {
    rootDoesHavePassiveEffects = true;
    scheduleCallback(NormalPriority$1, function () {
      flushPassiveEffects();
      return null;
    });
  }
}

function invokePassiveEffectCreate(effect) {
  var create = effect.create;
  effect.destroy = create();
}

function flushPassiveEffectsImpl() {
  if (rootWithPendingPassiveEffects === null) {
    return false;
  }

  var root = rootWithPendingPassiveEffects;
  var lanes = pendingPassiveEffectsLanes;
  rootWithPendingPassiveEffects = null;
  pendingPassiveEffectsLanes = NoLanes;

  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
    {
      throw Error( "Cannot flush passive effects while already rendering." );
    }
  }

  {
    isFlushingPassiveEffects = true;
  }

  var prevExecutionContext = executionContext;
  executionContext |= CommitContext;
  var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called
  // before ANY passive effect create functions are called.
  // Otherwise effects in sibling components might interfere with each other.
  // e.g. a destroy function in one component may unintentionally override a ref
  // value set by a create function in another component.
  // Layout effects have the same constraint.
  // First pass: Destroy stale passive effects.

  var unmountEffects = pendingPassiveHookEffectsUnmount;
  pendingPassiveHookEffectsUnmount = [];

  for (var i = 0; i < unmountEffects.length; i += 2) {
    var _effect = unmountEffects[i];
    var fiber = unmountEffects[i + 1];
    var destroy = _effect.destroy;
    _effect.destroy = undefined;

    {
      fiber.flags &= ~PassiveUnmountPendingDev;
      var alternate = fiber.alternate;

      if (alternate !== null) {
        alternate.flags &= ~PassiveUnmountPendingDev;
      }
    }

    if (typeof destroy === 'function') {
      {
        setCurrentFiber(fiber);

        {
          invokeGuardedCallback(null, destroy, null);
        }

        if (hasCaughtError()) {
          if (!(fiber !== null)) {
            {
              throw Error( "Should be working on an effect." );
            }
          }

          var error = clearCaughtError();
          captureCommitPhaseError(fiber, error);
        }

        resetCurrentFiber();
      }
    }
  } // Second pass: Create new passive effects.


  var mountEffects = pendingPassiveHookEffectsMount;
  pendingPassiveHookEffectsMount = [];

  for (var _i = 0; _i < mountEffects.length; _i += 2) {
    var _effect2 = mountEffects[_i];
    var _fiber = mountEffects[_i + 1];

    {
      setCurrentFiber(_fiber);

      {
        invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);
      }

      if (hasCaughtError()) {
        if (!(_fiber !== null)) {
          {
            throw Error( "Should be working on an effect." );
          }
        }

        var _error4 = clearCaughtError();

        captureCommitPhaseError(_fiber, _error4);
      }

      resetCurrentFiber();
    }
  } // 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) {
    var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC

    effect.nextEffect = null;

    if (effect.flags & Deletion) {
      detachFiberAfterEffects(effect);
    }

    effect = nextNextEffect;
  }

  {
    popInteractions(prevInteractions);
    finishPendingInteractions(root, lanes);
  }

  {
    isFlushingPassiveEffects = false;
  }

  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, SyncLane);
  enqueueUpdate(rootFiber, update);
  var eventTime = requestEventTime();
  var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);

  if (root !== null) {
    markRootUpdated(root, SyncLane, eventTime);
    ensureRootIsScheduled(root, eventTime);
    schedulePendingInteractions(root, SyncLane);
  }
}

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, SyncLane);
        enqueueUpdate(fiber, update);
        var eventTime = requestEventTime();
        var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);

        if (root !== null) {
          markRootUpdated(root, SyncLane, eventTime);
          ensureRootIsScheduled(root, eventTime);
          schedulePendingInteractions(root, SyncLane);
        } else {
          // This component has already been unmounted.
          // We can't schedule any follow up work for the root because the fiber is already unmounted,
          // but we can still call the log-only boundary so the error isn't swallowed.
          //
          // TODO This is only a temporary bandaid for the old reconciler fork.
          // We can delete this special case once the new fork is merged.
          if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
            try {
              instance.componentDidCatch(error, errorInfo);
            } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?
              // This is kind of an edge case.
            }
          }
        }

        return;
      }
    }

    fiber = fiber.return;
  }
}
function pingSuspendedRoot(root, wakeable, pingedLanes) {
  var pingCache = root.pingCache;

  if (pingCache !== null) {
    // The wakeable resolved, so we no longer need to memoize, because it will
    // never be thrown again.
    pingCache.delete(wakeable);
  }

  var eventTime = requestEventTime();
  markRootPinged(root, pingedLanes);

  if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
    // 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, or if it's a retry, we'll always suspend
    // so we can always restart.
    if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
      // Restart from the root.
      prepareFreshStack(root, NoLanes);
    } else {
      // Even though we can't restart right now, we might get an
      // opportunity later. So we mark this render as having a ping.
      workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
    }
  }

  ensureRootIsScheduled(root, eventTime);
  schedulePendingInteractions(root, pingedLanes);
}

function retryTimedOutBoundary(boundaryFiber, retryLane) {
  // 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.
  if (retryLane === NoLane) {
    retryLane = requestRetryLane(boundaryFiber);
  } // TODO: Special case idle priority?


  var eventTime = requestEventTime();
  var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);

  if (root !== null) {
    markRootUpdated(root, retryLane, eventTime);
    ensureRootIsScheduled(root, eventTime);
    schedulePendingInteractions(root, retryLane);
  }
}
function resolveRetryWakeable(boundaryFiber, wakeable) {
  var retryLane = NoLane; // Default

  var retryCache;

  {
    retryCache = boundaryFiber.stateNode;
  }

  if (retryCache !== null) {
    // The wakeable resolved, so we no longer need to memoize, because it will
    // never be thrown again.
    retryCache.delete(wakeable);
  }

  retryTimedOutBoundary(boundaryFiber, retryLane);
} // 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 checkForNestedUpdates() {
  if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
    nestedUpdateCount = 0;
    rootWithNestedUpdates = null;

    {
      {
        throw 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;

      error('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();

    {
      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
    }
  }
}

var didWarnStateUpdateForNotYetMountedComponent = null;

function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
  {
    if ((executionContext & RenderContext) !== NoContext) {
      // We let the other warning about render phase updates deal with this one.
      return;
    }

    if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {
      return;
    }

    var tag = fiber.tag;

    if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
      // 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 (didWarnStateUpdateForNotYetMountedComponent !== null) {
      if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
        return;
      }

      didWarnStateUpdateForNotYetMountedComponent.add(componentName);
    } else {
      didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);
    }

    var previousFiber = current;

    try {
      setCurrentFiber(fiber);

      error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');
    } finally {
      if (previousFiber) {
        setCurrentFiber(fiber);
      } else {
        resetCurrentFiber();
      }
    }
  }
}

var didWarnStateUpdateForUnmountedComponent = null;

function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
  {
    var tag = fiber.tag;

    if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
      // Only warn for user-defined components, not internal ones like Suspense.
      return;
    } // If there are pending passive effects unmounts for this Fiber,
    // we can assume that they would have prevented this update.


    if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {
      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]);
    }

    if (isFlushingPassiveEffects) ; else {
      var previousFiber = current;

      try {
        setCurrentFiber(fiber);

        error("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.', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function');
      } finally {
        if (previousFiber) {
          setCurrentFiber(fiber);
        } else {
          resetCurrentFiber();
        }
      }
    }
  }
}

var beginWork$1;

{
  var dummyFiber = null;

  beginWork$1 = function (current, unitOfWork, lanes) {
    // 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(current, unitOfWork, lanes);
    } 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 handleError; any changes here must have
      // corresponding changes there.


      resetContextDependencies();
      resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
      // same fiber again.
      // Unwind the failed stack frame

      unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.

      assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);

      if ( unitOfWork.mode & ProfileMode) {
        // Reset the profiler timer.
        startProfilerTimer(unitOfWork);
      } // Run beginWork again.


      invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);

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

var didWarnAboutUpdateInRender = false;
var didWarnAboutUpdateInRenderForAnotherComponent;

{
  didWarnAboutUpdateInRenderForAnotherComponent = new Set();
}

function warnAboutRenderPhaseUpdatesInDEV(fiber) {
  {
    if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
      switch (fiber.tag) {
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.

            var dedupeKey = renderingComponentName;

            if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
              didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
              var setStateComponentName = getComponentName(fiber.type) || 'Unknown';

              error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
            }

            break;
          }

        case ClassComponent:
          {
            if (!didWarnAboutUpdateInRender) {
              error('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 ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
      var previousFiber = current;

      try {
        setCurrentFiber(fiber);

        error("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' + // Break up imports to avoid accidentally parsing them as dependencies.
        'import {act} fr' + "om 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
        'import TestRenderer fr' + "om react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);');
      } finally {
        if (previousFiber) {
          setCurrentFiber(fiber);
        } else {
          resetCurrentFiber();
        }
      }
    }
  }
}
function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
  {
    if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
      error('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://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
    }
  }
}

function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
  {
    if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
      var previousFiber = current;

      try {
        setCurrentFiber(fiber);

        error('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://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
      } finally {
        if (previousFiber) {
          setCurrentFiber(fiber);
        } else {
          resetCurrentFiber();
        }
      }
    }
  }
}

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 & BlockingMode || fiber.mode & ConcurrentMode) {
        didWarnAboutUnmockedScheduler = true;

        error('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' + // Break up requires to avoid accidentally parsing them as dependencies.
        "jest.mock('scheduler', () => require" + "('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://reactjs.org/link/mock-scheduler');
      }
    }
  }
}

function computeThreadID(root, lane) {
  // Interaction threads are unique per root and expiration time.
  // NOTE: Intentionally unsound cast. All that matters is that it's a number
  // and it represents a batch of work. Could make a helper function instead,
  // but meh this is fine for now.
  return lane * 1000 + root.interactionThreadID;
}

function markSpawnedWork(lane) {

  if (spawnedWorkDuringRender === null) {
    spawnedWorkDuringRender = [lane];
  } else {
    spawnedWorkDuringRender.push(lane);
  }
}

function scheduleInteractions(root, lane, interactions) {

  if (interactions.size > 0) {
    var pendingInteractionMap = root.pendingInteractionMap;
    var pendingInteractions = pendingInteractionMap.get(lane);

    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(lane, 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, lane);
      subscriber.onWorkScheduled(interactions, threadID);
    }
  }
}

function schedulePendingInteractions(root, lane) {

  scheduleInteractions(root, lane, tracing.__interactionsRef.current);
}

function startWorkOnPendingInteractions(root, lanes) {
  // 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, scheduledLane) {
    if (includesSomeLane(lanes, scheduledLane)) {
      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 performConcurrentWorkOnRoot()
  // 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, lanes);

      try {
        subscriber.onWorkStarted(interactions, threadID);
      } catch (error) {
        // If the subscriber throws, rethrow it in a separate task
        scheduleCallback(ImmediatePriority$1, function () {
          throw error;
        });
      }
    }
  }
}

function finishPendingInteractions(root, committedLanes) {

  var remainingLanesAfterCommit = root.pendingLanes;
  var subscriber;

  try {
    subscriber = tracing.__subscriberRef.current;

    if (subscriber !== null && root.memoizedInteractions.size > 0) {
      // FIXME: More than one lane can finish in a single commit.
      var threadID = computeThreadID(root, committedLanes);
      subscriber.onWorkStopped(root.memoizedInteractions, threadID);
    }
  } catch (error) {
    // If the subscriber throws, rethrow it in a separate task
    scheduleCallback(ImmediatePriority$1, 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, lane) {
      // 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 (!includesSomeLane(remainingLanesAfterCommit, lane)) {
        pendingInteractionMap.delete(lane);
        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$1, function () {
                throw error;
              });
            }
          }
        });
      }
    });
  }
} // `act` testing API

function shouldForceFlushFallbacksInDEV() {
  // Never force flush in production. This function should get stripped out.
  return  actingUpdatesScopeDepth > 0;
}
// so we can tell if any async act() calls try to run in parallel.


var actingUpdatesScopeDepth = 0;

function detachFiberAfterEffects(fiber) {
  fiber.sibling = null;
  fiber.stateNode = null;
}

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();
    flushSync(function () {
      updateContainer(element, root, null, 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;
    }

    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)) {
          if (tag === ClassComponent) {
            needsRemount = true;
          } else {
            needsRender = true;
          }
        }
      }
    }

    if (failedBoundaries !== null) {
      if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
        needsRemount = true;
      }
    }

    if (needsRemount) {
      fiber._debugNeedsRemount = true;
    }

    if (needsRemount || needsRender) {
      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
    }

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

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

var hasBadMapPolyfill;

{
  hasBadMapPolyfill = false;

  try {
    var nonExtensibleObject = Object.preventExtensions({});
    /* eslint-disable no-new */

    new Map([[nonExtensibleObject, null]]);
    new Set([nonExtensibleObject]);
    /* eslint-enable no-new */
  } catch (e) {
    // TODO: Consider warning about bad polyfills
    hasBadMapPolyfill = true;
  }
}

var 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.flags = NoFlags;
  this.nextEffect = null;
  this.firstEffect = null;
  this.lastEffect = null;
  this.lanes = NoLanes;
  this.childLanes = NoLanes;
  this.alternate = null;

  {
    // 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 isn't directly used but is handy for debugging internals:
    this._debugID = debugCounter++;
    this._debugSource = null;
    this._debugOwner = null;
    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$1(Component) {
  var prototype = Component.prototype;
  return !!(prototype && prototype.isReactComponent);
}

function isSimpleFunctionComponent(type) {
  return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;
}
function resolveLazyComponentTag(Component) {
  if (typeof Component === 'function') {
    return shouldConstruct$1(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) {
  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; // Needed because Blocks store data on type.

    workInProgress.type = current.type; // We already have an alternate.
    // Reset the effect tag.

    workInProgress.flags = NoFlags; // The effect list is no longer valid.

    workInProgress.nextEffect = null;
    workInProgress.firstEffect = null;
    workInProgress.lastEffect = null;

    {
      // 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.childLanes = current.childLanes;
  workInProgress.lanes = current.lanes;
  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 : {
    lanes: currentDependencies.lanes,
    firstContext: currentDependencies.firstContext
  }; // These will be overridden during the parent's reconciliation

  workInProgress.sibling = current.sibling;
  workInProgress.index = current.index;
  workInProgress.ref = current.ref;

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

  return workInProgress;
} // Used to reuse a Fiber for a second pass.

function resetWorkInProgress(workInProgress, renderLanes) {
  // 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.flags &= 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.childLanes = NoLanes;
    workInProgress.lanes = renderLanes;
    workInProgress.child = null;
    workInProgress.memoizedProps = null;
    workInProgress.memoizedState = null;
    workInProgress.updateQueue = null;
    workInProgress.dependencies = null;
    workInProgress.stateNode = null;

    {
      // 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.childLanes = current.childLanes;
    workInProgress.lanes = current.lanes;
    workInProgress.child = current.child;
    workInProgress.memoizedProps = current.memoizedProps;
    workInProgress.memoizedState = current.memoizedState;
    workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.

    workInProgress.type = current.type; // 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 : {
      lanes: currentDependencies.lanes,
      firstContext: currentDependencies.firstContext
    };

    {
      // 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;

  if (tag === ConcurrentRoot) {
    mode = ConcurrentMode | BlockingMode | StrictMode;
  } else if (tag === BlockingRoot) {
    mode = BlockingMode | StrictMode;
  } else {
    mode = NoMode;
  }

  if ( 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, lanes) {
  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$1(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, lanes, key);

      case REACT_DEBUG_TRACING_MODE_TYPE:
        fiberTag = Mode;
        mode |= DebugTracingMode;
        break;

      case REACT_STRICT_MODE_TYPE:
        fiberTag = Mode;
        mode |= StrictMode;
        break;

      case REACT_PROFILER_TYPE:
        return createFiberFromProfiler(pendingProps, mode, lanes, key);

      case REACT_SUSPENSE_TYPE:
        return createFiberFromSuspense(pendingProps, mode, lanes, key);

      case REACT_SUSPENSE_LIST_TYPE:
        return createFiberFromSuspenseList(pendingProps, mode, lanes, key);

      case REACT_OFFSCREEN_TYPE:
        return createFiberFromOffscreen(pendingProps, mode, lanes, key);

      case REACT_LEGACY_HIDDEN_TYPE:
        return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);

      case REACT_SCOPE_TYPE:

      // eslint-disable-next-line no-fallthrough

      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_BLOCK_TYPE:
                fiberTag = Block;
                break getTag;
            }
          }

          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 + '`.';
            }
          }

          {
            {
              throw 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 );
            }
          }
        }
    }
  }

  var fiber = createFiber(fiberTag, pendingProps, key, mode);
  fiber.elementType = type;
  fiber.type = resolvedType;
  fiber.lanes = lanes;

  {
    fiber._debugOwner = owner;
  }

  return fiber;
}
function createFiberFromElement(element, mode, lanes) {
  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, lanes);

  {
    fiber._debugSource = element._source;
    fiber._debugOwner = element._owner;
  }

  return fiber;
}
function createFiberFromFragment(elements, mode, lanes, key) {
  var fiber = createFiber(Fragment, elements, key, mode);
  fiber.lanes = lanes;
  return fiber;
}

function createFiberFromProfiler(pendingProps, mode, lanes, key) {
  {
    if (typeof pendingProps.id !== 'string') {
      error('Profiler must specify an "id" as a prop');
    }
  }

  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.lanes = lanes;

  {
    fiber.stateNode = {
      effectDuration: 0,
      passiveEffectDuration: 0
    };
  }

  return fiber;
}

function createFiberFromSuspense(pendingProps, mode, lanes, 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.lanes = lanes;
  return fiber;
}
function createFiberFromSuspenseList(pendingProps, mode, lanes, 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.lanes = lanes;
  return fiber;
}
function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
  var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent 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_OFFSCREEN_TYPE;
  }

  fiber.elementType = REACT_OFFSCREEN_TYPE;
  fiber.lanes = lanes;
  return fiber;
}
function createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {
  var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden 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_LEGACY_HIDDEN_TYPE;
  }

  fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
  fiber.lanes = lanes;
  return fiber;
}
function createFiberFromText(content, mode, lanes) {
  var fiber = createFiber(HostText, content, null, mode);
  fiber.lanes = lanes;
  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, lanes) {
  var pendingProps = portal.children !== null ? portal.children : [];
  var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
  fiber.lanes = lanes;
  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.flags = source.flags;
  target.nextEffect = source.nextEffect;
  target.firstEffect = source.firstEffect;
  target.lastEffect = source.lastEffect;
  target.lanes = source.lanes;
  target.childLanes = source.childLanes;
  target.alternate = source.alternate;

  {
    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._debugNeedsRemount = source._debugNeedsRemount;
  target._debugHookTypes = source._debugHookTypes;
  return target;
}

function FiberRootNode(containerInfo, tag, hydrate) {
  this.tag = tag;
  this.containerInfo = containerInfo;
  this.pendingChildren = null;
  this.current = null;
  this.pingCache = null;
  this.finishedWork = null;
  this.timeoutHandle = noTimeout;
  this.context = null;
  this.pendingContext = null;
  this.hydrate = hydrate;
  this.callbackNode = null;
  this.callbackPriority = NoLanePriority;
  this.eventTimes = createLaneMap(NoLanes);
  this.expirationTimes = createLaneMap(NoTimestamp);
  this.pendingLanes = NoLanes;
  this.suspendedLanes = NoLanes;
  this.pingedLanes = NoLanes;
  this.expiredLanes = NoLanes;
  this.mutableReadLanes = NoLanes;
  this.finishedLanes = NoLanes;
  this.entangledLanes = NoLanes;
  this.entanglements = createLaneMap(NoLanes);

  {
    this.mutableSourceEagerHydrationData = null;
  }

  {
    this.interactionThreadID = tracing.unstable_getThreadID();
    this.memoizedInteractions = new Set();
    this.pendingInteractionMap = new Map();
  }

  {
    switch (tag) {
      case BlockingRoot:
        this._debugRootType = 'createBlockingRoot()';
        break;

      case ConcurrentRoot:
        this._debugRootType = 'createRoot()';
        break;

      case LegacyRoot:
        this._debugRootType = 'createLegacyRoot()';
        break;
    }
  }
}

function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
  var root = new FiberRootNode(containerInfo, tag, hydrate);
  // stateNode is any.


  var uninitializedFiber = createHostRootFiber(tag);
  root.current = uninitializedFiber;
  uninitializedFiber.stateNode = root;
  initializeUpdateQueue(uninitializedFiber);
  return root;
}

// This ensures that the version used for server rendering matches the one
// that is eventually read during hydration.
// If they don't match there's a potential tear and a full deopt render is required.

function registerMutableSourceForHydration(root, mutableSource) {
  var getVersion = mutableSource._getVersion;
  var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
  // Retaining it forever may interfere with GC.

  if (root.mutableSourceEagerHydrationData == null) {
    root.mutableSourceEagerHydrationData = [mutableSource, version];
  } else {
    root.mutableSourceEagerHydrationData.push(mutableSource, version);
  }
}

function createPortal(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
  };
}

var didWarnAboutNestedUpdates;
var didWarnAboutFindNodeInStrictMode;

{
  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 findHostInstanceWithWarning(component, methodName) {
  {
    var fiber = get(component);

    if (fiber === undefined) {
      if (typeof component.render === 'function') {
        {
          {
            throw Error( "Unable to find node on an unmounted component." );
          }
        }
      } else {
        {
          {
            throw 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;
        var previousFiber = current;

        try {
          setCurrentFiber(hostFiber);

          if (fiber.mode & StrictMode) {
            error('%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. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
          } else {
            error('%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. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
          }
        } finally {
          // Ideally this should reset to previous but this shouldn't be called in
          // render and there's another warning for that anyway.
          if (previousFiber) {
            setCurrentFiber(previousFiber);
          } else {
            resetCurrentFiber();
          }
        }
      }
    }

    return hostFiber.stateNode;
  }
}

function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {
  return createFiberRoot(containerInfo, tag, hydrate);
}
function updateContainer(element, container, parentComponent, callback) {
  {
    onScheduleRoot(container, element);
  }

  var current$1 = container.current;
  var eventTime = requestEventTime();

  {
    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
    if ('undefined' !== typeof jest) {
      warnIfUnmockedScheduler(current$1);
      warnIfNotScopedWithMatchingAct(current$1);
    }
  }

  var lane = requestUpdateLane(current$1);

  var context = getContextForSubtree(parentComponent);

  if (container.context === null) {
    container.context = context;
  } else {
    container.pendingContext = context;
  }

  {
    if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
      didWarnAboutNestedUpdates = true;

      error('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(eventTime, lane); // Caution: React DevTools currently depends on this property
  // being called "element".

  update.payload = {
    element: element
  };
  callback = callback === undefined ? null : callback;

  if (callback !== null) {
    {
      if (typeof callback !== 'function') {
        error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
      }
    }

    update.callback = callback;
  }

  enqueueUpdate(current$1, update);
  scheduleUpdateOnFiber(current$1, lane, eventTime);
  return lane;
}
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 markRetryLaneImpl(fiber, retryLane) {
  var suspenseState = fiber.memoizedState;

  if (suspenseState !== null && suspenseState.dehydrated !== null) {
    suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
  }
} // Increases the priority of thennables when they resolve within this boundary.


function markRetryLaneIfNotHydrated(fiber, retryLane) {
  markRetryLaneImpl(fiber, retryLane);
  var alternate = fiber.alternate;

  if (alternate) {
    markRetryLaneImpl(alternate, retryLane);
  }
}

function attemptUserBlockingHydration$1(fiber) {
  if (fiber.tag !== SuspenseComponent) {
    // We ignore HostRoots here because we can't increase
    // their priority and they should not suspend on I/O,
    // since you have to wrap anything that might suspend in
    // Suspense.
    return;
  }

  var eventTime = requestEventTime();
  var lane = InputDiscreteHydrationLane;
  scheduleUpdateOnFiber(fiber, lane, eventTime);
  markRetryLaneIfNotHydrated(fiber, lane);
}
function attemptContinuousHydration$1(fiber) {
  if (fiber.tag !== SuspenseComponent) {
    // We ignore HostRoots here because we can't increase
    // their priority and they should not suspend on I/O,
    // since you have to wrap anything that might suspend in
    // Suspense.
    return;
  }

  var eventTime = requestEventTime();
  var lane = SelectiveHydrationLane;
  scheduleUpdateOnFiber(fiber, lane, eventTime);
  markRetryLaneIfNotHydrated(fiber, lane);
}
function attemptHydrationAtCurrentPriority$1(fiber) {
  if (fiber.tag !== SuspenseComponent) {
    // We ignore HostRoots here because we can't increase
    // their priority other than synchronously flush it.
    return;
  }

  var eventTime = requestEventTime();
  var lane = requestUpdateLane(fiber);
  scheduleUpdateOnFiber(fiber, lane, eventTime);
  markRetryLaneIfNotHydrated(fiber, lane);
}
function runWithPriority$2(priority, fn) {

  try {
    setCurrentUpdateLanePriority(priority);
    return fn();
  } finally {
  }
}
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 overrideHookStateDeletePath = null;
var overrideHookStateRenamePath = null;
var overrideProps = null;
var overridePropsDeletePath = null;
var overridePropsRenamePath = null;
var scheduleUpdate = null;
var setSuspenseHandler = null;

{
  var copyWithDeleteImpl = function (obj, path, index) {
    var key = path[index];
    var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);

    if (index + 1 === path.length) {
      if (Array.isArray(updated)) {
        updated.splice(key, 1);
      } else {
        delete updated[key];
      }

      return updated;
    } // $FlowFixMe number or string is fine here


    updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
    return updated;
  };

  var copyWithDelete = function (obj, path) {
    return copyWithDeleteImpl(obj, path, 0);
  };

  var copyWithRenameImpl = function (obj, oldPath, newPath, index) {
    var oldKey = oldPath[index];
    var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);

    if (index + 1 === oldPath.length) {
      var newKey = newPath[index]; // $FlowFixMe number or string is fine here

      updated[newKey] = updated[oldKey];

      if (Array.isArray(updated)) {
        updated.splice(oldKey, 1);
      } else {
        delete updated[oldKey];
      }
    } else {
      // $FlowFixMe number or string is fine here
      updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here
      obj[oldKey], oldPath, newPath, index + 1);
    }

    return updated;
  };

  var copyWithRename = function (obj, oldPath, newPath) {
    if (oldPath.length !== newPath.length) {
      warn('copyWithRename() expects paths of the same length');

      return;
    } else {
      for (var i = 0; i < newPath.length - 1; i++) {
        if (oldPath[i] !== newPath[i]) {
          warn('copyWithRename() expects paths to be the same except for the deepest key');

          return;
        }
      }
    }

    return copyWithRenameImpl(obj, oldPath, newPath, 0);
  };

  var copyWithSetImpl = function (obj, path, index, value) {
    if (index >= path.length) {
      return value;
    }

    var key = path[index];
    var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here

    updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
    return updated;
  };

  var copyWithSet = function (obj, path, value) {
    return copyWithSetImpl(obj, path, 0, value);
  };

  var findHook = function (fiber, id) {
    // 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--;
    }

    return currentHook;
  }; // Support DevTools editable values for useState and useReducer.


  overrideHookState = function (fiber, id, path, value) {
    var hook = findHook(fiber, id);

    if (hook !== null) {
      var newState = copyWithSet(hook.memoizedState, path, value);
      hook.memoizedState = newState;
      hook.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);
      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
    }
  };

  overrideHookStateDeletePath = function (fiber, id, path) {
    var hook = findHook(fiber, id);

    if (hook !== null) {
      var newState = copyWithDelete(hook.memoizedState, path);
      hook.memoizedState = newState;
      hook.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);
      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
    }
  };

  overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
    var hook = findHook(fiber, id);

    if (hook !== null) {
      var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
      hook.memoizedState = newState;
      hook.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);
      scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
    }
  }; // Support DevTools props for function components, forwardRef, memo, host components, etc.


  overrideProps = function (fiber, path, value) {
    fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);

    if (fiber.alternate) {
      fiber.alternate.pendingProps = fiber.pendingProps;
    }

    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
  };

  overridePropsDeletePath = function (fiber, path) {
    fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);

    if (fiber.alternate) {
      fiber.alternate.pendingProps = fiber.pendingProps;
    }

    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
  };

  overridePropsRenamePath = function (fiber, oldPath, newPath) {
    fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);

    if (fiber.alternate) {
      fiber.alternate.pendingProps = fiber.pendingProps;
    }

    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
  };

  scheduleUpdate = function (fiber) {
    scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
  };

  setSuspenseHandler = function (newShouldSuspendImpl) {
    shouldSuspendImpl = newShouldSuspendImpl;
  };
}

function findHostInstanceByFiber(fiber) {
  var hostFiber = findCurrentHostFiber(fiber);

  if (hostFiber === null) {
    return null;
  }

  return hostFiber.stateNode;
}

function emptyFindFiberByHostInstance(instance) {
  return null;
}

function getCurrentFiberForDevTools() {
  return current;
}

function injectIntoDevTools(devToolsConfig) {
  var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
  return injectInternals({
    bundleType: devToolsConfig.bundleType,
    version: devToolsConfig.version,
    rendererPackageName: devToolsConfig.rendererPackageName,
    rendererConfig: devToolsConfig.rendererConfig,
    overrideHookState: overrideHookState,
    overrideHookStateDeletePath: overrideHookStateDeletePath,
    overrideHookStateRenamePath: overrideHookStateRenamePath,
    overrideProps: overrideProps,
    overridePropsDeletePath: overridePropsDeletePath,
    overridePropsRenamePath: overridePropsRenamePath,
    setSuspenseHandler: setSuspenseHandler,
    scheduleUpdate: scheduleUpdate,
    currentDispatcherRef: ReactCurrentDispatcher,
    findHostInstanceByFiber: findHostInstanceByFiber,
    findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
    // React Refresh
    findHostInstancesForRefresh:  findHostInstancesForRefresh ,
    scheduleRefresh:  scheduleRefresh ,
    scheduleRoot:  scheduleRoot ,
    setRefreshHandler:  setRefreshHandler ,
    // Enables DevTools to append owner stacks to error messages in DEV mode.
    getCurrentFiber:  getCurrentFiberForDevTools 
  });
}

function ReactDOMRoot(container, options) {
  this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
}

function ReactDOMBlockingRoot(container, tag, options) {
  this._internalRoot = createRootImpl(container, tag, options);
}

ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {
  var root = this._internalRoot;

  {
    if (typeof arguments[1] === 'function') {
      error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
    }

    var container = root.containerInfo;

    if (container.nodeType !== COMMENT_NODE) {
      var hostInstance = findHostInstanceWithNoPortals(root.current);

      if (hostInstance) {
        if (hostInstance.parentNode !== container) {
          error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
        }
      }
    }
  }

  updateContainer(children, root, null, null);
};

ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {
  {
    if (typeof arguments[0] === 'function') {
      error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
    }
  }

  var root = this._internalRoot;
  var container = root.containerInfo;
  updateContainer(null, root, null, function () {
    unmarkContainerAsRoot(container);
  });
};

function createRootImpl(container, tag, options) {
  // Tag is either LegacyRoot or Concurrent Root
  var hydrate = options != null && options.hydrate === true;
  var hydrationCallbacks = options != null && options.hydrationOptions || null;
  var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;
  var root = createContainer(container, tag, hydrate);
  markContainerAsRoot(root.current, container);
  var containerNodeType = container.nodeType;

  {
    var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
    listenToAllSupportedEvents(rootContainerElement);
  }

  if (mutableSources) {
    for (var i = 0; i < mutableSources.length; i++) {
      var mutableSource = mutableSources[i];
      registerMutableSourceForHydration(root, mutableSource);
    }
  }

  return root;
}
function createLegacyRoot(container, options) {
  return new ReactDOMBlockingRoot(container, LegacyRoot, options);
}
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 '));
}

var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
var topLevelUpdateWarnings;
var warnedAboutHydrateAPI = false;

{
  topLevelUpdateWarnings = function (container) {
    if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
      var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);

      if (hostInstance) {
        if (hostInstance.parentNode !== container) {
          error('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.');
        }
      }
    }

    var isRootRenderedBySomeReact = !!container._reactRootContainer;
    var rootEl = getReactRootElementInContainer(container);
    var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));

    if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
      error('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.');
    }

    if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
      error('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.');
    }
  };
}

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

function legacyCreateRootFromDOMContainer(container, forceHydrate) {
  var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.

  if (!shouldHydrate) {
    var warned = false;
    var rootSibling;

    while (rootSibling = container.lastChild) {
      {
        if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
          warned = true;

          error('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;

      warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v18. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
    }
  }

  return createLegacyRoot(container, shouldHydrate ? {
    hydrate: true
  } : undefined);
}

function warnOnInvalidCallback$1(callback, callerName) {
  {
    if (callback !== null && typeof callback !== 'function') {
      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
    }
  }
}

function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
  {
    topLevelUpdateWarnings(container);
    warnOnInvalidCallback$1(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;

  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 findDOMNode(componentOrElement) {
  {
    var owner = ReactCurrentOwner$3.current;

    if (owner !== null && owner.stateNode !== null) {
      var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;

      if (!warnedAboutRefsInRender) {
        error('%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');
      }

      owner.stateNode._warnedAboutRefsInRender = true;
    }
  }

  if (componentOrElement == null) {
    return null;
  }

  if (componentOrElement.nodeType === ELEMENT_NODE) {
    return componentOrElement;
  }

  {
    return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
  }
}
function hydrate(element, container, callback) {
  if (!isValidContainer(container)) {
    {
      throw Error( "Target container is not a DOM element." );
    }
  }

  {
    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

    if (isModernRoot) {
      error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');
    }
  } // TODO: throw or warn if we couldn't hydrate?


  return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
}
function render(element, container, callback) {
  if (!isValidContainer(container)) {
    {
      throw Error( "Target container is not a DOM element." );
    }
  }

  {
    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

    if (isModernRoot) {
      error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
    }
  }

  return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
}
function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
  if (!isValidContainer(containerNode)) {
    {
      throw Error( "Target container is not a DOM element." );
    }
  }

  if (!(parentComponent != null && has(parentComponent))) {
    {
      throw Error( "parentComponent must be a valid React Component" );
    }
  }

  return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
}
function unmountComponentAtNode(container) {
  if (!isValidContainer(container)) {
    {
      throw Error( "unmountComponentAtNode(...): Target container is not a DOM element." );
    }
  }

  {
    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

    if (isModernRoot) {
      error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');
    }
  }

  if (container._reactRootContainer) {
    {
      var rootEl = getReactRootElementInContainer(container);
      var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);

      if (renderedByDifferentReact) {
        error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
      }
    } // Unmount should not be batched.


    unbatchedUpdates(function () {
      legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
        // $FlowFixMe This should probably use `delete container._reactRootContainer`
        container._reactRootContainer = null;
        unmarkContainerAsRoot(container);
      });
    }); // 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(_rootEl)); // Check if the container itself is a React root node.

      var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;

      if (hasNonRootReactChild) {
        error("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.');
      }
    }

    return false;
  }
}

setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
setAttemptContinuousHydration(attemptContinuousHydration$1);
setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
setAttemptHydrationAtPriority(runWithPriority$2);
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') {
    error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
  }
}

setRestoreImplementation(restoreControlledState$3);
setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);

function createPortal$1(children, container) {
  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

  if (!isValidContainer(container)) {
    {
      throw Error( "Target container is not a DOM element." );
    }
  } // TODO: pass ReactDOM portal implementation as third argument
  // $FlowFixMe The Flow type is opaque but there's no way to actually create it.


  return createPortal(children, container, null, key);
}

function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {

  return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
}

function unstable_createPortal(children, container) {
  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

  {
    if (!didWarnAboutUnstableCreatePortal) {
      didWarnAboutUnstableCreatePortal = true;

      warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 18+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
    }
  }

  return createPortal$1(children, container, key);
}

var Internals = {
  // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.
  // This is an array for better minification.
  Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?
  IsThisRendererActing]
};
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)) {
        // eslint-disable-next-line react-internal/no-production-logging
        console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');
      }
    }
  }
}

exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal$1;
exports.findDOMNode = findDOMNode;
exports.flushSync = flushSync;
exports.hydrate = hydrate;
exports.render = render;
exports.unmountComponentAtNode = unmountComponentAtNode;
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_createPortal = unstable_createPortal;
exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
exports.version = ReactVersion;
  })();
}


/***/ }),

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

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;

{
  exports.__interactionsRef = {
    current: new Set()
  };
  exports.__subscriberRef = {
    current: null
  };
}
function unstable_clear(callback) {

  var prevInteractions = exports.__interactionsRef.current;
  exports.__interactionsRef.current = new Set();

  try {
    return callback();
  } finally {
    exports.__interactionsRef.current = prevInteractions;
  }
}
function unstable_getCurrent() {
  {
    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;

  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;

  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;

  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;

      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;

{
  subscribers = new Set();
}

function unstable_subscribe(subscriber) {
  {
    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) {
  {
    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_subscribe = unstable_subscribe;
exports.unstable_trace = unstable_trace;
exports.unstable_unsubscribe = unstable_unsubscribe;
exports.unstable_wrap = unstable_wrap;
  })();
}


/***/ }),

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

var enableSchedulerDebugging = false;
var enableProfiling = false;

var requestHostCallback;
var requestHostTimeout;
var cancelHostTimeout;
var requestPaint;
var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';

if (hasPerformanceNow) {
  var localPerformance = performance;

  exports.unstable_now = function () {
    return localPerformance.now();
  };
} else {
  var localDate = Date;
  var initialTime = localDate.now();

  exports.unstable_now = function () {
    return localDate.now() - initialTime;
  };
}

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

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

  exports.unstable_shouldYield = function () {
    return false;
  };

  requestPaint = exports.unstable_forceFrameRate = function () {};
} else {
  // Capture local references to native APIs, in case a polyfill overrides them.
  var _setTimeout = window.setTimeout;
  var _clearTimeout = window.clearTimeout;

  if (typeof console !== 'undefined') {
    // TODO: Scheduler no longer requires these methods to be polyfilled. But
    // maybe we want to continue warning if they don't exist, to preserve the
    // option to rely on it in the future?
    var requestAnimationFrame = window.requestAnimationFrame;
    var cancelAnimationFrame = window.cancelAnimationFrame;

    if (typeof requestAnimationFrame !== 'function') {
      // Using console['error'] to evade Babel and ESLint
      console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
    }

    if (typeof cancelAnimationFrame !== 'function') {
      // Using console['error'] to evade Babel and ESLint
      console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
    }
  }

  var isMessageLoopRunning = false;
  var scheduledHostCallback = null;
  var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
  // thread, like user events. By default, it yields multiple times per frame.
  // It does not attempt to align with frame boundaries, since most tasks don't
  // need to be frame aligned; for those that do, use requestAnimationFrame.

  var yieldInterval = 5;
  var deadline = 0; // TODO: Make this configurable

  {
    // `isInputPending` is not available. Since we have no way of knowing if
    // there's pending input, always yield at the end of the frame.
    exports.unstable_shouldYield = function () {
      return exports.unstable_now() >= deadline;
    }; // Since we yield every frame regardless, `requestPaint` has no effect.


    requestPaint = function () {};
  }

  exports.unstable_forceFrameRate = function (fps) {
    if (fps < 0 || fps > 125) {
      // Using console['error'] to evade Babel and ESLint
      console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');
      return;
    }

    if (fps > 0) {
      yieldInterval = Math.floor(1000 / fps);
    } else {
      // reset the framerate
      yieldInterval = 5;
    }
  };

  var performWorkUntilDeadline = function () {
    if (scheduledHostCallback !== null) {
      var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
      // cycle. This means there's always time remaining at the beginning of
      // the message event.

      deadline = currentTime + yieldInterval;
      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;
      }
    } else {
      isMessageLoopRunning = false;
    } // Yielding to the browser will give it a chance to paint, so we can
  };

  var channel = new MessageChannel();
  var port = channel.port2;
  channel.port1.onmessage = performWorkUntilDeadline;

  requestHostCallback = function (callback) {
    scheduledHostCallback = callback;

    if (!isMessageLoopRunning) {
      isMessageLoopRunning = true;
      port.postMessage(null);
    }
  };

  requestHostTimeout = function (callback, ms) {
    taskTimeoutID = _setTimeout(function () {
      callback(exports.unstable_now());
    }, ms);
  };

  cancelHostTimeout = function () {
    _clearTimeout(taskTimeoutID);

    taskTimeoutID = -1;
  };
}

function push(heap, node) {
  var index = heap.length;
  heap.push(node);
  siftUp(heap, node, index);
}
function peek(heap) {
  var first = heap[0];
  return first === undefined ? null : first;
}
function pop(heap) {
  var first = heap[0];

  if (first !== undefined) {
    var last = heap.pop();

    if (last !== first) {
      heap[0] = last;
      siftDown(heap, last, 0);
    }

    return first;
  } else {
    return null;
  }
}

function siftUp(heap, node, i) {
  var index = i;

  while (true) {
    var parentIndex = index - 1 >>> 1;
    var parent = heap[parentIndex];

    if (parent !== undefined && compare(parent, node) > 0) {
      // The parent is larger. Swap positions.
      heap[parentIndex] = node;
      heap[index] = parent;
      index = parentIndex;
    } else {
      // The parent is smaller. Exit.
      return;
    }
  }
}

function siftDown(heap, node, i) {
  var index = i;
  var length = heap.length;

  while (index < length) {
    var leftIndex = (index + 1) * 2 - 1;
    var left = heap[leftIndex];
    var rightIndex = leftIndex + 1;
    var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.

    if (left !== undefined && compare(left, node) < 0) {
      if (right !== undefined && compare(right, left) < 0) {
        heap[index] = right;
        heap[rightIndex] = node;
        index = rightIndex;
      } else {
        heap[index] = left;
        heap[leftIndex] = node;
        index = leftIndex;
      }
    } else if (right !== undefined && compare(right, node) < 0) {
      heap[index] = right;
      heap[rightIndex] = node;
      index = rightIndex;
    } else {
      // Neither child is smaller. Exit.
      return;
    }
  }
}

function compare(a, b) {
  // Compare sort index first, then task id.
  var diff = a.sortIndex - b.sortIndex;
  return diff !== 0 ? diff : a.id - b.id;
}

// TODO: Use symbols?
var ImmediatePriority = 1;
var UserBlockingPriority = 2;
var NormalPriority = 3;
var LowPriority = 4;
var IdlePriority = 5;

function markTaskErrored(task, ms) {
}

/* eslint-disable no-var */
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111

var maxSigned31BitInt = 1073741823; // Times out immediately

var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out

var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
var NORMAL_PRIORITY_TIMEOUT = 5000;
var LOW_PRIORITY_TIMEOUT = 10000; // Never times out

var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap

var taskQueue = [];
var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.

var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
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 advanceTimers(currentTime) {
  // Check for tasks that are no longer delayed and add them to the queue.
  var timer = peek(timerQueue);

  while (timer !== null) {
    if (timer.callback === null) {
      // Timer was cancelled.
      pop(timerQueue);
    } else if (timer.startTime <= currentTime) {
      // Timer fired. Transfer to the task queue.
      pop(timerQueue);
      timer.sortIndex = timer.expirationTime;
      push(taskQueue, timer);
    } else {
      // Remaining timers are pending.
      return;
    }

    timer = peek(timerQueue);
  }
}

function handleTimeout(currentTime) {
  isHostTimeoutScheduled = false;
  advanceTimers(currentTime);

  if (!isHostCallbackScheduled) {
    if (peek(taskQueue) !== null) {
      isHostCallbackScheduled = true;
      requestHostCallback(flushWork);
    } else {
      var firstTimer = peek(timerQueue);

      if (firstTimer !== null) {
        requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
      }
    }
  }
}

function flushWork(hasTimeRemaining, initialTime) {


  isHostCallbackScheduled = false;

  if (isHostTimeoutScheduled) {
    // We scheduled a timeout but it's no longer needed. Cancel it.
    isHostTimeoutScheduled = false;
    cancelHostTimeout();
  }

  isPerformingWork = true;
  var previousPriorityLevel = currentPriorityLevel;

  try {
    if (enableProfiling) {
      try {
        return workLoop(hasTimeRemaining, initialTime);
      } catch (error) {
        if (currentTask !== null) {
          var currentTime = exports.unstable_now();
          markTaskErrored(currentTask, currentTime);
          currentTask.isQueued = false;
        }

        throw error;
      }
    } else {
      // No catch in prod code path.
      return workLoop(hasTimeRemaining, initialTime);
    }
  } finally {
    currentTask = null;
    currentPriorityLevel = previousPriorityLevel;
    isPerformingWork = false;
  }
}

function workLoop(hasTimeRemaining, initialTime) {
  var currentTime = initialTime;
  advanceTimers(currentTime);
  currentTask = peek(taskQueue);

  while (currentTask !== null && !(enableSchedulerDebugging )) {
    if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) {
      // This currentTask hasn't expired, and we've reached the deadline.
      break;
    }

    var callback = currentTask.callback;

    if (typeof callback === 'function') {
      currentTask.callback = null;
      currentPriorityLevel = currentTask.priorityLevel;
      var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;

      var continuationCallback = callback(didUserCallbackTimeout);
      currentTime = exports.unstable_now();

      if (typeof continuationCallback === 'function') {
        currentTask.callback = continuationCallback;
      } else {

        if (currentTask === peek(taskQueue)) {
          pop(taskQueue);
        }
      }

      advanceTimers(currentTime);
    } else {
      pop(taskQueue);
    }

    currentTask = peek(taskQueue);
  } // Return whether there's additional work


  if (currentTask !== null) {
    return true;
  } else {
    var firstTimer = peek(timerQueue);

    if (firstTimer !== null) {
      requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
    }

    return 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 unstable_scheduleCallback(priorityLevel, callback, options) {
  var currentTime = exports.unstable_now();
  var startTime;

  if (typeof options === 'object' && options !== null) {
    var delay = options.delay;

    if (typeof delay === 'number' && delay > 0) {
      startTime = currentTime + delay;
    } else {
      startTime = currentTime;
    }
  } else {
    startTime = currentTime;
  }

  var timeout;

  switch (priorityLevel) {
    case ImmediatePriority:
      timeout = IMMEDIATE_PRIORITY_TIMEOUT;
      break;

    case UserBlockingPriority:
      timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
      break;

    case IdlePriority:
      timeout = IDLE_PRIORITY_TIMEOUT;
      break;

    case LowPriority:
      timeout = LOW_PRIORITY_TIMEOUT;
      break;

    case NormalPriority:
    default:
      timeout = NORMAL_PRIORITY_TIMEOUT;
      break;
  }

  var expirationTime = startTime + timeout;
  var newTask = {
    id: taskIdCounter++,
    callback: callback,
    priorityLevel: priorityLevel,
    startTime: startTime,
    expirationTime: expirationTime,
    sortIndex: -1
  };

  if (startTime > currentTime) {
    // This is a delayed task.
    newTask.sortIndex = startTime;
    push(timerQueue, newTask);

    if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
      // 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 {
    newTask.sortIndex = expirationTime;
    push(taskQueue, newTask);
    // wait until the next time we yield.


    if (!isHostCallbackScheduled && !isPerformingWork) {
      isHostCallbackScheduled = true;
      requestHostCallback(flushWork);
    }
  }

  return newTask;
}

function unstable_pauseExecution() {
}

function unstable_continueExecution() {

  if (!isHostCallbackScheduled && !isPerformingWork) {
    isHostCallbackScheduled = true;
    requestHostCallback(flushWork);
  }
}

function unstable_getFirstCallbackNode() {
  return peek(taskQueue);
}

function unstable_cancelCallback(task) {
  // remove from the queue because you can't remove arbitrary nodes from an
  // array based heap, only the first one.)


  task.callback = null;
}

function unstable_getCurrentPriorityLevel() {
  return currentPriorityLevel;
}

var unstable_requestPaint = requestPaint;
var unstable_Profiling =  null;

exports.unstable_IdlePriority = IdlePriority;
exports.unstable_ImmediatePriority = ImmediatePriority;
exports.unstable_LowPriority = LowPriority;
exports.unstable_NormalPriority = NormalPriority;
exports.unstable_Profiling = unstable_Profiling;
exports.unstable_UserBlockingPriority = UserBlockingPriority;
exports.unstable_cancelCallback = unstable_cancelCallback;
exports.unstable_continueExecution = unstable_continueExecution;
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
exports.unstable_next = unstable_next;
exports.unstable_pauseExecution = unstable_pauseExecution;
exports.unstable_requestPaint = unstable_requestPaint;
exports.unstable_runWithPriority = unstable_runWithPriority;
exports.unstable_scheduleCallback = unstable_scheduleCallback;
exports.unstable_wrapCallback = unstable_wrapCallback;
  })();
}


/***/ }),

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

// TODO: this is special because it gets imported during build.
var ReactVersion = '17.0.2';

// ATTENTION
// When adding new symbols to this file,
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
// 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 REACT_ELEMENT_TYPE = 0xeac7;
var REACT_PORTAL_TYPE = 0xeaca;
exports.Fragment = 0xeacb;
exports.StrictMode = 0xeacc;
exports.Profiler = 0xead2;
var REACT_PROVIDER_TYPE = 0xeacd;
var REACT_CONTEXT_TYPE = 0xeace;
var REACT_FORWARD_REF_TYPE = 0xead0;
exports.Suspense = 0xead1;
var REACT_SUSPENSE_LIST_TYPE = 0xead8;
var REACT_MEMO_TYPE = 0xead3;
var REACT_LAZY_TYPE = 0xead4;
var REACT_BLOCK_TYPE = 0xead9;
var REACT_SERVER_BLOCK_TYPE = 0xeada;
var REACT_FUNDAMENTAL_TYPE = 0xead5;
var REACT_SCOPE_TYPE = 0xead7;
var REACT_OPAQUE_ID_TYPE = 0xeae0;
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
var REACT_OFFSCREEN_TYPE = 0xeae2;
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;

if (typeof Symbol === 'function' && Symbol.for) {
  var symbolFor = Symbol.for;
  REACT_ELEMENT_TYPE = symbolFor('react.element');
  REACT_PORTAL_TYPE = symbolFor('react.portal');
  exports.Fragment = symbolFor('react.fragment');
  exports.StrictMode = symbolFor('react.strict_mode');
  exports.Profiler = symbolFor('react.profiler');
  REACT_PROVIDER_TYPE = symbolFor('react.provider');
  REACT_CONTEXT_TYPE = symbolFor('react.context');
  REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
  exports.Suspense = symbolFor('react.suspense');
  REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
  REACT_MEMO_TYPE = symbolFor('react.memo');
  REACT_LAZY_TYPE = symbolFor('react.lazy');
  REACT_BLOCK_TYPE = symbolFor('react.block');
  REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
  REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
  REACT_SCOPE_TYPE = symbolFor('react.scope');
  REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
  REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
  REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
  REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
}

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

/**
 * 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 = {
  transition: 0
};

/**
 * 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 ReactDebugCurrentFrame = {};
var currentExtraStackFrame = null;
function setExtraStackFrame(stack) {
  {
    currentExtraStackFrame = stack;
  }
}

{
  ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
    {
      currentExtraStackFrame = stack;
    }
  }; // 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 (currentExtraStackFrame) {
      stack += currentExtraStackFrame;
    } // 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
};

{
  ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
}

// by calls to these methods by a Babel plugin.
//
// In PROD (or in packages without access to React internals),
// they are left as they are instead.

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

    printWarning('warn', format, args);
  }
}
function error(format) {
  {
    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      args[_key2 - 1] = arguments[_key2];
    }

    printWarning('error', format, args);
  }
}

function printWarning(level, format, args) {
  // When changing this logic, you might want to also
  // update consoleWithStackDev.www.js as well.
  {
    var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
    var stack = ReactDebugCurrentFrame.getStackAddendum();

    if (stack !== '') {
      format += '%s';
      args = args.concat([stack]);
    }

    var argsWithFormat = args.map(function (item) {
      return '' + item;
    }); // Careful: RN currently depends on this prefix

    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
    // breaks IE9: https://github.com/facebook/react/issues/13610
    // eslint-disable-next-line react-internal/no-production-logging

    Function.prototype.apply.call(console[level], console, argsWithFormat);
  }
}

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

    error("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) {
  if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
    {
      throw 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 () {
        warn('%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;
}

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

function getContextName(type) {
  return type.displayName || 'Context';
}

function getComponentName(type) {
  if (type == null) {
    // Host root, text node or just invalid type.
    return null;
  }

  {
    if (typeof type.tag === 'number') {
      error('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 exports.Fragment:
      return 'Fragment';

    case REACT_PORTAL_TYPE:
      return 'Portal';

    case exports.Profiler:
      return 'Profiler';

    case exports.StrictMode:
      return 'StrictMode';

    case exports.Suspense:
      return 'Suspense';

    case REACT_SUSPENSE_LIST_TYPE:
      return 'SuspenseList';
  }

  if (typeof type === 'object') {
    switch (type.$$typeof) {
      case REACT_CONTEXT_TYPE:
        var context = type;
        return getContextName(context) + '.Consumer';

      case REACT_PROVIDER_TYPE:
        var provider = type;
        return getContextName(provider._context) + '.Provider';

      case REACT_FORWARD_REF_TYPE:
        return getWrappedName(type, type.render, 'ForwardRef');

      case REACT_MEMO_TYPE:
        return getComponentName(type.type);

      case REACT_BLOCK_TYPE:
        return getComponentName(type._render);

      case REACT_LAZY_TYPE:
        {
          var lazyComponent = type;
          var payload = lazyComponent._payload;
          var init = lazyComponent._init;

          try {
            return getComponentName(init(payload));
          } catch (x) {
            return null;
          }
        }
    }
  }

  return null;
}

var hasOwnProperty = Object.prototype.hasOwnProperty;
var RESERVED_PROPS = {
  key: true,
  ref: true,
  __self: true,
  __source: true
};
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;

{
  didWarnAboutStringRefs = {};
}

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;

        error('%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://reactjs.org/link/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;

        error('%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://reactjs.org/link/special-props)', displayName);
      }
    }
  };

  warnAboutAccessingRef.isReactWarning = true;
  Object.defineProperty(props, 'ref', {
    get: warnAboutAccessingRef,
    configurable: true
  });
}

function warnIfStringRefCannotBeAutoConverted(config) {
  {
    if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
      var componentName = getComponentName(ReactCurrentOwner.current.type);

      if (!didWarnAboutStringRefs[componentName]) {
        error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);

        didWarnAboutStringRefs[componentName] = 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, instanceof check
 * will not 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;
};
/**
 * 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; // 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;

      {
        warnIfStringRefCannotBeAutoConverted(config);
      }
    }

    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);
}
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) {
  if (!!(element === null || element === undefined)) {
    {
      throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
    }
  }

  var propName; // 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;

    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, '$&/');
}
/**
 * Generate a key string that identifies a element within a set.
 *
 * @param {*} element A element that could contain a manual key.
 * @param {number} index Index that is used if a manual key is not provided.
 * @return {string}
 */


function getElementKey(element, 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 element === 'object' && element !== null && element.key != null) {
    // Explicit key
    return escape('' + element.key);
  } // Implicit key determined by the index in the set


  return index.toString(36);
}

function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
  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) {
    var _child = children;
    var mappedChild = callback(_child); // 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:

    var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;

    if (Array.isArray(mappedChild)) {
      var escapedChildKey = '';

      if (childKey != null) {
        escapedChildKey = escapeUserProvidedKey(childKey) + '/';
      }

      mapIntoArray(mappedChild, array, escapedChildKey, '', 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
        escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
        mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
        escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
      }

      array.push(mappedChild);
    }

    return 1;
  }

  var child;
  var nextName;
  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 + getElementKey(child, i);
      subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
    }
  } else {
    var iteratorFn = getIteratorFn(children);

    if (typeof iteratorFn === 'function') {
      var iterableChildren = children;

      {
        // Warn about using Maps as children
        if (iteratorFn === iterableChildren.entries) {
          if (!didWarnAboutMaps) {
            warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
          }

          didWarnAboutMaps = true;
        }
      }

      var iterator = iteratorFn.call(iterableChildren);
      var step;
      var ii = 0;

      while (!(step = iterator.next()).done) {
        child = step.value;
        nextName = nextNamePrefix + getElementKey(child, ii++);
        subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
      }
    } else if (type === 'object') {
      var childrenString = '' + children;

      {
        {
          throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). If you meant to render a collection of children, use an array instead." );
        }
      }
    }
  }

  return subtreeCount;
}

/**
 * Maps children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenmap
 *
 * The provided mapFunction(child, 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 = [];
  var count = 0;
  mapIntoArray(children, result, '', '', function (child) {
    return func.call(context, child, count++);
  });
  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) {
  var n = 0;
  mapChildren(children, function () {
    n++; // Don't return anything
  });
  return n;
}

/**
 * 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) {
  mapChildren(children, function () {
    forEachFunc.apply(this, arguments); // Don't return anything.
  }, forEachContext);
}
/**
 * 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) {
  return mapChildren(children, function (child) {
    return child;
  }) || [];
}
/**
 * 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) {
  if (!isValidElement(children)) {
    {
      throw Error( "React.Children.only expected to receive a single React element child." );
    }
  }

  return children;
}

function createContext(defaultValue, calculateChangedBits) {
  if (calculateChangedBits === undefined) {
    calculateChangedBits = null;
  } else {
    {
      if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
        error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
      }
    }
  }

  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;
  var hasWarnedAboutDisplayNameOnConsumer = 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;

            error('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;

            error('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;
        }
      },
      displayName: {
        get: function () {
          return context.displayName;
        },
        set: function (displayName) {
          if (!hasWarnedAboutDisplayNameOnConsumer) {
            warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);

            hasWarnedAboutDisplayNameOnConsumer = true;
          }
        }
      }
    }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty

    context.Consumer = Consumer;
  }

  {
    context._currentRenderer = null;
    context._currentRenderer2 = null;
  }

  return context;
}

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

function lazyInitializer(payload) {
  if (payload._status === Uninitialized) {
    var ctor = payload._result;
    var thenable = ctor(); // Transition to the next state.

    var pending = payload;
    pending._status = Pending;
    pending._result = thenable;
    thenable.then(function (moduleObject) {
      if (payload._status === Pending) {
        var defaultExport = moduleObject.default;

        {
          if (defaultExport === undefined) {
            error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n  ' + // Break up imports to avoid accidentally parsing them as dependencies.
            'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
          }
        } // Transition to the next state.


        var resolved = payload;
        resolved._status = Resolved;
        resolved._result = defaultExport;
      }
    }, function (error) {
      if (payload._status === Pending) {
        // Transition to the next state.
        var rejected = payload;
        rejected._status = Rejected;
        rejected._result = error;
      }
    });
  }

  if (payload._status === Resolved) {
    return payload._result;
  } else {
    throw payload._result;
  }
}

function lazy(ctor) {
  var payload = {
    // We use these fields to store the result.
    _status: -1,
    _result: ctor
  };
  var lazyType = {
    $$typeof: REACT_LAZY_TYPE,
    _payload: payload,
    _init: lazyInitializer
  };

  {
    // In production, this would just set it on the object.
    var defaultProps;
    var propTypes; // $FlowFixMe

    Object.defineProperties(lazyType, {
      defaultProps: {
        configurable: true,
        get: function () {
          return defaultProps;
        },
        set: function (newDefaultProps) {
          error('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:
          // $FlowFixMe

          Object.defineProperty(lazyType, 'defaultProps', {
            enumerable: true
          });
        }
      },
      propTypes: {
        configurable: true,
        get: function () {
          return propTypes;
        },
        set: function (newPropTypes) {
          error('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:
          // $FlowFixMe

          Object.defineProperty(lazyType, 'propTypes', {
            enumerable: true
          });
        }
      }
    });
  }

  return lazyType;
}

function forwardRef(render) {
  {
    if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
      error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
    } else if (typeof render !== 'function') {
      error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
    } else {
      if (render.length !== 0 && render.length !== 2) {
        error('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.');
      }
    }

    if (render != null) {
      if (render.defaultProps != null || render.propTypes != null) {
        error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
      }
    }
  }

  var elementType = {
    $$typeof: REACT_FORWARD_REF_TYPE,
    render: render
  };

  {
    var ownName;
    Object.defineProperty(elementType, 'displayName', {
      enumerable: false,
      configurable: true,
      get: function () {
        return ownName;
      },
      set: function (name) {
        ownName = name;

        if (render.displayName == null) {
          render.displayName = name;
        }
      }
    });
  }

  return elementType;
}

// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.

var enableScopeAPI = false; // Experimental Create Event Handle API.

function isValidElementType(type) {
  if (typeof type === 'string' || typeof type === 'function') {
    return true;
  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).


  if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
    return true;
  }

  if (typeof type === 'object' && type !== null) {
    if (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_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
      return true;
    }
  }

  return false;
}

function memo(type, compare) {
  {
    if (!isValidElementType(type)) {
      error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
    }
  }

  var elementType = {
    $$typeof: REACT_MEMO_TYPE,
    type: type,
    compare: compare === undefined ? null : compare
  };

  {
    var ownName;
    Object.defineProperty(elementType, 'displayName', {
      enumerable: false,
      configurable: true,
      get: function () {
        return ownName;
      },
      set: function (name) {
        ownName = name;

        if (type.displayName == null) {
          type.displayName = name;
        }
      }
    });
  }

  return elementType;
}

function resolveDispatcher() {
  var dispatcher = ReactCurrentDispatcher.current;

  if (!(dispatcher !== null)) {
    {
      throw 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://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
    }
  }

  return dispatcher;
}

function useContext(Context, unstable_observedBits) {
  var dispatcher = resolveDispatcher();

  {
    if (unstable_observedBits !== undefined) {
      error('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://reactjs.org/link/rules-of-hooks' : '');
    } // 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) {
        error('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) {
        error('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, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useEffect(create, deps);
}
function useLayoutEffect(create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useLayoutEffect(create, deps);
}
function useCallback(callback, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useCallback(callback, deps);
}
function useMemo(create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useMemo(create, deps);
}
function useImperativeHandle(ref, create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useImperativeHandle(ref, create, deps);
}
function useDebugValue(value, formatterFn) {
  {
    var dispatcher = resolveDispatcher();
    return dispatcher.useDebugValue(value, formatterFn);
  }
}

// Helpers to patch console.logs to avoid logging during side-effect free
// replaying on render function. This currently only patches the object
// lazily which won't cover if the log function was extracted eagerly.
// We could also eagerly patch the method.
var disabledDepth = 0;
var prevLog;
var prevInfo;
var prevWarn;
var prevError;
var prevGroup;
var prevGroupCollapsed;
var prevGroupEnd;

function disabledLog() {}

disabledLog.__reactDisabledLog = true;
function disableLogs() {
  {
    if (disabledDepth === 0) {
      /* eslint-disable react-internal/no-production-logging */
      prevLog = console.log;
      prevInfo = console.info;
      prevWarn = console.warn;
      prevError = console.error;
      prevGroup = console.group;
      prevGroupCollapsed = console.groupCollapsed;
      prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099

      var props = {
        configurable: true,
        enumerable: true,
        value: disabledLog,
        writable: true
      }; // $FlowFixMe Flow thinks console is immutable.

      Object.defineProperties(console, {
        info: props,
        log: props,
        warn: props,
        error: props,
        group: props,
        groupCollapsed: props,
        groupEnd: props
      });
      /* eslint-enable react-internal/no-production-logging */
    }

    disabledDepth++;
  }
}
function reenableLogs() {
  {
    disabledDepth--;

    if (disabledDepth === 0) {
      /* eslint-disable react-internal/no-production-logging */
      var props = {
        configurable: true,
        enumerable: true,
        writable: true
      }; // $FlowFixMe Flow thinks console is immutable.

      Object.defineProperties(console, {
        log: _assign({}, props, {
          value: prevLog
        }),
        info: _assign({}, props, {
          value: prevInfo
        }),
        warn: _assign({}, props, {
          value: prevWarn
        }),
        error: _assign({}, props, {
          value: prevError
        }),
        group: _assign({}, props, {
          value: prevGroup
        }),
        groupCollapsed: _assign({}, props, {
          value: prevGroupCollapsed
        }),
        groupEnd: _assign({}, props, {
          value: prevGroupEnd
        })
      });
      /* eslint-enable react-internal/no-production-logging */
    }

    if (disabledDepth < 0) {
      error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
    }
  }
}

var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
var prefix;
function describeBuiltInComponentFrame(name, source, ownerFn) {
  {
    if (prefix === undefined) {
      // Extract the VM specific prefix used by each line.
      try {
        throw Error();
      } catch (x) {
        var match = x.stack.trim().match(/\n( *(at )?)/);
        prefix = match && match[1] || '';
      }
    } // We use the prefix to ensure our stacks line up with native stack frames.


    return '\n' + prefix + name;
  }
}
var reentry = false;
var componentFrameCache;

{
  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
  componentFrameCache = new PossiblyWeakMap();
}

function describeNativeComponentFrame(fn, construct) {
  // If something asked for a stack inside a fake render, it should get ignored.
  if (!fn || reentry) {
    return '';
  }

  {
    var frame = componentFrameCache.get(fn);

    if (frame !== undefined) {
      return frame;
    }
  }

  var control;
  reentry = true;
  var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.

  Error.prepareStackTrace = undefined;
  var previousDispatcher;

  {
    previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
    // for warnings.

    ReactCurrentDispatcher$1.current = null;
    disableLogs();
  }

  try {
    // This should throw.
    if (construct) {
      // Something should be setting the props in the constructor.
      var Fake = function () {
        throw Error();
      }; // $FlowFixMe


      Object.defineProperty(Fake.prototype, 'props', {
        set: function () {
          // We use a throwing setter instead of frozen or non-writable props
          // because that won't throw in a non-strict mode function.
          throw Error();
        }
      });

      if (typeof Reflect === 'object' && Reflect.construct) {
        // We construct a different control for this case to include any extra
        // frames added by the construct call.
        try {
          Reflect.construct(Fake, []);
        } catch (x) {
          control = x;
        }

        Reflect.construct(fn, [], Fake);
      } else {
        try {
          Fake.call();
        } catch (x) {
          control = x;
        }

        fn.call(Fake.prototype);
      }
    } else {
      try {
        throw Error();
      } catch (x) {
        control = x;
      }

      fn();
    }
  } catch (sample) {
    // This is inlined manually because closure doesn't do it for us.
    if (sample && control && typeof sample.stack === 'string') {
      // This extracts the first frame from the sample that isn't also in the control.
      // Skipping one frame that we assume is the frame that calls the two.
      var sampleLines = sample.stack.split('\n');
      var controlLines = control.stack.split('\n');
      var s = sampleLines.length - 1;
      var c = controlLines.length - 1;

      while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
        // We expect at least one stack frame to be shared.
        // Typically this will be the root most one. However, stack frames may be
        // cut off due to maximum stack limits. In this case, one maybe cut off
        // earlier than the other. We assume that the sample is longer or the same
        // and there for cut off earlier. So we should find the root most frame in
        // the sample somewhere in the control.
        c--;
      }

      for (; s >= 1 && c >= 0; s--, c--) {
        // Next we find the first one that isn't the same which should be the
        // frame that called our sample function and the control.
        if (sampleLines[s] !== controlLines[c]) {
          // In V8, the first line is describing the message but other VMs don't.
          // If we're about to return the first line, and the control is also on the same
          // line, that's a pretty good indicator that our sample threw at same line as
          // the control. I.e. before we entered the sample frame. So we ignore this result.
          // This can happen if you passed a class to function component, or non-function.
          if (s !== 1 || c !== 1) {
            do {
              s--;
              c--; // We may still have similar intermediate frames from the construct call.
              // The next one that isn't the same should be our match though.

              if (c < 0 || sampleLines[s] !== controlLines[c]) {
                // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
                var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');

                {
                  if (typeof fn === 'function') {
                    componentFrameCache.set(fn, _frame);
                  }
                } // Return the line we found.


                return _frame;
              }
            } while (s >= 1 && c >= 0);
          }

          break;
        }
      }
    }
  } finally {
    reentry = false;

    {
      ReactCurrentDispatcher$1.current = previousDispatcher;
      reenableLogs();
    }

    Error.prepareStackTrace = previousPrepareStackTrace;
  } // Fallback to just using the name if we couldn't make it throw.


  var name = fn ? fn.displayName || fn.name : '';
  var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';

  {
    if (typeof fn === 'function') {
      componentFrameCache.set(fn, syntheticFrame);
    }
  }

  return syntheticFrame;
}
function describeFunctionComponentFrame(fn, source, ownerFn) {
  {
    return describeNativeComponentFrame(fn, false);
  }
}

function shouldConstruct(Component) {
  var prototype = Component.prototype;
  return !!(prototype && prototype.isReactComponent);
}

function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {

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

  if (typeof type === 'function') {
    {
      return describeNativeComponentFrame(type, shouldConstruct(type));
    }
  }

  if (typeof type === 'string') {
    return describeBuiltInComponentFrame(type);
  }

  switch (type) {
    case exports.Suspense:
      return describeBuiltInComponentFrame('Suspense');

    case REACT_SUSPENSE_LIST_TYPE:
      return describeBuiltInComponentFrame('SuspenseList');
  }

  if (typeof type === 'object') {
    switch (type.$$typeof) {
      case REACT_FORWARD_REF_TYPE:
        return describeFunctionComponentFrame(type.render);

      case REACT_MEMO_TYPE:
        // Memo may contain any component type so we recursively resolve it.
        return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);

      case REACT_BLOCK_TYPE:
        return describeFunctionComponentFrame(type._render);

      case REACT_LAZY_TYPE:
        {
          var lazyComponent = type;
          var payload = lazyComponent._payload;
          var init = lazyComponent._init;

          try {
            // Lazy may contain any component type so we recursively resolve it.
            return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
          } catch (x) {}
        }
    }
  }

  return '';
}

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

function setCurrentlyValidatingElement(element) {
  {
    if (element) {
      var owner = element._owner;
      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
      ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
    } else {
      ReactDebugCurrentFrame$1.setExtraStackFrame(null);
    }
  }
}

function checkPropTypes(typeSpecs, values, location, componentName, element) {
  {
    // $FlowFixMe This is okay but Flow doesn't know it.
    var has = Function.call.bind(Object.prototype.hasOwnProperty);

    for (var typeSpecName in typeSpecs) {
      if (has(typeSpecs, typeSpecName)) {
        var error$1 = void 0; // 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] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
            err.name = 'Invariant Violation';
            throw err;
          }

          error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
        } catch (ex) {
          error$1 = ex;
        }

        if (error$1 && !(error$1 instanceof Error)) {
          setCurrentlyValidatingElement(element);

          error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);

          setCurrentlyValidatingElement(null);
        }

        if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
          // Only monitor this failure once because there tends to be a lot of the
          // same error.
          loggedTypeFailures[error$1.message] = true;
          setCurrentlyValidatingElement(element);

          error('Failed %s type: %s', location, error$1.message);

          setCurrentlyValidatingElement(null);
        }
      }
    }
  }
}

function setCurrentlyValidatingElement$1(element) {
  {
    if (element) {
      var owner = element._owner;
      var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
      setExtraStackFrame(stack);
    } else {
      setExtraStackFrame(null);
    }
  }
}

var propTypesMisspellWarningShown;

{
  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$1(element);

    error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);

    setCurrentlyValidatingElement$1(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;

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

    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) {
      // Intentionally inside to avoid triggering lazy initializers:
      var name = getComponentName(type);
      checkPropTypes(propTypes, element.props, 'prop', name, element);
    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
      propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:

      var _name = getComponentName(type);

      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
    }

    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
    }
  }
}
/**
 * Given a fragment, validate that it can only be provided with fragment props
 * @param {ReactElement} fragment
 */


function validateFragmentProps(fragment) {
  {
    var keys = Object.keys(fragment.props);

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

      if (key !== 'children' && key !== 'key') {
        setCurrentlyValidatingElement$1(fragment);

        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);

        setCurrentlyValidatingElement$1(null);
        break;
      }
    }

    if (fragment.ref !== null) {
      setCurrentlyValidatingElement$1(fragment);

      error('Invalid attribute `ref` supplied to `React.Fragment`.');

      setCurrentlyValidatingElement$1(null);
    }
  }
}
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;

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

    {
      error('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 === exports.Fragment) {
    validateFragmentProps(element);
  } else {
    validatePropTypes(element);
  }

  return element;
}
var didWarnAboutDeprecatedCreateFactory = false;
function createFactoryWithValidation(type) {
  var validatedFactory = createElementWithValidation.bind(null, type);
  validatedFactory.type = type;

  {
    if (!didWarnAboutDeprecatedCreateFactory) {
      didWarnAboutDeprecatedCreateFactory = true;

      warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
    } // Legacy hook: remove it


    Object.defineProperty(validatedFactory, 'type', {
      enumerable: false,
      get: function () {
        warn('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;
}

{

  try {
    var frozenObject = Object.freeze({});
    /* eslint-disable no-new */

    new Map([[frozenObject, null]]);
    new Set([frozenObject]);
    /* eslint-enable no-new */
  } catch (e) {
  }
}

var createElement$1 =  createElementWithValidation ;
var cloneElement$1 =  cloneElementWithValidation ;
var createFactory =  createFactoryWithValidation ;
var Children = {
  map: mapChildren,
  forEach: forEachChildren,
  count: countChildren,
  toArray: toArray,
  only: onlyChild
};

exports.Children = Children;
exports.Component = Component;
exports.PureComponent = PureComponent;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
exports.cloneElement = cloneElement$1;
exports.createContext = createContext;
exports.createElement = createElement$1;
exports.createFactory = createFactory;
exports.createRef = createRef;
exports.forwardRef = forwardRef;
exports.isValidElement = isValidElement;
exports.lazy = lazy;
exports.memo = memo;
exports.useCallback = useCallback;
exports.useContext = useContext;
exports.useDebugValue = useDebugValue;
exports.useEffect = useEffect;
exports.useImperativeHandle = useImperativeHandle;
exports.useLayoutEffect = useLayoutEffect;
exports.useMemo = useMemo;
exports.useReducer = useReducer;
exports.useRef = useRef;
exports.useState = useState;
exports.version = ReactVersion;
  })();
}


/***/ }),

/***/ "./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(t,e){ true?module.exports=e(__webpack_require__(/*! react */ "./node_modules/react/index.js"),__webpack_require__(/*! react-dom */ "./node_modules/react-dom/index.js")):undefined}(this,(function(t,e){return function(t){var e={};function A(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,A),r.l=!0,r.exports}return A.m=t,A.c=e,A.d=function(t,e,n){A.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},A.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},A.t=function(t,e){if(1&e&&(t=A(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(A.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)A.d(n,r,function(e){return t[e]}.bind(null,r));return n},A.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return A.d(e,"a",e),e},A.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},A.p="./",A(A.s=1477)}([function(e,A){e.exports=t},function(t,e,A){"use strict";function n(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}A.d(e,"a",(function(){return n}))},function(t,e,A){t.exports=A(443)},function(t,e,A){"use strict";var n=function(t,e,A){return t.fields=e||[],t.fname=A,t};function r(t){return null==t?null:t.fname}function i(t){return null==t?null:t.fields}var o=function(t){return 1===t.length?a(t[0]):s(t)},a=function(t){return function(e){return e[t]}},s=function(t){var e=t.length;return function(A){for(var n=0;n<e;++n)A=A[t[n]];return A}},g=function(t){throw Error(t)},c=function(t){var e,A,n,r=[],i=null,o=0,a=t.length,s="";function c(){r.push(s+t.substring(e,A)),s="",e=A+1}for(t+="",e=A=0;A<a;++A)if("\\"===(n=t[A]))s+=t.substring(e,A),s+=t.substring(++A,++A),e=A;else if(n===i)c(),i=null,o=-1;else{if(i)continue;e===o&&'"'===n||e===o&&"'"===n?(e=A+1,i=n):"."!==n||o?"["===n?(A>e&&c(),o=e=A+1):"]"===n&&(o||g("Access path missing open bracket: "+t),o>0&&c(),o=0,e=A+1):A>e?c():e=A+1}return o&&g("Access path missing closing bracket: "+t),i&&g("Access path missing closing quote: "+t),A>e&&(A++,c()),r},I=function(t,e,A){var r=c(t);return t=1===r.length?r[0]:t,n((A&&A.get||o)(r),[t],e||t)},u=[],l=I("id"),C=n((function(t){return t}),u,"identity"),h=n((function(){return 0}),u,"zero"),B=n((function(){return 1}),u,"one"),f=n((function(){return!0}),u,"true"),d=n((function(){return!1}),u,"false");function Q(t,e,A){var n=[e].concat([].slice.call(A));console[t].apply(console,n)}var E=function(t,e){var A=t||0;return{level:function(t){return arguments.length?(A=+t,this):A},error:function(){return A>=1&&Q(e||"error","ERROR",arguments),this},warn:function(){return A>=2&&Q(e||"warn","WARN",arguments),this},info:function(){return A>=3&&Q(e||"log","INFO",arguments),this},debug:function(){return A>=4&&Q(e||"log","DEBUG",arguments),this}}},p=Array.isArray,y=function(t){return t===Object(t)},v=function(t){return"__proto__"!==t};function m(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];return e.reduce((function(t,e){for(var A in e)if("signals"===A)t.signals=F(t.signals,e.signals);else{var n="legend"===A?{layout:1}:"style"===A||null;b(t,A,e[A],n)}return t}),{})}function b(t,e,A,n){var r,i;if(v(e))if(y(A)&&!p(A))for(r in i=y(t[e])?t[e]:t[e]={},A)n&&(!0===n||n[r])?b(i,r,A[r]):v(r)&&(i[r]=A[r]);else t[e]=A}function F(t,e){if(null==t)return e;var A={},n=[];function r(t){A[t.name]||(A[t.name]=1,n.push(t))}return e.forEach(r),t.forEach(r),n}var w=function(t){return t[t.length-1]},S=function(t){return null==t||""===t?null:+t};function D(t){return function(e){return t*Math.exp(e)}}function R(t){return function(e){return Math.log(t*e)}}function U(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function G(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function N(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function k(t,e,A,n){var r=A(t[0]),i=A(w(t)),o=(i-r)*e;return[n(r-o),n(i-o)]}function x(t,e){return k(t,e,S,C)}function O(t,e){var A=Math.sign(t[0]);return k(t,e,R(A),D(A))}function M(t,e,A){return k(t,e,N(A),N(1/A))}function L(t,e,A){return k(t,e,U(A),G(A))}function _(t,e,A,n,r){var i=n(t[0]),o=n(w(t)),a=null!=e?n(e):(i+o)/2;return[r(a+(i-a)*A),r(a+(o-a)*A)]}function J(t,e,A){return _(t,e,A,S,C)}function T(t,e,A){var n=Math.sign(t[0]);return _(t,e,A,R(n),D(n))}function j(t,e,A,n){return _(t,e,A,N(n),N(1/n))}function H(t,e,A,n){return _(t,e,A,U(n),G(n))}function Y(t){return 1+~~(new Date(t).getMonth()/3)}function V(t){return 1+~~(new Date(t).getUTCMonth()/3)}var Z=function(t){return null!=t?p(t)?t:[t]:[]},W=function(t,e,A){var n,r=t[0],i=t[1];return i<r&&(n=i,i=r,r=n),(n=i-r)>=A-e?[e,A]:[r=Math.min(Math.max(r,e),A-n),r+n]},K=function(t){return"function"===typeof t},P=function(t,e,A){A=A||{},e=Z(e)||[];var r=[],o=[],a={},s=A.comparator||X;return Z(t).forEach((function(t,n){null!=t&&(r.push("descending"===e[n]?-1:1),o.push(t=K(t)?t:I(t,null,A)),(i(t)||[]).forEach((function(t){return a[t]=1})))})),0===o.length?null:n(s(o,r),Object.keys(a))},q=function(t,e){return(t<e||null==t)&&null!=e?-1:(t>e||null==e)&&null!=t?1:(e=e instanceof Date?+e:e,(t=t instanceof Date?+t:t)!==t&&e===e?-1:e!==e&&t===t?1:0)},X=function(t,e){return 1===t.length?z(t[0],e[0]):$(t,e,t.length)},z=function(t,e){return function(A,n){return q(t(A),t(n))*e}},$=function(t,e,A){return e.push(0),function(n,r){for(var i,o=0,a=-1;0===o&&++a<A;)i=t[a],o=q(i(n),i(r));return o*e[a]}},tt=function(t){return K(t)?t:function(){return t}},et=function(t,e){var A,n;function r(){e(n),A=n=null}return function(e){n=e,A&&clearTimeout(A),A=setTimeout(r,t)}},At=function(t){for(var e,A,n=1,r=arguments.length;n<r;++n)for(A in e=arguments[n])t[A]=e[A];return t},nt=function(t,e){var A,n,r,i,o=0;if(t&&(A=t.length))if(null==e){for(n=t[o];o<A&&(null==n||n!==n);n=t[++o]);for(r=i=n;o<A;++o)null!=(n=t[o])&&(n<r&&(r=n),n>i&&(i=n))}else{for(n=e(t[o]);o<A&&(null==n||n!==n);n=e(t[++o]));for(r=i=n;o<A;++o)null!=(n=e(t[o]))&&(n<r&&(r=n),n>i&&(i=n))}return[r,i]},rt=function(t,e){var A,n,r,i,o,a=-1,s=t.length;if(null==e){for(;++a<s;)if(null!=(n=t[a])&&n>=n){A=r=n;break}if(a===s)return[-1,-1];for(i=o=a;++a<s;)null!=(n=t[a])&&(A>n&&(A=n,i=a),r<n&&(r=n,o=a))}else{for(;++a<s;)if(null!=(n=e(t[a],a,t))&&n>=n){A=r=n;break}if(a===s)return[-1,-1];for(i=o=a;++a<s;)null!=(n=e(t[a],a,t))&&(A>n&&(A=n,i=a),r<n&&(r=n,o=a))}return[i,o]},it=Object.prototype.hasOwnProperty,ot=function(t,e){return it.call(t,e)},at={},st=function(t){var e,A,n={};function r(t){return ot(n,t)&&n[t]!==at}return e={size:0,empty:0,object:n,has:r,get:function(t){return r(t)?n[t]:void 0},set:function(t,A){return r(t)||(++e.size,n[t]===at&&--e.empty),n[t]=A,this},delete:function(t){return r(t)&&(--e.size,++e.empty,n[t]=at),this},clear:function(){e.size=e.empty=0,e.object=n={}},test:function(t){return arguments.length?(A=t,e):A},clean:function(){var t,r,i={},o=0;for(t in n)(r=n[t])===at||A&&A(r)||(i[t]=r,++o);e.size=o,e.empty=0,e.object=n=i}},t&&Object.keys(t).forEach((function(A){e.set(A,t[A])})),e},gt=function(t,e,A,n,r,i){if(!A&&0!==A)return i;var o,a,s=t[0],g=w(t),c=+A;return g<s&&(o=s,s=g,g=o),(o=Math.abs(e-s))<(a=Math.abs(g-e))&&o<=c?n:a<=c?r:i},ct=function(t,e){var A=t.prototype=Object.create(e.prototype);return A.constructor=t,A},It=function(t,e,A,n){var r,i=e[0],o=e[e.length-1];return i>o&&(r=i,i=o,o=r),n=void 0===n||n,((A=void 0===A||A)?i<=t:i<t)&&(n?t<=o:t<o)},ut=function(t){return"boolean"===typeof t},lt=function(t){return"[object Date]"===Object.prototype.toString.call(t)},Ct=function(t){return"number"===typeof t},ht=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},Bt=function(t){return"string"===typeof t},ft=function(t,e,A){t&&(t=e?Z(t).map((function(t){return t.replace(/\\(.)/g,"$1")})):Z(t));var r,i=t&&t.length,a=A&&A.get||o,s=function(t){return a(e?[t]:c(t))};if(i)if(1===i){var g=s(t[0]);r=function(t){return""+g(t)}}else{var I=t.map(s);r=function(t){for(var e=""+I[0](t),A=0;++A<i;)e+="|"+I[A](t);return e}}else r=function(){return""};return n(r,t,"key")},dt=function(t,e){var A=t[0],n=w(t),r=+e;return r?1===r?n:A+r*(n-A):A},Qt=function(t){var e,A,n;t=+t||1e4;var r=function(){e={},A={},n=0},i=function(r,i){return++n>t&&(A=e,e={},n=1),e[r]=i};return r(),{clear:r,has:function(t){return ot(e,t)||ot(A,t)},get:function(t){return ot(e,t)?e[t]:ot(A,t)?i(t,A[t]):void 0},set:function(t,A){return ot(e,t)?e[t]=A:i(t,A)}}},Et=function(t,e,A,n){var r=e.length,i=A.length;if(!i)return e;if(!r)return A;for(var o=n||new e.constructor(r+i),a=0,s=0,g=0;a<r&&s<i;++g)o[g]=t(e[a],A[s])>0?A[s++]:e[a++];for(;a<r;++a,++g)o[g]=e[a];for(;s<i;++s,++g)o[g]=A[s];return o},pt=function(t,e){for(var A="";--e>=0;)A+=t;return A},yt=function(t,e,A,n){var r=A||" ",i=t+"",o=e-i.length;return o<=0?i:"left"===n?pt(r,o)+i:"center"===n?pt(r,~~(o/2))+i+pt(r,Math.ceil(o/2)):i+pt(r,o)},vt=function(t){return t&&w(t)-t[0]||0};function mt(t){return p(t)?"["+t.map(mt)+"]":y(t)||Bt(t)?JSON.stringify(t).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):t}var bt=function(t){return null==t||""===t?null:!(!t||"false"===t||"0"===t)&&!!t};function Ft(t){return Ct(t)||lt(t)?t:Date.parse(t)}var wt=function(t,e){return e=e||Ft,null==t||""===t?null:e(t)},St=function(t){return null==t||""===t?null:t+""},Dt=function(t){for(var e={},A=0,n=t.length;A<n;++A)e[t[A]]=!0;return e},Rt=function(t,e,A,n){var r=null!=n?n:"\u2026",i=t+"",o=i.length,a=Math.max(0,e-r.length);return o<=e?i:"left"===A?r+i.slice(o-a):"center"===A?i.slice(0,Math.ceil(a/2))+r+i.slice(o-~~(a/2)):i.slice(0,a)+r},Ut=function(t,e,A){if(t)if(e)for(var n,r=0,i=t.length;r<i;++r)(n=e(t[r]))&&A(n,r,t);else t.forEach(A)};A.d(e,"f",(function(){return n})),A.d(e,"h",(function(){return r})),A.d(e,"g",(function(){return i})),A.d(e,"w",(function(){return l})),A.d(e,"x",(function(){return C})),A.d(e,"kb",(function(){return h})),A.d(e,"O",(function(){return B})),A.d(e,"gb",(function(){return f})),A.d(e,"r",(function(){return d})),A.d(e,"K",(function(){return E})),A.d(e,"d",(function(){return 0})),A.d(e,"b",(function(){return 1})),A.d(e,"e",(function(){return 2})),A.d(e,"c",(function(){return 3})),A.d(e,"a",(function(){return 4})),A.d(e,"N",(function(){return m})),A.d(e,"jb",(function(){return b})),A.d(e,"Q",(function(){return x})),A.d(e,"R",(function(){return O})),A.d(e,"S",(function(){return M})),A.d(e,"T",(function(){return L})),A.d(e,"lb",(function(){return J})),A.d(e,"mb",(function(){return T})),A.d(e,"nb",(function(){return j})),A.d(e,"ob",(function(){return H})),A.d(e,"V",(function(){return Y})),A.d(e,"hb",(function(){return V})),A.d(e,"i",(function(){return Z})),A.d(e,"j",(function(){return W})),A.d(e,"k",(function(){return P})),A.d(e,"l",(function(){return tt})),A.d(e,"m",(function(){return et})),A.d(e,"n",(function(){return g})),A.d(e,"o",(function(){return At})),A.d(e,"p",(function(){return nt})),A.d(e,"q",(function(){return rt})),A.d(e,"s",(function(){return st})),A.d(e,"t",(function(){return I})),A.d(e,"u",(function(){return gt})),A.d(e,"v",(function(){return ot})),A.d(e,"y",(function(){return ct})),A.d(e,"z",(function(){return It})),A.d(e,"A",(function(){return p})),A.d(e,"B",(function(){return ut})),A.d(e,"C",(function(){return lt})),A.d(e,"D",(function(){return K})),A.d(e,"E",(function(){return Ct})),A.d(e,"F",(function(){return y})),A.d(e,"G",(function(){return ht})),A.d(e,"H",(function(){return Bt})),A.d(e,"I",(function(){return ft})),A.d(e,"J",(function(){return dt})),A.d(e,"L",(function(){return Qt})),A.d(e,"M",(function(){return Et})),A.d(e,"P",(function(){return yt})),A.d(e,"U",(function(){return w})),A.d(e,"W",(function(){return pt})),A.d(e,"X",(function(){return vt})),A.d(e,"Y",(function(){return c})),A.d(e,"Z",(function(){return mt})),A.d(e,"ab",(function(){return bt})),A.d(e,"bb",(function(){return wt})),A.d(e,"cb",(function(){return S})),A.d(e,"eb",(function(){return St})),A.d(e,"db",(function(){return Dt})),A.d(e,"fb",(function(){return Rt})),A.d(e,"ib",(function(){return Ut}))},function(t,e,A){"use strict";function n(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e,A){return e&&n(t.prototype,e),A&&n(t,A),t}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}A.d(e,"a",(function(){return n}))},function(t,e,A){t.exports=A(443)},function(t,e,A){"use strict";function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e,A,n,r,i,o){try{var a=t[i](o),s=a.value}catch(g){return void A(g)}a.done?e(s):Promise.resolve(s).then(n,r)}function r(t){return function(){var e=this,A=arguments;return new Promise((function(r,i){var o=t.apply(e,A);function a(t){n(o,r,i,a,s,"next",t)}function s(t){n(o,r,i,a,s,"throw",t)}a(void 0)}))}}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e,A,n,r,i,o){try{var a=t[i](o),s=a.value}catch(g){return void A(g)}a.done?e(s):Promise.resolve(s).then(n,r)}function r(t){return function(){var e=this,A=arguments;return new Promise((function(r,i){var o=t.apply(e,A);function a(t){n(o,r,i,a,s,"next",t)}function s(t){n(o,r,i,a,s,"throw",t)}a(void 0)}))}}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";function n(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n=A(281);var r=A(160),i=A(282);function o(t,e){return Object(n.a)(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}(t,e)||Object(r.a)(t,e)||Object(i.a)()}A.d(e,"a",(function(){return o}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(224);function r(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Object(n.a)(t,e)}},function(t,e,A){"use strict";function n(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e,A){return e&&n(t.prototype,e),A&&n(t,A),t}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(26),r=A(56);function i(t,e){return!e||"object"!==Object(n.a)(e)&&"function"!==typeof e?Object(r.a)(t):e}},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(160);function r(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=Object(n.a)(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}},function(t,e,A){"use strict";A.d(e,"q",(function(){return r})),A.d(e,"f",(function(){return i})),A.d(e,"a",(function(){return o})),A.d(e,"h",(function(){return a})),A.d(e,"p",(function(){return s})),A.d(e,"o",(function(){return g})),A.d(e,"k",(function(){return c})),A.d(e,"l",(function(){return I})),A.d(e,"m",(function(){return u})),A.d(e,"n",(function(){return l})),A.d(e,"e",(function(){return C})),A.d(e,"c",(function(){return h})),A.d(e,"d",(function(){return B})),A.d(e,"j",(function(){return f})),A.d(e,"i",(function(){return d})),A.d(e,"g",(function(){return Q})),A.d(e,"b",(function(){return E}));var n=A(31);function r(t,e){if(t===e){var A=e[1],n=e[2],r=e[3],i=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=A,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=i,t[11]=e[14],t[12]=r,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function i(t,e){var A=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],g=e[7],c=e[8],I=e[9],u=e[10],l=e[11],C=e[12],h=e[13],B=e[14],f=e[15],d=A*a-n*o,Q=A*s-r*o,E=A*g-i*o,p=n*s-r*a,y=n*g-i*a,v=r*g-i*s,m=c*h-I*C,b=c*B-u*C,F=c*f-l*C,w=I*B-u*h,S=I*f-l*h,D=u*f-l*B,R=d*D-Q*S+E*w+p*F-y*b+v*m;return R?(R=1/R,t[0]=(a*D-s*S+g*w)*R,t[1]=(r*S-n*D-i*w)*R,t[2]=(h*v-B*y+f*p)*R,t[3]=(u*y-I*v-l*p)*R,t[4]=(s*F-o*D-g*b)*R,t[5]=(A*D-r*F+i*b)*R,t[6]=(B*E-C*v-f*Q)*R,t[7]=(c*v-u*E+l*Q)*R,t[8]=(o*S-a*F+g*m)*R,t[9]=(n*F-A*S-i*m)*R,t[10]=(C*y-h*E+f*d)*R,t[11]=(I*E-c*y-l*d)*R,t[12]=(a*b-o*w-s*m)*R,t[13]=(A*w-n*b+r*m)*R,t[14]=(h*Q-C*p-B*d)*R,t[15]=(c*p-I*Q+u*d)*R,t):null}function o(t){var e=t[0],A=t[1],n=t[2],r=t[3],i=t[4],o=t[5],a=t[6],s=t[7],g=t[8],c=t[9],I=t[10],u=t[11],l=t[12],C=t[13],h=t[14],B=t[15];return(e*o-A*i)*(I*B-u*h)-(e*a-n*i)*(c*B-u*C)+(e*s-r*i)*(c*h-I*C)+(A*a-n*o)*(g*B-u*l)-(A*s-r*o)*(g*h-I*l)+(n*s-r*a)*(g*C-c*l)}function a(t,e,A){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],g=e[6],c=e[7],I=e[8],u=e[9],l=e[10],C=e[11],h=e[12],B=e[13],f=e[14],d=e[15],Q=A[0],E=A[1],p=A[2],y=A[3];return t[0]=Q*n+E*a+p*I+y*h,t[1]=Q*r+E*s+p*u+y*B,t[2]=Q*i+E*g+p*l+y*f,t[3]=Q*o+E*c+p*C+y*d,Q=A[4],E=A[5],p=A[6],y=A[7],t[4]=Q*n+E*a+p*I+y*h,t[5]=Q*r+E*s+p*u+y*B,t[6]=Q*i+E*g+p*l+y*f,t[7]=Q*o+E*c+p*C+y*d,Q=A[8],E=A[9],p=A[10],y=A[11],t[8]=Q*n+E*a+p*I+y*h,t[9]=Q*r+E*s+p*u+y*B,t[10]=Q*i+E*g+p*l+y*f,t[11]=Q*o+E*c+p*C+y*d,Q=A[12],E=A[13],p=A[14],y=A[15],t[12]=Q*n+E*a+p*I+y*h,t[13]=Q*r+E*s+p*u+y*B,t[14]=Q*i+E*g+p*l+y*f,t[15]=Q*o+E*c+p*C+y*d,t}function s(t,e,A){var n,r,i,o,a,s,g,c,I,u,l,C,h=A[0],B=A[1],f=A[2];return e===t?(t[12]=e[0]*h+e[4]*B+e[8]*f+e[12],t[13]=e[1]*h+e[5]*B+e[9]*f+e[13],t[14]=e[2]*h+e[6]*B+e[10]*f+e[14],t[15]=e[3]*h+e[7]*B+e[11]*f+e[15]):(n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],g=e[6],c=e[7],I=e[8],u=e[9],l=e[10],C=e[11],t[0]=n,t[1]=r,t[2]=i,t[3]=o,t[4]=a,t[5]=s,t[6]=g,t[7]=c,t[8]=I,t[9]=u,t[10]=l,t[11]=C,t[12]=n*h+a*B+I*f+e[12],t[13]=r*h+s*B+u*f+e[13],t[14]=i*h+g*B+l*f+e[14],t[15]=o*h+c*B+C*f+e[15]),t}function g(t,e,A){var n=A[0],r=A[1],i=A[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function c(t,e,A,r){var i,o,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F,w,S,D=r[0],R=r[1],U=r[2],G=Math.hypot(D,R,U);return G<n.b?null:(D*=G=1/G,R*=G,U*=G,i=Math.sin(A),a=1-(o=Math.cos(A)),s=e[0],g=e[1],c=e[2],I=e[3],u=e[4],l=e[5],C=e[6],h=e[7],B=e[8],f=e[9],d=e[10],Q=e[11],E=D*D*a+o,p=R*D*a+U*i,y=U*D*a-R*i,v=D*R*a-U*i,m=R*R*a+o,b=U*R*a+D*i,F=D*U*a+R*i,w=R*U*a-D*i,S=U*U*a+o,t[0]=s*E+u*p+B*y,t[1]=g*E+l*p+f*y,t[2]=c*E+C*p+d*y,t[3]=I*E+h*p+Q*y,t[4]=s*v+u*m+B*b,t[5]=g*v+l*m+f*b,t[6]=c*v+C*m+d*b,t[7]=I*v+h*m+Q*b,t[8]=s*F+u*w+B*S,t[9]=g*F+l*w+f*S,t[10]=c*F+C*w+d*S,t[11]=I*F+h*w+Q*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function I(t,e,A){var n=Math.sin(A),r=Math.cos(A),i=e[4],o=e[5],a=e[6],s=e[7],g=e[8],c=e[9],I=e[10],u=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*r+g*n,t[5]=o*r+c*n,t[6]=a*r+I*n,t[7]=s*r+u*n,t[8]=g*r-i*n,t[9]=c*r-o*n,t[10]=I*r-a*n,t[11]=u*r-s*n,t}function u(t,e,A){var n=Math.sin(A),r=Math.cos(A),i=e[0],o=e[1],a=e[2],s=e[3],g=e[8],c=e[9],I=e[10],u=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*r-g*n,t[1]=o*r-c*n,t[2]=a*r-I*n,t[3]=s*r-u*n,t[8]=i*n+g*r,t[9]=o*n+c*r,t[10]=a*n+I*r,t[11]=s*n+u*r,t}function l(t,e,A){var n=Math.sin(A),r=Math.cos(A),i=e[0],o=e[1],a=e[2],s=e[3],g=e[4],c=e[5],I=e[6],u=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*r+g*n,t[1]=o*r+c*n,t[2]=a*r+I*n,t[3]=s*r+u*n,t[4]=g*r-i*n,t[5]=c*r-o*n,t[6]=I*r-a*n,t[7]=u*r-s*n,t}function C(t,e){var A=e[0],n=e[1],r=e[2],i=e[4],o=e[5],a=e[6],s=e[8],g=e[9],c=e[10];return t[0]=Math.hypot(A,n,r),t[1]=Math.hypot(i,o,a),t[2]=Math.hypot(s,g,c),t}function h(t,e){var A=e[0],n=e[1],r=e[2],i=e[3],o=A+A,a=n+n,s=r+r,g=A*o,c=n*o,I=n*a,u=r*o,l=r*a,C=r*s,h=i*o,B=i*a,f=i*s;return t[0]=1-I-C,t[1]=c+f,t[2]=u-B,t[3]=0,t[4]=c-f,t[5]=1-g-C,t[6]=l+h,t[7]=0,t[8]=u+B,t[9]=l-h,t[10]=1-g-I,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function B(t,e,A,n,r,i,o){var a=1/(A-e),s=1/(r-n),g=1/(i-o);return t[0]=2*i*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*i*s,t[6]=0,t[7]=0,t[8]=(A+e)*a,t[9]=(r+n)*s,t[10]=(o+i)*g,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*i*2*g,t[15]=0,t}function f(t,e,A,n,r){var i,o=1/Math.tan(e/2);return t[0]=o/A,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=r&&r!==1/0?(i=1/(n-r),t[10]=(r+n)*i,t[14]=2*r*n*i):(t[10]=-1,t[14]=-2*n),t}function d(t,e,A,n,r,i,o){var a=1/(e-A),s=1/(n-r),g=1/(i-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*g,t[11]=0,t[12]=(e+A)*a,t[13]=(r+n)*s,t[14]=(o+i)*g,t[15]=1,t}function Q(t,e,A,r){var i,o,a,s,g,c,I,u,l,C,h=e[0],B=e[1],f=e[2],d=r[0],Q=r[1],E=r[2],p=A[0],y=A[1],v=A[2];return Math.abs(h-p)<n.b&&Math.abs(B-y)<n.b&&Math.abs(f-v)<n.b?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(I=h-p,u=B-y,l=f-v,i=Q*(l*=C=1/Math.hypot(I,u,l))-E*(u*=C),o=E*(I*=C)-d*l,a=d*u-Q*I,(C=Math.hypot(i,o,a))?(i*=C=1/C,o*=C,a*=C):(i=0,o=0,a=0),s=u*a-l*o,g=l*i-I*a,c=I*o-u*i,(C=Math.hypot(s,g,c))?(s*=C=1/C,g*=C,c*=C):(s=0,g=0,c=0),t[0]=i,t[1]=s,t[2]=I,t[3]=0,t[4]=o,t[5]=g,t[6]=u,t[7]=0,t[8]=a,t[9]=c,t[10]=l,t[11]=0,t[12]=-(i*h+o*B+a*f),t[13]=-(s*h+g*B+c*f),t[14]=-(I*h+u*B+l*f),t[15]=1,t)}function E(t,e){var A=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],g=t[6],c=t[7],I=t[8],u=t[9],l=t[10],C=t[11],h=t[12],B=t[13],f=t[14],d=t[15],Q=e[0],E=e[1],p=e[2],y=e[3],v=e[4],m=e[5],b=e[6],F=e[7],w=e[8],S=e[9],D=e[10],R=e[11],U=e[12],G=e[13],N=e[14],k=e[15];return Math.abs(A-Q)<=n.b*Math.max(1,Math.abs(A),Math.abs(Q))&&Math.abs(r-E)<=n.b*Math.max(1,Math.abs(r),Math.abs(E))&&Math.abs(i-p)<=n.b*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(o-y)<=n.b*Math.max(1,Math.abs(o),Math.abs(y))&&Math.abs(a-v)<=n.b*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(s-m)<=n.b*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(g-b)<=n.b*Math.max(1,Math.abs(g),Math.abs(b))&&Math.abs(c-F)<=n.b*Math.max(1,Math.abs(c),Math.abs(F))&&Math.abs(I-w)<=n.b*Math.max(1,Math.abs(I),Math.abs(w))&&Math.abs(u-S)<=n.b*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(l-D)<=n.b*Math.max(1,Math.abs(l),Math.abs(D))&&Math.abs(C-R)<=n.b*Math.max(1,Math.abs(C),Math.abs(R))&&Math.abs(h-U)<=n.b*Math.max(1,Math.abs(h),Math.abs(U))&&Math.abs(B-G)<=n.b*Math.max(1,Math.abs(B),Math.abs(G))&&Math.abs(f-N)<=n.b*Math.max(1,Math.abs(f),Math.abs(N))&&Math.abs(d-k)<=n.b*Math.max(1,Math.abs(d),Math.abs(k))}},function(t,e,A){"use strict";var n=new(A(740).a)({id:"luma.gl"}),r=A(75),i=(A(476),A(177)),o=A(146),a=A(60),s=A(84);function g(t){var e=t.luma;if(t.canvas&&e){var A=e.canvasSizeInfo.clientWidth;return A?t.drawingBufferWidth/A:1}return 1}function c(t,e){var A=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=g(t),r=t.drawingBufferWidth,i=t.drawingBufferHeight;return u(e,n,r,i,A)}function I(t){var e="undefined"===typeof window?1:window.devicePixelRatio||1;return Number.isFinite(t)?t<=0?1:t:t?e:1}function u(t,e,A,n,r){var i,o=l(t[0],e,A),a=C(t[1],e,n,r),s=l(t[0]+1,e,A),g=s===A-1?s:s-1;return s=C(t[1]+1,e,n,r),r?(i=a,a=s=0===s?s:s+1):i=s===n-1?s:s-1,{x:o,y:a,width:Math.max(g-o+1,1),height:Math.max(i-a+1,1)}}function l(t,e,A){return Math.min(Math.round(t*e),A-1)}function C(t,e,A,n){return n?Math.max(0,A-1-Math.round(t*e)):Math.min(Math.round(t*e),A-1)}var h=Object(a.isBrowser)(),B=h&&"undefined"!==typeof document,f={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function d(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s.a)(h,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils");var e,A=t=Object.assign({},f,t),n=A.width,r=A.height;function i(e){if(t.throwOnError)throw new Error(e);return console.error(e),null}t.onError=i;var o=t,a=o.canvas,g=y({canvas:a,width:n,height:r,onError:i});return(e=p(g,t))?(v(e=Q(e,t)),e):null}function Q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||t._instrumented)return t;t._version=t._version||m(t),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{};var A=e=Object.assign({},f,e),r=A.manageState,i=A.debug;return r&&Object(o.c)(t,{copyState:!1,log:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];return n.log.apply(n,[1].concat(e))()}}),h&&i&&(a.global.makeDebugContext?(t=a.global.makeDebugContext(t,e),n.level=Math.max(n.level,1)):n.warn('WebGL debug mode not activated. import "@luma.gl/debug" to enable.')()),t._instrumented=!0,t}function E(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.canvas){var A=I(e.useDevicePixels);b(t,A,e)}else{var n=t.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in e&&"height"in e&&n.resize(e.width,e.height)}}function p(t,e){var A=e.onError,n=null,r=function(t){return n=t.statusMessage||n};t.addEventListener("webglcontextcreationerror",r,!1);var i=e.webgl1,o=void 0===i||i,a=e.webgl2,s=void 0===a||a,g=null;return s&&(g=(g=g||t.getContext("webgl2",e))||t.getContext("experimental-webgl2",e)),o&&(g=(g=g||t.getContext("webgl",e))||t.getContext("experimental-webgl",e)),t.removeEventListener("webglcontextcreationerror",r,!1),g?(e.onContextLost&&t.addEventListener("webglcontextlost",e.onContextLost,!1),e.onContextRestored&&t.addEventListener("webglcontextrestored",e.onContextRestored,!1),g):A("Failed to create ".concat(s&&!o?"WebGL2":"WebGL"," context: ").concat(n||"Unknown error"))}function y(t){var e,A=t.canvas,n=t.width,r=void 0===n?800:n,i=t.height,o=void 0===i?600:i,a=t.onError;"string"===typeof A?(B&&"complete"===document.readyState||a("createGLContext called on canvas '".concat(A,"' before page was loaded")),e=document.getElementById(A)):A?e=A:((e=document.createElement("canvas")).id="lumagl-canvas",e.style.width=Number.isFinite(r)?"".concat(r,"px"):"100%",e.style.height=Number.isFinite(o)?"".concat(o,"px"):"100%",document.body.insertBefore(e,document.body.firstChild));return e}function v(t){var e=Object(r.e)(t)?"WebGL2":"WebGL1",A=function(t){var e=t.getParameter(7936),A=t.getParameter(7937),n=t.getExtension("WEBGL_debug_renderer_info");return{vendor:n&&t.getParameter(n.UNMASKED_VENDOR_WEBGL||7936)||e,renderer:n&&t.getParameter(n.UNMASKED_RENDERER_WEBGL||7937)||A,vendorMasked:e,rendererMasked:A,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t),i=A?"(".concat(A.vendor,",").concat(A.renderer,")"):"",o=t.debug?" debug":"";n.info(1,"".concat(e).concat(o," context ").concat(i))()}function m(t){return"undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext?2:1}function b(t,e,A){var r="width"in A?A.width:t.canvas.clientWidth,i="height"in A?A.height:t.canvas.clientHeight;r&&i||(n.log(1,"Canvas clientWidth/clientHeight is 0")(),e=1,r=t.canvas.width||1,i=t.canvas.height||1),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{};var o=t.luma.canvasSizeInfo;if(o.clientWidth!==r||o.clientHeight!==i||o.devicePixelRatio!==e){var a=e,s=Math.floor(r*a),g=Math.floor(i*a);t.canvas.width=s,t.canvas.height=g,t.drawingBufferWidth===s&&t.drawingBufferHeight===g||(n.warn("Device pixel ratio clamped")(),a=Math.min(t.drawingBufferWidth/r,t.drawingBufferHeight/i),t.canvas.width=Math.floor(r*a),t.canvas.height=Math.floor(i*a)),Object.assign(t.luma.canvasSizeInfo,{clientWidth:r,clientHeight:i,devicePixelRatio:e})}}A.d(e,"k",(function(){return n})),A.d(e,"i",(function(){return r.d})),A.d(e,"j",(function(){return r.e})),A.d(e,"g",(function(){return r.c})),A.d(e,"b",(function(){return r.b})),A.d(e,"a",(function(){return r.a})),A.d(e,"f",(function(){return i.a})),A.d(e,"n",(function(){return i.c})),A.d(e,"l",(function(){return i.b})),A.d(e,"o",(function(){return i.d})),A.d(e,"c",(function(){return d})),A.d(e,"m",(function(){return E})),A.d(e,"h",(function(){return Q})),A.d(e,"e",(function(){return g})),A.d(e,"d",(function(){return c}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(12);function r(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function i(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?r(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):r(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}},function(t,e,A){"use strict";var n=A(209);var r=A(290),i=A(160);function o(t){return function(t){if(Array.isArray(t))return Object(n.a)(t)}(t)||Object(r.a)(t)||Object(i.a)(t)||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.d(e,"a",(function(){return o}))},function(t,e,A){"use strict";var n=A(382);var r=A(383);function i(t,e){return Object(n.a)(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}(t,e)||Object(r.a)()}A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(222);function r(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Object(n.a)(t,e)}},function(t,e,A){"use strict";var n=A(71),r=A(314);function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=A(54);function a(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?Object(o.a)(t):e}function s(t){return function(){var e,A=Object(n.a)(t);if(Object(r.a)()){var i=Object(n.a)(this).constructor;e=Reflect.construct(A,arguments,i)}else e=A.apply(this,arguments);return a(this,e)}}A.d(e,"a",(function(){return s}))},function(t,e,A){t.exports=A(579)()},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"b",(function(){return r})),A.d(e,"g",(function(){return i})),A.d(e,"e",(function(){return o})),A.d(e,"i",(function(){return a})),A.d(e,"j",(function(){return s})),A.d(e,"d",(function(){return g})),A.d(e,"c",(function(){return c})),A.d(e,"h",(function(){return I})),A.d(e,"q",(function(){return u})),A.d(e,"p",(function(){return l})),A.d(e,"r",(function(){return C})),A.d(e,"k",(function(){return h})),A.d(e,"l",(function(){return B})),A.d(e,"m",(function(){return f})),A.d(e,"a",(function(){return d})),A.d(e,"o",(function(){return Q})),A.d(e,"f",(function(){return E})),A.d(e,"n",(function(){return p}));var n=A(31);function r(){var t=new n.a(3);return n.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i(t){var e=t[0],A=t[1],n=t[2];return Math.hypot(e,A,n)}function o(t,e,A){var r=new n.a(3);return r[0]=t,r[1]=e,r[2]=A,r}function a(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function s(t,e){var A=e[0],n=e[1],r=e[2],i=A*A+n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function c(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[0],a=A[1],s=A[2];return t[0]=r*s-i*a,t[1]=i*o-n*s,t[2]=n*a-r*o,t}function I(t,e,A,n){var r=e[0],i=e[1],o=e[2];return t[0]=r+n*(A[0]-r),t[1]=i+n*(A[1]-i),t[2]=o+n*(A[2]-o),t}function u(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i+A[15];return o=o||1,t[0]=(A[0]*n+A[4]*r+A[8]*i+A[12])/o,t[1]=(A[1]*n+A[5]*r+A[9]*i+A[13])/o,t[2]=(A[2]*n+A[6]*r+A[10]*i+A[14])/o,t}function l(t,e,A){var n=e[0],r=e[1],i=e[2];return t[0]=n*A[0]+r*A[3]+i*A[6],t[1]=n*A[1]+r*A[4]+i*A[7],t[2]=n*A[2]+r*A[5]+i*A[8],t}function C(t,e,A){var n=A[0],r=A[1],i=A[2],o=A[3],a=e[0],s=e[1],g=e[2],c=r*g-i*s,I=i*a-n*g,u=n*s-r*a,l=r*u-i*I,C=i*c-n*u,h=n*I-r*c,B=2*o;return c*=B,I*=B,u*=B,l*=2,C*=2,h*=2,t[0]=a+c+l,t[1]=s+I+C,t[2]=g+u+h,t}function h(t,e,A,n){var r=[],i=[];return r[0]=e[0]-A[0],r[1]=e[1]-A[1],r[2]=e[2]-A[2],i[0]=r[0],i[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),i[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=i[0]+A[0],t[1]=i[1]+A[1],t[2]=i[2]+A[2],t}function B(t,e,A,n){var r=[],i=[];return r[0]=e[0]-A[0],r[1]=e[1]-A[1],r[2]=e[2]-A[2],i[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),i[1]=r[1],i[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=i[0]+A[0],t[1]=i[1]+A[1],t[2]=i[2]+A[2],t}function f(t,e,A,n){var r=[],i=[];return r[0]=e[0]-A[0],r[1]=e[1]-A[1],r[2]=e[2]-A[2],i[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),i[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),i[2]=r[2],t[0]=i[0]+A[0],t[1]=i[1]+A[1],t[2]=i[2]+A[2],t}function d(t,e){var A=t[0],n=t[1],r=t[2],i=e[0],o=e[1],a=e[2],s=Math.sqrt(A*A+n*n+r*r)*Math.sqrt(i*i+o*o+a*a),c=s&&g(t,e)/s;return Math.acos(Math.min(Math.max(c,-1),1))}var Q=function(t,e,A){return t[0]=e[0]-A[0],t[1]=e[1]-A[1],t[2]=e[2]-A[2],t},E=i,p=function(t){var e=t[0],A=t[1],n=t[2];return e*e+A*A+n*n};!function(){var t=r()}()},function(t,e,A){"use strict";A.r(e),e.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(t,e,A){"use strict";var n=A(381);function r(t){return function(t){if(Array.isArray(t)){for(var e=0,A=new Array(t.length);e<t.length;e++)A[e]=t[e];return A}}(t)||Object(n.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(173);function r(t,e){if(null==t)return{};var A,r,i=Object(n.a)(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)A=o[r],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(i[A]=t[A])}return i}},function(t,e,A){"use strict";A.d(e,"b",(function(){return n})),A.d(e,"a",(function(){return r})),A.d(e,"c",(function(){return i}));var n=1e-6,r="undefined"!==typeof Float32Array?Float32Array:Array,i=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},function(t,e,A){"use strict";function n(t){var e,A,r="";if("string"===typeof t||"number"===typeof t)r+=t;else if("object"===typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(A=n(t[e]))&&(r&&(r+=" "),r+=A);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}e.a=function(){for(var t,e,A=0,r="";A<arguments.length;)(t=arguments[A++])&&(e=n(t))&&(r&&(r+=" "),r+=e);return r}},function(t,e,A){"use strict";A.d(e,"f",(function(){return g})),A.d(e,"g",(function(){return c})),A.d(e,"l",(function(){return u})),A.d(e,"m",(function(){return l})),A.d(e,"e",(function(){return C})),A.d(e,"s",(function(){return B})),A.d(e,"r",(function(){return f})),A.d(e,"o",(function(){return d})),A.d(e,"i",(function(){return Q})),A.d(e,"p",(function(){return E})),A.d(e,"h",(function(){return p})),A.d(e,"q",(function(){return y})),A.d(e,"b",(function(){return v})),A.d(e,"a",(function(){return m})),A.d(e,"c",(function(){return b})),A.d(e,"d",(function(){return F})),A.d(e,"n",(function(){return w})),A.d(e,"j",(function(){return S})),A.d(e,"k",(function(){return D})),A.d(e,"t",(function(){return R}));var n=A(26),r=A(205),i=A(29),o=A(149),a=1/Math.PI*180,s=1/180*Math.PI,g={};function c(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in t)Object(o.a)(e in g),g[e]=t[e];return g}function I(t){return Math.round(t/g.EPSILON)*g.EPSILON}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.precision,n=void 0===A?g.precision||4:A;return t=I(t),"".concat(parseFloat(t.toPrecision(n)))}function l(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&void 0!==t.length}function C(t){return t.clone?t.clone():Object(r.a)(Array,Object(i.a)(t))}function h(t,e,A){if(l(t)){A=A||((r=t).clone?r.clone():new Array(r.length));for(var n=0;n<A.length&&n<t.length;++n)A[n]=e(t[n],n,A);return A}var r;return e(t)}function B(t){return d(t)}function f(t){return Q(t)}function d(t,e){return h(t,(function(t){return t*s}),e)}function Q(t,e){return h(t,(function(t){return t*a}),e)}function E(t){return h(t,(function(t){return Math.sin(t)}))}function p(t){return h(t,(function(t){return Math.cos(t)}))}function y(t){return h(t,(function(t){return Math.tan(t)}))}function v(t){return h(t,(function(t){return Math.asin(t)}))}function m(t){return h(t,(function(t){return Math.acos(t)}))}function b(t){return h(t,(function(t){return Math.atan(t)}))}function F(t,e,A){return h(t,(function(t){return Math.max(e,Math.min(A,t))}))}function w(t,e,A){return l(t)?t.map((function(t,n){return w(t,e[n],A)})):A*e+(1-A)*t}function S(t,e,A){var n=g.EPSILON;A&&(g.EPSILON=A);try{if(t===e)return!0;if(l(t)&&l(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!S(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=g.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{g.EPSILON=n}}function D(t,e){if(t===e)return!0;if(t&&"object"===Object(n.a)(t)&&e&&"object"===Object(n.a)(e)){if(t.constructor!==e.constructor)return!1;if(t.exactEquals)return t.exactEquals(e)}if(l(t)&&l(e)){if(t.length!==e.length)return!1;for(var A=0;A<t.length;++A)if(!D(t[A],e[A]))return!1;return!0}return!1}function R(t,e){var A,n=g.EPSILON;g.EPSILON=t;try{A=e()}finally{g.EPSILON=n}return A}g.EPSILON=1e-12,g.debug=!1,g.precision=4,g.printTypes=!1,g.printDegrees=!1,g.printRowMajor=!0},function(t,e,A){"use strict";A.d(e,"f",(function(){return s})),A.d(e,"p",(function(){return g})),A.d(e,"j",(function(){return c})),A.d(e,"k",(function(){return I})),A.d(e,"l",(function(){return u})),A.d(e,"m",(function(){return l})),A.d(e,"b",(function(){return C})),A.d(e,"q",(function(){return h})),A.d(e,"g",(function(){return B})),A.d(e,"c",(function(){return f})),A.d(e,"e",(function(){return d})),A.d(e,"a",(function(){return Q})),A.d(e,"o",(function(){return E})),A.d(e,"d",(function(){return p})),A.d(e,"i",(function(){return y})),A.d(e,"h",(function(){return v})),A.d(e,"r",(function(){return m})),A.d(e,"n",(function(){return F}));var n=A(31),r=A(53),i=A(27),o=A(45);function a(){var t=new n.a(4);return n.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function s(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function g(t,e,A){A*=.5;var n=Math.sin(A);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(A),t}function c(t,e,A){var n=e[0],r=e[1],i=e[2],o=e[3],a=A[0],s=A[1],g=A[2],c=A[3];return t[0]=n*c+o*a+r*g-i*s,t[1]=r*c+o*s+i*a-n*g,t[2]=i*c+o*g+n*s-r*a,t[3]=o*c-n*a-r*s-i*g,t}function I(t,e,A){A*=.5;var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sin(A),s=Math.cos(A);return t[0]=n*s+o*a,t[1]=r*s+i*a,t[2]=i*s-r*a,t[3]=o*s-n*a,t}function u(t,e,A){A*=.5;var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sin(A),s=Math.cos(A);return t[0]=n*s-i*a,t[1]=r*s+o*a,t[2]=i*s+n*a,t[3]=o*s-r*a,t}function l(t,e,A){A*=.5;var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sin(A),s=Math.cos(A);return t[0]=n*s+r*a,t[1]=r*s-n*a,t[2]=i*s+o*a,t[3]=o*s-i*a,t}function C(t,e){var A=e[0],n=e[1],r=e[2];return t[0]=A,t[1]=n,t[2]=r,t[3]=Math.sqrt(Math.abs(1-A*A-n*n-r*r)),t}function h(t,e,A,r){var i,o,a,s,g,c=e[0],I=e[1],u=e[2],l=e[3],C=A[0],h=A[1],B=A[2],f=A[3];return(o=c*C+I*h+u*B+l*f)<0&&(o=-o,C=-C,h=-h,B=-B,f=-f),1-o>n.b?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,g=Math.sin(r*i)/a):(s=1-r,g=r),t[0]=s*c+g*C,t[1]=s*I+g*h,t[2]=s*u+g*B,t[3]=s*l+g*f,t}function B(t,e){var A=e[0],n=e[1],r=e[2],i=e[3],o=A*A+n*n+r*r+i*i,a=o?1/o:0;return t[0]=-A*a,t[1]=-n*a,t[2]=-r*a,t[3]=i*a,t}function f(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function d(t,e){var A,n=e[0]+e[4]+e[8];if(n>0)A=Math.sqrt(n+1),t[3]=.5*A,A=.5/A,t[0]=(e[5]-e[7])*A,t[1]=(e[6]-e[2])*A,t[2]=(e[1]-e[3])*A;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var i=(r+1)%3,o=(r+2)%3;A=Math.sqrt(e[3*r+r]-e[3*i+i]-e[3*o+o]+1),t[r]=.5*A,A=.5/A,t[3]=(e[3*i+o]-e[3*o+i])*A,t[i]=(e[3*i+r]+e[3*r+i])*A,t[o]=(e[3*o+r]+e[3*r+o])*A}return t}o.b,o.g,o.c,o.l;var Q=o.a,E=o.k,p=o.d,y=o.i,v=o.h,m=o.m,b=o.j,F=(o.f,o.e,function(){var t=i.b(),e=i.e(1,0,0),A=i.e(0,1,0);return function(n,r,o){var a=i.d(r,o);return a<-.999999?(i.c(t,e,r),i.f(t)<1e-6&&i.c(t,A,r),i.j(t,t),g(n,t,Math.PI),n):a>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(i.c(t,r,o),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=1+a,b(n,n))}}());(function(){var t=a(),e=a()})(),function(){var t=r.a()}()},function(t,e,A){"use strict";var n=A(7);function r(t,e,A){return(r="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(n.a)(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(A):i.value}})(t,e,A||t)}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r})),A.d(e,"b",(function(){return i})),A.d(e,"c",(function(){return a}));var n=A(33);function r(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function i(t,e,A){if(n.f.debug&&!function(t,e){if(t.length!==e)return!1;for(var A=0;A<t.length;++A)if(!Number.isFinite(t[A]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(""|A," some fields set to invalid numbers'"));return t}var o={};function a(t,e){o[t]||(o[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}},function(t,e,A){"use strict";A(329),A(265);A(319);A(138);A.d(e,"b",(function(){return i})),A.d(e,"e",(function(){return a})),A.d(e,"f",(function(){return s})),A.d(e,"h",(function(){return c})),A.d(e,"c",(function(){return I})),A.d(e,"a",(function(){return u})),A.d(e,"g",(function(){return l})),A.d(e,"d",(function(){return C}));var n=1/Math.PI*180,r=1/180*Math.PI,i={};function o(t){return Math.round(t/i.EPSILON)*i.EPSILON}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.precision,n=void 0===A?i.precision||4:A;return t=o(t),"".concat(parseFloat(t.toPrecision(n)))}function s(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function g(t,e,A){if(s(t)){A=A||((r=t).clone?r.clone():new Array(r.length));for(var n=0;n<A.length&&n<t.length;++n)A[n]=e(t[n],n,A);return A}var r;return e(t)}function c(t,e){return g(t,(function(t){return t*r}),e)}function I(t,e){return g(t,(function(t){return t*n}),e)}function u(t,e,A){return g(t,(function(t){return Math.max(e,Math.min(A,t))}))}function l(t,e,A){return s(t)?t.map((function(t,n){return l(t,e[n],A)})):A*e+(1-A)*t}function C(t,e,A){var n=i.EPSILON;A&&(i.EPSILON=A);try{if(t===e)return!0;if(s(t)&&s(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!C(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=i.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{i.EPSILON=n}}i.EPSILON=1e-12,i.debug=!1,i.precision=4,i.printTypes=!1,i.printDegrees=!1,i.printRowMajor=!0},function(t,e,A){"use strict";A.d(e,"a",(function(){return r})),A.d(e,"e",(function(){return i})),A.d(e,"b",(function(){return o})),A.d(e,"d",(function(){return a})),A.d(e,"c",(function(){return s})),A.d(e,"g",(function(){return g})),A.d(e,"h",(function(){return c})),A.d(e,"i",(function(){return I})),A.d(e,"j",(function(){return u})),A.d(e,"f",(function(){return l}));var n=A(31);function r(t,e,A){return t[0]=e[0]+A[0],t[1]=e[1]+A[1],t}function i(t,e,A){return t[0]=e[0]*A,t[1]=e[1]*A,t}function o(t){var e=t[0],A=t[1];return Math.hypot(e,A)}function a(t,e){return t[0]=-e[0],t[1]=-e[1],t}function s(t,e,A,n){var r=e[0],i=e[1];return t[0]=r+n*(A[0]-r),t[1]=i+n*(A[1]-i),t}function g(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t}function c(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[2]*r+A[4],t[1]=A[1]*n+A[3]*r+A[5],t}function I(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[3]*r+A[6],t[1]=A[1]*n+A[4]*r+A[7],t}function u(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[4]*r+A[12],t[1]=A[1]*n+A[5]*r+A[13],t}var l=function(t,e,A){return t[0]=e[0]-A[0],t[1]=e[1]-A[1],t};!function(){var t=function(){var t=new n.a(2);return n.a!=Float32Array&&(t[0]=0,t[1]=0),t}()}()},function(t,e,A){"use strict";var n=A(481);A.d(e,"a",(function(){return n.a})),A.d(e,"b",(function(){return n.b})),A.d(e,"c",(function(){return n.c})),A.d(e,"d",(function(){return n.d})),A.d(e,"e",(function(){return n.e})),A.d(e,"f",(function(){return n.f})),A.d(e,"g",(function(){return n.g}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r})),A.d(e,"c",(function(){return i})),A.d(e,"b",(function(){return o}));var n=A(43),r={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(r,"IDENTITY",{get:function(){return n.a.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")()||0}});var i={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(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=A.n(i),a=(A(25),A(349)),s=A.n(a),g=A(595),c=A(905),I=A(753),u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(A){var i=e.defaultTheme,a=e.withTheme,u=void 0!==a&&a,l=e.name,C=Object(r.a)(e,["defaultTheme","withTheme","name"]);var h=l,B=Object(g.a)(t,Object(n.a)({defaultTheme:i,Component:A,name:l||A.displayName,classNamePrefix:h},C)),f=o.a.forwardRef((function(t,e){t.classes;var a,s=t.innerRef,g=Object(r.a)(t,["classes","innerRef"]),C=B(Object(n.a)({},A.defaultProps,{},t)),h=g;return("string"===typeof l||u)&&(a=Object(I.a)()||i,l&&(h=Object(c.a)({theme:a,name:l,props:g})),u&&!h.theme&&(h.theme=a)),o.a.createElement(A,Object(n.a)({ref:s||e,classes:C},h))}));return s()(f,A),f}},l=A(192);e.a=function(t,e){return u(t,Object(n.a)({defaultTheme:l.a},e))}},function(t,e){t.exports=function(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}},function(t,e,A){"use strict";var n=A(740);e.a=new n.a({id:"deck"})},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return U})),A.d(e,"b",(function(){return $t})),A.d(e,"c",(function(){return D})),A.d(e,"d",(function(){return E})),A.d(e,"e",(function(){return Ce})),A.d(e,"f",(function(){return O}));var r=A(20),i=A(116),o=A(13),a=A(21),s=A(15),g=A(2),c=A.n(g),I=A(17),u=A(9),l=A(54),C=A(23),h=A(24),B=A(77),f=A(8),d=c.a.mark(W),Q=new Map;function E(t,e){Q.set(t,e)}function p(t){return y.apply(this,arguments)}function y(){return(y=Object(f.a)(c.a.mark((function t(e){var A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Q.has(e.id)){t.next=2;break}throw new Error("Compression codec ".concat(e.id," is not supported by Zarr.js yet."));case 2:return t.next=4,Q.get(e.id)();case 4:return A=t.sent,t.abrupt("return",A.fromConfig(e));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function v(t){return new Proxy(t,{set:function(t,e,A,n){return t.setItem(e,A)},get:function(t,e,A){return t.getItem(e)},deleteProperty:function(t,e){return t.deleteItem(e)},has:function(t,e){return t.containsItem(e)}})}function m(t){return"object"===typeof(e=t)&&null!==e&&"__zarr__"in e&&"KeyError"===t.__zarr__;var e}var b=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,"path ".concat(t," contains an array"))).__zarr__="ContainsArrayError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),F=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,"path ".concat(t," contains a group"))).__zarr__="ContainsGroupError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),w=(Error,function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,"ground not found at path ".concat(t))).__zarr__="GroupNotFoundError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error))),S=(Error,function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).__zarr__="PermissionError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error))),D=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,"key ".concat(t," not present"))).__zarr__="KeyError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),R=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t,n){var r;return Object(u.a)(this,A),(r=e.call(this,"too many indices for array; expected ".concat(n.length,", got ").concat(t.length))).__zarr__="TooManyIndicesError",Object.setPrototypeOf(Object(l.a)(r),A.prototype),r}return A}(Object(B.a)(RangeError)),U=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).__zarr__="BoundsCheckError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(RangeError)),G=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t,n,r,i){var o;return Object(u.a)(this,A),(o=e.call(this,"slice arguments slice(".concat(t,", ").concat(n,", ").concat(r,") invalid: ").concat(i))).__zarr__="InvalidSliceError",Object.setPrototypeOf(Object(l.a)(o),A.prototype),o}return A}(Object(B.a)(RangeError)),N=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){var t;return Object(u.a)(this,A),(t=e.call(this,"Negative step size is not supported when indexing.")).__zarr__="NegativeStepError",Object.setPrototypeOf(Object(l.a)(t),A.prototype),t}return A}(Object(B.a)(Error)),k=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).__zarr__="ValueError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),x=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).__zarr__="HTTPError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error));function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0===t)throw new G(t,e,A,"The first argument must not be undefined");if("string"===typeof t&&":"!==t||"string"===typeof e&&":"!==e)throw new G(t,e,A,'Arguments can only be integers, ":" or null');return void 0===e&&(e=t,t=null),{start:":"===t?null:t,stop:":"===e?null:e,step:A,_slice:!0}}function M(t,e){var A,n,r;r=null===t.step?1:t.step,null===t.start?A=r<0?Number.MAX_SAFE_INTEGER:0:(A=t.start)<0&&(A+=e),null===t.stop?n=r<0?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER:(n=t.stop)<0&&(n+=e);var i=function(t,e,A,n){if(t<0?(t+=n)<0&&(t=A<0?-1:0):t>=n&&(t=A<0?n-1:n),e<0?(e+=n)<0&&(e=A<0?-1:0):e>=n&&(e=A<0?n-1:n),A<0){if(e<t)return[t,e,A,Math.floor((t-e-1)/-A+1)]}else if(t<e)return[t,e,A,Math.floor((e-t-1)/A+1)];return[t,e,A,0]}(A,n,r,e);if(A=i[0],n=i[1],r=i[2],e=i[3],0===r)throw new Error("Step size 0 is invalid");return[A,n,r,e]}function L(t){return Array.isArray(t)?t:[t]}function _(t,e){for(var A=[],n=[],r=0;r<t.length;r++){var i=t[r];if("number"===typeof i)A.push(i);else{var o=M(i,e[r]),a=o[3];n.push(a),A.push(o)}}return[A,n]}function J(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=T(t,e);for(var n=0;n<t.length;n++){var r=t[n];if("number"===typeof r)t[n]=A?O(r,r+1,1):j(r,e[n]);else{if(H(r))throw new TypeError("Integer array selections are not supported (yet)");":"!==r&&null!==r||(t[n]=O(null,null,1))}}return t}function T(t,e){t=L(t);for(var A=-1,n=0,r=0;r<t.length;r++)"..."===t[r]&&(A=r,n+=1);if(n>1)throw new RangeError("an index can only have a single ellipsis ('...')");if(1===n){var i=A,o=t.length-(i+1),a=t.length-1;if(a>=e.length)t=t.filter((function(t){return"..."!==t}));else{var s=e.length-a,g=t.slice(0,i).concat(new Array(s).fill(null));o>0&&(g=g.concat(t.slice(t.length-o))),t=g}}if(t.length<e.length){var c=e.length-t.length;t=t.concat(new Array(c).fill(null))}return function(t,e){if(t.length>e.length)throw new R(t,e)}(t,e),t}function j(t,e){if(t<0&&(t=e+t),t>=e||t<0)throw new U("index out of bounds for dimension with length ".concat(e));return t}function H(t){if(!Array.isArray(t))return!1;var e,A=Object(I.a)(t);try{for(A.s();!(e=A.n()).done;){if("number"!==typeof e.value)return!1}}catch(n){A.e(n)}finally{A.f()}return!0}function Y(t){return null!==t&&!0===t._slice}function V(t){return Y(t)&&(null===t.step||1===t.step)}function Z(t){t=L(t);for(var e=0;e<t.length;e++){var A=t[e];if(!H(A)&&!V(A)&&"..."!==A)return!1}return!0}function W(){var t,e,A,n,r,i,o=arguments;return c.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=o.length,e=new Array(t),A=0;A<t;A++)e[A]=o[A];if(0!==e.length){a.next=3;break}return a.abrupt("return");case 3:n=e.map((function(t){return t()})),r=n.map((function(t){return t.next()})),i=0;case 6:if(!r[i].done){a.next=13;break}if(n[i]=e[i](),r[i]=n[i].next(),!(++i>=n.length)){a.next=11;break}return a.abrupt("return");case 11:a.next=16;break;case 13:return a.next=15,r.map((function(t){return t.value}));case 15:i=0;case 16:r[i]=n[i].next();case 17:a.next=6;break;case 19:case"end":return a.stop()}}),d)}var K=function(){function t(e,A){Object(u.a)(this,t),e=J(e,A.shape),this.dimIndexers=[];for(var n=A.shape,r=0;r<n.length;r++){var i=e[r],o=n[r],a=A.chunks[r];if(null===i&&(i=O(null)),"number"===typeof i)this.dimIndexers.push(new P(i,o,a));else{if(!Y(i))throw new RangeError("Unspported selection item for basic indexing; expected integer or slice, got ".concat(i));this.dimIndexers.push(new q(i,o,a))}}this.shape=[];var s,g=Object(I.a)(this.dimIndexers);try{for(g.s();!(s=g.n()).done;){var c=s.value;c instanceof q&&this.shape.push(c.numItems)}}catch(l){g.e(l)}finally{g.f()}this.dropAxes=null}return Object(s.a)(t,[{key:"iter",value:c.a.mark((function t(){var e,A,n,r,i,o,s,g,u,l,C;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.dimIndexers.map((function(t){return function(){return t.iter()}})),A=W.apply(void 0,Object(a.a)(e)),n=Object(I.a)(A),t.prev=3,n.s();case 5:if((r=n.n()).done){t.next=16;break}i=r.value,o=[],s=[],g=[],u=Object(I.a)(i);try{for(u.s();!(l=u.n()).done;)C=l.value,o.push(C.dimChunkIndex),s.push(C.dimChunkSelection),null!==C.dimOutSelection&&g.push(C.dimOutSelection)}catch(c){u.e(c)}finally{u.f()}return t.next=14,{chunkCoords:o,chunkSelection:s,outSelection:g};case 14:t.next=5;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(3),n.e(t.t0);case 21:return t.prev=21,n.f(),t.finish(21);case 24:case"end":return t.stop()}}),t,this,[[3,18,21,24]])}))}]),t}(),P=function(){function t(e,A,n){Object(u.a)(this,t),e=j(e,A),this.dimSelection=e,this.dimLength=A,this.dimChunkLength=n,this.numItems=1}return Object(s.a)(t,[{key:"iter",value:c.a.mark((function t(){var e,A,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Math.floor(this.dimSelection/this.dimChunkLength),A=e*this.dimChunkLength,n=this.dimSelection-A,null,t.next=6,{dimChunkIndex:e,dimChunkSelection:n,dimOutSelection:null};case 6:case"end":return t.stop()}}),t,this)}))}]),t}(),q=function(){function t(e,A,n){Object(u.a)(this,t);var r=M(e,A),i=Object(o.a)(r,3),a=i[0],s=i[1],g=i[2];if(this.start=a,this.stop=s,this.step=g,this.step<1)throw new N;this.dimLength=A,this.dimChunkLength=n,this.numItems=Math.max(0,Math.ceil((this.stop-this.start)/this.step)),this.numChunks=Math.ceil(this.dimLength/this.dimChunkLength)}return Object(s.a)(t,[{key:"iter",value:c.a.mark((function t(){var e,A,n,r,i,o,a,s,g,I,u,l,C;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=Math.floor(this.start/this.dimChunkLength),A=Math.ceil(this.stop/this.dimChunkLength),n=e;case 3:if(!(n<A)){t.next=20;break}return r=n*this.dimChunkLength,i=Math.min(this.dimLength,(n+1)*this.dimChunkLength),o=i-r,a=void 0,s=void 0,g=void 0,this.start<r?(a=0,(I=(r-this.start)%this.step)>0&&(a+=this.step-I),g=Math.ceil((r-this.start)/this.step)):(a=this.start-r,g=0),s=this.stop>i?o:this.stop-r,u=O(a,s,this.step),l=Math.ceil((s-a)/this.step),C=O(g,g+l),t.next=17,{dimChunkIndex:n,dimChunkSelection:u,dimOutSelection:C};case 17:n++,t.next=3;break;case 20:case"end":return t.stop()}}),t,this)}))}]),t}(),X="undefined"!==typeof t&&t.versions&&t.versions.node;function z(t){if(null===t)return"";for(t instanceof String&&(t=t.valueOf()),t=t.replace(/\\/g,"/");t.length>0&&"/"===t[0];)t=t.slice(1);for(;t.length>0&&"/"===t[t.length-1];)t=t.slice(0,t.length-1);var e,A=(t=t.replace(/\/\/+/g,"/")).split("/"),n=Object(I.a)(A);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("."===r||".."===r)throw Error("path containing '.' or '..' segment not allowed")}}catch(i){n.e(i)}finally{n.f()}return t}function $(t){return"number"===typeof t&&(t=[t]),t.map((function(t){return Math.floor(t)}))}function tt(t,e){if(null===t||!0===t)throw new Error("Chunk guessing is not supported yet");return!1===t?e:("number"===typeof t&&(t=[t]),t.length<e.length&&(t=t.concat(e.slice(t.length))),t.map((function(t,A){return-1===t||null===t?e[A]:Math.floor(t)})))}function et(t){return t=t.toUpperCase()}function At(t,e){if(null===t)return!0;Array.isArray(t)||(t=[t]);for(var A=0;A<Math.min(t.length,e.length);A++){var n=t[A];if(null!==n){if(Y(n)){var r=n,i=1===r.step||null===r.step;if(null===r.start&&null===r.stop&&i)continue;if(r.stop-r.start===e[A]&&i)continue;return!1}return!1}}return!0}function nt(t,e){if(t.length!==e.length)return!1;for(var A=0;A<t.length;A++)if(t[A]!==e[A])return!1;return!0}function rt(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];return e.map((function(t,e){return 0===e?t.trim().replace(/[\/]*$/g,""):t.trim().replace(/(^[\/]*|[\/]*$)/g,"")})).filter((function(t){return t.length})).join("/")}function it(t){var e=t.BYTES_PER_ELEMENT;if(1!==e){if(X){var A=n.from(t.buffer,t.byteOffset,t.length*e);return 2===e&&A.swap16(),4===e&&A.swap32(),void(8===e&&A.swap64())}for(var r,i=new Uint8Array(t.buffer,t.byteOffset,t.length*e),o=e/2,a=e-1,s=0;s<i.length;s+=e)for(var g=0;g<o;g++)r=i[s+g],i[s+g]=i[s+a-g],i[s+a-g]=r}}function ot(t){var e=t.slice();return it(e),e}function at(t){return st.apply(this,arguments)}function st(){return(st=Object(f.a)(c.a.mark((function t(e){var A,n,r,i=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=z(A=i.length>1&&void 0!==i[1]?i[1]:null),n=It(A),r=n+".zarray",t.abrupt("return",e.containsItem(r));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gt(t){return ct.apply(this,arguments)}function ct(){return(ct=Object(f.a)(c.a.mark((function t(e){var A,n,r,i=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=z(A=i.length>1&&void 0!==i[1]?i[1]:null),n=It(A),r=n+".zgroup",t.abrupt("return",e.containsItem(r));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function It(t){return t.length>0?t+"/":""}function ut(t,e,A,n){return lt.apply(this,arguments)}function lt(){return(lt=Object(f.a)(c.a.mark((function t(e,A,n,r){var i,o,a,s,g;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==A.length){t.next=2;break}return t.abrupt("return");case 2:i=A.split("/"),o="",a=Object(I.a)(i.slice(0,i.length-1)),t.prev=5,a.s();case 7:if((s=a.n()).done){t.next=25;break}return g=s.value,o+=g,t.next=12,at(e,o);case 12:if(!t.sent){t.next=17;break}return t.next=15,Ct(e,o,r);case 15:t.next=22;break;case 17:return t.next=19,gt(e,o);case 19:if(t.sent){t.next=22;break}return t.next=22,Ct(e,o);case 22:o+="/";case 23:t.next=7;break;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(5),a.e(t.t0);case 30:return t.prev=30,a.f(),t.finish(30);case 33:case"end":return t.stop()}}),t,null,[[5,27,30,33]])})))).apply(this,arguments)}function Ct(t){return ht.apply(this,arguments)}function ht(){return(ht=Object(f.a)(c.a.mark((function t(e){var A,n,r,i,o=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]&&o[2],A=z(A),!n){t.next=7;break}throw Error("Group overwriting not implemented yet :(");case 7:return t.next=9,at(e,A);case 9:if(!t.sent){t.next=13;break}throw new b(A);case 13:return t.next=15,gt(e,A);case 15:if(!t.sent){t.next=17;break}throw new F(A);case 17:return r={zarr_format:2},i=It(A)+".zgroup",t.next=21,e.setItem(i,JSON.stringify(r));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Bt(t){return ft.apply(this,arguments)}function ft(){return(ft=Object(f.a)(c.a.mark((function t(e){var A,n,r,i=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=i.length>1&&void 0!==i[1]?i[1]:null,n=i.length>2&&void 0!==i[2]?i[2]:null,r=i.length>3&&void 0!==i[3]&&i[3],A=z(A),t.next=6,ut(e,A,n,r);case 6:return t.next=8,Ct(e,A,r);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function dt(t,e,A,n,r,i,o,a,s,g,c){return Qt.apply(this,arguments)}function Qt(){return(Qt=Object(f.a)(c.a.mark((function t(e,A,n,r,i,o,a,s,g,I,u){var l,C,h;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!g){t.next=4;break}throw Error("Array overwriting not implemented yet :(");case 4:return t.next=6,at(e,i);case 6:if(!t.sent){t.next=10;break}throw new b(i);case 10:return t.next=12,gt(e,i);case 12:if(!t.sent){t.next=14;break}throw new F(i);case 14:if(r=r,A=$(A),n=tt(n,A),s=et(s),a=a,!(null!==u&&u.length>0)){t.next=21;break}throw Error("Filters are not supported yet");case 21:return l=a,"number"===typeof a&&(Number.isNaN(a)&&(l="NaN"),Number.POSITIVE_INFINITY===a&&(l="Infinity"),Number.NEGATIVE_INFINITY===a&&(l="-Infinity")),C={zarr_format:2,shape:A,chunks:n,dtype:r,fill_value:l,order:s,compressor:o,filters:u=null},h=It(i)+".zarray",t.next=28,e.setItem(h,JSON.stringify(C));case 28:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Et(t,e,A,n){return pt.apply(this,arguments)}function pt(){return(pt=Object(f.a)(c.a.mark((function t(e,A,n,r){var i,o,a,s,g,I,u,l=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.length>4&&void 0!==l[4]?l[4]:null,o=l.length>5&&void 0!==l[5]?l[5]:null,a=l.length>6&&void 0!==l[6]?l[6]:null,s=l.length>7&&void 0!==l[7]?l[7]:"C",g=l.length>8&&void 0!==l[8]&&l[8],I=l.length>9&&void 0!==l[9]?l[9]:null,u=l.length>10&&void 0!==l[10]?l[10]:null,i=z(i),t.next=10,ut(e,i,I,g);case 10:return t.next=12,dt(e,A,n,r,i,o,a,s,g,I,u);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yt(t){if("string"!==typeof t){if(X&&n.isBuffer(t))return JSON.parse(t.toString());if(t instanceof ArrayBuffer){var e=new TextDecoder,A=new Uint8Array(t);return JSON.parse(e.decode(A))}return t}return JSON.parse(t)}var vt=function(){function t(e,A,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Object(u.a)(this,t),this.store=e,this.key=A,this.readOnly=n,this.cache=r,this.cachedValue=null}return Object(s.a)(t,[{key:"asObject",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cache||null===this.cachedValue){t.next=2;break}return t.abrupt("return",this.cachedValue);case 2:return t.next=4,this.getNoSync();case 4:return e=t.sent,this.cache&&(this.cachedValue=e),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"getNoSync",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.store.getItem(this.key);case 3:return e=t.sent,t.abrupt("return",yt(e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{});case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));return function(){return t.apply(this,arguments)}}()},{key:"setNoSync",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNoSync();case 2:return(n=t.sent)[e]=A,t.next=6,this.putNoSync(n);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"putNoSync",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.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)})));return function(e){return t.apply(this,arguments)}}()},{key:"delNoSync",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNoSync();case 2:return delete(A=t.sent)[e],t.next=6,this.putNoSync(A);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"put",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new S("attributes are read-only");case 2:return t.abrupt("return",this.putNoSync(e));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"setItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new S("attributes are read-only");case 2:return t.abrupt("return",this.setNoSync(e,A));case 3:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"getItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.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)})));return function(e){return t.apply(this,arguments)}}()},{key:"deleteItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new S("attributes are read-only");case 2:return t.abrupt("return",this.delNoSync(e));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"containsItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.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)})));return function(e){return t.apply(this,arguments)}}()},{key:"proxy",value:function(){return v(this)}}]),t}(),mt={"|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 bt(t){if(t instanceof Uint8Array)return"|u1";if(t instanceof Int8Array)return"|i1";if(t instanceof Uint16Array)return"<u2";if(t instanceof Int16Array)return"<i2";if(t instanceof Uint32Array)return"<u4";if(t instanceof Int32Array)return"<i4";if(t instanceof Float32Array)return"<f4";if(t instanceof Float64Array)return"<f8";throw new k("Mapping for TypedArray to Dtypestring not known")}function Ft(t){return void 0!==t.byteLength?t.constructor:Ft(t[0])}function wt(t,e,A){var n=_(J(A,e),e),r=Object(o.a)(n,2),i=r[0],a=r[1];return[function t(e,A,n){var r=n[0];if("number"===typeof r)return 1===A.length?e[r]:t(e[r],A.slice(1),n.slice(1));var i=Object(o.a)(r,4),a=i[0],s=i[1],g=i[2],c=i[3];if(0===c)return new(Ft(e))(0);if(1===A.length){if(1===g)return e.slice(a,s);for(var I=new e.constructor(c),u=0;u<c;u++)I[u]=e[a+u*g];return I}for(var l=new Array(c),C=0;C<c;C++)l[C]=t(e[a+C*g],A.slice(1),n.slice(1));if(c>0&&"number"===typeof l[0]){var h=e[0].constructor;l=h.from(l)}return l}(t,e,i),a]}function St(t,e,A,n){var r=_(J(n,A,!0),A),i=Object(o.a)(r,2),a=i[0];i[1];Rt(t,e,A,a)}function Dt(t,e,A,n,r){var i=_(J(r,A,!1),A),a=Object(o.a)(i,2),s=a[0],g=a[1];if(JSON.stringify(g)!==JSON.stringify(n))throw new k("Shape mismatch in target and source NestedArray: ".concat(g," and ").concat(n));!function t(e,A,n,r){var i=r[0];if("number"===typeof A)return void Rt(e,A,n,r.map((function(t){return"number"===typeof t?[t,t+1,1,1]:t})));if("number"===typeof i)return void t(e[i],A,n.slice(1),r.slice(1));var a=Object(o.a)(i,4),s=a[0],g=(a[1],a[2]),c=a[3];if(1===n.length){if(1===g)e.set(A,s);else for(var I=0;I<c;I++)e[s+I*g]=A[I];return}for(var u=0;u<c;u++)t(e[s+u*g],A[u],n.slice(1),r.slice(1))}(t,e,A,s)}function Rt(t,e,A,n){var r=n[0],i=Object(o.a)(r,4),a=i[0],s=i[1],g=i[2],c=i[3];if(1!==A.length)for(var I=0;I<c;I++)Rt(t[a+I*g],e,A.slice(1),n.slice(1));else if(1===g)t.fill(e,a,s);else for(var u=0;u<c;u++)t[a+u*g]=e}function Ut(t,e,A){void 0===A&&(A=Ft(t));var n=new A(e.reduce((function(t,e){return t*e}),1));return function t(e,A,n,r){if(1===A.length)return void n.set(e,r);if(2===A.length){for(var i=0;i<A[0];i++)n.set(e[i],r+A[1]*i);return e}for(var o=A.slice(1),a=o.reduce((function(t,e){return t*e}),1),s=0;s<A[0];s++)t(e[s],o,n,r+a*s);return e}(t,e,n,0),n}var Gt=function(){function t(e,A,r){Object(u.a)(this,t);var i=null!==e&&!!e.BYTES_PER_ELEMENT;if(void 0===A){if(!i)throw new k("Shape argument is required unless you pass in a TypedArray");A=[e.length]}if(void 0===r){if(!i)throw new k("Dtype argument is required unless you pass in a TypedArray");r=bt(e)}if(A=$(A),this.shape=A,this.dtype=r,i&&1!==A.length&&(e=e.buffer),0===this.shape.length)this.data=new mt[r](1);else if(X&&n.isBuffer(e)||e instanceof ArrayBuffer||null===e||e.toString().startsWith("[object ArrayBuffer]")){var o=A.reduce((function(t,e){return t*e}),1);null===e&&(e=new ArrayBuffer(o*parseInt(r[r.length-1],10)));var a=e.byteLength/parseInt(r[r.length-1],10);if(o!==a)throw new Error("Buffer has ".concat(a," of dtype ").concat(r,", shape is too large or small ").concat(A," (flat=").concat(o,")"));var s=mt[r];this.data=function t(e,A,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(1===n.length)return new A(e.slice(r,r+n[0]*A.BYTES_PER_ELEMENT));var i=new Array(n[0]);if(2===n.length){for(var o=0;o<n[0];o++)i[o]=new A(e.slice(r+n[1]*o*A.BYTES_PER_ELEMENT,r+n[1]*(o+1)*A.BYTES_PER_ELEMENT));return i}for(var a=n.slice(1),s=a.reduce((function(t,e){return t*e}),1),g=0;g<n[0];g++)i[g]=t(e,A,a,r+s*g*A.BYTES_PER_ELEMENT);return i}(e,s,A)}else this.data=e}return Object(s.a)(t,[{key:"get",value:function(e){var A=wt(this.data,this.shape,e),n=Object(o.a)(A,2),r=n[0],i=n[1];return 0===i.length?r:new t(r,i,this.dtype)}},{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;null===t&&(t=[O(null)]),"number"===typeof e?0===this.shape.length?this.data[0]=e:St(this.data,e,this.shape,t):Dt(this.data,e.data,this.shape,e.shape,t)}},{key:"flatten",value:function(){return 1===this.shape.length?this.data:Ut(this.data,this.shape,mt[this.dtype])}}],[{key:"arange",value:function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"<i4",n=mt[A],r=Nt([e],n);return new t(r,[e],A)}}]),t}();function Nt(t,e){var A=t.reduce((function(t,e){return t*e}),1),n=new e(A);return n.set(Object(a.a)(Array(A).keys())),n}function kt(t,e,A,n,r){var a=_(J(n,A,!0),A);!function t(e,A,n,r){var a=Object(i.a)(r),s=a[0],g=a.slice(1),c=Object(i.a)(n),I=c[0],u=c.slice(1),l=Object(o.a)(s,4),C=l[0],h=(l[1],l[2]),B=l[3];if(1===n.length){if(1===h&&1===I)A.fill(e,C,C+B);else for(var f=0;f<B;f++)A[I*(C+h*f)]=e;return}for(var d=0;d<B;d++)t(e,A.subarray(I*(C+h*d)),u,g)}(r,t,e,Object(o.a)(a,1)[0])}function xt(t,e,A,n,r,a,s){var g=_(J(n,A,!1),A),c=Object(o.a)(g,2),I=c[0],u=c[1];if(JSON.stringify(u)!==JSON.stringify(s))throw new k("Shape mismatch in target and source RawArray: ".concat(u," and ").concat(s));!function t(e,A,n,r,a){if(0===n.length)return void e.set(r);var s=Object(i.a)(n),g=s[0],c=s.slice(1),I=Object(i.a)(A),u=I[0],l=I.slice(1);if("number"===typeof g)return void t(e.subarray(g*u),l,c,r,a);var C=Object(i.a)(a),h=C[0],B=C.slice(1),f=Object(o.a)(g,4),d=f[0],Q=(f[1],f[2]),E=f[3];if(1===A.length){if(1===Q&&1===u&&1===h)e.set(r.subarray(0,E),d);else for(var p=0;p<E;p++)e[u*(d+Q*p)]=r[h*p];return}for(var y=0;y<E;y++)t(e.subarray(u*(d+y*Q)),l,c,r.subarray(h*y),B)}(t,e,I,r,a)}function Ot(t,e,A,n,r,a,s,g){var c=_(J(n,A,!0),A),I=Object(o.a)(c,1)[0],u=_(J(g,s,!1),s);!function t(e,A,n,r,a,s){if(0===s.length)return void e.set(r.subarray(0,e.length));var g=Object(i.a)(n),c=g[0],I=g.slice(1),u=Object(i.a)(s),l=u[0],C=u.slice(1),h=Object(i.a)(A),B=h[0],f=h.slice(1),d=Object(i.a)(a),Q=d[0],E=d.slice(1);if("number"===typeof l)return void t(e,A,n,r.subarray(Q*l),E,C);var p=Object(o.a)(c,4),y=p[0],v=(p[1],p[2]),m=p[3],b=Object(o.a)(l,4),F=b[0],w=(b[1],b[2]);b[3];if(1===A.length&&1===a.length){if(1===v&&1===B&&1===w&&1===Q)e.set(r.subarray(F,F+m),y);else for(var S=0;S<m;S++)e[B*(y+v*S)]=r[Q*(F+w*S)];return}for(var D=0;D<m;D++)t(e.subarray(B*(y+D*v)),f,I,r.subarray(Q*(F+D*w)),E,C)}(t,e,I,r,a,Object(o.a)(u,1)[0])}var Mt=function(){function t(e,A,r,i){Object(u.a)(this,t);var o=null!==e&&!!e.BYTES_PER_ELEMENT;if(void 0===A){if(!o)throw new k("Shape argument is required unless you pass in a TypedArray");A=[e.length]}if(A=$(A),void 0===r){if(!o)throw new k("Dtype argument is required unless you pass in a TypedArray");r=bt(e)}if(void 0===i&&(i=function(t){for(var e=t.length,A=Array(e),n=1,r=e-1;r>=0;r--)A[r]=n,n*=t[r];return A}(A)),this.shape=A,this.dtype=r,this.strides=i,o&&1!==A.length&&(e=e.buffer),0===this.shape.length)this.data=new mt[r](1);else if(X&&n.isBuffer(e)||e instanceof ArrayBuffer||null===e||e.toString().startsWith("[object ArrayBuffer]")){var a=A.reduce((function(t,e){return t*e}),1);null===e&&(e=new ArrayBuffer(a*parseInt(r[r.length-1],10)));var s=e.byteLength/parseInt(r[r.length-1],10);if(a!==s)throw new Error("Buffer has ".concat(s," of dtype ").concat(r,", shape is too large or small ").concat(A," (flat=").concat(a,")"));var g=mt[r];this.data=new g(e)}else this.data=e}return Object(s.a)(t,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,A=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;null===e&&(e=[O(null)]),"number"===typeof A?0===this.shape.length?this.data[0]=A:kt(this.data,this.strides,this.shape,e,A):A instanceof t&&n?Ot(this.data,this.strides,this.shape,e,A.data,A.strides,A.shape,n):xt(this.data,this.strides,this.shape,e,A.data,A.strides,A.shape)}}]),t}();function Lt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _t(t,e){return t(e={exports:{}},e.exports),e.exports}var Jt=_t((function(t){var e=Object.prototype.hasOwnProperty,A="~";function n(){}function r(t,e,A){this.fn=t,this.context=e,this.once=A||!1}function i(t,e,n,i,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var a=new r(n,i||t,o),s=A?A+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],a]:t._events[s].push(a):(t._events[s]=a,t._eventsCount++),t}function o(t,e){0===--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(A=!1)),a.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(A?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t){var e=A?A+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r<i;r++)o[r]=n[r].fn;return o},a.prototype.listenerCount=function(t){var e=A?A+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,r,i,o){var a=A?A+t:t;if(!this._events[a])return!1;var s,g,c=this._events[a],I=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),I){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,i),!0;case 6:return c.fn.call(c.context,e,n,r,i,o),!0}for(g=1,s=new Array(I-1);g<I;g++)s[g-1]=arguments[g];c.fn.apply(c.context,s)}else{var u,l=c.length;for(g=0;g<l;g++)switch(c[g].once&&this.removeListener(t,c[g].fn,void 0,!0),I){case 1:c[g].fn.call(c[g].context);break;case 2:c[g].fn.call(c[g].context,e);break;case 3:c[g].fn.call(c[g].context,e,n);break;case 4:c[g].fn.call(c[g].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(I-1);u<I;u++)s[u-1]=arguments[u];c[g].fn.apply(c[g].context,s)}}return!0},a.prototype.on=function(t,e,A){return i(this,t,e,A,!1)},a.prototype.once=function(t,e,A){return i(this,t,e,A,!0)},a.prototype.removeListener=function(t,e,n,r){var i=A?A+t:t;if(!this._events[i])return this;if(!e)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||o(this,i);else{for(var s=0,g=[],c=a.length;s<c;s++)(a[s].fn!==e||r&&!a[s].once||n&&a[s].context!==n)&&g.push(a[s]);g.length?this._events[i]=1===g.length?g[0]:g:o(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=A?A+t:t,this._events[e]&&o(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=A,a.EventEmitter=a,t.exports=a})),Tt=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).name="TimeoutError",n}return A}(Object(B.a)(Error)),jt=function(t,e,A){return new Promise((function(n,r){if("number"!==typeof e||e<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(e!==1/0){var i=setTimeout((function(){if("function"!==typeof A){var i="string"===typeof A?A:"Promise timed out after ".concat(e," milliseconds"),o=A instanceof Error?A:new Tt(i);"function"===typeof t.cancel&&t.cancel(),r(o)}else try{n(A())}catch(a){r(a)}}),e);!function(t,e){e=e||function(){},t.then((function(t){return new Promise((function(t){t(e())})).then((function(){return t}))}),(function(t){return new Promise((function(t){t(e())})).then((function(){throw t}))}))}(t.then(n,r),(function(){clearTimeout(i)}))}else n(t)}))},Ht=jt,Yt=jt,Vt=Tt;Ht.default=Yt,Ht.TimeoutError=Vt;var Zt=_t((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,A){for(var n=0,r=t.length;r>0;){var i=r/2|0,o=n+i;A(t[o],e)<=0?(n=++o,r-=i+1):r=i}return n}}));Lt(Zt);var Wt=_t((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(){Object(u.a)(this,t),this._queue=[]}return Object(s.a)(t,[{key:"enqueue",value:function(t,e){var A={priority:(e=Object.assign({priority:0},e)).priority,run:t};if(this.size&&this._queue[this.size-1].priority>=e.priority)this._queue.push(A);else{var n=Zt.default(this._queue,A,(function(t,e){return e.priority-t.priority}));this._queue.splice(n,0,A)}}},{key:"dequeue",value:function(){var t=this._queue.shift();return t&&t.run}},{key:"size",get:function(){return this._queue.length}}]),t}();e.default=A}));Lt(Wt);var Kt,Pt=Lt(_t((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){},n=new Ht.default.TimeoutError,r=function(t){Object(C.a)(r,t);var e=Object(h.a)(r);function r(t){var n;if(Object(u.a)(this,r),(n=e.call(this))._intervalCount=0,n._intervalEnd=0,n._pendingCount=0,n._resolveEmpty=A,n._resolveIdle=A,!("number"===typeof(t=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:Wt.default},t)).intervalCap&&t.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat(t.intervalCap,"` (").concat(typeof t.intervalCap,")"));if(void 0===t.interval||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat(t.interval,"` (").concat(typeof t.interval,")"));return n._carryoverConcurrencyCount=t.carryoverConcurrencyCount,n._isIntervalIgnored=t.intervalCap===1/0||0===t.interval,n._intervalCap=t.intervalCap,n._interval=t.interval,n._queue=new t.queueClass,n._queueClass=t.queueClass,n.concurrency=t.concurrency,n._timeout=t.timeout,n._throwOnTimeout=!0===t.throwOnTimeout,n._isPaused=!1===t.autoStart,n}return Object(s.a)(r,[{key:"_next",value:function(){this._pendingCount--,this._tryToStartAnother()}},{key:"_resolvePromises",value:function(){this._resolveEmpty(),this._resolveEmpty=A,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=A)}},{key:"_onResumeInterval",value:function(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}},{key:"_isIntervalPaused",value:function(){var t=this,e=Date.now();if(void 0===this._intervalId){var A=this._intervalEnd-e;if(!(A<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((function(){t._onResumeInterval()}),A)),!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 t=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother)return this.emit("active"),this._queue.dequeue()(),t&&this._initializeIntervalIfNeeded(),!0}return!1}},{key:"_initializeIntervalIfNeeded",value:function(){var t=this;this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((function(){t._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 t=Object(f.a)(c.a.mark((function t(e){var A,r=this,i=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=i.length>1&&void 0!==i[1]?i[1]:{},t.abrupt("return",new Promise((function(t,i){var o=function(){var o=Object(f.a)(c.a.mark((function o(){var a;return c.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r._pendingCount++,r._intervalCount++,o.prev=2,a=void 0===r._timeout&&void 0===A.timeout?e():Ht.default(Promise.resolve(e()),void 0===A.timeout?r._timeout:A.timeout,(function(){(void 0===A.throwOnTimeout?r._throwOnTimeout:A.throwOnTimeout)&&i(n)})),o.t0=t,o.next=7,a;case 7:o.t1=o.sent,(0,o.t0)(o.t1),o.next=14;break;case 11:o.prev=11,o.t2=o.catch(2),i(o.t2);case 14:r._next();case 15:case"end":return o.stop()}}),o,null,[[2,11]])})));return function(){return o.apply(this,arguments)}}();r._queue.enqueue(o,A),r._tryToStartAnother()})));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"addAll",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.map(function(){var t=Object(f.a)(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.add(e,A));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 1:case"end":return t.stop()}}),t)})));return function(e,A){return t.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 t=Object(f.a)(c.a.mark((function t(){var e=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==this._queue.size){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise((function(t){var A=e._resolveEmpty;e._resolveEmpty=function(){A(),t()}})));case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"onIdle",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==this._pendingCount||0!==this._queue.size){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise((function(t){var A=e._resolveIdle;e._resolveIdle=function(){A(),t()}})));case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.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(t){if(!("number"===typeof t&&t>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(t,"` (").concat(typeof t,")"));this._concurrency=t,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(t){this._timeout=t},get:function(){return this._timeout}}]),r}(Jt);e.default=r}))),qt=function(){function t(e){var A=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]:null,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];Object(u.a)(this,t),this.store=e,this._chunkStore=i,this.path=z(A),this.keyPrefix=It(this.path),this.readOnly=r,this.cacheMetadata=o,this.cacheAttrs=a,this.meta=n,null!==this.meta.compressor?this.compressor=p(this.meta.compressor):this.compressor=null;var s=this.keyPrefix+".zattrs";this.attrs=new vt(this.store,s,this.readOnly,a)}return Object(s.a)(t,[{key:"reloadMetadata",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e,A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.keyPrefix+".zarray",A=this.store.getItem(e),t.t0=yt,t.next=5,A;case 5:return t.t1=t.sent,this.meta=(0,t.t0)(t.t1),t.abrupt("return",this.meta);case 8:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"refreshMetadata",value:function(){var t=Object(f.a)(c.a.mark((function t(){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.cacheMetadata){t.next=3;break}return t.next=3,this.reloadMetadata();case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"get",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getBasicSelection(t,!1,e)}},{key:"getRaw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getBasicSelection(t,!0,e)}},{key:"getBasicSelection",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A,n,r,i,o,a=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=a.length>1&&void 0!==a[1]&&a[1],n=a.length>2&&void 0!==a[2]?a[2]:{},r=n.concurrencyLimit,i=void 0===r?10:r,o=n.progressCallback,this.cacheMetadata){t.next=5;break}return t.next=5,this.reloadMetadata();case 5:if(this.shape!==[]){t.next=9;break}throw new Error("Shape [] indexing is not supported yet");case 9:return t.abrupt("return",this.getBasicSelectionND(e,A,i,o));case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"getBasicSelectionND",value:function(t,e,A,n){var r=new K(t,this);return this.getSelection(r,e,A,n)}},{key:"getSelection",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n,r){var i,o,a,s,g,u,l,C,h,B,d,Q,E=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.dtype,o=e.shape,a=e.shape.reduce((function(t,e){return t*e}),1),!A||a!==this.chunkSize){t.next=12;break}if(s=e.iter(),!1!==(g=s.next()).done||!0!==s.next().done){t.next=12;break}return u=g.value,t.next=10,this.decodeDirectToRawArray(u,o,a);case 10:return l=t.sent,t.abrupt("return",l);case 12:if(C=A?new Mt(null,o,i):new Gt(null,o,i),0!==a){t.next=15;break}return t.abrupt("return",C);case 15:if(h=new Pt({concurrency:n}),r)!function(){var t,A=0,n=0,i=Object(I.a)(e.iter());try{for(i.s();!(t=i.n()).done;){t.value;n+=1}}catch(g){i.e(g)}finally{i.f()}r({progress:0,queueSize:n});var o,a=Object(I.a)(e.iter());try{var s=function(){var t=o.value;Object(f.a)(c.a.mark((function i(){return c.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,h.add((function(){return E.chunkGetItem(t.chunkCoords,t.chunkSelection,C,t.outSelection,e.dropAxes)}));case 2:r({progress:A+=1,queueSize:n});case 4:case"end":return i.stop()}}),i)})))()};for(a.s();!(o=a.n()).done;)s()}catch(g){a.e(g)}finally{a.f()}}();else{B=Object(I.a)(e.iter());try{for(Q=function(){var t=d.value;h.add((function(){return E.chunkGetItem(t.chunkCoords,t.chunkSelection,C,t.outSelection,e.dropAxes)}))},B.s();!(d=B.n()).done;)Q()}catch(p){B.e(p)}finally{B.f()}}return t.next=19,h.onIdle();case 19:if(0!==C.shape.length){t.next=21;break}return t.abrupt("return",C.data[0]);case 21:return t.abrupt("return",C);case 22:case"end":return t.stop()}}),t,this)})));return function(e,A,n,r){return t.apply(this,arguments)}}()},{key:"chunkGetItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n,r,i){var o,a,s,g,I;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length===this._chunkDataShape.length){t.next=2;break}throw new k("Inconsistent shapes: chunkCoordsLength: ".concat(e.length,", cDataShapeLength: ").concat(this.chunkDataShape.length));case 2:return o=this.chunkKey(e),t.prev=3,t.next=6,this.chunkStore.getItem(o);case 6:return a=t.sent,t.next=9,this.decodeChunk(a);case 9:if(s=t.sent,!(n instanceof Gt)){t.next=21;break}if(!Z(r)||!At(A,this.chunks)||this.meta.filters){t.next=14;break}return n.set(r,this.toNestedArray(s)),t.abrupt("return");case 14:if(g=this.toNestedArray(s),I=g.get(A),null===i){t.next=18;break}throw new Error("Drop axes is not supported yet");case 18:n.set(r,I),t.next=22;break;case 21:n.set(r,this.chunkBufferToRawArray(s),A);case 22:t.next=31;break;case 24:if(t.prev=24,t.t0=t.catch(3),!m(t.t0)){t.next=30;break}null!==this.fillValue&&n.set(r,this.fillValue),t.next=31;break;case 30:throw t.t0;case 31:case"end":return t.stop()}}),t,this,[[3,24]])})));return function(e,A,n,r,i){return t.apply(this,arguments)}}()},{key:"getRawChunk",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,r,i,o,a,s;return c.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]=j(e[n],r);t.next=13;break;case 6:if(t.prev=6,t.t0=t.catch(2),!(t.t0 instanceof U)){t.next=12;break}throw new U("index ".concat(e.join(".")," is out of bounds for shape: ").concat(this.shape," and chunks ").concat(this.chunks));case 12:throw t.t0;case 13:return i=this.chunkKey(e),o=this.chunkStore.getItem(i,null===A||void 0===A?void 0:A.storeOptions),t.t1=this,t.next=18,o;case 18:return t.t2=t.sent,t.next=21,t.t1.decodeChunk.call(t.t1,t.t2);case 21:return a=t.sent,s=this.chunks.filter((function(t){return 1!==t})),t.abrupt("return",new Mt(a,s,this.dtype));case 24:case"end":return t.stop()}}),t,this,[[2,6]])})));return function(e,A){return t.apply(this,arguments)}}()},{key:"chunkKey",value:function(t){return this.keyPrefix+t.join(".")}},{key:"ensureByteArray",value:function(t){return"string"===typeof t?new Uint8Array(n.from(t).buffer):new Uint8Array(t)}},{key:"toTypedArray",value:function(t){return new mt[this.dtype](t)}},{key:"toNestedArray",value:function(t){var e=this.ensureByteArray(t).buffer;return new Gt(e,this.chunks,this.dtype)}},{key:"decodeChunk",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=this.ensureByteArray(e),null===this.compressor){t.next=7;break}return t.next=4,this.compressor;case 4:return t.next=6,t.sent.decode(A);case 6:A=t.sent;case 7:return this.dtype.includes(">")&&it(this.toTypedArray(A.buffer)),t.abrupt("return",A.buffer);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"chunkBufferToRawArray",value:function(t){return new Mt(t,this.chunks,this.dtype)}},{key:"decodeDirectToRawArray",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n){var r,i,o,a;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.chunkCoords,i=this.chunkKey(r),t.prev=2,t.next=5,this.chunkStore.getItem(i);case 5:return o=t.sent,t.t0=Mt,t.next=9,this.decodeChunk(o);case 9:return t.t1=t.sent,t.t2=A,t.t3=this.dtype,t.abrupt("return",new t.t0(t.t1,t.t2,t.t3));case 15:if(t.prev=15,t.t4=t.catch(2),!m(t.t4)){t.next=22;break}return a=new mt[this.dtype](n),t.abrupt("return",new Mt(a.fill(this.fillValue),A));case 22:throw t.t4;case 23:case"end":return t.stop()}}),t,this,[[2,15]])})));return function(e,A,n){return t.apply(this,arguments)}}()},{key:"set",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e,A,n,r=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:null,A=r.length>1?r[1]:void 0,n=r.length>2&&void 0!==r[2]?r[2]:{},t.next=5,this.setBasicSelection(e,A,n);case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"setBasicSelection",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,r,i,o,a=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>2&&void 0!==a[2]?a[2]:{},r=n.concurrencyLimit,i=void 0===r?10:r,o=n.progressCallback,!this.readOnly){t.next=3;break}throw new S("Object is read only");case 3:if(this.cacheMetadata){t.next=6;break}return t.next=6,this.reloadMetadata();case 6:if(this.shape!==[]){t.next=10;break}throw new Error("Shape [] indexing is not supported yet");case 10:return t.next=12,this.setBasicSelectionND(e,A,i,o);case 12:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"setBasicSelectionND",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n,r){var i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=new K(e,this),t.next=3,this.setSelection(i,A,n,r);case 3:case"end":return t.stop()}}),t,this)})));return function(e,A,n,r){return t.apply(this,arguments)}}()},{key:"getChunkValue",value:function(t,e,A,n){var r;if(n===[])r=A;else if("number"===typeof A)r=A;else if(r=A.get(t.outSelection),null!==e.dropAxes)throw new Error("Handling drop axes not supported yet");return r}},{key:"setSelection",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n,r){var i,o,a,s,g,u=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((i=e.shape)!==[]){t.next=5;break}t.next=15;break;case 5:if("number"!==typeof A){t.next=9;break}t.next=15;break;case 9:if(!(A instanceof Gt)){t.next=14;break}if(nt(A.shape,i)){t.next=12;break}throw new k("Shape mismatch in source NestedArray and set selection: ".concat(A.shape," and ").concat(i));case 12:t.next=15;break;case 14:throw new Error("Unknown data type for setting :(");case 15:if(o=new Pt({concurrency:n}),r)!function(){var t,n=0,a=Object(I.a)(e.iter());try{for(a.s();!(t=a.n()).done;){t.value;n+=1}}catch(h){a.e(h)}finally{a.f()}var s=0;r({progress:0,queueSize:n});var g,l=Object(I.a)(e.iter());try{var C=function(){var t=g.value,a=u.getChunkValue(t,e,A,i);Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.add((function(){return u.chunkSetItem(t.chunkCoords,t.chunkSelection,a)}));case 2:r({progress:s+=1,queueSize:n});case 4:case"end":return e.stop()}}),e)})))()};for(l.s();!(g=l.n()).done;)C()}catch(h){l.e(h)}finally{l.f()}}();else{a=Object(I.a)(e.iter());try{for(g=function(){var t=s.value,n=u.getChunkValue(t,e,A,i);o.add((function(){return u.chunkSetItem(t.chunkCoords,t.chunkSelection,n)}))},a.s();!(s=a.n()).done;)g()}catch(l){a.e(l)}finally{a.f()}}return t.next=19,o.onIdle();case 19:case"end":return t.stop()}}),t)})));return function(e,A,n,r){return t.apply(this,arguments)}}()},{key:"chunkSetItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n){var r,i,o,a,s,g,I,u,l;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.chunkKey(e),i=null,o=mt[this.dtype],a=this.chunkSize,!At(A,this.chunks)){t.next=8;break}"number"===typeof n?(i=new o(a)).fill(n):i=n.flatten(),t.next=29;break;case 8:return t.prev=8,t.next=11,this.chunkStore.getItem(r);case 11:return g=t.sent,t.next=14,this.decodeChunk(g);case 14:I=t.sent,s=this.toTypedArray(I),t.next=26;break;case 18:if(t.prev=18,t.t0=t.catch(8),!m(t.t0)){t.next=25;break}s=new o(a),null!==this.fillValue&&s.fill(this.fillValue),t.next=26;break;case 25:throw t.t0;case 26:(u=new Gt(s,this.chunks,this.dtype)).set(A,n),i=u.flatten();case 29:return t.next=31,this.encodeChunk(i);case 31:l=t.sent,this.chunkStore.setItem(r,l);case 33:case"end":return t.stop()}}),t,this,[[8,18]])})));return function(e,A,n){return t.apply(this,arguments)}}()},{key:"encodeChunk",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dtype.includes(">")&&(e=ot(e)),null===this.compressor){t.next=9;break}return A=new Uint8Array(e.buffer),t.next=5,this.compressor;case 5:return t.next=7,t.sent.encode(A);case 7:return n=t.sent,t.abrupt("return",n.buffer);case 9:return t.abrupt("return",e.buffer);case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{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 t=this.name;if(null===t)return null;var e=t.split("/");return e[e.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(t,e){return t*e}),1)}},{key:"dtype",get:function(){return this.meta.dtype}},{key:"fillValue",get:function(){var t=this.meta.fill_value;return"NaN"===t?NaN:"Infinity"===t?1/0:"-Infinity"===t?-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(t,e){return t*e}),1)}},{key:"length",get:function(){return this.shape[0]}},{key:"_chunkDataShape",get:function(){if(this.shape===[])return[1];for(var t=[],e=0;e<this.shape.length;e++)t[e]=Math.ceil(this.shape[e]/this.chunks[e]);return t}},{key:"chunkDataShape",get:function(){return this._chunkDataShape}},{key:"numChunks",get:function(){return this.chunkDataShape.reduce((function(t,e){return t*e}),1)}}],[{key:"create",value:function(){var e=Object(f.a)(c.a.mark((function e(A){var n,r,i,o,a,s,g=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=g.length>1&&void 0!==g[1]?g[1]:null,r=g.length>2&&void 0!==g[2]&&g[2],i=g.length>3&&void 0!==g[3]?g[3]:null,o=!(g.length>4&&void 0!==g[4])||g[4],a=!(g.length>5&&void 0!==g[5])||g[5],e.next=7,this.loadMetadataForConstructor(A,n);case 7:return s=e.sent,e.abrupt("return",new t(A,n,s,r,i,o,a));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadMetadataForConstructor",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,A=z(A),n=It(A),t.next=5,e.getItem(n+".zarray");case 5:return r=t.sent,t.abrupt("return",yt(r));case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,gt(e,A);case 13:if(!t.sent){t.next=15;break}throw new F(null!==A&&void 0!==A?A:"");case 15:throw new Error("Failed to load metadata for ZarrArray:"+t.t0.toString());case 16:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e,A){return t.apply(this,arguments)}}()}]),t}(),Xt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(u.a)(this,t),this.root=e}return Object(s.a)(t,[{key:"proxy",value:function(){return v(this)}},{key:"getParent",value:function(t){var e,A=this.root,n=t.split("/"),r=Object(I.a)(n.slice(0,n.length-1));try{for(r.s();!(e=r.n()).done;){if(!(A=A[e.value]))throw Error(t)}}catch(i){r.e(i)}finally{r.f()}return[A,n[n.length-1]]}},{key:"requireParent",value:function(t){var e,A=this.root,n=t.split("/"),r=Object(I.a)(n.slice(0,n.length-1));try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0===A[i]&&(A[i]={}),A=A[i]}}catch(o){r.e(o)}finally{r.f()}return[A,n[n.length-1]]}},{key:"getItem",value:function(t){var e=this.getParent(t),A=Object(o.a)(e,2),n=A[0][A[1]];if(void 0===n)throw new D(t);return n}},{key:"setItem",value:function(t,e){var A=this.requireParent(t),n=Object(o.a)(A,2);return n[0][n[1]]=e,!0}},{key:"deleteItem",value:function(t){var e=this.getParent(t),A=Object(o.a)(e,2);return delete A[0][A[1]]}},{key:"containsItem",value:function(t){try{return void 0!==this.getItem(t)}catch(e){return!1}}},{key:"keys",value:function(){throw new Error("Method not implemented.")}}]),t}();!function(t){t.HEAD="HEAD",t.GET="GET",t.PUT="PUT"}(Kt||(Kt={}));var zt=[Kt.HEAD,Kt.GET,Kt.PUT],$t=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(u.a)(this,t),this.url=e;var n=A.fetchOptions,r=void 0===n?{}:n,i=A.supportedMethods,o=void 0===i?zt:i;this.fetchOptions=r,this.supportedMethods=new Set(o)}return Object(s.a)(t,[{key:"keys",value:function(){throw new Error("Method not implemented.")}},{key:"getItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var i,o;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=rt(this.url,e),t.next=3,fetch(i,Object(r.a)({},this.fetchOptions,{},A));case 3:if(404!==(o=t.sent).status){t.next=8;break}throw new D(e);case 8:if(200===o.status){t.next=10;break}throw new x(String(o.status));case 10:if(!X){t.next=18;break}return t.t0=n,t.next=14,o.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",o.arrayBuffer());case 19:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"setItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.supportedMethods.has(Kt.PUT)){t.next=2;break}throw new Error("HTTP PUT no a supported method for store.");case 2:return n=rt(this.url,e),"string"===typeof A&&(A=(new TextEncoder).encode(A).buffer),t.next=6,fetch(n,Object(r.a)({},this.fetchOptions,{method:Kt.PUT,body:A}));case 6:return i=t.sent,t.abrupt("return","2"===i.status.toString()[0]);case 8:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"deleteItem",value:function(t){throw new Error("Method not implemented.")}},{key:"containsItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A,n,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=rt(this.url,e),n=this.supportedMethods.has(Kt.HEAD)?Kt.HEAD:Kt.GET,t.next=4,fetch(A,Object(r.a)({},this.fetchOptions,{method:n}));case 4:return i=t.sent,t.abrupt("return",200===i.status);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),t}();function te(t){return ee.apply(this,arguments)}function ee(){return(ee=Object(f.a)(c.a.mark((function t(e){var A,n,r,i,o,a,s,g,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.shape,n=e.chunks,r=void 0===n||n,i=e.dtype,o=void 0===i?"<i4":i,a=e.compressor,s=void 0===a?null:a,g=e.fillValue,I=void 0===g?null:g,u=e.order,l=void 0===u?"C":u,C=e.store,h=e.overwrite,B=void 0!==h&&h,f=e.path,d=e.chunkStore,Q=e.filters,E=e.cacheMetadata,p=void 0===E||E,y=e.cacheAttrs,v=void 0===y||y,m=e.readOnly,b=void 0!==m&&m,C=ue(C),t.next=4,Et(C,A,r,o,f,s,I,l,B,d,Q);case 4:return t.next=6,qt.create(C,f,b,d,p,v);case 6:return F=t.sent,t.abrupt("return",F);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ae(t){return ne.apply(this,arguments)}function ne(){return(ne=Object(f.a)(c.a.mark((function t(e){var A,n=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(A=n.length>1&&void 0!==n[1]?n[1]:{}).fillValue=null,t.abrupt("return",te(Object(r.a)({shape:e},A)));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function re(t){return ie.apply(this,arguments)}function ie(){return(ie=Object(f.a)(c.a.mark((function t(e){var A,n=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(A=n.length>1&&void 0!==n[1]?n[1]:{}).fillValue=0,t.abrupt("return",te(Object(r.a)({shape:e},A)));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function oe(t){return ae.apply(this,arguments)}function ae(){return(ae=Object(f.a)(c.a.mark((function t(e){var A,n=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(A=n.length>1&&void 0!==n[1]?n[1]:{}).fillValue=1,t.abrupt("return",te(Object(r.a)({shape:e},A)));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function se(t,e){return ge.apply(this,arguments)}function ge(){return(ge=Object(f.a)(c.a.mark((function t(e,A){var n,i=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=i.length>2&&void 0!==i[2]?i[2]:{}).fillValue=A,t.abrupt("return",te(Object(r.a)({shape:e},n)));case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ce(t){return Ie.apply(this,arguments)}function Ie(){return(Ie=Object(f.a)(c.a.mark((function t(e){var A,n,i,o,a=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=a.length>1&&void 0!==a[1]?a[1]:{},n=null,e instanceof Gt?(n=e.shape,A.dtype=void 0===A.dtype?e.dtype:A.dtype):n=e.byteLength,i=void 0!==A.readOnly&&A.readOnly,A.readOnly=!1,t.next=7,te(Object(r.a)({shape:n},A));case 7:return o=t.sent,t.next=10,o.set(null,e);case 10:return o.readOnly=i,t.abrupt("return",o);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ue(t){return void 0===t?new Xt:"string"===typeof t?new $t(t):t}var le=function(){function t(e){var A=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]:null,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];Object(u.a)(this,t),this.store=e,this._chunkStore=i,this.path=z(A),this.keyPrefix=It(this.path),this.readOnly=r,this.meta=n;var a=this.keyPrefix+".zattrs";this.attrs=new vt(this.store,a,this.readOnly,o)}return Object(s.a)(t,[{key:"itemPath",value:function(t){var e="string"===typeof t&&t.length>0&&"/"===t[0],A=z(t);return!e&&this.path.length>0?this.keyPrefix+A:A}},{key:"createGroup",value:function(){var e=Object(f.a)(c.a.mark((function e(A){var n,r,i=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],!this.readOnly){e.next=3;break}throw new S("group is read only");case 3:return r=this.itemPath(A),e.next=6,Bt(this.store,r,this._chunkStore,n);case 6:return e.abrupt("return",t.create(this.store,r,this.readOnly,this._chunkStore,this.attrs.cache));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"requireGroup",value:function(){var e=Object(f.a)(c.a.mark((function e(A){var n,r,i=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]&&i[1],!this.readOnly){e.next=3;break}throw new S("group is read only");case 3:return r=this.itemPath(A),e.next=6,gt(this.store,r);case 6:if(e.sent){e.next=9;break}return e.next=9,Bt(this.store,r,this._chunkStore,n);case 9:return e.abrupt("return",t.create(this.store,r,this.readOnly,this._chunkStore,this.attrs.cache));case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getOptsForArrayCreation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=this.itemPath(t);return e.path=A,void 0===e.cacheAttrs&&(e.cacheAttrs=this.attrs.cache),e.store=this.store,e.chunkStore=this.chunkStore,e}},{key:"array",value:function(t,e,A,n){if(this.readOnly)throw new S("group is read only");return(A=this.getOptsForArrayCreation(t,A)).overwrite=void 0===n?A.overwrite:n,ce(e,A)}},{key:"empty",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.readOnly)throw new S("group is read only");return Ae(e,A=this.getOptsForArrayCreation(t,A))}},{key:"zeros",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.readOnly)throw new S("group is read only");return re(e,A=this.getOptsForArrayCreation(t,A))}},{key:"ones",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.readOnly)throw new S("group is read only");return oe(e,A=this.getOptsForArrayCreation(t,A))}},{key:"full",value:function(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.readOnly)throw new S("group is read only");return se(e,A,n=this.getOptsForArrayCreation(t,n))}},{key:"createDataset",value:function(t,e,A,n){if(this.readOnly)throw new S("group is read only");var i;if(n=this.getOptsForArrayCreation(t,n),void 0===A){if(void 0===e)throw new k("Shape must be set if no data is passed to CreateDataset");i=te(Object(r.a)({shape:e},n))}else i=ce(A,n);return i}},{key:"getItem",value:function(){var e=Object(f.a)(c.a.mark((function e(A){var n;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.itemPath(A),e.next=3,at(this.store,n);case 3:if(!e.sent){e.next=7;break}return e.abrupt("return",qt.create(this.store,n,this.readOnly,this.chunkStore,void 0,this.attrs.cache));case 7:return e.next=9,gt(this.store,n);case 9:if(!e.sent){e.next=11;break}return e.abrupt("return",t.create(this.store,n,this.readOnly,this._chunkStore,this.attrs.cache));case 11:throw new D(A);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.array(e,A,{},!0);case 2:return t.abrupt("return",!0);case 3:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"deleteItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new S("group is read only");case 2:throw new Error("Method not implemented.");case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"containsItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=this.itemPath(e),t.next=3,at(this.store,A);case 3:if(t.t0=t.sent,t.t0){t.next=6;break}t.t0=gt(this.store,A);case 6:return t.abrupt("return",t.t0);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"proxy",value:function(){return v(this)}},{key:"name",get:function(){return this.path.length>0?"/"!==this.path[0]?"/"+this.path:this.path:"/"}},{key:"basename",get:function(){var t=this.name.split("/");return t[t.length-1]}},{key:"chunkStore",get:function(){return this._chunkStore?this._chunkStore:this.store}}],[{key:"create",value:function(){var e=Object(f.a)(c.a.mark((function e(A){var n,r,i,o,a,s=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:null,r=s.length>2&&void 0!==s[2]&&s[2],i=s.length>3&&void 0!==s[3]?s[3]:null,o=!(s.length>4&&void 0!==s[4])||s[4],e.next=6,this.loadMetadataForConstructor(A,n);case 6:return a=e.sent,e.abrupt("return",new t(A,n,a,r,i,o));case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadMetadataForConstructor",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=z(A),n=It(A),t.prev=2,t.next=5,e.getItem(n+".zgroup");case 5:return r=t.sent,t.abrupt("return",yt(r));case 9:return t.prev=9,t.t0=t.catch(2),t.next=13,at(e,A);case 13:if(!t.sent){t.next=15;break}throw new b(A);case 15:throw new w(A);case 16:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(e,A){return t.apply(this,arguments)}}()}]),t}();function Ce(t){return he.apply(this,arguments)}function he(){return(he=Object(f.a)(c.a.mark((function t(e){var A,n,r,i,o,a=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=a.length>1&&void 0!==a[1]?a[1]:null,n=a.length>2&&void 0!==a[2]?a[2]:"a",r=a.length>3?a[3]:void 0,i=!(a.length>4&&void 0!==a[4])||a[4],e=ue(e),void 0!==r&&(r=ue(e)),A=z(A),"r"!==n&&"r+"!==n){t.next=18;break}return t.next=10,gt(e,A);case 10:if(t.sent){t.next=16;break}return t.next=13,at(e,A);case 13:if(!t.sent){t.next=15;break}throw new b(A);case 15:throw new w(A);case 16:t.next=53;break;case 18:if("w"!==n){t.next=23;break}return t.next=21,Bt(e,A,r,!0);case 21:t.next=53;break;case 23:if("a"!==n){t.next=35;break}return t.next=26,gt(e,A);case 26:if(t.sent){t.next=33;break}return t.next=29,at(e,A);case 29:if(!t.sent){t.next=31;break}throw new b(A);case 31:return t.next=33,Bt(e,A,r);case 33:t.next=53;break;case 35:if("w-"!==n&&"x"!==n){t.next=52;break}return t.next=38,at(e,A);case 38:if(!t.sent){t.next=42;break}throw new b(A);case 42:return t.next=44,gt(e,A);case 44:if(!t.sent){t.next=48;break}throw new F(A);case 48:return t.next=50,Bt(e,A,r);case 50:t.next=53;break;case 52:throw new k("Invalid mode argument: ".concat(n));case 53:return o="r"===n,t.abrupt("return",le.create(e,A,o,r,i));case 55:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}).call(this,A(62),A(104).Buffer)},function(t,e,A){"use strict";A.d(e,"b",(function(){return r})),A.d(e,"g",(function(){return i})),A.d(e,"c",(function(){return o})),A.d(e,"l",(function(){return a})),A.d(e,"a",(function(){return s})),A.d(e,"k",(function(){return g})),A.d(e,"h",(function(){return c})),A.d(e,"m",(function(){return I})),A.d(e,"j",(function(){return u})),A.d(e,"d",(function(){return l})),A.d(e,"i",(function(){return C})),A.d(e,"n",(function(){return h})),A.d(e,"o",(function(){return B})),A.d(e,"f",(function(){return f})),A.d(e,"e",(function(){return d}));var n=A(31);function r(t){var e=new n.a(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(t,e,A,r){var i=new n.a(4);return i[0]=t,i[1]=e,i[2]=A,i[3]=r,i}function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(t,e,A,n,r){return t[0]=e,t[1]=A,t[2]=n,t[3]=r,t}function s(t,e,A){return t[0]=e[0]+A[0],t[1]=e[1]+A[1],t[2]=e[2]+A[2],t[3]=e[3]+A[3],t}function g(t,e,A){return t[0]=e[0]*A,t[1]=e[1]*A,t[2]=e[2]*A,t[3]=e[3]*A,t}function c(t){var e=t[0],A=t[1],n=t[2],r=t[3];return Math.hypot(e,A,n,r)}function I(t){var e=t[0],A=t[1],n=t[2],r=t[3];return e*e+A*A+n*n+r*r}function u(t,e){var A=e[0],n=e[1],r=e[2],i=e[3],o=A*A+n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=A*o,t[1]=n*o,t[2]=r*o,t[3]=i*o,t}function l(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function C(t,e,A,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=r+n*(A[0]-r),t[1]=i+n*(A[1]-i),t[2]=o+n*(A[2]-o),t[3]=a+n*(A[3]-a),t}function h(t,e,A){var n=e[0],r=e[1],i=e[2],o=e[3];return t[0]=A[0]*n+A[4]*r+A[8]*i+A[12]*o,t[1]=A[1]*n+A[5]*r+A[9]*i+A[13]*o,t[2]=A[2]*n+A[6]*r+A[10]*i+A[14]*o,t[3]=A[3]*n+A[7]*r+A[11]*i+A[15]*o,t}function B(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[0],a=A[1],s=A[2],g=A[3],c=g*n+a*i-s*r,I=g*r+s*n-o*i,u=g*i+o*r-a*n,l=-o*n-a*r-s*i;return t[0]=c*g+l*-o+I*-s-u*-a,t[1]=I*g+l*-a+u*-o-c*-s,t[2]=u*g+l*-s+c*-a-I*-o,t[3]=e[3],t}function f(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function d(t,e){var A=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],g=e[2],c=e[3];return Math.abs(A-a)<=n.b*Math.max(1,Math.abs(A),Math.abs(a))&&Math.abs(r-s)<=n.b*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-g)<=n.b*Math.max(1,Math.abs(i),Math.abs(g))&&Math.abs(o-c)<=n.b*Math.max(1,Math.abs(o),Math.abs(c))}!function(){var t=function(){var t=new n.a(4);return n.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}()},function(t,e,A){"use strict";A(330),A(266);A(322);A(114);A.d(e,"b",(function(){return i})),A.d(e,"e",(function(){return a})),A.d(e,"f",(function(){return s})),A.d(e,"h",(function(){return c})),A.d(e,"c",(function(){return I})),A.d(e,"a",(function(){return u})),A.d(e,"g",(function(){return l})),A.d(e,"d",(function(){return C}));var n=1/Math.PI*180,r=1/180*Math.PI,i={};function o(t){return Math.round(t/i.EPSILON)*i.EPSILON}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.precision,n=void 0===A?i.precision||4:A;return t=o(t),"".concat(parseFloat(t.toPrecision(n)))}function s(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function g(t,e,A){if(s(t)){A=A||((r=t).clone?r.clone():new Array(r.length));for(var n=0;n<A.length&&n<t.length;++n)A[n]=e(t[n],n,A);return A}var r;return e(t)}function c(t){return function(t,e){return g(t,(function(t){return t*r}),e)}(t)}function I(t,e){return g(t,(function(t){return t*n}),e)}function u(t,e,A){return g(t,(function(t){return Math.max(e,Math.min(A,t))}))}function l(t,e,A){return s(t)?t.map((function(t,n){return l(t,e[n],A)})):A*e+(1-A)*t}function C(t,e,A){var n=i.EPSILON;A&&(i.EPSILON=A);try{if(t===e)return!0;if(s(t)&&s(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!C(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=i.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{i.EPSILON=n}}i.EPSILON=1e-12,i.debug=!1,i.precision=4,i.printTypes=!1,i.printDegrees=!1,i.printRowMajor=!0},function(t,e,A){"use strict";A.d(e,"a",(function(){return i})),A.d(e,"b",(function(){return o})),A.d(e,"c",(function(){return s}));var n=A(46);function r(t,e){if(t.length!==e)return!1;for(var A=0;A<t.length;++A)if(!Number.isFinite(t[A]))return!1;return!0}function i(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function o(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n.b.debug&&!r(t,e))throw new Error("math.gl: ".concat(A," some fields set to invalid numbers'"));return t}var a={};function s(t,e){a[t]||(a[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}},function(t,e,A){"use strict";A(328),A(234),A(113);A.d(e,"a",(function(){return n})),A.d(e,"c",(function(){return i})),A.d(e,"d",(function(){return o})),A.d(e,"b",(function(){return a}));Math.PI,Math.PI;var n={};function r(t){return Math.round(t/n.EPSILON)*n.EPSILON}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.precision,i=void 0===A?n.precision||4:A;return t=r(t),"".concat(parseFloat(t.toPrecision(i)))}function o(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function a(t,e,A){var r=n.EPSILON;A&&(n.EPSILON=A);try{if(t===e)return!0;if(o(t)&&o(e)){if(t.length!==e.length)return!1;for(var i=0;i<t.length;++i)if(!a(t[i],e[i]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=n.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{n.EPSILON=r}}n.EPSILON=1e-12,n.debug=!1,n.precision=4,n.printTypes=!1,n.printDegrees=!1,n.printRowMajor=!0},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}A.d(e,"a",(function(){return n}))},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i})),A.d(e,"b",(function(){return o})),A.d(e,"c",(function(){return s}));var n=A(48);function r(t,e){if(t.length!==e)return!1;for(var A=0;A<t.length;++A)if(!Number.isFinite(t[A]))return!1;return!0}function i(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function o(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n.a.debug&&!r(t,e))throw new Error("math.gl: ".concat(A," some fields set to invalid numbers'"));return t}var a={};function s(t,e){a[t]||(a[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}},function(t,e,A){"use strict";A.d(e,"f",(function(){return o})),A.d(e,"g",(function(){return a})),A.d(e,"d",(function(){return s})),A.d(e,"a",(function(){return g})),A.d(e,"e",(function(){return c})),A.d(e,"i",(function(){return I})),A.d(e,"b",(function(){return u})),A.d(e,"c",(function(){return l})),A.d(e,"h",(function(){return C}));var n=A(26),r=function(t){return"boolean"===typeof t},i=function(t){return"function"===typeof t},o=function(t){return null!==t&&"object"===Object(n.a)(t)},a=function(t){return o(t)&&t.constructor==={}.constructor},s=function(t){return t&&"function"===typeof t[Symbol.iterator]},g=function(t){return t&&"function"===typeof t[Symbol.asyncIterator]},c=function(t){return t&&i(t.next)},I=function(t){return"undefined"!==typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json},u=function(t){return"undefined"!==typeof Blob&&t instanceof Blob},l=function(t){return t&&"object"===Object(n.a)(t)&&t.isBuffer},C=function(t){return function(t){return"undefined"!==typeof ReadableStream&&t instanceof ReadableStream||o(t)&&i(t.tee)&&i(t.cancel)&&i(t.getReader)}(t)||function(t){return o(t)&&i(t.read)&&i(t.pipe)&&r(t.readable)}(t)}},function(t,e,A){"use strict";A.d(e,"a",(function(){return r})),A.d(e,"i",(function(){return i})),A.d(e,"d",(function(){return o})),A.d(e,"b",(function(){return a})),A.d(e,"e",(function(){return s})),A.d(e,"h",(function(){return g})),A.d(e,"f",(function(){return c})),A.d(e,"g",(function(){return I})),A.d(e,"c",(function(){return u}));var n=A(31);function r(){var t=new n.a(9);return n.a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function i(t,e){if(t===e){var A=e[1],n=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=A,t[5]=e[7],t[6]=n,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function o(t,e){var A=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],g=e[7],c=e[8],I=c*o-a*g,u=-c*i+a*s,l=g*i-o*s,C=A*I+n*u+r*l;return C?(C=1/C,t[0]=I*C,t[1]=(-c*n+r*g)*C,t[2]=(a*n-r*o)*C,t[3]=u*C,t[4]=(c*A-r*s)*C,t[5]=(-a*A+r*i)*C,t[6]=l*C,t[7]=(-g*A+n*s)*C,t[8]=(o*A-n*i)*C,t):null}function a(t){var e=t[0],A=t[1],n=t[2],r=t[3],i=t[4],o=t[5],a=t[6],s=t[7],g=t[8];return e*(g*i-o*s)+A*(-g*r+o*a)+n*(s*r-i*a)}function s(t,e,A){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],g=e[6],c=e[7],I=e[8],u=A[0],l=A[1],C=A[2],h=A[3],B=A[4],f=A[5],d=A[6],Q=A[7],E=A[8];return t[0]=u*n+l*o+C*g,t[1]=u*r+l*a+C*c,t[2]=u*i+l*s+C*I,t[3]=h*n+B*o+f*g,t[4]=h*r+B*a+f*c,t[5]=h*i+B*s+f*I,t[6]=d*n+Q*o+E*g,t[7]=d*r+Q*a+E*c,t[8]=d*i+Q*s+E*I,t}function g(t,e,A){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],g=e[6],c=e[7],I=e[8],u=A[0],l=A[1];return t[0]=n,t[1]=r,t[2]=i,t[3]=o,t[4]=a,t[5]=s,t[6]=u*n+l*o+g,t[7]=u*r+l*a+c,t[8]=u*i+l*s+I,t}function c(t,e,A){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],g=e[6],c=e[7],I=e[8],u=Math.sin(A),l=Math.cos(A);return t[0]=l*n+u*o,t[1]=l*r+u*a,t[2]=l*i+u*s,t[3]=l*o-u*n,t[4]=l*a-u*r,t[5]=l*s-u*i,t[6]=g,t[7]=c,t[8]=I,t}function I(t,e,A){var n=A[0],r=A[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function u(t,e){var A=e[0],n=e[1],r=e[2],i=e[3],o=A+A,a=n+n,s=r+r,g=A*o,c=n*o,I=n*a,u=r*o,l=r*a,C=r*s,h=i*o,B=i*a,f=i*s;return t[0]=1-I-C,t[3]=c-f,t[6]=u+B,t[1]=c+f,t[4]=1-g-C,t[7]=l-h,t[2]=u-B,t[5]=l+h,t[8]=1-g-I,t}},function(t,e,A){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error(e||"deck.gl: assertion failed.")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.r(e);var n=A(19),r=A(274),i=A(385),o=A(737),a=A(83),s=A(970),g=A(147),c=A(199),I=A(233),u=A(516),l=A(333),C=A(390),h=A(515),B=A(517),f=A(963),d=A(973),Q=A(412),E=A(971),p=A(525),y=A(966),v=A(255),m=A(1414),b=A(1),F=A(5),w=A(14),S=A(16),D=A(7),R=A(211);function U(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function G(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?U(Object(A),!0).forEach((function(e){Object(b.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):U(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function N(t){var e=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(t){return!1}}();return function(){var A,n=Object(D.a)(t);if(e){var r=Object(D.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(S.a)(this,A)}}var k={x:[2,0,1],y:[0,1,2],z:[1,2,0]},x=function(t){Object(w.a)(A,t);var e=N(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(F.a)(this,A);var n=t.id,r=void 0===n?Object(R.c)("truncated-code-geometry"):n,i=O(t),o=i.indices,a=i.attributes;return e.call(this,G(G({},t),{},{id:r,indices:o,attributes:G(G({},a),t.attributes)}))}return A}(v.a);function O(t){for(var e=t.bottomRadius,A=void 0===e?0:e,n=t.topRadius,r=void 0===n?0:n,i=t.height,o=void 0===i?1:i,a=t.nradial,s=void 0===a?10:a,g=t.nvertical,c=void 0===g?10:g,I=t.verticalAxis,u=void 0===I?"y":I,l=t.topCap,C=void 0!==l&&l,h=t.bottomCap,B=void 0!==h&&h,f=(C?2:0)+(B?2:0),d=(s+1)*(c+1+f),Q=Math.atan2(A-r,o),E=Math.sin,p=Math.cos,y=Math.PI,v=p(Q),m=E(Q),b=C?-2:0,F=c+(B?2:0),w=s+1,S=new Uint16Array(s*(c+f)*6),D=k[u],R=new Float32Array(3*d),U=new Float32Array(3*d),G=new Float32Array(2*d),N=0,x=0,O=b;O<=F;O++){var M=O/c,L=o*M,_=void 0;O<0?(L=0,M=1,_=A):O>c?(L=o,M=1,_=r):_=A+O/c*(r-A),-2!==O&&O!==c+2||(_=0,M=0),L-=o/2;for(var J=0;J<w;J++){var T=E(J*y*2/s),j=p(J*y*2/s);R[N+D[0]]=T*_,R[N+D[1]]=L,R[N+D[2]]=j*_,U[N+D[0]]=O<0||O>c?0:T*v,U[N+D[1]]=O<0?-1:O>c?1:m,U[N+D[2]]=O<0||O>c?0:j*v,G[x+0]=J/s,G[x+1]=M,x+=2,N+=3}}for(var H=0;H<c+f;H++)for(var Y=0;Y<s;Y++){var V=6*(H*s+Y);S[V+0]=w*(H+0)+0+Y,S[V+1]=w*(H+0)+1+Y,S[V+2]=w*(H+1)+1+Y,S[V+3]=w*(H+0)+0+Y,S[V+4]=w*(H+1)+1+Y,S[V+5]=w*(H+1)+0+Y}return{indices:S,attributes:{POSITION:{size:3,value:R},NORMAL:{size:3,value:U},TEXCOORD_0:{size:2,value:G}}}}function M(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function L(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?M(Object(A),!0).forEach((function(e){Object(b.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):M(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function _(t){var e=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(t){return!1}}();return function(){var A,n=Object(D.a)(t);if(e){var r=Object(D.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(S.a)(this,A)}}var J=function(t){Object(w.a)(A,t);var e=_(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(F.a)(this,A);var n=t.id,r=void 0===n?Object(R.c)("cone-geometry"):n,i=t.radius,o=void 0===i?1:i,a=t.cap,s=void 0===a||a;return e.call(this,L(L({},t),{},{id:r,topRadius:0,topCap:Boolean(s),bottomCap:Boolean(s),bottomRadius:o}))}return A}(x),T=A(1413);function j(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function H(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?j(Object(A),!0).forEach((function(e){Object(b.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):j(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Y(t){var e=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(t){return!1}}();return function(){var A,n=Object(D.a)(t);if(e){var r=Object(D.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(S.a)(this,A)}}var V=function(t){Object(w.a)(A,t);var e=Y(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(F.a)(this,A);var n=t.id,r=void 0===n?Object(R.c)("cylinder-geometry"):n,i=t.radius,o=void 0===i?1:i;return e.call(this,H(H({},t),{},{id:r,bottomRadius:o,topRadius:o}))}return A}(x);function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function K(t,e,A){return e&&W(t.prototype,e),A&&W(t,A),t}function P(t,e){return(P=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function q(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&P(t,e)}var X=A(874),z=A.n(X);function $(t,e){return!e||"object"!==z()(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function tt(t){return(tt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function et(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function At(t,e,A){return(At=et()?Reflect.construct:function(t,e,A){var n=[null];n.push.apply(n,e);var r=new(Function.bind.apply(t,n));return A&&P(r,A.prototype),r}).apply(null,arguments)}function nt(t){var e="function"===typeof Map?new Map:void 0;return(nt=function(t){if(null===t||(A=t,-1===Function.toString.call(A).indexOf("[native code]")))return t;var A;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return At(t,arguments,tt(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),P(n,t)})(t)}A(568);A(875);function rt(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}Math.PI,Math.PI;var it={};function ot(t){return Math.round(t/it.EPSILON)*it.EPSILON}function at(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.precision,n=void 0===A?it.precision||4:A;return t=ot(t),"".concat(parseFloat(t.toPrecision(n)))}function st(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function gt(t,e,A){var n=it.EPSILON;A&&(it.EPSILON=A);try{if(t===e)return!0;if(st(t)&&st(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!gt(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=it.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{it.EPSILON=n}}function ct(t){var e=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(t){return!1}}();return function(){var A,n=tt(t);if(e){var r=tt(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return $(this,A)}}it.EPSILON=1e-12,it.debug=!1,it.precision=4,it.printTypes=!1,it.printDegrees=!1,it.printRowMajor=!0;var It=function(t){q(A,t);var e=ct(A);function A(){return Z(this,A),e.apply(this,arguments)}return K(A,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)this[A]=t[A+e];return this.check()}},{key:"to",value:function(t){return t===this?this:st(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)t[e+A]=this[A];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(it)}},{key:"formatString",value:function(t){for(var e="",A=0;A<this.ELEMENTS;++A)e+=(A>0?", ":"")+at(this[A],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!gt(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,A){void 0===A&&(A=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var r=t[n];this[n]=r+A*(e[n]-r)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t[A]),e[A]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(it.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 t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"ELEMENTS",get:function(){return rt(!1),0}},{key:"RANK",get:function(){return rt(!1),0}},{key:"elements",get:function(){return this}}]),A}(nt(Array));function ut(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function lt(t){var e=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(t){return!1}}();return function(){var A,n=tt(t);if(e){var r=tt(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return $(this,A)}}var Ct=function(t){q(A,t);var e=lt(A);function A(){return Z(this,A),e.apply(this,arguments)}return K(A,[{key:"copy",value:function(t){return rt(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A){var n=this[A]-t[A];e+=n*n}return ut(e)}},{key:"dot",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A)e+=this[A]*t[A];return ut(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return rt(t>=0&&t<this.ELEMENTS,"index is out of range"),ut(this[t])}},{key:"setComponent",value:function(t,e){return rt(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=ut(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=ut(t)}}]),A}(It),ht=A(27);function Bt(t){var e=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(t){return!1}}();return function(){var A,n=tt(t);if(e){var r=tt(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return $(this,A)}}var ft=[0,0,0],dt={},Qt=function(t){q(A,t);var e=Bt(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Z(this,A),t=e.call(this,-0,-0,-0),1===arguments.length&&st(n)?t.copy(n):(it.debug&&(ut(n),ut(r),ut(i)),t[0]=n,t[1]=r,t[2]=i),t}return K(A,null,[{key:"ZERO",get:function(){return dt.ZERO=dt.ZERO||Object.freeze(new A(0,0,0,0))}}]),K(A,[{key:"set",value:function(t,e,A){return this[0]=t,this[1]=e,this[2]=A,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return it.debug&&(ut(t.x),ut(t.y),ut(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"angle",value:function(t){return ht.a(this,t)}},{key:"cross",value:function(t){return ht.c(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?ft:A;return ht.k(this,this,n,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?ft:A;return ht.l(this,this,n,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?ft:A;return ht.m(this,this,n,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return ht.q(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return function(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i||1;t[0]=(A[0]*n+A[4]*r+A[8]*i)/o,t[1]=(A[1]*n+A[5]*r+A[9]*i)/o,t[2]=(A[2]*n+A[6]*r+A[10]*i)/o}(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return ht.p(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return function(t,e,A){var n=e[0],r=e[1];t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t[2]=e[2]}(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return ht.r(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=ut(t)}}]),A}(Ct);function Et(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function pt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Et(Object(A),!0).forEach((function(e){Object(b.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Et(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function yt(t){var e=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(t){return!1}}();return function(){var A,n=Object(D.a)(t);if(e){var r=Object(D.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(S.a)(this,A)}}var vt=[-1,0,0,0,1,0,0,0,-1,0,0,1,0,-1,0,1,0,0],mt=[3,4,5,3,5,1,3,1,0,3,0,4,4,0,2,4,2,5,2,0,1,5,2,1],bt=function(t){Object(w.a)(A,t);var e=yt(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(F.a)(this,A);var n=t.id,r=void 0===n?Object(R.c)("ico-sphere-geometry"):n,i=Ft(t),o=i.indices,a=i.attributes;return e.call(this,pt(pt({},t),{},{id:r,indices:o,attributes:pt(pt({},a),t.attributes)}))}return A}(v.a);function Ft(t){var e=t.iterations,A=void 0===e?0:e,n=Math.PI,r=2*n,i=[].concat(vt),o=[].concat(mt);i.push(),o.push();for(var a=function(){var t={};return function(e,A){var n=(e*=3)>(A*=3)?e:A,r="".concat(e<A?e:A,"|").concat(n);if(r in t)return t[r];var o=i[e],a=i[e+1],s=i[e+2],g=(o+i[A])/2,c=(a+i[A+1])/2,I=(s+i[A+2])/2,u=Math.sqrt(g*g+c*c+I*I);return g/=u,c/=u,I/=u,i.push(g,c,I),t[r]=i.length/3-1}}(),s=0;s<A;s++){for(var g=[],c=0;c<o.length;c+=3){var I=a(o[c+0],o[c+1]),u=a(o[c+1],o[c+2]),l=a(o[c+2],o[c+0]);g.push(l,o[c+0],I,I,o[c+1],u,u,o[c+2],l,I,u,l)}o=g}for(var C=new Array(i.length),h=new Array(i.length/3*2),B=o.length-3;B>=0;B-=3){var f=o[B+0],d=o[B+1],Q=o[B+2],E=3*f,p=3*d,y=3*Q,v=2*f,m=2*d,b=2*Q,F=i[E+0],w=i[E+1],S=i[E+2],D=Math.acos(S/Math.sqrt(F*F+w*w+S*S))/n,R=1-(Math.atan2(w,F)+n)/r,U=i[p+0],G=i[p+1],N=i[p+2],k=Math.acos(N/Math.sqrt(U*U+G*G+N*N))/n,x=1-(Math.atan2(G,U)+n)/r,O=i[y+0],M=i[y+1],L=i[y+2],_=Math.acos(L/Math.sqrt(O*O+M*M+L*L))/n,J=1-(Math.atan2(M,O)+n)/r,T=[F-U,w-G,S-N],j=new Qt([O-U,M-G,L-N]).cross(T).normalize(),H=void 0;(0===R||0===x||0===J)&&(0===R||R>.5)&&(0===x||x>.5)&&(0===J||J>.5)&&(i.push(i[E+0],i[E+1],i[E+2]),H=i.length/3-1,o.push(H),h[2*H+0]=1,h[2*H+1]=D,C[3*H+0]=j.x,C[3*H+1]=j.y,C[3*H+2]=j.z,i.push(i[p+0],i[p+1],i[p+2]),H=i.length/3-1,o.push(H),h[2*H+0]=1,h[2*H+1]=k,C[3*H+0]=j.x,C[3*H+1]=j.y,C[3*H+2]=j.z,i.push(i[y+0],i[y+1],i[y+2]),H=i.length/3-1,o.push(H),h[2*H+0]=1,h[2*H+1]=_,C[3*H+0]=j.x,C[3*H+1]=j.y,C[3*H+2]=j.z),C[E+0]=C[p+0]=C[y+0]=j.x,C[E+1]=C[p+1]=C[y+1]=j.y,C[E+2]=C[p+2]=C[y+2]=j.z,h[v+0]=R,h[v+1]=D,h[m+0]=x,h[m+1]=k,h[b+0]=J,h[b+1]=_}return{indices:{size:1,value:new Uint16Array(o)},attributes:{POSITION:{size:3,value:new Float32Array(i)},NORMAL:{size:3,value:new Float32Array(C)},TEXCOORD_0:{size:2,value:new Float32Array(h)}}}}function wt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function St(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(A),!0).forEach((function(e){Object(b.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):wt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Dt(t){var e=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(t){return!1}}();return function(){var A,n=Object(D.a)(t);if(e){var r=Object(D.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(S.a)(this,A)}}var Rt=function(t){Object(w.a)(A,t);var e=Dt(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(F.a)(this,A);var n=t.id,r=void 0===n?Object(R.c)("plane-geometry"):n,i=Ut(t),o=i.indices,a=i.attributes;return e.call(this,St(St({},t),{},{id:r,indices:o,attributes:St(St({},a),t.attributes)}))}return A}(v.a);function Ut(t){var e=t.type,A=void 0===e?"x,y":e,n=t.offset,r=void 0===n?0:n,i=t.flipCull,o=void 0!==i&&i,a=t.unpack,s=void 0!==a&&a,g=A.split(","),c=t["".concat(g[0],"len")]||1,I=t["".concat(g[1],"len")]||1,u=t["n".concat(g[0])]||1,l=t["n".concat(g[1])]||1,C=(u+1)*(l+1),h=new Float32Array(3*C),B=new Float32Array(3*C),f=new Float32Array(2*C);o&&(c=-c);for(var d=0,Q=0,E=0;E<=l;E++)for(var p=0;p<=u;p++){var y=p/u,v=E/l;switch(f[d+0]=o?1-y:y,f[d+1]=v,A){case"x,y":h[Q+0]=c*y-.5*c,h[Q+1]=I*v-.5*I,h[Q+2]=r,B[Q+0]=0,B[Q+1]=0,B[Q+2]=o?1:-1;break;case"x,z":h[Q+0]=c*y-.5*c,h[Q+1]=r,h[Q+2]=I*v-.5*I,B[Q+0]=0,B[Q+1]=o?1:-1,B[Q+2]=0;break;case"y,z":h[Q+0]=r,h[Q+1]=c*y-.5*c,h[Q+2]=I*v-.5*I,B[Q+0]=o?1:-1,B[Q+1]=0,B[Q+2]=0;break;default:throw new Error("PlaneGeometry: unknown type")}d+=2,Q+=3}for(var m=u+1,b=new Uint16Array(u*l*6),F=0;F<l;F++)for(var w=0;w<u;w++){var S=6*(F*u+w);b[S+0]=(F+0)*m+w,b[S+1]=(F+1)*m+w,b[S+2]=(F+0)*m+w+1,b[S+3]=(F+1)*m+w,b[S+4]=(F+1)*m+w+1,b[S+5]=(F+0)*m+w+1}var D={indices:{size:1,value:b},attributes:{POSITION:{size:3,value:h},NORMAL:{size:3,value:B},TEXCOORD_0:{size:2,value:f}}};return s?function(t){var e=t.indices,A=t.attributes;if(!e)return t;var n=e.value.length,r={};for(var i in A){var o=A[i],a=o.constant,s=o.value,g=o.size;if(!a&&g){for(var c=new s.constructor(n*g),I=0;I<n;++I)for(var u=e.value[I],l=0;l<g;l++)c[I*g+l]=s[u*g+l];r[i]={size:g,value:c}}}return{attributes:Object.assign({},A,r)}}(D):D}function Gt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Nt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Gt(Object(A),!0).forEach((function(e){Object(b.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Gt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function kt(t){var e=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(t){return!1}}();return function(){var A,n=Object(D.a)(t);if(e){var r=Object(D.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(S.a)(this,A)}}var xt=function(t){Object(w.a)(A,t);var e=kt(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(F.a)(this,A);var n=t.id,r=void 0===n?Object(R.c)("sphere-geometry"):n,i=Ot(t),o=i.indices,a=i.attributes;return e.call(this,Nt(Nt({},t),{},{id:r,indices:o,attributes:Nt(Nt({},a),t.attributes)}))}return A}(v.a);function Ot(t){var e=t.nlat,A=void 0===e?10:e,n=t.nlong,r=void 0===n?10:n,i=t.radius,o=void 0===i?1:i,a=Math.PI-0,s=2*Math.PI-0,g=(A+1)*(r+1);if("number"===typeof o){var c=o;o=function(t,e,A,n,r){return c}}for(var I=new Float32Array(3*g),u=new Float32Array(3*g),l=new Float32Array(2*g),C=new(g>65535?Uint32Array:Uint16Array)(A*r*6),h=0;h<=A;h++)for(var B=0;B<=r;B++){var f=B/r,d=h/A,Q=B+h*(r+1),E=2*Q,p=3*Q,y=s*f,v=a*d,m=Math.sin(y),b=Math.cos(y),F=Math.sin(v),w=b*F,S=Math.cos(v),D=m*F,R=o(w,S,D,f,d);I[p+0]=R*w,I[p+1]=R*S,I[p+2]=R*D,u[p+0]=w,u[p+1]=S,u[p+2]=D,l[E+0]=f,l[E+1]=1-d}for(var U=r+1,G=0;G<r;G++)for(var N=0;N<A;N++){var k=6*(G*A+N);C[k+0]=N*U+G,C[k+1]=N*U+G+1,C[k+2]=(N+1)*U+G,C[k+3]=(N+1)*U+G,C[k+4]=N*U+G+1,C[k+5]=(N+1)*U+G+1}return{indices:{size:1,value:C},attributes:{POSITION:{size:3,value:I},NORMAL:{size:3,value:u},TEXCOORD_0:{size:2,value:l}}}}var Mt=A(391),Lt=A(962);function _t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=Math.fround(t),r=t-n;return e[A]=n,e[A+1]=r,e}function Jt(t){return t-Math.fround(t)}function Tt(t){for(var e=new Float32Array(32),A=0;A<4;++A)for(var n=0;n<4;++n){var r=4*A+n;_t(t[4*n+A],e,2*r)}return e}var jt={ONE:1};var Ht={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 jt},fp64ify:_t,fp64LowPart:Jt,fp64ifyMatrix4:Tt}],fp64ify:_t,fp64LowPart:Jt,fp64ifyMatrix4:Tt};function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Vt(t,e){if(t){if("string"===typeof t)return Yt(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Yt(t,e):void 0}}function Zt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}(t,e)||Vt(t,e)||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 Wt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kt(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pt(t,e,A){return e&&Kt(t.prototype,e),A&&Kt(t,A),t}function qt(t,e){return(qt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xt(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qt(t,e)}var zt=A(876),$t=A.n(zt);function te(t,e){return!e||"object"!==$t()(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ee(t){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ae(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function ne(t,e,A){return(ne=Ae()?Reflect.construct:function(t,e,A){var n=[null];n.push.apply(n,e);var r=new(Function.bind.apply(t,n));return A&&qt(r,A.prototype),r}).apply(null,arguments)}function re(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}Math.PI,Math.PI;var ie={};function oe(t){return Math.round(t/ie.EPSILON)*ie.EPSILON}function ae(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.precision,n=void 0===A?ie.precision||4:A;return t=oe(t),"".concat(parseFloat(t.toPrecision(n)))}function se(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ge(t,e,A){var n=ie.EPSILON;A&&(ie.EPSILON=A);try{if(t===e)return!0;if(se(t)&&se(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!ge(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=ie.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{ie.EPSILON=n}}function ce(t,e){if(t.length!==e)return!1;for(var A=0;A<t.length;++A)if(!Number.isFinite(t[A]))return!1;return!0}function Ie(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(ie.debug&&!ce(t,e))throw new Error("math.gl: ".concat(A," some fields set to invalid numbers'"));return t}ie.EPSILON=1e-12,ie.debug=!1,ie.precision=4,ie.printTypes=!1,ie.printDegrees=!1,ie.printRowMajor=!0;var ue={};function le(t,e){ue[t]||(ue[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}function Ce(t){var e="function"===typeof Map?new Map:void 0;return(Ce=function(t){if(null===t||(A=t,-1===Function.toString.call(A).indexOf("[native code]")))return t;var A;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return ne(t,arguments,ee(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),qt(n,t)})(t)}function he(t){var e=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(t){return!1}}();return function(){var A,n=ee(t);if(e){var r=ee(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return te(this,A)}}function Be(t){var e=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(t){return!1}}();return function(){var A,n=ee(t);if(e){var r=ee(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return te(this,A)}}var fe=function(t){Xt(A,t);var e=Be(A);function A(){return Wt(this,A),e.apply(this,arguments)}return Pt(A,[{key:"toString",value:function(){var t="[";if(ie.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var A=0;A<this.RANK;++A)t+=" ".concat(this[A*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,A){return this[e*this.RANK+t]=function(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}(A),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),A=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[A+n];return e}},{key:"setColumn",value:function(t,e){for(var A=t*this.RANK,n=0;n<this.RANK;++n)this[A+n]=e[n];return this}}]),A}(function(t){Xt(A,t);var e=he(A);function A(){return Wt(this,A),e.apply(this,arguments)}return Pt(A,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)this[A]=t[A+e];return this.check()}},{key:"to",value:function(t){return t===this?this:se(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)t[e+A]=this[A];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(ie)}},{key:"formatString",value:function(t){for(var e="",A=0;A<this.ELEMENTS;++A)e+=(A>0?", ":"")+ae(this[A],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!ge(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,A){void 0===A&&(A=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var r=t[n];this[n]=r+A*(e[n]-r)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t[A]),e[A]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(ie.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 t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"ELEMENTS",get:function(){return re(!1),0}},{key:"RANK",get:function(){return re(!1),0}},{key:"elements",get:function(){return this}}]),A}(Ce(Array)));var de=A(18),Qe=A(38),Ee=A(45);function pe(t){var e=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(t){return!1}}();return function(){var A,n=ee(t);if(e){var r=ee(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return te(this,A)}}var ye=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),ve=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),me=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}),be={},Fe=function(t){Xt(A,t);var e=pe(A);function A(t){var n;return Wt(this,A),n=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return Pt(A,[{key:"INDICES",get:function(){return me}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return be.IDENTITY=be.IDENTITY||Object.freeze(new A(ye)),be.IDENTITY}},{key:"ZERO",get:function(){return be.ZERO=be.ZERO||Object.freeze(new A(ve)),be.ZERO}}]),Pt(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this[9]=g,this[10]=c,this[11]=I,this[12]=u,this[13]=l,this[14]=C,this[15]=h,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=r,this[2]=s,this[3]=u,this[4]=e,this[5]=i,this[6]=g,this[7]=l,this[8]=A,this[9]=o,this[10]=c,this[11]=C,this[12]=n,this[13]=a,this[14]=I,this[15]=h,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(ye)}},{key:"fromQuaternion",value:function(t){return de.c(this,t),this.check()}},{key:"frustum",value:function(t){var e=t.left,n=t.right,r=t.bottom,i=t.top,o=t.near,a=t.far;return a===1/0?A._computeInfinitePerspectiveOffCenter(this,e,n,r,i,o):de.d(this,e,n,r,i,o,a),this.check()}},{key:"lookAt",value:function(t,e,A){if(1===arguments.length){var n=t;t=n.eye,e=n.center,A=n.up}return e=e||[0,0,0],A=A||[0,1,0],de.g(this,t,e,A),this.check()}},{key:"ortho",value:function(t){var e=t.left,A=t.right,n=t.bottom,r=t.top,i=t.near,o=void 0===i?.1:i,a=t.far,s=void 0===a?500:a;return de.i(this,e,A,n,r,o,s),this.check()}},{key:"orthographic",value:function(t){var e=t.fovy,n=void 0===e?45*Math.PI/180:e,r=t.aspect,i=void 0===r?1:r,o=t.focalDistance,a=void 0===o?1:o,s=t.near,g=void 0===s?.1:s,c=t.far,I=void 0===c?500:c;if(n>2*Math.PI)throw Error("radians");var u=n/2,l=a*Math.tan(u),C=l*i;return(new A).ortho({left:-C,right:C,bottom:-l,top:l,near:g,far:I})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,A=void 0===e?void 0:e,n=t.fov,r=void 0===n?45*Math.PI/180:n,i=t.aspect,o=void 0===i?1:i,a=t.near,s=void 0===a?.1:a,g=t.far,c=void 0===g?500:g;if((A=A||r)>2*Math.PI)throw Error("radians");return de.j(this,A,o,s,c),this.check()}},{key:"determinant",value:function(){return de.a(this)}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=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],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*r,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*r,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*r,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*r,t[8]=this[10]*i,t}},{key:"transpose",value:function(){return de.q(this,this),this.check()}},{key:"invert",value:function(){return de.f(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return de.h(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return de.h(this,this,t),this.check()}},{key:"rotateX",value:function(t){return de.l(this,this,t),this.check()}},{key:"rotateY",value:function(t){return de.m(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return de.n(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=Zt(t,3),A=e[0],n=e[1],r=e[2];return this.rotateX(A).rotateY(n).rotateZ(r)}},{key:"rotateAxis",value:function(t,e){return de.k(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?de.o(this,this,t):de.o(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return de.p(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(Ie(e=Ee.n(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=Qe.j(e||[-0,-0],t,this);break;case 3:e=ht.q(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Ie(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=function(t,e,A){var n=e[0],r=e[1],i=A[3]*n+A[7]*r||1;return t[0]=(A[0]*n+A[4]*r)/i,t[1]=(A[1]*n+A[5]*r)/i,t}(e||[-0,-0],t,this);break;case 3:e=function(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i||1;return t[0]=(A[0]*n+A[4]*r+A[8]*i)/o,t[1]=(A[1]*n+A[5]*r+A[9]*i)/o,t[2]=(A[2]*n+A[6]*r+A[10]*i)/o,t}(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Ie(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,A){return this.identity().translate([t,e,A])}},{key:"transformPoint",value:function(t,e){return le("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return le("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return le("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,A,n,r,i){var o=2*i/(A-e),a=2*i/(r-n),s=(A+e)/(A-e),g=(r+n)/(r-n),c=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=g,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0,t}}]),A}(fe),we=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],Se={modelMatrix:we,viewMatrix:we,projectionMatrix:we,cameraPositionWorld:[0,0,0]};var De="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",Re={name:"project",getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Se,e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],{});return void 0!==t.modelMatrix&&(e.modelMatrix=t.modelMatrix),void 0!==t.viewMatrix&&(e.viewMatrix=t.viewMatrix),void 0!==t.projectionMatrix&&(e.projectionMatrix=t.projectionMatrix),void 0!==t.cameraPositionWorld&&(e.cameraPositionWorld=t.cameraPositionWorld),void 0===t.projectionMatrix&&void 0===t.viewMatrix||(e.viewProjectionMatrix=new Fe(t.projectionMatrix).multiplyRight(t.viewMatrix)),e},vs:"".concat(De,"\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(De)},Ue={lightDirection:new Float32Array([1,1,2])};var Ge={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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue,e={};return t.lightDirection&&(e.dirlight_uLightDirection=t.lightDirection),e},dependencies:[Re]},Ne=A(739),ke=A(974),xe=A(1421),Oe=A(49);A.d(e,"createGLContext",(function(){return n.c})),A.d(e,"instrumentGLContext",(function(){return n.h})),A.d(e,"isWebGL",(function(){return n.i})),A.d(e,"isWebGL2",(function(){return n.j})),A.d(e,"getParameters",(function(){return n.f})),A.d(e,"setParameters",(function(){return n.n})),A.d(e,"withParameters",(function(){return n.o})),A.d(e,"resetParameters",(function(){return n.l})),A.d(e,"cssToDeviceRatio",(function(){return n.e})),A.d(e,"cssToDevicePixels",(function(){return n.d})),A.d(e,"lumaStats",(function(){return r.a})),A.d(e,"FEATURES",(function(){return i.a})),A.d(e,"hasFeature",(function(){return o.b})),A.d(e,"hasFeatures",(function(){return o.c})),A.d(e,"Buffer",(function(){return a.a})),A.d(e,"Program",(function(){return s.a})),A.d(e,"Framebuffer",(function(){return g.a})),A.d(e,"Renderbuffer",(function(){return c.a})),A.d(e,"Texture2D",(function(){return I.a})),A.d(e,"TextureCube",(function(){return u.a})),A.d(e,"clear",(function(){return l.a})),A.d(e,"readPixelsToArray",(function(){return C.c})),A.d(e,"readPixelsToBuffer",(function(){return C.d})),A.d(e,"cloneTextureFrom",(function(){return h.a})),A.d(e,"copyToTexture",(function(){return C.b})),A.d(e,"Texture3D",(function(){return B.a})),A.d(e,"TransformFeedback",(function(){return f.a})),A.d(e,"AnimationLoop",(function(){return d.a})),A.d(e,"Model",(function(){return Q.a})),A.d(e,"Transform",(function(){return E.a})),A.d(e,"ProgramManager",(function(){return p.a})),A.d(e,"Timeline",(function(){return y.a})),A.d(e,"Geometry",(function(){return v.a})),A.d(e,"ClipSpace",(function(){return m.a})),A.d(e,"ConeGeometry",(function(){return J})),A.d(e,"CubeGeometry",(function(){return T.a})),A.d(e,"CylinderGeometry",(function(){return V})),A.d(e,"IcoSphereGeometry",(function(){return bt})),A.d(e,"PlaneGeometry",(function(){return Rt})),A.d(e,"SphereGeometry",(function(){return xt})),A.d(e,"TruncatedConeGeometry",(function(){return x})),A.d(e,"normalizeShaderModule",(function(){return Mt.b})),A.d(e,"fp32",(function(){return Lt.a})),A.d(e,"fp64",(function(){return Ht})),A.d(e,"project",(function(){return Re})),A.d(e,"dirlight",(function(){return Ge})),A.d(e,"picking",(function(){return Ne.a})),A.d(e,"gouraudLighting",(function(){return ke.a})),A.d(e,"phongLighting",(function(){return ke.b})),A.d(e,"pbr",(function(){return xe.a})),A.d(e,"log",(function(){return n.k})),A.d(e,"assert",(function(){return Oe.a})),A.d(e,"uid",(function(){return R.c}))},function(t,e){var A;A=function(){return this}();try{A=A||new Function("return this")()}catch(n){"object"===typeof window&&(A=window)}t.exports=A},function(t,e,A){"use strict";function n(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e,A){return e&&n(t.prototype,e),A&&n(t,A),t}A.d(e,"a",(function(){return r}))},function(t,e,A){t.exports=A(675)},function(t,e,A){"use strict";A.r(e);var n=A(40),r=A(339),i=A(401),o=A(287),a=A(5),s=A(4),g=A(340),c=[255,255,255],I=[0,0,1],u=[0,0,1],l=0,C=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,t);var A=e.color,n=void 0===A?c:A,r=e.intensity,i=void 0===r?1:r,o=e.position,s=void 0===o?u:o;this.id=e.id||"point-".concat(l++),this.color=n,this.intensity=i,this.type="point",this.position=s,this.attenuation=h(e),this.projectedLight=Object.assign({},this)}return Object(s.a)(t,[{key:"getProjectedLight",value:function(t){var e=t.layer,A=this.projectedLight,r=e.context.viewport,i=e.props,o=i.coordinateSystem,a=i.coordinateOrigin,s=Object(g.b)(this.position,{viewport:r,coordinateSystem:o,coordinateOrigin:a,fromCoordinateSystem:r.isGeospatial?n.a.LNGLAT:n.a.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return A.color=this.color,A.intensity=this.intensity,A.position=s,A}}]),t}();function h(t){return"attenuation"in t?t.attenuation:"intensity"in t?[0,0,t.intensity]:I}var B=A(14),f=A(16),d=A(7),Q=A(283);function E(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var p=function(t){Object(B.a)(A,t);var e=E(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(s.a)(A,[{key:"getProjectedLight",value:function(t){var e=t.layer,A=this.projectedLight,n=e.context.viewport,r=e.props,i=r.coordinateSystem,o=r.coordinateOrigin,a=r.modelMatrix,s=Object(Q.b)({viewport:n,modelMatrix:a,coordinateSystem:i,coordinateOrigin:o}).project_uCameraPosition;return A.color=this.color,A.intensity=this.intensity,A.position=s,A}}]),A}(C),y=A(22),v=A(30),m=Math.PI/180,b=23.4397*m;function F(t,e,A){var n=m*-A,r=m*e,i=function(t){return function(t){return t/864e5-.5+2440588}(t)-2451545}(t),o=function(t){var e=function(t){var e=t,A=m*(1.9148*Math.sin(e)+.02*Math.sin(2*e)+3e-4*Math.sin(3*e));return e+A+102.9372*m+Math.PI}((A=t,m*(357.5291+.98560028*A)));var A;return{declination:D(e,0),rightAscension:S(e,0)}}(i),a=function(t,e){return m*(280.147+360.9856235*t)-e}(i,n)-o.rightAscension;return{azimuth:R(a,r,o.declination),altitude:U(a,r,o.declination)}}function w(t,e,A){var n=F(t,e,A),r=n.azimuth,i=n.altitude;return[Math.sin(r)*Math.cos(i),Math.cos(r)*Math.cos(i),-Math.sin(i)]}function S(t,e){var A=t;return Math.atan2(Math.sin(A)*Math.cos(b)-Math.tan(e)*Math.sin(b),Math.cos(A))}function D(t,e){var A=t;return Math.asin(Math.sin(e)*Math.cos(b)+Math.cos(e)*Math.sin(b)*Math.sin(A))}function R(t,e,A){var n=t,r=e,i=A;return Math.atan2(Math.sin(n),Math.cos(n)*Math.sin(r)-Math.tan(i)*Math.cos(r))}function U(t,e,A){var n=t,r=e,i=A;return Math.asin(Math.sin(r)*Math.sin(i)+Math.cos(r)*Math.cos(i)*Math.cos(n))}function G(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var N=function(t){Object(B.a)(A,t);var e=G(A);function A(t){var n,r=t.timestamp,i=Object(v.a)(t,["timestamp"]);return Object(a.a)(this,A),(n=e.call(this,i)).timestamp=r,n}return Object(s.a)(A,[{key:"getProjectedLight",value:function(t){var e=t.layer.context.viewport;if(e.resolution>0){var A=w(this.timestamp,0,0),n=Object(y.a)(A,3),r=n[0],i=n[1],o=n[2];this.direction=[r,-o,i]}else{var a=e.latitude,s=e.longitude;this.direction=w(this.timestamp,a,s)}return this}}]),A}(o.a),k=A(243),x=A(1414),O=A(19),M=A(333);function L(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var _=function(t){Object(B.a)(A,t);var e=L(A);function A(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,A),n=e.call(this,t,r);var i=r.module,o=r.fs,s=r.id;return n.model=new x.a(t,{id:s,fs:o,modules:[i]}),n}return Object(s.a)(A,[{key:"render",value:function(t){var e=this,A=this.gl;Object(O.o)(A,{framebuffer:t.outputBuffer,clearColor:[0,0,0,0]},(function(){return e._renderPass(A,t)}))}},{key:"delete",value:function(){this.model.delete(),this.model=null}},{key:"_renderPass",value:function(t,e){var A=e.inputBuffer;e.outputBuffer;Object(M.a)(t,{color:!0}),this.model.draw({moduleSettings:this.props.moduleSettings,uniforms:{texture:A,texSize:[A.width,A.height]},parameters:{depthWrite:!1,depthTest:!1}})}}]),A}(A(411).a),J=A(391);function T(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return j(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return j(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function H(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var Y=function(t){Object(B.a)(A,t);var e=H(A);function A(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,A),(n=e.call(this,r)).id="".concat(t.name,"-pass"),Object(J.b)(t),n.module=t,n}return Object(s.a)(A,[{key:"postRender",value:function(t,e){this.passes||(this.passes=function(t,e,A,n){if(e.filter||e.sampler){var r=W(e);return[new _(t,{id:A,module:e,fs:r,moduleSettings:n})]}return(e.passes||[]).map((function(r,i){var o=W(e,r),a="".concat(A,"-").concat(i);return new _(t,{id:a,module:e,fs:o,moduleSettings:n})}))}(t,this.module,this.id,this.props));for(var A=e.target,n=e.inputBuffer,r=e.swapBuffer,i=0;i<this.passes.length;i++){A&&i===this.passes.length-1&&(r=A),this.passes[i].render({inputBuffer:n,outputBuffer:r});var o=r;r=n,n=o}return n}},{key:"cleanup",value:function(){if(this.passes){var t,e=T(this.passes);try{for(e.s();!(t=e.n()).done;){t.value.delete()}}catch(A){e.e(A)}finally{e.f()}this.passes=null}}}]),A}(k.a);var V=function(t){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(t,"(gl_FragColor, texSize, texCoord);\n}\n")},Z=function(t){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(t,"(texture, texSize, texCoord);\n}\n")};function W(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(e.filter){var A="string"===typeof e.filter?e.filter:"".concat(t.name,"_filterColor");return V(A)}if(e.sampler){var n="string"===typeof e.sampler?e.sampler:"".concat(t.name,"_sampleColor");return Z(n)}return null}var K=A(204),P=A(750),q=A(404),X=A(403),z=A(279),$=A(393),tt=A(407),et=A(115),At=A(277),nt=A(39),rt=A(27),it=A(45);function ot(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var at=Math.PI/180,st=180/Math.PI;function gt(){var t=Math.PI/180*256;return{unitsPerMeter:[256/6370972,256/6370972,256/6370972],unitsPerMeter2:[0,0,0],metersPerUnit:[24886.609375,24886.609375,24886.609375],unitsPerDegree:[t,t,256/6370972],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/t,1/t,24886.609375]}}var ct=function(t){Object(B.a)(A,t);var e=ot(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,A);var r=n.latitude,i=void 0===r?0:r,o=n.longitude,s=void 0===o?0:o,g=n.zoom,c=void 0===g?11:g,I=n.nearZMultiplier,u=void 0===I?.1:I,l=n.farZMultiplier,C=void 0===l?2:l,h=n.resolution,B=void 0===h?10:h,f=n.width,d=n.height,Q=n.altitude,E=void 0===Q?1.5:Q;f=f||1,d=d||1,E=Math.max(.75,E);var p=(new nt.a).lookAt({eye:[0,-E,0],up:[0,0,1]}),y=Math.pow(2,c);p.rotateX(i*at),p.rotateZ(-s*at),p.scale(y/d);var v=Math.atan(.5/E),m=512*y/d,b=Object.assign({},n,{width:f,height:d,viewMatrix:p,longitude:s,latitude:i,zoom:c,fovyRadians:2*v,aspect:f/d,focalDistance:E,near:u,far:Math.min(2,1/m+1)*E*C});return(t=e.call(this,b)).resolution=B,t.distanceScales=gt(),t}return Object(s.a)(A,[{key:"getDistanceScales",value:function(){return this.distanceScales}},{key:"getBounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={targetZ:t.z||0},A=this.unproject([0,this.height/2],e),n=this.unproject([this.width/2,0],e),r=this.unproject([this.width,this.height/2],e),i=this.unproject([this.width/2,this.height],e);return r[0]<this.longitude&&(r[0]+=360),A[0]>this.longitude&&(A[0]-=360),[Math.min(A[0],r[0],n[0],i[0]),Math.min(A[1],r[1],n[1],i[1]),Math.max(A[0],r[0],n[0],i[0]),Math.max(A[1],r[1],n[1],i[1])]}},{key:"unproject",value:function(t){var e,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A.topLeft,r=void 0===n||n,i=A.targetZ,o=Object(y.a)(t,3),a=o[0],s=o[1],g=o[2],c=r?s:this.height-s,I=this.pixelUnprojectionMatrix;if(Number.isFinite(g))e=It(I,[a,c,g,1]);else{var u=It(I,[a,c,-1,1]),l=It(I,[a,c,1,1]),C=256*((i||0)/6370972+1),h=rt.n(rt.o([],u,l)),B=rt.n(u),f=rt.n(l),d=(4*B*f-Math.pow(h-B-f,2))/16,Q=4*d/h,E=Math.sqrt(B-Q),p=Math.sqrt(Math.max(0,C*C-Q)),v=(E-p)/Math.sqrt(h);e=rt.h([],u,l,v)}var m=this.unprojectPosition(e),b=Object(y.a)(m,3),F=b[0],w=b[1],S=b[2];return Number.isFinite(g)?[F,w,S]:Number.isFinite(i)?[F,w,i]:[F,w]}},{key:"projectPosition",value:function(t){var e=Object(y.a)(t,3),A=e[0],n=e[1],r=e[2],i=void 0===r?0:r,o=A*at,a=n*at,s=Math.cos(a),g=256*(i/6370972+1);return[Math.sin(o)*s*g,-Math.cos(o)*s*g,Math.sin(a)*g]}},{key:"unprojectPosition",value:function(t){var e=Object(y.a)(t,3),A=e[0],n=e[1],r=e[2],i=rt.f(t),o=Math.asin(r/i);return[Math.atan2(A,-n)*st,o*st,6370972*(i/256-1)]}},{key:"projectFlat",value:function(t){return t}},{key:"unprojectFlat",value:function(t){return t}},{key:"getMapCenterByLngLatPosition",value:function(t){var e=t.lngLat,A=t.pos,n=this.unproject(A);return[e[0]-n[0]+this.longitude,e[1]-n[1]+this.latitude]}},{key:"projectionMode",get:function(){return n.c.GLOBE}}]),A}(et.a);function It(t,e){var A=it.n([],e,t);return it.k(A,A,1/A[3]),A}var ut=A(480),lt=A(194),Ct=A(479),ht=A(974),Bt=A(230),ft=A(171),dt=A(400),Qt=A(1),Et=A(72),pt=A(170),yt=A(284),vt=A(99),mt=A(155),bt=A(143);function Ft(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var wt={position:[0,0,0],pitch:0,bearing:0,maxPitch:90,minPitch:-90},St={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new mt.a(["position","pitch","bearing"]),transitionInterruption:bt.a.BREAK},Dt=function(t){Object(B.a)(A,t);var e=Ft(A);function A(t){var n,r=t.width,i=t.height,o=t.position,s=void 0===o?wt.position:o,g=t.bearing,c=void 0===g?wt.bearing:g,I=t.pitch,u=void 0===I?wt.pitch:I,l=t.longitude,C=t.latitude,h=t.maxPitch,B=void 0===h?wt.maxPitch:h,f=t.minPitch,d=void 0===f?wt.minPitch:f,Q=t.startRotatePos,E=t.startBearing,p=t.startPitch,y=t.startZoomPosition,v=t.startZoom;return Object(a.a)(this,A),(n=e.call(this,{width:r,height:i,position:s,bearing:c,pitch:u,longitude:l,latitude:C,maxPitch:B,minPitch:d}))._state={startRotatePos:Q,startBearing:E,startPitch:p,startZoomPosition:y,startZoom:v},n}return Object(s.a)(A,[{key:"getDirection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=new nt.d({bearing:this._viewportProps.bearing,pitch:t?90:90+this._viewportProps.pitch}),A=e.toVector3().normalize();return A}},{key:"panStart",value:function(){return this}},{key:"pan",value:function(){return this}},{key:"panEnd",value:function(){return this}},{key:"rotateStart",value:function(t){var e=t.pos;return this._getUpdatedState({startRotatePos:e,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e,A=t.pos,n=t.deltaAngleX,r=void 0===n?0:n,i=t.deltaAngleY,o=void 0===i?0:i,a=this._state,s=a.startRotatePos,g=a.startBearing,c=a.startPitch,I=this._viewportProps,u=I.width,l=I.height;if(!s||!Number.isFinite(g)||!Number.isFinite(c))return this;A?e={bearing:g-180*((A[0]-s[0])/u),pitch:c-90*((A[1]-s[1])/l)}:e={bearing:g-r,pitch:c-o};return this._getUpdatedState(e)}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startRotatePos:null,startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(){return this._getUpdatedState({startZoomPosition:this._viewportProps.position,startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.scale,A=this._state.startZoomPosition;A||(A=this._viewportProps.position);var n=this.getDirection();return this._move(n,20*Math.log2(e),A)}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}},{key:"moveLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.getDirection(!0);return this._move(e.rotateZ({radians:Math.PI/2}),t)}},{key:"moveRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.getDirection(!0);return this._move(e.rotateZ({radians:-Math.PI/2}),t)}},{key:"moveUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.getDirection(!0);return this._move(e,t)}},{key:"moveDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=this.getDirection(!0);return this._move(e.negate(),t)}},{key:"rotateLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this._viewportProps.bearing-t})}},{key:"rotateRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this._viewportProps.bearing+t})}},{key:"rotateUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this._viewportProps.pitch+t})}},{key:"rotateDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this._viewportProps.pitch-t})}},{key:"zoomIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this.zoom({scale:t})}},{key:"zoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this.zoom({scale:1/t})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),A=Object.assign({},this._viewportProps),n=A.bearing,r=A.longitude;return Math.abs(n-e.bearing)>180&&(A.bearing=n<0?n+360:n-360),Math.abs(r-e.longitude)>180&&(A.longitude=r<0?r+360:r-360),A}},{key:"_move",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._viewportProps.position,n=t.scale(e);return this._getUpdatedState({position:new nt.c(A).add(n)})}},{key:"_getUpdatedState",value:function(t){return new A(Object.assign({},this._viewportProps,this._state,t))}},{key:"_applyConstraints",value:function(t){var e=t.pitch,A=t.maxPitch,n=t.minPitch,r=t.longitude,i=t.bearing;return t.pitch=Object(nt.e)(e,n,A),(r<-180||r>180)&&(t.longitude=Object(vt.e)(r+180,360)-180),(i<-180||i>180)&&(t.bearing=Object(vt.e)(i+180,360)-180),t}}]),A}(yt.a),Rt=function(t){Object(B.a)(A,t);var e=Ft(A);function A(t){return Object(a.a)(this,A),e.call(this,Dt,t)}return Object(s.a)(A,[{key:"_getTransitionProps",value:function(){return St}}]),A}(pt.a);function Ut(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Gt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Ut(Object(A),!0).forEach((function(e){Object(Qt.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Ut(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Nt(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var kt=function(t){Object(B.a)(A,t);var e=Nt(A);function A(t){Object(a.a)(this,A);var n=t.modelMatrix,r=void 0===n?null:n,i=t.bearing,o=void 0===i?0:i,s=t.pitch,g=void 0===s?0:s,c=t.up,I=void 0===c?[0,0,1]:c,u=function(t){var e=t.bearing,A=t.pitch;return new nt.d({bearing:e,pitch:A}).toVector3().normalize()}({bearing:o,pitch:-90===g?1e-4:90+g}),l=r?r.transformDirection(u):u,C=Object(Et.g)(t),h=Math.pow(2,C),B=(new nt.a).lookAt({eye:[0,0,0],center:l,up:I}).scale(h);return e.call(this,Gt(Gt({},t),{},{zoom:C,viewMatrix:B}))}return A}(et.a),xt=function(t){Object(B.a)(A,t);var e=Nt(A);function A(t){return Object(a.a)(this,A),e.call(this,Object.assign({},t,{type:kt}))}return Object(s.a)(A,[{key:"controller",get:function(){return this._getControllerProps({type:Rt})}}]),A}(ft.a);xt.displayName="FirstPersonView";var Ot=A(747),Mt=A(746),Lt=A(35),_t=A(343);function Jt(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var Tt={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new mt.a(["longitude","latitude","zoom"]),transitionInterruption:bt.a.BREAK},jt=function(t){Object(B.a)(A,t);var e=Jt(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(s.a)(A,[{key:"_applyConstraints",value:function(t){var e=t.maxZoom,A=t.minZoom,n=t.zoom;t.zoom=Object(nt.e)(n,A,e);var r=t.longitude,i=t.latitude;return(r<-180||r>180)&&(t.longitude=Object(vt.e)(r+180,360)-180),t.latitude=Object(nt.e)(i,-89,89),t}}]),A}(_t.a),Ht=function(t){Object(B.a)(A,t);var e=Jt(A);function A(t){return Object(a.a)(this,A),t.dragMode=t.dragMode||"pan",e.call(this,jt,t)}return Object(s.a)(A,[{key:"setProps",value:function(t){Object(Lt.a)(Object(d.a)(A.prototype),"setProps",this).call(this,t),this.dragRotate=!1,this.touchRotate=!1}},{key:"_getTransitionProps",value:function(){return Tt}}]),A}(pt.a);function Yt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Vt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(A),!0).forEach((function(e){Object(Qt.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Yt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Zt(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var Wt=function(t){Object(B.a)(A,t);var e=Zt(A);function A(t){return Object(a.a)(this,A),e.call(this,Vt(Vt({},t),{},{type:ct}))}return Object(s.a)(A,[{key:"controller",get:function(){return this._getControllerProps({type:Ht})}}]),A}(ft.a);Wt.displayName="GlobeView";var Kt=A(278),Pt=A(399),qt=A(857),Xt=A(342);function zt(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return $t(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return $t(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function te(t){var e=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 A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var ee=["bearing","pitch"],Ae={speed:1.2,curve:1.414},ne=function(t){Object(B.a)(A,t);var e=te(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(a.a)(this,A),(t=e.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({},Ae,n),t}return Object(s.a)(A,[{key:"interpolateProps",value:function(t,e,A){var n,r=Object(Et.c)(t,e,A,this.props),i=zt(ee);try{for(i.s();!(n=i.n()).done;){var o=n.value;r[o]=Object(nt.g)(t[o]||0,e[o]||0,A)}}catch(a){i.e(a)}finally{i.f()}return r}},{key:"getDuration",value:function(t,e){var A=e.transitionDuration;return"auto"===A&&(A=Object(Et.f)(t,e,this.props)),A}}]),A}(Xt.a),re=A(43),ie=A(124),oe=A(742),ae=A(157),se=A(396),ge=A(187),ce=A(395),Ie=A(338);A.d(e,"COORDINATE_SYSTEM",(function(){return n.a})),A.d(e,"LightingEffect",(function(){return r.a})),A.d(e,"AmbientLight",(function(){return i.a})),A.d(e,"DirectionalLight",(function(){return o.a})),A.d(e,"PointLight",(function(){return C})),A.d(e,"_CameraLight",(function(){return p})),A.d(e,"_SunLight",(function(){return N})),A.d(e,"PostProcessEffect",(function(){return Y})),A.d(e,"_LayersPass",(function(){return K.a})),A.d(e,"Deck",(function(){return P.a})),A.d(e,"LayerManager",(function(){return q.a})),A.d(e,"AttributeManager",(function(){return X.a})),A.d(e,"Layer",(function(){return z.a})),A.d(e,"CompositeLayer",(function(){return $.a})),A.d(e,"DeckRenderer",(function(){return tt.a})),A.d(e,"Viewport",(function(){return et.a})),A.d(e,"WebMercatorViewport",(function(){return At.a})),A.d(e,"_GlobeViewport",(function(){return ct})),A.d(e,"picking",(function(){return ut.a})),A.d(e,"project",(function(){return lt.a})),A.d(e,"project32",(function(){return Ct.a})),A.d(e,"gouraudLighting",(function(){return ht.a})),A.d(e,"phongLighting",(function(){return ht.b})),A.d(e,"shadow",(function(){return Bt.a})),A.d(e,"View",(function(){return ft.a})),A.d(e,"MapView",(function(){return dt.a})),A.d(e,"FirstPersonView",(function(){return xt})),A.d(e,"OrbitView",(function(){return Ot.a})),A.d(e,"OrthographicView",(function(){return Mt.a})),A.d(e,"_GlobeView",(function(){return Wt})),A.d(e,"Controller",(function(){return pt.a})),A.d(e,"MapController",(function(){return _t.b})),A.d(e,"_GlobeController",(function(){return Ht})),A.d(e,"FirstPersonController",(function(){return Rt})),A.d(e,"OrbitController",(function(){return Kt.b})),A.d(e,"OrthographicController",(function(){return Pt.a})),A.d(e,"Effect",(function(){return k.a})),A.d(e,"LayerExtension",(function(){return qt.a})),A.d(e,"TRANSITION_EVENTS",(function(){return bt.a})),A.d(e,"TransitionInterpolator",(function(){return Xt.a})),A.d(e,"LinearInterpolator",(function(){return mt.a})),A.d(e,"FlyToInterpolator",(function(){return ne})),A.d(e,"log",(function(){return re.a})),A.d(e,"createIterable",(function(){return ie.a})),A.d(e,"fp64LowPart",(function(){return vt.b})),A.d(e,"Tesselator",(function(){return oe.a})),A.d(e,"_fillArray",(function(){return ae.a})),A.d(e,"_flatten",(function(){return ae.b})),A.d(e,"_count",(function(){return se.a})),A.d(e,"_memoize",(function(){return ge.a})),A.d(e,"_mergeShaders",(function(){return ce.a})),A.d(e,"_compareProps",(function(){return Ie.a}))},function(t,e){var A,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(t){if(A===setTimeout)return setTimeout(t,0);if((A===i||!A)&&setTimeout)return A=setTimeout,setTimeout(t,0);try{return A(t,0)}catch(e){try{return A.call(null,t,0)}catch(e){return A.call(this,t,0)}}}!function(){try{A="function"===typeof setTimeout?setTimeout:i}catch(t){A=i}try{n="function"===typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var s,g=[],c=!1,I=-1;function u(){c&&s&&(c=!1,s.length?g=s.concat(g):I=-1,g.length&&l())}function l(){if(!c){var t=a(u);c=!0;for(var e=g.length;e;){for(s=g,g=[];++I<e;)s&&s[I].run();I=-1,e=g.length}s=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function C(t,e){this.fun=t,this.array=e}function h(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)e[A-1]=arguments[A];g.push(new C(t,e)),1!==g.length||c||a(l)},C.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,A){"use strict";var n=A(13),r=A(12),i=A(20),o=A(0),a=A(2),s=A.n(a);function g(t){var e,A=new Set,n=function(t,n){var r="function"===typeof t?t(e):t;r!==e&&(e=n?r:Object.assign({},e,r),A.forEach((function(t){return t(e)})))},r=function(){return e},i={setState:n,getState:r,subscribe:function(t,n,i){return n||i?function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.is,o=n(e);function a(){try{var A=n(e);i(o,A)||t(o=A)}catch(r){t(null,r)}}return A.add(a),function(){return A.delete(a)}}(t,n,i):(A.add(t),function(){return A.delete(t)})},destroy:function(){return A.clear()}};return e=t(n,r,i),i}var c="undefined"===typeof window?o.useEffect:o.useLayoutEffect;var I=function(t){var e="function"===typeof t?g(t):t,A=function(){var t,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.getState,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.is,r=Object(o.useReducer)((function(t){return t+1}),0)[1],i=Object(o.useRef)(),a=Object(o.useRef)(A),s=Object(o.useRef)(n),g=Object(o.useRef)(!1),I=e.getState();void 0===i.current&&(i.current=A(I));var u=!1;(a.current!==A||s.current!==n||g.current)&&(t=A(I),u=!n(i.current,t)),c((function(){u&&(i.current=t),a.current=A,s.current=n,g.current=!1}));var l=Object(o.useRef)(I);return Object(o.useEffect)((function(){var t=function(){try{var t=a.current(e.getState());s.current(i.current,t)||(i.current=t,r())}catch(A){g.current=!0,r()}},A=e.subscribe(t);return e.getState()!==l.current&&t(),A}),[]),u?t:i.current};return Object.assign(A,e),A[Symbol.iterator]=s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.warn("[useStore, api] = create() is deprecated and will be removed in v4"),t.next=3,A;case 3:return t.next=5,e;case 5:case"end":return t.stop()}}),t)})),A},u=A(356),l=A.n(u),C=A(73);A.d(e,"q",(function(){return h})),A.d(e,"d",(function(){return B})),A.d(e,"f",(function(){return y})),A.d(e,"a",(function(){return m})),A.d(e,"j",(function(){return b})),A.d(e,"i",(function(){return F})),A.d(e,"k",(function(){return w})),A.d(e,"b",(function(){return S})),A.d(e,"n",(function(){return D})),A.d(e,"o",(function(){return R})),A.d(e,"c",(function(){return U})),A.d(e,"l",(function(){return G})),A.d(e,"r",(function(){return N})),A.d(e,"p",(function(){return k})),A.d(e,"e",(function(){return x})),A.d(e,"m",(function(){return O})),A.d(e,"h",(function(){return M})),A.d(e,"g",(function(){return L}));var h=I((function(t){return{viewConfig:null,loaders:null,setViewConfig:function(e){return t({viewConfig:e})},setLoaders:function(e){return t({loaders:e})},setCoordinationValue:function(e){var A=e.parameter,n=e.scope,o=e.value;return t((function(t){return{viewConfig:Object(i.a)({},t.viewConfig,{coordinationSpace:Object(i.a)({},t.viewConfig.coordinationSpace,Object(r.a)({},A,Object(i.a)({},t.viewConfig.coordinationSpace[A],Object(r.a)({},n,o))))})}}))},removeComponent:function(e){return t((function(t){var A=t.viewConfig.layout.slice();return A.splice(e,1),{viewConfig:Object(i.a)({},t.viewConfig,{layout:A})}}))},changeLayout:function(e){return t((function(t){var A=t.viewConfig.layout.slice();return e.forEach((function(t){var e=Object(n.a)(t,2),r=e[0],o=e[1];A[r]=Object(i.a)({},A[r],{},o)})),{viewConfig:Object(i.a)({},t.viewConfig,{layout:A})}}))}}})),B=function(t,e,A){return h((function(n){return n.viewConfig.layout.filter((function(e){return e.component===t})).filter((function(t){return e.every((function(e){return t.coordinationScopes[e]===A[e]}))}))}))},f=I((function(t){return{auxiliaryStore:null,setCoordinationValue:function(e){var A=e.parameter,n=e.scope,o=e.value;return t((function(t){return{auxiliaryStore:Object(i.a)({},t.auxiliaryStore,Object(r.a)({},A,Object(r.a)({},n,o)))}}))}}})),d=I((function(t){return{componentHover:null,setComponentHover:function(e){return t({componentHover:e})}}})),Q=I((function(t){return{warning:null,setWarning:function(e){return t({warning:e})}}})),E=I((function(t){return{viewInfo:{},setComponentViewInfo:function(e,A){return t((function(t){return{viewInfo:Object(i.a)({},t.viewInfo,Object(r.a)({},e,A))}}))}}})),p=I((function(t){return{resizeCount:{},incrementResizeCount:function(){return t((function(t){return{resizeCount:t.resizeCount+1}}))}}}));function y(t,e){var A=h((function(t){return t.setCoordinationValue}));return[h((function(A){var n=A.viewConfig.coordinationSpace;return Object(C.b)(t.map((function(t){return n&&n[t]?[t,n[t][e[t]]]:[t,void 0]})))}),l.a),Object(o.useMemo)((function(){return Object(C.b)(t.map((function(t){return["set".concat(Object(C.a)(t)),function(n){return A({parameter:t,scope:e[t],value:n})}]})))}),[t,e])]}var v={spatialRasterLayers:["rasterLayersCallbacks","areLoadingRasterChannnels"]};function m(t,e){var A=f((function(t){return t.setCoordinationValue})),n=function(t){var e={};return Object.keys(t).forEach((function(A){(v[A]||[]).forEach((function(n){e[n||A]=t[A]}))})),e}(e),r=function(t){return t.map((function(t){return v[t]})).filter(Boolean).flat()}(t);return[f((function(t){var e=t.auxiliaryStore;return Object(C.b)(r.map((function(t){return e&&e[t]?[t,e[t][n[t]]]:[t,void 0]})))}),l.a),Object(o.useMemo)((function(){return Object(C.b)(r.map((function(t){return["set".concat(Object(C.a)(t)),function(e){return A({parameter:t,scope:n[t],value:e})}]})))}),[t,e])]}function b(){return h((function(t){return t.loaders}))}function F(){return h((function(t){var e;return null===(e=t.viewConfig)||void 0===e?void 0:e.layout}))}function w(){return h((function(t){return t.removeComponent}))}function S(){return h((function(t){return t.changeLayout}))}function D(){return h((function(t){return t.setLoaders}))}function R(){return Object(o.useRef)(h.getState().setViewConfig).current}function U(){return d((function(t){return t.componentHover}))}function G(){return d((function(t){return t.setComponentHover}))}function N(){return Q((function(t){return t.warning}))}function k(){return Q((function(t){return t.setWarning}))}function x(t){return E(Object(o.useCallback)((function(e){return e.viewInfo[t]}),[t]))}function O(t){var e=Object(o.useRef)(E.getState().setComponentViewInfo);return function(A){return e.current(t,A)}}function M(){return p((function(t){return t.resizeCount}))}function L(){return p((function(t){return t.incrementResizeCount}))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(0),r=A(122);function i(t,e){return n.useMemo((function(){return null==t&&null==e?null:function(A){Object(r.a)(t,A),Object(r.a)(e,A)}}),[t,e])}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i})),A.d(e,"b",(function(){return o})),A.d(e,"c",(function(){return s}));var n=A(37);function r(t,e){if(t.length!==e)return!1;for(var A=0;A<t.length;++A)if(!Number.isFinite(t[A]))return!1;return!0}function i(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function o(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n.b.debug&&!r(t,e))throw new Error("math.gl: ".concat(A," some fields set to invalid numbers'"));return t}var a={};function s(t,e){a[t]||(a[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}},function(t,e,A){"use strict";function n(t){return t.charAt(0).toUpperCase()+t.slice(1)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}A.d(e,"a",(function(){return n}))},function(t,A){t.exports=e},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(318);function r(t){return new n.a(t)}},,function(t,e,A){"use strict";function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function r(t,e){if(t){if("string"===typeof t)return n(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?n(t,e):void 0}}function i(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||r(t)||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(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}(t,e)||r(t,e)||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 a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var g=A(45);function c(t,e){var A=g.n([],e,t);return g.k(A,A,1/A[3]),A}function I(t,e){var A=t%e;return A<0?e+A:A}function u(t,e,A){return A*e+(1-A)*t}var l=A(18),C=A(38),h=A(27);function B(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}var f=Math.PI,d=f/4,Q=f/180,E=180/f;function p(t){return Math.pow(2,t)}function y(t){return Math.log2(t)}function v(t){var e=o(t,2),A=e[0],n=e[1];B(Number.isFinite(A)),B(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");var r=n*Q;return[512*(A*Q+f)/(2*f),512*(f+Math.log(Math.tan(d+.5*r)))/(2*f)]}function m(t){var e=o(t,2),A=e[0],n=e[1],r=A/512*(2*f)-f,i=2*(Math.atan(Math.exp(n/512*(2*f)-f))-d);return[r*E,i*E]}function b(t){var e=t.latitude;return B(Number.isFinite(e)),y(4003e4*Math.cos(e*Q))-9}function F(t){var e=t.latitude,A=t.longitude,n=t.highPrecision,r=void 0!==n&&n;B(Number.isFinite(e)&&Number.isFinite(A));var i={},o=Math.cos(e*Q),a=512/360/o,s=512/4003e4/o;if(i.unitsPerMeter=[s,s,s],i.metersPerUnit=[1/s,1/s,1/s],i.unitsPerDegree=[512/360,a,s],i.degreesPerUnit=[.703125,1/a,1/s],r){var g=Q*Math.tan(e*Q)/o,c=512/360*g/2,I=512/4003e4*g,u=I/a*s;i.unitsPerDegree2=[0,c,I],i.unitsPerMeter2=[u,0,u]}return i}function w(t,e){var A=o(t,3),n=A[0],r=A[1],i=A[2],a=o(e,3),s=a[0],g=a[1],c=a[2],I=F({longitude:n,latitude:r,highPrecision:!0}),u=I.unitsPerMeter,l=I.unitsPerMeter2,C=v(t);C[0]+=s*(u[0]+l[0]*g),C[1]+=g*(u[1]+l[1]*g);var h=m(C),B=(i||0)+(c||0);return Number.isFinite(i)||Number.isFinite(c)?[h[0],h[1],B]:h}function S(t){var e=t.height,A=t.pitch,n=t.bearing,r=t.altitude,i=t.scale,o=t.center,a=void 0===o?null:o,s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return l.p(s,s,[0,0,-r]),l.l(s,s,-A*Q),l.n(s,s,n*Q),i/=e,l.o(s,s,[i,i,i]),a&&l.p(s,s,h.i([],a)),s}function D(t){var e=t.width,A=t.height,n=t.altitude,r=void 0===n?1.5:n,i=t.pitch,o=void 0===i?0:i,a=t.nearZMultiplier,s=void 0===a?1:a,g=t.farZMultiplier,c=void 0===g?1:g,I=o*Q,u=Math.atan(.5/r),l=Math.sin(u)*r/Math.sin(Math.min(Math.max(Math.PI/2-I-u,.01),Math.PI-.01));return{fov:2*u,aspect:e/A,focalDistance:r,near:s,far:(Math.sin(I)*l+r)*c}}function R(t){var e=t.width,A=t.height,n=t.pitch,r=D({width:e,height:A,altitude:t.altitude,pitch:n,nearZMultiplier:t.nearZMultiplier,farZMultiplier:t.farZMultiplier}),i=r.fov,o=r.aspect,a=r.near,s=r.far;return l.j([],i,o,a,s)}function U(t,e){var A=o(t,3),n=A[0],r=A[1],i=A[2],a=void 0===i?0:i;return B(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(a)),c(e,[n,r,a,1])}function G(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=o(t,3),r=n[0],i=n[1],a=n[2];if(B(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(a)){var s=c(e,[r,i,a,1]);return s}var g=c(e,[r,i,0,1]),I=c(e,[r,i,1,1]),u=g[2],l=I[2],h=u===l?0:((A||0)-u)/(l-u);return C.c([],g,I,h)}function N(t){var e=t.width,A=t.height,n=t.bounds,r=t.minExtent,i=void 0===r?0:r,a=t.maxZoom,s=void 0===a?24:a,g=t.padding,c=void 0===g?0:g,I=t.offset,u=void 0===I?[0,0]:I,l=o(n,2),C=o(l[0],2),h=C[0],f=C[1],d=o(l[1],2),Q=d[0],E=d[1];if(Number.isFinite(c)){c={top:c,bottom:c,left:c,right:c}}else B(Number.isFinite(c.top)&&Number.isFinite(c.bottom)&&Number.isFinite(c.left)&&Number.isFinite(c.right));var p=new M({width:e,height:A,longitude:0,latitude:0,zoom:0}),y=p.project([h,E]),v=p.project([Q,f]),m=[Math.max(Math.abs(v[0]-y[0]),i),Math.max(Math.abs(v[1]-y[1]),i)],b=[e-c.left-c.right-2*Math.abs(u[0]),A-c.top-c.bottom-2*Math.abs(u[1])];B(b[0]>0&&b[1]>0);var F=b[0]/m[0],w=b[1]/m[1],S=(c.right-c.left)/2/F,D=(c.bottom-c.top)/2/w,R=[(v[0]+y[0])/2+S,(v[1]+y[1])/2+D],U=p.unproject(R),G=Math.min(s,p.zoom+Math.log2(Math.abs(Math.min(F,w))));return B(Number.isFinite(G)),{longitude:U[0],latitude:U[1],zoom:G}}var k=Math.PI/180;function x(t){var e,A,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.width,i=t.height,o=t.unproject,a={targetZ:n},s=o([0,i],a),g=o([r,i],a),c=Math.atan(.5/t.altitude),I=(90-t.pitch)*k;return c>I-.01?(e=O(t,0,n),A=O(t,r,n)):(e=o([0,0],a),A=o([r,0],a)),[s,g,A,e]}function O(t,e,A){var n=t.pixelUnprojectionMatrix,r=c(n,[e,0,1,1]),i=c(n,[e,t.height,1,1]),o=(A*t.distanceScales.unitsPerMeter[2]-r[2])/(i[2]-r[2]),a=m(C.c([],r,i,o));return a[2]=A,a}var M=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1},A=e.width,n=e.height,r=e.latitude,i=void 0===r?0:r,o=e.longitude,s=void 0===o?0:o,g=e.zoom,c=void 0===g?0:g,I=e.pitch,u=void 0===I?0:I,l=e.bearing,C=void 0===l?0:l,h=e.altitude,B=void 0===h?1.5:h,f=e.nearZMultiplier,d=void 0===f?.02:f,Q=e.farZMultiplier,E=void 0===Q?1.01:Q;a(this,t),A=A||1,n=n||1;var y=p(c);B=Math.max(.75,B);var m=v([s,i]);m[2]=0,this.projectionMatrix=R({width:A,height:n,pitch:u,altitude:B,nearZMultiplier:d,farZMultiplier:E}),this.viewMatrix=S({height:n,scale:y,center:m,pitch:u,bearing:C,altitude:B}),this.width=A,this.height=n,this.scale=y,this.latitude=i,this.longitude=s,this.zoom=c,this.pitch=u,this.bearing=C,this.altitude=B,this.center=m,this.distanceScales=F(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)}var e,A,n;return e=t,(A=[{key:"_initMatrices",value:function(){var t=this.width,e=this.height,A=this.projectionMatrix,n=this.viewMatrix,r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.h(r,r,A),l.h(r,r,n),this.viewProjectionMatrix=r;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];l.o(i,i,[t/2,-e/2,1]),l.p(i,i,[1,-1,0]),l.h(i,i,r);var o=l.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],i);if(!o)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=i,this.pixelUnprojectionMatrix=o}},{key:"equals",value:function(e){return e instanceof t&&e.width===this.width&&e.height===this.height&&l.b(e.projectionMatrix,this.projectionMatrix)&&l.b(e.viewMatrix,this.viewMatrix)}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.topLeft,n=void 0===A||A,r=this.projectPosition(t),i=U(r,this.pixelProjectionMatrix),a=o(i,2),s=a[0],g=a[1],c=n?g:this.height-g;return 2===t.length?[s,c]:[s,c,i[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.topLeft,n=void 0===A||A,r=e.targetZ,i=void 0===r?void 0:r,a=o(t,3),s=a[0],g=a[1],c=a[2],I=n?g:this.height-g,u=i&&i*this.distanceScales.unitsPerMeter[2],l=G([s,I,c],this.pixelUnprojectionMatrix,u),C=this.unprojectPosition(l),h=o(C,3),B=h[0],f=h[1],d=h[2];return Number.isFinite(c)?[B,f,d]:Number.isFinite(i)?[B,f,i]:[B,f]}},{key:"projectPosition",value:function(t){var e=o(v(t),2);return[e[0],e[1],(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(t){var e=o(m(t),2);return[e[0],e[1],(t[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(t){return v(t)}},{key:"unprojectFlat",value:function(t){return m(t)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e=t.lngLat,A=G(t.pos,this.pixelUnprojectionMatrix),n=v(e),r=C.a([],n,C.d([],A));return m(C.a([],this.center,r))}},{key:"getLocationAtPoint",value:function(t){var e=t.lngLat,A=t.pos;return this.getMapCenterByLngLatPosition({lngLat:e,pos:A})}},{key:"fitBounds",value:function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.width,r=this.height,i=N(Object.assign({width:n,height:r,bounds:e},A)),o=i.longitude,a=i.latitude,s=i.zoom;return new t({width:n,height:r,longitude:o,latitude:a,zoom:s})}},{key:"getBounds",value:function(t){var e=this.getBoundingRegion(t),A=Math.min.apply(Math,i(e.map((function(t){return t[0]})))),n=Math.max.apply(Math,i(e.map((function(t){return t[0]}))));return[[A,Math.min.apply(Math,i(e.map((function(t){return t[1]}))))],[n,Math.max.apply(Math,i(e.map((function(t){return t[1]}))))]]}},{key:"getBoundingRegion",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return x(this,t.z||0)}}])&&s(e.prototype,A),n&&s(e,n),t}();function L(t){var e=t.width,A=t.height,n=t.longitude,r=t.latitude,i=t.zoom,o=t.pitch,a=void 0===o?0:o,s=t.bearing,g=void 0===s?0:s;(n<-180||n>180)&&(n=I(n+180,360)-180),(g<-180||g>180)&&(g=I(g+180,360)-180);var c=new M({width:e,height:A,longitude:n,latitude:r,zoom:i}),u=c.project([n,85.05113])[1],l=c.project([n,-85.05113])[1],C=0;return l-u<A&&(i+=Math.log2(A/(l-u)),u=(c=new M({width:e,height:A,longitude:n,latitude:r,zoom:i})).project([n,85.05113])[1],l=c.project([n,-85.05113])[1]),u>0?C=u:l<A&&(C=l-A),C&&(r=c.unproject([e/2,A/2+C])[1]),{width:e,height:A,longitude:n,latitude:r,zoom:i,pitch:a,bearing:g}}function _(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return J(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return J(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function J(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var T=["longitude","latitude","zoom"],j={curve:1.414,speed:1.2};function H(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={},i=V(t,e,n),o=i.startZoom,a=i.startCenterXY,s=i.uDelta,g=i.w0,c=i.u1,I=i.S,l=i.rho,h=i.rho2,B=i.r0;if(c<.01){var f,d=_(T);try{for(d.s();!(f=d.n()).done;){var Q=f.value,E=t[Q],p=e[Q];r[Q]=u(E,p,A)}}catch(U){d.e(U)}finally{d.f()}return r}var v=A*I,b=Math.cosh(B)/Math.cosh(B+l*v),F=g*((Math.cosh(B)*Math.tanh(B+l*v)-Math.sinh(B))/h)/c,w=1/b,S=o+y(w),D=C.e([],s,F);C.a(D,D,a);var R=m(D);return r.longitude=R[0],r.latitude=R[1],r.zoom=S,r}function Y(t,e){var A,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n=Object.assign({},j,n),i=r.screenSpeed,o=r.speed,a=r.maxDuration,s=V(t,e,n),g=s.S,c=s.rho,I=1e3*g;return A=Number.isFinite(i)?I/(i/c):I/o,Number.isFinite(a)&&A>a?0:A}function V(t,e,A){var n=(A=Object.assign({},j,A)).curve,r=t.zoom,i=[t.longitude,t.latitude],o=p(r),a=e.zoom,s=[e.longitude,e.latitude],g=p(a-r),c=v(i),I=v(s),u=C.f([],I,c),l=Math.max(t.width,t.height),h=l/g,B=C.b(u)*o,f=Math.max(B,.01),d=n*n,Q=(h*h-l*l+d*d*f*f)/(2*l*d*f),E=(h*h-l*l-d*d*f*f)/(2*h*d*f),y=Math.log(Math.sqrt(Q*Q+1)-Q),m=Math.log(Math.sqrt(E*E+1)-E);return{startZoom:r,startCenterXY:c,uDelta:u,w0:l,u1:B,S:(m-y)/n,rho:n,rho2:d,r0:y,r1:m}}A.d(e,"d",(function(){return x})),A.d(e,"b",(function(){return N})),A.d(e,"k",(function(){return L})),A.d(e,"c",(function(){return H})),A.d(e,"f",(function(){return Y})),A.d(e,"j",(function(){return v})),A.d(e,"m",(function(){return m})),A.d(e,"n",(function(){return U})),A.d(e,"l",(function(){return G})),A.d(e,"g",(function(){return b})),A.d(e,"e",(function(){return F})),A.d(e,"a",(function(){return w})),A.d(e,"i",(function(){return S})),A.d(e,"h",(function(){return D}))},function(t,e,A){"use strict";A.d(e,"b",(function(){return i})),A.d(e,"g",(function(){return o})),A.d(e,"f",(function(){return a})),A.d(e,"a",(function(){return s})),A.d(e,"c",(function(){return g})),A.d(e,"d",(function(){return c})),A.d(e,"e",(function(){return I}));var n=A(12),r=A(21);function i(t){return Object(r.a)(t).reduce((function(t,e){var A=e[0],r=e[1];return Object.assign(t,Object(n.a)({},A,r))}),{})}function o(t){return Object(r.a)(Array(t).keys())}function a(t,e,A){return 1===A?t:e}function s(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t){var e,A="ABCDEFGHIJKLMNOPQRSTUVWXYZ",n=[0];function r(){var t=[];n.forEach((function(e){t.unshift(A[e])}));for(var e=!0,r=0;r<n.length;r++){if(!(++n[r]>=A.length)){e=!1;break}n[r]=0}return e&&n.push(0),t.join("")}do{e=r()}while(t.includes(e));return e}function c(t,e){var A=t.data;return Array.isArray(A)?A[e||A.length-1]:A}function I(t){var e=c(t),A=e.shape,n=e.dtype;return 3===A[e.labels.indexOf("c")]&&"Uint8"===n}},function(t,e,A){"use strict";function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"d",(function(){return r})),A.d(e,"e",(function(){return i})),A.d(e,"c",(function(){return o})),A.d(e,"b",(function(){return a})),A.d(e,"a",(function(){return s}));var n=A(84);function r(t){return"undefined"!==typeof WebGLRenderingContext&&t instanceof WebGLRenderingContext||("undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&Number.isFinite(t._version)))}function i(t){return"undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&2===t._version)}function o(t){return i(t)?t:null}function a(t){return Object(n.a)(r(t),"Invalid WebGLRenderingContext"),t}function s(t){return Object(n.a)(i(t),"Requires WebGL2"),t}},function(t,e,A){"use strict";A.d(e,"l",(function(){return o})),A.d(e,"i",(function(){return a})),A.d(e,"h",(function(){return s})),A.d(e,"g",(function(){return g})),A.d(e,"b",(function(){return c})),A.d(e,"f",(function(){return I})),A.d(e,"e",(function(){return u})),A.d(e,"d",(function(){return l})),A.d(e,"c",(function(){return C})),A.d(e,"k",(function(){return h})),A.d(e,"a",(function(){return B})),A.d(e,"j",(function(){return f}));var n,r=A(12),i=A(28),o=2048,a=1,s=16,g=20,c=9,I=15,u=10,l=90,C=3,h={dark:[224,224,224],light:[64,64,64]},B="-apple-system, 'Helvetica Neue', Arial, sans-serif",f=(n={},Object(r.a)(n,i.default.TEXTURE_MIN_FILTER,i.default.NEAREST),Object(r.a)(n,i.default.TEXTURE_MAG_FILTER,i.default.NEAREST),Object(r.a)(n,i.default.TEXTURE_WRAP_S,i.default.CLAMP_TO_EDGE),Object(r.a)(n,i.default.TEXTURE_WRAP_T,i.default.CLAMP_TO_EDGE),n)},function(t,e,A){"use strict";var n=A(71),r=A(222);var i=A(426);function o(t){var e="function"===typeof Map?new Map:void 0;return(o=function(t){if(null===t||(A=t,-1===Function.toString.call(A).indexOf("[native code]")))return t;var A;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,o)}function o(){return Object(i.a)(t,arguments,Object(n.a)(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(r.a)(o,t)})(t)}A.d(e,"a",(function(){return o}))},function(t,e,A){"use strict";function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"b",(function(){return i})),A.d(e,"a",(function(){return o}));var n=A(43),r={};function i(t){r=t}function o(t){var e;n.a.level>0&&r[t]&&(e=r[t]).call.apply(e,arguments)}},function(t,e,A){"use strict";A.d(e,"a",(function(){return n})),A.d(e,"b",(function(){return r}));var n={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"},r={COMPONENT:Symbol.for("component"),ASYNC_DEFAULTS:Symbol.for("asyncPropDefaults"),ASYNC_ORIGINAL:Symbol.for("asyncPropOriginal"),ASYNC_RESOLVED:Symbol.for("asyncPropResolved")}},,,function(t,e,A){"use strict";A.d(e,"a",(function(){return Q}));var n=A(5),r=A(4),i=A(56),o=A(14),a=A(16),s=A(7),g=A(94),c=A(130),I=A(167),u=A(19),l=A(394),C=A(49);function h(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var B={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"},f={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:B},d={removedProps:B},Q=function(t){Object(o.a)(A,t);var e=h(A);function A(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n.a)(this,A),(r=e.call(this,t,o)).stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),r.target=o.target||(r.gl.webgl2?36662:34962),r.initialize(o),Object.seal(Object(i.a)(r)),r}return Object(r.a)(A,[{key:"getElementCount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/c.a.getBytesPerElement(t))}},{key:"getVertexCount",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.accessor;return Math.round(this.byteLength/c.a.getBytesPerVertex(t))}},{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ArrayBuffer.isView(t)&&(t={data:t}),Number.isFinite(t)&&(t={byteLength:t}),t=Object(l.a)("Buffer",t,f),this.usage=t.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},t,t.accessor)),t.data?this._setData(t.data,t.offset,t.byteLength):this._setByteLength(t.byteLength||0),this}},{key:"setProps",value:function(t){return"accessor"in(t=Object(l.a)("Buffer",t,d))&&this.setAccessor(t.accessor),this}},{key:"setAccessor",value:function(t){return delete(t=Object.assign({},t)).buffer,this.accessor=new c.a(t),this}},{key:"reallocate",value:function(t){return t>this.byteLength?(this._setByteLength(t),!0):(this.bytesUsed=t,!1)}},{key:"setData",value:function(t){return this.initialize(t)}},{key:"subData",value:function(t){ArrayBuffer.isView(t)&&(t={data:t});var e=t,A=e.data,n=e.offset,r=void 0===n?0:n,i=e.srcOffset,o=void 0===i?0:i,a=t.byteLength||t.length;Object(C.a)(A);var s=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(s,this.handle),0!==o||void 0!==a?(Object(u.a)(this.gl),this.gl.bufferSubData(this.target,r,A,o,a)):this.gl.bufferSubData(s,r,A),this.gl.bindBuffer(s,null),this.debugData=null,this._inferType(A),this}},{key:"copyData",value:function(t){var e=t.sourceBuffer,A=t.readOffset,n=void 0===A?0:A,r=t.writeOffset,i=void 0===r?0:r,o=t.size,a=this.gl;return Object(u.a)(a),a.bindBuffer(36662,e.handle),a.bindBuffer(36663,this.handle),a.copyBufferSubData(36662,36663,n,i,o),a.bindBuffer(36662,null),a.bindBuffer(36663,null),this.debugData=null,this}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.dstData,A=void 0===e?null:e,n=t.srcByteOffset,r=void 0===n?0:n,i=t.dstOffset,o=void 0===i?0:i,a=t.length,s=void 0===a?0:a;Object(u.a)(this.gl);var g,c,l=Object(I.c)(this.accessor.type||5126,{clamped:!1}),h=this._getAvailableElementCount(r),B=o;A?g=(c=A.length)-B:c=B+(g=Math.min(h,s||h));var f=Math.min(h,g);return s=s||f,Object(C.a)(s<=f),A=A||new l(c),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,r,A,o,s),this.gl.bindBuffer(36662,null),A}},{key:"bind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,A=void 0===e?this.target:e,n=t.index,r=void 0===n?this.accessor&&this.accessor.index:n,i=t.offset,o=void 0===i?0:i,a=t.size;return 35345===A||35982===A?void 0!==a?this.gl.bindBufferRange(A,r,this.handle,o,a):(Object(C.a)(0===o),this.gl.bindBufferBase(A,r,this.handle)):this.gl.bindBuffer(A,this.handle),this}},{key:"unbind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,A=void 0===e?this.target:e,n=t.index,r=void 0===n?this.accessor&&this.accessor.index:n,i=35345===A||35982===A;return i?this.gl.bindBufferBase(A,r,null):this.gl.bindBuffer(A,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(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.byteLength+e;Object(C.a)(ArrayBuffer.isView(t)),this._trackDeallocatedMemory();var n=this._getTarget();this.gl.bindBuffer(n,this.handle),this.gl.bufferData(n,A,this.usage),this.gl.bufferSubData(n,e,t),this.gl.bindBuffer(n,null),this.debugData=t.slice(0,10),this.bytesUsed=A,this._trackAllocatedMemory(A);var r=Object(I.b)(t);return Object(C.a)(r),this.setAccessor(new c.a(this.accessor,{type:r})),this}},{key:"_setByteLength",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.usage;Object(C.a)(t>=0),this._trackDeallocatedMemory();var A=t;0===t&&(A=new Float32Array(0));var n=this._getTarget();return this.gl.bindBuffer(n,this.handle),this.gl.bufferData(n,A,e),this.gl.bindBuffer(n,null),this.usage=e,this.debugData=null,this.bytesUsed=t,this._trackAllocatedMemory(t),this}},{key:"_getTarget",value:function(){return this.gl.webgl2?36663:this.target}},{key:"_getAvailableElementCount",value:function(t){var e=t/Object(I.c)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-e}},{key:"_inferType",value:function(t){this.accessor.type||this.setAccessor(new c.a(this.accessor,{type:Object(I.b)(t)}))}},{key:"_createHandle",value:function(){return this.gl.createBuffer()}},{key:"_deleteHandle",value:function(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}},{key:"_getParameter",value:function(t){this.gl.bindBuffer(this.target,this.handle);var e=this.gl.getBufferParameter(this.target,t);return this.gl.bindBuffer(this.target,null),e}},{key:"setByteLength",value:function(t){return u.k.deprecated("setByteLength","reallocate")(),this.reallocate(t)}},{key:"updateAccessor",value:function(t){return u.k.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new c.a(this.accessor,t),this}},{key:"type",get:function(){return u.k.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}},{key:"bytes",get:function(){return u.k.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}}]),A}(g.a)},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e,A){void 0===A&&(A={});var n={type:"Feature"};return(0===A.id||A.id)&&(n.id=A.id),A.bbox&&(n.bbox=A.bbox),n.properties=e||{},n.geometry=t,n}function r(t,e,A){return void 0===A&&(A={}),n({type:"Point",coordinates:t},e,A)}function i(t,e,A){void 0===A&&(A={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}return n({type:"Polygon",coordinates:t},e,A)}function o(t,e,A){if(void 0===A&&(A={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return n({type:"LineString",coordinates:t},e,A)}function a(t,e){void 0===e&&(e={});var A={type:"FeatureCollection"};return e.id&&(A.id=e.id),e.bbox&&(A.bbox=e.bbox),A.features=t,A}function s(t,e,A){return void 0===A&&(A={}),n({type:"MultiLineString",coordinates:t},e,A)}function g(t,e,A){return void 0===A&&(A={}),n({type:"MultiPoint",coordinates:t},e,A)}function c(t,e,A){return void 0===A&&(A={}),n({type:"MultiPolygon",coordinates:t},e,A)}function I(t,A){void 0===A&&(A="kilometers");var n=e.factors[A];if(!n)throw new Error(A+" units is invalid");return t*n}function u(t,A){void 0===A&&(A="kilometers");var n=e.factors[A];if(!n)throw new Error(A+" units is invalid");return t/n}function l(t){return 180*(t%(2*Math.PI))/Math.PI}function C(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)&&!/^\s*$/.test(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:e.earthRadius/1.0936},e.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/e.earthRadius,yards:1/1.0936},e.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},e.feature=n,e.geometry=function(t,e,A){switch(void 0===A&&(A={}),t){case"Point":return r(e).geometry;case"LineString":return o(e).geometry;case"Polygon":return i(e).geometry;case"MultiPoint":return g(e).geometry;case"MultiLineString":return s(e).geometry;case"MultiPolygon":return c(e).geometry;default:throw new Error(t+" is invalid")}},e.point=r,e.points=function(t,e,A){return void 0===A&&(A={}),a(t.map((function(t){return r(t,e)})),A)},e.polygon=i,e.polygons=function(t,e,A){return void 0===A&&(A={}),a(t.map((function(t){return i(t,e)})),A)},e.lineString=o,e.lineStrings=function(t,e,A){return void 0===A&&(A={}),a(t.map((function(t){return o(t,e)})),A)},e.featureCollection=a,e.multiLineString=s,e.multiPoint=g,e.multiPolygon=c,e.geometryCollection=function(t,e,A){return void 0===A&&(A={}),n({type:"GeometryCollection",geometries:t},e,A)},e.round=function(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var A=Math.pow(10,e||0);return Math.round(t*A)/A},e.radiansToLength=I,e.lengthToRadians=u,e.lengthToDegrees=function(t,e){return l(u(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=l,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,A){if(void 0===e&&(e="kilometers"),void 0===A&&(A="kilometers"),!(t>=0))throw new Error("length must be a positive number");return I(u(t,e),A)},e.convertArea=function(t,A,n){if(void 0===A&&(A="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=e.areaFactors[A];if(!r)throw new Error("invalid original units");var i=e.areaFactors[n];if(!i)throw new Error("invalid final units");return t/r*i},e.isNumber=C,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!C(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},e.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},e.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},e.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},e.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},e.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},e.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},e.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},function(t,e,A){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),A)}function r(t){if(t.type)return t;if("#"===t.charAt(0))return r(function(t){t=t.substr(1);var e=new RegExp(".{1,".concat(t.length/3,"}"),"g"),A=t.match(e);return A&&1===A[0].length&&(A=A.map((function(t){return t+t}))),A?"rgb(".concat(A.map((function(t){return parseInt(t,16)})).join(", "),")"):""}(t));var e=t.indexOf("("),A=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla"].indexOf(A))throw new Error(["Material-UI: unsupported `".concat(t,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var n=t.substring(e+1,t.length-1).split(",");return{type:A,values:n=n.map((function(t){return parseFloat(t)}))}}function i(t){var e=t.type,A=t.values;return-1!==e.indexOf("rgb")?A=A.map((function(t,e){return e<3?parseInt(t,10):t})):-1!==e.indexOf("hsl")&&(A[1]="".concat(A[1],"%"),A[2]="".concat(A[2],"%")),"".concat(e,"(").concat(A.join(", "),")")}function o(t,e){var A=a(t),n=a(e);return(Math.max(A,n)+.05)/(Math.min(A,n)+.05)}function a(t){var e="hsl"===(t=r(t)).type?r(function(t){var e=(t=r(t)).values,A=e[0],n=e[1]/100,o=e[2]/100,a=n*Math.min(o,1-o),s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+A/30)%12;return o-a*Math.max(Math.min(e-3,9-e,1),-1)},g="rgb",c=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===t.type&&(g+="a",c.push(e[3])),i({type:g,values:c})}(t)).values:t.values;return e=e.map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function s(t,e){return t=r(t),e=n(e),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),t.values[3]=e,i(t)}function g(t,e){if(t=r(t),e=n(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb"))for(var A=0;A<3;A+=1)t.values[A]*=1-e;return i(t)}function c(t,e){if(t=r(t),e=n(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(var A=0;A<3;A+=1)t.values[A]+=(255-t.values[A])*e;return i(t)}A.d(e,"c",(function(){return o})),A.d(e,"b",(function(){return s})),A.d(e,"a",(function(){return g})),A.d(e,"d",(function(){return c}))},function(t,e,A){"use strict";A.d(e,"g",(function(){return c})),A.d(e,"b",(function(){return I})),A.d(e,"d",(function(){return u})),A.d(e,"e",(function(){return l})),A.d(e,"a",(function(){return C})),A.d(e,"c",(function(){return h})),A.d(e,"i",(function(){return B})),A.d(e,"j",(function(){return f})),A.d(e,"k",(function(){return d})),A.d(e,"h",(function(){return Q})),A.d(e,"m",(function(){return E})),A.d(e,"o",(function(){return p})),A.d(e,"n",(function(){return y})),A.d(e,"l",(function(){return v})),A.d(e,"f",(function(){return m}));var n=A(21),r=A(13),i=A(0),o=A.n(i),a=A(40),s=A(101),g=A(206);function c(t,e,A,n){return{coordinateSystem:a.a.CARTESIAN,data:t,pickable:!0,autoHighlight:!0,stroked:!0,filled:!0,getElevation:0,onHover:function(t){if(n&&n(),t.object){var i=Object(r.a)(t.object,2),o=i[0],a=i[1].factors;e&&e((s=void 0===a?{}:a,Object.entries(s).map((function(t){var e=Object(r.a)(t,2),A=e[0],n=e[1];return"".concat(A,": ").concat(n)})).join("; "))),A&&A(o)}else A&&A("");var s}}}var I=[128,128,128],u=[[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]],l=[[0,0,255],[0,255,0],[255,0,255],[255,255,0],[0,255,255],[255,255,255],[255,128,0],[255,0,0]],C=["viridis","greys","magma","jet","hot","bone","copper","summer","density","inferno"],h={webgl2:!0};function B(t){return function(e){return console.warn("".concat(t," updateCellsHover: ").concat(e.cellId))}}function f(t){return function(e){return console.warn("".concat(t," updateGenesHover: ").concat(e.geneId))}}function d(t){return function(e){return console.warn("".concat(t," updateViewInfo: ").concat(e))}}function Q(t){var e=new ArrayBuffer(t.buffer.byteLength),A=new Uint8Array(e);return A.set(t),A}function E(t,e){var A=1;if(t)for(;t.find((function(t){return t.name==="".concat(e).concat(A)}));)A++;return"".concat(e).concat(A)}function p(t,e,A,r,i,o,a){var g=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"Selection ",c="My Selections",I=null===e||void 0===e?void 0:e.tree.find((function(t){return t.name===c})),l={version:s.c[s.h].latestVersion,datatype:s.h,tree:Object(n.a)(e?e.tree:[])},C=E(null===I||void 0===I?void 0:I.children,g),h=0;I?(h=I.children.length,I.children.push({name:C,set:t.map((function(t){return[t,null]}))})):l.tree.push({name:c,children:[{name:C,set:t.map((function(t){return[t,null]}))}]}),i(l);var B=["My Selections",C];o([].concat(Object(n.a)(A||[]),[{path:B,color:u[h%u.length]}])),r([B]),a("cellSetSelection")}function y(t,e){return{version:s.c[s.h].latestVersion,datatype:s.h,tree:[].concat(Object(n.a)(t?t.tree:[]),Object(n.a)(e?e.tree:[]))}}function v(t){return function(){var e=t.title,A=t.message;return o.a.createElement("div",{className:g.b},o.a.createElement("h1",null,e),o.a.createElement("div",null,A))}}function m(t){return{__esModule:!0,default:t}}},function(t,e,A){"use strict";function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}A.d(e,"a",(function(){return n}))},function(t,e,A){var n=A(549);t.exports=function(t,e){return n(t,e)}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(0),r="undefined"!==typeof window?n.useLayoutEffect:n.useEffect;function i(t){var e=n.useRef(t);return r((function(){e.current=t})),n.useCallback((function(){return e.current.apply(void 0,arguments)}),[])}},function(t,e,A){"use strict";A.d(e,"e",(function(){return Ct})),A.d(e,"b",(function(){return ht})),A.d(e,"d",(function(){return lt})),A.d(e,"f",(function(){return l})),A.d(e,"c",(function(){return I})),A.d(e,"a",(function(){return W}));var n=A(10),r=A(174),i=(A(238),A(4)),o=A(196),a=A(56),s=A(173),g={}.constructor;function c(t){if(null==t||"object"!==typeof t)return t;if(Array.isArray(t))return t.map(c);if(t.constructor!==g)return t;var e={};for(var A in t)e[A]=c(t[A]);return e}function I(t,e,A){void 0===t&&(t="unnamed");var n=A.jss,r=c(e),i=n.plugins.onCreateRule(t,r,A);return i||(t[0],null)}var u=function(t,e){for(var A="",n=0;n<t.length&&"!important"!==t[n];n++)A&&(A+=e),A+=t[n];return A};function l(t,e){if(void 0===e&&(e=!1),!Array.isArray(t))return t;var A="";if(Array.isArray(t[0]))for(var n=0;n<t.length&&"!important"!==t[n];n++)A&&(A+=", "),A+=u(t[n]," ");else A=u(t,", ");return e||"!important"!==t[t.length-1]||(A+=" !important"),A}function C(t,e){for(var A="",n=0;n<e;n++)A+="  ";return A+t}function h(t,e,A){void 0===A&&(A={});var n="";if(!e)return n;var r=A.indent,i=void 0===r?0:r,o=e.fallbacks;if(t&&i++,o)if(Array.isArray(o))for(var a=0;a<o.length;a++){var s=o[a];for(var g in s){var c=s[g];null!=c&&(n&&(n+="\n"),n+=""+C(g+": "+l(c)+";",i))}}else for(var I in o){var u=o[I];null!=u&&(n&&(n+="\n"),n+=""+C(I+": "+l(u)+";",i))}for(var h in e){var B=e[h];null!=B&&"fallbacks"!==h&&(n&&(n+="\n"),n+=""+C(h+": "+l(B)+";",i))}return(n||A.allowEmpty)&&t?(n&&(n="\n"+n+"\n"),C(t+" {"+n,--i)+C("}",i)):n}var B=/([[\].#*$><+~=|^:(),"'`\s])/g,f="undefined"!==typeof CSS&&CSS.escape,d=function(t){return f?f(t):t.replace(B,"\\$1")},Q=function(){function t(t,e,A){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 n=A.sheet,r=A.Renderer;this.key=t,this.options=A,this.style=e,n?this.renderer=n.renderer:r&&(this.renderer=new r)}return t.prototype.prop=function(t,e,A){if(void 0===e)return this.style[t];var n=!!A&&A.force;if(!n&&this.style[t]===e)return this;var r=e;A&&!1===A.process||(r=this.options.jss.plugins.onChangeValue(e,t,this));var i=null==r||!1===r,o=t in this.style;if(i&&!o&&!n)return this;var a=i&&o;if(a?delete this.style[t]:this.style[t]=r,this.renderable&&this.renderer)return a?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,r),this;var s=this.options.sheet;return s&&s.attached,this},t}(),E=function(t){function e(e,A,n){var r;(r=t.call(this,e,A,n)||this).selectorText=void 0,r.id=void 0,r.renderable=void 0;var i=n.selector,o=n.scoped,s=n.sheet,g=n.generateId;return i?r.selectorText=i:!1!==o&&(r.id=g(Object(a.a)(Object(a.a)(r)),s),r.selectorText="."+d(r.id)),r}Object(o.a)(e,t);var A=e.prototype;return A.applyTo=function(t){var e=this.renderer;if(e){var A=this.toJSON();for(var n in A)e.setProperty(t,n,A[n])}return this},A.toJSON=function(){var t={};for(var e in this.style){var A=this.style[e];"object"!==typeof A?t[e]=A:Array.isArray(A)&&(t[e]=l(A))}return t},A.toString=function(t){var e=this.options.sheet,A=!!e&&e.options.link?Object(n.a)({},t,{allowEmpty:!0}):t;return h(this.selectorText,this.style,A)},Object(i.a)(e,[{key:"selector",set:function(t){if(t!==this.selectorText){this.selectorText=t;var e=this.renderer,A=this.renderable;if(A&&e)e.setSelector(A,t)||e.replaceRule(A,this)}},get:function(){return this.selectorText}}]),e}(Q),p={onCreateRule:function(t,e,A){return"@"===t[0]||A.parent&&"keyframes"===A.parent.type?null:new E(t,e,A)}},y={indent:1,children:!0},v=/@([\w-]+)/,m=function(){function t(t,e,A){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=t,this.query=A.name;var r=t.match(v);for(var i in this.at=r?r[1]:"unknown",this.options=A,this.rules=new W(Object(n.a)({},A,{parent:this})),e)this.rules.add(i,e[i]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.indexOf=function(t){return this.rules.indexOf(t)},e.addRule=function(t,e,A){var n=this.rules.add(t,e,A);return n?(this.options.jss.plugins.onProcessRule(n),n):null},e.toString=function(t){if(void 0===t&&(t=y),null==t.indent&&(t.indent=y.indent),null==t.children&&(t.children=y.children),!1===t.children)return this.query+" {}";var e=this.rules.toString(t);return e?this.query+" {\n"+e+"\n}":""},t}(),b=/@media|@supports\s+/,F={onCreateRule:function(t,e,A){return b.test(t)?new m(t,e,A):null}},w={indent:1,children:!0},S=/@keyframes\s+([\w-]+)/,D=function(){function t(t,e,A){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 r=t.match(S);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=A;var i=A.scoped,o=A.sheet,a=A.generateId;for(var s in this.id=!1===i?this.name:d(a(this,o)),this.rules=new W(Object(n.a)({},A,{parent:this})),e)this.rules.add(s,e[s],Object(n.a)({},A,{parent:this}));this.rules.process()}return t.prototype.toString=function(t){if(void 0===t&&(t=w),null==t.indent&&(t.indent=w.indent),null==t.children&&(t.children=w.children),!1===t.children)return this.at+" "+this.id+" {}";var e=this.rules.toString(t);return e&&(e="\n"+e+"\n"),this.at+" "+this.id+" {"+e+"}"},t}(),R=/@keyframes\s+/,U=/\$([\w-]+)/g,G=function(t,e){return"string"===typeof t?t.replace(U,(function(t,A){return A in e?e[A]:t})):t},N=function(t,e,A){var n=t[e],r=G(n,A);r!==n&&(t[e]=r)},k={onCreateRule:function(t,e,A){return"string"===typeof t&&R.test(t)?new D(t,e,A):null},onProcessStyle:function(t,e,A){return"style"===e.type&&A?("animation-name"in t&&N(t,"animation-name",A.keyframes),"animation"in t&&N(t,"animation",A.keyframes),t):t},onChangeValue:function(t,e,A){var n=A.options.sheet;if(!n)return t;switch(e){case"animation":case"animation-name":return G(t,n.keyframes);default:return t}}},x=function(t){function e(){for(var e,A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).renderable=void 0,e}return Object(o.a)(e,t),e.prototype.toString=function(t){var e=this.options.sheet,A=!!e&&e.options.link?Object(n.a)({},t,{allowEmpty:!0}):t;return h(this.key,this.style,A)},e}(Q),O={onCreateRule:function(t,e,A){return A.parent&&"keyframes"===A.parent.type?new x(t,e,A):null}},M=function(){function t(t,e,A){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=t,this.style=e,this.options=A}return t.prototype.toString=function(t){if(Array.isArray(this.style)){for(var e="",A=0;A<this.style.length;A++)e+=h(this.at,this.style[A]),this.style[A+1]&&(e+="\n");return e}return h(this.at,this.style,t)},t}(),L=/@font-face/,_={onCreateRule:function(t,e,A){return L.test(t)?new M(t,e,A):null}},J=function(){function t(t,e,A){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=t,this.style=e,this.options=A}return t.prototype.toString=function(t){return h(this.key,this.style,t)},t}(),T={onCreateRule:function(t,e,A){return"@viewport"===t||"@-ms-viewport"===t?new J(t,e,A):null}},j=function(){function t(t,e,A){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=t,this.value=e,this.options=A}return t.prototype.toString=function(t){if(Array.isArray(this.value)){for(var e="",A=0;A<this.value.length;A++)e+=this.key+" "+this.value[A]+";",this.value[A+1]&&(e+="\n");return e}return this.key+" "+this.value+";"},t}(),H={"@charset":!0,"@import":!0,"@namespace":!0},Y=[p,F,k,O,_,T,{onCreateRule:function(t,e,A){return t in H?new j(t,e,A):null}}],V={process:!0},Z={force:!0,process:!0},W=function(){function t(t){this.map={},this.raw={},this.index=[],this.counter=0,this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=t,this.classes=t.classes,this.keyframes=t.keyframes}var e=t.prototype;return e.add=function(t,e,A){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,g=r.generateId,c=r.scoped,u=Object(n.a)({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:g,scoped:c,name:t},A),l=t;t in this.raw&&(l=t+"-d"+this.counter++),this.raw[l]=e,l in this.classes&&(u.selector="."+d(this.classes[l]));var C=I(l,e,u);if(!C)return null;this.register(C);var h=void 0===u.index?this.index.length:u.index;return this.index.splice(h,0,C),C},e.get=function(t){return this.map[t]},e.remove=function(t){this.unregister(t),delete this.raw[t.key],this.index.splice(this.index.indexOf(t),1)},e.indexOf=function(t){return this.index.indexOf(t)},e.process=function(){var t=this.options.jss.plugins;this.index.slice(0).forEach(t.onProcessRule,t)},e.register=function(t){this.map[t.key]=t,t instanceof E?(this.map[t.selector]=t,t.id&&(this.classes[t.key]=t.id)):t instanceof D&&this.keyframes&&(this.keyframes[t.name]=t.id)},e.unregister=function(t){delete this.map[t.key],t instanceof E?(delete this.map[t.selector],delete this.classes[t.key]):t instanceof D&&delete this.keyframes[t.name]},e.update=function(){var t,e,A;if("string"===typeof(arguments.length<=0?void 0:arguments[0])?(t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],A=arguments.length<=2?void 0:arguments[2]):(e=arguments.length<=0?void 0:arguments[0],A=arguments.length<=1?void 0:arguments[1],t=null),t)this.updateOne(this.map[t],e,A);else for(var n=0;n<this.index.length;n++)this.updateOne(this.index[n],e,A)},e.updateOne=function(e,A,n){void 0===n&&(n=V);var r=this.options,i=r.jss.plugins,o=r.sheet;if(e.rules instanceof t)e.rules.update(A,n);else{var a=e,s=a.style;if(i.onUpdate(A,e,o,n),n.process&&s&&s!==a.style){for(var g in i.onProcessStyle(a.style,a,o),a.style){var c=a.style[g];c!==s[g]&&a.prop(g,c,Z)}for(var I in s){var u=a.style[I],l=s[I];null==u&&u!==l&&a.prop(I,null,Z)}}}},e.toString=function(t){for(var e="",A=this.options.sheet,n=!!A&&A.options.link,r=0;r<this.index.length;r++){var i=this.index[r].toString(t);(i||n)&&(e&&(e+="\n"),e+=i)}return e},t}(),K=function(){function t(t,e){for(var A 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(n.a)({},e,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),e.Renderer&&(this.renderer=new e.Renderer(this)),this.rules=new W(this.options),t)this.rules.add(A,t[A]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(t,e,A){var n=this.queue;this.attached&&!n&&(this.queue=[]);var r=this.rules.add(t,e,A);return r?(this.options.jss.plugins.onProcessRule(r),this.attached?this.deployed?(n?n.push(r):(this.insertRule(r),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),r):r:(this.deployed=!1,r)):null},e.insertRule=function(t){this.renderer&&this.renderer.insertRule(t)},e.addRules=function(t,e){var A=[];for(var n in t){var r=this.addRule(n,t[n],e);r&&A.push(r)}return A},e.getRule=function(t){return this.rules.get(t)},e.deleteRule=function(t){var e="object"===typeof t?t:this.rules.get(t);return!!e&&(this.rules.remove(e),!(this.attached&&e.renderable&&this.renderer)||this.renderer.deleteRule(e.renderable))},e.indexOf=function(t){return this.rules.indexOf(t)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var t;return(t=this.rules).update.apply(t,arguments),this},e.updateOne=function(t,e,A){return this.rules.updateOne(t,e,A),this},e.toString=function(t){return this.rules.toString(t)},t}(),P=function(){function t(){this.plugins={internal:[],external:[]},this.registry=void 0}var e=t.prototype;return e.onCreateRule=function(t,e,A){for(var n=0;n<this.registry.onCreateRule.length;n++){var r=this.registry.onCreateRule[n](t,e,A);if(r)return r}return null},e.onProcessRule=function(t){if(!t.isProcessed){for(var e=t.options.sheet,A=0;A<this.registry.onProcessRule.length;A++)this.registry.onProcessRule[A](t,e);t.style&&this.onProcessStyle(t.style,t,e),t.isProcessed=!0}},e.onProcessStyle=function(t,e,A){for(var n=0;n<this.registry.onProcessStyle.length;n++)e.style=this.registry.onProcessStyle[n](e.style,e,A)},e.onProcessSheet=function(t){for(var e=0;e<this.registry.onProcessSheet.length;e++)this.registry.onProcessSheet[e](t)},e.onUpdate=function(t,e,A,n){for(var r=0;r<this.registry.onUpdate.length;r++)this.registry.onUpdate[r](t,e,A,n)},e.onChangeValue=function(t,e,A){for(var n=t,r=0;r<this.registry.onChangeValue.length;r++)n=this.registry.onChangeValue[r](n,e,A);return n},e.use=function(t,e){void 0===e&&(e={queue:"external"});var A=this.plugins[e.queue];-1===A.indexOf(t)&&(A.push(t),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(t,e){for(var A in e)A in t&&t[A].push(e[A]);return t}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),q=new(function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(t){var e=this.registry,A=t.options.index;if(-1===e.indexOf(t))if(0===e.length||A>=this.index)e.push(t);else for(var n=0;n<e.length;n++)if(e[n].options.index>A)return void e.splice(n,0,t)},e.reset=function(){this.registry=[]},e.remove=function(t){var e=this.registry.indexOf(t);this.registry.splice(e,1)},e.toString=function(t){for(var e=void 0===t?{}:t,A=e.attached,n=Object(s.a)(e,["attached"]),r="",i=0;i<this.registry.length;i++){var o=this.registry[i];null!=A&&o.attached!==A||(r&&(r+="\n"),r+=o.toString(n))}return r},Object(i.a)(t,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),t}()),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]++,tt=function(t){void 0===t&&(t={});var e=0;return function(A,n){e+=1;var r="",i="";return n&&(n.options.classNamePrefix&&(i=n.options.classNamePrefix),null!=n.options.jss.id&&(r=String(n.options.jss.id))),t.minify?""+(i||"c")+$+r+e:i+A.key+"-"+$+(r?"-"+r:"")+"-"+e}},et=function(t){var e;return function(){return e||(e=t()),e}};function At(t,e){try{return t.attributeStyleMap?t.attributeStyleMap.get(e):t.style.getPropertyValue(e)}catch(A){return""}}function nt(t,e,A){try{var n=A;if(Array.isArray(A)&&(n=l(A,!0),"!important"===A[A.length-1]))return t.style.setProperty(e,n,"important"),!0;t.attributeStyleMap?t.attributeStyleMap.set(e,n):t.style.setProperty(e,n)}catch(r){return!1}return!0}function rt(t,e){try{t.attributeStyleMap?t.attributeStyleMap.delete(e):t.style.removeProperty(e)}catch(A){}}function it(t,e){return t.selectorText=e,t.selectorText===e}var ot=et((function(){return document.querySelector("head")}));function at(t){var e=q.registry;if(e.length>0){var A=function(t,e){for(var A=0;A<t.length;A++){var n=t[A];if(n.attached&&n.options.index>e.index&&n.options.insertionPoint===e.insertionPoint)return n}return null}(e,t);if(A&&A.renderer)return{parent:A.renderer.element.parentNode,node:A.renderer.element};if((A=function(t,e){for(var A=t.length-1;A>=0;A--){var n=t[A];if(n.attached&&n.options.insertionPoint===e.insertionPoint)return n}return null}(e,t))&&A.renderer)return{parent:A.renderer.element.parentNode,node:A.renderer.element.nextSibling}}var n=t.insertionPoint;if(n&&"string"===typeof n){var r=function(t){for(var e=ot(),A=0;A<e.childNodes.length;A++){var n=e.childNodes[A];if(8===n.nodeType&&n.nodeValue.trim()===t)return n}return null}(n);if(r)return{parent:r.parentNode,node:r.nextSibling}}return!1}var st=et((function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null})),gt=function(t,e,A){var n=t.cssRules.length;(void 0===A||A>n)&&(A=n);try{if("insertRule"in t)t.insertRule(e,A);else if("appendRule"in t){t.appendRule(e)}}catch(r){return!1}return t.cssRules[A]},ct=function(){function t(t){this.getPropertyValue=At,this.setProperty=nt,this.removeProperty=rt,this.setSelector=it,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,t&&q.add(t),this.sheet=t;var e=this.sheet?this.sheet.options:{},A=e.media,n=e.meta,r=e.element;this.element=r||function(){var t=document.createElement("style");return t.textContent="\n",t}(),this.element.setAttribute("data-jss",""),A&&this.element.setAttribute("media",A),n&&this.element.setAttribute("data-meta",n);var i=st();i&&this.element.setAttribute("nonce",i)}var e=t.prototype;return e.attach=function(){if(!this.element.parentNode&&this.sheet){!function(t,e){var A=e.insertionPoint,n=at(e);if(!1!==n&&n.parent)n.parent.insertBefore(t,n.node);else if(A&&"number"===typeof A.nodeType){var r=A,i=r.parentNode;i&&i.insertBefore(t,r.nextSibling)}else ot().appendChild(t)}(this.element,this.sheet.options);var t=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&t&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){var t=this.element.parentNode;t&&t.removeChild(this.element)},e.deploy=function(){var t=this.sheet;t&&(t.options.link?this.insertRules(t.rules):this.element.textContent="\n"+t.toString()+"\n")},e.insertRules=function(t,e){for(var A=0;A<t.index.length;A++)this.insertRule(t.index[A],A,e)},e.insertRule=function(t,e,A){if(void 0===A&&(A=this.element.sheet),t.rules){var n=t,r=A;return("conditional"!==t.type&&"keyframes"!==t.type||!1!==(r=gt(A,n.toString({children:!1}),e)))&&(this.insertRules(n.rules,r),r)}if(t.renderable&&t.renderable.parentStyleSheet===this.element.sheet)return t.renderable;var i=t.toString();if(!i)return!1;var o=gt(A,i,e);return!1!==o&&(this.hasInsertedRules=!0,t.renderable=o,o)},e.deleteRule=function(t){var e=this.element.sheet,A=this.indexOf(t);return-1!==A&&(e.deleteRule(A),!0)},e.indexOf=function(t){for(var e=this.element.sheet.cssRules,A=0;A<e.length;A++)if(t===e[A])return A;return-1},e.replaceRule=function(t,e){var A=this.indexOf(t);return-1!==A&&(this.element.sheet.deleteRule(A),this.insertRule(e,A))},e.getRules=function(){return this.element.sheet.cssRules},t}(),It=0,ut=function(){function t(t){this.id=It++,this.version="10.1.1",this.plugins=new P,this.options={id:{minify:!1},createGenerateId:tt,Renderer:r.a?ct:null,plugins:[]},this.generateId=tt({minify:!1});for(var e=0;e<Y.length;e++)this.plugins.use(Y[e],{queue:"internal"});this.setup(t)}var e=t.prototype;return e.setup=function(t){return void 0===t&&(t={}),t.createGenerateId&&(this.options.createGenerateId=t.createGenerateId),t.id&&(this.options.id=Object(n.a)({},this.options.id,t.id)),(t.createGenerateId||t.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=t.insertionPoint&&(this.options.insertionPoint=t.insertionPoint),"Renderer"in t&&(this.options.Renderer=t.Renderer),t.plugins&&this.use.apply(this,t.plugins),this},e.createStyleSheet=function(t,e){void 0===e&&(e={});var A=e.index;"number"!==typeof A&&(A=0===q.index?0:q.index+1);var r=new K(t,Object(n.a)({},e,{jss:this,generateId:e.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:A}));return this.plugins.onProcessSheet(r),r},e.removeStyleSheet=function(t){return t.detach(),q.remove(t),this},e.createRule=function(t,e,A){if(void 0===e&&(e={}),void 0===A&&(A={}),"object"===typeof t)return this.createRule(void 0,t,e);var r=Object(n.a)({},A,{name:t,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=I(t,e,r);return i&&this.plugins.onProcessRule(i),i},e.use=function(){for(var t=this,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return A.forEach((function(e){t.plugins.use(e)})),this},t}();function lt(t){var e=null;for(var A in t){var n=t[A],r=typeof n;if("function"===r)e||(e={}),e[A]=n;else if("object"===r&&null!==n&&!Array.isArray(n)){var i=lt(n);i&&(e||(e={}),e[A]=i)}}return e}var Ct="undefined"!==typeof CSS&&CSS&&"number"in CSS,ht=function(t){return new ut(t)};ht()},function(t,e,A){"use strict";var n=A(71);function r(t,e,A){return(r="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(n.a)(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(A):i.value}})(t,e,A||t)}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";var n={};function r(t){var e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}A.r(n),A.d(n,"dirname",(function(){return r})),A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(5),r=A(4),i=A(19),o=A(274),a=A(185),s=A(211),g=A(49),c=A(738);function I(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return u(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return u(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var l="Resource subclass must define virtual methods",C=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,t),Object(i.b)(e);var r=A.id,o=A.userData,a=void 0===o?{}:o;this.gl=e,this.gl2=e,this.id=r||Object(s.c)(this.constructor.name),this.userData=a,this._bound=!1,this._handle=A.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._addStats()}return Object(r.a)(t,[{key:"toString",value:function(){return"".concat(this.constructor.name,"(").concat(this.id,")")}},{key:"delete",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.deleteChildren,A=void 0!==e&&e,n=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,n&&A&&n.filter(Boolean).forEach((function(t){return t.delete()})),this}},{key:"bind",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.handle;return"function"!==typeof e?(this._bindHandle(e),this):(this._bound?t=e():(this._bindHandle(this.handle),this._bound=!0,t=e(),this._bound=!1,this._bindHandle(null)),t)}},{key:"unbind",value:function(){this.bind(null)}},{key:"getParameter",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object(a.b)(this.gl,t),Object(g.a)(t);var A=this.constructor.PARAMETERS||{},n=A[t];if(n){var r=Object(i.j)(this.gl),o=(!("webgl2"in n)||r)&&(!("extension"in n)||this.gl.getExtension(n.extension));if(!o){var s=n.webgl1,c="webgl2"in n?n.webgl2:n.webgl1,I=r?c:s;return I}}return this._getParameter(t,e)}},{key:"getParameters",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.parameters,n=e.keys,r=this.constructor.PARAMETERS||{},o=Object(i.j)(this.gl),s={},g=A||Object.keys(r),c=I(g);try{for(c.s();!(t=c.n()).done;){var u=t.value,l=r[u],C=l&&(!("webgl2"in l)||o)&&(!("extension"in l)||this.gl.getExtension(l.extension));if(C){var h=n?Object(a.a)(this.gl,u):u;s[h]=this.getParameter(u,e),n&&"GLenum"===l.type&&(s[h]=Object(a.a)(this.gl,s[h]))}}}catch(B){c.e(B)}finally{c.f()}return s}},{key:"setParameter",value:function(t,e){t=Object(a.b)(this.gl,t),Object(g.a)(t);var A=(this.constructor.PARAMETERS||{})[t];if(A){var n=Object(i.j)(this.gl);if(!((!("webgl2"in A)||n)&&(!("extension"in A)||this.gl.getExtension(A.extension))))throw new Error("Parameter not available on this platform");"GLenum"===A.type&&(e=Object(a.b)(e))}return this._setParameter(t,e),this}},{key:"setParameters",value:function(t){for(var e in t)this.setParameter(e,t[e]);return this}},{key:"stubRemovedMethods",value:function(t,e,A){return Object(c.a)(this,t,e,A)}},{key:"initialize",value:function(t){}},{key:"_createHandle",value:function(){throw new Error(l)}},{key:"_deleteHandle",value:function(){throw new Error(l)}},{key:"_bindHandle",value:function(t){throw new Error(l)}},{key:"_getOptsFromHandle",value:function(){throw new Error(l)}},{key:"_getParameter",value:function(t,e){throw new Error(l)}},{key:"_setParameter",value:function(t,e){throw new Error(l)}},{key:"_context",value:function(){return this.gl.luma=this.gl.luma||{},this.gl.luma}},{key:"_addStats",value:function(){var t=this.constructor.name,e=o.a.get("Resource Counts");e.get("Resources Created").incrementCount(),e.get("".concat(t,"s Created")).incrementCount(),e.get("".concat(t,"s Active")).incrementCount()}},{key:"_removeStats",value:function(){var t=this.constructor.name;o.a.get("Resource Counts").get("".concat(t,"s Active")).decrementCount()}},{key:"_trackAllocatedMemory",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.constructor.name,A=o.a.get("Memory Usage");A.get("GPU Memory").addCount(t),A.get("".concat(e," Memory")).addCount(t),this.byteLength=t}},{key:"_trackDeallocatedMemory",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.constructor.name,e=o.a.get("Memory Usage");e.get("GPU Memory").subtractCount(this.byteLength),e.get("".concat(t," Memory")).subtractCount(this.byteLength),this.byteLength=0}},{key:"handle",get:function(){return this._handle}}]),t}()},function(t,e,A){"use strict";var n=A(318);function r(t){var e,A;function r(e,A){try{var o=t[e](A),a=o.value,s=a instanceof n.a;Promise.resolve(s?a.wrapped:a).then((function(t){s?r("return"===e?"return":"next",t):i(o.done?"return":"normal",t)}),(function(t){r("throw",t)}))}catch(g){i("throw",g)}}function i(t,n){switch(t){case"return":e.resolve({value:n,done:!0});break;case"throw":e.reject(n);break;default:e.resolve({value:n,done:!1})}(e=e.next)?r(e.key,e.arg):A=null}this._invoke=function(t,n){return new Promise((function(i,o){var a={key:t,arg:n,resolve:i,reject:o,next:null};A?A=A.next=a:(e=A=a,r(t,n))}))},"function"!==typeof t.return&&(this.return=void 0)}function i(t){return function(){return new r(t.apply(this,arguments))}}"function"===typeof Symbol&&Symbol.asyncIterator&&(r.prototype[Symbol.asyncIterator]=function(){return this}),r.prototype.next=function(t){return this._invoke("next",t)},r.prototype.throw=function(t){return this._invoke("throw",t)},r.prototype.return=function(t){return this._invoke("return",t)},A.d(e,"a",(function(){return i}))},,function(t,e,A){"use strict";function n(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e,A){return e&&n(t.prototype,e),A&&n(t,A),t}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";(function(t){var n=A(46),r=A(491);A.d(e,"b",(function(){return r.a}));var i=A(501);A.d(e,"a",(function(){return i.a})),A.d(e,"c",(function(){return n.g}));var o={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t};(o.global||o.self||o.window).mathgl={config:n.b}}).call(this,A(58))},function(t,e,A){"use strict";A.d(e,"a",(function(){return i})),A.d(e,"e",(function(){return o})),A.d(e,"c",(function(){return a})),A.d(e,"d",(function(){return s})),A.d(e,"b",(function(){return u})),A.d(e,"f",(function(){return l}));var n=A(139),r=A(39);function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t,e){var A=t%e;return A<0?e+A:A}function a(t){return[t[12],t[13],t[14]]}function s(t){var e={};return e.left=I(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]),e.right=I(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]),e.bottom=I(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]),e.top=I(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]),e.near=I(t[3]+t[2],t[7]+t[6],t[11]+t[10],t[15]+t[14]),e.far=I(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14]),e}var g,c=new r.c;function I(t,e,A,n){c.set(t,e,A);var i=c.len();return{distance:n/i,normal:new r.c(-t/i,-e/i,-A/i)}}function u(t){return t-Math.fround(t)}function l(t,e){var A=e.size,r=void 0===A?1:A,i=e.startIndex,o=void 0===i?0:i,a=e.endIndex;Number.isFinite(a)||(a=t.length);var s=(a-o)/r;g=n.a.allocate(g,s,{type:Float32Array,size:2*r});for(var c=o,I=0;c<a;){for(var l=0;l<r;l++){var C=t[c++];g[I+l]=C,g[I+l+r]=u(C)}I+=2*r}return g.subarray(0,s*r*2)}},function(t,e,A){"use strict";function n(t){return t&&t.ownerDocument||document}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return i})),A.d(e,"d",(function(){return o})),A.d(e,"b",(function(){return a})),A.d(e,"e",(function(){return s})),A.d(e,"g",(function(){return g})),A.d(e,"f",(function(){return c})),A.d(e,"h",(function(){return I})),A.d(e,"c",(function(){return u})),A.d(e,"i",(function(){return l}));var n=A(419),r=A(565),i="json",o="application/json",a="csv",s="text/csv",g=",",c="NA",I="cell",u={cell:{latestVersion:"0.1.3",schema:n}},l={cell:{schema:r}}},function(t,e,A){"use strict";function n(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e,A){return e&&n(t.prototype,e),A&&n(t,A),t}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";function n(t){var e=t.source,A=t.target,n=t.start,r=void 0===n?0:n,i=t.end,o=t.size,a=t.getData;i=i||A.length;var s=e.length,g=i-r;if(s>g)A.set(e.subarray(0,g),r);else if(A.set(e,r),a)for(var c=s;c<g;)for(var I=a(c,e),u=0;u<o;u++)A[r+c]=I[u]||0,c++}A.d(e,"e",(function(){return i})),A.d(e,"d",(function(){return o})),A.d(e,"c",(function(){return a})),A.d(e,"a",(function(){return s})),A.d(e,"b",(function(){return g})),A.d(e,"f",(function(){return c}));var r={interpolation:{duration:0,easing:function(t){return t}},spring:{stiffness:.05,damping:.5}};function i(t,e){return t?(Number.isFinite(t)&&(t={duration:t}),t.type=t.type||"interpolation",Object.assign({},r[t.type],e,t)):null}function o(t,e){return e.getBuffer()?[e.getBuffer(),{divisor:0,size:e.size,normalized:e.settings.normalized}]:e.value}function a(t){switch(t){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(t,'"'))}}function s(t){t.push(t.shift())}function g(t,e){var A=t.doublePrecision,n=t.settings,r=t.value,i=t.size,o=A&&r instanceof Float64Array?2:1;return(n.noAlloc?r.length:e*i)*o}function c(t){var e=t.buffer,A=t.numInstances,r=t.attribute,i=t.fromLength,o=t.fromStartIndices,a=t.getData,s=void 0===a?function(t){return t}:a,c=r.doublePrecision&&r.value instanceof Float64Array?2:1,I=r.size*c,u=r.byteOffset,l=r.startIndices,C=o&&l,h=g(r,A),B=r.state.constant;if(C||!(i>=h)){var f=B?r.value:r.getBuffer().getData({srcByteOffset:u});if(r.settings.normalized&&!B){var d=s;s=function(t,e){return r._normalizeConstant(d(t,e))}}var Q=B?function(t,e){return s(f,e)}:function(t,e){return s(f.subarray(t,t+I),e)},E=e.getData({length:i}),p=new Float32Array(h);!function(t){var e=t.source,A=t.target,r=t.size,i=t.getData,o=t.sourceStartIndices,a=t.targetStartIndices;if(!Array.isArray(a))return n({source:e,target:A,size:r,getData:i}),A;for(var s=0,g=0,c=i&&function(t,e){return i(t+g,e)},I=Math.min(o.length,a.length),u=1;u<I;u++){var l=o[u]*r,C=a[u]*r;n({source:e.subarray(s,l),target:A,start:g,end:C,size:r,getData:c}),s=l,g=C}g<A.length&&n({source:[],target:A,start:g,size:r,getData:c})}({source:E,target:p,sourceStartIndices:o,targetStartIndices:l,size:I,getData:Q}),e.byteLength<p.byteLength+u&&e.reallocate(p.byteLength+u),e.subData({data:p,offset:u})}}},function(t,e,A){"use strict";(function(t){var n=A(629),r=A(572),i=A(460);function o(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,A){if(!s.TYPED_ARRAY_SUPPORT&&!(this instanceof s))return new s(t,e,A);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return I(this,t)}return g(this,t,e,A)}function g(t,e,A,n){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,A,n){if(e.byteLength,A<0||e.byteLength<A)throw new RangeError("'offset' is out of bounds");if(e.byteLength<A+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===A&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,A):new Uint8Array(e,A,n);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=u(t,e);return t}(t,e,A,n):"string"===typeof e?function(t,e,A){"string"===typeof A&&""!==A||(A="utf8");if(!s.isEncoding(A))throw new TypeError('"encoding" must be a valid string encoding');var n=0|C(e,A),r=(t=a(t,n)).write(e,A);r!==n&&(t=t.slice(0,r));return t}(t,e,A):function(t,e){if(s.isBuffer(e)){var A=0|l(e.length);return 0===(t=a(t,A)).length||e.copy(t,0,0,A),t}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||(n=e.length)!==n?a(t,0):u(t,e);if("Buffer"===e.type&&i(e.data))return u(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function I(t,e){if(c(e),t=a(t,e<0?0:0|l(e)),!s.TYPED_ARRAY_SUPPORT)for(var A=0;A<e;++A)t[A]=0;return t}function u(t,e){var A=e.length<0?0:0|l(e.length);t=a(t,A);for(var n=0;n<A;n+=1)t[n]=255&e[n];return t}function l(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function C(t,e){if(s.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var A=t.length;if(0===A)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return A;case"utf8":case"utf-8":case void 0:return J(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*A;case"hex":return A>>>1;case"base64":return T(t).length;default:if(n)return J(t).length;e=(""+e).toLowerCase(),n=!0}}function h(t,e,A){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===A||A>this.length)&&(A=this.length),A<=0)return"";if((A>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,A);case"utf8":case"utf-8":return F(this,e,A);case"ascii":return w(this,e,A);case"latin1":case"binary":return S(this,e,A);case"base64":return b(this,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,A);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function B(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function f(t,e,A,n,r){if(0===t.length)return-1;if("string"===typeof A?(n=A,A=0):A>2147483647?A=2147483647:A<-2147483648&&(A=-2147483648),A=+A,isNaN(A)&&(A=r?0:t.length-1),A<0&&(A=t.length+A),A>=t.length){if(r)return-1;A=t.length-1}else if(A<0){if(!r)return-1;A=0}if("string"===typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:d(t,e,A,n,r);if("number"===typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,A):Uint8Array.prototype.lastIndexOf.call(t,e,A):d(t,[e],A,n,r);throw new TypeError("val must be string, number or Buffer")}function d(t,e,A,n,r){var i,o=1,a=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,s/=2,A/=2}function g(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var c=-1;for(i=A;i<a;i++)if(g(t,i)===g(e,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*o}else-1!==c&&(i-=i-c),c=-1}else for(A+s>a&&(A=a-s),i=A;i>=0;i--){for(var I=!0,u=0;u<s;u++)if(g(t,i+u)!==g(e,u)){I=!1;break}if(I)return i}return-1}function Q(t,e,A,n){A=Number(A)||0;var r=t.length-A;n?(n=Number(n))>r&&(n=r):n=r;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[A+o]=a}return o}function E(t,e,A,n){return j(J(e,t.length-A),t,A,n)}function p(t,e,A,n){return j(function(t){for(var e=[],A=0;A<t.length;++A)e.push(255&t.charCodeAt(A));return e}(e),t,A,n)}function y(t,e,A,n){return p(t,e,A,n)}function v(t,e,A,n){return j(T(e),t,A,n)}function m(t,e,A,n){return j(function(t,e){for(var A,n,r,i=[],o=0;o<t.length&&!((e-=2)<0);++o)A=t.charCodeAt(o),n=A>>8,r=A%256,i.push(r),i.push(n);return i}(e,t.length-A),t,A,n)}function b(t,e,A){return 0===e&&A===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,A))}function F(t,e,A){A=Math.min(t.length,A);for(var n=[],r=e;r<A;){var i,o,a,s,g=t[r],c=null,I=g>239?4:g>223?3:g>191?2:1;if(r+I<=A)switch(I){case 1:g<128&&(c=g);break;case 2:128===(192&(i=t[r+1]))&&(s=(31&g)<<6|63&i)>127&&(c=s);break;case 3:i=t[r+1],o=t[r+2],128===(192&i)&&128===(192&o)&&(s=(15&g)<<12|(63&i)<<6|63&o)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[r+1],o=t[r+2],a=t[r+3],128===(192&i)&&128===(192&o)&&128===(192&a)&&(s=(15&g)<<18|(63&i)<<12|(63&o)<<6|63&a)>65535&&s<1114112&&(c=s)}null===c?(c=65533,I=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=I}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var A="",n=0;for(;n<e;)A+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return A}(n)}e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),e.kMaxLength=o(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,A){return g(null,t,e,A)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,A){return function(t,e,A,n){return c(e),e<=0?a(t,e):void 0!==A?"string"===typeof n?a(t,e).fill(A,n):a(t,e).fill(A):a(t,e)}(null,t,e,A)},s.allocUnsafe=function(t){return I(null,t)},s.allocUnsafeSlow=function(t){return I(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var A=t.length,n=e.length,r=0,i=Math.min(A,n);r<i;++r)if(t[r]!==e[r]){A=t[r],n=e[r];break}return A<n?-1:n<A?1:0},s.isEncoding=function(t){switch(String(t).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}},s.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var A;if(void 0===e)for(e=0,A=0;A<t.length;++A)e+=t[A].length;var n=s.allocUnsafe(e),r=0;for(A=0;A<t.length;++A){var o=t[A];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,r),r+=o.length}return n},s.byteLength=C,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)B(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)B(this,e,e+3),B(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)B(this,e,e+7),B(this,e+1,e+6),B(this,e+2,e+5),B(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?F(this,0,t):h.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",A=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,A).match(/.{2}/g).join(" "),this.length>A&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,A,n,r){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===A&&(A=t?t.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),e<0||A>t.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&e>=A)return 0;if(n>=r)return-1;if(e>=A)return 1;if(this===t)return 0;for(var i=(r>>>=0)-(n>>>=0),o=(A>>>=0)-(e>>>=0),a=Math.min(i,o),g=this.slice(n,r),c=t.slice(e,A),I=0;I<a;++I)if(g[I]!==c[I]){i=g[I],o=c[I];break}return i<o?-1:o<i?1:0},s.prototype.includes=function(t,e,A){return-1!==this.indexOf(t,e,A)},s.prototype.indexOf=function(t,e,A){return f(this,t,e,A,!0)},s.prototype.lastIndexOf=function(t,e,A){return f(this,t,e,A,!1)},s.prototype.write=function(t,e,A,n){if(void 0===e)n="utf8",A=this.length,e=0;else if(void 0===A&&"string"===typeof e)n=e,A=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(A)?(A|=0,void 0===n&&(n="utf8")):(n=A,A=void 0)}var r=this.length-e;if((void 0===A||A>r)&&(A=r),t.length>0&&(A<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return Q(this,t,e,A);case"utf8":case"utf-8":return E(this,t,e,A);case"ascii":return p(this,t,e,A);case"latin1":case"binary":return y(this,t,e,A);case"base64":return v(this,t,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,e,A);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(t,e,A){var n="";A=Math.min(t.length,A);for(var r=e;r<A;++r)n+=String.fromCharCode(127&t[r]);return n}function S(t,e,A){var n="";A=Math.min(t.length,A);for(var r=e;r<A;++r)n+=String.fromCharCode(t[r]);return n}function D(t,e,A){var n=t.length;(!e||e<0)&&(e=0),(!A||A<0||A>n)&&(A=n);for(var r="",i=e;i<A;++i)r+=_(t[i]);return r}function R(t,e,A){for(var n=t.slice(e,A),r="",i=0;i<n.length;i+=2)r+=String.fromCharCode(n[i]+256*n[i+1]);return r}function U(t,e,A){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>A)throw new RangeError("Trying to access beyond buffer length")}function G(t,e,A,n,r,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<i)throw new RangeError('"value" argument is out of bounds');if(A+n>t.length)throw new RangeError("Index out of range")}function N(t,e,A,n){e<0&&(e=65535+e+1);for(var r=0,i=Math.min(t.length-A,2);r<i;++r)t[A+r]=(e&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function k(t,e,A,n){e<0&&(e=4294967295+e+1);for(var r=0,i=Math.min(t.length-A,4);r<i;++r)t[A+r]=e>>>8*(n?r:3-r)&255}function x(t,e,A,n,r,i){if(A+n>t.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function O(t,e,A,n,i){return i||x(t,0,A,4),r.write(t,e,A,n,23,4),A+4}function M(t,e,A,n,i){return i||x(t,0,A,8),r.write(t,e,A,n,52,8),A+8}s.prototype.slice=function(t,e){var A,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(A=this.subarray(t,e)).__proto__=s.prototype;else{var r=e-t;A=new s(r,void 0);for(var i=0;i<r;++i)A[i]=this[i+t]}return A},s.prototype.readUIntLE=function(t,e,A){t|=0,e|=0,A||U(t,e,this.length);for(var n=this[t],r=1,i=0;++i<e&&(r*=256);)n+=this[t+i]*r;return n},s.prototype.readUIntBE=function(t,e,A){t|=0,e|=0,A||U(t,e,this.length);for(var n=this[t+--e],r=1;e>0&&(r*=256);)n+=this[t+--e]*r;return n},s.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,A){t|=0,e|=0,A||U(t,e,this.length);for(var n=this[t],r=1,i=0;++i<e&&(r*=256);)n+=this[t+i]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,A){t|=0,e|=0,A||U(t,e,this.length);for(var n=e,r=1,i=this[t+--n];n>0&&(r*=256);)i+=this[t+--n]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var A=this[t]|this[t+1]<<8;return 32768&A?4294901760|A:A},s.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var A=this[t+1]|this[t]<<8;return 32768&A?4294901760|A:A},s.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,A,n){(t=+t,e|=0,A|=0,n)||G(this,t,e,A,Math.pow(2,8*A)-1,0);var r=1,i=0;for(this[e]=255&t;++i<A&&(r*=256);)this[e+i]=t/r&255;return e+A},s.prototype.writeUIntBE=function(t,e,A,n){(t=+t,e|=0,A|=0,n)||G(this,t,e,A,Math.pow(2,8*A)-1,0);var r=A-1,i=1;for(this[e+r]=255&t;--r>=0&&(i*=256);)this[e+r]=t/i&255;return e+A},s.prototype.writeUInt8=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):k(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,A,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*A-1);G(this,t,e,A,r-1,-r)}var i=0,o=1,a=0;for(this[e]=255&t;++i<A&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+A},s.prototype.writeIntBE=function(t,e,A,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*A-1);G(this,t,e,A,r-1,-r)}var i=A-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+A},s.prototype.writeInt8=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):k(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,A){return t=+t,e|=0,A||G(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,A){return O(this,t,e,!0,A)},s.prototype.writeFloatBE=function(t,e,A){return O(this,t,e,!1,A)},s.prototype.writeDoubleLE=function(t,e,A){return M(this,t,e,!0,A)},s.prototype.writeDoubleBE=function(t,e,A){return M(this,t,e,!1,A)},s.prototype.copy=function(t,e,A,n){if(A||(A=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<A&&(n=A),n===A)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(A<0||A>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-A&&(n=t.length-e+A);var r,i=n-A;if(this===t&&A<e&&e<n)for(r=i-1;r>=0;--r)t[r+e]=this[r+A];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(r=0;r<i;++r)t[r+e]=this[r+A];else Uint8Array.prototype.set.call(t,this.subarray(A,A+i),e);return i},s.prototype.fill=function(t,e,A,n){if("string"===typeof t){if("string"===typeof e?(n=e,e=0,A=this.length):"string"===typeof A&&(n=A,A=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<A)throw new RangeError("Out of range index");if(A<=e)return this;var i;if(e>>>=0,A=void 0===A?this.length:A>>>0,t||(t=0),"number"===typeof t)for(i=e;i<A;++i)this[i]=t;else{var o=s.isBuffer(t)?t:J(new s(t,n).toString()),a=o.length;for(i=0;i<A-e;++i)this[i+e]=o[i%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function _(t){return t<16?"0"+t.toString(16):t.toString(16)}function J(t,e){var A;e=e||1/0;for(var n=t.length,r=null,i=[],o=0;o<n;++o){if((A=t.charCodeAt(o))>55295&&A<57344){if(!r){if(A>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&i.push(239,191,189);continue}r=A;continue}if(A<56320){(e-=3)>-1&&i.push(239,191,189),r=A;continue}A=65536+(r-55296<<10|A-56320)}else r&&(e-=3)>-1&&i.push(239,191,189);if(r=null,A<128){if((e-=1)<0)break;i.push(A)}else if(A<2048){if((e-=2)<0)break;i.push(A>>6|192,63&A|128)}else if(A<65536){if((e-=3)<0)break;i.push(A>>12|224,A>>6&63|128,63&A|128)}else{if(!(A<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(A>>18|240,A>>12&63|128,A>>6&63|128,63&A|128)}}return i}function T(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function j(t,e,A,n){for(var r=0;r<n&&!(r+A>=e.length||r>=t.length);++r)e[r+A]=t[r];return r}}).call(this,A(58))},function(t,e,A){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(229);function r(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Object(n.a)(t,e)}},function(t,e,A){"use strict";var n=A(520),r=A.n(n);function i(t,e){return!e||"object"!==r()(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}A.d(e,"a",(function(){return i}))},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(223);function r(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Object(n.a)(t,e)}},function(t,e,A){"use strict";function n(t){var e;if("undefined"!==typeof Symbol){if(Symbol.asyncIterator&&null!=(e=t[Symbol.asyncIterator]))return e.call(t);if(Symbol.iterator&&null!=(e=t[Symbol.iterator]))return e.call(t)}throw new TypeError("Object is not async iterable")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n=A(506),r=A.n(n);function i(t,e){return!e||"object"!==r()(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return B}));var n=A(22),r=A(5),i=A(4),o=A(43),a=A(99),s=A(39),g=A(18),c=A(72),I=A(40),u=Math.PI/180,l=Object(a.a)(),C=[0,0,0],h={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]},B=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,t);var A=e.id,n=void 0===A?null:A,i=e.x,o=void 0===i?0:i,a=e.y,s=void 0===a?0:a,g=e.width,c=void 0===g?1:g,I=e.height,u=void 0===I?1:I;this.id=n||this.constructor.displayName||"viewport",this.x=o,this.y=s,this.width=c||1,this.height=u||1,this._frustumPlanes={},this._initViewMatrix(e),this._initProjectionMatrix(e),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(i.a)(t,[{key:"equals",value:function(e){return e instanceof t&&(this===e||e.width===this.width&&e.height===this.height&&e.scale===this.scale&&Object(s.f)(e.projectionMatrix,this.projectionMatrix)&&Object(s.f)(e.viewMatrix,this.viewMatrix))}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.topLeft,r=void 0===A||A,i=this.projectPosition(t),o=Object(c.n)(i,this.pixelProjectionMatrix),a=Object(n.a)(o,2),s=a[0],g=a[1],I=r?g:this.height-g;return 2===t.length?[s,I]:[s,I,o[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.topLeft,r=void 0===A||A,i=e.targetZ,o=Object(n.a)(t,3),a=o[0],s=o[1],g=o[2],I=r?s:this.height-s,u=i&&i*this.distanceScales.unitsPerMeter[2],l=Object(c.l)([a,I,g],this.pixelUnprojectionMatrix,u),C=this.unprojectPosition(l),h=Object(n.a)(C,3),B=h[0],f=h[1],d=h[2];return Number.isFinite(g)?[B,f,d]:Number.isFinite(i)?[B,f,i]:[B,f]}},{key:"projectPosition",value:function(t){var e=this.projectFlat(t),A=Object(n.a)(e,2);return[A[0],A[1],(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(t){var e=this.unprojectFlat(t),A=Object(n.a)(e,2);return[A[0],A[1],(t[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(t){return this.isGeospatial?Object(c.j)(t):t}},{key:"unprojectFlat",value:function(t){return this.isGeospatial?Object(c.m)(t):t}},{key:"getBounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={targetZ:t.z||0},A=this.unproject([0,0],e),n=this.unproject([this.width,0],e),r=this.unproject([0,this.height],e),i=this.unproject([this.width,this.height],e);return[Math.min(A[0],n[0],r[0],i[0]),Math.min(A[1],n[1],r[1],i[1]),Math.max(A[0],n[0],r[0],i[0]),Math.max(A[1],n[1],r[1],i[1])]}},{key:"getDistanceScales",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?Object(c.e)({longitude:t[0],latitude:t[1],highPrecision:!0}):this.distanceScales}},{key:"containsPixel",value:function(t){var e=t.x,A=t.y,n=t.width,r=void 0===n?1:n,i=t.height,o=void 0===i?1:i;return e<this.x+this.width&&this.x<e+r&&A<this.y+this.height&&this.y<A+o}},{key:"getFrustumPlanes",value:function(){return this._frustumPlanes.near||Object.assign(this._frustumPlanes,Object(a.d)(this.viewProjectionMatrix)),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(t){var e=t.orthographic,A=t.fovyRadians,n=t.aspect,r=t.focalDistance,i=t.near,o=t.far;return e?(new s.a).orthographic({fovy:A,aspect:n,focalDistance:r,near:i,far:o}):(new s.a).perspective({fovy:A,aspect:n,near:i,far:o})}},{key:"_initViewMatrix",value:function(t){var e=t.viewMatrix,A=void 0===e?l:e,n=t.longitude,r=void 0===n?null:n,i=t.latitude,o=void 0===i?null:i,a=t.zoom,g=void 0===a?null:a,I=t.position,u=void 0===I?null:I,B=t.modelMatrix,f=void 0===B?null:B,d=t.focalDistance,Q=void 0===d?1:d,E=t.distanceScales,p=void 0===E?null:E;this.isGeospatial=Number.isFinite(o)&&Number.isFinite(r),this.zoom=g,Number.isFinite(this.zoom)||(this.zoom=this.isGeospatial?Object(c.g)({latitude:o})+Math.log2(Q):0);var y=Math.pow(2,this.zoom);this.scale=y,this.distanceScales=this.isGeospatial?Object(c.e)({latitude:o,longitude:r}):p||h,this.focalDistance=Q,this.distanceScales.metersPerUnit=new s.c(this.distanceScales.metersPerUnit),this.distanceScales.unitsPerMeter=new s.c(this.distanceScales.unitsPerMeter),this.position=C,this.meterOffset=C,u&&(this.position=u,this.modelMatrix=f,this.meterOffset=f?f.transformVector(u):u),this.isGeospatial?(this.longitude=r,this.latitude=o,this.center=this._getCenterInWorld({longitude:r,latitude:o})):this.center=u?this.projectPosition(u):[0,0,0],this.viewMatrixUncentered=A,this.viewMatrix=(new s.a).multiplyRight(this.viewMatrixUncentered).translate(new s.c(this.center||C).negate())}},{key:"_getCenterInWorld",value:function(t){var e=t.longitude,A=t.latitude,n=this.meterOffset,r=this.distanceScales,i=new s.c(this.projectPosition([e,A,0]));if(n){var o=new s.c(n).scale(r.unitsPerMeter);i.add(o)}return i}},{key:"_initProjectionMatrix",value:function(t){var e=t.projectionMatrix,A=void 0===e?null:e,n=t.orthographic,r=void 0!==n&&n,i=t.fovyRadians,o=t.fovy,a=void 0===o?75:o,s=t.near,g=void 0===s?.1:s,c=t.far,I=void 0===c?1e3:c,l=t.focalDistance,C=void 0===l?1:l;this.projectionMatrix=A||this._createProjectionMatrix({orthographic:r,fovyRadians:i||a*u,aspect:this.width/this.height,focalDistance:C,near:g,far:I})}},{key:"_initPixelMatrices",value:function(){var t=Object(a.a)();g.h(t,t,this.projectionMatrix),g.h(t,t,this.viewMatrix),this.viewProjectionMatrix=t,this.viewMatrixInverse=g.f([],this.viewMatrix)||this.viewMatrix,this.cameraPosition=Object(a.c)(this.viewMatrixInverse);var e=Object(a.a)(),A=Object(a.a)();g.o(e,e,[this.width/2,-this.height/2,1]),g.p(e,e,[1,-1,0]),g.h(A,e,this.viewProjectionMatrix),this.pixelProjectionMatrix=A,this.viewportMatrix=e,this.pixelUnprojectionMatrix=g.f(Object(a.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?I.c.WEB_MERCATOR:I.c.WEB_MERCATOR_AUTO_OFFSET:I.c.IDENTITY}}]),t}();B.displayName="Viewport"},function(t,e,A){"use strict";A.d(e,"a",(function(){return a}));var n=A(281),r=A(290),i=A(160),o=A(282);function a(t){return Object(n.a)(t)||Object(r.a)(t)||Object(i.a)(t)||Object(o.a)()}},function(t,e){"function"===typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var A=function(){};A.prototype=e.prototype,t.prototype=new A,t.prototype.constructor=t}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return p}));var n=A(22),r=A(5),i=A(4),o=A(14),a=A(16),s=A(7),g=A(19),c=A(60),I=A(94),u=A(83),l=A(165),C=A(211),h=A(49);function B(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return f(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function d(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var Q=[9729,9728],E=c.global.WebGLBuffer||function(){},p=function(t){Object(o.a)(A,t);var e=d(A);function A(t,n){var i;Object(r.a)(this,A);var o=n.id,a=void 0===o?Object(C.c)("texture"):o,s=n.handle,g=n.target;return(i=e.call(this,t,{id:a,handle:s})).target=g,i.textureUnit=void 0,i.loaded=!1,i.width=void 0,i.height=void 0,i.depth=void 0,i.format=void 0,i.type=void 0,i.dataFormat=void 0,i.border=void 0,i.textureUnit=void 0,i.mipmaps=void 0,i}return Object(i.a)(A,null,[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.format,n=e.linearFiltering,r=!0;return A&&(r=(r=r&&Object(l.d)(t,A))&&(!n||Object(l.e)(t,A))),r}}]),Object(i.a)(A,[{key:"toString",value:function(){return"Texture(".concat(this.id,",").concat(this.width,"x").concat(this.height,")")}},{key:"initialize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.data;if(A instanceof Promise)return A.then((function(A){return t.initialize(Object.assign({},e,{pixels:A,data:A}))})),this;var n="undefined"!==typeof HTMLVideoElement&&A instanceof HTMLVideoElement;if(n&&A.readyState<HTMLVideoElement.HAVE_METADATA)return this._video=null,A.addEventListener("loadeddata",(function(){return t.initialize(e)})),this;var r=e.pixels,i=void 0===r?null:r,o=e.format,a=void 0===o?6408:o,s=e.border,c=void 0===s?0:s,I=e.recreate,u=void 0!==I&&I,l=e.parameters,C=void 0===l?{}:l,h=e.pixelStore,B=void 0===h?{}:h,f=e.textureUnit,d=void 0===f?void 0:f;A||(A=i);var Q=e.width,E=e.height,p=e.dataFormat,y=e.type,v=e.compressed,m=void 0!==v&&v,b=e.mipmaps,F=void 0===b||b,w=e.depth,S=void 0===w?0:w,D=this._deduceParameters({format:a,type:y,dataFormat:p,compressed:m,data:A,width:Q,height:E});return Q=D.width,E=D.height,m=D.compressed,p=D.dataFormat,y=D.type,this.width=Q,this.height=E,this.depth=S,this.format=a,this.type=y,this.dataFormat=p,this.border=c,this.textureUnit=d,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),F&&this._isNPOT()&&(g.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),F=!1,this._updateForNPOT(C)),this.mipmaps=F,this.setImageData({data:A,width:Q,height:E,depth:S,format:a,type:y,dataFormat:p,border:c,mipmaps:F,parameters:B,compressed:m}),F&&this.generateMipmap(),this.setParameters(C),u&&(this.data=A),n&&(this._video={video:A,parameters:C,lastTime:A.readyState>=HTMLVideoElement.HAVE_CURRENT_DATA?A.currentTime:-1}),this}},{key:"update",value:function(){if(this._video){var t=this._video,e=t.video,A=t.parameters;if(t.lastTime===e.currentTime||e.readyState<HTMLVideoElement.HAVE_CURRENT_DATA)return;this.setSubImageData({data:e,parameters:A}),this.mipmaps&&this.generateMipmap(),this._video.lastTime=e.currentTime}}},{key:"resize",value:function(t){var e=t.height,A=t.width,n=t.mipmaps,r=void 0!==n&&n;return A!==this.width||e!==this.height?this.initialize({width:A,height:e,format:this.format,type:this.type,dataFormat:this.dataFormat,border:this.border,mipmaps:r}):this}},{key:"generateMipmap",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isNPOT()?(g.k.warn("texture: ".concat(this," is Non-Power-Of-Two, disabling mipmaping"))(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),Object(g.o)(this.gl,e,(function(){t.gl.generateMipmap(t.target)})),this.gl.bindTexture(this.target,null),this)}},{key:"setImageData",value:function(t){this._trackDeallocatedMemory("Texture");var e=t.target,A=void 0===e?this.target:e,r=t.pixels,i=void 0===r?null:r,o=t.level,a=void 0===o?0:o,s=t.format,c=void 0===s?this.format:s,I=t.border,u=void 0===I?this.border:I,C=t.offset,f=void 0===C?0:C,d=t.parameters,Q=void 0===d?{}:d,E=t.data,p=void 0===E?null:E,y=t.type,v=void 0===y?this.type:y,m=t.width,b=void 0===m?this.width:m,F=t.height,w=void 0===F?this.height:F,S=t.dataFormat,D=void 0===S?this.dataFormat:S,R=t.compressed,U=void 0!==R&&R;p||(p=i);var G=this._deduceParameters({format:c,type:v,dataFormat:D,compressed:U,data:p,width:b,height:w});v=G.type,D=G.dataFormat,U=G.compressed,b=G.width,w=G.height;var N=this.gl;N.bindTexture(this.target,this.handle);var k,x,O=this._getDataType({data:p,compressed:U});if(p=O.data,k=O.dataType,Object(g.o)(this.gl,Q,(function(){switch(k){case"null":N.texImage2D(A,a,c,b,w,u,D,v,p);break;case"typed-array":N.texImage2D(A,a,c,b,w,u,D,v,p,f);break;case"buffer":(x=Object(g.a)(N)).bindBuffer(35052,p.handle||p),x.texImage2D(A,a,c,b,w,u,D,v,f),x.bindBuffer(35052,null);break;case"browser-object":Object(g.j)(N)?N.texImage2D(A,a,c,b,w,u,D,v,p):N.texImage2D(A,a,c,D,v,p);break;case"compressed":var t,e=B(p.entries());try{for(e.s();!(t=e.n()).done;){var r=Object(n.a)(t.value,2),i=r[0],o=r[1];N.compressedTexImage2D(A,i,o.format,o.width,o.height,u,o.data)}}catch(s){e.e(s)}finally{e.f()}break;default:Object(h.a)(!1,"Unknown image data type")}})),p&&p.byteLength)this._trackAllocatedMemory(p.byteLength,"Texture");else{var M=l.a[this.dataFormat]||4,L=l.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*M*L,"Texture")}return this.loaded=!0,this}},{key:"setSubImageData",value:function(t){var e=this,A=t.target,n=void 0===A?this.target:A,r=t.pixels,i=void 0===r?null:r,o=t.data,a=void 0===o?null:o,s=t.x,c=void 0===s?0:s,I=t.y,l=void 0===I?0:I,C=t.width,B=void 0===C?this.width:C,f=t.height,d=void 0===f?this.height:f,Q=t.level,p=void 0===Q?0:Q,y=t.format,v=void 0===y?this.format:y,m=t.type,b=void 0===m?this.type:m,F=t.dataFormat,w=void 0===F?this.dataFormat:F,S=t.compressed,D=void 0!==S&&S,R=t.offset,U=void 0===R?0:R,G=t.border,N=(void 0===G&&this.border,t.parameters),k=void 0===N?{}:N,x=this._deduceParameters({format:v,type:b,dataFormat:w,compressed:D,data:a,width:B,height:d});if(b=x.type,w=x.dataFormat,D=x.compressed,B=x.width,d=x.height,Object(h.a)(0===this.depth,"texSubImage not supported for 3D textures"),a||(a=i),a&&a.data){var O=a;a=O.data,B=O.shape[0],d=O.shape[1]}a instanceof u.a&&(a=a.handle),this.gl.bindTexture(this.target,this.handle),Object(g.o)(this.gl,k,(function(){if(D)e.gl.compressedTexSubImage2D(n,p,c,l,B,d,v,a);else if(null===a)e.gl.texSubImage2D(n,p,c,l,B,d,w,b,null);else if(ArrayBuffer.isView(a))e.gl.texSubImage2D(n,p,c,l,B,d,w,b,a,U);else if(a instanceof E){var t=Object(g.a)(e.gl);t.bindBuffer(35052,a),t.texSubImage2D(n,p,c,l,B,d,w,b,U),t.bindBuffer(35052,null)}else if(Object(g.j)(e.gl)){Object(g.a)(e.gl).texSubImage2D(n,p,c,l,B,d,w,b,a)}else e.gl.texSubImage2D(n,p,c,l,w,b,a)})),this.gl.bindTexture(this.target,null)}},{key:"copyFramebuffer",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return g.k.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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit,e=this.gl;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,this.handle),t}},{key:"unbind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.textureUnit,e=this.gl;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,null),t}},{key:"_getDataType",value:function(t){var e=t.data,A=t.compressed;return void 0!==A&&A?{data:e,dataType:"compressed"}:null===e?{data:e,dataType:"null"}:ArrayBuffer.isView(e)?{data:e,dataType:"typed-array"}:e instanceof u.a?{data:e.handle,dataType:"buffer"}:e instanceof E?{data:e,dataType:"buffer"}:{data:e,dataType:"browser-object"}}},{key:"_deduceParameters",value:function(t){var e=t.format,A=t.data,n=t.width,r=t.height,i=t.dataFormat,o=t.type,a=t.compressed,s=l.b[e];i=i||s&&s.dataFormat,o=o||s&&s.types[0],a=a||s&&s.compressed;var g=this._deduceImageSize(A,n,r);return{dataFormat:i,type:o,compressed:a,width:n=g.width,height:r=g.height,format:e,data:A}}},{key:"_deduceImageSize",value:function(t,e,A){var n;return n="undefined"!==typeof ImageData&&t instanceof ImageData?{width:t.width,height:t.height}:"undefined"!==typeof HTMLImageElement&&t instanceof HTMLImageElement?{width:t.naturalWidth,height:t.naturalHeight}:"undefined"!==typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap?{width:t.width,height:t.height}:"undefined"!==typeof HTMLVideoElement&&t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t?{width:e,height:A}:{width:e>=0?e:1,height:A>=0?A:1},Object(h.a)(n,"Could not deduced texture size"),Object(h.a)(void 0===e||n.width===e,"Deduced texture width does not match supplied width"),Object(h.a)(void 0===A||n.height===A,"Deduced texture height does not match supplied height"),n}},{key:"_createHandle",value:function(){return this.gl.createTexture()}},{key:"_deleteHandle",value:function(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}},{key:"_getParameter",value:function(t){switch(t){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);var e=this.gl.getTexParameter(this.target,t);return this.gl.bindTexture(this.target,null),e}}},{key:"_setParameter",value:function(t,e){switch(this.gl.bindTexture(this.target,this.handle),e=this._getNPOTParam(t,e),t){case 33082:case 33083:this.gl.texParameterf(this.handle,t,e);break;case 4096:case 4097:Object(h.a)(!1);break;default:this.gl.texParameteri(this.target,t,e)}return this.gl.bindTexture(this.target,null),this}},{key:"_isNPOT",value:function(){return!Object(g.j)(this.gl)&&(!(!this.width||!this.height)&&(!Object(C.b)(this.width)||!Object(C.b)(this.height)))}},{key:"_updateForNPOT",value:function(t){void 0===t[this.gl.TEXTURE_MIN_FILTER]&&(t[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===t[this.gl.TEXTURE_WRAP_S]&&(t[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===t[this.gl.TEXTURE_WRAP_T]&&(t[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}},{key:"_getNPOTParam",value:function(t,e){if(this._isNPOT())switch(t){case 10241:-1===Q.indexOf(e)&&(e=9729);break;case 10242:case 10243:33071!==e&&(e=33071)}return e}}]),A}(I.a)},function(t,e,A){"use strict";function n(t,e,A){var n=e[0],r=e[1],i=A[3]*n+A[7]*r||1;return t[0]=(A[0]*n+A[4]*r)/i,t[1]=(A[1]*n+A[5]*r)/i,t}function r(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i||1;return t[0]=(A[0]*n+A[4]*r+A[8]*i)/o,t[1]=(A[1]*n+A[5]*r+A[9]*i)/o,t[2]=(A[2]*n+A[6]*r+A[10]*i)/o,t}function i(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t[2]=e[2],t}function o(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t[2]=e[2],t[3]=e[3],t}function a(t,e,A){var n=e[0],r=e[1],i=e[2];return t[0]=A[0]*n+A[3]*r+A[6]*i,t[1]=A[1]*n+A[4]*r+A[7]*i,t[2]=A[2]*n+A[5]*r+A[8]*i,t[3]=e[3],t}A.d(e,"a",(function(){return n})),A.d(e,"c",(function(){return r})),A.d(e,"b",(function(){return i})),A.d(e,"d",(function(){return o})),A.d(e,"e",(function(){return a}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return n})),A.d(e,"b",(function(){return r})),A.d(e,"c",(function(){return i})),A.d(e,"d",(function(){return o})),A.d(e,"e",(function(){return a}));var n=Symbol("thread.errors"),r=Symbol("thread.events"),i=Symbol("thread.terminate"),o=Symbol("thread.transferable"),a=Symbol("thread.worker")},function(t,e,A){"use strict";var n=A(9),r=A(15),i=function(){function t(e){Object(n.a)(this,t),this.message=e}return Object(r.a)(t,[{key:"warnInConsole",value:function(){throw new Error("The warnInConsole() method has not been implemented.")}}]),t}(),o=A(23),a=A(24),s=function(t){Object(o.a)(A,t);var e=Object(a.a)(A);function A(t,r,i,o){var a;return Object(n.a)(this,A),(a=e.call(this,"Error HTTP status fetching ".concat(t,"."))).name="LoaderFetchError",a.datasetType=t,a.datasetFileType=r,a.datasetUrl=i,a.responseHeaders=o,a}return Object(r.a)(A,[{key:"warnInConsole",value:function(){var t=this.datasetType,e=this.datasetUrl,A=this.responseHeaders;console.warn("".concat(t," from ").concat(e,": fetch failed"),A)}}]),A}(i),g=function(t){Object(o.a)(A,t);var e=Object(a.a)(A);function A(t,r,i,o){var a;return Object(n.a)(this,A),(a=e.call(this,"Error while validating ".concat(t,"."))).name="LoaderValidationError",a.datasetType=t,a.datasetFileType=r,a.datasetUrl=i,a.reason=o,a}return Object(r.a)(A,[{key:"warnInConsole",value:function(){var t=this.datasetType,e=this.datasetUrl,A=this.reason;console.warn("".concat(t," from ").concat(e,": validation failed"),JSON.stringify(A,null,2))}}]),A}(i),c=function(t){Object(o.a)(A,t);var e=Object(a.a)(A);function A(t,r,i){var o;return Object(n.a)(this,A),(o=e.call(this,"Error finding loader for ".concat(t,"."))).name="LoaderNotFoundError",o.datasetType=t,o.datasetFileType=r,o.datasetUrl=i,o}return Object(r.a)(A,[{key:"warnInConsole",value:function(){var t=this.datasetType,e=this.datasetFileType,A=this.datasetUrl;e&&A?console.warn("".concat(t," from ").concat(A,": unable to find loader for fileType ").concat(e)):console.warn("".concat(t,": unable to find loader"))}}]),A}(i);A.d(e,"a",(function(){return i})),A.d(e,"b",(function(){return s})),A.d(e,"d",(function(){return g})),A.d(e,"c",(function(){return c}))},function(t,e,A){"use strict";function n(t,e){"function"===typeof t?t(e):t&&(t.current=e)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n=A(17),r=A(54),i=(A(271),A(2)),o=A.n(i),a=A(8),s=A(12),g=A(13),c=A(9),I=A(15),u=A(71),l=A(92),C=A(23),h=A(24),B=A(20),f=A(21),d=A(40),Q=A(479),E=A(480),p=A(279),y=A(393),v=A(746),m=A(170),b=(A(747),A(126)),F=A(28),w=A(380),S=A(19),D=A(412),R=A(255),U=A(233),G=A(517),N=A(737),k=A(385),x=A(527),O=A(602),M=A(752),L=A(365);function _(t,e,A,n,r){!function t(e,A,n,r,i){for(;r>n;){if(r-n>600){var o=r-n+1,a=A-n+1,s=Math.log(o),g=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*g*(o-g)/o)*(a-o/2<0?-1:1),I=Math.max(n,Math.floor(A-a*g/o+c)),u=Math.min(r,Math.floor(A+(o-a)*g/o+c));t(e,A,I,u,i)}var l=e[A],C=n,h=r;for(J(e,n,A),i(e[r],l)>0&&J(e,n,r);C<h;){for(J(e,C,h),C++,h--;i(e[C],l)<0;)C++;for(;i(e[h],l)>0;)h--}0===i(e[n],l)?J(e,n,h):(h++,J(e,h,r)),h<=A&&(n=h+1),A<=h&&(r=h-1)}}(t,e,A||0,n||t.length-1,r||T)}function J(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function T(t,e){return t<e?-1:t>e?1:0}var j=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1}),H=A(67),Y=A(59),V=A(502),Z=new V.a,W=new V.a,K=(function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(H.a)(this,t),n=n||Z.copy(e).add(A).scale(.5),this.center=new V.a(n),this.halfDiagonal=new V.a(A).subtract(this.center),this.minimum=new V.a(e),this.maximum=new V.a(A)}Object(Y.a)(t,[{key:"clone",value:function(){return new t(this.minimum,this.maximum,this.center)}},{key:"equals",value:function(t){return this===t||Boolean(t)&&this.minimum.equals(t.minimum)&&this.maximum.equals(t.maximum)}},{key:"intersectPlane",value:function(t){var e=this.halfDiagonal,A=W.from(t.normal),n=e.x*Math.abs(A.x)+e.y*Math.abs(A.y)+e.z*Math.abs(A.z),r=this.center.dot(A)+t.distance;return r-n>0?j.INSIDE:r+n<0?j.OUTSIDE:j.INTERSECTING}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceSquaredTo(t))}},{key:"distanceSquaredTo",value:function(t){var e,A=Z.from(t).subtract(this.center),n=this.halfDiagonal,r=0;return(e=Math.abs(A.x)-n.x)>0&&(r+=e*e),(e=Math.abs(A.y)-n.y)>0&&(r+=e*e),(e=Math.abs(A.z)-n.z)>0&&(r+=e*e),r}}])}(),A(18)),P=new V.a,q=new V.a,X=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(H.a)(this,t),this.radius=-0,this.center=new V.a,this.fromCenterRadius(e,A)}return Object(Y.a)(t,[{key:"fromCenterRadius",value:function(t,e){return this.center.from(t),this.radius=e,this}},{key:"fromCornerPoints",value:function(t,e){return e=P.from(e),this.center=(new V.a).from(t).add(e).scale(.5),this.radius=this.center.distance(e),this}},{key:"equals",value:function(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.radius===t.radius}},{key:"clone",value:function(){return new t(this.center,this.radius)}},{key:"union",value:function(t){var e=this.center,A=this.radius,n=t.center,r=t.radius,i=P.copy(n).subtract(e),o=i.magnitude();if(A>=o+r)return this.clone();if(r>=o+A)return t.clone();var a=.5*(A+o+r);return q.copy(i).scale((-A+a)/o).add(e),this.center.copy(q),this.radius=a,this}},{key:"expand",value:function(t){var e=(t=P.from(t)).subtract(this.center).magnitude();return e>this.radius&&(this.radius=e),this}},{key:"intersectPlane",value:function(t){var e=this.center,A=this.radius,n=t.normal.dot(e)+t.distance;return n<-A?j.OUTSIDE:n<A?j.INTERSECTING:j.INSIDE}},{key:"transform",value:function(t){this.center.transform(t);var e=K.e(P,t);return this.radius=Math.max(e[0],Math.max(e[1],e[2]))*this.radius,this}},{key:"distanceSquaredTo",value:function(t){return(t=P.from(t)).subtract(this.center).lengthSquared()-this.radius*this.radius}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceSquaredTo(t))}}]),t}(),z=A(234),$=A(455),tt=A(456),et=new V.a,At=new V.a,nt=new V.a,rt=new V.a,it=new V.a,ot=new V.a,at=new V.a,st=new V.a,gt=new V.a,ct=new V.a,It=0,ut=1,lt=2,Ct=3,ht=4,Bt=5,ft=6,dt=7,Qt=8,Et=(function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0,0,0,0,0,0];Object(H.a)(this,t),this.center=(new V.a).from(e),this.halfAxes=new $.a(A)}Object(Y.a)(t,[{key:"fromCenterHalfSizeQuaternion",value:function(t,e,A){var n=new tt.a(A),r=(new $.a).fromQuaternion(n);return r[0]=r[0]*e[0],r[1]=r[1]*e[0],r[2]=r[2]*e[0],r[3]=r[3]*e[1],r[4]=r[4]*e[1],r[5]=r[5]*e[1],r[6]=r[6]*e[2],r[7]=r[7]*e[2],r[8]=r[8]*e[2],this.center=(new V.a).from(t),this.halfAxes=r,this}},{key:"clone",value:function(){return new t(this.center,this.halfAxes)}},{key:"equals",value:function(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.halfAxes.equals(t.halfAxes)}},{key:"getBoundingSphere",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new X,e=this.halfAxes,A=e.getColumn(0,st),n=e.getColumn(1,gt),r=e.getColumn(2,ct),i=et.copy(A).add(n).add(r);return t.center.copy(this.center),t.radius=i.magnitude(),t}},{key:"intersectPlane",value:function(t){var e=this.center,A=t.normal,n=this.halfAxes,r=A.x,i=A.y,o=A.z,a=Math.abs(r*n[It]+i*n[ut]+o*n[lt])+Math.abs(r*n[Ct]+i*n[ht]+o*n[Bt])+Math.abs(r*n[ft]+i*n[dt]+o*n[Qt]),s=A.dot(e)+t.distance;return s<=-a?j.OUTSIDE:s>=a?j.INSIDE:j.INTERSECTING}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceSquaredTo(t))}},{key:"distanceSquaredTo",value:function(t){var e=At.from(t).subtract(this.center),A=this.halfAxes,n=A.getColumn(0,nt),r=A.getColumn(1,rt),i=A.getColumn(2,it),o=n.magnitude(),a=r.magnitude(),s=i.magnitude();n.normalize(),r.normalize(),i.normalize();var g,c=0;return(g=Math.abs(e.dot(n))-o)>0&&(c+=g*g),(g=Math.abs(e.dot(r))-a)>0&&(c+=g*g),(g=Math.abs(e.dot(i))-s)>0&&(c+=g*g),c}},{key:"computePlaneDistances",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[-0,-0],n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=this.center,o=this.halfAxes,a=o.getColumn(0,nt),s=o.getColumn(1,rt),g=o.getColumn(2,it),c=ot.copy(a).add(s).add(g).add(i),I=at.copy(c).subtract(t),u=e.dot(I);return n=Math.min(u,n),r=Math.max(u,r),c.copy(i).add(a).add(s).subtract(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),c.copy(i).add(a).subtract(s).add(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),c.copy(i).add(a).subtract(s).subtract(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),i.copy(c).subtract(a).add(s).add(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),i.copy(c).subtract(a).add(s).subtract(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),i.copy(c).subtract(a).subtract(s).add(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),i.copy(c).subtract(a).subtract(s).subtract(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),A[0]=n,A[1]=r,A}},{key:"getTransform",value:function(){}},{key:"halfSize",get:function(){var t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),A=this.halfAxes.getColumn(2);return[new V.a(t).len(),new V.a(e).len(),new V.a(A).len()]}},{key:"quaternion",get:function(){var t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),A=this.halfAxes.getColumn(2),n=new V.a(t).normalize(),r=new V.a(e).normalize(),i=new V.a(A).normalize();return(new tt.a).fromMatrix3(new $.a([].concat(Object(z.a)(n),Object(z.a)(r),Object(z.a)(i))))}}])}(),A(113)),pt=A(48),yt=new V.a,vt=new V.a,mt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,1],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Object(H.a)(this,t),this.normal=new V.a,this.distance=-0,this.fromNormalDistance(e,A)}return Object(Y.a)(t,[{key:"fromNormalDistance",value:function(t,e){return Object(Et.a)(Number.isFinite(e)),this.normal.from(t).normalize(),this.distance=e,this}},{key:"fromPointNormal",value:function(t,e){t=yt.from(t),this.normal.from(e).normalize();var A=-this.normal.dot(t);return this.distance=A,this}},{key:"fromCoefficients",value:function(t,e,A,n){return this.normal.set(t,e,A),Object(Et.a)(Object(pt.b)(this.normal.len(),1)),this.distance=n,this}},{key:"clone",value:function(e){return new t(this.normal,this.distance)}},{key:"equals",value:function(t){return Object(pt.b)(this.distance,t.distance)&&Object(pt.b)(this.normal,t.normal)}},{key:"getPointDistance",value:function(t){return this.normal.dot(t)+this.distance}},{key:"transform",value:function(t){var e=vt.copy(this.normal).transformAsVector(t).normalize(),A=this.normal.scale(-this.distance).transform(t);return this.fromPointNormal(A,e)}},{key:"projectPointOntoPlane",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];t=yt.from(t);var A=this.getPointDistance(t),n=vt.copy(this.normal).scale(A);return t.subtract(n).to(e)}}]),t}();function bt(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Ft(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Ft(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var wt=[new V.a([1,0,0]),new V.a([0,1,0]),new V.a([0,0,1])],St=new V.a,Dt=new V.a,Rt=(new mt(new V.a(1,0,0),0),function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Object(H.a)(this,t),this.planes=e,Object(Et.a)(this.planes.every((function(t){return t instanceof mt})))}return Object(Y.a)(t,null,[{key:"MASK_OUTSIDE",get:function(){return 4294967295}},{key:"MASK_INSIDE",get:function(){return 0}},{key:"MASK_INDETERMINATE",get:function(){return 2147483647}}]),Object(Y.a)(t,[{key:"fromBoundingSphere",value:function(t){this.planes.length=2*wt.length;var e,A=t.center,n=t.radius,r=0,i=bt(wt);try{for(i.s();!(e=i.n()).done;){var o=e.value,a=this.planes[r],s=this.planes[r+1];a||(a=this.planes[r]=new mt),s||(s=this.planes[r+1]=new mt);var g=St.copy(o).scale(-n).add(A);o.dot(g);a.fromPointNormal(g,o);var c=St.copy(o).scale(n).add(A),I=Dt.copy(o).negate();I.dot(c);s.fromPointNormal(c,I),r+=2}}catch(u){i.e(u)}finally{i.f()}return this}},{key:"computeVisibility",value:function(t){Object(Et.a)(t);var e,A=j.INSIDE,n=bt(this.planes);try{for(n.s();!(e=n.n()).done;){var r=e.value;switch(t.intersectPlane(r)){case j.OUTSIDE:return j.OUTSIDE;case j.INTERSECTING:A=j.INTERSECTING}}}catch(i){n.e(i)}finally{n.f()}return A}},{key:"computeVisibilityWithPlaneMask",value:function(e,A){if(Object(Et.a)(e,"boundingVolume is required."),Object(Et.a)(Number.isFinite(A),"parentPlaneMask is required."),A===t.MASK_OUTSIDE||A===t.MASK_INSIDE)return A;for(var n=t.MASK_INSIDE,r=this.planes,i=0;i<this.planes.length;++i){var o=i<31?1<<i:0;if(!(i<31&&0===(A&o))){var a=r[i],s=e.intersectPlane(a);if(s===j.OUTSIDE)return t.MASK_OUTSIDE;s===j.INTERSECTING&&(n|=o)}}return n}}]),t}());function Ut(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var Gt=A(500);function Nt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function kt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(A),!0).forEach((function(e){Ut(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Nt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var xt=new V.a,Ot=new V.a,Mt=new V.a,Lt=new V.a,_t=new V.a,Jt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(H.a)(this,t),e=kt({near:1,far:5e8},e),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e.near,this._near=this.near,this.far=e.far,this._far=this.far,this._cullingVolume=new Rt([new mt,new mt,new mt,new mt,new mt,new mt]),this._perspectiveMatrix=new Gt.a,this._infinitePerspective=new Gt.a}return Object(Y.a)(t,[{key:"clone",value:function(){return new t({right:this.right,left:this.left,top:this.top,bottom:this.bottom,near:this.near,far:this.far})}},{key:"equals",value:function(e){return e&&e instanceof t&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far}},{key:"computeCullingVolume",value:function(t,e,A){Object(Et.a)(t,"position is required."),Object(Et.a)(e,"direction is required."),Object(Et.a)(A,"up is required.");var n=this._cullingVolume.planes;A=xt.copy(A).normalize();var r=Ot.copy(e).cross(A).normalize(),i=Mt.copy(e).multiplyByScalar(this.near).add(t),o=Lt.copy(e).multiplyByScalar(this.far).add(t),a=_t;return a.copy(r).multiplyByScalar(this.left).add(i).subtract(t).cross(A),n[0].fromPointNormal(t,a),a.copy(r).multiplyByScalar(this.right).add(i).subtract(t).cross(A).negate(),n[1].fromPointNormal(t,a),a.copy(A).multiplyByScalar(this.bottom).add(i).subtract(t).cross(r).negate(),n[2].fromPointNormal(t,a),a.copy(A).multiplyByScalar(this.top).add(i).subtract(t).cross(r),n[3].fromPointNormal(t,a),a=(new V.a).copy(e),n[4].fromPointNormal(i,a),a.negate(),n[5].fromPointNormal(o,a),this._cullingVolume}},{key:"getPixelDimensions",value:function(t,e,A,n){Tt(this),Object(Et.a)(Number.isFinite(t)&&Number.isFinite(e)),Object(Et.a)(t>0),Object(Et.a)(e>0),Object(Et.a)(A>0),Object(Et.a)(n);var r=1/this.near,i=this.top*r,o=2*A*i/e,a=2*A*(i=this.right*r)/t;return n.x=a,n.y=o,n}},{key:"projectionMatrix",get:function(){return Tt(this),this._perspectiveMatrix}},{key:"infiniteProjectionMatrix",get:function(){return Tt(this),this._infinitePerspective}}]),t}();function Tt(t){Object(Et.a)(Number.isFinite(t.right)&&Number.isFinite(t.left)&&Number.isFinite(t.top)&&Number.isFinite(t.bottom)&&Number.isFinite(t.near)&&Number.isFinite(t.far));var e=t.top,A=t.bottom,n=t.right,r=t.left,i=t.near,o=t.far;e===t._top&&A===t._bottom&&r===t._left&&n===t._right&&i===t._near&&o===t._far||(Object(Et.a)(t.near>0&&t.near<t.far,"near must be greater than zero and less than far."),t._left=r,t._right=n,t._top=e,t._bottom=A,t._near=i,t._far=o,t._perspectiveMatrix=(new Gt.a).frustum({left:r,right:n,bottom:A,top:e,near:i,far:o}),t._infinitePerspective=(new Gt.a).frustum({left:r,right:n,bottom:A,top:e,near:i,far:1/0}))}function jt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Ht(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(A),!0).forEach((function(e){Ut(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):jt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}!function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(H.a)(this,t),e=Ht({near:1,far:5e8,xOffset:0,yOffset:0},e),this._offCenterFrustum=new Jt,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near,this._near=this.near,this.far=e.far,this._far=this.far,this.xOffset=e.xOffset,this._xOffset=this.xOffset,this.yOffset=e.yOffset,this._yOffset=this.yOffset}Object(Y.a)(t,[{key:"clone",value:function(){return new t({aspectRatio:this.aspectRatio,fov:this.fov,near:this.near,far:this.far})}},{key:"equals",value:function(e){return null!==(A=e)&&"undefined"!==typeof A&&e instanceof t&&(Yt(this),Yt(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this.near===e.near&&this.far===e.far&&this._offCenterFrustum.equals(e._offCenterFrustum));var A}},{key:"computeCullingVolume",value:function(t,e,A){return Yt(this),this._offCenterFrustum.computeCullingVolume(t,e,A)}},{key:"getPixelDimensions",value:function(t,e,A,n){return Yt(this),this._offCenterFrustum.getPixelDimensions(t,e,A,n)}},{key:"projectionMatrix",get:function(){return Yt(this),this._offCenterFrustum.projectionMatrix}},{key:"infiniteProjectionMatrix",get:function(){return Yt(this),this._offCenterFrustum.infiniteProjectionMatrix}},{key:"fovy",get:function(){return Yt(this),this._fovy}},{key:"sseDenominator",get:function(){return Yt(this),this._sseDenominator}}])}();function Yt(t){Object(Et.a)(Number.isFinite(t.fov)&&Number.isFinite(t.aspectRatio)&&Number.isFinite(t.near)&&Number.isFinite(t.far));var e=t._offCenterFrustum;t.fov===t._fov&&t.aspectRatio===t._aspectRatio&&t.near===t._near&&t.far===t._far&&t.xOffset===t._xOffset&&t.yOffset===t._yOffset||(Object(Et.a)(t.fov>=0&&t.fov<Math.PI),Object(Et.a)(t.aspectRatio>0),Object(Et.a)(t.near>=0&&t.near<t.far),t._aspectRatio=t.aspectRatio,t._fov=t.fov,t._fovy=t.aspectRatio<=1?t.fov:2*Math.atan(Math.tan(.5*t.fov)/t.aspectRatio),t._near=t.near,t._far=t.far,t._sseDenominator=2*Math.tan(.5*t._fovy),t._xOffset=t.xOffset,t._yOffset=t.yOffset,e.top=t.near*Math.tan(.5*t._fovy),e.bottom=-e.top,e.right=t.aspectRatio*e.top,e.left=-e.right,e.near=t.near,e.far=t.far,e.right+=t.xOffset,e.left+=t.xOffset,e.top+=t.yOffset,e.bottom+=t.yOffset)}new V.a,new V.a,new V.a,new V.a,new V.a,new V.a,new V.a,new V.a,new V.a,new V.a,new V.a,new V.a,Math.PI;A(457),new $.a,new $.a,new $.a,new $.a,new $.a;new V.a,new V.a,new V.a,new V.a,new V.a,new $.a,new $.a,new $.a;var Vt=A(0),Zt=A.n(Vt),Wt=A(972),Kt=A(221),Pt=A.n(Kt),qt=A(77),Xt=A(507),zt=A.n(Xt),$t={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"},te={};for(var ee in $t)$t.hasOwnProperty(ee)&&(te[$t[ee]]=parseInt(ee,10));var Ae=[te.BitsPerSample,te.ExtraSamples,te.SampleFormat,te.StripByteCounts,te.StripOffsets,te.StripRowCounts,te.TileByteCounts,te.TileOffsets,te.SubIFDs],ne={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"},re={};for(var ie in ne)ne.hasOwnProperty(ie)&&(re[ne[ie]]=parseInt(ie,10));var oe=0,ae=1,se=2,ge=3,ce=5,Ie=6,ue=8,le=0,Ce={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"},he={};for(var Be in Ce)Ce.hasOwnProperty(Be)&&(he[Ce[Be]]=parseInt(Be,10));function fe(t,e){for(var A,n=t.width,r=t.height,i=new Uint8Array(n*r*3),o=0,a=0;o<t.length;++o,a+=3)A=256-t[o]/e*256,i[a]=A,i[a+1]=A,i[a+2]=A;return i}function de(t,e){for(var A,n=t.width,r=t.height,i=new Uint8Array(n*r*3),o=0,a=0;o<t.length;++o,a+=3)A=t[o]/e*256,i[a]=A,i[a+1]=A,i[a+2]=A;return i}function Qe(t,e){for(var A=t.width,n=t.height,r=new Uint8Array(A*n*3),i=e.length/3,o=e.length/3*2,a=0,s=0;a<t.length;++a,s+=3){var g=t[a];r[s]=e[g]/65536*256,r[s+1]=e[g+i]/65536*256,r[s+2]=e[g+o]/65536*256}return r}function Ee(t){for(var e=t.width,A=t.height,n=new Uint8Array(e*A*3),r=0,i=0;r<t.length;r+=4,i+=3){var o=t[r],a=t[r+1],s=t[r+2],g=t[r+3];n[i]=(255-o)/256*255*((255-g)/256),n[i+1]=(255-a)/256*255*((255-g)/256),n[i+2]=(255-s)/256*255*((255-g)/256)}return n}function pe(t){for(var e=t.width,A=t.height,n=new Uint8ClampedArray(e*A*3),r=0,i=0;r<t.length;r+=3,i+=3){var o=t[r],a=t[r+1],s=t[r+2];n[i]=o+1.402*(s-128),n[i+1]=o-.34414*(a-128)-.71414*(s-128),n[i+2]=o+1.772*(a-128)}return n}function ye(t){for(var e=t.width,A=t.height,n=new Uint8Array(e*A*3),r=0,i=0;r<t.length;r+=3,i+=3){var o=(t[r+0]+16)/116,a=(t[r+1]<<24>>24)/500+o,s=o-(t[r+2]<<24>>24)/200,g=void 0,c=void 0,I=void 0;c=-.9689*(a=.95047*(a*a*a>.008856?a*a*a:(a-16/116)/7.787))+1.8758*(o=1*(o*o*o>.008856?o*o*o:(o-16/116)/7.787))+.0415*(s=1.08883*(s*s*s>.008856?s*s*s:(s-16/116)/7.787)),I=.0557*a+-.204*o+1.057*s,g=(g=3.2406*a+-1.5372*o+-.4986*s)>.0031308?1.055*Math.pow(g,1/2.4)-.055:12.92*g,c=c>.0031308?1.055*Math.pow(c,1/2.4)-.055:12.92*c,I=I>.0031308?1.055*Math.pow(I,1/2.4)-.055:12.92*I,n[i]=255*Math.max(0,Math.min(1,g)),n[i+1]=255*Math.max(0,Math.min(1,c)),n[i+2]=255*Math.max(0,Math.min(1,I))}return n}function ve(t,e){var A=t.length-e,n=0;do{for(var r=e;r>0;r--)t[n+e]+=t[n],n++;A-=e}while(A>0)}function me(t,e,A){for(var n=0,r=t.length,i=r/A;r>e;){for(var o=e;o>0;--o)t[n+e]+=t[n],++n;r-=e}for(var a=t.slice(),s=0;s<i;++s)for(var g=0;g<A;++g)t[A*s+g]=a[(A-g-1)*i+s]}function be(t,e,A,n,r,i){if(!e||1===e)return t;for(var o=0;o<r.length;++o){if(r[o]%8!==0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(r[o]!==r[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var a=r[0]/8,s=2===i?1:r.length,g=0;g<n&&!(g*s*A*a>=t.byteLength);++g){var c=void 0;if(2===e){switch(r[0]){case 8:c=new Uint8Array(t,g*s*A*a,s*A*a);break;case 16:c=new Uint16Array(t,g*s*A*a,s*A*a/2);break;case 32:c=new Uint32Array(t,g*s*A*a,s*A*a/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(r[0]," bits per sample."))}ve(c,s)}else 3===e&&me(c=new Uint8Array(t,g*s*A*a,s*A*a),s,a)}return t}var Fe,we=function(){function t(){Object(c.a)(this,t)}return Object(I.a)(t,[{key:"decode",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A){var n,r,i,a,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.decodeBlock(A);case 2:if(n=t.sent,1===(r=e.Predictor||1)){t.next=9;break}return i=!e.StripOffsets,a=i?e.TileWidth:e.ImageWidth,s=i?e.TileLength:e.RowsPerStrip||e.ImageLength,t.abrupt("return",be(n,r,a,s,e.BitsPerSample,e.PlanarConfiguration));case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()}]),t}(),Se=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"decodeBlock",value:function(t){return t}}]),A}(we),De=null;function Re(){return null!==De&&De.buffer===Fe.memory.buffer||(De=new Uint8Array(Fe.memory.buffer)),De}var Ue=0,Ge=null;function Ne(){return null!==Ge&&Ge.buffer===Fe.memory.buffer||(Ge=new Int32Array(Fe.memory.buffer)),Ge}function ke(t){return xe.apply(this,arguments)}function xe(){return(xe=Object(a.a)(o.a.mark((function t(e){var A,n,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e="".replace(/\.js$/,"_bg.wasm")),("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e)),t.t0=function(){var t=Object(a.a)(o.a.mark((function t(e,A){var n,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!("function"==typeof Response&&e instanceof Response)){t.next=19;break}if("function"!=typeof WebAssembly.instantiateStreaming){t.next=13;break}return t.prev=2,t.next=5,WebAssembly.instantiateStreaming(e,A);case 5:return t.abrupt("return",t.sent);case 8:if(t.prev=8,t.t0=t.catch(2),"application/wasm"!=e.headers.get("Content-Type")){t.next=12;break}throw t.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",t.t0);case 13:return t.next=15,e.arrayBuffer();case 15:return n=t.sent,t.next=18,WebAssembly.instantiate(n,A);case 18:return t.abrupt("return",t.sent);case 19:return t.next=21,WebAssembly.instantiate(e,A);case 21:return r=t.sent,t.abrupt("return",r instanceof WebAssembly.Instance?{instance:r,module:e}:r);case 23:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(e,A){return t.apply(this,arguments)}}(),t.next=5,e;case 5:return t.t1=t.sent,t.t2={},t.next=9,(0,t.t0)(t.t1,t.t2);case 9:return A=t.sent,n=A.instance,r=A.module,t.abrupt("return",(Fe=n.exports,ke.__wbindgen_wasm_module=r,Fe));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Oe=Object.freeze({__proto__:null,decompress:function(t,e){try{var A=Fe.__wbindgen_add_to_stack_pointer(-16),n=function(t,e){var A=e(1*t.length);return Re().set(t,A/1),Ue=t.length,A}(t,Fe.__wbindgen_malloc),r=Ue;Fe.decompress(A,n,r,e);var i=Ne()[A/4+0],o=Ne()[A/4+1],a=(s=i,g=o,Re().subarray(s/1,s/1+g)).slice();return Fe.__wbindgen_free(i,1*o),a}finally{Fe.__wbindgen_add_to_stack_pointer(16)}var s,g},default:ke}),Me=[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 Le(t){return Me[t-43]}var _e,Je=function(t){for(var e,A=t.endsWith("==")?2:t.endsWith("=")?1:0,n=t.length,r=new Uint8Array(n/4*3),i=0,o=0;i<n;i+=4,o+=3)e=Le(t.charCodeAt(i))<<18|Le(t.charCodeAt(i+1))<<12|Le(t.charCodeAt(i+2))<<6|Le(t.charCodeAt(i+3)),r[o]=e>>16,r[o+1]=e>>8&255,r[o+2]=255&e;return r.subarray(0,r.length-A)}(" ");function Te(t,e){return je.apply(this,arguments)}function je(){return(je=Object(a.a)(o.a.mark((function t(e,A){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.t0=_e,t.t0){t.next=5;break}return t.next=4,Object(a.a)(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ke(Je);case 2:return t.abrupt("return",Oe);case 3:case"end":return t.stop()}}),t)})))();case 4:_e=t.sent;case 5:if(0!==(n=_e.decompress(e,A)).length){t.next=8;break}throw Error("Failed to decode with LZW decoder.");case 8:return t.abrupt("return",n);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var He=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;Object(c.a)(this,A),n=e.call(this);var r=t.TileWidth||t.ImageWidth,i=t.TileLength||t.ImageLength,o=t.BitsPerSample[0]/8;return n.maxUncompressedSize=r*i*o,n}return Object(I.a)(A,[{key:"decodeBlock",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A,n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=new Uint8Array(e),t.next=3,Te(A,this.maxUncompressedSize);case 3:return n=t.sent,t.abrupt("return",n.buffer);case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),A}(we),Ye=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 Ve(t,e){for(var A=0,n=[],r=16;r>0&&!t[r-1];)--r;n.push({children:[],index:0});for(var i,o=n[0],a=0;a<r;a++){for(var s=0;s<t[a];s++){for((o=n.pop()).children[o.index]=e[A];o.index>0;)o=n.pop();for(o.index++,n.push(o);n.length<=a;)n.push(i={children:[],index:0}),o.children[o.index]=i.children,o=i;A++}a+1<r&&(n.push(i={children:[],index:0}),o.children[o.index]=i.children,o=i)}return n[0].children}function Ze(t,e,A,n,r,i,o,a,s){var g=A.mcusPerLine,c=A.progressive,I=e,u=e,l=0,C=0;function h(){if(C>0)return C--,l>>C&1;if(255===(l=t[u++])){var e=t[u++];if(e)throw new Error("unexpected marker: ".concat((l<<8|e).toString(16)))}return C=7,l>>>7}function B(t){for(var e,A=t;null!==(e=h());){if("number"===typeof(A=A[e]))return A;if("object"!==typeof A)throw new Error("invalid huffman sequence")}return null}function f(t){for(var e=t,A=0;e>0;){var n=h();if(null===n)return;A=A<<1|n,--e}return A}function d(t){var e=f(t);return e>=1<<t-1?e:e+(-1<<t)+1}var Q=0;var E,p=0;function y(t,e,A,n,r){var i=A%g,o=(A/g|0)*t.v+n,a=i*t.h+r;e(t,t.blocks[o][a])}function v(t,e,A){var n=A/t.blocksPerLine|0,r=A%t.blocksPerLine;e(t,t.blocks[n][r])}var m,b,F,w,S,D,R=n.length;D=c?0===i?0===a?function(t,e){var A=B(t.huffmanTableDC),n=0===A?0:d(A)<<s;t.pred+=n,e[0]=t.pred}:function(t,e){e[0]|=h()<<s}:0===a?function(t,e){if(Q>0)Q--;else for(var A=i,n=o;A<=n;){var r=B(t.huffmanTableAC),a=15&r,g=r>>4;if(0===a){if(g<15){Q=f(g)+(1<<g)-1;break}A+=16}else{e[Ye[A+=g]]=d(a)*(1<<s),A++}}}:function(t,e){for(var A=i,n=o,r=0;A<=n;){var a=Ye[A],g=e[a]<0?-1:1;switch(p){case 0:var c=B(t.huffmanTableAC),I=15&c;if(r=c>>4,0===I)r<15?(Q=f(r)+(1<<r),p=4):(r=16,p=1);else{if(1!==I)throw new Error("invalid ACn encoding");E=d(I),p=r?2:3}continue;case 1:case 2:e[a]?e[a]+=(h()<<s)*g:0===--r&&(p=2===p?3:0);break;case 3:e[a]?e[a]+=(h()<<s)*g:(e[a]=E<<s,p=0);break;case 4:e[a]&&(e[a]+=(h()<<s)*g)}A++}4===p&&0===--Q&&(p=0)}:function(t,e){var A=B(t.huffmanTableDC),n=0===A?0:d(A);t.pred+=n,e[0]=t.pred;for(var r=1;r<64;){var i=B(t.huffmanTableAC),o=15&i,a=i>>4;if(0===o){if(a<15)break;r+=16}else{e[Ye[r+=a]]=d(o),r++}}};var U,G,N=0;G=1===R?n[0].blocksPerLine*n[0].blocksPerColumn:g*A.mcusPerColumn;for(var k=r||G;N<G;){for(b=0;b<R;b++)n[b].pred=0;if(Q=0,1===R)for(m=n[0],S=0;S<k;S++)v(m,D,N),N++;else for(S=0;S<k;S++){for(b=0;b<R;b++){var x=m=n[b],O=x.h,M=x.v;for(F=0;F<M;F++)for(w=0;w<O;w++)y(m,D,N,F,w)}if(++N===G)break}if(C=0,(U=t[u]<<8|t[u+1])<65280)throw new Error("marker was not found");if(!(U>=65488&&U<=65495))break;u+=2}return u-I}function We(t,e){var A=[],n=e.blocksPerLine,r=e.blocksPerColumn,i=n<<3,o=new Int32Array(64),a=new Uint8Array(64);function s(t,A,n){var r,i,o,a,s,g,c,I,u,l,C=e.quantizationTable,h=n;for(l=0;l<64;l++)h[l]=t[l]*C[l];for(l=0;l<8;++l){var B=8*l;0!==h[1+B]||0!==h[2+B]||0!==h[3+B]||0!==h[4+B]||0!==h[5+B]||0!==h[6+B]||0!==h[7+B]?(r=5793*h[0+B]+128>>8,i=5793*h[4+B]+128>>8,o=h[2+B],a=h[6+B],s=2896*(h[1+B]-h[7+B])+128>>8,I=2896*(h[1+B]+h[7+B])+128>>8,g=h[3+B]<<4,u=r-i+1>>1,r=r+i+1>>1,i=u,u=3784*o+1567*a+128>>8,o=1567*o-3784*a+128>>8,a=u,u=s-(c=h[5+B]<<4)+1>>1,s=s+c+1>>1,c=u,u=I+g+1>>1,g=I-g+1>>1,I=u,u=r-a+1>>1,r=r+a+1>>1,a=u,u=i-o+1>>1,i=i+o+1>>1,o=u,u=2276*s+3406*I+2048>>12,s=3406*s-2276*I+2048>>12,I=u,u=799*g+4017*c+2048>>12,g=4017*g-799*c+2048>>12,c=u,h[0+B]=r+I,h[7+B]=r-I,h[1+B]=i+c,h[6+B]=i-c,h[2+B]=o+g,h[5+B]=o-g,h[3+B]=a+s,h[4+B]=a-s):(u=5793*h[0+B]+512>>10,h[0+B]=u,h[1+B]=u,h[2+B]=u,h[3+B]=u,h[4+B]=u,h[5+B]=u,h[6+B]=u,h[7+B]=u)}for(l=0;l<8;++l){var f=l;0!==h[8+f]||0!==h[16+f]||0!==h[24+f]||0!==h[32+f]||0!==h[40+f]||0!==h[48+f]||0!==h[56+f]?(r=5793*h[0+f]+2048>>12,i=5793*h[32+f]+2048>>12,o=h[16+f],a=h[48+f],s=2896*(h[8+f]-h[56+f])+2048>>12,I=2896*(h[8+f]+h[56+f])+2048>>12,g=h[24+f],u=r-i+1>>1,r=r+i+1>>1,i=u,u=3784*o+1567*a+2048>>12,o=1567*o-3784*a+2048>>12,a=u,u=s-(c=h[40+f])+1>>1,s=s+c+1>>1,c=u,u=I+g+1>>1,g=I-g+1>>1,I=u,u=r-a+1>>1,r=r+a+1>>1,a=u,u=i-o+1>>1,i=i+o+1>>1,o=u,u=2276*s+3406*I+2048>>12,s=3406*s-2276*I+2048>>12,I=u,u=799*g+4017*c+2048>>12,g=4017*g-799*c+2048>>12,c=u,h[0+f]=r+I,h[56+f]=r-I,h[8+f]=i+c,h[48+f]=i-c,h[16+f]=o+g,h[40+f]=o-g,h[24+f]=a+s,h[32+f]=a-s):(u=5793*n[l+0]+8192>>14,h[0+f]=u,h[8+f]=u,h[16+f]=u,h[24+f]=u,h[32+f]=u,h[40+f]=u,h[48+f]=u,h[56+f]=u)}for(l=0;l<64;++l){var d=128+(h[l]+8>>4);A[l]=d<0?0:d>255?255:d}}for(var g=0;g<r;g++){for(var c=g<<3,I=0;I<8;I++)A.push(new Uint8Array(i));for(var u=0;u<n;u++){s(e.blocks[g][u],a,o);for(var l=0,C=u<<3,h=0;h<8;h++)for(var B=A[c+h],f=0;f<8;f++)B[C+f]=a[l++]}}return A}var Ke=function(){function t(){Object(c.a)(this,t),this.jfif=null,this.adobe=null,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.resetFrames()}return Object(I.a)(t,[{key:"resetFrames",value:function(){this.frames=[]}},{key:"parse",value:function(t){var e=0;function A(){var A=t[e]<<8|t[e+1];return e+=2,A}function n(){var n=A(),r=t.subarray(e,e+n-2);return e+=r.length,r}function r(t){var e,A,n=0,r=0;for(A in t.components)t.components.hasOwnProperty(A)&&(n<(e=t.components[A]).h&&(n=e.h),r<e.v&&(r=e.v));var i=Math.ceil(t.samplesPerLine/8/n),o=Math.ceil(t.scanLines/8/r);for(A in t.components)if(t.components.hasOwnProperty(A)){e=t.components[A];for(var a=Math.ceil(Math.ceil(t.samplesPerLine/8)*e.h/n),s=Math.ceil(Math.ceil(t.scanLines/8)*e.v/r),g=i*e.h,c=o*e.v,I=[],u=0;u<c;u++){for(var l=[],C=0;C<g;C++)l.push(new Int32Array(64));I.push(l)}e.blocksPerLine=a,e.blocksPerColumn=s,e.blocks=I}t.maxH=n,t.maxV=r,t.mcusPerLine=i,t.mcusPerColumn=o}var i=A();if(65496!==i)throw new Error("SOI not found");for(i=A();65497!==i;){switch(i){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=n();65504===i&&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===i&&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 a=A()+e-2;e<a;){var s=t[e++],g=new Int32Array(64);if(s>>4===0)for(var c=0;c<64;c++){g[Ye[c]]=t[e++]}else{if(s>>4!==1)throw new Error("DQT: invalid table spec");for(var I=0;I<64;I++){g[Ye[I]]=A()}}this.quantizationTables[15&s]=g}break;case 65472:case 65473:case 65474:A();for(var u={extended:65473===i,progressive:65474===i,precision:t[e++],scanLines:A(),samplesPerLine:A(),components:{},componentsOrder:[]},l=t[e++],C=void 0,h=0;h<l;h++){C=t[e];var B=t[e+1]>>4,f=15&t[e+1],d=t[e+2];u.componentsOrder.push(C),u.components[C]={h:B,v:f,quantizationIdx:d},e+=3}r(u),this.frames.push(u);break;case 65476:for(var Q=A(),E=2;E<Q;){for(var p=t[e++],y=new Uint8Array(16),v=0,m=0;m<16;m++,e++)y[m]=t[e],v+=y[m];for(var b=new Uint8Array(v),F=0;F<v;F++,e++)b[F]=t[e];E+=17+v,p>>4===0?this.huffmanTablesDC[15&p]=Ve(y,b):this.huffmanTablesAC[15&p]=Ve(y,b)}break;case 65501:A(),this.resetInterval=A();break;case 65498:A();for(var w=t[e++],S=[],D=this.frames[0],R=0;R<w;R++){var U=D.components[t[e++]],G=t[e++];U.huffmanTableDC=this.huffmanTablesDC[G>>4],U.huffmanTableAC=this.huffmanTablesAC[15&G],S.push(U)}var N=t[e++],k=t[e++],x=t[e++],O=Ze(t,e,D,S,this.resetInterval,N,k,x>>4,15&x);e+=O;break;case 65535:255!==t[e]&&e--;break;default:if(255===t[e-3]&&t[e-2]>=192&&t[e-2]<=254){e-=3;break}throw new Error("unknown JPEG marker ".concat(i.toString(16)))}i=A()}}},{key:"getResult",value:function(){var t=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 e=0;e<this.frames.length;e++)for(var A=this.frames[e].components,n=0,r=Object.keys(A);n<r.length;n++){var i=r[n];A[i].quantizationTable=this.quantizationTables[A[i].quantizationIdx],delete A[i].quantizationIdx}for(var o=t[0],a=o.components,s=o.componentsOrder,g=[],c=o.samplesPerLine,I=o.scanLines,u=0;u<s.length;u++){var l=a[s[u]];g.push({lines:We(0,l),scaleX:l.h/o.maxH,scaleY:l.v/o.maxV})}for(var C=new Uint8Array(c*I*g.length),h=0,B=0;B<I;++B)for(var f=0;f<c;++f)for(var d=0;d<g.length;++d){var Q=g[d];C[h]=Q.lines[0|B*Q.scaleY][0|f*Q.scaleX],++h}return C}}]),t}(),Pe=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(c.a)(this,A),(n=e.call(this)).reader=new Ke,t.JPEGTables&&n.reader.parse(t.JPEGTables),n}return Object(I.a)(A,[{key:"decodeBlock",value:function(t){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(t)),this.reader.getResult().buffer}}]),A}(we),qe=A(508),Xe=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"decodeBlock",value:function(t){return Object(qe.inflate)(new Uint8Array(t)).buffer}}]),A}(we),ze=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"decodeBlock",value:function(t){for(var e=new DataView(t),A=[],n=0;n<t.byteLength;++n){var r=e.getInt8(n);if(r<0){var i=e.getUint8(n+1);r=-r;for(var o=0;o<=r;++o)A.push(i);n+=1}else{for(var a=0;a<=r;++a)A.push(e.getUint8(n+a+1));n+=r+1}}return new Uint8Array(A).buffer}}]),A}(we);function $e(t){switch(t.Compression){case void 0:case 1:return new Se;case 5:return new He(t);case 6:throw new Error("old style JPEG compression is not supported.");case 7:return new Pe(t);case 8:case 32946:return new Xe;case 32773:return new ze;default:throw new Error("Unknown compression method identifier: ".concat(t.Compression))}}function tA(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return new(Object.getPrototypeOf(t).constructor)(e*A*n)}function eA(t,e,A,n,r){var i=e/n,o=A/r;return t.map((function(t){for(var a=tA(t,n,r),s=0;s<r;++s)for(var g=Math.min(Math.round(o*s),A-1),c=0;c<n;++c){var I=Math.min(Math.round(i*c),e-1),u=t[g*e+I];a[s*n+c]=u}return a}))}function AA(t,e,A){return(1-A)*t+A*e}function nA(t,e,A,n,r){var i=e/n,o=A/r;return t.map((function(t){for(var a=tA(t,n,r),s=0;s<r;++s)for(var g=o*s,c=Math.floor(g),I=Math.min(Math.ceil(g),A-1),u=0;u<n;++u){var l=i*u,C=l%1,h=Math.floor(l),B=Math.min(Math.ceil(l),e-1),f=t[c*e+h],d=t[c*e+B],Q=t[I*e+h],E=t[I*e+B],p=AA(AA(f,d,C),AA(Q,E,C),g%1);a[s*n+u]=p}return a}))}function rA(t,e,A,n,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"nearest";switch(i.toLowerCase()){case"nearest":return eA(t,e,A,n,r);case"bilinear":case"linear":return nA(t,e,A,n,r);default:throw new Error("Unsupported resampling method: '".concat(i,"'"))}}function iA(t,e,A,n,r,i){for(var o=e/n,a=A/r,s=tA(t,n,r,i),g=0;g<r;++g)for(var c=Math.min(Math.round(a*g),A-1),I=0;I<n;++I)for(var u=Math.min(Math.round(o*I),e-1),l=0;l<i;++l){var C=t[c*e*i+u*i+l];s[g*n*i+I*i+l]=C}return s}function oA(t,e,A,n,r,i){for(var o=e/n,a=A/r,s=tA(t,n,r,i),g=0;g<r;++g)for(var c=a*g,I=Math.floor(c),u=Math.min(Math.ceil(c),A-1),l=0;l<n;++l)for(var C=o*l,h=C%1,B=Math.floor(C),f=Math.min(Math.ceil(C),e-1),d=0;d<i;++d){var Q=t[I*e*i+B*i+d],E=t[I*e*i+f*i+d],p=t[u*e*i+B*i+d],y=t[u*e*i+f*i+d],v=AA(AA(Q,E,h),AA(p,y,h),c%1);s[g*n*i+l*i+d]=v}return s}function aA(t,e,A,n,r,i){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"nearest";switch(o.toLowerCase()){case"nearest":return iA(t,e,A,n,r,i);case"bilinear":case"linear":return oA(t,e,A,n,r,i);default:throw new Error("Unsupported resampling method: '".concat(o,"'"))}}function sA(t,e,A){for(var n=0,r=e;r<A;++r)n+=t[r];return n}function gA(t,e,A){switch(t){case 1:switch(e){case 8:return new Uint8Array(A);case 16:return new Uint16Array(A);case 32:return new Uint32Array(A)}break;case 2:switch(e){case 8:return new Int8Array(A);case 16:return new Int16Array(A);case 32:return new Int32Array(A)}break;case 3:switch(e){case 32:return new Float32Array(A);case 64:return new Float64Array(A)}}throw Error("Unsupported data format/bitsPerSample")}var cA,IA=function(){function t(e,A,n,r,i,o){Object(c.a)(this,t),this.fileDirectory=e,this.geoKeys=A,this.dataView=n,this.littleEndian=r,this.tiles=i?{}:null,this.isTiled=!e.StripOffsets;var a=e.PlanarConfiguration;if(this.planarConfiguration="undefined"===typeof a?1:a,1!==this.planarConfiguration&&2!==this.planarConfiguration)throw new Error("Invalid planar configuration.");this.source=o}return Object(I.a)(t,[{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 t=0,e=0;e<this.fileDirectory.BitsPerSample.length;++e){var A=this.fileDirectory.BitsPerSample[e];if(A%8!==0)throw new Error("Sample bit-width of ".concat(A," is not supported."));if(A!==this.fileDirectory.BitsPerSample[0])throw new Error("Differing size of samples in a pixel are not supported.");t+=A}return t/8}},{key:"getSampleByteSize",value:function(t){if(t>=this.fileDirectory.BitsPerSample.length)throw new RangeError("Sample index ".concat(t," is out of range."));var e=this.fileDirectory.BitsPerSample[t];if(e%8!==0)throw new Error("Sample bit-width of ".concat(e," is not supported."));return e/8}},{key:"getReaderForSample",value:function(t){var e=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,A=this.fileDirectory.BitsPerSample[t];switch(e){case 1:switch(A){case 8:return DataView.prototype.getUint8;case 16:return DataView.prototype.getUint16;case 32:return DataView.prototype.getUint32}break;case 2:switch(A){case 8:return DataView.prototype.getInt8;case 16:return DataView.prototype.getInt16;case 32:return DataView.prototype.getInt32}break;case 3:switch(A){case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}},{key:"getArrayForSample",value:function(t,e){return gA(this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,this.fileDirectory.BitsPerSample[t],e)}},{key:"getTileOrStrip",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A,n,r,i){var a,s,g,c,I,u,l,C;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=Math.ceil(this.getWidth()/this.getTileWidth()),s=Math.ceil(this.getHeight()/this.getTileHeight()),c=this.tiles,1===this.planarConfiguration?g=A*a+e:2===this.planarConfiguration&&(g=n*a*s+A*a+e),this.isTiled?(I=this.fileDirectory.TileOffsets[g],u=this.fileDirectory.TileByteCounts[g]):(I=this.fileDirectory.StripOffsets[g],u=this.fileDirectory.StripByteCounts[g]),t.next=7,this.source.fetch(I,u,!1,i);case 7:if(l=t.sent,!i||!i.aborted){t.next=10;break}return t.abrupt("return",{x:e,y:A,sample:n,data:[]});case 10:return null===c?C=r.decode(this.fileDirectory,l):c[g]||(C=r.decode(this.fileDirectory,l),c[g]=C),t.t0=e,t.t1=A,t.t2=n,t.next=16,C;case 16:return t.t3=t.sent,t.abrupt("return",{x:t.t0,y:t.t1,sample:t.t2,data:t.t3});case 18:case"end":return t.stop()}}),t,this)})));return function(e,A,n,r,i){return t.apply(this,arguments)}}()},{key:"_readRaster",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A,n,r,i,a,s,g,c){var I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F,w,S,D=this;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(I=this.getTileWidth(),u=this.getTileHeight(),l=Math.max(Math.floor(e[0]/I),0),C=Math.min(Math.ceil(e[2]/I),Math.ceil(this.getWidth()/this.getTileWidth())),h=Math.max(Math.floor(e[1]/u),0),B=Math.min(Math.ceil(e[3]/u),Math.ceil(this.getHeight()/this.getTileHeight())),f=e[2]-e[0],d=this.getBytesPerPixel(),Q=[],E=[],p=0;p<A.length;++p)1===this.planarConfiguration?Q.push(sA(this.fileDirectory.BitsPerSample,0,A[p])/8):Q.push(0),E.push(this.getReaderForSample(A[p]));for(y=[],v=this.littleEndian,m=h;m<B;++m)for(b=l;b<C;++b)for(F=function(t){var o=t,a=A[t];2===D.planarConfiguration&&(d=D.getSampleByteSize(a));var s=D.getTileOrStrip(b,m,a,i,c);y.push(s),s.then((function(t){if(!c||!c.aborted)for(var i=t.data,a=new DataView(i),s=t.y*u,g=t.x*I,l=(t.y+1)*u,C=(t.x+1)*I,h=E[o],B=Math.min(u,u-(l-e[3])),p=Math.min(I,I-(C-e[2])),y=Math.max(0,e[1]-s);y<B;++y)for(var m=Math.max(0,e[0]-g);m<p;++m){var b=(y*I+m)*d,F=h.call(a,b+Q[o],v),w=void 0;r?(w=(y+s-e[1])*f*A.length+(m+g-e[0])*A.length+o,n[w]=F):(w=(y+s-e[1])*f+m+g-e[0],n[o][w]=F)}}))},w=0;w<A.length;++w)F(w);return t.next=16,Promise.all(y);case 16:if(!c||!c.aborted){t.next=18;break}return t.abrupt("return",new n.constructor(0));case 18:if(!(a&&e[2]-e[0]!==a||s&&e[3]-e[1]!==s)){t.next=23;break}return(S=r?aA(n,e[2]-e[0],e[3]-e[1],a,s,A.length,g):rA(n,e[2]-e[0],e[3]-e[1],a,s,g)).width=a,S.height=s,t.abrupt("return",S);case 23:return n.width=a||e[2]-e[0],n.height=s||e[3]-e[1],t.abrupt("return",n);case 26:case"end":return t.stop()}}),t,this)})));return function(e,A,n,r,i,o,a,s,g){return t.apply(this,arguments)}}()},{key:"readRasters",value:function(){var t=Object(a.a)(o.a.mark((function t(){var e,A,n,r,i,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F,w=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=w.length>0&&void 0!==w[0]?w[0]:{},A=e.window,n=e.samples,r=void 0===n?[]:n,i=e.interleave,a=e.pool,s=void 0===a?null:a,g=e.width,c=e.height,I=e.resampleMethod,u=e.fillValue,l=e.signal,!((C=A||[0,0,this.getWidth(),this.getHeight()])[0]>C[2]||C[1]>C[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if(h=C[2]-C[0],B=C[3]-C[1],f=h*B,r&&r.length){t.next=11;break}for(d=0;d<this.fileDirectory.SamplesPerPixel;++d)r.push(d);t.next=18;break;case 11:Q=0;case 12:if(!(Q<r.length)){t.next=18;break}if(!(r[Q]>=this.fileDirectory.SamplesPerPixel)){t.next=15;break}return t.abrupt("return",Promise.reject(new RangeError("Invalid sample index '".concat(r[Q],"'."))));case 15:++Q,t.next=12;break;case 18:if(i)p=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,y=Math.max.apply(null,this.fileDirectory.BitsPerSample),E=gA(p,y,f*r.length),u&&E.fill(u);else for(E=[],v=0;v<r.length;++v)m=this.getArrayForSample(r[v],f),Array.isArray(u)&&v<u.length?m.fill(u[v]):u&&!Array.isArray(u)&&m.fill(u),E.push(m);return b=s||$e(this.fileDirectory),t.next=22,this._readRaster(C,r,E,i,b,g,c,I,l);case 22:return F=t.sent,t.abrupt("return",F);case 24:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"readRGB",value:function(){var t=Object(a.a)(o.a.mark((function t(){var e,A,n,r,i,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=y.length>0&&void 0!==y[0]?y[0]:{},A=e.window,n=e.pool,r=void 0===n?null:n,i=e.width,a=e.height,s=e.resampleMethod,g=e.enableAlpha,c=void 0!==g&&g,I=e.signal,!((u=A||[0,0,this.getWidth(),this.getHeight()])[0]>u[2]||u[1]>u[3])){t.next=4;break}throw new Error("Invalid subsets");case 4:if((l=this.fileDirectory.PhotometricInterpretation)!==se){t.next=9;break}if(C=[0,1,2],this.fileDirectory.ExtraSamples!==le&&c)for(C=[],h=0;h<this.fileDirectory.BitsPerSample.length;h+=1)C.push(h);return t.abrupt("return",this.readRasters({window:A,interleave:!0,samples:C,pool:r,width:i,height:a,signal:I}));case 9:t.t0=l,t.next=t.t0===oe||t.t0===ae||t.t0===ge?12:t.t0===ce?14:t.t0===Ie||t.t0===ue?16:18;break;case 12:return B=[0],t.abrupt("break",19);case 14:return B=[0,1,2,3],t.abrupt("break",19);case 16:return B=[0,1,2],t.abrupt("break",19);case 18:throw new Error("Invalid or unsupported photometric interpretation.");case 19:return f={window:u,interleave:!0,samples:B,pool:r,width:i,height:a,resampleMethod:s,signal:I},d=this.fileDirectory,t.next=23,this.readRasters(f);case 23:Q=t.sent,E=Math.pow(2,this.fileDirectory.BitsPerSample[0]),t.t1=l,t.next=t.t1===oe?28:t.t1===ae?30:t.t1===ge?32:t.t1===ce?34:t.t1===Ie?36:t.t1===ue?38:40;break;case 28:return p=fe(Q,E),t.abrupt("break",41);case 30:return p=de(Q,E),t.abrupt("break",41);case 32:return p=Qe(Q,d.ColorMap),t.abrupt("break",41);case 34:return p=Ee(Q),t.abrupt("break",41);case 36:return p=pe(Q),t.abrupt("break",41);case 38:return p=ye(Q),t.abrupt("break",41);case 40:throw new Error("Unsupported photometric interpretation.");case 41:return p.width=Q.width,p.height=Q.height,t.abrupt("return",p);case 44:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"getTiePoints",value:function(){if(!this.fileDirectory.ModelTiepoint)return[];for(var t=[],e=0;e<this.fileDirectory.ModelTiepoint.length;e+=6)t.push({i:this.fileDirectory.ModelTiepoint[e],j:this.fileDirectory.ModelTiepoint[e+1],k:this.fileDirectory.ModelTiepoint[e+2],x:this.fileDirectory.ModelTiepoint[e+3],y:this.fileDirectory.ModelTiepoint[e+4],z:this.fileDirectory.ModelTiepoint[e+5]});return t}},{key:"getGDALMetadata",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={};if(!this.fileDirectory.GDAL_METADATA)return null;var A=this.fileDirectory.GDAL_METADATA,n=zt()(A.substring(0,A.length-1));if(!n[0].tagName)throw new Error("Failed to parse GDAL metadata XML.");var r=n[0];if("GDALMetadata"!==r.tagName)throw new Error("Unexpected GDAL metadata XML tag.");var i=r.children.filter((function(t){return"Item"===t.tagName}));null!==t&&(i=i.filter((function(e){return Number(e.attributes.sample)===t})));for(var o=0;o<i.length;++o){var a=i[o];e[a.attributes.name]=a.children[0]}return e}},{key:"getGDALNoData",value:function(){if(!this.fileDirectory.GDAL_NODATA)return null;var t=this.fileDirectory.GDAL_NODATA;return Number(t.substring(0,t.length-1))}},{key:"getOrigin",value:function(){var t=this.fileDirectory.ModelTiepoint,e=this.fileDirectory.ModelTransformation;if(t&&6===t.length)return[t[3],t[4],t[5]];if(e)return[e[3],e[7],e[11]];throw new Error("The image does not have an affine transformation.")}},{key:"getResolution",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.fileDirectory.ModelPixelScale,A=this.fileDirectory.ModelTransformation;if(e)return[e[0],-e[1],e[2]];if(A)return[A[0],A[5],A[10]];if(t){var n=t.getResolution(),r=Object(g.a)(n,3),i=r[0],o=r[1],a=r[2];return[i*t.getWidth()/this.getWidth(),o*t.getHeight()/this.getHeight(),a*t.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 t=this.getOrigin(),e=this.getResolution(),A=t[0],n=t[1],r=A+e[0]*this.getWidth(),i=n+e[1]*this.getHeight();return[Math.min(A,r),Math.min(n,i),Math.max(A,r),Math.max(n,i)]}}]),t}(),uA=function(){function t(e){Object(c.a)(this,t),this._dataView=new DataView(e)}return Object(I.a)(t,[{key:"getUint64",value:function(t,e){var A,n=this.getUint32(t,e),r=this.getUint32(t+4,e);if(e){if(A=n+Math.pow(2,32)*r,!Number.isSafeInteger(A))throw new Error("".concat(A," exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues"));return A}if(A=Math.pow(2,32)*n+r,!Number.isSafeInteger(A))throw new Error("".concat(A," exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues"));return A}},{key:"getInt64",value:function(t,e){for(var A=0,n=(128&this._dataView.getUint8(t+(e?7:0)))>0,r=!0,i=0;i<8;i++){var o=this._dataView.getUint8(t+(e?i:7-i));n&&(r?0!==o&&(o=255&~(o-1),r=!1):o=255&~o),A+=o*Math.pow(256,i)}return n&&(A=-A),A}},{key:"getUint8",value:function(t,e){return this._dataView.getUint8(t,e)}},{key:"getInt8",value:function(t,e){return this._dataView.getInt8(t,e)}},{key:"getUint16",value:function(t,e){return this._dataView.getUint16(t,e)}},{key:"getInt16",value:function(t,e){return this._dataView.getInt16(t,e)}},{key:"getUint32",value:function(t,e){return this._dataView.getUint32(t,e)}},{key:"getInt32",value:function(t,e){return this._dataView.getInt32(t,e)}},{key:"getFloat32",value:function(t,e){return this._dataView.getFloat32(t,e)}},{key:"getFloat64",value:function(t,e){return this._dataView.getFloat64(t,e)}},{key:"buffer",get:function(){return this._dataView.buffer}}]),t}(),lA=function(){function t(e,A,n,r){Object(c.a)(this,t),this._dataView=new DataView(e),this._sliceOffset=A,this._littleEndian=n,this._bigTiff=r}return Object(I.a)(t,[{key:"covers",value:function(t,e){return this.sliceOffset<=t&&this.sliceTop>=t+e}},{key:"readUint8",value:function(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}},{key:"readInt8",value:function(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}},{key:"readUint16",value:function(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}},{key:"readInt16",value:function(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}},{key:"readUint32",value:function(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}},{key:"readInt32",value:function(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat32",value:function(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}},{key:"readFloat64",value:function(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}},{key:"readUint64",value:function(t){var e,A=this.readUint32(t),n=this.readUint32(t+4);if(this._littleEndian){if(e=A+Math.pow(2,32)*n,!Number.isSafeInteger(e))throw new Error("".concat(e," exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues"));return e}if(e=Math.pow(2,32)*A+n,!Number.isSafeInteger(e))throw new Error("".concat(e," exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues"));return e}},{key:"readInt64",value:function(t){for(var e=0,A=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0,n=!0,r=0;r<8;r++){var i=this._dataView.getUint8(t+(this._littleEndian?r:7-r));A&&(n?0!==i&&(i=255&~(i-1),n=!1):i=255&~i),e+=i*Math.pow(256,r)}return A&&(e=-e),e}},{key:"readOffset",value:function(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}},{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}}]),t}();function CA(){return cA||(cA=function(){try{throw new Error}catch(e){var t=(""+e.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(t)return(""+t[0]).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}return"/"}()),cA}var hA,BA="undefined"!==typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4,fA=function(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t)};function dA(t){var e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function QA(){return hA||(hA=function(){if("undefined"===typeof Worker)return function t(){throw Object(c.a)(this,t),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 t=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t,n){var r,i;return Object(c.a)(this,A),"string"===typeof t&&n&&n._baseURL?t=new URL(t,n._baseURL):"string"===typeof t&&!fA(t)&&CA().match(/^file:\/\//i)&&(t=new URL(t,CA().replace(/\/[^\/]+$/,"/")),(null===(r=null===n||void 0===n?void 0:n.CORSWorkaround)||void 0===r||r)&&(t=dA("importScripts(".concat(JSON.stringify(t),");")))),"string"===typeof t&&fA(t)&&(null===(i=null===n||void 0===n?void 0:n.CORSWorkaround)||void 0===i||i)&&(t=dA("importScripts(".concat(JSON.stringify(t),");"))),e.call(this,t,n)}return A}(Object(qt.a)(Worker));return{blob:function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t,n){Object(c.a)(this,A);var r=window.URL.createObjectURL(t);return e.call(this,r,n)}return Object(I.a)(A,null,[{key:"fromText",value:function(t,e){return new A(new window.Blob([t],{type:"text/javascript"}),e)}}]),A}(t),default:t}}()),hA}QA().blob,QA().default;var EA,pA=A(180),yA=A.n(pA),vA=A(509),mA=A(975),bA=A(272);function FA(t){return Promise.all(t.map((function(t){var e=Promise.resolve(t);try{return e.then((function(t){return{status:"fulfilled",value:t}}),(function(t){return{status:"rejected",reason:t}}))}catch(A){return Promise.reject(A)}})))}!function(t){t.initialized="initialized",t.taskCanceled="taskCanceled",t.taskCompleted="taskCompleted",t.taskFailed="taskFailed",t.taskQueued="taskQueued",t.taskQueueDrained="taskQueueDrained",t.taskStart="taskStart",t.terminated="terminated"}(EA||(EA={}));var wA=A(120);function SA(t){throw Error(t)}var DA={errors:function(t){return t[wA.a]||SA("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},events:function(t){return t[wA.b]||SA("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},terminate:function(t){return t[wA.c]()}},RA=function(t,e,A,n){return new(A||(A=Promise))((function(r,i){function o(t){try{s(n.next(t))}catch(e){i(e)}}function a(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof A?e:new A((function(t){t(e)}))).then(o,a)}s((n=n.apply(t,e||[])).next())}))},UA=1;function GA(t){return new Promise((function(e){return setTimeout(e,t)}))}function NA(t,e){return t.reduce((function(t,A){return[].concat(Object(f.a)(t),Object(f.a)(e(A)))}),[])}var kA=function(){function t(e,A){var n=this;Object(c.a)(this,t),this.eventSubject=new vA.a,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];var r="number"===typeof A?{size:A}:A||{},i=r.size,o=void 0===i?BA:i;this.debug=yA()("threads:pool:".concat((r.name||String(UA++)).replace(/\W/g," ").trim().replace(/\s+/g,"-"))),this.options=r,this.workers=function(t,e){return function(t){for(var e=[],A=0;A<t;A++)e.push(A);return e}(e).map((function(){return{init:t(),runningTasks:[]}}))}(e,o),this.eventObservable=Object(mA.a)(bA.a.from(this.eventSubject)),Promise.all(this.workers.map((function(t){return t.init}))).then((function(){return n.eventSubject.next({type:EA.initialized,size:n.workers.length})}),(function(t){n.debug("Error while initializing pool worker:",t),n.eventSubject.error(t),n.initErrors.push(t)}))}return Object(I.a)(t,[{key:"findIdlingWorker",value:function(){var t=this.options.concurrency,e=void 0===t?1:t;return this.workers.find((function(t){return t.runningTasks.length<e}))}},{key:"runPoolTask",value:function(t,e){return RA(this,void 0,void 0,o.a.mark((function A(){var n,r;return o.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return n=this.workers.indexOf(t)+1,this.debug("Running task #".concat(e.id," on worker #").concat(n,"...")),this.eventSubject.next({type:EA.taskStart,taskID:e.id,workerID:n}),A.prev=3,A.t0=e,A.next=7,t.init;case 7:return A.t1=A.sent,A.next=10,A.t0.run.call(A.t0,A.t1);case 10:r=A.sent,this.debug("Task #".concat(e.id," completed successfully")),this.eventSubject.next({type:EA.taskCompleted,returnValue:r,taskID:e.id,workerID:n}),A.next=19;break;case 15:A.prev=15,A.t2=A.catch(3),this.debug("Task #".concat(e.id," failed")),this.eventSubject.next({type:EA.taskFailed,taskID:e.id,error:A.t2,workerID:n});case 19:case"end":return A.stop()}}),A,this,[[3,15]])})))}},{key:"run",value:function(t,e){return RA(this,void 0,void 0,o.a.mark((function A(){var n,r=this;return o.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:n=RA(r,void 0,void 0,o.a.mark((function A(){var r;return o.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return r=function(){t.runningTasks=t.runningTasks.filter((function(t){return t!==n}))},A.next=3,GA(0);case 3:return A.prev=3,A.next=6,this.runPoolTask(t,e);case 6:return A.prev=6,r(),this.isClosing||this.scheduleWork(),A.finish(6);case 10:case"end":return A.stop()}}),A,this,[[3,,6,10]])}))),t.runningTasks.push(n);case 2:case"end":return A.stop()}}),A)})))}},{key:"scheduleWork",value:function(){this.debug("Attempt de-queueing a task in order to run it...");var t=this.findIdlingWorker();if(t){var e=this.taskQueue.shift();if(!e)return this.debug("Task queue is empty"),void this.eventSubject.next({type:EA.taskQueueDrained});this.run(t,e)}}},{key:"taskCompletion",value:function(t){var e=this;return new Promise((function(A,n){var r=e.events().subscribe((function(e){e.type===EA.taskCompleted&&e.taskID===t?(r.unsubscribe(),A(e.returnValue)):e.type===EA.taskFailed&&e.taskID===t?(r.unsubscribe(),n(e.error)):e.type===EA.terminated&&(r.unsubscribe(),n(Error("Pool has been terminated before task was run.")))}))}))}},{key:"settled",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return RA(this,void 0,void 0,o.a.mark((function e(){var A,n,r,i=this;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A=function(){return NA(i.workers,(function(t){return t.runningTasks}))},n=[],r=this.eventObservable.subscribe((function(t){t.type===EA.taskFailed&&n.push(t.error)})),!(this.initErrors.length>0)){e.next=5;break}return e.abrupt("return",Promise.reject(this.initErrors[0]));case 5:if(!t||0!==this.taskQueue.length){e.next=9;break}return e.next=8,FA(A());case 8:return e.abrupt("return",n);case 9:return e.next=11,new Promise((function(t,e){var A=i.eventObservable.subscribe({next:function(e){e.type===EA.taskQueueDrained&&(A.unsubscribe(),t(void 0))},error:e})}));case 11:return e.next=13,FA(A());case 13:return r.unsubscribe(),e.abrupt("return",n);case 15:case"end":return e.stop()}}),e,this)})))}},{key:"completed",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return RA(this,void 0,void 0,o.a.mark((function e(){var A,n,r,i=this;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=this.settled(t),n=new Promise((function(t,e){var n=i.eventObservable.subscribe({next:function(r){r.type===EA.taskQueueDrained?(n.unsubscribe(),t(A)):r.type===EA.taskFailed&&(n.unsubscribe(),e(r.error))},error:e})})),e.next=4,Promise.race([A,n]);case 4:if(!((r=e.sent).length>0)){e.next=7;break}throw r[0];case 7:case"end":return e.stop()}}),e,this)})))}},{key:"events",value:function(){return this.eventObservable}},{key:"queue",value:function(t){var e=this,A=this.options.maxQueuedJobs,n=void 0===A?1/0:A;if(this.isClosing)throw Error("Cannot schedule pool tasks after terminate() has been called.");if(this.initErrors.length>0)throw this.initErrors[0];var r=this.nextTaskID++,i=this.taskCompletion(r);i.catch((function(t){e.debug("Task #".concat(r," errored:"),t)}));var o={id:r,run:t,cancel:function(){-1!==e.taskQueue.indexOf(o)&&(e.taskQueue=e.taskQueue.filter((function(t){return t!==o})),e.eventSubject.next({type:EA.taskCanceled,taskID:o.id}))},then:i.then.bind(i)};if(this.taskQueue.length>=n)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:EA.taskQueued,taskID:o.id}),this.scheduleWork(),o}},{key:"terminate",value:function(t){return RA(this,void 0,void 0,o.a.mark((function e(){var A=this;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isClosing=!0,t){e.next=4;break}return e.next=4,this.completed(!0);case 4:return this.eventSubject.next({type:EA.terminated,remainingQueue:Object(f.a)(this.taskQueue)}),this.eventSubject.complete(),e.next=8,Promise.all(this.workers.map((function(t){return RA(A,void 0,void 0,o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=DA,e.next=3,t.init;case 3:return e.t1=e.sent,e.abrupt("return",e.t0.terminate.call(e.t0,e.t1));case 5:case"end":return e.stop()}}),e)})))})));case 8:case"end":return e.stop()}}),e,this)})))}}]),t}();function xA(t,e){return new kA(t,e)}kA.EventType=EA,xA.EventType=EA;A(467),A(511),"undefined"!==typeof navigator&&navigator.hardwareConcurrency;var OA=A(104),MA=(A(332),A(317)),LA=A.n(MA),_A=A(512),JA=A.n(_A),TA=A(310),jA=A.n(TA);function HA(t){if(t.every(Boolean)){var e=new AbortController;e.count=t.length;var A,r=Object(n.a)(t);try{for(r.s();!(A=r.n()).done;){var i=A.value;i.aborted?o():i.addEventListener("abort",o)}}catch(a){r.e(a)}finally{r.f()}return e.signal}function o(){if(e.count-=1,0===e.count){e.abort();var A,r=Object(n.a)(t);try{for(r.s();!(A=r.n()).done;){A.value.removeEventListener("abort",o)}}catch(a){r.e(a)}finally{r.f()}}}}function YA(t,e,A){var r,i=e+A,o=new ArrayBuffer(A),a=new Uint8Array(o),s=Object(n.a)(t);try{for(s.s();!(r=s.n()).done;){var g=r.value,c=g.offset-e,I=g.top-i,u=0,l=0,C=void 0;c<0?u=-c:c>0&&(l=c),C=I<0?g.length-u:i-g.offset-u;var h=new Uint8Array(g.data,u,C);a.set(h,l)}}catch(B){s.e(B)}finally{s.f()}return o}function VA(t){if(0===t.length)return[];var e=[],A=[];e.push(A);for(var n=0;n<t.length;++n)0===n||t[n]===t[n-1]+1?A.push(t[n]):(A=[t[n]],e.push(A));return e}function ZA(t){return WA.apply(this,arguments)}function WA(){return(WA=Object(a.a)(o.a.mark((function t(e){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){return setTimeout(t,e)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var KA=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A.blockSize,r=void 0===n?65536:n,i=A.getFileSize,s=void 0===i?Object(a.a)(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)}))):i;Object(c.a)(this,t),this.retrievalFunction=e,this.blockSize=r,this.blockRequests=new Map,this.blocks=new Map,this.signals=new Map,this.abortedBlockIds=new Set,this.blockIdsAwaitingRequest=null,this.fileSizePromise=s()}return Object(I.a)(t,[{key:"fetch",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A){var r,i,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F,w,S=this,D=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=D.length>2&&void 0!==D[2]&&D[2],i=D.length>3?D[3]:void 0,t.next=4,this.fileSizePromise;case 4:for(s=t.sent,g=s?Math.min(e+A,s):e+A,c=Math.floor(e/this.blockSize)*this.blockSize,I=[],u=[],l=[],C=c;C<g;C+=this.blockSize)h=Math.floor(C/this.blockSize),this.blocks.has(h)||this.blockRequests.has(h)||(u.push(h),this.signals.has(h)?this.signals.get(h).push(i):this.signals.set(h,[i])),this.blockRequests.has(h)&&l.push(this.blockRequests.get(h)),I.push(h);if(this.blockIdsAwaitingRequest)for(B=0;B<u.length;++B)this.blockIdsAwaitingRequest.add(u[B]);else this.blockIdsAwaitingRequest=new Set(u);if(r){t.next=15;break}return t.next=15,ZA();case 15:if(this.blockIdsAwaitingRequest){f=VA(Array.from(this.blockIdsAwaitingRequest).sort()),d=Object(n.a)(f);try{for(E=function(){for(var t=Q.value,e=Array.from(new Set(t.map((function(t){return S.signals.get(t)})).flat())),A=S.requestData(t[0]*S.blockSize,t.length*S.blockSize,HA(e)),n=function(e){var n=t[e];S.blockRequests.set(n,Object(a.a)(o.a.mark((function t(){var r,i,a,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A;case 3:r=t.sent,i=e*S.blockSize,a=Math.min(i+S.blockSize,r.data.byteLength),s=r.data.slice(i,a),S.blockRequests.delete(n),S.signals.delete(n),S.abortedBlockIds.delete(n),S.blocks.set(n,{data:s,offset:r.offset+i,length:s.byteLength,top:r.offset+a}),t.next=23;break;case 13:if(t.prev=13,t.t0=t.catch(0),"AbortError"!==t.t0.name){t.next=22;break}S.blocks.delete(n),S.blockRequests.delete(n),S.signals.delete(n),S.abortedBlockIds.add(n),t.next=23;break;case 22:throw t.t0;case 23:case"end":return t.stop()}}),t,null,[[0,13]])})))())},r=0;r<t.length;++r)n(r)},d.s();!(Q=d.n()).done;)E()}catch(R){d.e(R)}finally{d.f()}this.blockIdsAwaitingRequest=null}for(p=[],y=0,v=u;y<v.length;y++)m=v[y],this.blockRequests.has(m)&&p.push(this.blockRequests.get(m));return t.next=20,Promise.all(p);case 20:return t.next=22,Promise.all(l);case 22:if(b=I.map((function(t){return S.blocks.get(t)})),F=[],!b.some((function(t){return!t}))){t.next=36;break}if(!i||i.aborted){t.next=29;break}I.forEach((function(t){if(S.abortedBlockIds.has(t)){var e=S.requestData(t*S.blockSize,S.blockSize);S.blockRequests.set(t,Object(a.a)(o.a.mark((function A(){var n,r,i;return o.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,e;case 2:n=A.sent,r=Math.min(S.blockSize,n.data.byteLength),i=n.data.slice(0,r),S.abortedBlockIds.delete(t),S.blocks.set(t,{data:i,offset:n.offset,length:i.byteLength,top:n.offset+r});case 7:case"end":return A.stop()}}),A)})))()),F.push(S.blockRequests.get(t))}})),t.next=30;break;case 29:return t.abrupt("return",[]);case 30:return t.next=32,Promise.all(F);case 32:return w=I.map((function(t){return S.blocks.get(t)})),t.abrupt("return",YA(w,e,A));case 36:return t.abrupt("return",YA(b,e,A));case 37:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"requestData",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A,n){var r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.retrievalFunction(e,A,n);case 2:return(r=t.sent).length?r.length!==r.data.byteLength&&(r.data=r.data.slice(0,r.length)):r.length=r.data.byteLength,r.top=r.offset+r.length,t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)})));return function(e,A,n){return t.apply(this,arguments)}}()}]),t}();function PA(t,e){var A=e.forceXHR;if("function"===typeof fetch&&!A)return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.headers,n=void 0===A?{}:A,r=e.blockSize;return new KA(function(){var e=Object(a.a)(o.a.mark((function e(A,r,i){var a,s,g;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{headers:Object(B.a)({},n,{Range:"bytes=".concat(A,"-").concat(A+r-1)}),signal:i});case 2:if((a=e.sent).ok){e.next=7;break}throw new Error("Error fetching data.");case 7:if(206!==a.status){e.next=21;break}if(!a.arrayBuffer){e.next=14;break}return e.next=11,a.arrayBuffer();case 11:e.t0=e.sent,e.next=17;break;case 14:return e.next=16,a.buffer();case 16:e.t0=e.sent.buffer;case 17:return s=e.t0,e.abrupt("return",{data:s,offset:A,length:r});case 21:if(!a.arrayBuffer){e.next=27;break}return e.next=24,a.arrayBuffer();case 24:e.t1=e.sent,e.next=30;break;case 27:return e.next=29,a.buffer();case 29:e.t1=e.sent.buffer;case 30:return g=e.t1,e.abrupt("return",{data:g,offset:0,length:g.byteLength});case 32:case"end":return e.stop()}}),e)})));return function(t,A,n){return e.apply(this,arguments)}}(),{blockSize:r,getFileSize:function(){var e=Object(a.a)(o.a.mark((function e(){var A,r,i,a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{headers:Object(B.a)({},n,{Range:"bytes=0-1"})});case 2:if((A=e.sent).ok){e.next=7;break}throw new Error("Error fetching data.");case 7:if(206!==A.status){e.next=13;break}if(r=A.headers.get("content-range")){e.next=11;break}return e.abrupt("return",null);case 11:return i=r.split("/").slice(-1),a=Object(g.a)(i,1),s=a[0],e.abrupt("return",Number(s));case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()})}(t,e);if("undefined"!==typeof XMLHttpRequest)return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.headers,n=void 0===A?{}:A,r=e.blockSize;return new KA(function(){var e=Object(a.a)(o.a.mark((function e(A,r){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){var o=new XMLHttpRequest;o.open("GET",t),o.responseType="arraybuffer";for(var a=Object(B.a)({},n,{Range:"bytes=".concat(A,"-").concat(A+r-1)}),s=0,c=Object.entries(a);s<c.length;s++){var I=Object(g.a)(c[s],2),u=I[0],l=I[1];o.setRequestHeader(u,l)}o.onload=function(){var t=o.response;206===o.status?e({data:t,offset:A,length:r}):e({data:t,offset:0,length:t.byteLength})},o.onerror=i,o.send()})));case 1:case"end":return e.stop()}}),e)})));return function(t,A){return e.apply(this,arguments)}}(),{blockSize:r})}(t,e);if(LA.a.get)return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.headers,n=void 0===A?{}:A,r=e.blockSize;return new KA(function(){var e=Object(a.a)(o.a.mark((function e(A,r){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){var o=jA.a.parse(t);("http:"===o.protocol?LA.a:JA.a).get(Object(B.a)({},o,{headers:Object(B.a)({},n,{Range:"bytes=".concat(A,"-").concat(A+r-1)})}),(function(t){var n=[];t.on("data",(function(t){n.push(t)})),t.on("end",(function(){var t=OA.Buffer.concat(n).buffer;e({data:t,offset:A,length:t.byteLength})}))})).on("error",i)})));case 1:case"end":return e.stop()}}),e)})));return function(t,A){return e.apply(this,arguments)}}(),{blockSize:r})}(t,e);throw new Error("No remote source available")}function qA(t){return{fetch:function(e,A){return Object(a.a)(o.a.mark((function n(){return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise((function(n,r){var i=t.slice(e,e+A),o=new FileReader;o.onload=function(t){return n(t.target.result)},o.onerror=r,o.readAsArrayBuffer(i)})));case 1:case"end":return n.stop()}}),n)})))()}}}function XA(t,e){for(var A in e)e.hasOwnProperty(A)&&(t[A]=e[A])}function zA(t){var e={};for(var A in t){if(t.hasOwnProperty(A))e[t[A]]=A}return e}function $A(t,e){for(var A=[],n=0;n<t;n++)A.push(e(n));return A}var tn=zA($t),en=zA(Ce),An={};XA(An,tn),XA(An,en);zA(ne);var nn={nextZero:function(t,e){for(var A=e;0!==t[A];)A++;return A},readUshort:function(t,e){return t[e]<<8|t[e+1]},readShort:function(t,e){var A=nn.ui8;return A[0]=t[e+1],A[1]=t[e+0],nn.i16[0]},readInt:function(t,e){var A=nn.ui8;return A[0]=t[e+3],A[1]=t[e+2],A[2]=t[e+1],A[3]=t[e+0],nn.i32[0]},readUint:function(t,e){var A=nn.ui8;return A[0]=t[e+3],A[1]=t[e+2],A[2]=t[e+1],A[3]=t[e+0],nn.ui32[0]},readASCII:function(t,e,A){return A.map((function(A){return String.fromCharCode(t[e+A])})).join("")},readFloat:function(t,e){var A=nn.ui8;return $A(4,(function(n){A[n]=t[e+3-n]})),nn.fl32[0]},readDouble:function(t,e){var A=nn.ui8;return $A(8,(function(n){A[n]=t[e+7-n]})),nn.fl64[0]},writeUshort:function(t,e,A){t[e]=A>>8&255,t[e+1]=255&A},writeUint:function(t,e,A){t[e]=A>>24&255,t[e+1]=A>>16&255,t[e+2]=A>>8&255,t[e+3]=A>>0&255},writeASCII:function(t,e,A){$A(A.length,(function(n){t[e+n]=A.charCodeAt(n)}))},ui8:new Uint8Array(8)};nn.fl64=new Float64Array(nn.ui8.buffer),nn.writeDouble=function(t,e,A){nn.fl64[0]=A,$A(8,(function(A){t[e+A]=nn.ui8[7-A]}))};var rn=function(){function t(){Object(c.a)(this,t)}return Object(I.a)(t,[{key:"log",value:function(){}},{key:"info",value:function(){}},{key:"warn",value:function(){}},{key:"error",value:function(){}},{key:"time",value:function(){}},{key:"timeEnd",value:function(){}}]),t}();new rn;function on(t){switch(t){case re.BYTE:case re.ASCII:case re.SBYTE:case re.UNDEFINED:return 1;case re.SHORT:case re.SSHORT:return 2;case re.LONG:case re.SLONG:case re.FLOAT:case re.IFD:return 4;case re.RATIONAL:case re.SRATIONAL:case re.DOUBLE:case re.LONG8:case re.SLONG8:case re.IFD8:return 8;default:throw new RangeError("Invalid field type: ".concat(t))}}function an(t){var e=t.GeoKeyDirectory;if(!e)return null;for(var A={},n=4;n<=4*e[3];n+=4){var r=Ce[e[n]],i=e[n+1]?$t[e[n+1]]:null,o=e[n+2],a=e[n+3],s=null;if(i){if("undefined"===typeof(s=t[i])||null===s)throw new Error("Could not get value of geoKey '".concat(r,"'."));"string"===typeof s?s=s.substring(a,a+o-1):s.subarray&&(s=s.subarray(a,a+o),1===o&&(s=s[0]))}else s=a;A[r]=s}return A}function sn(t,e,A,n){var r=null,i=null,o=on(e);switch(e){case re.BYTE:case re.ASCII:case re.UNDEFINED:r=new Uint8Array(A),i=t.readUint8;break;case re.SBYTE:r=new Int8Array(A),i=t.readInt8;break;case re.SHORT:r=new Uint16Array(A),i=t.readUint16;break;case re.SSHORT:r=new Int16Array(A),i=t.readInt16;break;case re.LONG:case re.IFD:r=new Uint32Array(A),i=t.readUint32;break;case re.SLONG:r=new Int32Array(A),i=t.readInt32;break;case re.LONG8:case re.IFD8:r=new Array(A),i=t.readUint64;break;case re.SLONG8:r=new Array(A),i=t.readInt64;break;case re.RATIONAL:r=new Uint32Array(2*A),i=t.readUint32;break;case re.SRATIONAL:r=new Int32Array(2*A),i=t.readInt32;break;case re.FLOAT:r=new Float32Array(A),i=t.readFloat32;break;case re.DOUBLE:r=new Float64Array(A),i=t.readFloat64;break;default:throw new RangeError("Invalid field type: ".concat(e))}if(e!==re.RATIONAL&&e!==re.SRATIONAL)for(var a=0;a<A;++a)r[a]=i.call(t,n+a*o);else for(var s=0;s<A;s+=2)r[s]=i.call(t,n+s*o),r[s+1]=i.call(t,n+(s*o+4));return e===re.ASCII?new TextDecoder("utf-8").decode(r):r}var gn=function t(e,A,n){Object(c.a)(this,t),this.fileDirectory=e,this.geoKeyDirectory=A,this.nextIFDByteOffset=n},cn=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(c.a)(this,A),(n=e.call(this,"No image at index ".concat(t))).index=t,n}return A}(Object(qt.a)(Error)),In=function(){function t(){Object(c.a)(this,t)}return Object(I.a)(t,[{key:"readRasters",value:function(){var t=Object(a.a)(o.a.mark((function t(){var e,A,n,r,i,a,s,c,I,u,l,C,h,f,d,Q,E,p,y,v,m,b,F,w,S,D,R,U,G,N,k,x,O,M,L,_,J,T,j,H=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=H.length>0&&void 0!==H[0]?H[0]:{},A=e.window,n=e.width,r=e.height,i=e.resX,a=e.resY,s=e.bbox,t.next=5,this.getImage();case 5:return c=t.sent,I=c,t.next=9,this.getImageCount();case 9:if(u=t.sent,l=c.getBoundingBox(),!A||!s){t.next=13;break}throw new Error('Both "bbox" and "window" passed.');case 13:if(!n&&!r){t.next=24;break}if(A&&(C=c.getOrigin(),h=Object(g.a)(C,2),f=h[0],d=h[1],Q=c.getResolution(),E=Object(g.a)(Q,2),p=E[0],y=E[1],s=[f+A[0]*p,d+A[1]*y,f+A[2]*p,d+A[3]*y]),v=s||l,!n){t.next=20;break}if(!i){t.next=19;break}throw new Error("Both width and resX passed");case 19:i=(v[2]-v[0])/n;case 20:if(!r){t.next=24;break}if(!a){t.next=23;break}throw new Error("Both width and resY passed");case 23:a=(v[3]-v[1])/r;case 24:if(!i&&!a){t.next=48;break}m=[],b=0;case 27:if(!(b<u)){t.next=36;break}return t.next=30,this.getImage(b);case 30:F=t.sent,w=F.fileDirectory,S=w.SubfileType,D=w.NewSubfileType,(0===b||2===S||1&D)&&m.push(F);case 33:++b,t.next=27;break;case 36:m.sort((function(t,e){return t.getWidth()-e.getWidth()})),R=0;case 38:if(!(R<m.length)){t.next=48;break}if(U=m[R],G=(l[2]-l[0])/U.getWidth(),N=(l[3]-l[1])/U.getHeight(),I=U,!(i&&i>G||a&&a>N)){t.next=45;break}return t.abrupt("break",48);case 45:++R,t.next=38;break;case 48:return k=A,s&&(x=c.getOrigin(),O=Object(g.a)(x,2),M=O[0],L=O[1],_=I.getResolution(c),J=Object(g.a)(_,2),T=J[0],j=J[1],k=[Math.round((s[0]-M)/T),Math.round((s[1]-L)/j),Math.round((s[2]-M)/T),Math.round((s[3]-L)/j)],k=[Math.min(k[0],k[2]),Math.min(k[1],k[3]),Math.max(k[0],k[2]),Math.max(k[1],k[3])]),t.abrupt("return",I.readRasters(Object(B.a)({},e,{window:k})));case 51:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),t}(),un=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t,n,r,i){var o,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return Object(c.a)(this,A),(o=e.call(this)).source=t,o.littleEndian=n,o.bigTiff=r,o.firstIFDOffset=i,o.cache=a.cache||!1,o.ifdRequests=[],o.ghostValues=null,o}return Object(I.a)(A,[{key:"getSlice",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.bigTiff?4048:1024,t.t0=lA,t.next=4,this.source.fetch(e,"undefined"!==typeof A?A:n);case 4:return t.t1=t.sent,t.t2=e,t.t3=this.littleEndian,t.t4=this.bigTiff,t.abrupt("return",new t.t0(t.t1,t.t2,t.t3,t.t4));case 9:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"parseFileDirectoryAt",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=this.bigTiff?20:12,n=this.bigTiff?8:2,t.next=4,this.getSlice(e);case 4:if(r=t.sent,i=this.bigTiff?r.readUint64(e):r.readUint16(e),a=i*A+(this.bigTiff?16:6),r.covers(e,a)){t.next=11;break}return t.next=10,this.getSlice(e,a);case 10:r=t.sent;case 11:s={},g=e+(this.bigTiff?8:2),c=0;case 14:if(!(c<i)){t.next=41;break}if(I=r.readUint16(g),u=r.readUint16(g+2),l=this.bigTiff?r.readUint64(g+4):r.readUint32(g+4),C=void 0,h=void 0,B=on(u),f=g+(this.bigTiff?12:8),!(B*l<=(this.bigTiff?8:4))){t.next=26;break}C=sn(r,u,l,f),t.next=36;break;case 26:if(d=r.readOffset(f),Q=on(u)*l,!r.covers(d,Q)){t.next=32;break}C=sn(r,u,l,d),t.next=36;break;case 32:return t.next=34,this.getSlice(d,Q);case 34:E=t.sent,C=sn(E,u,l,d);case 36:h=1===l&&-1===Ae.indexOf(I)&&u!==re.RATIONAL&&u!==re.SRATIONAL?C[0]:C,s[$t[I]]=h;case 38:g+=A,++c,t.next=14;break;case 41:return p=an(s),y=r.readOffset(e+n+A*i),t.abrupt("return",new gn(s,p,y));case 44:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"requestIFD",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A=this;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.ifdRequests[e]){t.next=4;break}return t.abrupt("return",this.ifdRequests[e]);case 4:if(0!==e){t.next=9;break}return this.ifdRequests[e]=this.parseFileDirectoryAt(this.firstIFDOffset),t.abrupt("return",this.ifdRequests[e]);case 9:if(this.ifdRequests[e-1]){t.next=19;break}t.prev=10,this.ifdRequests[e-1]=this.requestIFD(e-1),t.next=19;break;case 14:if(t.prev=14,t.t0=t.catch(10),!(t.t0 instanceof cn)){t.next=18;break}throw new cn(e);case 18:throw t.t0;case 19:return this.ifdRequests[e]=Object(a.a)(o.a.mark((function t(){var n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A.ifdRequests[e-1];case 2:if(0!==(n=t.sent).nextIFDByteOffset){t.next=5;break}throw new cn(e);case 5:return t.abrupt("return",A.parseFileDirectoryAt(n.nextIFDByteOffset));case 6:case"end":return t.stop()}}),t)})))(),t.abrupt("return",this.ifdRequests[e]);case 21:case"end":return t.stop()}}),t,this,[[10,14]])})));return function(e){return t.apply(this,arguments)}}()},{key:"getImage",value:function(){var t=Object(a.a)(o.a.mark((function t(){var e,A,n=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:0,t.next=3,this.requestIFD(e);case 3:return A=t.sent,t.abrupt("return",new IA(A.fileDirectory,A.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source));case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"getImageCount",value:function(){var t=Object(a.a)(o.a.mark((function t(){var e,A;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=0,A=!0;case 2:if(!A){t.next=18;break}return t.prev=3,t.next=6,this.requestIFD(e);case 6:++e,t.next=16;break;case 9:if(t.prev=9,t.t0=t.catch(3),!(t.t0 instanceof cn)){t.next=15;break}A=!1,t.next=16;break;case 15:throw t.t0;case 16:t.next=2;break;case 18:return t.abrupt("return",e);case 19:case"end":return t.stop()}}),t,this,[[3,9]])})));return function(){return t.apply(this,arguments)}}()},{key:"getGhostValues",value:function(){var t=Object(a.a)(o.a.mark((function t(){var e,A,n,r,i,a,s,c,I=this;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.bigTiff?16:8,!this.ghostValues){t.next=3;break}return t.abrupt("return",this.ghostValues);case 3:return n=(A="GDAL_STRUCTURAL_METADATA_SIZE=").length+100,t.next=7,this.getSlice(e,n);case 7:if(r=t.sent,A!==sn(r,re.ASCII,A.length,e)){t.next=19;break}if(i=sn(r,re.ASCII,n,e),a=i.split("\n")[0],!((s=Number(a.split("=")[1].split(" ")[0])+a.length)>n)){t.next=16;break}return t.next=15,this.getSlice(e,s);case 15:r=t.sent;case 16:c=sn(r,re.ASCII,s,e),this.ghostValues={},c.split("\n").filter((function(t){return t.length>0})).map((function(t){return t.split("=")})).forEach((function(t){var e=Object(g.a)(t,2),A=e[0],n=e[1];I.ghostValues[A]=n}));case 19:return t.abrupt("return",this.ghostValues);case 20:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"close",value:function(){return"function"===typeof this.source.close&&this.source.close()}}],[{key:"fromSource",value:function(){var t=Object(a.a)(o.a.mark((function t(e,n){var r,i,a,s,g,c,I;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.fetch(0,1024);case 2:if(r=t.sent,i=new uA(r),18761!==(a=i.getUint16(0,0))){t.next=9;break}s=!0,t.next=14;break;case 9:if(19789!==a){t.next=13;break}s=!1,t.next=14;break;case 13:throw new TypeError("Invalid byte order value.");case 14:if(42!==(g=i.getUint16(2,s))){t.next=19;break}c=!1,t.next=27;break;case 19:if(43!==g){t.next=26;break}if(c=!0,8===i.getUint16(4,s)){t.next=24;break}throw new Error("Unsupported offset byte-size.");case 24:t.next=27;break;case 26:throw new TypeError("Invalid magic number.");case 27:return I=c?i.getUint64(8,s):i.getUint32(4,s),t.abrupt("return",new A(e,s,c,I,n));case 29:case"end":return t.stop()}}),t)})));return function(e,A){return t.apply(this,arguments)}}()}]),A}(In);function ln(t){return Cn.apply(this,arguments)}function Cn(){return(Cn=Object(a.a)(o.a.mark((function t(e){var A,n=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=n.length>1&&void 0!==n[1]?n[1]:{},t.abrupt("return",un.fromSource(PA(e,A)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function hn(t){return Bn.apply(this,arguments)}function Bn(){return(Bn=Object(a.a)(o.a.mark((function t(e){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",un.fromSource(qA(e)));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var fn,dn,Qn=A(513),En=A.n(Qn),pn=A(166);A.d(e,"a",(function(){return wn})),A.d(e,"b",(function(){return Ar})),A.d(e,"c",(function(){return Fn})),A.d(e,"d",(function(){return nr})),A.d(e,"e",(function(){return yn})),A.d(e,"f",(function(){return gr})),A.d(e,"g",(function(){return pr})),A.d(e,"h",(function(){return Jn})),A.d(e,"i",(function(){return ti})),A.d(e,"j",(function(){return Vn})),A.d(e,"k",(function(){return sr})),A.d(e,"l",(function(){return Kr})),A.d(e,"m",(function(){return ri}));var yn,vn={name:"channel-intensity-module",defines:{SAMPLER_TYPE:"usampler2D",COLORMAP_FUNCTION:""},fs:"#define GLSLIFY 1\nvec4 jet(float x_17){const float e0=0.0;const vec4 v0=vec4(0,0,0.5137254901960784,1);const float e1=0.125;const vec4 v1=vec4(0,0.23529411764705882,0.6666666666666666,1);const float e2=0.375;const vec4 v2=vec4(0.0196078431372549,1,1,1);const float e3=0.625;const vec4 v3=vec4(1,1,0,1);const float e4=0.875;const vec4 v4=vec4(0.9803921568627451,0,0,1);const float e5=1.0;const vec4 v5=vec4(0.5019607843137255,0,0,1);float a0=smoothstep(e0,e1,x_17);float a1=smoothstep(e1,e2,x_17);float a2=smoothstep(e2,e3,x_17);float a3=smoothstep(e3,e4,x_17);float a4=smoothstep(e4,e5,x_17);return max(mix(v0,v1,a0)*step(e0,x_17)*step(x_17,e1),max(mix(v1,v2,a1)*step(e1,x_17)*step(x_17,e2),max(mix(v2,v3,a2)*step(e2,x_17)*step(x_17,e3),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)))));}vec4 hsv_0(float x_18){const float e0=0.0;const vec4 v0=vec4(1,0,0,1);const float e1=0.169;const vec4 v1=vec4(0.9921568627450981,1,0.00784313725490196,1);const float e2=0.173;const vec4 v2=vec4(0.9686274509803922,1,0.00784313725490196,1);const float e3=0.337;const vec4 v3=vec4(0,0.9882352941176471,0.01568627450980392,1);const float e4=0.341;const vec4 v4=vec4(0,0.9882352941176471,0.0392156862745098,1);const float e5=0.506;const vec4 v5=vec4(0.00392156862745098,0.9764705882352941,1,1);const float e6=0.671;const vec4 v6=vec4(0.00784313725490196,0,0.9921568627450981,1);const float e7=0.675;const vec4 v7=vec4(0.03137254901960784,0,0.9921568627450981,1);const float e8=0.839;const vec4 v8=vec4(1,0,0.984313725490196,1);const float e9=0.843;const vec4 v9=vec4(1,0,0.9607843137254902,1);const float e10=1.0;const vec4 v10=vec4(1,0,0.023529411764705882,1);float a0=smoothstep(e0,e1,x_18);float a1=smoothstep(e1,e2,x_18);float a2=smoothstep(e2,e3,x_18);float a3=smoothstep(e3,e4,x_18);float a4=smoothstep(e4,e5,x_18);float a5=smoothstep(e5,e6,x_18);float a6=smoothstep(e6,e7,x_18);float a7=smoothstep(e7,e8,x_18);float a8=smoothstep(e8,e9,x_18);float a9=smoothstep(e9,e10,x_18);return max(mix(v0,v1,a0)*step(e0,x_18)*step(x_18,e1),max(mix(v1,v2,a1)*step(e1,x_18)*step(x_18,e2),max(mix(v2,v3,a2)*step(e2,x_18)*step(x_18,e3),max(mix(v3,v4,a3)*step(e3,x_18)*step(x_18,e4),max(mix(v4,v5,a4)*step(e4,x_18)*step(x_18,e5),max(mix(v5,v6,a5)*step(e5,x_18)*step(x_18,e6),max(mix(v6,v7,a6)*step(e6,x_18)*step(x_18,e7),max(mix(v7,v8,a7)*step(e7,x_18)*step(x_18,e8),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))))))))));}vec4 hot(float x_13){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.3;const vec4 v1=vec4(0.9019607843137255,0,0,1);const float e2=0.6;const vec4 v2=vec4(1,0.8235294117647058,0,1);const float e3=1.0;const vec4 v3=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_13);float a1=smoothstep(e1,e2,x_13);float a2=smoothstep(e2,e3,x_13);return max(mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1),max(mix(v1,v2,a1)*step(e1,x_13)*step(x_13,e2),mix(v2,v3,a2)*step(e2,x_13)*step(x_13,e3)));}vec4 cool(float x_24){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.13;const vec4 v1=vec4(0.4549019607843137,0,0.8549019607843137,1);const float e2=0.25;const vec4 v2=vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);const float e3=0.38;const vec4 v3=vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);const float e4=0.5;const vec4 v4=vec4(0,0.8,0.7725490196078432,1);const float e5=0.63;const vec4 v5=vec4(0,0.9686274509803922,0.5725490196078431,1);const float e6=0.75;const vec4 v6=vec4(0,1,0.34509803921568627,1);const float e7=0.88;const vec4 v7=vec4(0.1568627450980392,1,0.03137254901960784,1);const float e8=1.0;const vec4 v8=vec4(0.5764705882352941,1,0,1);float a0=smoothstep(e0,e1,x_24);float a1=smoothstep(e1,e2,x_24);float a2=smoothstep(e2,e3,x_24);float a3=smoothstep(e3,e4,x_24);float a4=smoothstep(e4,e5,x_24);float a5=smoothstep(e5,e6,x_24);float a6=smoothstep(e6,e7,x_24);float a7=smoothstep(e7,e8,x_24);return max(mix(v0,v1,a0)*step(e0,x_24)*step(x_24,e1),max(mix(v1,v2,a1)*step(e1,x_24)*step(x_24,e2),max(mix(v2,v3,a2)*step(e2,x_24)*step(x_24,e3),max(mix(v3,v4,a3)*step(e3,x_24)*step(x_24,e4),max(mix(v4,v5,a4)*step(e4,x_24)*step(x_24,e5),max(mix(v5,v6,a5)*step(e5,x_24)*step(x_24,e6),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))))))));}vec4 spring(float x_5){const float e0=0.0;const vec4 v0=vec4(1,0,1,1);const float e1=1.0;const vec4 v1=vec4(1,1,0,1);float a0=smoothstep(e0,e1,x_5);return mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1);}vec4 summer(float x_12){const float e0=0.0;const vec4 v0=vec4(0,0.5019607843137255,0.4,1);const float e1=1.0;const vec4 v1=vec4(1,1,0.4,1);float a0=smoothstep(e0,e1,x_12);return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);}vec4 autumn(float x_25){const float e0=0.0;const vec4 v0=vec4(1,0,0,1);const float e1=1.0;const vec4 v1=vec4(1,1,0,1);float a0=smoothstep(e0,e1,x_25);return mix(v0,v1,a0)*step(e0,x_25)*step(x_25,e1);}vec4 winter(float x_16){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=1.0;const vec4 v1=vec4(0,1,0.5019607843137255,1);float a0=smoothstep(e0,e1,x_16);return mix(v0,v1,a0)*step(e0,x_16)*step(x_16,e1);}vec4 bone(float x_15){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.376;const vec4 v1=vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);const float e2=0.753;const vec4 v2=vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);const float e3=1.0;const vec4 v3=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_15);float a1=smoothstep(e1,e2,x_15);float a2=smoothstep(e2,e3,x_15);return max(mix(v0,v1,a0)*step(e0,x_15)*step(x_15,e1),max(mix(v1,v2,a1)*step(e1,x_15)*step(x_15,e2),mix(v2,v3,a2)*step(e2,x_15)*step(x_15,e3)));}vec4 copper(float x_10){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.804;const vec4 v1=vec4(1,0.6274509803921569,0.4,1);const float e2=1.0;const vec4 v2=vec4(1,0.7803921568627451,0.4980392156862745,1);float a0=smoothstep(e0,e1,x_10);float a1=smoothstep(e1,e2,x_10);return max(mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1),mix(v1,v2,a1)*step(e1,x_10)*step(x_10,e2));}vec4 greys(float x_4){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=1.0;const vec4 v1=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_4);return mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1);}vec4 yignbu(float x_32){const float e0=0.0;const vec4 v0=vec4(0.03137254901960784,0.11372549019607843,0.34509803921568627,1);const float e1=0.125;const vec4 v1=vec4(0.1450980392156863,0.20392156862745098,0.5803921568627451,1);const float e2=0.25;const vec4 v2=vec4(0.13333333333333333,0.3686274509803922,0.6588235294117647,1);const float e3=0.375;const vec4 v3=vec4(0.11372549019607843,0.5686274509803921,0.7529411764705882,1);const float e4=0.5;const vec4 v4=vec4(0.2549019607843137,0.7137254901960784,0.7686274509803922,1);const float e5=0.625;const vec4 v5=vec4(0.4980392156862745,0.803921568627451,0.7333333333333333,1);const float e6=0.75;const vec4 v6=vec4(0.7803921568627451,0.9137254901960784,0.7058823529411765,1);const float e7=0.875;const vec4 v7=vec4(0.9294117647058824,0.9725490196078431,0.8509803921568627,1);const float e8=1.0;const vec4 v8=vec4(1,1,0.8509803921568627,1);float a0=smoothstep(e0,e1,x_32);float a1=smoothstep(e1,e2,x_32);float a2=smoothstep(e2,e3,x_32);float a3=smoothstep(e3,e4,x_32);float a4=smoothstep(e4,e5,x_32);float a5=smoothstep(e5,e6,x_32);float a6=smoothstep(e6,e7,x_32);float a7=smoothstep(e7,e8,x_32);return max(mix(v0,v1,a0)*step(e0,x_32)*step(x_32,e1),max(mix(v1,v2,a1)*step(e1,x_32)*step(x_32,e2),max(mix(v2,v3,a2)*step(e2,x_32)*step(x_32,e3),max(mix(v3,v4,a3)*step(e3,x_32)*step(x_32,e4),max(mix(v4,v5,a4)*step(e4,x_32)*step(x_32,e5),max(mix(v5,v6,a5)*step(e5,x_32)*step(x_32,e6),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))))))));}vec4 greens(float x_34){const float e0=0.0;const vec4 v0=vec4(0,0.26666666666666666,0.10588235294117647,1);const float e1=0.125;const vec4 v1=vec4(0,0.42745098039215684,0.17254901960784313,1);const float e2=0.25;const vec4 v2=vec4(0.13725490196078433,0.5450980392156862,0.27058823529411763,1);const float e3=0.375;const vec4 v3=vec4(0.2549019607843137,0.6705882352941176,0.36470588235294116,1);const float e4=0.5;const vec4 v4=vec4(0.4549019607843137,0.7686274509803922,0.4627450980392157,1);const float e5=0.625;const vec4 v5=vec4(0.6313725490196078,0.8509803921568627,0.6078431372549019,1);const float e6=0.75;const vec4 v6=vec4(0.7803921568627451,0.9137254901960784,0.7529411764705882,1);const float e7=0.875;const vec4 v7=vec4(0.8980392156862745,0.9607843137254902,0.8784313725490196,1);const float e8=1.0;const vec4 v8=vec4(0.9686274509803922,0.9882352941176471,0.9607843137254902,1);float a0=smoothstep(e0,e1,x_34);float a1=smoothstep(e1,e2,x_34);float a2=smoothstep(e2,e3,x_34);float a3=smoothstep(e3,e4,x_34);float a4=smoothstep(e4,e5,x_34);float a5=smoothstep(e5,e6,x_34);float a6=smoothstep(e6,e7,x_34);float a7=smoothstep(e7,e8,x_34);return max(mix(v0,v1,a0)*step(e0,x_34)*step(x_34,e1),max(mix(v1,v2,a1)*step(e1,x_34)*step(x_34,e2),max(mix(v2,v3,a2)*step(e2,x_34)*step(x_34,e3),max(mix(v3,v4,a3)*step(e3,x_34)*step(x_34,e4),max(mix(v4,v5,a4)*step(e4,x_34)*step(x_34,e5),max(mix(v5,v6,a5)*step(e5,x_34)*step(x_34,e6),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))))))));}vec4 yiorrd(float x_41){const float e0=0.0;const vec4 v0=vec4(0.5019607843137255,0,0.14901960784313725,1);const float e1=0.125;const vec4 v1=vec4(0.7411764705882353,0,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.8901960784313725,0.10196078431372549,0.10980392156862745,1);const float e3=0.375;const vec4 v3=vec4(0.9882352941176471,0.3058823529411765,0.16470588235294117,1);const float e4=0.5;const vec4 v4=vec4(0.9921568627450981,0.5529411764705883,0.23529411764705882,1);const float e5=0.625;const vec4 v5=vec4(0.996078431372549,0.6980392156862745,0.2980392156862745,1);const float e6=0.75;const vec4 v6=vec4(0.996078431372549,0.8509803921568627,0.4627450980392157,1);const float e7=0.875;const vec4 v7=vec4(1,0.9294117647058824,0.6274509803921569,1);const float e8=1.0;const vec4 v8=vec4(1,1,0.8,1);float a0=smoothstep(e0,e1,x_41);float a1=smoothstep(e1,e2,x_41);float a2=smoothstep(e2,e3,x_41);float a3=smoothstep(e3,e4,x_41);float a4=smoothstep(e4,e5,x_41);float a5=smoothstep(e5,e6,x_41);float a6=smoothstep(e6,e7,x_41);float a7=smoothstep(e7,e8,x_41);return max(mix(v0,v1,a0)*step(e0,x_41)*step(x_41,e1),max(mix(v1,v2,a1)*step(e1,x_41)*step(x_41,e2),max(mix(v2,v3,a2)*step(e2,x_41)*step(x_41,e3),max(mix(v3,v4,a3)*step(e3,x_41)*step(x_41,e4),max(mix(v4,v5,a4)*step(e4,x_41)*step(x_41,e5),max(mix(v5,v6,a5)*step(e5,x_41)*step(x_41,e6),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))))))));}vec4 bluered(float x_23){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=1.0;const vec4 v1=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_23);return mix(v0,v1,a0)*step(e0,x_23)*step(x_23,e1);}vec4 rdbu(float x_1){const float e0=0.0;const vec4 v0=vec4(0.0196078431372549,0.0392156862745098,0.6745098039215687,1);const float e1=0.35;const vec4 v1=vec4(0.41568627450980394,0.5372549019607843,0.9686274509803922,1);const float e2=0.5;const vec4 v2=vec4(0.7450980392156863,0.7450980392156863,0.7450980392156863,1);const float e3=0.6;const vec4 v3=vec4(0.8627450980392157,0.6666666666666666,0.5176470588235295,1);const float e4=0.7;const vec4 v4=vec4(0.9019607843137255,0.5686274509803921,0.35294117647058826,1);const float e5=1.0;const vec4 v5=vec4(0.6980392156862745,0.0392156862745098,0.10980392156862745,1);float a0=smoothstep(e0,e1,x_1);float a1=smoothstep(e1,e2,x_1);float a2=smoothstep(e2,e3,x_1);float a3=smoothstep(e3,e4,x_1);float a4=smoothstep(e4,e5,x_1);return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5)))));}vec4 picnic(float x_42){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=0.1;const vec4 v1=vec4(0.2,0.6,1,1);const float e2=0.2;const vec4 v2=vec4(0.4,0.8,1,1);const float e3=0.3;const vec4 v3=vec4(0.6,0.8,1,1);const float e4=0.4;const vec4 v4=vec4(0.8,0.8,1,1);const float e5=0.5;const vec4 v5=vec4(1,1,1,1);const float e6=0.6;const vec4 v6=vec4(1,0.8,1,1);const float e7=0.7;const vec4 v7=vec4(1,0.6,1,1);const float e8=0.8;const vec4 v8=vec4(1,0.4,0.8,1);const float e9=0.9;const vec4 v9=vec4(1,0.4,0.4,1);const float e10=1.0;const vec4 v10=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_42);float a1=smoothstep(e1,e2,x_42);float a2=smoothstep(e2,e3,x_42);float a3=smoothstep(e3,e4,x_42);float a4=smoothstep(e4,e5,x_42);float a5=smoothstep(e5,e6,x_42);float a6=smoothstep(e6,e7,x_42);float a7=smoothstep(e7,e8,x_42);float a8=smoothstep(e8,e9,x_42);float a9=smoothstep(e9,e10,x_42);return max(mix(v0,v1,a0)*step(e0,x_42)*step(x_42,e1),max(mix(v1,v2,a1)*step(e1,x_42)*step(x_42,e2),max(mix(v2,v3,a2)*step(e2,x_42)*step(x_42,e3),max(mix(v3,v4,a3)*step(e3,x_42)*step(x_42,e4),max(mix(v4,v5,a4)*step(e4,x_42)*step(x_42,e5),max(mix(v5,v6,a5)*step(e5,x_42)*step(x_42,e6),max(mix(v6,v7,a6)*step(e6,x_42)*step(x_42,e7),max(mix(v7,v8,a7)*step(e7,x_42)*step(x_42,e8),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))))))))));}vec4 rainbow(float x_31){const float e0=0.0;const vec4 v0=vec4(0.5882352941176471,0,0.35294117647058826,1);const float e1=0.125;const vec4 v1=vec4(0,0,0.7843137254901961,1);const float e2=0.25;const vec4 v2=vec4(0,0.09803921568627451,1,1);const float e3=0.375;const vec4 v3=vec4(0,0.596078431372549,1,1);const float e4=0.5;const vec4 v4=vec4(0.17254901960784313,1,0.5882352941176471,1);const float e5=0.625;const vec4 v5=vec4(0.592156862745098,1,0,1);const float e6=0.75;const vec4 v6=vec4(1,0.9176470588235294,0,1);const float e7=0.875;const vec4 v7=vec4(1,0.43529411764705883,0,1);const float e8=1.0;const vec4 v8=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_31);float a1=smoothstep(e1,e2,x_31);float a2=smoothstep(e2,e3,x_31);float a3=smoothstep(e3,e4,x_31);float a4=smoothstep(e4,e5,x_31);float a5=smoothstep(e5,e6,x_31);float a6=smoothstep(e6,e7,x_31);float a7=smoothstep(e7,e8,x_31);return max(mix(v0,v1,a0)*step(e0,x_31)*step(x_31,e1),max(mix(v1,v2,a1)*step(e1,x_31)*step(x_31,e2),max(mix(v2,v3,a2)*step(e2,x_31)*step(x_31,e3),max(mix(v3,v4,a3)*step(e3,x_31)*step(x_31,e4),max(mix(v4,v5,a4)*step(e4,x_31)*step(x_31,e5),max(mix(v5,v6,a5)*step(e5,x_31)*step(x_31,e6),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))))))));}vec4 portland(float x_21){const float e0=0.0;const vec4 v0=vec4(0.047058823529411764,0.2,0.5137254901960784,1);const float e1=0.25;const vec4 v1=vec4(0.0392156862745098,0.5333333333333333,0.7294117647058823,1);const float e2=0.5;const vec4 v2=vec4(0.9490196078431372,0.8274509803921568,0.2196078431372549,1);const float e3=0.75;const vec4 v3=vec4(0.9490196078431372,0.5607843137254902,0.2196078431372549,1);const float e4=1.0;const vec4 v4=vec4(0.8509803921568627,0.11764705882352941,0.11764705882352941,1);float a0=smoothstep(e0,e1,x_21);float a1=smoothstep(e1,e2,x_21);float a2=smoothstep(e2,e3,x_21);float a3=smoothstep(e3,e4,x_21);return max(mix(v0,v1,a0)*step(e0,x_21)*step(x_21,e1),max(mix(v1,v2,a1)*step(e1,x_21)*step(x_21,e2),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))));}vec4 blackbody(float x_38){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.2;const vec4 v1=vec4(0.9019607843137255,0,0,1);const float e2=0.4;const vec4 v2=vec4(0.9019607843137255,0.8235294117647058,0,1);const float e3=0.7;const vec4 v3=vec4(1,1,1,1);const float e4=1.0;const vec4 v4=vec4(0.6274509803921569,0.7843137254901961,1,1);float a0=smoothstep(e0,e1,x_38);float a1=smoothstep(e1,e2,x_38);float a2=smoothstep(e2,e3,x_38);float a3=smoothstep(e3,e4,x_38);return max(mix(v0,v1,a0)*step(e0,x_38)*step(x_38,e1),max(mix(v1,v2,a1)*step(e1,x_38)*step(x_38,e2),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))));}vec4 earth(float x_29){const float e0=0.0;const vec4 v0=vec4(0,0,0.5098039215686274,1);const float e1=0.1;const vec4 v1=vec4(0,0.7058823529411765,0.7058823529411765,1);const float e2=0.2;const vec4 v2=vec4(0.1568627450980392,0.8235294117647058,0.1568627450980392,1);const float e3=0.4;const vec4 v3=vec4(0.9019607843137255,0.9019607843137255,0.19607843137254902,1);const float e4=0.6;const vec4 v4=vec4(0.47058823529411764,0.27450980392156865,0.0784313725490196,1);const float e5=1.0;const vec4 v5=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_29);float a1=smoothstep(e1,e2,x_29);float a2=smoothstep(e2,e3,x_29);float a3=smoothstep(e3,e4,x_29);float a4=smoothstep(e4,e5,x_29);return max(mix(v0,v1,a0)*step(e0,x_29)*step(x_29,e1),max(mix(v1,v2,a1)*step(e1,x_29)*step(x_29,e2),max(mix(v2,v3,a2)*step(e2,x_29)*step(x_29,e3),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)))));}vec4 electric(float x_9){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.15;const vec4 v1=vec4(0.11764705882352941,0,0.39215686274509803,1);const float e2=0.4;const vec4 v2=vec4(0.47058823529411764,0,0.39215686274509803,1);const float e3=0.6;const vec4 v3=vec4(0.6274509803921569,0.35294117647058826,0,1);const float e4=0.8;const vec4 v4=vec4(0.9019607843137255,0.7843137254901961,0,1);const float e5=1.0;const vec4 v5=vec4(1,0.9803921568627451,0.8627450980392157,1);float a0=smoothstep(e0,e1,x_9);float a1=smoothstep(e1,e2,x_9);float a2=smoothstep(e2,e3,x_9);float a3=smoothstep(e3,e4,x_9);float a4=smoothstep(e4,e5,x_9);return max(mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1),max(mix(v1,v2,a1)*step(e1,x_9)*step(x_9,e2),max(mix(v2,v3,a2)*step(e2,x_9)*step(x_9,e3),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)))));}vec4 alpha(float x_0){const float e0=0.0;const vec4 v0=vec4(1,1,1,0);const float e1=1.0;const vec4 v1=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_0);return mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1);}vec4 viridis(float x_22){const float e0=0.0;const vec4 v0=vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);const float e1=0.13;const vec4 v1=vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);const float e2=0.25;const vec4 v2=vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);const float e4=0.5;const vec4 v4=vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);const float e5=0.63;const vec4 v5=vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);const float e6=0.75;const vec4 v6=vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);const float e7=0.88;const vec4 v7=vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);float a0=smoothstep(e0,e1,x_22);float a1=smoothstep(e1,e2,x_22);float a2=smoothstep(e2,e3,x_22);float a3=smoothstep(e3,e4,x_22);float a4=smoothstep(e4,e5,x_22);float a5=smoothstep(e5,e6,x_22);float a6=smoothstep(e6,e7,x_22);float a7=smoothstep(e7,e8,x_22);return max(mix(v0,v1,a0)*step(e0,x_22)*step(x_22,e1),max(mix(v1,v2,a1)*step(e1,x_22)*step(x_22,e2),max(mix(v2,v3,a2)*step(e2,x_22)*step(x_22,e3),max(mix(v3,v4,a3)*step(e3,x_22)*step(x_22,e4),max(mix(v4,v5,a4)*step(e4,x_22)*step(x_22,e5),max(mix(v5,v6,a5)*step(e5,x_22)*step(x_22,e6),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))))))));}vec4 inferno(float x_30){const float e0=0.0;const vec4 v0=vec4(0,0,0.01568627450980392,1);const float e1=0.13;const vec4 v1=vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);const float e2=0.25;const vec4 v2=vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);const float e3=0.38;const vec4 v3=vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);const float e4=0.5;const vec4 v4=vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);const float e5=0.63;const vec4 v5=vec4(0.8901960784313725,0.34901960784313724,0.2,1);const float e6=0.75;const vec4 v6=vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);const float e8=1.0;const vec4 v8=vec4(0.9882352941176471,1,0.6431372549019608,1);float a0=smoothstep(e0,e1,x_30);float a1=smoothstep(e1,e2,x_30);float a2=smoothstep(e2,e3,x_30);float a3=smoothstep(e3,e4,x_30);float a4=smoothstep(e4,e5,x_30);float a5=smoothstep(e5,e6,x_30);float a6=smoothstep(e6,e7,x_30);float a7=smoothstep(e7,e8,x_30);return max(mix(v0,v1,a0)*step(e0,x_30)*step(x_30,e1),max(mix(v1,v2,a1)*step(e1,x_30)*step(x_30,e2),max(mix(v2,v3,a2)*step(e2,x_30)*step(x_30,e3),max(mix(v3,v4,a3)*step(e3,x_30)*step(x_30,e4),max(mix(v4,v5,a4)*step(e4,x_30)*step(x_30,e5),max(mix(v5,v6,a5)*step(e5,x_30)*step(x_30,e6),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))))))));}vec4 magma(float x_33){const float e0=0.0;const vec4 v0=vec4(0,0,0.01568627450980392,1);const float e1=0.13;const vec4 v1=vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);const float e2=0.25;const vec4 v2=vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);const float e3=0.38;const vec4 v3=vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);const float e4=0.5;const vec4 v4=vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);const float e5=0.63;const vec4 v5=vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);const float e6=0.75;const vec4 v6=vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);const float e8=1.0;const vec4 v8=vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);float a0=smoothstep(e0,e1,x_33);float a1=smoothstep(e1,e2,x_33);float a2=smoothstep(e2,e3,x_33);float a3=smoothstep(e3,e4,x_33);float a4=smoothstep(e4,e5,x_33);float a5=smoothstep(e5,e6,x_33);float a6=smoothstep(e6,e7,x_33);float a7=smoothstep(e7,e8,x_33);return max(mix(v0,v1,a0)*step(e0,x_33)*step(x_33,e1),max(mix(v1,v2,a1)*step(e1,x_33)*step(x_33,e2),max(mix(v2,v3,a2)*step(e2,x_33)*step(x_33,e3),max(mix(v3,v4,a3)*step(e3,x_33)*step(x_33,e4),max(mix(v4,v5,a4)*step(e4,x_33)*step(x_33,e5),max(mix(v5,v6,a5)*step(e5,x_33)*step(x_33,e6),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))))))));}vec4 plasma(float x_3){const float e0=0.0;const vec4 v0=vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);const float e1=0.13;const vec4 v1=vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);const float e2=0.25;const vec4 v2=vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);const float e3=0.38;const vec4 v3=vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);const float e4=0.5;const vec4 v4=vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);const float e5=0.63;const vec4 v5=vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);const float e6=0.75;const vec4 v6=vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);const float e7=0.88;const vec4 v7=vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);const float e8=1.0;const vec4 v8=vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);float a0=smoothstep(e0,e1,x_3);float a1=smoothstep(e1,e2,x_3);float a2=smoothstep(e2,e3,x_3);float a3=smoothstep(e3,e4,x_3);float a4=smoothstep(e4,e5,x_3);float a5=smoothstep(e5,e6,x_3);float a6=smoothstep(e6,e7,x_3);float a7=smoothstep(e7,e8,x_3);return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),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))))))));}vec4 warm(float x_43){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.13;const vec4 v1=vec4(0.6745098039215687,0,0.7333333333333333,1);const float e2=0.25;const vec4 v2=vec4(0.8588235294117647,0,0.6666666666666666,1);const float e3=0.38;const vec4 v3=vec4(1,0,0.5098039215686274,1);const float e4=0.5;const vec4 v4=vec4(1,0.24705882352941178,0.2901960784313726,1);const float e5=0.63;const vec4 v5=vec4(1,0.4823529411764706,0,1);const float e6=0.75;const vec4 v6=vec4(0.9176470588235294,0.6901960784313725,0,1);const float e7=0.88;const vec4 v7=vec4(0.7450980392156863,0.8941176470588236,0,1);const float e8=1.0;const vec4 v8=vec4(0.5764705882352941,1,0,1);float a0=smoothstep(e0,e1,x_43);float a1=smoothstep(e1,e2,x_43);float a2=smoothstep(e2,e3,x_43);float a3=smoothstep(e3,e4,x_43);float a4=smoothstep(e4,e5,x_43);float a5=smoothstep(e5,e6,x_43);float a6=smoothstep(e6,e7,x_43);float a7=smoothstep(e7,e8,x_43);return max(mix(v0,v1,a0)*step(e0,x_43)*step(x_43,e1),max(mix(v1,v2,a1)*step(e1,x_43)*step(x_43,e2),max(mix(v2,v3,a2)*step(e2,x_43)*step(x_43,e3),max(mix(v3,v4,a3)*step(e3,x_43)*step(x_43,e4),max(mix(v4,v5,a4)*step(e4,x_43)*step(x_43,e5),max(mix(v5,v6,a5)*step(e5,x_43)*step(x_43,e6),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))))))));}vec4 rainbow_soft_1310269270(float x_14){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.1;const vec4 v1=vec4(0.7803921568627451,0,0.7058823529411765,1);const float e2=0.2;const vec4 v2=vec4(1,0,0.4745098039215686,1);const float e3=0.3;const vec4 v3=vec4(1,0.4235294117647059,0,1);const float e4=0.4;const vec4 v4=vec4(0.8705882352941177,0.7607843137254902,0,1);const float e5=0.5;const vec4 v5=vec4(0.5882352941176471,1,0,1);const float e6=0.6;const vec4 v6=vec4(0,1,0.21568627450980393,1);const float e7=0.7;const vec4 v7=vec4(0,0.9647058823529412,0.5882352941176471,1);const float e8=0.8;const vec4 v8=vec4(0.19607843137254902,0.6549019607843137,0.8705882352941177,1);const float e9=0.9;const vec4 v9=vec4(0.403921568627451,0.2,0.9215686274509803,1);const float e10=1.0;const vec4 v10=vec4(0.48627450980392156,0,0.7294117647058823,1);float a0=smoothstep(e0,e1,x_14);float a1=smoothstep(e1,e2,x_14);float a2=smoothstep(e2,e3,x_14);float a3=smoothstep(e3,e4,x_14);float a4=smoothstep(e4,e5,x_14);float a5=smoothstep(e5,e6,x_14);float a6=smoothstep(e6,e7,x_14);float a7=smoothstep(e7,e8,x_14);float a8=smoothstep(e8,e9,x_14);float a9=smoothstep(e9,e10,x_14);return max(mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1),max(mix(v1,v2,a1)*step(e1,x_14)*step(x_14,e2),max(mix(v2,v3,a2)*step(e2,x_14)*step(x_14,e3),max(mix(v3,v4,a3)*step(e3,x_14)*step(x_14,e4),max(mix(v4,v5,a4)*step(e4,x_14)*step(x_14,e5),max(mix(v5,v6,a5)*step(e5,x_14)*step(x_14,e6),max(mix(v6,v7,a6)*step(e6,x_14)*step(x_14,e7),max(mix(v7,v8,a7)*step(e7,x_14)*step(x_14,e8),max(mix(v8,v9,a8)*step(e8,x_14)*step(x_14,e9),mix(v9,v10,a9)*step(e9,x_14)*step(x_14,e10))))))))));}vec4 bathymetry(float x_36){const float e0=0.0;const vec4 v0=vec4(0.1568627450980392,0.10196078431372549,0.17254901960784313,1);const float e1=0.13;const vec4 v1=vec4(0.23137254901960785,0.19215686274509805,0.35294117647058826,1);const float e2=0.25;const vec4 v2=vec4(0.25098039215686274,0.2980392156862745,0.5450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.24705882352941178,0.43137254901960786,0.592156862745098,1);const float e4=0.5;const vec4 v4=vec4(0.2823529411764706,0.5568627450980392,0.6196078431372549,1);const float e5=0.63;const vec4 v5=vec4(0.3333333333333333,0.6823529411764706,0.6392156862745098,1);const float e6=0.75;const vec4 v6=vec4(0.47058823529411764,0.807843137254902,0.6392156862745098,1);const float e7=0.88;const vec4 v7=vec4(0.7333333333333333,0.9019607843137255,0.6745098039215687,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.996078431372549,0.8,1);float a0=smoothstep(e0,e1,x_36);float a1=smoothstep(e1,e2,x_36);float a2=smoothstep(e2,e3,x_36);float a3=smoothstep(e3,e4,x_36);float a4=smoothstep(e4,e5,x_36);float a5=smoothstep(e5,e6,x_36);float a6=smoothstep(e6,e7,x_36);float a7=smoothstep(e7,e8,x_36);return max(mix(v0,v1,a0)*step(e0,x_36)*step(x_36,e1),max(mix(v1,v2,a1)*step(e1,x_36)*step(x_36,e2),max(mix(v2,v3,a2)*step(e2,x_36)*step(x_36,e3),max(mix(v3,v4,a3)*step(e3,x_36)*step(x_36,e4),max(mix(v4,v5,a4)*step(e4,x_36)*step(x_36,e5),max(mix(v5,v6,a5)*step(e5,x_36)*step(x_36,e6),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))))))));}vec4 cdom(float x_7){const float e0=0.0;const vec4 v0=vec4(0.1843137254901961,0.058823529411764705,0.24313725490196078,1);const float e1=0.13;const vec4 v1=vec4(0.3411764705882353,0.09019607843137255,0.33725490196078434,1);const float e2=0.25;const vec4 v2=vec4(0.5098039215686274,0.10980392156862745,0.38823529411764707,1);const float e3=0.38;const vec4 v3=vec4(0.6705882352941176,0.1607843137254902,0.3764705882352941,1);const float e4=0.5;const vec4 v4=vec4(0.807843137254902,0.2627450980392157,0.33725490196078434,1);const float e5=0.63;const vec4 v5=vec4(0.9019607843137255,0.41568627450980394,0.32941176470588235,1);const float e6=0.75;const vec4 v6=vec4(0.9490196078431372,0.5843137254901961,0.403921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.7568627450980392,0.5294117647058824,1);const float e8=1.0;const vec4 v8=vec4(0.996078431372549,0.9294117647058824,0.6901960784313725,1);float a0=smoothstep(e0,e1,x_7);float a1=smoothstep(e1,e2,x_7);float a2=smoothstep(e2,e3,x_7);float a3=smoothstep(e3,e4,x_7);float a4=smoothstep(e4,e5,x_7);float a5=smoothstep(e5,e6,x_7);float a6=smoothstep(e6,e7,x_7);float a7=smoothstep(e7,e8,x_7);return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),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))))))));}vec4 chlorophyll(float x_6){const float e0=0.0;const vec4 v0=vec4(0.07058823529411765,0.1411764705882353,0.0784313725490196,1);const float e1=0.13;const vec4 v1=vec4(0.09803921568627451,0.24705882352941178,0.1607843137254902,1);const float e2=0.25;const vec4 v2=vec4(0.09411764705882353,0.3568627450980392,0.23137254901960785,1);const float e3=0.38;const vec4 v3=vec4(0.050980392156862744,0.4666666666666667,0.2823529411764706,1);const float e4=0.5;const vec4 v4=vec4(0.07058823529411765,0.5803921568627451,0.3137254901960784,1);const float e5=0.63;const vec4 v5=vec4(0.3137254901960784,0.6784313725490196,0.34901960784313724,1);const float e6=0.75;const vec4 v6=vec4(0.5176470588235295,0.7686274509803922,0.47843137254901963,1);const float e7=0.88;const vec4 v7=vec4(0.6862745098039216,0.8666666666666667,0.6352941176470588,1);const float e8=1.0;const vec4 v8=vec4(0.8431372549019608,0.9764705882352941,0.8156862745098039,1);float a0=smoothstep(e0,e1,x_6);float a1=smoothstep(e1,e2,x_6);float a2=smoothstep(e2,e3,x_6);float a3=smoothstep(e3,e4,x_6);float a4=smoothstep(e4,e5,x_6);float a5=smoothstep(e5,e6,x_6);float a6=smoothstep(e6,e7,x_6);float a7=smoothstep(e7,e8,x_6);return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),max(mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2),max(mix(v2,v3,a2)*step(e2,x_6)*step(x_6,e3),max(mix(v3,v4,a3)*step(e3,x_6)*step(x_6,e4),max(mix(v4,v5,a4)*step(e4,x_6)*step(x_6,e5),max(mix(v5,v6,a5)*step(e5,x_6)*step(x_6,e6),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))))))));}vec4 density(float x_19){const float e0=0.0;const vec4 v0=vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);const float e1=0.13;const vec4 v1=vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);const float e2=0.25;const vec4 v2=vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);const float e3=0.38;const vec4 v3=vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);const float e4=0.5;const vec4 v4=vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);const float e5=0.63;const vec4 v5=vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);const float e6=0.75;const vec4 v6=vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);const float e7=0.88;const vec4 v7=vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);const float e8=1.0;const vec4 v8=vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);float a0=smoothstep(e0,e1,x_19);float a1=smoothstep(e1,e2,x_19);float a2=smoothstep(e2,e3,x_19);float a3=smoothstep(e3,e4,x_19);float a4=smoothstep(e4,e5,x_19);float a5=smoothstep(e5,e6,x_19);float a6=smoothstep(e6,e7,x_19);float a7=smoothstep(e7,e8,x_19);return max(mix(v0,v1,a0)*step(e0,x_19)*step(x_19,e1),max(mix(v1,v2,a1)*step(e1,x_19)*step(x_19,e2),max(mix(v2,v3,a2)*step(e2,x_19)*step(x_19,e3),max(mix(v3,v4,a3)*step(e3,x_19)*step(x_19,e4),max(mix(v4,v5,a4)*step(e4,x_19)*step(x_19,e5),max(mix(v5,v6,a5)*step(e5,x_19)*step(x_19,e6),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))))))));}vec4 freesurface_blue_3154355989(float x_35){const float e0=0.0;const vec4 v0=vec4(0.11764705882352941,0.01568627450980392,0.43137254901960786,1);const float e1=0.13;const vec4 v1=vec4(0.1843137254901961,0.054901960784313725,0.6901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.1607843137254902,0.17647058823529413,0.9254901960784314,1);const float e3=0.38;const vec4 v3=vec4(0.09803921568627451,0.38823529411764707,0.8313725490196079,1);const float e4=0.5;const vec4 v4=vec4(0.26666666666666666,0.5137254901960784,0.7843137254901961,1);const float e5=0.63;const vec4 v5=vec4(0.4470588235294118,0.611764705882353,0.7725490196078432,1);const float e6=0.75;const vec4 v6=vec4(0.615686274509804,0.7098039215686275,0.796078431372549,1);const float e7=0.88;const vec4 v7=vec4(0.7843137254901961,0.8156862745098039,0.8470588235294118,1);const float e8=1.0;const vec4 v8=vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);float a0=smoothstep(e0,e1,x_35);float a1=smoothstep(e1,e2,x_35);float a2=smoothstep(e2,e3,x_35);float a3=smoothstep(e3,e4,x_35);float a4=smoothstep(e4,e5,x_35);float a5=smoothstep(e5,e6,x_35);float a6=smoothstep(e6,e7,x_35);float a7=smoothstep(e7,e8,x_35);return max(mix(v0,v1,a0)*step(e0,x_35)*step(x_35,e1),max(mix(v1,v2,a1)*step(e1,x_35)*step(x_35,e2),max(mix(v2,v3,a2)*step(e2,x_35)*step(x_35,e3),max(mix(v3,v4,a3)*step(e3,x_35)*step(x_35,e4),max(mix(v4,v5,a4)*step(e4,x_35)*step(x_35,e5),max(mix(v5,v6,a5)*step(e5,x_35)*step(x_35,e6),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))))))));}vec4 freesurface_red_1679163293(float x_20){const float e0=0.0;const vec4 v0=vec4(0.23529411764705882,0.03529411764705882,0.07058823529411765,1);const float e1=0.13;const vec4 v1=vec4(0.39215686274509803,0.06666666666666667,0.10588235294117647,1);const float e2=0.25;const vec4 v2=vec4(0.5568627450980392,0.0784313725490196,0.11372549019607843,1);const float e3=0.38;const vec4 v3=vec4(0.6941176470588235,0.16862745098039217,0.10588235294117647,1);const float e4=0.5;const vec4 v4=vec4(0.7529411764705882,0.3411764705882353,0.24705882352941178,1);const float e5=0.63;const vec4 v5=vec4(0.803921568627451,0.49019607843137253,0.4117647058823529,1);const float e6=0.75;const vec4 v6=vec4(0.8470588235294118,0.6352941176470588,0.5803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.8901960784313725,0.7803921568627451,0.7568627450980392,1);const float e8=1.0;const vec4 v8=vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);float a0=smoothstep(e0,e1,x_20);float a1=smoothstep(e1,e2,x_20);float a2=smoothstep(e2,e3,x_20);float a3=smoothstep(e3,e4,x_20);float a4=smoothstep(e4,e5,x_20);float a5=smoothstep(e5,e6,x_20);float a6=smoothstep(e6,e7,x_20);float a7=smoothstep(e7,e8,x_20);return max(mix(v0,v1,a0)*step(e0,x_20)*step(x_20,e1),max(mix(v1,v2,a1)*step(e1,x_20)*step(x_20,e2),max(mix(v2,v3,a2)*step(e2,x_20)*step(x_20,e3),max(mix(v3,v4,a3)*step(e3,x_20)*step(x_20,e4),max(mix(v4,v5,a4)*step(e4,x_20)*step(x_20,e5),max(mix(v5,v6,a5)*step(e5,x_20)*step(x_20,e6),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))))))));}vec4 oxygen(float x_11){const float e0=0.0;const vec4 v0=vec4(0.25098039215686274,0.0196078431372549,0.0196078431372549,1);const float e1=0.13;const vec4 v1=vec4(0.41568627450980394,0.023529411764705882,0.058823529411764705,1);const float e2=0.25;const vec4 v2=vec4(0.5647058823529412,0.10196078431372549,0.027450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.6588235294117647,0.25098039215686274,0.011764705882352941,1);const float e4=0.5;const vec4 v4=vec4(0.7372549019607844,0.39215686274509803,0.01568627450980392,1);const float e5=0.63;const vec4 v5=vec4(0.807843137254902,0.5333333333333333,0.043137254901960784,1);const float e6=0.75;const vec4 v6=vec4(0.8627450980392157,0.6823529411764706,0.09803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.9058823529411765,0.8431372549019608,0.17254901960784313,1);const float e8=1.0;const vec4 v8=vec4(0.9725490196078431,0.996078431372549,0.4117647058823529,1);float a0=smoothstep(e0,e1,x_11);float a1=smoothstep(e1,e2,x_11);float a2=smoothstep(e2,e3,x_11);float a3=smoothstep(e3,e4,x_11);float a4=smoothstep(e4,e5,x_11);float a5=smoothstep(e5,e6,x_11);float a6=smoothstep(e6,e7,x_11);float a7=smoothstep(e7,e8,x_11);return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),max(mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3),max(mix(v3,v4,a3)*step(e3,x_11)*step(x_11,e4),max(mix(v4,v5,a4)*step(e4,x_11)*step(x_11,e5),max(mix(v5,v6,a5)*step(e5,x_11)*step(x_11,e6),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))))))));}vec4 par(float x_28){const float e0=0.0;const vec4 v0=vec4(0.2,0.0784313725490196,0.09411764705882353,1);const float e1=0.13;const vec4 v1=vec4(0.35294117647058826,0.12549019607843137,0.13725490196078433,1);const float e2=0.25;const vec4 v2=vec4(0.5058823529411764,0.17254901960784313,0.13333333333333333,1);const float e3=0.38;const vec4 v3=vec4(0.6235294117647059,0.26666666666666666,0.09803921568627451,1);const float e4=0.5;const vec4 v4=vec4(0.7137254901960784,0.38823529411764707,0.07450980392156863,1);const float e5=0.63;const vec4 v5=vec4(0.7803921568627451,0.5254901960784314,0.08627450980392157,1);const float e6=0.75;const vec4 v6=vec4(0.8313725490196079,0.6705882352941176,0.13725490196078433,1);const float e7=0.88;const vec4 v7=vec4(0.8666666666666667,0.8235294117647058,0.21176470588235294,1);const float e8=1.0;const vec4 v8=vec4(0.8823529411764706,0.9921568627450981,0.29411764705882354,1);float a0=smoothstep(e0,e1,x_28);float a1=smoothstep(e1,e2,x_28);float a2=smoothstep(e2,e3,x_28);float a3=smoothstep(e3,e4,x_28);float a4=smoothstep(e4,e5,x_28);float a5=smoothstep(e5,e6,x_28);float a6=smoothstep(e6,e7,x_28);float a7=smoothstep(e7,e8,x_28);return max(mix(v0,v1,a0)*step(e0,x_28)*step(x_28,e1),max(mix(v1,v2,a1)*step(e1,x_28)*step(x_28,e2),max(mix(v2,v3,a2)*step(e2,x_28)*step(x_28,e3),max(mix(v3,v4,a3)*step(e3,x_28)*step(x_28,e4),max(mix(v4,v5,a4)*step(e4,x_28)*step(x_28,e5),max(mix(v5,v6,a5)*step(e5,x_28)*step(x_28,e6),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))))))));}vec4 phase(float x_39){const float e0=0.0;const vec4 v0=vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);const float e1=0.13;const vec4 v1=vec4(0.7215686274509804,0.2784313725490196,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.7294117647058823,0.22745098039215686,0.45098039215686275,1);const float e3=0.38;const vec4 v3=vec4(0.6274509803921569,0.2784313725490196,0.7254901960784313,1);const float e4=0.5;const vec4 v4=vec4(0.43137254901960786,0.3803921568627451,0.8549019607843137,1);const float e5=0.63;const vec4 v5=vec4(0.19607843137254902,0.4823529411764706,0.6431372549019608,1);const float e6=0.75;const vec4 v6=vec4(0.12156862745098039,0.5137254901960784,0.43137254901960786,1);const float e7=0.88;const vec4 v7=vec4(0.30196078431372547,0.5058823529411764,0.13333333333333333,1);const float e8=1.0;const vec4 v8=vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);float a0=smoothstep(e0,e1,x_39);float a1=smoothstep(e1,e2,x_39);float a2=smoothstep(e2,e3,x_39);float a3=smoothstep(e3,e4,x_39);float a4=smoothstep(e4,e5,x_39);float a5=smoothstep(e5,e6,x_39);float a6=smoothstep(e6,e7,x_39);float a7=smoothstep(e7,e8,x_39);return max(mix(v0,v1,a0)*step(e0,x_39)*step(x_39,e1),max(mix(v1,v2,a1)*step(e1,x_39)*step(x_39,e2),max(mix(v2,v3,a2)*step(e2,x_39)*step(x_39,e3),max(mix(v3,v4,a3)*step(e3,x_39)*step(x_39,e4),max(mix(v4,v5,a4)*step(e4,x_39)*step(x_39,e5),max(mix(v5,v6,a5)*step(e5,x_39)*step(x_39,e6),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))))))));}vec4 salinity(float x_26){const float e0=0.0;const vec4 v0=vec4(0.16470588235294117,0.09411764705882353,0.4235294117647059,1);const float e1=0.13;const vec4 v1=vec4(0.12941176470588237,0.19607843137254902,0.6352941176470588,1);const float e2=0.25;const vec4 v2=vec4(0.058823529411764705,0.35294117647058826,0.5686274509803921,1);const float e3=0.38;const vec4 v3=vec4(0.1568627450980392,0.4627450980392157,0.5372549019607843,1);const float e4=0.5;const vec4 v4=vec4(0.23137254901960785,0.5725490196078431,0.5294117647058824,1);const float e5=0.63;const vec4 v5=vec4(0.30980392156862746,0.6862745098039216,0.49411764705882355,1);const float e6=0.75;const vec4 v6=vec4(0.47058823529411764,0.796078431372549,0.40784313725490196,1);const float e7=0.88;const vec4 v7=vec4(0.7568627450980392,0.8666666666666667,0.39215686274509803,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.9372549019607843,0.6039215686274509,1);float a0=smoothstep(e0,e1,x_26);float a1=smoothstep(e1,e2,x_26);float a2=smoothstep(e2,e3,x_26);float a3=smoothstep(e3,e4,x_26);float a4=smoothstep(e4,e5,x_26);float a5=smoothstep(e5,e6,x_26);float a6=smoothstep(e6,e7,x_26);float a7=smoothstep(e7,e8,x_26);return max(mix(v0,v1,a0)*step(e0,x_26)*step(x_26,e1),max(mix(v1,v2,a1)*step(e1,x_26)*step(x_26,e2),max(mix(v2,v3,a2)*step(e2,x_26)*step(x_26,e3),max(mix(v3,v4,a3)*step(e3,x_26)*step(x_26,e4),max(mix(v4,v5,a4)*step(e4,x_26)*step(x_26,e5),max(mix(v5,v6,a5)*step(e5,x_26)*step(x_26,e6),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))))))));}vec4 temperature(float x_8){const float e0=0.0;const vec4 v0=vec4(0.01568627450980392,0.13725490196078433,0.2,1);const float e1=0.13;const vec4 v1=vec4(0.09019607843137255,0.2,0.47843137254901963,1);const float e2=0.25;const vec4 v2=vec4(0.3333333333333333,0.23137254901960785,0.615686274509804,1);const float e3=0.38;const vec4 v3=vec4(0.5058823529411764,0.30980392156862746,0.5607843137254902,1);const float e4=0.5;const vec4 v4=vec4(0.6862745098039216,0.37254901960784315,0.5098039215686274,1);const float e5=0.63;const vec4 v5=vec4(0.8705882352941177,0.4392156862745098,0.396078431372549,1);const float e6=0.75;const vec4 v6=vec4(0.9764705882352941,0.5725490196078431,0.25882352941176473,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.7686274509803922,0.2549019607843137,1);const float e8=1.0;const vec4 v8=vec4(0.9098039215686274,0.9803921568627451,0.3568627450980392,1);float a0=smoothstep(e0,e1,x_8);float a1=smoothstep(e1,e2,x_8);float a2=smoothstep(e2,e3,x_8);float a3=smoothstep(e3,e4,x_8);float a4=smoothstep(e4,e5,x_8);float a5=smoothstep(e5,e6,x_8);float a6=smoothstep(e6,e7,x_8);float a7=smoothstep(e7,e8,x_8);return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),max(mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5),max(mix(v5,v6,a5)*step(e5,x_8)*step(x_8,e6),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))))))));}vec4 turbidity(float x_40){const float e0=0.0;const vec4 v0=vec4(0.13333333333333333,0.12156862745098039,0.10588235294117647,1);const float e1=0.13;const vec4 v1=vec4(0.2549019607843137,0.19607843137254902,0.1607843137254902,1);const float e2=0.25;const vec4 v2=vec4(0.3843137254901961,0.27058823529411763,0.20392156862745098,1);const float e3=0.38;const vec4 v3=vec4(0.5137254901960784,0.34901960784313724,0.2235294117647059,1);const float e4=0.5;const vec4 v4=vec4(0.6313725490196078,0.4392156862745098,0.23137254901960785,1);const float e5=0.63;const vec4 v5=vec4(0.7254901960784313,0.5490196078431373,0.25882352941176473,1);const float e6=0.75;const vec4 v6=vec4(0.792156862745098,0.6823529411764706,0.34509803921568627,1);const float e7=0.88;const vec4 v7=vec4(0.8470588235294118,0.8196078431372549,0.49411764705882355,1);const float e8=1.0;const vec4 v8=vec4(0.9137254901960784,0.9647058823529412,0.6705882352941176,1);float a0=smoothstep(e0,e1,x_40);float a1=smoothstep(e1,e2,x_40);float a2=smoothstep(e2,e3,x_40);float a3=smoothstep(e3,e4,x_40);float a4=smoothstep(e4,e5,x_40);float a5=smoothstep(e5,e6,x_40);float a6=smoothstep(e6,e7,x_40);float a7=smoothstep(e7,e8,x_40);return max(mix(v0,v1,a0)*step(e0,x_40)*step(x_40,e1),max(mix(v1,v2,a1)*step(e1,x_40)*step(x_40,e2),max(mix(v2,v3,a2)*step(e2,x_40)*step(x_40,e3),max(mix(v3,v4,a3)*step(e3,x_40)*step(x_40,e4),max(mix(v4,v5,a4)*step(e4,x_40)*step(x_40,e5),max(mix(v5,v6,a5)*step(e5,x_40)*step(x_40,e6),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))))))));}vec4 velocity_blue_297387650(float x_2){const float e0=0.0;const vec4 v0=vec4(0.06666666666666667,0.12549019607843137,0.25098039215686274,1);const float e1=0.13;const vec4 v1=vec4(0.13725490196078433,0.20392156862745098,0.4549019607843137,1);const float e2=0.25;const vec4 v2=vec4(0.11372549019607843,0.3176470588235294,0.611764705882353,1);const float e3=0.38;const vec4 v3=vec4(0.12156862745098039,0.44313725490196076,0.6352941176470588,1);const float e4=0.5;const vec4 v4=vec4(0.19607843137254902,0.5647058823529412,0.6627450980392157,1);const float e5=0.63;const vec4 v5=vec4(0.3411764705882353,0.6784313725490196,0.6901960784313725,1);const float e6=0.75;const vec4 v6=vec4(0.5843137254901961,0.7686274509803922,0.7411764705882353,1);const float e7=0.88;const vec4 v7=vec4(0.796078431372549,0.8666666666666667,0.8274509803921568,1);const float e8=1.0;const vec4 v8=vec4(0.996078431372549,0.984313725490196,0.9019607843137255,1);float a0=smoothstep(e0,e1,x_2);float a1=smoothstep(e1,e2,x_2);float a2=smoothstep(e2,e3,x_2);float a3=smoothstep(e3,e4,x_2);float a4=smoothstep(e4,e5,x_2);float a5=smoothstep(e5,e6,x_2);float a6=smoothstep(e6,e7,x_2);float a7=smoothstep(e7,e8,x_2);return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),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))))))));}vec4 velocity_green_2558432129(float x_27){const float e0=0.0;const vec4 v0=vec4(0.09019607843137255,0.13725490196078433,0.07450980392156863,1);const float e1=0.13;const vec4 v1=vec4(0.09411764705882353,0.25098039215686274,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.043137254901960784,0.37254901960784315,0.17647058823529413,1);const float e3=0.38;const vec4 v3=vec4(0.15294117647058825,0.4823529411764706,0.13725490196078433,1);const float e4=0.5;const vec4 v4=vec4(0.37254901960784315,0.5725490196078431,0.047058823529411764,1);const float e5=0.63;const vec4 v5=vec4(0.596078431372549,0.6470588235294118,0.07058823529411765,1);const float e6=0.75;const vec4 v6=vec4(0.788235294117647,0.7294117647058823,0.27058823529411763,1);const float e7=0.88;const vec4 v7=vec4(0.9137254901960784,0.8470588235294118,0.5372549019607843,1);const float e8=1.0;const vec4 v8=vec4(1,0.9921568627450981,0.803921568627451,1);float a0=smoothstep(e0,e1,x_27);float a1=smoothstep(e1,e2,x_27);float a2=smoothstep(e2,e3,x_27);float a3=smoothstep(e3,e4,x_27);float a4=smoothstep(e4,e5,x_27);float a5=smoothstep(e5,e6,x_27);float a6=smoothstep(e6,e7,x_27);float a7=smoothstep(e7,e8,x_27);return max(mix(v0,v1,a0)*step(e0,x_27)*step(x_27,e1),max(mix(v1,v2,a1)*step(e1,x_27)*step(x_27,e2),max(mix(v2,v3,a2)*step(e2,x_27)*step(x_27,e3),max(mix(v3,v4,a3)*step(e3,x_27)*step(x_27,e4),max(mix(v4,v5,a4)*step(e4,x_27)*step(x_27,e5),max(mix(v5,v6,a5)*step(e5,x_27)*step(x_27,e6),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))))))));}vec4 cubehelix(float x_37){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.07;const vec4 v1=vec4(0.08627450980392157,0.0196078431372549,0.23137254901960785,1);const float e2=0.13;const vec4 v2=vec4(0.23529411764705882,0.01568627450980392,0.4117647058823529,1);const float e3=0.2;const vec4 v3=vec4(0.42745098039215684,0.00392156862745098,0.5294117647058824,1);const float e4=0.27;const vec4 v4=vec4(0.6313725490196078,0,0.5764705882352941,1);const float e5=0.33;const vec4 v5=vec4(0.8235294117647058,0.00784313725490196,0.5568627450980392,1);const float e6=0.4;const vec4 v6=vec4(0.984313725490196,0.043137254901960784,0.4823529411764706,1);const float e7=0.47;const vec4 v7=vec4(1,0.11372549019607843,0.3803921568627451,1);const float e8=0.53;const vec4 v8=vec4(1,0.21176470588235294,0.27058823529411763,1);const float e9=0.6;const vec4 v9=vec4(1,0.3333333333333333,0.1803921568627451,1);const float e10=0.67;const vec4 v10=vec4(1,0.47058823529411764,0.13333333333333333,1);const float e11=0.73;const vec4 v11=vec4(1,0.615686274509804,0.1450980392156863,1);const float e12=0.8;const vec4 v12=vec4(0.9450980392156862,0.7490196078431373,0.2235294117647059,1);const float e13=0.87;const vec4 v13=vec4(0.8784313725490196,0.8627450980392157,0.36470588235294116,1);const float e14=0.93;const vec4 v14=vec4(0.8549019607843137,0.9450980392156862,0.5568627450980392,1);const float e15=1.0;const vec4 v15=vec4(0.8901960784313725,0.9921568627450981,0.7764705882352941,1);float a0=smoothstep(e0,e1,x_37);float a1=smoothstep(e1,e2,x_37);float a2=smoothstep(e2,e3,x_37);float a3=smoothstep(e3,e4,x_37);float a4=smoothstep(e4,e5,x_37);float a5=smoothstep(e5,e6,x_37);float a6=smoothstep(e6,e7,x_37);float a7=smoothstep(e7,e8,x_37);float a8=smoothstep(e8,e9,x_37);float a9=smoothstep(e9,e10,x_37);float a10=smoothstep(e10,e11,x_37);float a11=smoothstep(e11,e12,x_37);float a12=smoothstep(e12,e13,x_37);float a13=smoothstep(e13,e14,x_37);float a14=smoothstep(e14,e15,x_37);return max(mix(v0,v1,a0)*step(e0,x_37)*step(x_37,e1),max(mix(v1,v2,a1)*step(e1,x_37)*step(x_37,e2),max(mix(v2,v3,a2)*step(e2,x_37)*step(x_37,e3),max(mix(v3,v4,a3)*step(e3,x_37)*step(x_37,e4),max(mix(v4,v5,a4)*step(e4,x_37)*step(x_37,e5),max(mix(v5,v6,a5)*step(e5,x_37)*step(x_37,e6),max(mix(v6,v7,a6)*step(e6,x_37)*step(x_37,e7),max(mix(v7,v8,a7)*step(e7,x_37)*step(x_37,e8),max(mix(v8,v9,a8)*step(e8,x_37)*step(x_37,e9),max(mix(v9,v10,a9)*step(e9,x_37)*step(x_37,e10),max(mix(v10,v11,a10)*step(e10,x_37)*step(x_37,e11),max(mix(v11,v12,a11)*step(e11,x_37)*step(x_37,e12),max(mix(v12,v13,a12)*step(e12,x_37)*step(x_37,e13),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)))))))))))))));}vec3 hsv_to_rgb(vec3 c){vec4 K=vec4(1.0,2.0/3.0,1.0/3.0,3.0);vec3 p=abs(fract(c.xxx+K.xyz)*6.0-K.www);return c.z*mix(K.xxx,clamp(p-K.xxx,0.0,1.0),c.y);}vec3 rgb_to_hsv(vec3 rgb){float Cmax=max(rgb.r,max(rgb.g,rgb.b));float Cmin=min(rgb.r,min(rgb.g,rgb.b));float delta=Cmax-Cmin;vec3 hsv=vec3(0.,0.,Cmax);if(Cmax>Cmin){hsv.y=delta/Cmax;if(rgb.r==Cmax){hsv.x=(rgb.g-rgb.b)/delta;}else{if(rgb.g==Cmax){hsv.x=2.+(rgb.b-rgb.r)/delta;}else{hsv.x=4.+(rgb.r-rgb.g)/delta;}}hsv.x=fract(hsv.x/6.);}return hsv;}float sample_and_apply_sliders(SAMPLER_TYPE channel,vec2 vTexCoord,vec2 sliderValues){float fragIntensity=float(texture(channel,vTexCoord).r);float slidersAppliedToIntensity=(fragIntensity-sliderValues[0])/max(0.0005,(sliderValues[1]-sliderValues[0]));return max(0.0,slidersAppliedToIntensity);}vec3 process_channel_intensity(float intensity,vec3 colorValues,int channelIndex,bool inLensAndUseLens,int lensSelection){float useColorValue=float(int((inLensAndUseLens&&channelIndex==lensSelection)||(!inLensAndUseLens)));vec3 hsvCombo=rgb_to_hsv(max(vec3(colorValues),(1.0-useColorValue)*vec3(255,255,255)));hsvCombo=vec3(hsvCombo.xy,max(0.0,intensity));return hsv_to_rgb(hsvCombo);}vec4 apply_opacity(vec3 color,bool useTransparentColor,vec3 transparentColor,float opacity){return vec4(color,(color==transparentColor&&useTransparentColor)? 0.0 : opacity);}vec4 colormap(float intensity,float opacity,bool useTransparentColor){return apply_opacity(COLORMAP_FUNCTION(min(1.0,intensity)).xyz,useTransparentColor,COLORMAP_FUNCTION(0.0).xyz,opacity);}"},mn={name:"lens-module",defines:{SAMPLER_TYPE:"usampler2D"},fs:"#define GLSLIFY 1\nbool frag_in_lens_bounds(vec2 lensCenter,vec2 vTexCoord,float majorLensAxis,float minorLensAxis,float lensBorderRadius){return pow((lensCenter.x-vTexCoord.x)/majorLensAxis,2.0)+pow((lensCenter.y-vTexCoord.y)/minorLensAxis,2.0)<(1.0-lensBorderRadius);}bool frag_on_lens_bounds(vec2 lensCenter,vec2 vTexCoord,float majorLensAxis,float minorLensAxis,float lensBorderRadius){float ellipseDistance=pow((lensCenter.x-vTexCoord.x)/majorLensAxis,2.0)+pow((lensCenter.y-vTexCoord.y)/minorLensAxis,2.0);return ellipseDistance<=1.0&&ellipseDistance>=(1.0-lensBorderRadius);}"},bn=[0,0,0],Fn=6,wn={Uint8:{format:F.default.R8UI,dataFormat:F.default.RED_INTEGER,type:F.default.UNSIGNED_BYTE,max:Math.pow(2,8)-1,sampler:"usampler2D"},Uint16:{format:F.default.R16UI,dataFormat:F.default.RED_INTEGER,type:F.default.UNSIGNED_SHORT,max:Math.pow(2,16)-1,sampler:"usampler2D"},Uint32:{format:F.default.R32UI,dataFormat:F.default.RED_INTEGER,type:F.default.UNSIGNED_INT,max:Math.pow(2,32)-1,sampler:"usampler2D"},Float32:{format:F.default.R32F,dataFormat:F.default.RED,type:F.default.FLOAT,max:3.4*Math.pow(10,38),sampler:"sampler2D"},Int8:{format:F.default.R8I,dataFormat:F.default.RED_INTEGER,type:F.default.BYTE,max:Math.pow(2,7)-1,sampler:"isampler2D"},Int16:{format:F.default.R16I,dataFormat:F.default.RED_INTEGER,type:F.default.SHORT,max:Math.pow(2,15)-1,sampler:"isampler2D"},Int32:{format:F.default.R32I,dataFormat:F.default.RED_INTEGER,type:F.default.INT,max:Math.pow(2,31)-1,sampler:"isampler2D"},Float64:{format:F.default.R32F,dataFormat:F.default.RED,type:F.default.FLOAT,max:3.4*Math.pow(10,38),sampler:"sampler2D",cast:function(t){return new Float32Array(t)}}},Sn=["jet","hsv","hot","cool","spring","summer","autumn","winter","bone","copper","greys","yignbu","greens","yiorrd","bluered","rdbu","picnic","rainbow","portland","blackbody","earth","electric","alpha","viridis","inferno","magma","plasma","warm","rainbow-soft","bathymetry","cdom","chlorophyll","density","freesurface-blue","freesurface-red","oxygen","par","phase","salinity","temperature","turbidity","velocity-blue","velocity-green","cubehelix"];!function(t){t.MAX_INTENSITY_PROJECTION="Maximum Intensity Projection";t.MIN_INTENSITY_PROJECTION="Minimum Intensity Projection";t.ADDITIVE="Additive"}(yn||(yn={}));function Dn(t){for(var e=void 0,A=t[0],n=1;n<t.length;){var r=t[n],i=t[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==A)return;"access"===r||"optionalAccess"===r?(e=A,A=i(A)):"call"!==r&&"optionalCall"!==r||(A=i((function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=A).call.apply(t,[e].concat(r))})),e=void 0)}return A}function Rn(t,e,A){for(var n=0;n<A;n+=1)t.push(e);return t}function Un(t){var e=wn[t];if(!e){var A=Object.keys(wn);throw Error("Dtype not supported, got ".concat(t,". Must be one of ").concat(A,"."))}return e}function Gn(t){var e=t.sliderValues,A=t.colorValues,n=t.channelIsOn,r=t.domain,i=t.dtype,o=[e.length,A.length];if(o.every((function(t){return t!==o[0]})))throw Error("Inconsistent number of slider values and colors provided");var a=A.map((function(t,e){return n[e]?t.map((function(t){return t/255})):bn})),s=r&&r[1]||Un(i).max,g=e.map((function(t,e){return n[e]?t:[s,s]})),c=Fn-a.length;if(c<0)throw Error("".concat(o," channels passed in, but only 6 are allowed."));var I=Rn(a,bn,c);return{paddedSliderValues:Rn(g,[s,s],c).reduce((function(t,e){return t.concat(e)}),[]),paddedColorValues:I.reduce((function(t,e){return t.concat(e)}),[])}}function Nn(t){var e=t.props,A=e.viewportId,n=e.lensRadius;if(A){var r=t.context.mousePosition,i=t.context.deck.viewManager.views.filter((function(t){return t.id===A}))[0],o=t.context.deck.viewManager.viewState[A],a=i.makeViewport(Object(B.a)({},o,{viewState:o}));if(r&&a.containsPixel(r)){var s={x:r.x-a.x,y:r.y-a.y},g=[[s.x-n,s.y],[s.x,s.y+n],[s.x+n,s.y],[s.x,s.y-n]].map((function(t,e){return a.unproject(t)[e%2]}));t.setState({unprojectLensBounds:g})}else t.setState({unprojectLensBounds:[0,0,0,0]})}else t.setState({unprojectLensBounds:[0,0,0,0]})}function kn(t){var e,A,n=(e=Dn([t,"optionalAccess",function(t){return t.meta},"optionalAccess",function(t){return t.physicalSizes}]),A=function(){return{}},null!=e?e:A()),r=n.x,i=n.y,o=n.z;if(Dn([r,"optionalAccess",function(t){return t.size}])&&Dn([i,"optionalAccess",function(t){return t.size}])&&Dn([o,"optionalAccess",function(t){return t.size}])){var a=Math.min(o.size,r.size,i.size),s=[r.size/a,i.size/a,o.size/a];return(new b.a).scale(s)}return(new b.a).identity()}function xn(t){for(var e=void 0,A=t[0],n=1;n<t.length;){var r=t[n],i=t[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==A)return;"access"===r||"optionalAccess"===r?(e=A,A=i(A)):"call"!==r&&"optionalCall"!==r||(A=i((function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=A).call.apply(t,[e].concat(r))})),e=void 0)}return A}var On=[{fs:"#define SHADER_NAME xr-layer-fragment-shader\nprecision highp float;\n#define GLSLIFY 1\nuniform sampler2D channel0;uniform sampler2D channel1;uniform sampler2D channel2;uniform sampler2D channel3;uniform sampler2D channel4;uniform sampler2D channel5;uniform vec2 sliderValues[6];uniform vec3 colorValues[6];uniform float intensityArray[6];uniform float opacity;uniform float majorLensAxis;uniform float minorLensAxis;uniform vec2 lensCenter;uniform bool isLensOn;uniform int lensSelection;uniform vec3 lensBorderColor;uniform float lensBorderRadius;uniform vec3 transparentColor;uniform bool useTransparentColor;varying vec2 vTexCoord;void main(){float intensityValue0=sample_and_apply_sliders(channel0,vTexCoord,sliderValues[0]);float intensityValue1=sample_and_apply_sliders(channel1,vTexCoord,sliderValues[1]);float intensityValue2=sample_and_apply_sliders(channel2,vTexCoord,sliderValues[2]);float intensityValue3=sample_and_apply_sliders(channel3,vTexCoord,sliderValues[3]);float intensityValue4=sample_and_apply_sliders(channel4,vTexCoord,sliderValues[4]);float intensityValue5=sample_and_apply_sliders(channel5,vTexCoord,sliderValues[5]);bool isFragInLensBounds=frag_in_lens_bounds(lensCenter,vTexCoord,majorLensAxis,minorLensAxis,lensBorderRadius);bool isFragOnLensBounds=frag_on_lens_bounds(lensCenter,vTexCoord,majorLensAxis,minorLensAxis,lensBorderRadius);bool inLensAndUseLens=isLensOn&&isFragInLensBounds;vec3 rgbCombo=process_channel_intensity(intensityValue0,colorValues[0],0,inLensAndUseLens,lensSelection);rgbCombo+=process_channel_intensity(intensityValue1,colorValues[1],1,inLensAndUseLens,lensSelection);rgbCombo+=process_channel_intensity(intensityValue2,colorValues[2],2,inLensAndUseLens,lensSelection);rgbCombo+=process_channel_intensity(intensityValue3,colorValues[3],3,inLensAndUseLens,lensSelection);rgbCombo+=process_channel_intensity(intensityValue4,colorValues[4],4,inLensAndUseLens,lensSelection);rgbCombo+=process_channel_intensity(intensityValue5,colorValues[5],5,inLensAndUseLens,lensSelection);rgbCombo=(isLensOn&&isFragOnLensBounds)? lensBorderColor : rgbCombo;gl_FragColor=apply_opacity(rgbCombo,useTransparentColor,transparentColor,opacity);geometry.uv=vTexCoord;DECKGL_FILTER_COLOR(gl_FragColor,geometry);}",fscmap:"#define SHADER_NAME xr-layer-fragment-shader-colormap\nprecision highp float;\n#define GLSLIFY 1\nuniform sampler2D channel0;uniform sampler2D channel1;uniform sampler2D channel2;uniform sampler2D channel3;uniform sampler2D channel4;uniform sampler2D channel5;uniform vec2 sliderValues[6];uniform float opacity;uniform float divisor;uniform bool useTransparentColor;varying vec2 vTexCoord;void main(){float intensityValue0=sample_and_apply_sliders(channel0,vTexCoord,sliderValues[0]);float intensityValue1=sample_and_apply_sliders(channel1,vTexCoord,sliderValues[1]);float intensityValue2=sample_and_apply_sliders(channel2,vTexCoord,sliderValues[2]);float intensityValue3=sample_and_apply_sliders(channel3,vTexCoord,sliderValues[3]);float intensityValue4=sample_and_apply_sliders(channel4,vTexCoord,sliderValues[4]);float intensityValue5=sample_and_apply_sliders(channel5,vTexCoord,sliderValues[5]);float intensityCombo=0.0;intensityCombo+=max(0.0,intensityValue0);intensityCombo+=max(0.0,intensityValue1);intensityCombo+=max(0.0,intensityValue2);intensityCombo+=max(0.0,intensityValue3);intensityCombo+=max(0.0,intensityValue4);intensityCombo+=max(0.0,intensityValue5);gl_FragColor=colormap(intensityCombo,opacity,useTransparentColor);geometry.uv=vTexCoord;DECKGL_FILTER_COLOR(gl_FragColor,geometry);}",vs:"#define GLSLIFY 1\n#define SHADER_NAME xr-layer-vertex-shader\nattribute vec2 texCoords;attribute vec3 positions;attribute vec3 positions64Low;attribute vec3 instancePickingColors;varying vec2 vTexCoord;void main(void){geometry.worldPosition=positions;geometry.uv=texCoords;geometry.pickingColor=instancePickingColors;gl_Position=project_position_to_clipspace(positions,positions64Low,vec3(0.0),geometry.position);DECKGL_FILTER_GL_POSITION(gl_Position,geometry);vTexCoord=texCoords;vec4 color=vec4(0.0);DECKGL_FILTER_COLOR(color,geometry);}"},{fs:"#version 300 es\n#define SHADER_NAME xr-layer-fragment-shader\nprecision highp float;precision highp int;precision highp SAMPLER_TYPE;\n#define GLSLIFY 1\nuniform SAMPLER_TYPE channel0;uniform SAMPLER_TYPE channel1;uniform SAMPLER_TYPE channel2;uniform SAMPLER_TYPE channel3;uniform SAMPLER_TYPE channel4;uniform SAMPLER_TYPE channel5;uniform vec2 sliderValues[6];uniform vec3 colorValues[6];uniform float opacity;uniform float majorLensAxis;uniform float minorLensAxis;uniform vec2 lensCenter;uniform bool isLensOn;uniform int lensSelection;uniform vec3 lensBorderColor;uniform float lensBorderRadius;uniform vec3 transparentColor;uniform bool useTransparentColor;in vec2 vTexCoord;out vec4 color;void main(){float intensityValue0=sample_and_apply_sliders(channel0,vTexCoord,sliderValues[0]);float intensityValue1=sample_and_apply_sliders(channel1,vTexCoord,sliderValues[1]);float intensityValue2=sample_and_apply_sliders(channel2,vTexCoord,sliderValues[2]);float intensityValue3=sample_and_apply_sliders(channel3,vTexCoord,sliderValues[3]);float intensityValue4=sample_and_apply_sliders(channel4,vTexCoord,sliderValues[4]);float intensityValue5=sample_and_apply_sliders(channel5,vTexCoord,sliderValues[5]);float intensityArray[6]=float[6](intensityValue0,intensityValue1,intensityValue2,intensityValue3,intensityValue4,intensityValue5);bool isFragInLensBounds=frag_in_lens_bounds(lensCenter,vTexCoord,majorLensAxis,minorLensAxis,lensBorderRadius);bool isFragOnLensBounds=frag_on_lens_bounds(lensCenter,vTexCoord,majorLensAxis,minorLensAxis,lensBorderRadius);bool inLensAndUseLens=isLensOn&&isFragInLensBounds;vec3 rgbCombo=vec3(0.0);for(int i=0;i<6;i++){rgbCombo+=process_channel_intensity(intensityArray[i],colorValues[i],i,inLensAndUseLens,lensSelection);}rgbCombo=(isLensOn&&isFragOnLensBounds)? lensBorderColor : rgbCombo;color=apply_opacity(rgbCombo,useTransparentColor,transparentColor,opacity);geometry.uv=vTexCoord;DECKGL_FILTER_COLOR(color,geometry);}",fscmap:"#version 300 es\n#define SHADER_NAME xr-layer-fragment-shader\nprecision highp float;precision highp int;precision highp SAMPLER_TYPE;\n#define GLSLIFY 1\nuniform SAMPLER_TYPE channel0;uniform SAMPLER_TYPE channel1;uniform SAMPLER_TYPE channel2;uniform SAMPLER_TYPE channel3;uniform SAMPLER_TYPE channel4;uniform SAMPLER_TYPE channel5;uniform vec2 sliderValues[6];uniform float opacity;uniform bool useTransparentColor;in vec2 vTexCoord;out vec4 color;void main(){float intensityValue0=sample_and_apply_sliders(channel0,vTexCoord,sliderValues[0]);float intensityValue1=sample_and_apply_sliders(channel1,vTexCoord,sliderValues[1]);float intensityValue2=sample_and_apply_sliders(channel2,vTexCoord,sliderValues[2]);float intensityValue3=sample_and_apply_sliders(channel3,vTexCoord,sliderValues[3]);float intensityValue4=sample_and_apply_sliders(channel4,vTexCoord,sliderValues[4]);float intensityValue5=sample_and_apply_sliders(channel5,vTexCoord,sliderValues[5]);float intensityArray[6]=float[6](intensityValue0,intensityValue1,intensityValue2,intensityValue3,intensityValue4,intensityValue5);float intensityCombo=0.0;for(int i=0;i<6;i++){intensityCombo+=max(0.0,intensityArray[i]);}color=colormap(intensityCombo,opacity,useTransparentColor);geometry.uv=vTexCoord;DECKGL_FILTER_COLOR(color,geometry);}",vs:"#version 300 es\n#define GLSLIFY 1\n#define SHADER_NAME xr-layer-vertex-shader\nin vec2 texCoords;in vec3 positions;in vec3 positions64Low;in vec3 instancePickingColors;out vec2 vTexCoord;void main(void){geometry.worldPosition=positions;geometry.uv=texCoords;geometry.pickingColor=instancePickingColors;gl_Position=project_position_to_clipspace(positions,positions64Low,vec3(0.0),geometry.position);DECKGL_FILTER_GL_POSITION(gl_Position,geometry);vTexCoord=texCoords;vec4 color=vec4(0.0);DECKGL_FILTER_COLOR(color,geometry);}"}];function Mn(t,e){var A=Object(N.b)(t,k.a.TEXTURE_FLOAT),n=Object(N.b)(t,k.a.TEXTURE_FILTER_LINEAR_FLOAT);if(!A)throw new Error("WebGL1 context does not support floating point textures.  Unable to display raster data.");return n||e!==F.default.LINEAR?e:(console.warn("LINEAR filtering not supported in WebGL1 context.  Falling back to NEAREST."),F.default.NEAREST)}function Ln(t,e,A){var n=A===F.default.LINEAR;if(!Object(S.j)(e))return{format:F.default.LUMINANCE,dataFormat:F.default.LUMINANCE,type:F.default.FLOAT,sampler:"sampler2D",shaderModule:On[0],filter:Mn(e,A),cast:function(t){return new Float32Array(t)}};var r=Un(n?"Float32":t);return Object(B.a)({},r,{shaderModule:On[1],filter:A,cast:n?function(t){return new Float32Array(t)}:function(t){return t}})}var _n={pickable:{type:"boolean",value:!0,compare:!0},coordinateSystem:d.a.CARTESIAN,channelData:{type:"object",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:"Uint16",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},transparentColor:{type:"array",value:null,compare:!0},interpolation:{type:"number",value:F.default.NEAREST,compare:!0}},Jn=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"getShaders",value:function(){var t=this.props,e=t.colormap,n=t.dtype,r=t.interpolation,i=Ln(n,this.context.gl,r),o=i.shaderModule,a=i.sampler;return Object(l.a)(Object(u.a)(A.prototype),"getShaders",this).call(this,{fs:e?o.fscmap:o.fs,vs:o.vs,defines:{SAMPLER_TYPE:a,COLORMAP_FUNCTION:e||"viridis"},modules:[Q.a,E.a,vn,mn]})}},{key:"initializeState",value:function(){var t=this.context.gl;t.pixelStorei(F.default.UNPACK_ALIGNMENT,1),t.pixelStorei(F.default.PACK_ALIGNMENT,1),this.getAttributeManager().add({positions:{size:3,type:F.default.DOUBLE,fp64:this.use64bitPositions(),update:this.calculatePositions,noAlloc:!0}}),this.setState({numInstances:1,positions:new Float64Array(12)})}},{key:"finalizeState",value:function(){Object(l.a)(Object(u.a)(A.prototype),"finalizeState",this).call(this),this.state.textures&&Object.values(this.state.textures).forEach((function(t){return t&&t.delete()}))}},{key:"updateState",value:function(t){var e=t.props,A=t.oldProps;if(t.changeFlags.extensionsChanged||e.colormap!==A.colormap||e.interpolation!==A.interpolation){var n=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(n)}),this.getAttributeManager().invalidateAll()}(e.channelData!==A.channelData&&xn([e,"access",function(t){return t.channelData},"optionalAccess",function(t){return t.data}])!==xn([A,"access",function(t){return t.channelData},"optionalAccess",function(t){return t.data}])||e.interpolation!==A.interpolation)&&this.loadChannelTextures(e.channelData);var r=this.getAttributeManager();e.bounds!==A.bounds&&r.invalidate("positions")}},{key:"_getModel",value:function(t){return t?new D.a(t,Object(B.a)({},this.getShaders(),{id:this.props.id,geometry:new R.a({drawMode:F.default.TRIANGLE_FAN,vertexCount:4,attributes:{texCoords:new Float32Array([0,1,0,0,1,0,1,1])}}),isInstanced:!1})):null}},{key:"calculatePositions",value:function(t){var e=this.state.positions,A=this.props.bounds;e[0]=A[0],e[1]=A[1],e[2]=0,e[3]=A[0],e[4]=A[3],e[5]=0,e[6]=A[2],e[7]=A[3],e[8]=0,e[9]=A[2],e[10]=A[1],e[11]=0,t.value=e}},{key:"draw",value:function(t){var e=t.uniforms,A=this.state,n=A.textures,r=A.model;if(n&&r){var i=this.props,o=i.sliderValues,a=i.colorValues,s=i.opacity,c=i.domain,I=i.dtype,u=i.channelIsOn,l=i.unprojectLensBounds,C=i.bounds,h=i.isLensOn,f=i.lensSelection,d=i.lensBorderColor,Q=i.lensBorderRadius,E=i.transparentColor,p=Object.values(n).filter((function(t){return t})).length,y=Gn({sliderValues:o.slice(0,p),colorValues:a.slice(0,p),channelIsOn:u.slice(0,p),domain:c,dtype:I}),v=y.paddedSliderValues,m=y.paddedColorValues,b=Object(g.a)(l,4),F=b[0],w=b[1],S=b[2],D=b[3],R=Object(g.a)(C,4),U=R[0],G=R[1],N=R[2],k=R[3],x=(F-U)/(N-U),O=(w-k)/(G-k),M=(S-U)/(N-U),L=(D-k)/(G-k);r.setUniforms(Object(B.a)({},e,{colorValues:m,sliderValues:v,opacity:s,majorLensAxis:(M-x)/2,minorLensAxis:(O-L)/2,lensCenter:[(M+x)/2,(O+L)/2],isLensOn:h,lensSelection:f,lensBorderColor:d,lensBorderRadius:Q,transparentColor:(E||[0,0,0]).map((function(t){return t/255})),useTransparentColor:Boolean(E)},n)).draw()}}},{key:"loadChannelTextures",value:function(t){var e=this,A={channel0:null,channel1:null,channel2:null,channel3:null,channel4:null,channel5:null};this.state.textures&&Object.values(this.state.textures).forEach((function(t){return t&&t.delete()})),t&&Object.keys(t).length>0&&t.data&&(t.data.forEach((function(n,r){A["channel".concat(r)]=e.dataToTexture(n,t.width,t.height)}),this),this.setState({textures:A}))}},{key:"dataToTexture",value:function(t,e,A){var n,r,i,o=this.props.interpolation,a=Ln(this.props.dtype,this.context.gl,o);return new U.a(this.context.gl,{width:e,height:A,data:(r=xn([a,"access",function(t){return t.cast},"optionalCall",function(e){return e(t)}]),i=function(){return t},null!=r?r:i()),mipmaps:!1,parameters:(n={},Object(s.a)(n,F.default.TEXTURE_MIN_FILTER,a.filter),Object(s.a)(n,F.default.TEXTURE_MAG_FILTER,a.filter),Object(s.a)(n,F.default.TEXTURE_WRAP_S,F.default.CLAMP_TO_EDGE),Object(s.a)(n,F.default.TEXTURE_WRAP_T,F.default.CLAMP_TO_EDGE),n),format:a.format,dataFormat:a.dataFormat,type:a.type})}}]),A}(p.a);Jn.layerName="XRLayer",Jn.defaultProps=_n;var Tn={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},jn=Object(B.a)({},x.a.defaultProps,{pickable:{type:"boolean",value:!0,compare:!0},coordinateSystem:d.a.CARTESIAN}),Hn=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"_getModel",value:function(t){var e=this.props,A=function(t,e){var A=e?"true":"false",n="vec3(".concat((e||[0,0,0]).map((function(t){return String(t/255)})).join(","),")");switch(t){case Tn.RGB:return"color[3] = (".concat(A," && (color.rgb == ").concat(n,")) ? 0.0 : color.a;");case Tn.WhiteIsZero:return"          float value = 1.0 - (color.r / 256.0);\n          color = vec4(value, value, value, (".concat(A," && vec3(value, value, value) == ").concat(n,") ? 0.0 : color.a);\n        ");case Tn.BlackIsZero:return"          float value = (color.r / 256.0);\n          color = vec4(value, value, value, (".concat(A," && vec3(value, value, value) == ").concat(n,") ? 0.0 : color.a);\n        ");case Tn.YCbCr:return"          float y = color[0];\n          float cb = color[1];\n          float cr = color[2];\n          color[0] = (y + (1.40200 * (cr - .5)));\n          color[1] = (y - (0.34414 * (cb - .5)) - (0.71414 * (cr - .5)));\n          color[2] = (y + (1.77200 * (cb - .5)));\n          color[3] = (".concat(A," && distance(color.rgb, ").concat(n,") < 0.01) ? 0.0 : color.a;\n        ");default:return console.error("Unsupported photometric interpretation or none provided.  No transformation will be done to image data"),""}}(e.photometricInterpretation,e.transparentColorInHook);return t?new D.a(t,Object(B.a)({},this.getShaders(),{id:this.props.id,geometry:new R.a({drawMode:F.default.TRIANGLES,vertexCount:6}),isInstanced:!1,inject:{"fs:DECKGL_FILTER_COLOR":A}})):null}}]),A}(x.a),Yn=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"initializeState",value:function(t){var e=this.context.gl;e.pixelStorei(F.default.UNPACK_ALIGNMENT,1),e.pixelStorei(F.default.PACK_ALIGNMENT,1),Object(l.a)(Object(u.a)(A.prototype),"initializeState",this).call(this,t)}},{key:"renderLayers",value:function(){var t=this.props,e=t.photometricInterpretation,A=t.transparentColor,n=function(t){switch(t){case Tn.RGB:return[0,0,0,0];case Tn.WhiteIsZero:return[255,255,255,0];case Tn.BlackIsZero:return[0,0,0,0];case Tn.YCbCr:return[16,128,128,0];default:return console.error("Unsupported photometric interpretation or none provided.  No transformation will be done to image data"),[0,0,0,0]}}(e);return new Hn(this.props,{transparentColor:n,transparentColorInHook:A,id:"".concat(this.props.id,"-wrapped")})}}]),A}(y.a);function Vn(t){for(var e=t.length,A=1/0,n=-1/0,r=0;e--;)t[e]<A&&(A=t[e]),t[e]>n&&(n=t[e]),r+=t[e];var i=r/t.length;e=t.length;for(var o=0;e--;)o+=Math.pow(t[e]-i,2);var a=Math.pow(o/t.length,.5),s=Math.floor(t.length/2),g=Math.floor(t.length/4),c=3*Math.floor(t.length/4);_(t,s);var I=t[s];_(t,g,0,s);var u=t[g];_(t,c,s,t.length-1);var l=t[c],C=t.filter((function(t){return t>0})),h=Math.floor(.9995*C.length),B=Math.floor(5e-4*C.length);return _(C,h),_(C,B,0,h),{mean:i,sd:a,q1:u,q3:l,median:I,domain:[A,n],autoSliders:[C[B]||0,C[h]||0]}}function Zn(t){return Array.isArray(t)?t:[t]}function Wn(t){if(!Number.isInteger(t))throw Error("Not an integer.");var e=new ArrayBuffer(4);new DataView(e).setInt32(0,t,!1);var A=new Uint8Array(e);return Array.from(A)}function Kn(t){var e=t[t.length-1];return 3===e||4===e}function Pn(t){return t.toLowerCase().split("").reverse()}function qn(t){var e=new Map(t.map((function(t,e){return[t,e]})));if(e.size!==t.length)throw Error("Labels must be unique, found duplicated label.");return function(t){var A=e.get(t);if(void 0===A)throw Error("Invalid dimension.");return A}}function Xn(t){var e=Kn(t.shape),A=t.shape.slice(e?-3:-2),n=Object(g.a)(A,2);return{height:n[0],width:n[1]}}function zn(t){return Math.pow(2,Math.floor(Math.log2(t)))}Yn.layerName="BitmapLayer",Yn.PHOTOMETRIC_INTERPRETATIONS=Tn,Yn.defaultProps=Object(B.a)({},jn,{image:{type:"object",value:{},compare:!0},transparentColor:{type:"array",value:[0,0,0],compare:!0},photometricInterpretation:{type:"number",value:2,compare:!0}}),Hn.defaultProps=jn,Hn.layerName="BitmapLayerWrapper";var $n={pickable:{type:"boolean",value:!0,compare:!0},coordinateSystem:d.a.CARTESIAN,sliderValues:{type:"array",value:[],compare:!0},colorValues:{type:"array",value:[],compare:!0},channelIsOn:{type:"array",value:[],compare:!0},renderSubLayers:{type:"function",value:function(t){var e=t.tile,A=e.bbox,n=A.left,r=A.top,i=A.right,o=A.bottom,a=e.x,s=e.y,g=e.z,c=t.data,I=t.id,u=t.loader,l=t.maxZoom;if([n,o,i,r].some((function(t){return t<0}))||!c)return null;var C=u[0],h=Xn(C),B=h.height,f=h.width,d=[n,c.height<C.tileSize?B:o,c.width<C.tileSize?f:i,r];if(Kn(C.shape)){var Q=C.meta.photometricInterpretation;return new Yn(t,{image:c,photometricInterpretation:void 0===Q?2:Q,bounds:d,id:"tile-sub-layer-".concat(d,"-").concat(I),tileId:{x:a,y:s,z:g}})}return new Jn(t,{channelData:c,bounds:d,id:"tile-sub-layer-".concat(d,"-").concat(I),tileId:{x:a,y:s,z:g},interpolation:g===l?F.default.NEAREST:F.default.LINEAR})},compare:!1},colormap:{type:"string",value:"",compare:!0},dtype:{type:"string",value:"Uint16",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},transparentColor:{type:"array",value:null,compare:!0},interpolation:{type:"number",value:null,compare:!0}},tr=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"_updateTileset",value:function(){this.props.viewportId||Object(l.a)(Object(u.a)(A.prototype),"_updateTileset",this).call(this),(this.props.viewportId&&this.context.viewport.id===this.props.viewportId||!this.state.tileset._viewport)&&Object(l.a)(Object(u.a)(A.prototype),"_updateTileset",this).call(this)}}]),A}(w.a);tr.layerName="MultiscaleImageLayerBase",tr.defaultProps=$n;var er={pickable:{type:"boolean",value:!0,compare:!0},coordinateSystem:d.a.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},viewportId:{type:"string",value:"",compare:!0},loader:{type:"object",value:{getRaster:function(){var t=Object(a.a)(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{data:[],height:0,width:0});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),dtype:"Uint16"},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},transparentColor:{type:"array",value:null,compare:!0},onViewportLoad:{type:"function",value:null,compare:!0},interpolation:{type:"number",value:F.default.NEAREST,compare:!0}},Ar=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"initializeState",value:function(){var t=this;this.state={unprojectLensBounds:[0,0,0,0],width:0,height:0,data:[]},this.context.deck&&this.context.deck.eventManager.on({pointermove:function(){return Nn(t)},pointerleave:function(){return Nn(t)},wheel:function(){return Nn(t)}})}},{key:"finalizeState",value:function(){this.state.abortController.abort()}},{key:"updateState",value:function(t){var e=this,A=t.props,n=t.oldProps,r=A.loader!==n.loader,i=A.loaderSelection!==n.loaderSelection;if(r||i){var o=this.props,a=o.loader,s=o.loaderSelection,g=void 0===s?[]:s,c=o.onViewportLoad,I=new AbortController;this.setState({abortController:I});var u=I.signal,l=g.map((function(t){return a.getRaster({selection:t,signal:u})}));Promise.all(l).then((function(t){var A={data:t.map((function(t){return t.data})),width:t[0].width,height:t[0].height};Kn(a.shape)&&(A.data=A.data[0],A.data.length===A.width*A.height*3&&(A.format=F.default.RGB,A.dataFormat=F.default.RGB)),c&&c(A),e.setState(Object(B.a)({},A))})).catch((function(t){if("__vivSignalAborted"!==t)throw t}))}}},{key:"getPickingInfo",value:function(t){var e=t.info,A=t.sourceLayer;return e.sourceLayer=A,e.tile=A.props.tile,e}},{key:"renderLayers",value:function(){var t=this.props,e=t.loader,A=t.id,n=e.dtype,r=this.state,i=r.width,o=r.height,a=r.data,s=r.unprojectLensBounds;if(!i||!o)return null;var g=[0,o,i,0];if(Kn(e.shape)){var c=e.meta.photometricInterpretation,I=void 0===c?2:c;return new Yn(this.props,{image:this.state,photometricInterpretation:I,bounds:g,id:"image-sub-layer-".concat(g,"-").concat(A)})}return new Jn(this.props,{channelData:{data:a,height:o,width:i},bounds:g,id:"image-sub-layer-".concat(g,"-").concat(A),dtype:n,unprojectLensBounds:s})}}]),A}(y.a);Ar.layerName="ImageLayer",Ar.defaultProps=er;var nr=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"initializeState",value:function(){var t=this;this.state={unprojectLensBounds:[0,0,0,0]},this.context.deck&&this.context.deck.eventManager.on({pointermove:function(){return Nn(t)},pointerleave:function(){return Nn(t)},wheel:function(){return Nn(t)}})}},{key:"renderLayers",value:function(){var t=this.props,e=t.loader,A=t.loaderSelection,n=t.opacity,r=t.viewportId,i=t.onTileError,s=t.onHover,g=t.id,c=t.onClick,I=t.modelMatrix,u=t.transparentColor,l=t.excludeBackground,C=t.refinementStrategy,h=e[0],B=h.tileSize,f=h.dtype,d=this.state.unprojectLensBounds,Q=Math.log2(512/B),E=function(){var t=Object(a.a)(o.a.mark((function t(n){var r,i,a,s,g,c,I,u;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.x,i=n.y,a=n.z,s=n.signal,A&&0!==A.length){t.next=3;break}return t.abrupt("return",null);case 3:return g=Math.round(-a+Q),c=function(t){var A={x:r,y:i,selection:t,signal:s};return e[g].getTile(A)},t.prev=5,t.next=8,Promise.all(A.map(c));case 8:if(I=t.sent,u={data:I.map((function(t){return t.data})),width:I[0].width,height:I[0].height},!Kn(e[g].shape)){t.next=14;break}return u.data=u.data[0],u.data.length===u.width*u.height*3&&(u.format=F.default.RGB,u.dataFormat=F.default.RGB),t.abrupt("return",u);case 14:return t.abrupt("return",u);case 17:if(t.prev=17,t.t0=t.catch(5),"__vivSignalAborted"!==t.t0){t.next=21;break}return t.abrupt("return",null);case 21:throw t.t0;case 22:case"end":return t.stop()}}),t,null,[[5,17]])})));return function(e){return t.apply(this,arguments)}}(),p=Xn(e[0]),y=p.height,v=p.width,m=new tr(this.props,{id:"Tiled-Image-".concat(g),getTileData:E,dtype:f,tileSize:I?B*(1/I.getScale()[0]):B,extent:[0,0,v,y],minZoom:Math.round(-(e.length-1)+Q),maxZoom:Math.round(Q),refinementStrategy:C||(1===n?"best-available":"no-overlap"),updateTriggers:{getTileData:[e,A]},onTileError:i||e[0].onTileError,unprojectLensBounds:d}),w=e[e.length-1],S="function"===typeof w.getRaster,D=I?I.clone():new b.a;return[S&&!l&&new Ar(this.props,{id:"Background-Image-".concat(g),loader:w,modelMatrix:D.scale(Math.pow(2,e.length-1)),visible:1===n&&(!r||this.context.viewport.id===r)&&!u,pickable:{type:"boolean",value:!0,compare:!0},onHover:s,onClick:c,interpolation:F.default.LINEAR}),m]}}]),A}(y.a);nr.layerName="MultiscaleImageLayer",nr.defaultProps={pickable:{type:"boolean",value:!0,compare:!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},transparentColor:{type:"array",value:null,compare:!0},refinementStrategy:{type:"string",value:null,compare:!0},excludeBackground:{type:"boolean",value:!1,compare:!0}};var rr={pickable:{type:"boolean",value:!0,compare:!0},loader:{type:"object",value:{getRaster:function(){var t=Object(a.a)(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{data:[],height:0,width:0});case 1:case"end":return t.stop()}}),t)})));return function(){return t.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}},ir=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"renderLayers",value:function(){var t=this.props,e=t.loader,A=t.id,n=t.zoom,r=t.boundingBox,i=t.boundingBoxColor,o=t.boundingBoxOutlineWidth,a=t.viewportOutlineColor,s=t.viewportOutlineWidth,g=t.overviewScale,c=Xn(e[0]),I=c.width,u=c.height,l=e.length-1,C=e[l];return[new Ar(this.props,{id:"viewport-".concat(A),modelMatrix:(new b.a).scale(Math.pow(2,l)*g),loader:C}),new O.a({id:"bounding-box-overview-".concat(A),coordinateSystem:d.a.CARTESIAN,data:[r],getPolygon:function(t){return t},filled:!1,stroked:!0,getLineColor:i,getLineWidth:o*Math.pow(2,n)}),new O.a({id:"viewport-outline-".concat(A),coordinateSystem:d.a.CARTESIAN,data:[[[0,0],[I*g,0],[I*g,u*g],[0,u*g]]],getPolygon:function(t){return t},filled:!1,stroked:!0,getLineColor:a,getLineWidth:s*Math.pow(2,n)})]}}]),A}(y.a);function or(t){return"-#".concat(t,"#")}function ar(t){var e=(new v.a).makeViewport({viewState:t,height:t.height,width:t.width});return[e.unproject([0,0]),e.unproject([e.width,0]),e.unproject([e.width,e.height]),e.unproject([0,e.height])]}function sr(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4?arguments[4]:void 0,i=Array.isArray(t)?t[0]:t,o=Xn(i),a=o.width,s=o.height,g=i.shape[i.labels.indexOf("z")],c=Math.log2(Math.min(e.width/a,e.height/s))-A,I=kn(i),u={target:(r||new b.a).transformPoint((n?I:new b.a).transformPoint([a/2,s/2,n?g/2:0])),zoom:c};return u}ir.layerName="OverviewLayer",ir.defaultProps=rr;var gr=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"renderLayers",value:function(){var t,e=this.props,A=e.id,n=e.unit,r=e.size,i=e.position,o=e.viewState,a=e.length,s=ar(o),c=o.zoom,I=.05*(s[2][0]-s[0][0]),u=Math.max(Math.pow(2,1.5-c),.007*(s[2][1]-s[0][1])),l=I*r,C=function(t,e,A){var n=t[2][0]-t[0][0];switch(e){case"bottom-right":return[t[2][1]-(t[2][1]-t[0][1])*A,t[2][0]-n*A];case"top-right":return[(t[2][1]-t[0][1])*A,t[2][0]-n*A];case"top-left":return[(t[2][1]-t[0][1])*A,n*A];case"bottom-left":return[t[2][1]-(t[2][1]-t[0][1])*A,n*A];default:throw new Error("Position ".concat(e," not found"))}}(s,i,a),h=Object(g.a)(C,2),B=h[0],Q=h[1];return[new M.a({id:"scale-bar-length-".concat(A),coordinateSystem:d.a.CARTESIAN,data:[[[Q,B],[Q+I,B]]],getSourcePosition:function(t){return t[0]},getTargetPosition:function(t){return t[1]},getWidth:2,getColor:[220,220,220]}),new M.a({id:"scale-bar-height-left-".concat(A),coordinateSystem:d.a.CARTESIAN,data:[[[Q,B-u],[Q,B+u]]],getSourcePosition:function(t){return t[0]},getTargetPosition:function(t){return t[1]},getWidth:2,getColor:[220,220,220]}),new M.a({id:"scale-bar-height-right-".concat(A),coordinateSystem:d.a.CARTESIAN,data:[[[Q+I,B-u],[Q+I,B+u]]],getSourcePosition:function(t){return t[0]},getTargetPosition:function(t){return t[1]},getWidth:2,getColor:[220,220,220]}),new L.a({id:"units-label-layer-".concat(A),coordinateSystem:d.a.CARTESIAN,data:[{text:String(l).slice(0,5).replace(/\.$/,"")+n,position:[Q+.5*I,B+4*u]}],getColor:[220,220,220,255],getSize:12,fontFamily:"-apple-system, 'Helvetica Neue', Arial, sans-serif",sizeUnits:"meters",sizeScale:Math.pow(2,-c),characterSet:[].concat(Object(f.a)(n.split("")),Object(f.a)((t=10,Object(f.a)(Array(t).keys())).map((function(t){return String(t)}))),["."])})]}}]),A}(y.a);gr.layerName="ScaleBarLayer",gr.defaultProps={pickable:{type:"boolean",value:!0,compare:!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 cr={name:"channel-intensity-module",fs:"#define GLSLIFY 1\nvec4 jet(float x_17){const float e0=0.0;const vec4 v0=vec4(0,0,0.5137254901960784,1);const float e1=0.125;const vec4 v1=vec4(0,0.23529411764705882,0.6666666666666666,1);const float e2=0.375;const vec4 v2=vec4(0.0196078431372549,1,1,1);const float e3=0.625;const vec4 v3=vec4(1,1,0,1);const float e4=0.875;const vec4 v4=vec4(0.9803921568627451,0,0,1);const float e5=1.0;const vec4 v5=vec4(0.5019607843137255,0,0,1);float a0=smoothstep(e0,e1,x_17);float a1=smoothstep(e1,e2,x_17);float a2=smoothstep(e2,e3,x_17);float a3=smoothstep(e3,e4,x_17);float a4=smoothstep(e4,e5,x_17);return max(mix(v0,v1,a0)*step(e0,x_17)*step(x_17,e1),max(mix(v1,v2,a1)*step(e1,x_17)*step(x_17,e2),max(mix(v2,v3,a2)*step(e2,x_17)*step(x_17,e3),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)))));}vec4 hsv_0(float x_18){const float e0=0.0;const vec4 v0=vec4(1,0,0,1);const float e1=0.169;const vec4 v1=vec4(0.9921568627450981,1,0.00784313725490196,1);const float e2=0.173;const vec4 v2=vec4(0.9686274509803922,1,0.00784313725490196,1);const float e3=0.337;const vec4 v3=vec4(0,0.9882352941176471,0.01568627450980392,1);const float e4=0.341;const vec4 v4=vec4(0,0.9882352941176471,0.0392156862745098,1);const float e5=0.506;const vec4 v5=vec4(0.00392156862745098,0.9764705882352941,1,1);const float e6=0.671;const vec4 v6=vec4(0.00784313725490196,0,0.9921568627450981,1);const float e7=0.675;const vec4 v7=vec4(0.03137254901960784,0,0.9921568627450981,1);const float e8=0.839;const vec4 v8=vec4(1,0,0.984313725490196,1);const float e9=0.843;const vec4 v9=vec4(1,0,0.9607843137254902,1);const float e10=1.0;const vec4 v10=vec4(1,0,0.023529411764705882,1);float a0=smoothstep(e0,e1,x_18);float a1=smoothstep(e1,e2,x_18);float a2=smoothstep(e2,e3,x_18);float a3=smoothstep(e3,e4,x_18);float a4=smoothstep(e4,e5,x_18);float a5=smoothstep(e5,e6,x_18);float a6=smoothstep(e6,e7,x_18);float a7=smoothstep(e7,e8,x_18);float a8=smoothstep(e8,e9,x_18);float a9=smoothstep(e9,e10,x_18);return max(mix(v0,v1,a0)*step(e0,x_18)*step(x_18,e1),max(mix(v1,v2,a1)*step(e1,x_18)*step(x_18,e2),max(mix(v2,v3,a2)*step(e2,x_18)*step(x_18,e3),max(mix(v3,v4,a3)*step(e3,x_18)*step(x_18,e4),max(mix(v4,v5,a4)*step(e4,x_18)*step(x_18,e5),max(mix(v5,v6,a5)*step(e5,x_18)*step(x_18,e6),max(mix(v6,v7,a6)*step(e6,x_18)*step(x_18,e7),max(mix(v7,v8,a7)*step(e7,x_18)*step(x_18,e8),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))))))))));}vec4 hot(float x_13){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.3;const vec4 v1=vec4(0.9019607843137255,0,0,1);const float e2=0.6;const vec4 v2=vec4(1,0.8235294117647058,0,1);const float e3=1.0;const vec4 v3=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_13);float a1=smoothstep(e1,e2,x_13);float a2=smoothstep(e2,e3,x_13);return max(mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1),max(mix(v1,v2,a1)*step(e1,x_13)*step(x_13,e2),mix(v2,v3,a2)*step(e2,x_13)*step(x_13,e3)));}vec4 cool(float x_24){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.13;const vec4 v1=vec4(0.4549019607843137,0,0.8549019607843137,1);const float e2=0.25;const vec4 v2=vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);const float e3=0.38;const vec4 v3=vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);const float e4=0.5;const vec4 v4=vec4(0,0.8,0.7725490196078432,1);const float e5=0.63;const vec4 v5=vec4(0,0.9686274509803922,0.5725490196078431,1);const float e6=0.75;const vec4 v6=vec4(0,1,0.34509803921568627,1);const float e7=0.88;const vec4 v7=vec4(0.1568627450980392,1,0.03137254901960784,1);const float e8=1.0;const vec4 v8=vec4(0.5764705882352941,1,0,1);float a0=smoothstep(e0,e1,x_24);float a1=smoothstep(e1,e2,x_24);float a2=smoothstep(e2,e3,x_24);float a3=smoothstep(e3,e4,x_24);float a4=smoothstep(e4,e5,x_24);float a5=smoothstep(e5,e6,x_24);float a6=smoothstep(e6,e7,x_24);float a7=smoothstep(e7,e8,x_24);return max(mix(v0,v1,a0)*step(e0,x_24)*step(x_24,e1),max(mix(v1,v2,a1)*step(e1,x_24)*step(x_24,e2),max(mix(v2,v3,a2)*step(e2,x_24)*step(x_24,e3),max(mix(v3,v4,a3)*step(e3,x_24)*step(x_24,e4),max(mix(v4,v5,a4)*step(e4,x_24)*step(x_24,e5),max(mix(v5,v6,a5)*step(e5,x_24)*step(x_24,e6),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))))))));}vec4 spring(float x_5){const float e0=0.0;const vec4 v0=vec4(1,0,1,1);const float e1=1.0;const vec4 v1=vec4(1,1,0,1);float a0=smoothstep(e0,e1,x_5);return mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1);}vec4 summer(float x_12){const float e0=0.0;const vec4 v0=vec4(0,0.5019607843137255,0.4,1);const float e1=1.0;const vec4 v1=vec4(1,1,0.4,1);float a0=smoothstep(e0,e1,x_12);return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);}vec4 autumn(float x_25){const float e0=0.0;const vec4 v0=vec4(1,0,0,1);const float e1=1.0;const vec4 v1=vec4(1,1,0,1);float a0=smoothstep(e0,e1,x_25);return mix(v0,v1,a0)*step(e0,x_25)*step(x_25,e1);}vec4 winter(float x_16){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=1.0;const vec4 v1=vec4(0,1,0.5019607843137255,1);float a0=smoothstep(e0,e1,x_16);return mix(v0,v1,a0)*step(e0,x_16)*step(x_16,e1);}vec4 bone(float x_15){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.376;const vec4 v1=vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);const float e2=0.753;const vec4 v2=vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);const float e3=1.0;const vec4 v3=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_15);float a1=smoothstep(e1,e2,x_15);float a2=smoothstep(e2,e3,x_15);return max(mix(v0,v1,a0)*step(e0,x_15)*step(x_15,e1),max(mix(v1,v2,a1)*step(e1,x_15)*step(x_15,e2),mix(v2,v3,a2)*step(e2,x_15)*step(x_15,e3)));}vec4 copper(float x_10){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.804;const vec4 v1=vec4(1,0.6274509803921569,0.4,1);const float e2=1.0;const vec4 v2=vec4(1,0.7803921568627451,0.4980392156862745,1);float a0=smoothstep(e0,e1,x_10);float a1=smoothstep(e1,e2,x_10);return max(mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1),mix(v1,v2,a1)*step(e1,x_10)*step(x_10,e2));}vec4 greys(float x_4){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=1.0;const vec4 v1=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_4);return mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1);}vec4 yignbu(float x_32){const float e0=0.0;const vec4 v0=vec4(0.03137254901960784,0.11372549019607843,0.34509803921568627,1);const float e1=0.125;const vec4 v1=vec4(0.1450980392156863,0.20392156862745098,0.5803921568627451,1);const float e2=0.25;const vec4 v2=vec4(0.13333333333333333,0.3686274509803922,0.6588235294117647,1);const float e3=0.375;const vec4 v3=vec4(0.11372549019607843,0.5686274509803921,0.7529411764705882,1);const float e4=0.5;const vec4 v4=vec4(0.2549019607843137,0.7137254901960784,0.7686274509803922,1);const float e5=0.625;const vec4 v5=vec4(0.4980392156862745,0.803921568627451,0.7333333333333333,1);const float e6=0.75;const vec4 v6=vec4(0.7803921568627451,0.9137254901960784,0.7058823529411765,1);const float e7=0.875;const vec4 v7=vec4(0.9294117647058824,0.9725490196078431,0.8509803921568627,1);const float e8=1.0;const vec4 v8=vec4(1,1,0.8509803921568627,1);float a0=smoothstep(e0,e1,x_32);float a1=smoothstep(e1,e2,x_32);float a2=smoothstep(e2,e3,x_32);float a3=smoothstep(e3,e4,x_32);float a4=smoothstep(e4,e5,x_32);float a5=smoothstep(e5,e6,x_32);float a6=smoothstep(e6,e7,x_32);float a7=smoothstep(e7,e8,x_32);return max(mix(v0,v1,a0)*step(e0,x_32)*step(x_32,e1),max(mix(v1,v2,a1)*step(e1,x_32)*step(x_32,e2),max(mix(v2,v3,a2)*step(e2,x_32)*step(x_32,e3),max(mix(v3,v4,a3)*step(e3,x_32)*step(x_32,e4),max(mix(v4,v5,a4)*step(e4,x_32)*step(x_32,e5),max(mix(v5,v6,a5)*step(e5,x_32)*step(x_32,e6),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))))))));}vec4 greens(float x_34){const float e0=0.0;const vec4 v0=vec4(0,0.26666666666666666,0.10588235294117647,1);const float e1=0.125;const vec4 v1=vec4(0,0.42745098039215684,0.17254901960784313,1);const float e2=0.25;const vec4 v2=vec4(0.13725490196078433,0.5450980392156862,0.27058823529411763,1);const float e3=0.375;const vec4 v3=vec4(0.2549019607843137,0.6705882352941176,0.36470588235294116,1);const float e4=0.5;const vec4 v4=vec4(0.4549019607843137,0.7686274509803922,0.4627450980392157,1);const float e5=0.625;const vec4 v5=vec4(0.6313725490196078,0.8509803921568627,0.6078431372549019,1);const float e6=0.75;const vec4 v6=vec4(0.7803921568627451,0.9137254901960784,0.7529411764705882,1);const float e7=0.875;const vec4 v7=vec4(0.8980392156862745,0.9607843137254902,0.8784313725490196,1);const float e8=1.0;const vec4 v8=vec4(0.9686274509803922,0.9882352941176471,0.9607843137254902,1);float a0=smoothstep(e0,e1,x_34);float a1=smoothstep(e1,e2,x_34);float a2=smoothstep(e2,e3,x_34);float a3=smoothstep(e3,e4,x_34);float a4=smoothstep(e4,e5,x_34);float a5=smoothstep(e5,e6,x_34);float a6=smoothstep(e6,e7,x_34);float a7=smoothstep(e7,e8,x_34);return max(mix(v0,v1,a0)*step(e0,x_34)*step(x_34,e1),max(mix(v1,v2,a1)*step(e1,x_34)*step(x_34,e2),max(mix(v2,v3,a2)*step(e2,x_34)*step(x_34,e3),max(mix(v3,v4,a3)*step(e3,x_34)*step(x_34,e4),max(mix(v4,v5,a4)*step(e4,x_34)*step(x_34,e5),max(mix(v5,v6,a5)*step(e5,x_34)*step(x_34,e6),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))))))));}vec4 yiorrd(float x_41){const float e0=0.0;const vec4 v0=vec4(0.5019607843137255,0,0.14901960784313725,1);const float e1=0.125;const vec4 v1=vec4(0.7411764705882353,0,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.8901960784313725,0.10196078431372549,0.10980392156862745,1);const float e3=0.375;const vec4 v3=vec4(0.9882352941176471,0.3058823529411765,0.16470588235294117,1);const float e4=0.5;const vec4 v4=vec4(0.9921568627450981,0.5529411764705883,0.23529411764705882,1);const float e5=0.625;const vec4 v5=vec4(0.996078431372549,0.6980392156862745,0.2980392156862745,1);const float e6=0.75;const vec4 v6=vec4(0.996078431372549,0.8509803921568627,0.4627450980392157,1);const float e7=0.875;const vec4 v7=vec4(1,0.9294117647058824,0.6274509803921569,1);const float e8=1.0;const vec4 v8=vec4(1,1,0.8,1);float a0=smoothstep(e0,e1,x_41);float a1=smoothstep(e1,e2,x_41);float a2=smoothstep(e2,e3,x_41);float a3=smoothstep(e3,e4,x_41);float a4=smoothstep(e4,e5,x_41);float a5=smoothstep(e5,e6,x_41);float a6=smoothstep(e6,e7,x_41);float a7=smoothstep(e7,e8,x_41);return max(mix(v0,v1,a0)*step(e0,x_41)*step(x_41,e1),max(mix(v1,v2,a1)*step(e1,x_41)*step(x_41,e2),max(mix(v2,v3,a2)*step(e2,x_41)*step(x_41,e3),max(mix(v3,v4,a3)*step(e3,x_41)*step(x_41,e4),max(mix(v4,v5,a4)*step(e4,x_41)*step(x_41,e5),max(mix(v5,v6,a5)*step(e5,x_41)*step(x_41,e6),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))))))));}vec4 bluered(float x_23){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=1.0;const vec4 v1=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_23);return mix(v0,v1,a0)*step(e0,x_23)*step(x_23,e1);}vec4 rdbu(float x_1){const float e0=0.0;const vec4 v0=vec4(0.0196078431372549,0.0392156862745098,0.6745098039215687,1);const float e1=0.35;const vec4 v1=vec4(0.41568627450980394,0.5372549019607843,0.9686274509803922,1);const float e2=0.5;const vec4 v2=vec4(0.7450980392156863,0.7450980392156863,0.7450980392156863,1);const float e3=0.6;const vec4 v3=vec4(0.8627450980392157,0.6666666666666666,0.5176470588235295,1);const float e4=0.7;const vec4 v4=vec4(0.9019607843137255,0.5686274509803921,0.35294117647058826,1);const float e5=1.0;const vec4 v5=vec4(0.6980392156862745,0.0392156862745098,0.10980392156862745,1);float a0=smoothstep(e0,e1,x_1);float a1=smoothstep(e1,e2,x_1);float a2=smoothstep(e2,e3,x_1);float a3=smoothstep(e3,e4,x_1);float a4=smoothstep(e4,e5,x_1);return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5)))));}vec4 picnic(float x_42){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=0.1;const vec4 v1=vec4(0.2,0.6,1,1);const float e2=0.2;const vec4 v2=vec4(0.4,0.8,1,1);const float e3=0.3;const vec4 v3=vec4(0.6,0.8,1,1);const float e4=0.4;const vec4 v4=vec4(0.8,0.8,1,1);const float e5=0.5;const vec4 v5=vec4(1,1,1,1);const float e6=0.6;const vec4 v6=vec4(1,0.8,1,1);const float e7=0.7;const vec4 v7=vec4(1,0.6,1,1);const float e8=0.8;const vec4 v8=vec4(1,0.4,0.8,1);const float e9=0.9;const vec4 v9=vec4(1,0.4,0.4,1);const float e10=1.0;const vec4 v10=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_42);float a1=smoothstep(e1,e2,x_42);float a2=smoothstep(e2,e3,x_42);float a3=smoothstep(e3,e4,x_42);float a4=smoothstep(e4,e5,x_42);float a5=smoothstep(e5,e6,x_42);float a6=smoothstep(e6,e7,x_42);float a7=smoothstep(e7,e8,x_42);float a8=smoothstep(e8,e9,x_42);float a9=smoothstep(e9,e10,x_42);return max(mix(v0,v1,a0)*step(e0,x_42)*step(x_42,e1),max(mix(v1,v2,a1)*step(e1,x_42)*step(x_42,e2),max(mix(v2,v3,a2)*step(e2,x_42)*step(x_42,e3),max(mix(v3,v4,a3)*step(e3,x_42)*step(x_42,e4),max(mix(v4,v5,a4)*step(e4,x_42)*step(x_42,e5),max(mix(v5,v6,a5)*step(e5,x_42)*step(x_42,e6),max(mix(v6,v7,a6)*step(e6,x_42)*step(x_42,e7),max(mix(v7,v8,a7)*step(e7,x_42)*step(x_42,e8),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))))))))));}vec4 rainbow(float x_31){const float e0=0.0;const vec4 v0=vec4(0.5882352941176471,0,0.35294117647058826,1);const float e1=0.125;const vec4 v1=vec4(0,0,0.7843137254901961,1);const float e2=0.25;const vec4 v2=vec4(0,0.09803921568627451,1,1);const float e3=0.375;const vec4 v3=vec4(0,0.596078431372549,1,1);const float e4=0.5;const vec4 v4=vec4(0.17254901960784313,1,0.5882352941176471,1);const float e5=0.625;const vec4 v5=vec4(0.592156862745098,1,0,1);const float e6=0.75;const vec4 v6=vec4(1,0.9176470588235294,0,1);const float e7=0.875;const vec4 v7=vec4(1,0.43529411764705883,0,1);const float e8=1.0;const vec4 v8=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_31);float a1=smoothstep(e1,e2,x_31);float a2=smoothstep(e2,e3,x_31);float a3=smoothstep(e3,e4,x_31);float a4=smoothstep(e4,e5,x_31);float a5=smoothstep(e5,e6,x_31);float a6=smoothstep(e6,e7,x_31);float a7=smoothstep(e7,e8,x_31);return max(mix(v0,v1,a0)*step(e0,x_31)*step(x_31,e1),max(mix(v1,v2,a1)*step(e1,x_31)*step(x_31,e2),max(mix(v2,v3,a2)*step(e2,x_31)*step(x_31,e3),max(mix(v3,v4,a3)*step(e3,x_31)*step(x_31,e4),max(mix(v4,v5,a4)*step(e4,x_31)*step(x_31,e5),max(mix(v5,v6,a5)*step(e5,x_31)*step(x_31,e6),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))))))));}vec4 portland(float x_21){const float e0=0.0;const vec4 v0=vec4(0.047058823529411764,0.2,0.5137254901960784,1);const float e1=0.25;const vec4 v1=vec4(0.0392156862745098,0.5333333333333333,0.7294117647058823,1);const float e2=0.5;const vec4 v2=vec4(0.9490196078431372,0.8274509803921568,0.2196078431372549,1);const float e3=0.75;const vec4 v3=vec4(0.9490196078431372,0.5607843137254902,0.2196078431372549,1);const float e4=1.0;const vec4 v4=vec4(0.8509803921568627,0.11764705882352941,0.11764705882352941,1);float a0=smoothstep(e0,e1,x_21);float a1=smoothstep(e1,e2,x_21);float a2=smoothstep(e2,e3,x_21);float a3=smoothstep(e3,e4,x_21);return max(mix(v0,v1,a0)*step(e0,x_21)*step(x_21,e1),max(mix(v1,v2,a1)*step(e1,x_21)*step(x_21,e2),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))));}vec4 blackbody(float x_38){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.2;const vec4 v1=vec4(0.9019607843137255,0,0,1);const float e2=0.4;const vec4 v2=vec4(0.9019607843137255,0.8235294117647058,0,1);const float e3=0.7;const vec4 v3=vec4(1,1,1,1);const float e4=1.0;const vec4 v4=vec4(0.6274509803921569,0.7843137254901961,1,1);float a0=smoothstep(e0,e1,x_38);float a1=smoothstep(e1,e2,x_38);float a2=smoothstep(e2,e3,x_38);float a3=smoothstep(e3,e4,x_38);return max(mix(v0,v1,a0)*step(e0,x_38)*step(x_38,e1),max(mix(v1,v2,a1)*step(e1,x_38)*step(x_38,e2),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))));}vec4 earth(float x_29){const float e0=0.0;const vec4 v0=vec4(0,0,0.5098039215686274,1);const float e1=0.1;const vec4 v1=vec4(0,0.7058823529411765,0.7058823529411765,1);const float e2=0.2;const vec4 v2=vec4(0.1568627450980392,0.8235294117647058,0.1568627450980392,1);const float e3=0.4;const vec4 v3=vec4(0.9019607843137255,0.9019607843137255,0.19607843137254902,1);const float e4=0.6;const vec4 v4=vec4(0.47058823529411764,0.27450980392156865,0.0784313725490196,1);const float e5=1.0;const vec4 v5=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_29);float a1=smoothstep(e1,e2,x_29);float a2=smoothstep(e2,e3,x_29);float a3=smoothstep(e3,e4,x_29);float a4=smoothstep(e4,e5,x_29);return max(mix(v0,v1,a0)*step(e0,x_29)*step(x_29,e1),max(mix(v1,v2,a1)*step(e1,x_29)*step(x_29,e2),max(mix(v2,v3,a2)*step(e2,x_29)*step(x_29,e3),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)))));}vec4 electric(float x_9){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.15;const vec4 v1=vec4(0.11764705882352941,0,0.39215686274509803,1);const float e2=0.4;const vec4 v2=vec4(0.47058823529411764,0,0.39215686274509803,1);const float e3=0.6;const vec4 v3=vec4(0.6274509803921569,0.35294117647058826,0,1);const float e4=0.8;const vec4 v4=vec4(0.9019607843137255,0.7843137254901961,0,1);const float e5=1.0;const vec4 v5=vec4(1,0.9803921568627451,0.8627450980392157,1);float a0=smoothstep(e0,e1,x_9);float a1=smoothstep(e1,e2,x_9);float a2=smoothstep(e2,e3,x_9);float a3=smoothstep(e3,e4,x_9);float a4=smoothstep(e4,e5,x_9);return max(mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1),max(mix(v1,v2,a1)*step(e1,x_9)*step(x_9,e2),max(mix(v2,v3,a2)*step(e2,x_9)*step(x_9,e3),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)))));}vec4 alpha(float x_0){const float e0=0.0;const vec4 v0=vec4(1,1,1,0);const float e1=1.0;const vec4 v1=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_0);return mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1);}vec4 viridis(float x_22){const float e0=0.0;const vec4 v0=vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);const float e1=0.13;const vec4 v1=vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);const float e2=0.25;const vec4 v2=vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);const float e4=0.5;const vec4 v4=vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);const float e5=0.63;const vec4 v5=vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);const float e6=0.75;const vec4 v6=vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);const float e7=0.88;const vec4 v7=vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);float a0=smoothstep(e0,e1,x_22);float a1=smoothstep(e1,e2,x_22);float a2=smoothstep(e2,e3,x_22);float a3=smoothstep(e3,e4,x_22);float a4=smoothstep(e4,e5,x_22);float a5=smoothstep(e5,e6,x_22);float a6=smoothstep(e6,e7,x_22);float a7=smoothstep(e7,e8,x_22);return max(mix(v0,v1,a0)*step(e0,x_22)*step(x_22,e1),max(mix(v1,v2,a1)*step(e1,x_22)*step(x_22,e2),max(mix(v2,v3,a2)*step(e2,x_22)*step(x_22,e3),max(mix(v3,v4,a3)*step(e3,x_22)*step(x_22,e4),max(mix(v4,v5,a4)*step(e4,x_22)*step(x_22,e5),max(mix(v5,v6,a5)*step(e5,x_22)*step(x_22,e6),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))))))));}vec4 inferno(float x_30){const float e0=0.0;const vec4 v0=vec4(0,0,0.01568627450980392,1);const float e1=0.13;const vec4 v1=vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);const float e2=0.25;const vec4 v2=vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);const float e3=0.38;const vec4 v3=vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);const float e4=0.5;const vec4 v4=vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);const float e5=0.63;const vec4 v5=vec4(0.8901960784313725,0.34901960784313724,0.2,1);const float e6=0.75;const vec4 v6=vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);const float e8=1.0;const vec4 v8=vec4(0.9882352941176471,1,0.6431372549019608,1);float a0=smoothstep(e0,e1,x_30);float a1=smoothstep(e1,e2,x_30);float a2=smoothstep(e2,e3,x_30);float a3=smoothstep(e3,e4,x_30);float a4=smoothstep(e4,e5,x_30);float a5=smoothstep(e5,e6,x_30);float a6=smoothstep(e6,e7,x_30);float a7=smoothstep(e7,e8,x_30);return max(mix(v0,v1,a0)*step(e0,x_30)*step(x_30,e1),max(mix(v1,v2,a1)*step(e1,x_30)*step(x_30,e2),max(mix(v2,v3,a2)*step(e2,x_30)*step(x_30,e3),max(mix(v3,v4,a3)*step(e3,x_30)*step(x_30,e4),max(mix(v4,v5,a4)*step(e4,x_30)*step(x_30,e5),max(mix(v5,v6,a5)*step(e5,x_30)*step(x_30,e6),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))))))));}vec4 magma(float x_33){const float e0=0.0;const vec4 v0=vec4(0,0,0.01568627450980392,1);const float e1=0.13;const vec4 v1=vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);const float e2=0.25;const vec4 v2=vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);const float e3=0.38;const vec4 v3=vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);const float e4=0.5;const vec4 v4=vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);const float e5=0.63;const vec4 v5=vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);const float e6=0.75;const vec4 v6=vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);const float e8=1.0;const vec4 v8=vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);float a0=smoothstep(e0,e1,x_33);float a1=smoothstep(e1,e2,x_33);float a2=smoothstep(e2,e3,x_33);float a3=smoothstep(e3,e4,x_33);float a4=smoothstep(e4,e5,x_33);float a5=smoothstep(e5,e6,x_33);float a6=smoothstep(e6,e7,x_33);float a7=smoothstep(e7,e8,x_33);return max(mix(v0,v1,a0)*step(e0,x_33)*step(x_33,e1),max(mix(v1,v2,a1)*step(e1,x_33)*step(x_33,e2),max(mix(v2,v3,a2)*step(e2,x_33)*step(x_33,e3),max(mix(v3,v4,a3)*step(e3,x_33)*step(x_33,e4),max(mix(v4,v5,a4)*step(e4,x_33)*step(x_33,e5),max(mix(v5,v6,a5)*step(e5,x_33)*step(x_33,e6),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))))))));}vec4 plasma(float x_3){const float e0=0.0;const vec4 v0=vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);const float e1=0.13;const vec4 v1=vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);const float e2=0.25;const vec4 v2=vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);const float e3=0.38;const vec4 v3=vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);const float e4=0.5;const vec4 v4=vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);const float e5=0.63;const vec4 v5=vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);const float e6=0.75;const vec4 v6=vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);const float e7=0.88;const vec4 v7=vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);const float e8=1.0;const vec4 v8=vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);float a0=smoothstep(e0,e1,x_3);float a1=smoothstep(e1,e2,x_3);float a2=smoothstep(e2,e3,x_3);float a3=smoothstep(e3,e4,x_3);float a4=smoothstep(e4,e5,x_3);float a5=smoothstep(e5,e6,x_3);float a6=smoothstep(e6,e7,x_3);float a7=smoothstep(e7,e8,x_3);return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),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))))))));}vec4 warm(float x_43){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.13;const vec4 v1=vec4(0.6745098039215687,0,0.7333333333333333,1);const float e2=0.25;const vec4 v2=vec4(0.8588235294117647,0,0.6666666666666666,1);const float e3=0.38;const vec4 v3=vec4(1,0,0.5098039215686274,1);const float e4=0.5;const vec4 v4=vec4(1,0.24705882352941178,0.2901960784313726,1);const float e5=0.63;const vec4 v5=vec4(1,0.4823529411764706,0,1);const float e6=0.75;const vec4 v6=vec4(0.9176470588235294,0.6901960784313725,0,1);const float e7=0.88;const vec4 v7=vec4(0.7450980392156863,0.8941176470588236,0,1);const float e8=1.0;const vec4 v8=vec4(0.5764705882352941,1,0,1);float a0=smoothstep(e0,e1,x_43);float a1=smoothstep(e1,e2,x_43);float a2=smoothstep(e2,e3,x_43);float a3=smoothstep(e3,e4,x_43);float a4=smoothstep(e4,e5,x_43);float a5=smoothstep(e5,e6,x_43);float a6=smoothstep(e6,e7,x_43);float a7=smoothstep(e7,e8,x_43);return max(mix(v0,v1,a0)*step(e0,x_43)*step(x_43,e1),max(mix(v1,v2,a1)*step(e1,x_43)*step(x_43,e2),max(mix(v2,v3,a2)*step(e2,x_43)*step(x_43,e3),max(mix(v3,v4,a3)*step(e3,x_43)*step(x_43,e4),max(mix(v4,v5,a4)*step(e4,x_43)*step(x_43,e5),max(mix(v5,v6,a5)*step(e5,x_43)*step(x_43,e6),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))))))));}vec4 rainbow_soft_1310269270(float x_14){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.1;const vec4 v1=vec4(0.7803921568627451,0,0.7058823529411765,1);const float e2=0.2;const vec4 v2=vec4(1,0,0.4745098039215686,1);const float e3=0.3;const vec4 v3=vec4(1,0.4235294117647059,0,1);const float e4=0.4;const vec4 v4=vec4(0.8705882352941177,0.7607843137254902,0,1);const float e5=0.5;const vec4 v5=vec4(0.5882352941176471,1,0,1);const float e6=0.6;const vec4 v6=vec4(0,1,0.21568627450980393,1);const float e7=0.7;const vec4 v7=vec4(0,0.9647058823529412,0.5882352941176471,1);const float e8=0.8;const vec4 v8=vec4(0.19607843137254902,0.6549019607843137,0.8705882352941177,1);const float e9=0.9;const vec4 v9=vec4(0.403921568627451,0.2,0.9215686274509803,1);const float e10=1.0;const vec4 v10=vec4(0.48627450980392156,0,0.7294117647058823,1);float a0=smoothstep(e0,e1,x_14);float a1=smoothstep(e1,e2,x_14);float a2=smoothstep(e2,e3,x_14);float a3=smoothstep(e3,e4,x_14);float a4=smoothstep(e4,e5,x_14);float a5=smoothstep(e5,e6,x_14);float a6=smoothstep(e6,e7,x_14);float a7=smoothstep(e7,e8,x_14);float a8=smoothstep(e8,e9,x_14);float a9=smoothstep(e9,e10,x_14);return max(mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1),max(mix(v1,v2,a1)*step(e1,x_14)*step(x_14,e2),max(mix(v2,v3,a2)*step(e2,x_14)*step(x_14,e3),max(mix(v3,v4,a3)*step(e3,x_14)*step(x_14,e4),max(mix(v4,v5,a4)*step(e4,x_14)*step(x_14,e5),max(mix(v5,v6,a5)*step(e5,x_14)*step(x_14,e6),max(mix(v6,v7,a6)*step(e6,x_14)*step(x_14,e7),max(mix(v7,v8,a7)*step(e7,x_14)*step(x_14,e8),max(mix(v8,v9,a8)*step(e8,x_14)*step(x_14,e9),mix(v9,v10,a9)*step(e9,x_14)*step(x_14,e10))))))))));}vec4 bathymetry(float x_36){const float e0=0.0;const vec4 v0=vec4(0.1568627450980392,0.10196078431372549,0.17254901960784313,1);const float e1=0.13;const vec4 v1=vec4(0.23137254901960785,0.19215686274509805,0.35294117647058826,1);const float e2=0.25;const vec4 v2=vec4(0.25098039215686274,0.2980392156862745,0.5450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.24705882352941178,0.43137254901960786,0.592156862745098,1);const float e4=0.5;const vec4 v4=vec4(0.2823529411764706,0.5568627450980392,0.6196078431372549,1);const float e5=0.63;const vec4 v5=vec4(0.3333333333333333,0.6823529411764706,0.6392156862745098,1);const float e6=0.75;const vec4 v6=vec4(0.47058823529411764,0.807843137254902,0.6392156862745098,1);const float e7=0.88;const vec4 v7=vec4(0.7333333333333333,0.9019607843137255,0.6745098039215687,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.996078431372549,0.8,1);float a0=smoothstep(e0,e1,x_36);float a1=smoothstep(e1,e2,x_36);float a2=smoothstep(e2,e3,x_36);float a3=smoothstep(e3,e4,x_36);float a4=smoothstep(e4,e5,x_36);float a5=smoothstep(e5,e6,x_36);float a6=smoothstep(e6,e7,x_36);float a7=smoothstep(e7,e8,x_36);return max(mix(v0,v1,a0)*step(e0,x_36)*step(x_36,e1),max(mix(v1,v2,a1)*step(e1,x_36)*step(x_36,e2),max(mix(v2,v3,a2)*step(e2,x_36)*step(x_36,e3),max(mix(v3,v4,a3)*step(e3,x_36)*step(x_36,e4),max(mix(v4,v5,a4)*step(e4,x_36)*step(x_36,e5),max(mix(v5,v6,a5)*step(e5,x_36)*step(x_36,e6),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))))))));}vec4 cdom(float x_7){const float e0=0.0;const vec4 v0=vec4(0.1843137254901961,0.058823529411764705,0.24313725490196078,1);const float e1=0.13;const vec4 v1=vec4(0.3411764705882353,0.09019607843137255,0.33725490196078434,1);const float e2=0.25;const vec4 v2=vec4(0.5098039215686274,0.10980392156862745,0.38823529411764707,1);const float e3=0.38;const vec4 v3=vec4(0.6705882352941176,0.1607843137254902,0.3764705882352941,1);const float e4=0.5;const vec4 v4=vec4(0.807843137254902,0.2627450980392157,0.33725490196078434,1);const float e5=0.63;const vec4 v5=vec4(0.9019607843137255,0.41568627450980394,0.32941176470588235,1);const float e6=0.75;const vec4 v6=vec4(0.9490196078431372,0.5843137254901961,0.403921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.7568627450980392,0.5294117647058824,1);const float e8=1.0;const vec4 v8=vec4(0.996078431372549,0.9294117647058824,0.6901960784313725,1);float a0=smoothstep(e0,e1,x_7);float a1=smoothstep(e1,e2,x_7);float a2=smoothstep(e2,e3,x_7);float a3=smoothstep(e3,e4,x_7);float a4=smoothstep(e4,e5,x_7);float a5=smoothstep(e5,e6,x_7);float a6=smoothstep(e6,e7,x_7);float a7=smoothstep(e7,e8,x_7);return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),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))))))));}vec4 chlorophyll(float x_6){const float e0=0.0;const vec4 v0=vec4(0.07058823529411765,0.1411764705882353,0.0784313725490196,1);const float e1=0.13;const vec4 v1=vec4(0.09803921568627451,0.24705882352941178,0.1607843137254902,1);const float e2=0.25;const vec4 v2=vec4(0.09411764705882353,0.3568627450980392,0.23137254901960785,1);const float e3=0.38;const vec4 v3=vec4(0.050980392156862744,0.4666666666666667,0.2823529411764706,1);const float e4=0.5;const vec4 v4=vec4(0.07058823529411765,0.5803921568627451,0.3137254901960784,1);const float e5=0.63;const vec4 v5=vec4(0.3137254901960784,0.6784313725490196,0.34901960784313724,1);const float e6=0.75;const vec4 v6=vec4(0.5176470588235295,0.7686274509803922,0.47843137254901963,1);const float e7=0.88;const vec4 v7=vec4(0.6862745098039216,0.8666666666666667,0.6352941176470588,1);const float e8=1.0;const vec4 v8=vec4(0.8431372549019608,0.9764705882352941,0.8156862745098039,1);float a0=smoothstep(e0,e1,x_6);float a1=smoothstep(e1,e2,x_6);float a2=smoothstep(e2,e3,x_6);float a3=smoothstep(e3,e4,x_6);float a4=smoothstep(e4,e5,x_6);float a5=smoothstep(e5,e6,x_6);float a6=smoothstep(e6,e7,x_6);float a7=smoothstep(e7,e8,x_6);return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),max(mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2),max(mix(v2,v3,a2)*step(e2,x_6)*step(x_6,e3),max(mix(v3,v4,a3)*step(e3,x_6)*step(x_6,e4),max(mix(v4,v5,a4)*step(e4,x_6)*step(x_6,e5),max(mix(v5,v6,a5)*step(e5,x_6)*step(x_6,e6),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))))))));}vec4 density(float x_19){const float e0=0.0;const vec4 v0=vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);const float e1=0.13;const vec4 v1=vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);const float e2=0.25;const vec4 v2=vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);const float e3=0.38;const vec4 v3=vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);const float e4=0.5;const vec4 v4=vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);const float e5=0.63;const vec4 v5=vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);const float e6=0.75;const vec4 v6=vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);const float e7=0.88;const vec4 v7=vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);const float e8=1.0;const vec4 v8=vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);float a0=smoothstep(e0,e1,x_19);float a1=smoothstep(e1,e2,x_19);float a2=smoothstep(e2,e3,x_19);float a3=smoothstep(e3,e4,x_19);float a4=smoothstep(e4,e5,x_19);float a5=smoothstep(e5,e6,x_19);float a6=smoothstep(e6,e7,x_19);float a7=smoothstep(e7,e8,x_19);return max(mix(v0,v1,a0)*step(e0,x_19)*step(x_19,e1),max(mix(v1,v2,a1)*step(e1,x_19)*step(x_19,e2),max(mix(v2,v3,a2)*step(e2,x_19)*step(x_19,e3),max(mix(v3,v4,a3)*step(e3,x_19)*step(x_19,e4),max(mix(v4,v5,a4)*step(e4,x_19)*step(x_19,e5),max(mix(v5,v6,a5)*step(e5,x_19)*step(x_19,e6),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))))))));}vec4 freesurface_blue_3154355989(float x_35){const float e0=0.0;const vec4 v0=vec4(0.11764705882352941,0.01568627450980392,0.43137254901960786,1);const float e1=0.13;const vec4 v1=vec4(0.1843137254901961,0.054901960784313725,0.6901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.1607843137254902,0.17647058823529413,0.9254901960784314,1);const float e3=0.38;const vec4 v3=vec4(0.09803921568627451,0.38823529411764707,0.8313725490196079,1);const float e4=0.5;const vec4 v4=vec4(0.26666666666666666,0.5137254901960784,0.7843137254901961,1);const float e5=0.63;const vec4 v5=vec4(0.4470588235294118,0.611764705882353,0.7725490196078432,1);const float e6=0.75;const vec4 v6=vec4(0.615686274509804,0.7098039215686275,0.796078431372549,1);const float e7=0.88;const vec4 v7=vec4(0.7843137254901961,0.8156862745098039,0.8470588235294118,1);const float e8=1.0;const vec4 v8=vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);float a0=smoothstep(e0,e1,x_35);float a1=smoothstep(e1,e2,x_35);float a2=smoothstep(e2,e3,x_35);float a3=smoothstep(e3,e4,x_35);float a4=smoothstep(e4,e5,x_35);float a5=smoothstep(e5,e6,x_35);float a6=smoothstep(e6,e7,x_35);float a7=smoothstep(e7,e8,x_35);return max(mix(v0,v1,a0)*step(e0,x_35)*step(x_35,e1),max(mix(v1,v2,a1)*step(e1,x_35)*step(x_35,e2),max(mix(v2,v3,a2)*step(e2,x_35)*step(x_35,e3),max(mix(v3,v4,a3)*step(e3,x_35)*step(x_35,e4),max(mix(v4,v5,a4)*step(e4,x_35)*step(x_35,e5),max(mix(v5,v6,a5)*step(e5,x_35)*step(x_35,e6),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))))))));}vec4 freesurface_red_1679163293(float x_20){const float e0=0.0;const vec4 v0=vec4(0.23529411764705882,0.03529411764705882,0.07058823529411765,1);const float e1=0.13;const vec4 v1=vec4(0.39215686274509803,0.06666666666666667,0.10588235294117647,1);const float e2=0.25;const vec4 v2=vec4(0.5568627450980392,0.0784313725490196,0.11372549019607843,1);const float e3=0.38;const vec4 v3=vec4(0.6941176470588235,0.16862745098039217,0.10588235294117647,1);const float e4=0.5;const vec4 v4=vec4(0.7529411764705882,0.3411764705882353,0.24705882352941178,1);const float e5=0.63;const vec4 v5=vec4(0.803921568627451,0.49019607843137253,0.4117647058823529,1);const float e6=0.75;const vec4 v6=vec4(0.8470588235294118,0.6352941176470588,0.5803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.8901960784313725,0.7803921568627451,0.7568627450980392,1);const float e8=1.0;const vec4 v8=vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);float a0=smoothstep(e0,e1,x_20);float a1=smoothstep(e1,e2,x_20);float a2=smoothstep(e2,e3,x_20);float a3=smoothstep(e3,e4,x_20);float a4=smoothstep(e4,e5,x_20);float a5=smoothstep(e5,e6,x_20);float a6=smoothstep(e6,e7,x_20);float a7=smoothstep(e7,e8,x_20);return max(mix(v0,v1,a0)*step(e0,x_20)*step(x_20,e1),max(mix(v1,v2,a1)*step(e1,x_20)*step(x_20,e2),max(mix(v2,v3,a2)*step(e2,x_20)*step(x_20,e3),max(mix(v3,v4,a3)*step(e3,x_20)*step(x_20,e4),max(mix(v4,v5,a4)*step(e4,x_20)*step(x_20,e5),max(mix(v5,v6,a5)*step(e5,x_20)*step(x_20,e6),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))))))));}vec4 oxygen(float x_11){const float e0=0.0;const vec4 v0=vec4(0.25098039215686274,0.0196078431372549,0.0196078431372549,1);const float e1=0.13;const vec4 v1=vec4(0.41568627450980394,0.023529411764705882,0.058823529411764705,1);const float e2=0.25;const vec4 v2=vec4(0.5647058823529412,0.10196078431372549,0.027450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.6588235294117647,0.25098039215686274,0.011764705882352941,1);const float e4=0.5;const vec4 v4=vec4(0.7372549019607844,0.39215686274509803,0.01568627450980392,1);const float e5=0.63;const vec4 v5=vec4(0.807843137254902,0.5333333333333333,0.043137254901960784,1);const float e6=0.75;const vec4 v6=vec4(0.8627450980392157,0.6823529411764706,0.09803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.9058823529411765,0.8431372549019608,0.17254901960784313,1);const float e8=1.0;const vec4 v8=vec4(0.9725490196078431,0.996078431372549,0.4117647058823529,1);float a0=smoothstep(e0,e1,x_11);float a1=smoothstep(e1,e2,x_11);float a2=smoothstep(e2,e3,x_11);float a3=smoothstep(e3,e4,x_11);float a4=smoothstep(e4,e5,x_11);float a5=smoothstep(e5,e6,x_11);float a6=smoothstep(e6,e7,x_11);float a7=smoothstep(e7,e8,x_11);return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),max(mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3),max(mix(v3,v4,a3)*step(e3,x_11)*step(x_11,e4),max(mix(v4,v5,a4)*step(e4,x_11)*step(x_11,e5),max(mix(v5,v6,a5)*step(e5,x_11)*step(x_11,e6),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))))))));}vec4 par(float x_28){const float e0=0.0;const vec4 v0=vec4(0.2,0.0784313725490196,0.09411764705882353,1);const float e1=0.13;const vec4 v1=vec4(0.35294117647058826,0.12549019607843137,0.13725490196078433,1);const float e2=0.25;const vec4 v2=vec4(0.5058823529411764,0.17254901960784313,0.13333333333333333,1);const float e3=0.38;const vec4 v3=vec4(0.6235294117647059,0.26666666666666666,0.09803921568627451,1);const float e4=0.5;const vec4 v4=vec4(0.7137254901960784,0.38823529411764707,0.07450980392156863,1);const float e5=0.63;const vec4 v5=vec4(0.7803921568627451,0.5254901960784314,0.08627450980392157,1);const float e6=0.75;const vec4 v6=vec4(0.8313725490196079,0.6705882352941176,0.13725490196078433,1);const float e7=0.88;const vec4 v7=vec4(0.8666666666666667,0.8235294117647058,0.21176470588235294,1);const float e8=1.0;const vec4 v8=vec4(0.8823529411764706,0.9921568627450981,0.29411764705882354,1);float a0=smoothstep(e0,e1,x_28);float a1=smoothstep(e1,e2,x_28);float a2=smoothstep(e2,e3,x_28);float a3=smoothstep(e3,e4,x_28);float a4=smoothstep(e4,e5,x_28);float a5=smoothstep(e5,e6,x_28);float a6=smoothstep(e6,e7,x_28);float a7=smoothstep(e7,e8,x_28);return max(mix(v0,v1,a0)*step(e0,x_28)*step(x_28,e1),max(mix(v1,v2,a1)*step(e1,x_28)*step(x_28,e2),max(mix(v2,v3,a2)*step(e2,x_28)*step(x_28,e3),max(mix(v3,v4,a3)*step(e3,x_28)*step(x_28,e4),max(mix(v4,v5,a4)*step(e4,x_28)*step(x_28,e5),max(mix(v5,v6,a5)*step(e5,x_28)*step(x_28,e6),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))))))));}vec4 phase(float x_39){const float e0=0.0;const vec4 v0=vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);const float e1=0.13;const vec4 v1=vec4(0.7215686274509804,0.2784313725490196,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.7294117647058823,0.22745098039215686,0.45098039215686275,1);const float e3=0.38;const vec4 v3=vec4(0.6274509803921569,0.2784313725490196,0.7254901960784313,1);const float e4=0.5;const vec4 v4=vec4(0.43137254901960786,0.3803921568627451,0.8549019607843137,1);const float e5=0.63;const vec4 v5=vec4(0.19607843137254902,0.4823529411764706,0.6431372549019608,1);const float e6=0.75;const vec4 v6=vec4(0.12156862745098039,0.5137254901960784,0.43137254901960786,1);const float e7=0.88;const vec4 v7=vec4(0.30196078431372547,0.5058823529411764,0.13333333333333333,1);const float e8=1.0;const vec4 v8=vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);float a0=smoothstep(e0,e1,x_39);float a1=smoothstep(e1,e2,x_39);float a2=smoothstep(e2,e3,x_39);float a3=smoothstep(e3,e4,x_39);float a4=smoothstep(e4,e5,x_39);float a5=smoothstep(e5,e6,x_39);float a6=smoothstep(e6,e7,x_39);float a7=smoothstep(e7,e8,x_39);return max(mix(v0,v1,a0)*step(e0,x_39)*step(x_39,e1),max(mix(v1,v2,a1)*step(e1,x_39)*step(x_39,e2),max(mix(v2,v3,a2)*step(e2,x_39)*step(x_39,e3),max(mix(v3,v4,a3)*step(e3,x_39)*step(x_39,e4),max(mix(v4,v5,a4)*step(e4,x_39)*step(x_39,e5),max(mix(v5,v6,a5)*step(e5,x_39)*step(x_39,e6),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))))))));}vec4 salinity(float x_26){const float e0=0.0;const vec4 v0=vec4(0.16470588235294117,0.09411764705882353,0.4235294117647059,1);const float e1=0.13;const vec4 v1=vec4(0.12941176470588237,0.19607843137254902,0.6352941176470588,1);const float e2=0.25;const vec4 v2=vec4(0.058823529411764705,0.35294117647058826,0.5686274509803921,1);const float e3=0.38;const vec4 v3=vec4(0.1568627450980392,0.4627450980392157,0.5372549019607843,1);const float e4=0.5;const vec4 v4=vec4(0.23137254901960785,0.5725490196078431,0.5294117647058824,1);const float e5=0.63;const vec4 v5=vec4(0.30980392156862746,0.6862745098039216,0.49411764705882355,1);const float e6=0.75;const vec4 v6=vec4(0.47058823529411764,0.796078431372549,0.40784313725490196,1);const float e7=0.88;const vec4 v7=vec4(0.7568627450980392,0.8666666666666667,0.39215686274509803,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.9372549019607843,0.6039215686274509,1);float a0=smoothstep(e0,e1,x_26);float a1=smoothstep(e1,e2,x_26);float a2=smoothstep(e2,e3,x_26);float a3=smoothstep(e3,e4,x_26);float a4=smoothstep(e4,e5,x_26);float a5=smoothstep(e5,e6,x_26);float a6=smoothstep(e6,e7,x_26);float a7=smoothstep(e7,e8,x_26);return max(mix(v0,v1,a0)*step(e0,x_26)*step(x_26,e1),max(mix(v1,v2,a1)*step(e1,x_26)*step(x_26,e2),max(mix(v2,v3,a2)*step(e2,x_26)*step(x_26,e3),max(mix(v3,v4,a3)*step(e3,x_26)*step(x_26,e4),max(mix(v4,v5,a4)*step(e4,x_26)*step(x_26,e5),max(mix(v5,v6,a5)*step(e5,x_26)*step(x_26,e6),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))))))));}vec4 temperature(float x_8){const float e0=0.0;const vec4 v0=vec4(0.01568627450980392,0.13725490196078433,0.2,1);const float e1=0.13;const vec4 v1=vec4(0.09019607843137255,0.2,0.47843137254901963,1);const float e2=0.25;const vec4 v2=vec4(0.3333333333333333,0.23137254901960785,0.615686274509804,1);const float e3=0.38;const vec4 v3=vec4(0.5058823529411764,0.30980392156862746,0.5607843137254902,1);const float e4=0.5;const vec4 v4=vec4(0.6862745098039216,0.37254901960784315,0.5098039215686274,1);const float e5=0.63;const vec4 v5=vec4(0.8705882352941177,0.4392156862745098,0.396078431372549,1);const float e6=0.75;const vec4 v6=vec4(0.9764705882352941,0.5725490196078431,0.25882352941176473,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.7686274509803922,0.2549019607843137,1);const float e8=1.0;const vec4 v8=vec4(0.9098039215686274,0.9803921568627451,0.3568627450980392,1);float a0=smoothstep(e0,e1,x_8);float a1=smoothstep(e1,e2,x_8);float a2=smoothstep(e2,e3,x_8);float a3=smoothstep(e3,e4,x_8);float a4=smoothstep(e4,e5,x_8);float a5=smoothstep(e5,e6,x_8);float a6=smoothstep(e6,e7,x_8);float a7=smoothstep(e7,e8,x_8);return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),max(mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5),max(mix(v5,v6,a5)*step(e5,x_8)*step(x_8,e6),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))))))));}vec4 turbidity(float x_40){const float e0=0.0;const vec4 v0=vec4(0.13333333333333333,0.12156862745098039,0.10588235294117647,1);const float e1=0.13;const vec4 v1=vec4(0.2549019607843137,0.19607843137254902,0.1607843137254902,1);const float e2=0.25;const vec4 v2=vec4(0.3843137254901961,0.27058823529411763,0.20392156862745098,1);const float e3=0.38;const vec4 v3=vec4(0.5137254901960784,0.34901960784313724,0.2235294117647059,1);const float e4=0.5;const vec4 v4=vec4(0.6313725490196078,0.4392156862745098,0.23137254901960785,1);const float e5=0.63;const vec4 v5=vec4(0.7254901960784313,0.5490196078431373,0.25882352941176473,1);const float e6=0.75;const vec4 v6=vec4(0.792156862745098,0.6823529411764706,0.34509803921568627,1);const float e7=0.88;const vec4 v7=vec4(0.8470588235294118,0.8196078431372549,0.49411764705882355,1);const float e8=1.0;const vec4 v8=vec4(0.9137254901960784,0.9647058823529412,0.6705882352941176,1);float a0=smoothstep(e0,e1,x_40);float a1=smoothstep(e1,e2,x_40);float a2=smoothstep(e2,e3,x_40);float a3=smoothstep(e3,e4,x_40);float a4=smoothstep(e4,e5,x_40);float a5=smoothstep(e5,e6,x_40);float a6=smoothstep(e6,e7,x_40);float a7=smoothstep(e7,e8,x_40);return max(mix(v0,v1,a0)*step(e0,x_40)*step(x_40,e1),max(mix(v1,v2,a1)*step(e1,x_40)*step(x_40,e2),max(mix(v2,v3,a2)*step(e2,x_40)*step(x_40,e3),max(mix(v3,v4,a3)*step(e3,x_40)*step(x_40,e4),max(mix(v4,v5,a4)*step(e4,x_40)*step(x_40,e5),max(mix(v5,v6,a5)*step(e5,x_40)*step(x_40,e6),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))))))));}vec4 velocity_blue_297387650(float x_2){const float e0=0.0;const vec4 v0=vec4(0.06666666666666667,0.12549019607843137,0.25098039215686274,1);const float e1=0.13;const vec4 v1=vec4(0.13725490196078433,0.20392156862745098,0.4549019607843137,1);const float e2=0.25;const vec4 v2=vec4(0.11372549019607843,0.3176470588235294,0.611764705882353,1);const float e3=0.38;const vec4 v3=vec4(0.12156862745098039,0.44313725490196076,0.6352941176470588,1);const float e4=0.5;const vec4 v4=vec4(0.19607843137254902,0.5647058823529412,0.6627450980392157,1);const float e5=0.63;const vec4 v5=vec4(0.3411764705882353,0.6784313725490196,0.6901960784313725,1);const float e6=0.75;const vec4 v6=vec4(0.5843137254901961,0.7686274509803922,0.7411764705882353,1);const float e7=0.88;const vec4 v7=vec4(0.796078431372549,0.8666666666666667,0.8274509803921568,1);const float e8=1.0;const vec4 v8=vec4(0.996078431372549,0.984313725490196,0.9019607843137255,1);float a0=smoothstep(e0,e1,x_2);float a1=smoothstep(e1,e2,x_2);float a2=smoothstep(e2,e3,x_2);float a3=smoothstep(e3,e4,x_2);float a4=smoothstep(e4,e5,x_2);float a5=smoothstep(e5,e6,x_2);float a6=smoothstep(e6,e7,x_2);float a7=smoothstep(e7,e8,x_2);return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),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))))))));}vec4 velocity_green_2558432129(float x_27){const float e0=0.0;const vec4 v0=vec4(0.09019607843137255,0.13725490196078433,0.07450980392156863,1);const float e1=0.13;const vec4 v1=vec4(0.09411764705882353,0.25098039215686274,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.043137254901960784,0.37254901960784315,0.17647058823529413,1);const float e3=0.38;const vec4 v3=vec4(0.15294117647058825,0.4823529411764706,0.13725490196078433,1);const float e4=0.5;const vec4 v4=vec4(0.37254901960784315,0.5725490196078431,0.047058823529411764,1);const float e5=0.63;const vec4 v5=vec4(0.596078431372549,0.6470588235294118,0.07058823529411765,1);const float e6=0.75;const vec4 v6=vec4(0.788235294117647,0.7294117647058823,0.27058823529411763,1);const float e7=0.88;const vec4 v7=vec4(0.9137254901960784,0.8470588235294118,0.5372549019607843,1);const float e8=1.0;const vec4 v8=vec4(1,0.9921568627450981,0.803921568627451,1);float a0=smoothstep(e0,e1,x_27);float a1=smoothstep(e1,e2,x_27);float a2=smoothstep(e2,e3,x_27);float a3=smoothstep(e3,e4,x_27);float a4=smoothstep(e4,e5,x_27);float a5=smoothstep(e5,e6,x_27);float a6=smoothstep(e6,e7,x_27);float a7=smoothstep(e7,e8,x_27);return max(mix(v0,v1,a0)*step(e0,x_27)*step(x_27,e1),max(mix(v1,v2,a1)*step(e1,x_27)*step(x_27,e2),max(mix(v2,v3,a2)*step(e2,x_27)*step(x_27,e3),max(mix(v3,v4,a3)*step(e3,x_27)*step(x_27,e4),max(mix(v4,v5,a4)*step(e4,x_27)*step(x_27,e5),max(mix(v5,v6,a5)*step(e5,x_27)*step(x_27,e6),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))))))));}vec4 cubehelix(float x_37){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.07;const vec4 v1=vec4(0.08627450980392157,0.0196078431372549,0.23137254901960785,1);const float e2=0.13;const vec4 v2=vec4(0.23529411764705882,0.01568627450980392,0.4117647058823529,1);const float e3=0.2;const vec4 v3=vec4(0.42745098039215684,0.00392156862745098,0.5294117647058824,1);const float e4=0.27;const vec4 v4=vec4(0.6313725490196078,0,0.5764705882352941,1);const float e5=0.33;const vec4 v5=vec4(0.8235294117647058,0.00784313725490196,0.5568627450980392,1);const float e6=0.4;const vec4 v6=vec4(0.984313725490196,0.043137254901960784,0.4823529411764706,1);const float e7=0.47;const vec4 v7=vec4(1,0.11372549019607843,0.3803921568627451,1);const float e8=0.53;const vec4 v8=vec4(1,0.21176470588235294,0.27058823529411763,1);const float e9=0.6;const vec4 v9=vec4(1,0.3333333333333333,0.1803921568627451,1);const float e10=0.67;const vec4 v10=vec4(1,0.47058823529411764,0.13333333333333333,1);const float e11=0.73;const vec4 v11=vec4(1,0.615686274509804,0.1450980392156863,1);const float e12=0.8;const vec4 v12=vec4(0.9450980392156862,0.7490196078431373,0.2235294117647059,1);const float e13=0.87;const vec4 v13=vec4(0.8784313725490196,0.8627450980392157,0.36470588235294116,1);const float e14=0.93;const vec4 v14=vec4(0.8549019607843137,0.9450980392156862,0.5568627450980392,1);const float e15=1.0;const vec4 v15=vec4(0.8901960784313725,0.9921568627450981,0.7764705882352941,1);float a0=smoothstep(e0,e1,x_37);float a1=smoothstep(e1,e2,x_37);float a2=smoothstep(e2,e3,x_37);float a3=smoothstep(e3,e4,x_37);float a4=smoothstep(e4,e5,x_37);float a5=smoothstep(e5,e6,x_37);float a6=smoothstep(e6,e7,x_37);float a7=smoothstep(e7,e8,x_37);float a8=smoothstep(e8,e9,x_37);float a9=smoothstep(e9,e10,x_37);float a10=smoothstep(e10,e11,x_37);float a11=smoothstep(e11,e12,x_37);float a12=smoothstep(e12,e13,x_37);float a13=smoothstep(e13,e14,x_37);float a14=smoothstep(e14,e15,x_37);return max(mix(v0,v1,a0)*step(e0,x_37)*step(x_37,e1),max(mix(v1,v2,a1)*step(e1,x_37)*step(x_37,e2),max(mix(v2,v3,a2)*step(e2,x_37)*step(x_37,e3),max(mix(v3,v4,a3)*step(e3,x_37)*step(x_37,e4),max(mix(v4,v5,a4)*step(e4,x_37)*step(x_37,e5),max(mix(v5,v6,a5)*step(e5,x_37)*step(x_37,e6),max(mix(v6,v7,a6)*step(e6,x_37)*step(x_37,e7),max(mix(v7,v8,a7)*step(e7,x_37)*step(x_37,e8),max(mix(v8,v9,a8)*step(e8,x_37)*step(x_37,e9),max(mix(v9,v10,a9)*step(e9,x_37)*step(x_37,e10),max(mix(v10,v11,a10)*step(e10,x_37)*step(x_37,e11),max(mix(v11,v12,a11)*step(e11,x_37)*step(x_37,e12),max(mix(v12,v13,a12)*step(e12,x_37)*step(x_37,e13),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)))))))))))))));}vec3 hsv_to_rgb(vec3 c){vec4 K=vec4(1.0,2.0/3.0,1.0/3.0,3.0);vec3 p=abs(fract(c.xxx+K.xyz)*6.0-K.www);return c.z*mix(K.xxx,clamp(p-K.xxx,0.0,1.0),c.y);}vec3 rgb_to_hsv(vec3 rgb){float Cmax=max(rgb.r,max(rgb.g,rgb.b));float Cmin=min(rgb.r,min(rgb.g,rgb.b));float delta=Cmax-Cmin;vec3 hsv=vec3(0.,0.,Cmax);if(Cmax>Cmin){hsv.y=delta/Cmax;if(rgb.r==Cmax){hsv.x=(rgb.g-rgb.b)/delta;}else{if(rgb.g==Cmax){hsv.x=2.+(rgb.b-rgb.r)/delta;}else{hsv.x=4.+(rgb.r-rgb.g)/delta;}}hsv.x=fract(hsv.x/6.);}return hsv;}float sample_and_apply_sliders(SAMPLER_TYPE channel,vec3 vTexCoord,vec2 sliderValues){float fragIntensity=float(texture(channel,vTexCoord).r);float slidersAppliedToIntensity=(fragIntensity-sliderValues[0])/max(0.0005,(sliderValues[1]-sliderValues[0]));return max(0.0,slidersAppliedToIntensity);}vec4 colormap(float intensity,float opacity){return vec4(COLORMAP_FUNCTION(min(1.0,intensity)).xyz,opacity);}"},Ir=(fn={},Object(s.a)(fn,yn.MAX_INTENSITY_PROJECTION,{_BEFORE_RENDER:"      float maxVals[6] = float[6](-1.0, -1.0, -1.0, -1.0, -1.0, -1.0);\n    ",_RENDER:"    \n      float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n      for(int i = 0; i < 6; i++) {\n        if(intensityArray[i] > maxVals[i]) {\n          maxVals[i] = intensityArray[i];\n        }\n      }\n    ",_AFTER_RENDER:"      vec3 rgbCombo = vec3(0.0);\n      for(int i = 0; i < 6; i++) {\n        vec3 hsvCombo = rgb2hsv(vec3(colorValues[i]));\n        hsvCombo = vec3(hsvCombo.xy, maxVals[i]);\n        rgbCombo += hsv2rgb(hsvCombo);\n      }\n      color = vec4(rgbCombo, 1.0);\n    "}),Object(s.a)(fn,yn.MIN_INTENSITY_PROJECTION,{_BEFORE_RENDER:"      float minVals[6] = float[6](1. / 0., 1. / 0., 1. / 0., 1. / 0., 1. / 0., 1. / 0.);\n    ",_RENDER:"    \n      float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n      for(int i = 0; i < 6; i++) {\n        if(intensityArray[i] < minVals[i]) {\n          minVals[i] = intensityArray[i];\n        }\n      }\n    ",_AFTER_RENDER:"      vec3 rgbCombo = vec3(0.0);\n      for(int i = 0; i < 6; i++) {\n        vec3 hsvCombo = rgb2hsv(vec3(colorValues[i]));\n        hsvCombo = vec3(hsvCombo.xy, minVals[i]);\n        rgbCombo += hsv2rgb(hsvCombo);\n      }\n      color = vec4(rgbCombo, 1.0);\n    "}),Object(s.a)(fn,yn.ADDITIVE,{_BEFORE_RENDER:"",_RENDER:"      vec3 rgbCombo = vec3(0.0);\n      vec3 hsvCombo = vec3(0.0);\n      float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n      float total = 0.0;\n      for(int i = 0; i < 6; i++) {\n        float intensityValue = intensityArray[i];\n        hsvCombo = rgb2hsv(vec3(colorValues[i]));\n        hsvCombo = vec3(hsvCombo.xy, intensityValue);\n        rgbCombo += hsv2rgb(hsvCombo);\n        total += intensityValue;\n      }\n      // Do not go past 1 in opacity.\n      total = min(total, 1.0);\n      vec4 val_color = vec4(rgbCombo, total);\n      // Opacity correction\n      val_color.a = 1.0 - pow(1.0 - val_color.a, 1.0);\n      color.rgb += (1.0 - color.a) * val_color.a * val_color.rgb;\n      color.a += (1.0 - color.a) * val_color.a;\n      if (color.a >= 0.95) {\n        break;\n      }\n    ",_AFTER_RENDER:""}),fn),ur=(dn={},Object(s.a)(dn,yn.MAX_INTENSITY_PROJECTION,{_BEFORE_RENDER:"      float maxVals[6] = float[6](-1.0, -1.0, -1.0, -1.0, -1.0, -1.0);\n    ",_RENDER:"    \n      float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n      for(int i = 0; i < 6; i++) {\n        if(intensityArray[i] > maxVals[i]) {\n          maxVals[i] = intensityArray[i];\n        }\n      }\n    ",_AFTER_RENDER:"      float total = 0.0;\n      for(int i = 0; i < 6; i++) {\n        total += maxVals[i];\n      }\n      // Do not go past 1 in opacity/colormap value.\n      total = min(total, 1.0);\n      color = colormap(total, total);\n    "}),Object(s.a)(dn,yn.MIN_INTENSITY_PROJECTION,{_BEFORE_RENDER:"      float minVals[6] = float[6](1. / 0., 1. / 0., 1. / 0., 1. / 0., 1. / 0., 1. / 0.);\n    ",_RENDER:"    \n      float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n      for(int i = 0; i < 6; i++) {\n        if(intensityArray[i] < minVals[i]) {\n          minVals[i] = intensityArray[i];\n        }\n      }\n    ",_AFTER_RENDER:"      float total = 0.0;\n      for(int i = 0; i < 6; i++) {\n        total += minVals[i];\n      }\n      // Do not go past 1 in opacity/colormap value.\n      total = min(total, 1.0);\n      color = colormap(total, total);\n    "}),Object(s.a)(dn,yn.ADDITIVE,{_BEFORE_RENDER:"",_RENDER:"    float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\t\tfloat total = 0.0;\n\n\t\tfor(int i = 0; i < 6; i++) {\n\t\t\ttotal += intensityArray[i];\n\t\t}\n\t\t// Do not go past 1 in opacity/colormap value.\n\t\ttotal = min(total, 1.0);\n\n\t\tvec4 val_color = colormap(total, total);\n\n\t\t// Opacity correction\n\t\tval_color.a = 1.0 - pow(1.0 - val_color.a, 1.0);\n\t\tcolor.rgb += (1.0 - color.a) * val_color.a * val_color.rgb;\n\t\tcolor.a += (1.0 - color.a) * val_color.a;\n\t\tif (color.a >= 0.95) {\n\t\t\tbreak;\n\t\t}\n    p += ray_dir * dt;\n    ",_AFTER_RENDER:""}),dn);function lr(t){for(var e=void 0,A=t[0],n=1;n<t.length;){var r=t[n],i=t[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==A)return;"access"===r||"optionalAccess"===r?(e=A,A=i(A)):"call"!==r&&"optionalCall"!==r||(A=i((function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=A).call.apply(t,[e].concat(r))})),e=void 0)}return A}var Cr=[1,1,0,0,1,0,1,1,1,0,1,1,0,0,1,0,1,0,0,0,0,1,1,0,1,0,0,1,1,1,1,0,1,0,0,1,1,0,0,0,0,0],hr={pickable:!1,coordinateSystem:d.a.CARTESIAN,channelData:{type:"object",value:{},compare:!0},colorValues:{type:"array",value:[],compare:!0},sliderValues:{type:"array",value:[],compare:!0},dtype:{type:"string",value:"Uint8",compare:!0},colormap:{type:"string",value:"",compare:!0},xSlice:{type:"array",value:null,compare:!0},ySlice:{type:"array",value:null,compare:!0},zSlice:{type:"array",value:null,compare:!0},clippingPlanes:{type:"array",value:[],compare:!0},renderingMode:{type:"string",value:yn.ADDITIVE,compare:!0},resolutionMatrix:{type:"object",value:new b.a,compare:!0}};function Br(){var t=Un("Float32");return Object(B.a)({},t,{sampler:t.sampler.replace("2D","3D"),cast:function(t){return new Float32Array(t)}})}var fr=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"initializeState",value:function(){var t=this.context.gl;this.setState({model:this._getModel(t)}),t.pixelStorei(F.default.UNPACK_ALIGNMENT,1),t.pixelStorei(F.default.PACK_ALIGNMENT,1)}},{key:"getShaders",value:function(){var t=this.props,e=t.colormap,n=t.renderingMode,r=t.clippingPlanes,i=Br().sampler,o=e?ur[n]:Ir[n],a=o._BEFORE_RENDER,s=o._RENDER,g=o._AFTER_RENDER,c=function(t){var e=Sn.filter((function(e){return e!==(t||"viridis")})).map((function(t){return t.replace(/-/g,"_")})),A=new RegExp("vec4 (".concat(e.join("(_([0-9]*))?|"),")\\(float x_[0-9]+\\){([^}]+)}"),"g");return Object(B.a)({},cr,{fs:cr.fs.replace(A,""),defines:{COLORMAP_FUNCTION:t||"viridis"}})}(e);return Object(l.a)(Object(u.a)(A.prototype),"getShaders",this).call(this,{vs:'#version 300 es\n#define GLSLIFY 1\n#define SHADER_NAME xr-layer-vertex-shader\nin vec3 positions;uniform vec3 eye_pos;uniform mat4 proj;uniform mat4 model;uniform mat4 view;uniform mat4 scale;uniform mat4 resolution;out vec3 vray_dir;flat out vec3 transformed_eye;void main(){gl_Position=proj*view*model*scale*resolution*vec4(positions,1.0);/*This first diagram is a skewed volume(i.e a "shear" model matrix applied)top down with the eye marked as #,all in world space^___|__\\|\\\\|\\|____|||\n#\nThis next diagram shows the volume after the inverse model matrix has placed it back in model coordinates,but the eye still in world space.^___|___|||||||__|__||||\n#\nFinally,we apply the inverse model matrix transformation to the eye as well to bring it too into world space.Notice that the ray here matches the "voxels" through which the first ray also passes,as desired.^____/__|/||/||/____|///\n#\n*/transformed_eye=(inverse(resolution)*inverse(scale)*inverse(model)*(vec4(eye_pos,1.0))).xyz;vray_dir=positions-transformed_eye;}',fs:"#version 300 es\nprecision highp int;precision highp float;precision highp SAMPLER_TYPE;\n#define GLSLIFY 1\nuniform highp SAMPLER_TYPE volume0;uniform highp SAMPLER_TYPE volume1;uniform highp SAMPLER_TYPE volume2;uniform highp SAMPLER_TYPE volume3;uniform highp SAMPLER_TYPE volume4;uniform highp SAMPLER_TYPE volume5;uniform vec3 scaledDimensions;uniform mat4 scale;uniform vec3 normals[NUM_PLANES];uniform float distances[NUM_PLANES];uniform vec2 sliderValues[6];uniform vec3 colorValues[6];uniform vec2 xSlice;uniform vec2 ySlice;uniform vec2 zSlice;in vec3 vray_dir;flat in vec3 transformed_eye;out vec4 color;vec2 intersect_box(vec3 orig,vec3 dir){vec3 box_min=vec3(xSlice[0],ySlice[0],zSlice[0]);vec3 box_max=vec3(xSlice[1],ySlice[1],zSlice[1]);vec3 inv_dir=1.0/dir;vec3 tmin_tmp=(box_min-orig)*inv_dir;vec3 tmax_tmp=(box_max-orig)*inv_dir;vec3 tmin=min(tmin_tmp,tmax_tmp);vec3 tmax=max(tmin_tmp,tmax_tmp);float t0=max(tmin.x,max(tmin.y,tmin.z));float t1=min(tmax.x,min(tmax.y,tmax.z));vec2 val=vec2(t0,t1);return val;}float linear_to_srgb(float x){if(x<=0.0031308f){return 12.92f*x;}return 1.055f*pow(x,1.f/2.4f)-0.055f;}vec3 hsv2rgb(vec3 c){vec4 K=vec4(1.0,2.0/3.0,1.0/3.0,3.0);vec3 p=abs(fract(c.xxx+K.xyz)*6.0-K.www);return c.z*mix(K.xxx,clamp(p-K.xxx,0.0,1.0),c.y);}vec3 rgb2hsv(vec3 rgb){float Cmax=max(rgb.r,max(rgb.g,rgb.b));float Cmin=min(rgb.r,min(rgb.g,rgb.b));float delta=Cmax-Cmin;vec3 hsv=vec3(0.,0.,Cmax);if(Cmax>Cmin){hsv.y=delta/Cmax;if(rgb.r==Cmax){hsv.x=(rgb.g-rgb.b)/delta;}else{if(rgb.g==Cmax){hsv.x=2.+(rgb.b-rgb.r)/delta;}else{hsv.x=4.+(rgb.r-rgb.g)/delta;}}hsv.x=fract(hsv.x/6.);}return hsv;}float wang_hash(int seed){seed=(seed ^ 61)^(seed>>16);seed*=9;seed=seed ^(seed>>4);seed*=0x27d4eb2d;seed=seed ^(seed>>15);return float(seed % 2147483647)/float(2147483647);}void main(void){vec3 ray_dir=normalize(vray_dir);vec2 t_hit=intersect_box(transformed_eye,ray_dir);if(t_hit.x>t_hit.y){discard;}t_hit.x=max(t_hit.x,0.0);vec3 dt_vec=1.0/(scale*vec4(abs(ray_dir),1.0)).xyz;float dt=1.0*min(dt_vec.x,min(dt_vec.y,dt_vec.z));float offset=wang_hash(int(gl_FragCoord.x+640.0*gl_FragCoord.y));vec3 p=transformed_eye+(t_hit.x+offset*dt)*ray_dir;_BEFORE_RENDERfor(float t=t_hit.x;t<t_hit.y;t+=dt){float canShow=1.;for(int i=0;i<NUM_PLANES;i+=1){canShow*=max(0.,sign(dot(normals[i],p)+distances[i]));}float canShowXCoordinate=max(p.x-0.0,0.0)*max(1.0-p.x,0.0);float canShowYCoordinate=max(p.y-0.0,0.0)*max(1.0-p.y,0.0);float canShowZCoordinate=max(p.z-0.0,0.0)*max(1.0-p.z,0.0);float canShowCoordinate=float(ceil(canShowXCoordinate*canShowYCoordinate*canShowZCoordinate));canShow=canShowCoordinate*canShow;float intensityValue0=canShow*sample_and_apply_sliders(volume0,p,sliderValues[0]);float intensityValue1=canShow*sample_and_apply_sliders(volume1,p,sliderValues[1]);float intensityValue2=canShow*sample_and_apply_sliders(volume2,p,sliderValues[2]);float intensityValue3=canShow*sample_and_apply_sliders(volume3,p,sliderValues[3]);float intensityValue4=canShow*sample_and_apply_sliders(volume4,p,sliderValues[4]);float intensityValue5=canShow*sample_and_apply_sliders(volume5,p,sliderValues[5]);_RENDERp+=ray_dir*dt;}_AFTER_RENDERcolor.r=linear_to_srgb(color.r);color.g=linear_to_srgb(color.g);color.b=linear_to_srgb(color.b);}".replace("_BEFORE_RENDER",a).replace("_RENDER",s).replace("_AFTER_RENDER",g),defines:{SAMPLER_TYPE:i,COLORMAP_FUNCTION:e||"viridis",NUM_PLANES:String(r.length||1)},modules:[c]})}},{key:"finalizeState",value:function(){Object(l.a)(Object(u.a)(A.prototype),"finalizeState",this).call(this),this.state.textures&&Object.values(this.state.textures).forEach((function(t){return t&&t.delete()}))}},{key:"updateState",value:function(t){var e=t.props,A=t.oldProps;if(t.changeFlags.extensionsChanged||e.colormap!==A.colormap||e.renderingMode!==A.renderingMode||e.clippingPlanes.length!==A.clippingPlanes.length){var n=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(n)})}e.channelData&&lr([e,"optionalAccess",function(t){return t.channelData},"optionalAccess",function(t){return t.data}])!==lr([A,"optionalAccess",function(t){return t.channelData},"optionalAccess",function(t){return t.data}])&&this.loadTexture(e.channelData)}},{key:"_getModel",value:function(t){return t?new D.a(t,Object(B.a)({},this.getShaders(),{geometry:new R.a({drawMode:t.TRIANGLE_STRIP,attributes:{positions:new Float32Array(Cr)}})})):null}},{key:"draw",value:function(t){var e=t.uniforms,A=this.state,n=A.textures,r=A.model,i=A.scaleMatrix,o=this.props,a=o.sliderValues,s=o.colorValues,g=o.xSlice,c=o.ySlice,I=o.zSlice,u=o.modelMatrix,l=o.channelIsOn,C=o.domain,h=o.dtype,f=o.clippingPlanes,d=o.resolutionMatrix,Q=this.context.viewport,E=Q.viewMatrix,p=Q.viewMatrixInverse,y=Q.projectionMatrix;if(n&&r&&i){var v=Gn({sliderValues:a,colorValues:s,channelIsOn:l,domain:C,dtype:h}),m=v.paddedSliderValues,F=v.paddedColorValues,w=i.clone().invert(),S=d.clone().invert(),D=Rn(f.map((function(t){return t.clone().transform(w).transform(S)})),new mt([1,0,0]),f.length||1),R=D.map((function(t){return t.normal})).flat(),U=D.map((function(t){return t.distance}));r.setUniforms(Object(B.a)({},e,{},n,{sliderValues:m,colorValues:F,xSlice:new Float32Array(g?g.map((function(t){return t/i[0]/d[0]})):[0,1]),ySlice:new Float32Array(c?c.map((function(t){return t/i[5]/d[5]})):[0,1]),zSlice:new Float32Array(I?I.map((function(t){return t/i[10]/d[10]})):[0,1]),eye_pos:new Float32Array([p[12],p[13],p[14]]),view:E,proj:y,scale:i,resolution:d,model:u||new b.a,normals:R,distances:U})).draw()}}},{key:"loadTexture",value:function(t){var e=this,A={volume0:null,volume1:null,volume2:null,volume3:null,volume4:null,volume5:null};if(this.state.textures&&Object.values(this.state.textures).forEach((function(t){return t&&t.delete()})),t&&Object.keys(t).length>0&&t.data){var n=t.height,r=t.width,i=t.depth;t.data.forEach((function(t,o){A["volume".concat(o)]=e.dataToTexture(t,r,n,i)}),this),this.setState({textures:A,scaleMatrix:(new b.a).scale(this.props.physicalSizeScalingMatrix.transformPoint([r,n,i]))})}}},{key:"dataToTexture",value:function(t,e,A,n){var r,i,o,a=Br();return new G.a(this.context.gl,{width:e,height:A,depth:n,data:(i=lr([a,"access",function(t){return t.cast},"optionalCall",function(e){return e(t)}]),o=function(){return t},null!=i?i:o()),format:a.dataFormat,dataFormat:a.format,type:a.type,mipmaps:!1,parameters:(r={},Object(s.a)(r,F.default.TEXTURE_MIN_FILTER,F.default.LINEAR),Object(s.a)(r,F.default.TEXTURE_MAG_FILTER,F.default.LINEAR),Object(s.a)(r,F.default.TEXTURE_WRAP_S,F.default.CLAMP_TO_EDGE),Object(s.a)(r,F.default.TEXTURE_WRAP_T,F.default.CLAMP_TO_EDGE),Object(s.a)(r,F.default.TEXTURE_WRAP_R,F.default.CLAMP_TO_EDGE),r)})}}]),A}(p.a);function dr(){return(dr=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,s,g,c,I,u,l,C,h,f,d,Q,E,p,y,v;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.source,n=e.selection,r=e.onUpdate,i=void 0===r?function(){}:r,s=e.downsampleDepth,g=void 0===s?1:s,c=e.signal,I=A.shape,u=A.labels,l=A.dtype,C=Xn(A),h=C.height,f=C.width,d=I[u.indexOf("z")],Q=Math.floor(d/g),E=h*f,p="".concat(l,"Array"),y=globalThis[p],v=new y(E*Q),t.next=11,Promise.all(new Array(Q).fill(0).map(function(){var t=Object(a.a)(o.a.mark((function t(e,r){var a,s,I,u,l,C;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=Object(B.a)({},n,{z:r*g}),t.next=3,A.getRaster({selection:a,signal:c});case 3:for(s=t.sent,I=s.data,u=0,i();u<E;)l=r*E+(E-u-1),C=(f-u-1)%f+f*Math.floor(u/f),v[l]=I[C],u+=1;i();case 9:case"end":return t.stop()}}),t)})));return function(e,A){return t.apply(this,arguments)}}()));case 11:return t.abrupt("return",{data:v,height:h,width:f,depth:Q});case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}fr.layerName="XR3DLayer",fr.defaultProps=hr;var Qr=function(t,e,A){return new L.a({id:"text-".concat(A),coordinateSystem:d.a.CARTESIAN,data:[{text:t,position:e.position}],getColor:[220,220,220,255],getSize:25,sizeUnits:"meters",sizeScale:Math.pow(2,-e.zoom),fontFamily:"Helvetica"})},Er={pickable:!1,coordinateSystem:d.a.CARTESIAN,sliderValues:{type:"array",value:[],compare:!0},channelIsOn:{type:"array",value:[],compare:!0},colorValues:{type:"array",value:[],compare:!0},colormap:{type:"string",value:"",compare:!0},loaderSelection:{type:"array",value:[],compare:!0},resolution:{type:"number",value:0,compare:!0},domain:{type:"array",value:[],compare:!0},loader:{type:"object",value:[{getRaster:function(){var t=Object(a.a)(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{data:[],height:0,width:0});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),dtype:"Uint16",shape:[1],labels:["z"]}],compare:!0},xSlice:{type:"array",value:null,compare:!0},ySlice:{type:"array",value:null,compare:!0},zSlice:{type:"array",value:null,compare:!0},clippingPlanes:{type:"array",value:[],compare:!0},renderingMode:{type:"string",value:yn.MAX_INTENSITY_PROJECTION,compare:!0},onUpdate:{type:"function",value:function(){},compare:!0},useProgressIndicator:{type:"boolean",value:!0,compare:!0},useWebGL1Warning:{type:"boolean",value:!0,compare:!0}},pr=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"clearState",value:function(){this.setState({height:null,width:null,depth:null,data:null,physicalSizeScalingMatrix:null,resolutionMatrix:null,progress:0,abortController:null})}},{key:"finalizeState",value:function(){this.state.abortController.abort()}},{key:"updateState",value:function(t){var e=this,A=t.oldProps,n=t.props,r=n.loader!==A.loader,i=n.resolution!==A.resolution,o=n.loaderSelection!==A.loaderSelection;if(i&&this.clearState(),r||o||i){var a=this.props,s=a.loader,g=a.loaderSelection,c=void 0===g?[]:g,I=a.resolution,u=a.onViewportLoad,l=s[I],C=0,h=(l.shape[l.labels.indexOf("z")]>>I)*c.length,f=function(){C+=.5/h,e.props.onUpdate&&e.props.onUpdate({progress:C}),e.setState({progress:C})},d=new AbortController;this.setState({abortController:d});var Q=d.signal,E=c.map((function(t){return function(t){return dr.apply(this,arguments)}({selection:t,source:l,onUpdate:f,downsampleDepth:Math.pow(2,I),signal:Q})})),p=kn(s[I]);Promise.all(E).then((function(t){u&&u(t);var A={data:t.map((function(t){return t.data})),width:t[0].width,height:t[0].height,depth:t[0].depth};e.setState(Object(B.a)({},A,{physicalSizeScalingMatrix:p,resolutionMatrix:(new b.a).scale(Math.pow(2,I))}))}))}}},{key:"renderLayers",value:function(){var t,e=this.props,A=e.loader,n=e.id,r=e.resolution,i=e.useProgressIndicator,o=e.useWebGL1Warning,a=A[r].dtype,g=this.state,c=g.data,I=g.width,u=g.height,l=g.depth,C=g.progress,h=g.physicalSizeScalingMatrix,B=g.resolutionMatrix,f=this.context.gl;if(!Object(S.j)(f)&&o){var d=this.context.viewport;return Qr(["Volume rendering is only available on browsers that support WebGL2. If you","are using Safari, you can turn on WebGL2 by navigating in the top menubar","to check Develop > Experimental Features > WebGL 2.0 and then refreshing","the page."].join("\n"),d,n)}if((!I||!u)&&i){var Q=this.context.viewport;return Qr("Loading Volume ".concat(String(100*(C||0)).slice(0,5),"%..."),Q,n)}return new fr(this.props,{channelData:{data:c,width:I,height:u,depth:l},id:"XR3DLayer-".concat(0,"-",u,"-").concat(I,"-",0,"-").concat(r,"-").concat(n),physicalSizeScalingMatrix:h,parameters:(t={},Object(s.a)(t,F.default.CULL_FACE,!0),Object(s.a)(t,F.default.CULL_FACE_MODE,F.default.FRONT),Object(s.a)(t,F.default.DEPTH_TEST,!1),Object(s.a)(t,"blendFunc",[F.default.SRC_ALPHA,F.default.ONE]),Object(s.a)(t,"blend",!0),t),resolutionMatrix:B,dtype:a})}}]),A}(y.a);function yr(t){for(var e=void 0,A=t[0],n=1;n<t.length;){var r=t[n],i=t[n+1];if(2,("optionalAccess"===r||"optionalCall"===r)&&null==A)return;"access"===r||"optionalAccess"===r?(A,i(A)):"call"!==r&&"optionalCall"!==r||(i((function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A.call.apply(t,[e].concat(r))})),void 0)}return A}pr.layerName="VolumeLayer",pr.defaultProps=Er;Vt.PureComponent;var vr=function t(){Object(c.a)(this,t)};m.a;var mr="".concat("__viv","-offsets"),br="".concat("__viv","-decoder-pool");function Fr(t){wr(t,mr)||console.warn("GeoTIFF source is missing offsets proxy."),wr(t,br)||console.warn("GeoTIFF source is missing decoder-pool proxy.")}function wr(t,e){return t[e]}function Sr(t,e){return new Proxy(t,{get:function(t,A){return"getImage"===A?function(A){if(!(A in t.ifdRequests)&&A in e){var n=e[A];t.ifdRequests[A]=t.parseFileDirectoryAt(n)}return t.getImage(A)}:A===mr||Reflect.get(t,A)}})}function Dr(t,e){return new Proxy(t,{get:function(t,A){return"readRasters"===A?function(A){return t.readRasters(Object(B.a)({},A,{pool:e}))}:A===br||Reflect.get(t,A)}})}function Rr(t,e,A){var n=void 0===e?null:e,r=function(t,e){var A=atob(t);if(e){for(var n=new Uint8Array(A.length),r=0,i=A.length;r<i;++r)n[r]=A.charCodeAt(r);return String.fromCharCode.apply(null,new Uint16Array(n.buffer))}return A}(t,void 0!==A&&A),i=r.indexOf("\n",10)+1,o=r.substring(i)+(n?"//# sourceMappingURL="+n:""),a=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(a)}var Ur=function(t,e,A){var n;return function(r){return n=n||Rr(t,e,A),new Worker(n,r)}}(" ","data:application/json;charset=utf-8;base64, ",!1);var Gr,Nr,kr=(Gr=function(t){for(var e=void 0,A=t[0],n=1;n<t.length;){var r=t[n],i=t[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==A)return;"access"===r||"optionalAccess"===r?(e=A,A=i(A)):"call"!==r&&"optionalCall"!==r||(A=i((function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=A).call.apply(t,[e].concat(r))})),e=void 0)}return A}([globalThis,"optionalAccess",function(t){return t.navigator},"optionalAccess",function(t){return t.hardwareConcurrency}]),Nr=function(){return 4},null!=Gr?Gr:Nr()),xr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kr;Object(c.a)(this,t),this.workers=[],this.idleWorkers=[],this.waitQueue=[],this.decoder=null;for(var A=0;A<e;++A){var n=new Ur;this.workers.push(n),this.idleWorkers.push(n)}}return Object(I.a)(t,[{key:"decode",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A){var n,r=this;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForWorker();case 2:return n=t.sent,t.abrupt("return",new Promise((function(t,i){n.onmessage=function(e){r.finishTask(n),t(e.data[0])},n.onerror=function(t){r.finishTask(n),i(t)},n.postMessage(["decode",e,A],[A])})));case 4:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"waitForWorker",value:function(){var t=Object(a.a)(o.a.mark((function t(){var e,A,n;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.idleWorkers.pop())){t.next=3;break}return t.abrupt("return",e);case 3:return A={},n=new Promise((function(t){A.resolve=t})),this.waitQueue.push(A),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"finishTask",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(A=this.waitQueue.pop())?A.resolve(e):this.idleWorkers.push(e);case 2:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"destroy",value:function(){for(var t=0;t<this.workers.length;++t)this.workers[t].terminate()}}]),t}(),Or={attributeNamePrefix:"",attrNodeName:"attr",parseNodeValue:!0,parseAttributeValue:!0,ignoreAttributes:!1};function Mr(t){var e=function(t){return En.a.parse(t,Or)}(t);if(!e.OME)throw Error("Failed to parse OME-XML metadata.");return Zn(e.OME.Image).map((function(t){var e=Zn(t.Pixels.Channel).map((function(t){return"Color"in t.attr?Object(B.a)({},t.attr,{Color:Wn(t.attr.Color)}):Object(B.a)({},t.attr)})),A=t.AquisitionDate,n=void 0===A?"":A,r=t.Description,i=void 0===r?"":r,o=Object(B.a)({},t.attr,{AquisitionDate:n,Description:i,Pixels:Object(B.a)({},t.Pixels.attr,{Channels:e})});return Object(B.a)({},o,{format:function(){var t=o.Pixels,e=["X","Y","Z"].map((function(e){var A=t["PhysicalSize".concat(e)],n=t["PhysicalSize".concat(e,"Unit")];return A&&n?"".concat(A," ").concat(n):"-"})).join(" x ");return{"Acquisition Date":o.AquisitionDate,"Dimensions (XY)":"".concat(t.SizeX," x ").concat(t.SizeY),"Pixels Type":t.Type,"Pixels Size (XYZ)":e,"Z-sections/Timepoints":"".concat(t.SizeZ," x ").concat(t.SizeT),Channels:t.SizeC}}})}))}function Lr(t){for(var e=void 0,A=t[0],n=1;n<t.length;){var r=t[n],i=t[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==A)return;"access"===r||"optionalAccess"===r?(e=A,A=i(A)):"call"!==r&&"optionalCall"!==r||(A=i((function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=A).call.apply(t,[e].concat(r))})),e=void 0)}return A}var _r=function(){function t(e,A,n,r,i,o){Object(c.a)(this,t),this.dtype=A,this.tileSize=n,this.shape=r,this.labels=i,this.meta=o,this._indexer=e}return Object(I.a)(t,[{key:"getRaster",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A,n,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.selection,n=e.signal,t.next=3,this._indexer(A);case 3:return r=t.sent,t.abrupt("return",this._readRasters(r,{signal:n}));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"getTile",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,a,s,g,c,I,u,l;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.x,n=e.y,r=e.selection,i=e.signal,a=this._getTileExtent(A,n),s=a.height,g=a.width,c=A*this.tileSize,I=n*this.tileSize,u=[c,I,c+g,I+s],t.next=7,this._indexer(r);case 7:return l=t.sent,t.abrupt("return",this._readRasters(l,{window:u,width:g,height:s,signal:i}));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_readRasters",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A){var n,r,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Kn(this.shape),t.next=3,e.readRasters(Object(B.a)({interleave:n},A));case 3:if(r=t.sent,!Lr([A,"optionalAccess",function(t){return t.signal},"optionalAccess",function(t){return t.aborted}])){t.next=6;break}throw"__vivSignalAborted";case 6:return i=n?r:r[0],t.abrupt("return",{data:i,width:r.width,height:r.height});case 8:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"_getTileExtent",value:function(t,e){var A=Xn(this),n=A.height,r=A.width,i=this.tileSize,o=this.tileSize,a=Math.floor(r/this.tileSize),s=Math.floor(n/this.tileSize);return t===a&&(o=r%this.tileSize),e===s&&(i=n%this.tileSize),{height:i,width:o}}},{key:"onTileError",value:function(t){console.error(t)}}]),t}();function Jr(t,e){var A=e[0],n=A.Pixels,r=n.SizeT,i=n.SizeC,o=n.SizeZ,a=jr(A);return function(e,A){var n=a(e),s=A*o*r*i;return t.getImage(n+s)}}function Tr(t,e){var A=jr(e[0]),n=new Map;return function(){var e=Object(a.a)(o.a.mark((function e(r,i){var a,s,g,c,I,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=A(r),e.next=3,t.getImage(a);case 3:if(s=e.sent,0!==i){e.next=6;break}return e.abrupt("return",s);case 6:if(g=s.fileDirectory.SubIFDs){e.next=9;break}throw Error("Indexing Error: OME-TIFF is missing SubIFDs.");case 9:return c="".concat(r.t,"-").concat(r.c,"-").concat(r.z,"-").concat(i),n.has(c)||(I=g[i-1],n.set(c,t.parseFileDirectoryAt(I))),e.next=13,n.get(c);case 13:return u=e.sent,e.abrupt("return",new s.constructor(u.fileDirectory,u.geoKeyDirectory,t.dataView,t.littleEndian,t.cache,t.source));case 15:case"end":return e.stop()}}),e)})));return function(t,A){return e.apply(this,arguments)}}()}function jr(t){var e=t.Pixels,A=e.SizeC,n=e.SizeZ,r=e.SizeT,i=e.DimensionOrder;switch(i){case"XYZCT":return function(t){var e=t.t,r=t.c,i=t.z;return e*n*A+r*n+i};case"XYZTC":return function(t){var e=t.t,A=t.c,i=t.z;return A*n*r+e*n+i};case"XYCTZ":return function(t){var e=t.t,n=t.c;return t.z*A*r+e*A+n};case"XYCZT":return function(t){var e=t.t,r=t.c,i=t.z;return e*A*n+i*A+r};case"XYTCZ":return function(t){var e=t.t,n=t.c;return t.z*r*A+n*r+e};case"XYTZC":return function(t){var e=t.t,A=t.c,i=t.z;return A*r*n+i*r+e};default:throw new Error("Invalid OME-XML DimensionOrder, got ".concat(i,"."))}}var Hr={uint8:"Uint8",uint16:"Uint16",uint32:"Uint32",float:"Float32",double:"Float64",int8:"Int8",int16:"Int16",int32:"Int32"};function Yr(t){var e=t.Pixels,A=Pn(e.DimensionOrder),n=qn(A),r=Array(A.length).fill(0);r[n("t")]=e.SizeT,r[n("c")]=e.SizeC,r[n("z")]=e.SizeZ,e.Interleaved&&(A.push("_c"),r.push(3));var i=function(t){var A=Object(f.a)(r);return A[n("x")]=e.SizeX>>t,A[n("y")]=e.SizeY>>t,A};if(!(e.Type in Hr))throw Error("Pixel type ".concat(e.Type," not supported."));var o=Hr[e.Type];if(e.PhysicalSizeX&&e.PhysicalSizeY){var a={x:{size:e.PhysicalSizeX,unit:e.PhysicalSizeXUnit},y:{size:e.PhysicalSizeY,unit:e.PhysicalSizeYUnit}};return e.PhysicalSizeZ&&(a.z={size:e.PhysicalSizeZ,unit:e.PhysicalSizeZUnit}),{labels:A,getShape:i,physicalSizes:a,dtype:o}}return{labels:A,getShape:i,dtype:o}}function Vr(t){var e=t.getTileWidth(),A=t.getTileHeight();return zn(Math.min(e,A))}function Zr(t){return Wr.apply(this,arguments)}function Wr(){return(Wr=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,a,s,g,c,I,u,l,C,h,B,f,d,Q;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getImage(0);case 2:return A=t.sent,n=A.fileDirectory,r=n.ImageDescription,i=n.SubIFDs,a=n.PhotometricInterpretation,s=Mr(r),i?(g=i.length+1,c=Tr(e,s)):(g=s.length,c=Jr(e,s)),I=s[0],u=Yr(I),l=u.labels,C=u.getShape,h=u.physicalSizes,B=u.dtype,f=Vr(A),d={photometricInterpretation:a,physicalSizes:h},Q=Array.from({length:g}).map((function(t,e){var A=C(e);return new _r((function(t){return c(t,e)}),B,f,A,l,d)})),t.abrupt("return",{data:Q,metadata:I});case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Kr(t){return Pr.apply(this,arguments)}function Pr(){return(Pr=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,a,s,g=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=g.length>1&&void 0!==g[1]?g[1]:{},n=A.headers,r=A.offsets,i=A.pool,a=void 0===i||i,"string"!==typeof e){t.next=8;break}return t.next=5,ln(e,n);case 5:s=t.sent,t.next=11;break;case 8:return t.next=10,hn(e);case 10:s=t.sent;case 11:return a&&(s=Dr(s,new xr)),r&&(s=Sr(s,r)),Fr(s),t.abrupt("return",Zr(s));case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function qr(t){return Xr.apply(this,arguments)}function Xr(){return(Xr=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,a,s,g=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=g.length>1&&void 0!==g[1]?g[1]:"",t.next=3,Object(pn.d)(e,A);case 3:return n=t.sent,t.next=6,n.attrs.asObject();case 6:return r=t.sent,i=["0"],"multiscales"in r&&(a=r.multiscales[0].datasets,i=a.map((function(t){return t.path}))),s=i.map((function(t){return n.getItem(t)})),t.next=12,Promise.all(s);case 12:return t.t0=t.sent,t.t1=r,t.abrupt("return",{data:t.t0,rootAttrs:t.t1});case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function zr(t){var e=Kn(t.shape),A=t.chunks.slice(e?-3:-2),n=Object(g.a)(A,2),r=n[0],i=n[1];return zn(Math.min(r,i))}var $r={u1:"Uint8",u2:"Uint16",u4:"Uint32",f4:"Float32",f8:"Float64",i1:"Int8",i2:"Int16",i4:"Int32"},ti=function(){function t(e,A,n){Object(c.a)(this,t),this.labels=A,this.tileSize=n,this._indexer=function(t){var e=t.length,A=qn(t);return function(t){if(Array.isArray(t))return Object(f.a)(t);for(var n=Array(e).fill(0),r=0,i=Object.entries(t);r<i.length;r++){var o=Object(g.a)(i[r],2),a=o[0],s=o[1];n[A(a)]=s}return n}}(A),this._data=e;var r=e.chunks[this._xIndex],i=e.chunks[this._xIndex-1];this._readChunks=n===r&&n===i}return Object(I.a)(t,[{key:"_chunkIndex",value:function(t,e,A){var n=this._indexer(t);return n[this._xIndex]=e,n[this._xIndex-1]=A,n}},{key:"_getSlices",value:function(t,e){var A=Xn(this),n=A.height,r=A.width,i=[t*this.tileSize,Math.min((t+1)*this.tileSize,r)],o=i[0],a=i[1],s=[e*this.tileSize,Math.min((e+1)*this.tileSize,n)],g=s[0],c=s[1];if(o===a||g===c)throw new pn.a("Tile slice is zero-sized.");return[Object(pn.e)(o,a),Object(pn.e)(g,c)]}},{key:"getRaster",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,a,s,c,I;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.selection,n=this._chunkIndex(A,null,null),t.next=4,this._data.getRaw(n);case 4:return r=t.sent,i=r.data,a=r.shape,s=Object(g.a)(a,2),c=s[0],I=s[1],t.abrupt("return",{data:i,width:I,height:c});case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"getTile",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,a,s,c,I,u,l,C,h,B,f,d,Q;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=e.x,n=e.y,r=e.selection,i=e.signal,!this._readChunks){t.next=8;break}return s=this._chunkIndex(r,A,n),t.next=5,this._data.getRawChunk(s,{storeOptions:{signal:i}});case 5:a=t.sent,t.next=13;break;case 8:return c=this._getSlices(A,n),I=Object(g.a)(c,2),u=I[0],l=I[1],C=this._chunkIndex(r,u,l),t.next=12,this._data.getRaw(C);case 12:a=t.sent;case 13:return B=(h=a).data,f=Object(g.a)(h.shape,2),d=f[0],Q=f[1],t.abrupt("return",{data:B,width:Q,height:d});case 15:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"onTileError",value:function(t){if(!(t instanceof pn.a))throw t}},{key:"shape",get:function(){return this._data.shape}},{key:"dtype",get:function(){var t=this._data.dtype.slice(1);if(!(t in $r))throw Error("Zarr dtype not supported, got ".concat(t,"."));return $r[t]}},{key:"_xIndex",get:function(){var t=Kn(this._data.shape);return this._data.shape.length-(t?2:1)}}]),t}();function ei(t){return Ai.apply(this,arguments)}function Ai(){return(Ai=Object(a.a)(o.a.mark((function t(e){var A,n,r,i,a,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qr(e);case 2:return A=t.sent,n=A.data,r=A.rootAttrs,i=["t","c","z","y","x"],a=zr(n[0]),s=n.map((function(t){return new ti(t,i,a)})),t.abrupt("return",{data:s,metadata:r});case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ni(t){for(var e=void 0,A=t[0],n=1;n<t.length;){var r=t[n],i=t[n+1];if(n+=2,("optionalAccess"===r||"optionalCall"===r)&&null==A)return;"access"===r||"optionalAccess"===r?(e=A,A=i(A)):"call"!==r&&"optionalCall"!==r||(A=i((function(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=A).call.apply(t,[e].concat(r))})),e=void 0)}return A}function ri(t){return ii.apply(this,arguments)}function ii(){return(ii=Object(a.a)(o.a.mark((function t(e){var A,n,r=arguments;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=r.length>1&&void 0!==r[1]?r[1]:{},n=new pn.b(e,A),"multiscales"===ni([A,"optionalAccess",function(t){return t.type}])){t.next=4;break}throw Error("Only multiscale OME-Zarr is supported.");case 4:return t.abrupt("return",ei(n));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i})),A.d(e,"c",(function(){return o})),A.d(e,"b",(function(){return a}));var n=[],r=[];function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=n,o={index:-1,data:t,target:[]};return t?"function"===typeof t[Symbol.iterator]?i=t:t.length>0&&(r.length=t.length,i=r):i=n,(e>0||Number.isFinite(A))&&(i=(Array.isArray(i)?i:Array.from(i)).slice(e,A),o.index=e-1),{iterable:i,objectInfo:o}}function o(t){return t&&t[Symbol.asyncIterator]}function a(t,e){var A=e.size,n=e.stride,r=e.offset,i=e.startIndices,o=e.nested,a=t.BYTES_PER_ELEMENT,s=n?n/a:A,g=r?r/a:0,c=Math.floor((t.length-g)/s);return function(e,n){var r=n.index,a=n.target;if(!i){for(var I=r*s+g,u=0;u<A;u++)a[u]=t[I+u];return a}var l,C=i[r],h=i[r+1]||c;if(o){l=new Array(h-C);for(var B=C;B<h;B++){var f=B*s+g;a=new Array(A);for(var d=0;d<A;d++)a[d]=t[f+d];l[B-C]=a}}else if(s===A)l=t.subarray(C*A+g,h*A+g);else{l=new t.constructor((h-C)*A);for(var Q=0,E=C;E<h;E++)for(var p=E*s+g,y=0;y<A;y++)l[Q++]=t[p+y]}return l}}},function(t,e,A){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}A(526),A(267);A(522);Math.PI,Math.PI;var i={};function o(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function a(t,e,A){var n=i.EPSILON;A&&(i.EPSILON=A);try{if(t===e)return!0;if(o(t)&&o(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!a(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=i.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{i.EPSILON=n}}i.EPSILON=1e-12,i.debug=!1,i.precision=4,i.printTypes=!1,i.printDegrees=!1,i.printRowMajor=!0;var s={CLOCKWISE:1,COUNTER_CLOCKWISE:-1};function g(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=c(t,A);return n!==e&&(l(t,A),!0)}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Math.sign(I(t,e))}function I(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=0;return u(t,(function(t,e,n,r){A+=f(t,e,n,r)}),e),A/2}function u(t,e){for(var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=A.start,r=void 0===n?0:n,i=A.end,o=void 0===i?t.length:i,s=A.size,g=void 0===s?2:s,c=A.isClosed,I=(o-r)/g,u=0;u<I-1;++u)e(t[r+u*g],t[r+u*g+1],t[r+(u+1)*g],t[r+(u+1)*g+1],u,u+1);var l=r+(I-1)*g,C=c||a(t[r],t[l])&&a(t[r+1],t[l+1]);C||e(t[l],t[l+1],t[r],t[r+1],I-1,0)}function l(t,e){for(var A=e.start,n=void 0===A?0:A,r=e.end,i=void 0===r?t.length:r,o=e.size,a=void 0===o?2:o,s=(i-n)/a,g=Math.floor(s/2),c=0;c<g;++c)for(var I=n+c*a,u=n+(s-1-c)*a,l=0;l<a;++l){var C=t[I+l];t[I+l]=t[u+l],t[u+l]=C}}function C(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Math.sign(h(t,e))}function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=0;return B(t,(function(t,e){A+=f(t[0],t[1],e[0],e[1])}),e),A/2}function B(t,e){for(var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=A.start,r=void 0===n?0:n,i=A.end,o=void 0===i?t.length:i,s=A.isClosed,g=r;g<o-1;++g)e(t[g],t[g+1],g,g+1);var c=s||a(t[o-1],t[0]);c||e(t[o-1],t[0],o-1,0)}function f(t,e,A,n){return(t+A)*(e-n)}!function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,t),this.points=e,this.isFlatArray=!o(e[0]),this.options={start:A.start||0,end:A.end||e.length,size:A.size||2,isClosed:A.isClosed},Object.freeze(this)}var e,A,i;e=t,(A=[{key:"getSignedArea",value:function(){return this.isFlatArray?I(this.points,this.options):h(this.points,this.options)}},{key:"getArea",value:function(){return Math.abs(this.getSignedArea())}},{key:"getWindingDirection",value:function(){return Math.sign(this.getSignedArea())}},{key:"forEachSegment",value:function(t){this.isFlatArray?u(this.points,(function(e,A,n,r,i,o){t([e,A],[n,r],i,o)}),this.options):B(this.points,t,this.options)}},{key:"modifyWindingDirection",value:function(t){return this.isFlatArray?g(this.points,t,this.options):function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=C(t,A);return n!==e&&(t.reverse(),!0)}(this.points,t,this.options)}}])&&r(e.prototype,A),i&&r(e,i)}();function d(t,e){var A=e.length,n=t.length;if(n>0){for(var r=!0,i=0;i<A;i++)if(t[n-A+i]!==e[i]){r=!1;break}if(r)return!1}for(var o=0;o<A;o++)t[n+o]=e[o];return!0}function Q(t,e){for(var A=e.length,n=0;n<A;n++)t[n]=e[n]}function E(t,e,A,n){for(var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],i=n+e*A,o=0;o<A;o++)r[o]=t[i+o];return r}function p(t,e,A,n){var r,i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(8&A)r=(n[3]-t[1])/(e[1]-t[1]),i=3;else if(4&A)r=(n[1]-t[1])/(e[1]-t[1]),i=1;else if(2&A)r=(n[2]-t[0])/(e[0]-t[0]),i=2;else{if(!(1&A))return null;r=(n[0]-t[0])/(e[0]-t[0]),i=0}for(var a=0;a<t.length;a++)o[a]=(1&i)===a?n[i]:r*(e[a]-t[a])+t[a];return o}function y(t,e){var A=0;return t[0]<e[0]?A|=1:t[0]>e[2]&&(A|=2),t[1]<e[1]?A|=4:t[1]>e[3]&&(A|=8),A}function v(t){var e,A,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size,i=void 0===r?2:r,o=n.broken,a=void 0!==o&&o,s=n.gridResolution,g=void 0===s?10:s,c=n.gridOffset,I=void 0===c?[0,0]:c,u=n.startIndex,l=void 0===u?0:u,C=n.endIndex,h=void 0===C?t.length:C,B=(h-l)/i,f=[],v=[f],m=E(t,0,i,l),b=w(m,g,I,[]),F=[];d(f,m);for(var D=1;D<B;D++){for(A=y(e=E(t,D,i,l,e),b);A;){p(m,e,A,b,F);var R=y(F,b);R&&(p(m,F,R,b,F),A=R),d(f,F),Q(m,F),S(b,g,A),a&&f.length>i&&(f=[],v.push(f),d(f,m)),A=y(e,b)}d(f,e),Q(m,e)}return a?v:v[0]}function m(t,e){for(var A=0;A<e.length;A++)t.push(e[A]);return t}function b(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.length)return[];for(var n=A.size,r=void 0===n?2:n,i=A.gridResolution,o=void 0===i?10:i,a=A.gridOffset,s=void 0===a?[0,0]:a,g=A.edgeTypes,c=void 0!==g&&g,I=[],u=[{pos:t,types:c&&new Array(t.length/r).fill(1),holes:e||[]}],l=[[],[]],C=[];u.length;){var h=u.shift(),B=h.pos,f=h.types,d=h.holes;D(B,r,d[0]||B.length,l),C=w(l[0],o,s,C);var Q=y(l[1],C);if(Q){var E=F(B,f,r,0,d[0]||B.length,C,Q),p={pos:E[0].pos,types:E[0].types,holes:[]},v={pos:E[1].pos,types:E[1].types,holes:[]};u.push(p,v);for(var b=0;b<d.length;b++)(E=F(B,f,r,d[b],d[b+1]||B.length,C,Q))[0]&&(p.holes.push(p.pos.length),p.pos=m(p.pos,E[0].pos),c&&(p.types=m(p.types,E[0].types))),E[1]&&(v.holes.push(v.pos.length),v.pos=m(v.pos,E[1].pos),c&&(v.types=m(v.types,E[1].types)))}else{var S={positions:B};c&&(S.edgeTypes=f),d.length&&(S.holeIndices=d),I.push(S)}}return I}function F(t,e,A,n,r,i,o){for(var a,s,g,c=(r-n)/A,I=[],u=[],l=[],C=[],h=[],B=E(t,c-1,A,n),f=Math.sign(8&o?B[1]-i[3]:B[0]-i[2]),y=e&&e[c-1],v=0,m=0,b=0;b<c;b++)a=E(t,b,A,n,a),s=Math.sign(8&o?a[1]-i[3]:a[0]-i[2]),g=e&&e[n/A+b],s&&f&&f!==s&&(p(B,a,o,i,h),d(I,h)&&l.push(y),d(u,h)&&C.push(y)),s<=0?(d(I,a)&&l.push(g),v-=s):l.length&&(l[l.length-1]=0),s>=0?(d(u,a)&&C.push(g),m+=s):C.length&&(C[C.length-1]=0),Q(B,a),f=s,y=g;return[v?{pos:I,types:e&&l}:null,m?{pos:u,types:e&&C}:null]}function w(t,e,A,n){var r=Math.floor((t[0]-A[0])/e)*e+A[0],i=Math.floor((t[1]-A[1])/e)*e+A[1];return n[0]=r,n[1]=i,n[2]=r+e,n[3]=i+e,n}function S(t,e,A){8&A?(t[1]+=e,t[3]+=e):4&A?(t[1]-=e,t[3]-=e):2&A?(t[0]+=e,t[2]+=e):1&A&&(t[0]-=e,t[2]-=e)}function D(t,e,A,n){for(var r=1/0,i=-1/0,o=1/0,a=-1/0,s=0;s<A;s+=e){var g=t[s],c=t[s+1];r=g<r?g:r,i=g>i?g:i,o=c<o?c:o,a=c>a?c:a}return n[0][0]=r,n[0][1]=o,n[1][0]=i,n[1][1]=a,n}function R(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return U(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return U(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function G(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.size,n=void 0===A?2:A,r=e.startIndex,i=void 0===r?0:r,o=e.endIndex,a=void 0===o?t.length:o,s=e.normalize,g=void 0===s||s,c=t.slice(i,a);O(c,n,0,a-i);var I=v(c,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(g){var u,l=R(I);try{for(l.s();!(u=l.n()).done;){var C=u.value;M(C,n)}}catch(h){l.e(h)}finally{l.f()}}return I}function N(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=A.size,r=void 0===n?2:n,i=A.normalize,o=void 0===i||i,a=A.edgeTypes,s=void 0!==a&&a;e=e||[];for(var g=[],c=[],I=0,u=0,l=0;l<=e.length;l++){for(var C=e[l]||t.length,h=u,B=k(t,r,I,C),f=B;f<C;f++)g[u++]=t[f];for(var d=I;d<B;d++)g[u++]=t[d];O(g,r,h,u),x(g,r,h,u,A.maxLatitude),I=C,c[l]=u}c.pop();var Q=b(g,c,{size:r,gridResolution:360,gridOffset:[-180,-180],edgeTypes:s});if(o){var E,p=R(Q);try{for(p.s();!(E=p.n()).done;){var y=E.value;M(y.positions,r)}}catch(v){p.e(v)}finally{p.f()}}return Q}function k(t,e,A,n){for(var r=-1,i=-1,o=A+1;o<n;o+=e){var a=Math.abs(t[o]);a>r&&(r=a,i=o-1)}return i}function x(t,e,A,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:85.051129,i=t[A],o=t[n-e];if(Math.abs(i-o)>180){var a=E(t,0,e,A);a[0]+=360*Math.round((o-i)/360),d(t,a),a[1]=Math.sign(a[1])*r,d(t,a),a[0]=i,d(t,a)}}function O(t,e,A,n){for(var r,i=t[0],o=A;o<n;o+=e){var a=(r=t[o])-i;(a>180||a<-180)&&(r-=360*Math.round(a/360)),t[o]=i=r}}function M(t,e){for(var A,n=t.length/e,r=0;r<n&&((A=t[r*e])+180)%360===0;r++);var i=360*-Math.round(A/360);if(0!==i)for(var o=0;o<n;o++)t[o*e]+=i}A.d(e,"f",(function(){return g})),A.d(e,"a",(function(){return s})),A.d(e,"b",(function(){return b})),A.d(e,"d",(function(){return v})),A.d(e,"e",(function(){return G})),A.d(e,"c",(function(){return N}))},function(t,e,A){"use strict";(function(t){var n=A(48),r=A(500);A.d(e,"a",(function(){return r.a}));var i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t};(i.global||i.self||i.window).mathgl={config:n.a}}).call(this,A(58))},function(t,e,A){"use strict";(function(t,n){A.d(e,"b",(function(){return o})),A.d(e,"a",(function(){return a}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document,process:"object"===("undefined"===typeof n?"undefined":Object(r.a)(n))&&n},o=i.window||i.self||i.global,a=i.process||{};console}).call(this,A(58),A(62))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(225);function r(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Object(n.a)(t,e)}},function(t,e,A){"use strict";var n=A(519),r=A.n(n);function i(t,e){return!e||"object"!==r()(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return I}));var n=A(205),r=A(5),i=A(4),o=A(167),a=A(49),s=A(394),g={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},c={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}},I=function(){function t(){var e=this;Object(r.a)(this,t);for(var A=arguments.length,n=new Array(A),i=0;i<A;i++)n[i]=arguments[i];n.forEach((function(t){return e._assign(t)})),Object.freeze(this)}return Object(i.a)(t,null,[{key:"getBytesPerElement",value:function(t){return Object(o.c)(t.type||5126).BYTES_PER_ELEMENT}},{key:"getBytesPerVertex",value:function(t){return Object(a.a)(t.size),Object(o.c)(t.type||5126).BYTES_PER_ELEMENT*t.size}},{key:"resolve",value:function(){for(var e=arguments.length,A=new Array(e),r=0;r<e;r++)A[r]=arguments[r];return Object(n.a)(t,[g].concat(A))}}]),Object(i.a)(t,[{key:"toString",value:function(){return JSON.stringify(this)}},{key:"_assign",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0!==(t=Object(s.a)("Accessor",t,c)).type&&(this.type=t.type,5124!==t.type&&5125!==t.type||(this.integer=!0)),void 0!==t.size&&(this.size=t.size),void 0!==t.offset&&(this.offset=t.offset),void 0!==t.stride&&(this.stride=t.stride),void 0!==t.normalized&&(this.normalized=t.normalized),void 0!==t.integer&&(this.integer=t.integer),void 0!==t.divisor&&(this.divisor=t.divisor),void 0!==t.buffer&&(this.buffer=t.buffer),void 0!==t.index&&("boolean"===typeof t.index?this.index=t.index?1:0:this.index=t.index),void 0!==t.instanced&&(this.divisor=t.instanced?1:0),void 0!==t.isInstanced&&(this.divisor=t.isInstanced?1:0),this}},{key:"BYTES_PER_ELEMENT",get:function(){return t.getBytesPerElement(this)}},{key:"BYTES_PER_VERTEX",get:function(){return t.getBytesPerVertex(this)}}]),t}()},function(t,e,A){"use strict";A.d(e,"b",(function(){return s})),A.d(e,"c",(function(){return g})),A.d(e,"d",(function(){return c})),A.d(e,"e",(function(){return I})),A.d(e,"f",(function(){return u})),A.d(e,"h",(function(){return l})),A.d(e,"a",(function(){return C})),A.d(e,"g",(function(){return h}));var n=A(21),r=A(451),i=A.n(r),o=A(89),a=A.n(o);function s(t,e,A){t.key===e&&(t.preventDefault(),A())}function g(t){return i()({r:t[0],g:t[1],b:t[2]}).toHexString()}function c(t){var e=i()(t).toRgb();return[e.r,e.g,e.b]}function I(t){if(0===t)return"Color by hierarchy";if(t<=2){return"Color by ".concat("sub".repeat(t-1),"cluster")}return"Color by cluster level ".concat(t)}function u(t,e){return t.length<=e.length&&a()(t,e.slice(0,t.length))}function l(t,e,A){return u(t,e)?[].concat(Object(n.a)(A),Object(n.a)(e.slice(A.length))):e}var C="___";function h(t){return t.join(C)}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,A){"use strict";var n=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,A){return e&&i(t.prototype,e),A&&i(t,A),t}var a=A(491),s=new a.a,g=new a.a,c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r(this,t),n=n||s.copy(e).add(A).scale(.5),this.center=new a.a(n),this.halfDiagonal=new a.a(A).subtract(this.center),this.minimum=new a.a(e),this.maximum=new a.a(A)}return o(t,[{key:"clone",value:function(){return new t(this.minimum,this.maximum,this.center)}},{key:"equals",value:function(t){return this===t||Boolean(t)&&this.minimum.equals(t.minimum)&&this.maximum.equals(t.maximum)}},{key:"intersectPlane",value:function(t){var e=this.halfDiagonal,A=g.from(t.normal),r=e.x*Math.abs(A.x)+e.y*Math.abs(A.y)+e.z*Math.abs(A.z),i=this.center.dot(A)+t.distance;return i-r>0?n.INSIDE:i+r<0?n.OUTSIDE:n.INTERSECTING}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceSquaredTo(t))}},{key:"distanceSquaredTo",value:function(t){var e,A=s.from(t).subtract(this.center),n=this.halfDiagonal,r=0;return(e=Math.abs(A.x)-n.x)>0&&(r+=e*e),(e=Math.abs(A.y)-n.y)>0&&(r+=e*e),(e=Math.abs(A.z)-n.z)>0&&(r+=e*e),r}}]),t}(),I=A(18),u=new a.a,l=new a.a,C=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,t),this.radius=-0,this.center=new a.a,this.fromCenterRadius(e,A)}return o(t,[{key:"fromCenterRadius",value:function(t,e){return this.center.from(t),this.radius=e,this}},{key:"fromCornerPoints",value:function(t,e){return e=u.from(e),this.center=(new a.a).from(t).add(e).scale(.5),this.radius=this.center.distance(e),this}},{key:"equals",value:function(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.radius===t.radius}},{key:"clone",value:function(){return new t(this.center,this.radius)}},{key:"union",value:function(t){var e=this.center,A=this.radius,n=t.center,r=t.radius,i=u.copy(n).subtract(e),o=i.magnitude();if(A>=o+r)return this.clone();if(r>=o+A)return t.clone();var a=.5*(A+o+r);return l.copy(i).scale((-A+a)/o).add(e),this.center.copy(l),this.radius=a,this}},{key:"expand",value:function(t){var e=(t=u.from(t)).subtract(this.center).magnitude();return e>this.radius&&(this.radius=e),this}},{key:"intersectPlane",value:function(t){var e=this.center,A=this.radius,r=t.normal.dot(e)+t.distance;return r<-A?n.OUTSIDE:r<A?n.INTERSECTING:n.INSIDE}},{key:"transform",value:function(t){this.center.transform(t);var e=I.e(u,t);return this.radius=Math.max(e[0],Math.max(e[1],e[2]))*this.radius,this}},{key:"distanceSquaredTo",value:function(t){return(t=u.from(t)).subtract(this.center).lengthSquared()-this.radius*this.radius}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceSquaredTo(t))}}]),t}();function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function B(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"===typeof t)return h(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?h(t,e):void 0}}(t)||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.")}()}var f=A(492),d=A(493),Q=new a.a,E=new a.a,p=new a.a,y=new a.a,v=new a.a,m=new a.a,b=new a.a,F=new a.a,w=new a.a,S=new a.a,D=0,R=1,U=2,G=3,N=4,k=5,x=6,O=7,M=8,L=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,0],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0,0,0,0,0,0];r(this,t),this.center=(new a.a).from(e),this.halfAxes=new f.a(A)}return o(t,[{key:"fromCenterHalfSizeQuaternion",value:function(t,e,A){var n=new d.a(A),r=(new f.a).fromQuaternion(n);return r[0]=r[0]*e[0],r[1]=r[1]*e[0],r[2]=r[2]*e[0],r[3]=r[3]*e[1],r[4]=r[4]*e[1],r[5]=r[5]*e[1],r[6]=r[6]*e[2],r[7]=r[7]*e[2],r[8]=r[8]*e[2],this.center=(new a.a).from(t),this.halfAxes=r,this}},{key:"clone",value:function(){return new t(this.center,this.halfAxes)}},{key:"equals",value:function(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.halfAxes.equals(t.halfAxes)}},{key:"getBoundingSphere",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new C,e=this.halfAxes,A=e.getColumn(0,F),n=e.getColumn(1,w),r=e.getColumn(2,S),i=Q.copy(A).add(n).add(r);return t.center.copy(this.center),t.radius=i.magnitude(),t}},{key:"intersectPlane",value:function(t){var e=this.center,A=t.normal,r=this.halfAxes,i=A.x,o=A.y,a=A.z,s=Math.abs(i*r[D]+o*r[R]+a*r[U])+Math.abs(i*r[G]+o*r[N]+a*r[k])+Math.abs(i*r[x]+o*r[O]+a*r[M]),g=A.dot(e)+t.distance;return g<=-s?n.OUTSIDE:g>=s?n.INSIDE:n.INTERSECTING}},{key:"distanceTo",value:function(t){return Math.sqrt(this.distanceSquaredTo(t))}},{key:"distanceSquaredTo",value:function(t){var e=E.from(t).subtract(this.center),A=this.halfAxes,n=A.getColumn(0,p),r=A.getColumn(1,y),i=A.getColumn(2,v),o=n.magnitude(),a=r.magnitude(),s=i.magnitude();n.normalize(),r.normalize(),i.normalize();var g,c=0;return(g=Math.abs(e.dot(n))-o)>0&&(c+=g*g),(g=Math.abs(e.dot(r))-a)>0&&(c+=g*g),(g=Math.abs(e.dot(i))-s)>0&&(c+=g*g),c}},{key:"computePlaneDistances",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[-0,-0],n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=this.center,o=this.halfAxes,a=o.getColumn(0,p),s=o.getColumn(1,y),g=o.getColumn(2,v),c=m.copy(a).add(s).add(g).add(i),I=b.copy(c).subtract(t),u=e.dot(I);return n=Math.min(u,n),r=Math.max(u,r),c.copy(i).add(a).add(s).subtract(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),c.copy(i).add(a).subtract(s).add(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),c.copy(i).add(a).subtract(s).subtract(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),i.copy(c).subtract(a).add(s).add(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),i.copy(c).subtract(a).add(s).subtract(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),i.copy(c).subtract(a).subtract(s).add(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),i.copy(c).subtract(a).subtract(s).subtract(g),I.copy(c).subtract(t),u=e.dot(I),n=Math.min(u,n),r=Math.max(u,r),A[0]=n,A[1]=r,A}},{key:"getTransform",value:function(){}},{key:"halfSize",get:function(){var t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),A=this.halfAxes.getColumn(2);return[new a.a(t).len(),new a.a(e).len(),new a.a(A).len()]}},{key:"quaternion",get:function(){var t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),A=this.halfAxes.getColumn(2),n=new a.a(t).normalize(),r=new a.a(e).normalize(),i=new a.a(A).normalize();return(new d.a).fromMatrix3(new f.a([].concat(B(n),B(r),B(i))))}}]),t}(),_=A(114),J=A(46),T=new a.a,j=new a.a,H=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0,1],A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,t),this.normal=new a.a,this.distance=-0,this.fromNormalDistance(e,A)}return o(t,[{key:"fromNormalDistance",value:function(t,e){return Object(_.a)(Number.isFinite(e)),this.normal.from(t).normalize(),this.distance=e,this}},{key:"fromPointNormal",value:function(t,e){t=T.from(t),this.normal.from(e).normalize();var A=-this.normal.dot(t);return this.distance=A,this}},{key:"fromCoefficients",value:function(t,e,A,n){return this.normal.set(t,e,A),Object(_.a)(Object(J.d)(this.normal.len(),1)),this.distance=n,this}},{key:"clone",value:function(e){return new t(this.normal,this.distance)}},{key:"equals",value:function(t){return Object(J.d)(this.distance,t.distance)&&Object(J.d)(this.normal,t.normal)}},{key:"getPointDistance",value:function(t){return this.normal.dot(t)+this.distance}},{key:"transform",value:function(t){var e=j.copy(this.normal).transformAsVector(t).normalize(),A=this.normal.scale(-this.distance).transform(t);return this.fromPointNormal(A,e)}},{key:"projectPointOntoPlane",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];t=T.from(t);var A=this.getPointDistance(t),n=j.copy(this.normal).scale(A);return t.subtract(n).to(e)}}]),t}();function Y(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return V(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return V(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var Z=[new a.a([1,0,0]),new a.a([0,1,0]),new a.a([0,0,1])],W=new a.a,K=new a.a,P=(new H(new a.a(1,0,0),0),function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];r(this,t),this.planes=e,Object(_.a)(this.planes.every((function(t){return t instanceof H})))}return o(t,null,[{key:"MASK_OUTSIDE",get:function(){return 4294967295}},{key:"MASK_INSIDE",get:function(){return 0}},{key:"MASK_INDETERMINATE",get:function(){return 2147483647}}]),o(t,[{key:"fromBoundingSphere",value:function(t){this.planes.length=2*Z.length;var e,A=t.center,n=t.radius,r=0,i=Y(Z);try{for(i.s();!(e=i.n()).done;){var o=e.value,a=this.planes[r],s=this.planes[r+1];a||(a=this.planes[r]=new H),s||(s=this.planes[r+1]=new H);var g=W.copy(o).scale(-n).add(A);o.dot(g);a.fromPointNormal(g,o);var c=W.copy(o).scale(n).add(A),I=K.copy(o).negate();I.dot(c);s.fromPointNormal(c,I),r+=2}}catch(u){i.e(u)}finally{i.f()}return this}},{key:"computeVisibility",value:function(t){Object(_.a)(t);var e,A=n.INSIDE,r=Y(this.planes);try{for(r.s();!(e=r.n()).done;){var i=e.value;switch(t.intersectPlane(i)){case n.OUTSIDE:return n.OUTSIDE;case n.INTERSECTING:A=n.INTERSECTING}}}catch(o){r.e(o)}finally{r.f()}return A}},{key:"computeVisibilityWithPlaneMask",value:function(e,A){if(Object(_.a)(e,"boundingVolume is required."),Object(_.a)(Number.isFinite(A),"parentPlaneMask is required."),A===t.MASK_OUTSIDE||A===t.MASK_INSIDE)return A;for(var r=t.MASK_INSIDE,i=this.planes,o=0;o<this.planes.length;++o){var a=o<31?1<<o:0;if(!(o<31&&0===(A&a))){var s=i[o],g=e.intersectPlane(s);if(g===n.OUTSIDE)return t.MASK_OUTSIDE;g===n.INTERSECTING&&(r|=a)}}return r}}]),t}());function q(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var X=A(501);function z(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function $(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?z(Object(A),!0).forEach((function(e){q(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):z(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var tt=new a.a,et=new a.a,At=new a.a,nt=new a.a,rt=new a.a,it=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),e=$({near:1,far:5e8},e),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=e.near,this._near=this.near,this.far=e.far,this._far=this.far,this._cullingVolume=new P([new H,new H,new H,new H,new H,new H]),this._perspectiveMatrix=new X.a,this._infinitePerspective=new X.a}return o(t,[{key:"clone",value:function(){return new t({right:this.right,left:this.left,top:this.top,bottom:this.bottom,near:this.near,far:this.far})}},{key:"equals",value:function(e){return e&&e instanceof t&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far}},{key:"computeCullingVolume",value:function(t,e,A){Object(_.a)(t,"position is required."),Object(_.a)(e,"direction is required."),Object(_.a)(A,"up is required.");var n=this._cullingVolume.planes;A=tt.copy(A).normalize();var r=et.copy(e).cross(A).normalize(),i=At.copy(e).multiplyByScalar(this.near).add(t),o=nt.copy(e).multiplyByScalar(this.far).add(t),s=rt;return s.copy(r).multiplyByScalar(this.left).add(i).subtract(t).cross(A),n[0].fromPointNormal(t,s),s.copy(r).multiplyByScalar(this.right).add(i).subtract(t).cross(A).negate(),n[1].fromPointNormal(t,s),s.copy(A).multiplyByScalar(this.bottom).add(i).subtract(t).cross(r).negate(),n[2].fromPointNormal(t,s),s.copy(A).multiplyByScalar(this.top).add(i).subtract(t).cross(r),n[3].fromPointNormal(t,s),s=(new a.a).copy(e),n[4].fromPointNormal(i,s),s.negate(),n[5].fromPointNormal(o,s),this._cullingVolume}},{key:"getPixelDimensions",value:function(t,e,A,n){ot(this),Object(_.a)(Number.isFinite(t)&&Number.isFinite(e)),Object(_.a)(t>0),Object(_.a)(e>0),Object(_.a)(A>0),Object(_.a)(n);var r=1/this.near,i=this.top*r,o=2*A*i/e,a=2*A*(i=this.right*r)/t;return n.x=a,n.y=o,n}},{key:"projectionMatrix",get:function(){return ot(this),this._perspectiveMatrix}},{key:"infiniteProjectionMatrix",get:function(){return ot(this),this._infinitePerspective}}]),t}();function ot(t){Object(_.a)(Number.isFinite(t.right)&&Number.isFinite(t.left)&&Number.isFinite(t.top)&&Number.isFinite(t.bottom)&&Number.isFinite(t.near)&&Number.isFinite(t.far));var e=t.top,A=t.bottom,n=t.right,r=t.left,i=t.near,o=t.far;e===t._top&&A===t._bottom&&r===t._left&&n===t._right&&i===t._near&&o===t._far||(Object(_.a)(t.near>0&&t.near<t.far,"near must be greater than zero and less than far."),t._left=r,t._right=n,t._top=e,t._bottom=A,t._near=i,t._far=o,t._perspectiveMatrix=(new X.a).frustum({left:r,right:n,bottom:A,top:e,near:i,far:o}),t._infinitePerspective=(new X.a).frustum({left:r,right:n,bottom:A,top:e,near:i,far:1/0}))}function at(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function st(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?at(Object(A),!0).forEach((function(e){q(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):at(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}!function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r(this,t),e=st({near:1,far:5e8,xOffset:0,yOffset:0},e),this._offCenterFrustum=new it,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=e.near,this._near=this.near,this.far=e.far,this._far=this.far,this.xOffset=e.xOffset,this._xOffset=this.xOffset,this.yOffset=e.yOffset,this._yOffset=this.yOffset}o(t,[{key:"clone",value:function(){return new t({aspectRatio:this.aspectRatio,fov:this.fov,near:this.near,far:this.far})}},{key:"equals",value:function(e){return null!==(A=e)&&"undefined"!==typeof A&&e instanceof t&&(gt(this),gt(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this.near===e.near&&this.far===e.far&&this._offCenterFrustum.equals(e._offCenterFrustum));var A}},{key:"computeCullingVolume",value:function(t,e,A){return gt(this),this._offCenterFrustum.computeCullingVolume(t,e,A)}},{key:"getPixelDimensions",value:function(t,e,A,n){return gt(this),this._offCenterFrustum.getPixelDimensions(t,e,A,n)}},{key:"projectionMatrix",get:function(){return gt(this),this._offCenterFrustum.projectionMatrix}},{key:"infiniteProjectionMatrix",get:function(){return gt(this),this._offCenterFrustum.infiniteProjectionMatrix}},{key:"fovy",get:function(){return gt(this),this._fovy}},{key:"sseDenominator",get:function(){return gt(this),this._sseDenominator}}])}();function gt(t){Object(_.a)(Number.isFinite(t.fov)&&Number.isFinite(t.aspectRatio)&&Number.isFinite(t.near)&&Number.isFinite(t.far));var e=t._offCenterFrustum;t.fov===t._fov&&t.aspectRatio===t._aspectRatio&&t.near===t._near&&t.far===t._far&&t.xOffset===t._xOffset&&t.yOffset===t._yOffset||(Object(_.a)(t.fov>=0&&t.fov<Math.PI),Object(_.a)(t.aspectRatio>0),Object(_.a)(t.near>=0&&t.near<t.far),t._aspectRatio=t.aspectRatio,t._fov=t.fov,t._fovy=t.aspectRatio<=1?t.fov:2*Math.atan(Math.tan(.5*t.fov)/t.aspectRatio),t._near=t.near,t._far=t.far,t._sseDenominator=2*Math.tan(.5*t._fovy),t._xOffset=t.xOffset,t._yOffset=t.yOffset,e.top=t.near*Math.tan(.5*t._fovy),e.bottom=-e.top,e.right=t.aspectRatio*e.top,e.left=-e.right,e.near=t.near,e.far=t.far,e.right+=t.xOffset,e.left+=t.xOffset,e.top+=t.yOffset,e.bottom+=t.yOffset)}new a.a,new a.a,new a.a,new a.a,new a.a,new a.a,new a.a,new a.a,new a.a,new a.a,new a.a,new a.a,Math.PI;A(494),new f.a,new f.a,new f.a,new f.a,new f.a;new a.a,new a.a,new a.a,new a.a,new a.a,new f.a,new f.a,new f.a;A.d(e,"a",(function(){return c})),A.d(e,"b",(function(){return C})),A.d(e,"d",(function(){return L})),A.d(e,"c",(function(){return P})),A.d(e,"e",(function(){return H}))},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReactCSS=e.loop=e.handleActive=e.handleHover=e.hover=void 0;var n=g(A(1278)),r=g(A(1300)),i=g(A(1301)),o=g(A(1302)),a=g(A(1303)),s=g(A(1304));function g(t){return t&&t.__esModule?t:{default:t}}e.hover=o.default,e.handleHover=o.default,e.handleActive=a.default,e.loop=s.default;var c=e.ReactCSS=function(t){for(var e=arguments.length,A=Array(e>1?e-1:0),o=1;o<e;o++)A[o-1]=arguments[o];var a=(0,n.default)(A),s=(0,r.default)(t,a);return(0,i.default)(s)};e.default=c},function(t,e){function A(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}},function(t,e,A){"use strict";A.r(e);var n=A(483);A.d(e,"Vector2",(function(){return n.d})),A.d(e,"Vector3",(function(){return n.e})),A.d(e,"Vector4",(function(){return n.f})),A.d(e,"Matrix3",(function(){return n.a})),A.d(e,"Matrix4",(function(){return n.b})),A.d(e,"Quaternion",(function(){return n.c})),A.d(e,"config",(function(){return n.t})),A.d(e,"configure",(function(){return n.u})),A.d(e,"formatValue",(function(){return n.z})),A.d(e,"isArray",(function(){return n.A})),A.d(e,"clone",(function(){return n.s})),A.d(e,"equals",(function(){return n.x})),A.d(e,"exactEquals",(function(){return n.y})),A.d(e,"toRadians",(function(){return n.G})),A.d(e,"toDegrees",(function(){return n.F})),A.d(e,"radians",(function(){return n.C})),A.d(e,"degrees",(function(){return n.w})),A.d(e,"sin",(function(){return n.D})),A.d(e,"cos",(function(){return n.v})),A.d(e,"tan",(function(){return n.E})),A.d(e,"asin",(function(){return n.n})),A.d(e,"acos",(function(){return n.m})),A.d(e,"atan",(function(){return n.p})),A.d(e,"clamp",(function(){return n.r})),A.d(e,"lerp",(function(){return n.B})),A.d(e,"_withEpsilon",(function(){return n.l})),A.d(e,"checkNumber",(function(){return n.q})),A.d(e,"_MathUtils",(function(){return n.h})),A.d(e,"_SphericalCoordinates",(function(){return n.k})),A.d(e,"_Pose",(function(){return n.j})),A.d(e,"_Euler",(function(){return n.g})),A.d(e,"_Polygon",(function(){return n.i})),A.d(e,"assert",(function(){return n.o}))},function(t,e,A){"use strict";A.d(e,"l",(function(){return m})),A.d(e,"i",(function(){return b})),A.d(e,"d",(function(){return F})),A.d(e,"f",(function(){return w})),A.d(e,"e",(function(){return S})),A.d(e,"t",(function(){return D})),A.d(e,"q",(function(){return R})),A.d(e,"o",(function(){return U})),A.d(e,"g",(function(){return G})),A.d(e,"j",(function(){return k})),A.d(e,"k",(function(){return x})),A.d(e,"m",(function(){return O})),A.d(e,"h",(function(){return M})),A.d(e,"n",(function(){return _})),A.d(e,"r",(function(){return J})),A.d(e,"s",(function(){return T})),A.d(e,"a",(function(){return j})),A.d(e,"p",(function(){return H})),A.d(e,"u",(function(){return Y})),A.d(e,"c",(function(){return V})),A.d(e,"b",(function(){return Z}));var n=A(13),r=A(20),i=A(21),o=A(360),a=A.n(o),s=A(528),g=A.n(s),c=A(89),I=A.n(c),u=A(247),l=A.n(u),C=A(85),h=A(435),B=A.n(h),f=A(604),d=A.n(f),Q=A(101),E=A(87),p=A(131);function y(t){return t?t.children?t.children.flatMap((function(t){return y(t)})):t.set||[]:[]}function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t.children)return e;var A=e+1,n=t.children.map((function(t){return v(t,A)}));return Math.max.apply(Math,Object(i.a)(n).concat([A]))}function m(t,e){var A=t.tree.map((function(t){return function t(e,A,n){var r=A[n];if(e.name===r){if(n===A.length-1)return e;if(e.children){var i=e.children.map((function(e){return t(e,A,n+1)})).filter(Boolean);if(1===i.length)return i[0]}}return null}(t,e,0)})).filter(Boolean);return 1===A.length?A[0]:null}function b(t,e,A,n,o){var a;return a=o?Object(i.a)(o):[t.name],e(t,a)?(n.push(a),A(t,a)):t.children?Object(r.a)({},t,{children:t.children.map((function(t){return b(t,e,A,n,a.concat([t.name]))}))}):t}function F(t,e){return Object(r.a)({},t,{children:[].concat(Object(i.a)(t.children),[e])})}function w(t,e){return Object(r.a)({},t,{children:[e].concat(Object(i.a)(t.children))})}function S(t,e,A){var n=Array.from(t.children);return n.splice(A,0,e),Object(r.a)({},t,{children:n})}function D(t,e){var A=e.map((function(e){return m(t,e)})).map((function(t){return y(t).map((function(t){return Object(n.a)(t,1)[0]}))}));return A.reduce((function(t,e){return t.concat(e.filter((function(e){return!t.includes(e)})))}),A[0]||[])}function R(t,e){var A=e.map((function(e){return m(t,e)})).map((function(t){return y(t).map((function(t){return Object(n.a)(t,1)[0]}))}));return A.reduce((function(t,e){return e.filter((function(e){return t.includes(e)}))}),A[0]||[])}function U(t,e,A){var n=D(t,e);return A.filter((function(t){return!n.includes(t)}))}function G(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.children?0===e?[[].concat(Object(i.a)(A),[t.name])]:t.children.flatMap((function(r){return G(r,e-1,[].concat(Object(i.a)(A),[t.name]),n)})).filter(Boolean):n?[[].concat(Object(i.a)(A),[t.name])]:null}function N(t,e){return{version:Q.c[e].latestVersion,datatype:e,tree:t.tree}}function k(t,e,A,n){var o=m(t,e),a=function t(e,A,n,o,a){var s;s=a?Object(i.a)(a):[e.name];var g=e;return A(e,s)&&(o.push(s),g=n(e,s)),e.children?Object(r.a)({},g,{children:g.children.map((function(e){return t(e,A,n,o,s.concat([e.name]))}))}):g}(o,(function(){return!0}),(function(t,e){var A,i,o=null!==(A=null===n||void 0===n||null===(i=n.find((function(t){return I()(t.path,e)})))||void 0===i?void 0:i.color)&&void 0!==A?A:E.b;return Object(r.a)({},t,{color:o.slice(0,3)})}),[]);return{treeToExport:N(Object(r.a)({},t,{tree:[a]}),A),nodeName:o.name}}function x(t,e){var A=m(t,e);return{setToExport:y(A),nodeName:A.name}}function O(t){return{version:Q.c[t].latestVersion,datatype:t,tree:[]}}function M(t,e,A){var n,r=e.length-1;return{title:t.name,nodeKey:Object(p.g)(e),path:e,size:y(t).length,color:null===A||void 0===A||null===(n=A.find((function(t){return I()(t.path,e)})))||void 0===n?void 0:n.color,level:r,isLeaf:(!t.children||0===t.children.length)&&Boolean(t.set),height:v(t)}}function L(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[128,128,128];return[(t[0]-A[0])*e+A[0],(t[1]-A[1])*e+A[1],(t[2]-A[2])*e+A[2]]}function _(t,e,A){var r=[];return e.forEach((function(e){var o=m(t,e);if(o){var a,s=y(o),c=(null===A||void 0===A||null===(a=A.find((function(t){return I()(t.path,e)})))||void 0===a?void 0:a.color)||E.b;r=[].concat(Object(i.a)(r),Object(i.a)(s.map((function(t){var e=Object(n.a)(t,2),A=e[0],r=e[1];return[A,g()(r)?c:L(c,r)]}))))}})),new Map(r)}function J(t,e,A){for(var r=[],i=function(i){var o=e[i],a=m(t,o);if(a){var s,g=y(a),c=(null===A||void 0===A||null===(s=A.find((function(t){return I()(t.path,o)})))||void 0===s?void 0:s.color)||E.b;r=r.concat(g.map((function(t){return{obsId:Object(n.a)(t,1)[0],name:a.name,color:c}})))}},o=0;o<e.length;o+=1)i(o);return r}function T(t,e,A){var n=[];return e.forEach((function(e){var r=m(t,e);if(r){var i,o=y(r),s=(null===(i=A.find((function(t){return I()(t.path,e)})))||void 0===i?void 0:i.color)||E.b;n.push({key:a()(),name:r.name,size:o.length,color:s})}})),n}function j(t,e,A){return I()([].concat(Object(i.a)(e),[t.name]),A)?null:t.children?Object(r.a)({},t,{children:t.children.map((function(n){return j(n,[].concat(Object(i.a)(e),[t.name]),A)})).filter(Boolean)}):t}function H(t,e){var A=null;return t&&t.tree.forEach((function(t){var n=[t.name],r=v(t);l()(r).forEach((function(r){var i=r+1,o=G(t,i,[],!0);I()(o,e)&&(A={levelZeroPath:n,levelIndex:i})}))})),A}function Y(t,e){var A=[],n=[],r=!1;function o(t,e){A.push([].concat(Object(i.a)(e),[t.name])),t.children&&t.children.forEach((function(A){return o(A,[].concat(Object(i.a)(e),[t.name]))}))}return t.tree.forEach((function(t){return o(t,[])})),e.tree.forEach((function(t){return e=t,A=[],n.push([].concat(Object(i.a)(A),[e.name])),void(e.children&&e.children.forEach((function(t){return o(t,[].concat(Object(i.a)(A),[e.name]))})));var e,A})),n.forEach((function(t){A.find((function(e){return I()(e,t)}))&&(r=!0)})),r}function V(t,e){var A=Object(i.a)(e||[]),n=t.tree.map((function(t){return Array.from({length:v(t)+1}).fill(0)}));return t.tree.forEach((function(t,e){return function t(e,r,o,a){var s=n[a][o],g=[].concat(Object(i.a)(r),[e.name]);A.find((function(t){return I()(t.path,g)}))||A.push({path:g,color:E.d[s%E.d.length]}),n[a][o]+=1,e.children&&e.children.forEach((function(e){return t(e,g,o+1,a)}))}(t,[],0,e)})),A}function Z(t){var e=t.cells,A=t.mapping,r=t.cellSets,i=t.cellSetSelection,o=t.cellSetColor;return i&&i.length>0&&r&&e?function(t,e,A,r,i){var o=[];return r.forEach((function(r){var a=m(t,r);if(a){var s,g=y(a),c=(null===i||void 0===i||null===(s=i.find((function(t){return I()(t.path,r)})))||void 0===s?void 0:s.color)||E.b,u=g.map((function(t){var r,i,o=Object(n.a)(t,1)[0];return[null===(r=e[o])||void 0===r?void 0:r.mappings[A][0],-(null===(i=e[o])||void 0===i?void 0:i.mappings[A][1])]})).filter((function(t){return t.every((function(t){return"number"===typeof t}))}));if(u.length>2){var l=Object(C.featureCollection)(u.map(C.point)),h=d()(u,1/0);if(h){var f=B()(l).geometry.coordinates;o.push({path:r,name:r[r.length-1],hull:h,color:c,centroid:f})}}}})),o}(r,e,A,i,o):[]}},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n=A(5),r=A(4),i=function(){function t(e){Object(n.a)(this,t),this._pool=[],this.props={overAlloc:2,poolSize:100},this.setProps(e)}return Object(r.a)(t,[{key:"setProps",value:function(t){Object.assign(this.props,t)}},{key:"allocate",value:function(t,e,A){var n,r=A.size,i=void 0===r?1:r,o=A.type,a=A.padding,s=void 0===a?0:a,g=A.copy,c=void 0!==g&&g,I=A.initialize,u=void 0!==I&&I,l=A.maxCount,C=o||t&&t.constructor||Float32Array,h=e*i+s;if(ArrayBuffer.isView(t)){if(h<=t.length)return t;if(h*t.BYTES_PER_ELEMENT<=t.buffer.byteLength)return new C(t.buffer,0,h)}l&&(n=l*i+s);var B=this._allocate(C,h,u,n);return t&&c?B.set(t):u||B.fill(0,0,4),this._release(t),B}},{key:"release",value:function(t){this._release(t)}},{key:"_allocate",value:function(t,e,A,n){var r=Math.max(Math.ceil(e*this.props.overAlloc),1);r>n&&(r=n);var i=this._pool,o=t.BYTES_PER_ELEMENT*r,a=i.findIndex((function(t){return t.byteLength>=o}));if(a>=0){var s=new t(i.splice(a,1)[0],0,r);return A&&s.fill(0),s}return new t(r)}},{key:"_release",value:function(t){if(ArrayBuffer.isView(t)){var e=this._pool,A=t.buffer,n=A.byteLength,r=e.findIndex((function(t){return t.byteLength>=n}));r<0?e.push(A):(r>0||e.length<this.props.poolSize)&&e.splice(r,0,A),e.length>this.props.poolSize&&e.shift()}}}]),t}();e.a=new i},function(t,e,A){"use strict";A.d(e,"c",(function(){return i})),A.d(e,"d",(function(){return o})),A.d(e,"a",(function(){return a})),A.d(e,"b",(function(){return s}));var n,r=A(12),i={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",SPATIAL_ROTATION_X:"spatialRotationX",SPATIAL_ROTATION_Y:"spatialRotationY",SPATIAL_ROTATION_Z:"spatialRotationZ",SPATIAL_ROTATION_ORBIT:"spatialRotationOrbit",SPATIAL_ORBIT_AXIS:"spatialOrbitAxis",SPATIAL_AXIS_FIXED:"spatialAxisFixed",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_TRANSFORM:"geneExpressionTransform",GENE_EXPRESSION_COLORMAP_RANGE:"geneExpressionColormapRange",CELL_COLOR_ENCODING:"cellColorEncoding",SPATIAL_RASTER_LAYERS:"spatialRasterLayers",SPATIAL_CELLS_LAYER:"spatialCellsLayer",SPATIAL_MOLECULES_LAYER:"spatialMoleculesLayer",SPATIAL_NEIGHBORHOODS_LAYER:"spatialNeighborhoodsLayer",GENOMIC_ZOOM_X:"genomicZoomX",GENOMIC_ZOOM_Y:"genomicZoomY",GENOMIC_TARGET_X:"genomicTargetX",GENOMIC_TARGET_Y:"genomicTargetY",ADDITIONAL_CELL_SETS:"additionalCellSets",MOLECULE_HIGHLIGHT:"moleculeHighlight"},o=(n={},Object(r.a)(n,i.EMBEDDING_ZOOM,null),Object(r.a)(n,i.EMBEDDING_ROTATION,0),Object(r.a)(n,i.EMBEDDING_TARGET_X,null),Object(r.a)(n,i.EMBEDDING_TARGET_Y,null),Object(r.a)(n,i.EMBEDDING_TARGET_Z,0),Object(r.a)(n,i.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,!1),Object(r.a)(n,i.EMBEDDING_CELL_SET_LABELS_VISIBLE,!1),Object(r.a)(n,i.EMBEDDING_CELL_SET_LABEL_SIZE,14),Object(r.a)(n,i.EMBEDDING_CELL_RADIUS,1),Object(r.a)(n,i.SPATIAL_ZOOM,null),Object(r.a)(n,i.SPATIAL_ROTATION,0),Object(r.a)(n,i.SPATIAL_TARGET_X,null),Object(r.a)(n,i.SPATIAL_TARGET_Y,null),Object(r.a)(n,i.SPATIAL_TARGET_Z,null),Object(r.a)(n,i.SPATIAL_ROTATION_X,null),Object(r.a)(n,i.SPATIAL_ROTATION_Y,null),Object(r.a)(n,i.SPATIAL_ROTATION_Z,null),Object(r.a)(n,i.SPATIAL_AXIS_FIXED,!1),Object(r.a)(n,i.SPATIAL_ROTATION_ORBIT,0),Object(r.a)(n,i.SPATIAL_ORBIT_AXIS,"Y"),Object(r.a)(n,i.SPATIAL_RASTER_LAYERS,null),Object(r.a)(n,i.SPATIAL_CELLS_LAYER,null),Object(r.a)(n,i.SPATIAL_MOLECULES_LAYER,null),Object(r.a)(n,i.SPATIAL_NEIGHBORHOODS_LAYER,null),Object(r.a)(n,i.HEATMAP_ZOOM_X,0),Object(r.a)(n,i.HEATMAP_ZOOM_Y,0),Object(r.a)(n,i.HEATMAP_TARGET_X,0),Object(r.a)(n,i.HEATMAP_TARGET_Y,0),Object(r.a)(n,i.GENE_EXPRESSION_COLORMAP,"plasma"),Object(r.a)(n,i.GENE_EXPRESSION_COLORMAP_RANGE,[0,1]),Object(r.a)(n,i.GENE_EXPRESSION_TRANSFORM,null),Object(r.a)(n,i.GENE_FILTER,null),Object(r.a)(n,i.GENE_HIGHLIGHT,null),Object(r.a)(n,i.GENE_SELECTION,null),Object(r.a)(n,i.CELL_FILTER,null),Object(r.a)(n,i.CELL_HIGHLIGHT,null),Object(r.a)(n,i.CELL_SET_SELECTION,null),Object(r.a)(n,i.CELL_SET_HIGHLIGHT,null),Object(r.a)(n,i.CELL_SET_COLOR,null),Object(r.a)(n,i.CELL_COLOR_ENCODING,"cellSetSelection"),Object(r.a)(n,i.GENOMIC_ZOOM_X,0),Object(r.a)(n,i.GENOMIC_ZOOM_Y,0),Object(r.a)(n,i.GENOMIC_TARGET_X,1549999999.5),Object(r.a)(n,i.GENOMIC_TARGET_Y,1549999999.5),Object(r.a)(n,i.ADDITIONAL_CELL_SETS,null),Object(r.a)(n,i.MOLECULE_HIGHLIGHT,null),n),a=[i.HEATMAP_ZOOM_X,i.HEATMAP_ZOOM_Y,i.HEATMAP_TARGET_X,i.HEATMAP_TARGET_Y,i.EMBEDDING_ZOOM,i.EMBEDDING_TARGET_X,i.EMBEDDING_TARGET_Y,i.EMBEDDING_TARGET_Z,i.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,i.EMBEDDING_CELL_SET_LABELS_VISIBLE,i.EMBEDDING_CELL_SET_LABEL_SIZE,i.EMBEDDING_CELL_RADIUS],s={scatterplot:[i.DATASET,i.EMBEDDING_TYPE,i.EMBEDDING_ZOOM,i.EMBEDDING_ROTATION,i.EMBEDDING_TARGET_X,i.EMBEDDING_TARGET_Y,i.EMBEDDING_TARGET_Z,i.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,i.EMBEDDING_CELL_SET_LABELS_VISIBLE,i.EMBEDDING_CELL_SET_LABEL_SIZE,i.EMBEDDING_CELL_RADIUS,i.CELL_FILTER,i.CELL_HIGHLIGHT,i.CELL_SET_SELECTION,i.CELL_SET_HIGHLIGHT,i.CELL_SET_COLOR,i.GENE_HIGHLIGHT,i.GENE_SELECTION,i.GENE_EXPRESSION_COLORMAP,i.GENE_EXPRESSION_COLORMAP_RANGE,i.CELL_COLOR_ENCODING,i.ADDITIONAL_CELL_SETS],spatial:[i.DATASET,i.SPATIAL_ZOOM,i.SPATIAL_ROTATION,i.SPATIAL_RASTER_LAYERS,i.SPATIAL_CELLS_LAYER,i.SPATIAL_MOLECULES_LAYER,i.SPATIAL_NEIGHBORHOODS_LAYER,i.SPATIAL_TARGET_X,i.SPATIAL_TARGET_Y,i.SPATIAL_TARGET_Z,i.SPATIAL_ROTATION_X,i.SPATIAL_ROTATION_Y,i.SPATIAL_ROTATION_Z,i.SPATIAL_ROTATION_ORBIT,i.SPATIAL_ORBIT_AXIS,i.SPATIAL_AXIS_FIXED,i.CELL_FILTER,i.CELL_HIGHLIGHT,i.CELL_SET_SELECTION,i.CELL_SET_HIGHLIGHT,i.CELL_SET_COLOR,i.GENE_HIGHLIGHT,i.GENE_SELECTION,i.GENE_EXPRESSION_COLORMAP,i.GENE_EXPRESSION_COLORMAP_RANGE,i.CELL_COLOR_ENCODING,i.ADDITIONAL_CELL_SETS,i.MOLECULE_HIGHLIGHT],heatmap:[i.DATASET,i.HEATMAP_ZOOM_X,i.HEATMAP_ZOOM_Y,i.HEATMAP_TARGET_X,i.HEATMAP_TARGET_Y,i.CELL_FILTER,i.CELL_HIGHLIGHT,i.CELL_SET_SELECTION,i.CELL_SET_HIGHLIGHT,i.CELL_SET_COLOR,i.GENE_FILTER,i.GENE_HIGHLIGHT,i.GENE_SELECTION,i.GENE_EXPRESSION_COLORMAP,i.GENE_EXPRESSION_COLORMAP_RANGE,i.CELL_COLOR_ENCODING,i.ADDITIONAL_CELL_SETS],cellSets:[i.DATASET,i.CELL_SET_SELECTION,i.CELL_SET_HIGHLIGHT,i.CELL_SET_COLOR,i.CELL_COLOR_ENCODING,i.ADDITIONAL_CELL_SETS],cellSetSizes:[i.DATASET,i.CELL_SET_SELECTION,i.CELL_SET_HIGHLIGHT,i.CELL_SET_COLOR,i.ADDITIONAL_CELL_SETS],cellSetExpression:[i.DATASET,i.GENE_SELECTION,i.GENE_EXPRESSION_TRANSFORM,i.CELL_SET_SELECTION,i.CELL_SET_HIGHLIGHT,i.CELL_SET_COLOR,i.ADDITIONAL_CELL_SETS],status:[i.DATASET,i.CELL_HIGHLIGHT,i.GENE_HIGHLIGHT,i.CELL_SET_HIGHLIGHT,i.MOLECULE_HIGHLIGHT],genes:[i.DATASET,i.GENE_FILTER,i.GENE_HIGHLIGHT,i.GENE_SELECTION,i.CELL_COLOR_ENCODING],expressionHistogram:[i.DATASET,i.GENE_SELECTION],layerController:[i.DATASET,i.SPATIAL_RASTER_LAYERS,i.SPATIAL_CELLS_LAYER,i.SPATIAL_MOLECULES_LAYER,i.SPATIAL_NEIGHBORHOODS_LAYER,i.SPATIAL_ZOOM,i.SPATIAL_TARGET_X,i.SPATIAL_TARGET_Y,i.SPATIAL_TARGET_Z,i.SPATIAL_ROTATION_X,i.SPATIAL_ROTATION_Y,i.SPATIAL_ROTATION_Z,i.SPATIAL_ROTATION_ORBIT,i.SPATIAL_ORBIT_AXIS],higlass:[i.DATASET,i.GENOMIC_ZOOM_X,i.GENOMIC_ZOOM_Y,i.GENOMIC_TARGET_X,i.GENOMIC_TARGET_Y,i.GENE_FILTER,i.GENE_HIGHLIGHT,i.GENE_SELECTION],genomicProfiles:[i.DATASET,i.GENOMIC_ZOOM_X,i.GENOMIC_ZOOM_Y,i.GENOMIC_TARGET_X,i.GENOMIC_TARGET_Y,i.GENE_FILTER,i.GENE_HIGHLIGHT,i.GENE_SELECTION,i.CELL_SET_SELECTION,i.CELL_SET_HIGHLIGHT,i.CELL_SET_COLOR,i.ADDITIONAL_CELL_SETS],description:[i.DATASET,i.SPATIAL_RASTER_LAYERS]}},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error(e||"loader assertion failed.")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"c",(function(){return c})),A.d(e,"e",(function(){return h})),A.d(e,"a",(function(){return f})),A.d(e,"b",(function(){return d})),A.d(e,"d",(function(){return E}));var n,r,i,o=A(22),a=A(29),s=A(1),g=A(75),c=(n={},Object(s.a)(n,3042,!1),Object(s.a)(n,32773,new Float32Array([0,0,0,0])),Object(s.a)(n,32777,32774),Object(s.a)(n,34877,32774),Object(s.a)(n,32969,1),Object(s.a)(n,32968,0),Object(s.a)(n,32971,1),Object(s.a)(n,32970,0),Object(s.a)(n,3106,new Float32Array([0,0,0,0])),Object(s.a)(n,3107,[!0,!0,!0,!0]),Object(s.a)(n,2884,!1),Object(s.a)(n,2885,1029),Object(s.a)(n,2929,!1),Object(s.a)(n,2931,1),Object(s.a)(n,2932,513),Object(s.a)(n,2928,new Float32Array([0,1])),Object(s.a)(n,2930,!0),Object(s.a)(n,3024,!0),Object(s.a)(n,36006,null),Object(s.a)(n,2886,2305),Object(s.a)(n,33170,4352),Object(s.a)(n,2849,1),Object(s.a)(n,32823,!1),Object(s.a)(n,32824,0),Object(s.a)(n,10752,0),Object(s.a)(n,32938,1),Object(s.a)(n,32939,!1),Object(s.a)(n,3089,!1),Object(s.a)(n,3088,new Int32Array([0,0,1024,1024])),Object(s.a)(n,2960,!1),Object(s.a)(n,2961,0),Object(s.a)(n,2968,4294967295),Object(s.a)(n,36005,4294967295),Object(s.a)(n,2962,519),Object(s.a)(n,2967,0),Object(s.a)(n,2963,4294967295),Object(s.a)(n,34816,519),Object(s.a)(n,36003,0),Object(s.a)(n,36004,4294967295),Object(s.a)(n,2964,7680),Object(s.a)(n,2965,7680),Object(s.a)(n,2966,7680),Object(s.a)(n,34817,7680),Object(s.a)(n,34818,7680),Object(s.a)(n,34819,7680),Object(s.a)(n,2978,[0,0,1024,1024]),Object(s.a)(n,3333,4),Object(s.a)(n,3317,4),Object(s.a)(n,37440,!1),Object(s.a)(n,37441,!1),Object(s.a)(n,37443,37444),Object(s.a)(n,35723,4352),Object(s.a)(n,36010,null),Object(s.a)(n,35977,!1),Object(s.a)(n,3330,0),Object(s.a)(n,3332,0),Object(s.a)(n,3331,0),Object(s.a)(n,3314,0),Object(s.a)(n,32878,0),Object(s.a)(n,3316,0),Object(s.a)(n,3315,0),Object(s.a)(n,32877,0),n),I=function(t,e,A){return e?t.enable(A):t.disable(A)},u=function(t,e,A){return t.hint(A,e)},l=function(t,e,A){return t.pixelStorei(A,e)};function C(t){return Array.isArray(t)||ArrayBuffer.isView(t)}var h=(r={},Object(s.a)(r,3042,I),Object(s.a)(r,32773,(function(t,e){return t.blendColor.apply(t,Object(a.a)(e))})),Object(s.a)(r,32777,"blendEquation"),Object(s.a)(r,34877,"blendEquation"),Object(s.a)(r,32969,"blendFunc"),Object(s.a)(r,32968,"blendFunc"),Object(s.a)(r,32971,"blendFunc"),Object(s.a)(r,32970,"blendFunc"),Object(s.a)(r,3106,(function(t,e){return t.clearColor.apply(t,Object(a.a)(e))})),Object(s.a)(r,3107,(function(t,e){return t.colorMask.apply(t,Object(a.a)(e))})),Object(s.a)(r,2884,I),Object(s.a)(r,2885,(function(t,e){return t.cullFace(e)})),Object(s.a)(r,2929,I),Object(s.a)(r,2931,(function(t,e){return t.clearDepth(e)})),Object(s.a)(r,2932,(function(t,e){return t.depthFunc(e)})),Object(s.a)(r,2928,(function(t,e){return t.depthRange.apply(t,Object(a.a)(e))})),Object(s.a)(r,2930,(function(t,e){return t.depthMask(e)})),Object(s.a)(r,3024,I),Object(s.a)(r,35723,u),Object(s.a)(r,36006,(function(t,e){var A=Object(g.e)(t)?36009:36160;return t.bindFramebuffer(A,e)})),Object(s.a)(r,2886,(function(t,e){return t.frontFace(e)})),Object(s.a)(r,33170,u),Object(s.a)(r,2849,(function(t,e){return t.lineWidth(e)})),Object(s.a)(r,32823,I),Object(s.a)(r,32824,"polygonOffset"),Object(s.a)(r,10752,"polygonOffset"),Object(s.a)(r,35977,I),Object(s.a)(r,32938,"sampleCoverage"),Object(s.a)(r,32939,"sampleCoverage"),Object(s.a)(r,3089,I),Object(s.a)(r,3088,(function(t,e){return t.scissor.apply(t,Object(a.a)(e))})),Object(s.a)(r,2960,I),Object(s.a)(r,2961,(function(t,e){return t.clearStencil(e)})),Object(s.a)(r,2968,(function(t,e){return t.stencilMaskSeparate(1028,e)})),Object(s.a)(r,36005,(function(t,e){return t.stencilMaskSeparate(1029,e)})),Object(s.a)(r,2962,"stencilFuncFront"),Object(s.a)(r,2967,"stencilFuncFront"),Object(s.a)(r,2963,"stencilFuncFront"),Object(s.a)(r,34816,"stencilFuncBack"),Object(s.a)(r,36003,"stencilFuncBack"),Object(s.a)(r,36004,"stencilFuncBack"),Object(s.a)(r,2964,"stencilOpFront"),Object(s.a)(r,2965,"stencilOpFront"),Object(s.a)(r,2966,"stencilOpFront"),Object(s.a)(r,34817,"stencilOpBack"),Object(s.a)(r,34818,"stencilOpBack"),Object(s.a)(r,34819,"stencilOpBack"),Object(s.a)(r,2978,(function(t,e){return t.viewport.apply(t,Object(a.a)(e))})),Object(s.a)(r,3333,l),Object(s.a)(r,3317,l),Object(s.a)(r,37440,l),Object(s.a)(r,37441,l),Object(s.a)(r,37443,l),Object(s.a)(r,3330,l),Object(s.a)(r,3332,l),Object(s.a)(r,3331,l),Object(s.a)(r,36010,(function(t,e){return t.bindFramebuffer(36008,e)})),Object(s.a)(r,3314,l),Object(s.a)(r,32878,l),Object(s.a)(r,3316,l),Object(s.a)(r,3315,l),Object(s.a)(r,32877,l),Object(s.a)(r,"framebuffer",(function(t,e){var A=e&&"handle"in e?e.handle:e;return t.bindFramebuffer(36160,A)})),Object(s.a)(r,"blend",(function(t,e){return e?t.enable(3042):t.disable(3042)})),Object(s.a)(r,"blendColor",(function(t,e){return t.blendColor.apply(t,Object(a.a)(e))})),Object(s.a)(r,"blendEquation",(function(t,e){e=C(e)?e:[e,e],t.blendEquationSeparate.apply(t,Object(a.a)(e))})),Object(s.a)(r,"blendFunc",(function(t,e){e=C(e)&&2===e.length?[].concat(Object(a.a)(e),Object(a.a)(e)):e,t.blendFuncSeparate.apply(t,Object(a.a)(e))})),Object(s.a)(r,"clearColor",(function(t,e){return t.clearColor.apply(t,Object(a.a)(e))})),Object(s.a)(r,"clearDepth",(function(t,e){return t.clearDepth(e)})),Object(s.a)(r,"clearStencil",(function(t,e){return t.clearStencil(e)})),Object(s.a)(r,"colorMask",(function(t,e){return t.colorMask.apply(t,Object(a.a)(e))})),Object(s.a)(r,"cull",(function(t,e){return e?t.enable(2884):t.disable(2884)})),Object(s.a)(r,"cullFace",(function(t,e){return t.cullFace(e)})),Object(s.a)(r,"depthTest",(function(t,e){return e?t.enable(2929):t.disable(2929)})),Object(s.a)(r,"depthFunc",(function(t,e){return t.depthFunc(e)})),Object(s.a)(r,"depthMask",(function(t,e){return t.depthMask(e)})),Object(s.a)(r,"depthRange",(function(t,e){return t.depthRange.apply(t,Object(a.a)(e))})),Object(s.a)(r,"dither",(function(t,e){return e?t.enable(3024):t.disable(3024)})),Object(s.a)(r,"derivativeHint",(function(t,e){t.hint(35723,e)})),Object(s.a)(r,"frontFace",(function(t,e){return t.frontFace(e)})),Object(s.a)(r,"mipmapHint",(function(t,e){return t.hint(33170,e)})),Object(s.a)(r,"lineWidth",(function(t,e){return t.lineWidth(e)})),Object(s.a)(r,"polygonOffsetFill",(function(t,e){return e?t.enable(32823):t.disable(32823)})),Object(s.a)(r,"polygonOffset",(function(t,e){return t.polygonOffset.apply(t,Object(a.a)(e))})),Object(s.a)(r,"sampleCoverage",(function(t,e){return t.sampleCoverage.apply(t,Object(a.a)(e))})),Object(s.a)(r,"scissorTest",(function(t,e){return e?t.enable(3089):t.disable(3089)})),Object(s.a)(r,"scissor",(function(t,e){return t.scissor.apply(t,Object(a.a)(e))})),Object(s.a)(r,"stencilTest",(function(t,e){return e?t.enable(2960):t.disable(2960)})),Object(s.a)(r,"stencilMask",(function(t,e){var A=e=C(e)?e:[e,e],n=Object(o.a)(A,2),r=n[0],i=n[1];t.stencilMaskSeparate(1028,r),t.stencilMaskSeparate(1029,i)})),Object(s.a)(r,"stencilFunc",(function(t,e){var A=e=C(e)&&3===e.length?[].concat(Object(a.a)(e),Object(a.a)(e)):e,n=Object(o.a)(A,6),r=n[0],i=n[1],s=n[2],g=n[3],c=n[4],I=n[5];t.stencilFuncSeparate(1028,r,i,s),t.stencilFuncSeparate(1029,g,c,I)})),Object(s.a)(r,"stencilOp",(function(t,e){var A=e=C(e)&&3===e.length?[].concat(Object(a.a)(e),Object(a.a)(e)):e,n=Object(o.a)(A,6),r=n[0],i=n[1],s=n[2],g=n[3],c=n[4],I=n[5];t.stencilOpSeparate(1028,r,i,s),t.stencilOpSeparate(1029,g,c,I)})),Object(s.a)(r,"viewport",(function(t,e){return t.viewport.apply(t,Object(a.a)(e))})),r);function B(t,e,A){return void 0!==e[t]?e[t]:A[t]}var f={blendEquation:function(t,e,A){return t.blendEquationSeparate(B(32777,e,A),B(34877,e,A))},blendFunc:function(t,e,A){return t.blendFuncSeparate(B(32969,e,A),B(32968,e,A),B(32971,e,A),B(32970,e,A))},polygonOffset:function(t,e,A){return t.polygonOffset(B(32824,e,A),B(10752,e,A))},sampleCoverage:function(t,e,A){return t.sampleCoverage(B(32938,e,A),B(32939,e,A))},stencilFuncFront:function(t,e,A){return t.stencilFuncSeparate(1028,B(2962,e,A),B(2967,e,A),B(2963,e,A))},stencilFuncBack:function(t,e,A){return t.stencilFuncSeparate(1029,B(34816,e,A),B(36003,e,A),B(36004,e,A))},stencilOpFront:function(t,e,A){return t.stencilOpSeparate(1028,B(2964,e,A),B(2965,e,A),B(2966,e,A))},stencilOpBack:function(t,e,A){return t.stencilOpSeparate(1029,B(34817,e,A),B(34818,e,A),B(34819,e,A))}},d={enable:function(t,e){return t(Object(s.a)({},e,!0))},disable:function(t,e){return t(Object(s.a)({},e,!1))},pixelStorei:function(t,e,A){return t(Object(s.a)({},e,A))},hint:function(t,e,A){return t(Object(s.a)({},e,A))},bindFramebuffer:function(t,e,A){var n;switch(e){case 36160:return t((n={},Object(s.a)(n,36006,A),Object(s.a)(n,36010,A),n));case 36009:return t(Object(s.a)({},36006,A));case 36008:return t(Object(s.a)({},36010,A));default:return null}},blendColor:function(t,e,A,n,r){return t(Object(s.a)({},32773,new Float32Array([e,A,n,r])))},blendEquation:function(t,e){var A;return t((A={},Object(s.a)(A,32777,e),Object(s.a)(A,34877,e),A))},blendEquationSeparate:function(t,e,A){var n;return t((n={},Object(s.a)(n,32777,e),Object(s.a)(n,34877,A),n))},blendFunc:function(t,e,A){var n;return t((n={},Object(s.a)(n,32969,e),Object(s.a)(n,32968,A),Object(s.a)(n,32971,e),Object(s.a)(n,32970,A),n))},blendFuncSeparate:function(t,e,A,n,r){var i;return t((i={},Object(s.a)(i,32969,e),Object(s.a)(i,32968,A),Object(s.a)(i,32971,n),Object(s.a)(i,32970,r),i))},clearColor:function(t,e,A,n,r){return t(Object(s.a)({},3106,new Float32Array([e,A,n,r])))},clearDepth:function(t,e){return t(Object(s.a)({},2931,e))},clearStencil:function(t,e){return t(Object(s.a)({},2961,e))},colorMask:function(t,e,A,n,r){return t(Object(s.a)({},3107,[e,A,n,r]))},cullFace:function(t,e){return t(Object(s.a)({},2885,e))},depthFunc:function(t,e){return t(Object(s.a)({},2932,e))},depthRange:function(t,e,A){return t(Object(s.a)({},2928,new Float32Array([e,A])))},depthMask:function(t,e){return t(Object(s.a)({},2930,e))},frontFace:function(t,e){return t(Object(s.a)({},2886,e))},lineWidth:function(t,e){return t(Object(s.a)({},2849,e))},polygonOffset:function(t,e,A){var n;return t((n={},Object(s.a)(n,32824,e),Object(s.a)(n,10752,A),n))},sampleCoverage:function(t,e,A){var n;return t((n={},Object(s.a)(n,32938,e),Object(s.a)(n,32939,A),n))},scissor:function(t,e,A,n,r){return t(Object(s.a)({},3088,new Int32Array([e,A,n,r])))},stencilMask:function(t,e){var A;return t((A={},Object(s.a)(A,2968,e),Object(s.a)(A,36005,e),A))},stencilMaskSeparate:function(t,e,A){return t(Object(s.a)({},1028===e?2968:36005,A))},stencilFunc:function(t,e,A,n){var r;return t((r={},Object(s.a)(r,2962,e),Object(s.a)(r,2967,A),Object(s.a)(r,2963,n),Object(s.a)(r,34816,e),Object(s.a)(r,36003,A),Object(s.a)(r,36004,n),r))},stencilFuncSeparate:function(t,e,A,n,r){var i;return t((i={},Object(s.a)(i,1028===e?2962:34816,A),Object(s.a)(i,1028===e?2967:36003,n),Object(s.a)(i,1028===e?2963:36004,r),i))},stencilOp:function(t,e,A,n){var r;return t((r={},Object(s.a)(r,2964,e),Object(s.a)(r,2965,A),Object(s.a)(r,2966,n),Object(s.a)(r,34817,e),Object(s.a)(r,34818,A),Object(s.a)(r,34819,n),r))},stencilOpSeparate:function(t,e,A,n,r){var i;return t((i={},Object(s.a)(i,1028===e?2964:34817,A),Object(s.a)(i,1028===e?2965:34818,n),Object(s.a)(i,1028===e?2966:34819,r),i))},viewport:function(t,e,A,n,r){return t(Object(s.a)({},2978,[e,A,n,r]))}},Q=function(t,e){return t.isEnabled(e)},E=(i={},Object(s.a)(i,3042,Q),Object(s.a)(i,2884,Q),Object(s.a)(i,2929,Q),Object(s.a)(i,3024,Q),Object(s.a)(i,32823,Q),Object(s.a)(i,32926,Q),Object(s.a)(i,32928,Q),Object(s.a)(i,3089,Q),Object(s.a)(i,2960,Q),Object(s.a)(i,35977,Q),i)},function(t,e,A){"use strict";A.d(e,"a",(function(){return a})),A.d(e,"b",(function(){return g}));var n=A(5),r=A(4),i=A(148),o=function(){},a={BREAK:1,SNAP_TO_END:2,IGNORE:3},s={transitionEasing:function(t){return t},transitionInterruption:a.BREAK,onTransitionStart:o,onTransitionInterrupt:o,onTransitionEnd:o},g=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,t),this.ControllerState=e,this.props=Object.assign({},s,A),this.propsInTransition=null,this.transition=new i.a(A.timeline),this.onViewStateChange=A.onViewStateChange||o,this.onStateChange=A.onStateChange||o,this._onTransitionUpdate=this._onTransitionUpdate.bind(this)}return Object(r.a)(t,[{key:"finalize",value:function(){this.transition.cancel()}},{key:"getViewportInTransition",value:function(){return this.propsInTransition}},{key:"processViewStateChange",value:function(t){var e=!1,A=this.props;if(t=Object.assign({},s,t),this.props=t,this._shouldIgnoreViewportChange(A,t))return e;if(this._isTransitionEnabled(t)){var n=this.transition.settings,r=n.interruption,i=n.endProps,o=Object.assign({},A,r===a.SNAP_TO_END?i:this.propsInTransition||A);this._triggerTransition(o,t),e=!0}else this.transition.cancel();return e}},{key:"updateTransition",value:function(){this.transition.update()}},{key:"_isTransitionEnabled",value:function(t){var e=t.transitionDuration,A=t.transitionInterpolator;return(e>0||"auto"===e)&&Boolean(A)}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!!this.transition.inProgress&&this.transition.settings.interpolator.arePropsEqual(t,this.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return this.transition.inProgress?this.transition.settings.interruption===a.IGNORE||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e)}},{key:"_triggerTransition",value:function(t,e){var A=new this.ControllerState(t),n=new this.ControllerState(e).shortestPathFrom(A),r=e.transitionInterpolator,i=r.getDuration?r.getDuration(t,e):e.transitionDuration;if(0!==i){var o=e.transitionInterpolator.initializeProps(t,n);this.propsInTransition={},this.duration=i,this.transition.start({duration:i,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startProps:o.start,endProps:o.end,onStart:e.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(e.onTransitionInterrupt),onEnd:this._onTransitionEnd(e.onTransitionEnd)}),this.onStateChange({inTransition:!0}),this.updateTransition()}}},{key:"_onTransitionEnd",value:function(t){var e=this;return function(A){e.propsInTransition=null,e.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),t(A)}}},{key:"_onTransitionUpdate",value:function(t){var e=t.time,A=t.settings,n=A.interpolator,r=A.startProps,i=A.endProps,o=A.duration,a=(0,A.easing)(e/o),s=n.interpolateProps(r,i,a);this.propsInTransition=new this.ControllerState(Object.assign({},this.props,s)).getViewportProps(),this.onViewStateChange({viewState:this.propsInTransition,oldViewState:this.props})}}]),t}()},function(t,e,A){var n=A(454),r="object"==typeof self&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i},function(t,e,A){"use strict";A.d(e,"f",(function(){return c})),A.d(e,"c",(function(){return I})),A.d(e,"b",(function(){return u})),A.d(e,"d",(function(){return l})),A.d(e,"e",(function(){return C})),A.d(e,"a",(function(){return h}));var n=A(21),r=A(13),i=A(0),o=A(214),a=A.n(o),s=A(63);function g(){var t=window;return{width:t.innerWidth,height:t.innerHeight}}function c(){var t=Object(i.useState)(g()),e=Object(r.a)(t,2),A=e[0],n=e[1];return Object(i.useEffect)((function(){var t=a()((function(){n(g())}),100,{trailing:!0});return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),A}function I(){var t=Object(i.useRef)(),e=Object(i.useState)(),A=Object(r.a)(e,2),n=A[0],o=A[1],g=Object(i.useState)(),c=Object(r.a)(g,2),I=c[0],u=c[1],l=Object(s.h)(),C=Object(s.g)();return Object(i.useEffect)((function(){function t(){C()}var e=a()(t,100,{trailing:!0});return window.addEventListener("resize",e),t(),function(){window.removeEventListener("resize",e)}}),[C]),Object(i.useEffect)((function(){if(t.current){var e=t.current.getBoundingClientRect();o(e.height),u(e.width)}}),[l]),[I,n,t]}function u(){var t=Object(i.useRef)(),e=Object(i.useState)(),A=Object(r.a)(e,2),n=A[0],o=A[1],g=Object(i.useState)(),c=Object(r.a)(g,2),I=c[0],u=c[1],l=Object(s.h)(),C=Object(s.g)();return Object(i.useEffect)((function(){function t(){C()}var e=a()(t,100,{trailing:!0});return window.addEventListener("resize",e),t(),function(){window.removeEventListener("resize",e)}}),[C]),Object(i.useEffect)((function(){if(t.current){var e=t.current.deck.canvas.getBoundingClientRect();o(e.height),u(e.width)}}),[l]),[I,n,t]}function l(t){var e=t,A=Object(i.useState)(e),n=Object(r.a)(A,2),o=n[0],a=n[1],s=Object(i.useCallback)((function(t){a((function(e){var A=e.filter((function(e){return e!==t}));return console.log("cleared ".concat(t,"; waiting on ").concat(A.length,": ").concat(JSON.stringify(A))),A}))}),[a]),g=Object(i.useCallback)((function(){a(e),console.log("waiting on ".concat(e.length,": ").concat(JSON.stringify(e)))}),[a,e]);return[0===o.length,s,g]}function C(){var t=Object(i.useState)([]),e=Object(r.a)(t,2),A=e[0],o=e[1];return[A,Object(i.useCallback)((function(t,e){t&&o((function(A){return[].concat(Object(n.a)(A),[{url:t,name:e}])}))}),[o]),Object(i.useCallback)((function(){o([])}),[o])]}function h(t){var e=Object(i.useState)(),A=Object(r.a)(e,2),n=A[0],o=A[1],s=Object(i.useState)(),g=Object(r.a)(s,2),c=g[0],I=g[1];return Object(i.useEffect)((function(){function e(){if(t.current){var e=t.current.closest(".vitessce-container"),A=e.clientHeight,n=e.clientWidth;I(n),o(A)}}var A=a()(e,100,{trailing:!0});return window.addEventListener("resize",A),e(),function(){window.removeEventListener("resize",A)}}),[t]),[c,n]}},function(t,e,A){"use strict";(function(t){A.d(e,"c",(function(){return l})),A.d(e,"b",(function(){return C})),A.d(e,"a",(function(){return h}));var n=A(5),r=A(4),i=A(142),o=A(177),a=A(84),s=A(264);function g(t,e){var A=t[e].bind(t);t[e]=function(){var e=arguments.length<=0?void 0:arguments[0];return e in t.state.cache||(t.state.cache[e]=A.apply(void 0,arguments)),t.state.enable?t.state.cache[e]:A.apply(void 0,arguments)},Object.defineProperty(t[e],"name",{value:"".concat(e,"-from-cache"),configurable:!1})}function c(t,e,A){var n=t[e].bind(t);t[e]=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=A.apply(void 0,[t.state._updateCache].concat(r)),a=o.valueChanged,s=o.oldValue;return a&&n.apply(void 0,r),s},Object.defineProperty(t[e],"name",{value:"".concat(e,"-to-cache"),configurable:!1})}function I(t){var e=t.useProgram.bind(t);t.useProgram=function(A){t.state.program!==A&&(e(A),t.state.program=A)}}var u=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=A.copyState,a=void 0!==r&&r,s=A.log,g=void 0===s?function(){}:s;Object(n.a)(this,t),this.gl=e,this.program=null,this.stateStack=[],this.enable=!0,this.cache=a?Object(o.a)(e):Object.assign({},i.c),this.log=g,this._updateCache=this._updateCache.bind(this),Object.seal(this)}return Object(r.a)(t,[{key:"push",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.stateStack.push({})}},{key:"pop",value:function(){Object(a.a)(this.stateStack.length>0);var t=this.stateStack[this.stateStack.length-1];Object(o.c)(this.gl,t),this.stateStack.pop()}},{key:"_updateCache",value:function(t){var e,A=!1,n=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(var r in t){Object(a.a)(void 0!==r);var i=t[r],o=this.cache[r];Object(s.a)(i,o)||(A=!0,e=o,n&&!(r in n)&&(n[r]=o),this.cache[r]=i)}return{valueChanged:A,oldValue:e}}}]),t}();function l(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A.enable,r=void 0===n||n,o=A.copyState;if(Object(a.a)(void 0!==o),!e.state){var s="undefined"!==typeof t?t:window,l=s.polyfillContext;for(var C in l&&l(e),e.state=new u(e,{copyState:o}),I(e),i.b){var h=i.b[C];c(e,C,h)}g(e,"getParameter"),g(e,"isEnabled")}return e.state.enable=r,e}function C(t){t.state||l(t,{copyState:!1}),t.state.push()}function h(t){Object(a.a)(t.state),t.state.pop()}}).call(this,A(58))},function(t,e,A){"use strict";A.d(e,"a",(function(){return m}));var n=A(1),r=A(22),i=A(5),o=A(56),a=A(35),s=A(4),g=A(14),c=A(16),I=A(7),u=A(19),l=A(94),C=A(233),h=A(199),B=A(333),f=A(390),d=A(737),Q=A(185),E=A(49);function p(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return y(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return y(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function v(t){var e=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(t){return!1}}();return function(){var A,n=Object(I.a)(t);if(e){var r=Object(I.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(c.a)(this,A)}}var m=function(t){Object(g.a)(A,t);var e=v(A);function A(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(i.a)(this,A),(n=e.call(this,t,r)).width=null,n.height=null,n.attachments={},n.readBuffer=36064,n.drawBuffers=[36064],n.ownResources=[],n.initialize(r),Object.seal(Object(o.a)(n)),n}return Object(s.a)(A,[{key:"MAX_COLOR_ATTACHMENTS",get:function(){var t=Object(u.a)(this.gl);return t.getParameter(t.MAX_COLOR_ATTACHMENTS)}},{key:"MAX_DRAW_BUFFERS",get:function(){var t=Object(u.a)(this.gl);return t.getParameter(t.MAX_DRAW_BUFFERS)}}],[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.colorBufferFloat,n=e.colorBufferHalfFloat,r=!0;return A&&(r=Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("WEBGL_color_buffer_float")||t.getExtension("OES_texture_float"))),n&&(r=r&&Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("EXT_color_buffer_half_float"))),r}},{key:"getDefaultFramebuffer",value:function(t){return t.luma=t.luma||{},t.luma.defaultFramebuffer=t.luma.defaultFramebuffer||new A(t,{id:"default-framebuffer",handle:null,attachments:{}}),t.luma.defaultFramebuffer}}]),Object(s.a)(A,[{key:"initialize",value:function(t){var e=t.width,A=void 0===e?1:e,n=t.height,r=void 0===n?1:n,i=t.attachments,o=void 0===i?null:i,a=t.color,s=void 0===a||a,g=t.depth,c=void 0===g||g,I=t.stencil,u=void 0!==I&&I,l=t.check,C=void 0===l||l,h=t.readBuffer,B=void 0===h?void 0:h,f=t.drawBuffers,d=void 0===f?void 0:f;if(Object(E.a)(A>=0&&r>=0,"Width and height need to be integers"),this.width=A,this.height=r,o)for(var Q in o){var p=o[Q];(Array.isArray(p)?p[0]:p).resize({width:A,height:r})}else o=this._createDefaultAttachments(s,c,u,A,r);this.update({clearAttachments:!0,attachments:o,readBuffer:B,drawBuffers:d}),o&&C&&this.checkStatus()}},{key:"delete",value:function(){var t,e=p(this.ownResources);try{for(e.s();!(t=e.n()).done;){t.value.delete()}}catch(n){e.e(n)}finally{e.f()}return Object(a.a)(Object(I.a)(A.prototype),"delete",this).call(this),this}},{key:"update",value:function(t){var e=t.attachments,A=void 0===e?{}:e,n=t.readBuffer,r=t.drawBuffers,i=t.clearAttachments,o=void 0!==i&&i,a=t.resizeAttachments,s=void 0===a||a;this.attach(A,{clearAttachments:o,resizeAttachments:s});var g=this.gl,c=g.bindFramebuffer(36160,this.handle);return n&&this._setReadBuffer(n),r&&this._setDrawBuffers(r),g.bindFramebuffer(36160,c||null),this}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.width,A=t.height;if(null===this.handle)return Object(E.a)(void 0===e&&void 0===A),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;for(var n in void 0===e&&(e=this.gl.drawingBufferWidth),void 0===A&&(A=this.gl.drawingBufferHeight),e!==this.width&&A!==this.height&&u.k.log(2,"Resizing framebuffer ".concat(this.id," to ").concat(e,"x").concat(A))(),this.attachments)this.attachments[n].resize({width:e,height:A});return this.width=e,this.height=A,this}},{key:"attach",value:function(t){var e=this,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A.clearAttachments,i=void 0!==n&&n,o=A.resizeAttachments,a=void 0===o||o,s={};i&&Object.keys(this.attachments).forEach((function(t){s[t]=null})),Object.assign(s,t);var g=this.gl.bindFramebuffer(36160,this.handle);for(var c in s){Object(E.a)(void 0!==c,"Misspelled framebuffer binding point?");var I=Number(c),u=s[I],l=u;if(l)if(l instanceof h.a)this._attachRenderbuffer({attachment:I,renderbuffer:l});else if(Array.isArray(u)){var C=Object(r.a)(u,3),B=C[0],f=C[1],d=void 0===f?0:f,Q=C[2],p=void 0===Q?0:Q;l=B,this._attachTexture({attachment:I,texture:B,layer:d,level:p})}else this._attachTexture({attachment:I,texture:l,layer:0,level:0});else this._unattach(I);a&&l&&l.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,g||null),Object.assign(this.attachments,t),Object.keys(this.attachments).filter((function(t){return!e.attachments[t]})).forEach((function(t){delete e.attachments[t]}))}},{key:"checkStatus",value:function(){this.gl;var t=this.getStatus();if(36053!==t)throw new Error(b(t));return this}},{key:"getStatus",value:function(){var t=this.gl,e=t.bindFramebuffer(36160,this.handle),A=t.checkFramebufferStatus(36160);return t.bindFramebuffer(36160,e||null),A}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.color,A=t.depth,n=t.stencil,r=t.drawBuffers,i=void 0===r?[]:r,o=this.gl.bindFramebuffer(36160,this.handle);return(e||A||n)&&Object(B.a)(this.gl,{color:e,depth:A,stencil:n}),i.forEach((function(t,e){Object(B.b)({drawBuffer:e,value:t})})),this.gl.bindFramebuffer(36160,o||null),this}},{key:"readPixels",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return u.k.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 u.k.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 u.k.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 u.k.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 u.k.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 u.k.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}},{key:"invalidate",value:function(t){var e=t.attachments,A=void 0===e?[]:e,n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i,a=t.width,s=t.height,g=Object(u.a)(this.gl),c=g.bindFramebuffer(36008,this.handle);return 0===r&&0===o&&void 0===a&&void 0===s?g.invalidateFramebuffer(36008,A):g.invalidateFramebuffer(36008,A,r,o,a,s),g.bindFramebuffer(36008,c),this}},{key:"getAttachmentParameter",value:function(t,e,A){var n=this._getAttachmentParameterFallback(e);return null===n&&(this.gl.bindFramebuffer(36160,this.handle),n=this.gl.getFramebufferAttachmentParameter(36160,t,e),this.gl.bindFramebuffer(36160,null)),A&&n>1e3&&(n=Object(Q.a)(this.gl,n)),n}},{key:"getAttachmentParameters",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,A=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.constructor.ATTACHMENT_PARAMETERS||[],r={},i=p(n);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=A?Object(Q.a)(this.gl,o):o;r[a]=this.getAttachmentParameter(e,o,A)}}catch(s){i.e(s)}finally{i.f()}return r}},{key:"getParameters",value:function(){for(var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=Object.keys(this.attachments),A={},n=0,r=e;n<r.length;n++){var i=r[n],o=Number(i),a=t?Object(Q.a)(this.gl,o):o;A[a]=this.getAttachmentParameters(o,t)}return A}},{key:"show",value:function(){return"undefined"!==typeof window&&window.open(Object(f.a)(this),"luma-debug-texture"),this}},{key:"log",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t>u.k.level||"undefined"===typeof window)return this;e=e||"Framebuffer ".concat(this.id);var A=Object(f.a)(this,{targetMaxHeight:100});return u.k.image({logLevel:t,message:e,image:A},e)(),this}},{key:"bind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,A=void 0===e?36160:e;return this.gl.bindFramebuffer(A,this.handle),this}},{key:"unbind",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,A=void 0===e?36160:e;return this.gl.bindFramebuffer(A,null),this}},{key:"_createDefaultAttachments",value:function(t,e,A,r,i){var o,a=null;t&&((a=a||{})[36064]=new C.a(this.gl,{id:"".concat(this.id,"-color0"),pixels:null,format:6408,type:5121,width:r,height:i,mipmaps:!1,parameters:(o={},Object(n.a)(o,10241,9729),Object(n.a)(o,10240,9729),Object(n.a)(o,10242,33071),Object(n.a)(o,10243,33071),o)}),this.ownResources.push(a[36064]));return e&&A?((a=a||{})[33306]=new h.a(this.gl,{id:"".concat(this.id,"-depth-stencil"),format:35056,width:r,height:111}),this.ownResources.push(a[33306])):e?((a=a||{})[36096]=new h.a(this.gl,{id:"".concat(this.id,"-depth"),format:33189,width:r,height:i}),this.ownResources.push(a[36096])):A&&Object(E.a)(!1),a}},{key:"_unattach",value:function(t){var e=this.attachments[t];e&&(e instanceof h.a?this.gl.framebufferRenderbuffer(36160,t,36161,null):this.gl.framebufferTexture2D(36160,t,3553,null,0),delete this.attachments[t])}},{key:"_attachRenderbuffer",value:function(t){var e=t.attachment,A=void 0===e?36064:e,n=t.renderbuffer;this.gl.framebufferRenderbuffer(36160,A,36161,n.handle),this.attachments[A]=n}},{key:"_attachTexture",value:function(t){var e=t.attachment,A=void 0===e?36064:e,n=t.texture,r=t.layer,i=t.level,o=this.gl;switch(o.bindTexture(n.target,n.handle),n.target){case 35866:case 32879:Object(u.a)(o).framebufferTextureLayer(36160,A,n.target,i,r);break;case 34067:var a=function(t){return t<34069?t+34069:t}(r);o.framebufferTexture2D(36160,A,a,n.handle,i);break;case 3553:o.framebufferTexture2D(36160,A,3553,n.handle,i);break;default:Object(E.a)(!1,"Illegal texture type")}o.bindTexture(n.target,null),this.attachments[A]=n}},{key:"_setReadBuffer",value:function(t){var e=Object(u.g)(this.gl);e?e.readBuffer(t):Object(E.a)(36064===t||1029===t,"Multiple render targets not supported"),this.readBuffer=t}},{key:"_setDrawBuffers",value:function(t){var e=this.gl,A=Object(u.a)(e);if(A)A.drawBuffers(t);else{var n=e.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(t):Object(E.a)(1===t.length&&(36064===t[0]||1029===t[0]),"Multiple render targets not supported")}this.drawBuffers=t}},{key:"_getAttachmentParameterFallback",value:function(t){var e=Object(d.a)(this.gl);switch(t){case 36052:return e.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return e.WEBGL2?null:8;case 33297:return e.WEBGL2?null:5125;case 33296:return e.WEBGL2||e.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(t){return this.gl.bindFramebuffer(36160,t)}},{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}}]),A}(l.a);function b(t){return(m.STATUS||{})[t]||"Framebuffer error ".concat(t)}m.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},function(t,e,A){"use strict";A.d(e,"a",(function(){return a}));var n=A(5),r=A(4);function i(){}var o={onStart:i,onUpdate:i,onInterrupt:i,onEnd:i},a=function(){function t(e){Object(n.a)(this,t),this._inProgress=!1,this._handle=null,this.timeline=e,this.settings={}}return Object(r.a)(t,[{key:"start",value:function(t){this.cancel(),this.settings=Object.assign({},o,t),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 t=this.timeline,e=this.settings;this._handle=t.addChannel({delay:t.getTime(),duration:e.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}}]),t}()},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"c",(function(){return h})),A.d(e,"b",(function(){return B})),A.d(e,"a",(function(){return f})),A.d(e,"e",(function(){return d})),A.d(e,"f",(function(){return Q})),A.d(e,"d",(function(){return E})),A.d(e,"h",(function(){return p})),A.d(e,"i",(function(){return y})),A.d(e,"j",(function(){return v})),A.d(e,"g",(function(){return m}));var n=A(20),r=A(13),i=A(0),o=A(221),a=A.n(o),s=A(73),g=A(63),c=A(121),I=A(158),u=A(140);function l(t,e){e(t.message),console.warn(t.message),t instanceof c.a&&t.warnInConsole()}function C(t,e,A){t&&e&&Object.entries(t).forEach((function(t){var n=Object(r.a)(t,2),i=n[0],o=n[1],g="set".concat(Object(s.a)(i)),c=e[g],I=A&&A[i];a()(I,u.d[i])&&c&&c(o)}))}function h(t,e){var A=Object(i.useState)(),n=Object(r.a)(A,2),o=n[0],a=n[1];return Object(i.useEffect)((function(){t[e]&&(t[e].description?a(t[e].description):a(null))}),[t,e]),[o]}function B(t,e,A,o,a,s,u){var h=Object(i.useState)({}),B=Object(r.a)(h,2),f=B[0],d=B[1],Q=Object(i.useState)(0),E=Object(r.a)(Q,2),p=E[0],y=E[1],v=Object(g.p)();return Object(i.useEffect)((function(){t[e]&&(t[e].loaders.cells?t[e].loaders.cells.load().catch((function(t){return l(t,v)})).then((function(t){if(t){var e=t.data,r=t.url,i=t.coordinationValues;d(e),y(Object.keys(e).length),o(r,"Cells"),C(Object(n.a)({spatialCellsLayer:I.a},i),s,u),A("cells")}})):(d({}),y(0),a?l(new c.c(e,"cells",null,null),v):A("cells")))}),[t,e]),[f,p]}function f(t,e,A,n,o,a,s){var I=Object(i.useState)(),u=Object(r.a)(I,2),h=u[0],B=u[1],f=Object(g.p)();return Object(i.useEffect)((function(){t[e]&&(t[e].loaders["cell-sets"]?t[e].loaders["cell-sets"].load().catch((function(t){return l(t,f)})).then((function(t){if(t){var e=t.data,r=t.url,i=t.coordinationValues;B(e),n(r,"Cell Sets"),C(i,a,s),A("cell-sets")}})):(B(null),o?l(new c.c(e,"cell-sets",null,null),f):A("cell-sets")))}),[t,e]),[h]}function d(t,e,A,n,o,a,s){var I=Object(i.useState)(),u=Object(r.a)(I,2),h=u[0],B=u[1],f=Object(g.p)();return Object(i.useEffect)((function(){t[e]&&(t[e].loaders["expression-matrix"]?t[e].loaders["expression-matrix"].load().catch((function(t){return l(t,f)})).then((function(t){if(t){var e=t.data,i=t.url,o=t.coordinationValues,g=Object(r.a)(e,2),c=g[0],I=g[1];B({cols:c.cols,rows:c.rows,matrix:I.data}),n(i,"Expression Matrix"),C(o,a,s),A("expression-matrix")}})):(B(null),o?l(new c.c(e,"expression-matrix",null,null),f):A("expression-matrix")))}),[t,e]),[h]}function Q(t,e,A,n,o){var a=Object(i.useState)(),s=Object(r.a)(a,2),I=s[0],u=s[1],C=Object(g.p)();return Object(i.useEffect)((function(){if(t[e])if(o){var i=t[e].loaders["expression-matrix"];if(i)"function"===typeof i.loadGeneSelection?t[e].loaders["expression-matrix"].loadGeneSelection({selection:o}).catch((function(t){return l(t,C)})).then((function(t){if(t){var e=t.data;u(e)}})):i.load().catch((function(t){return l(t,C)})).then((function(t){if(t){var e=t.data,A=Object(r.a)(e,2),n=A[0],i=A[1].data,a=o.map((function(t){for(var e=n.cols.indexOf(t),A=n.cols.length,r=n.rows.length,o=new Uint8Array(r),a=0;a<r;a+=1)o[a]=i[a*A+e];return o}));u(a)}}));else u(null),n?l(new c.c(e,"expression-matrix",null,null),C):A("expression-matrix")}else A("expression-matrix")}),[t,e,o]),[I]}function E(t,e,A,n,o){var a=Object(i.useState)(),s=Object(r.a)(a,2),I=s[0],u=s[1],C=Object(g.p)();return Object(i.useEffect)((function(){if(t[e]){var r=t[e].loaders["expression-matrix"];if(r)"function"===typeof r.loadAttrs?r.loadAttrs().catch((function(t){return l(t,C)})).then((function(t){if(t){var e=t.data,r=t.url;u(e),n(r,"Expression Matrix"),A("expression-matrix")}})):r.load().catch((function(t){return l(t,C)})).then((function(t){if(t){var e=t.data,r=t.url;u(e[0]),n(r,"Expression Matrix"),A("expression-matrix")}}));else u(null),o?l(new c.c(e,"expression-matrix",null,null),C):A("expression-matrix")}}),[t,e]),[I]}function p(t,e,A,o,a,s,u){var h=Object(i.useState)(),B=Object(r.a)(h,2),f=B[0],d=B[1],Q=Object(i.useState)(0),E=Object(r.a)(Q,2),p=E[0],y=E[1],v=Object(i.useState)(0),m=Object(r.a)(v,2),b=m[0],F=m[1],w=Object(g.p)();return Object(i.useEffect)((function(){t[e]&&(t[e].loaders.molecules?t[e].loaders.molecules.load().catch((function(t){return l(t,w)})).then((function(t){if(t){var e=t.data,r=t.url,i=t.coordinationValues;d(e),y(Object.keys(e).length),F(Object.values(e).map((function(t){return t.length})).reduce((function(t,e){return t+e}),0)),o(r,"Molecules"),C(Object(n.a)({spatialMoleculesLayer:I.c},i),s,u),A("molecules")}})):(d({}),y(0),F(0),a?l(new c.c(e,"molecules",null,null),w):A("molecules")))}),[t,e]),[f,p,b]}function y(t,e,A,o,a,s,u){var h=Object(i.useState)(),B=Object(r.a)(h,2),f=B[0],d=B[1],Q=Object(g.p)();return Object(i.useEffect)((function(){t[e]&&(t[e].loaders.neighborhoods?t[e].loaders.neighborhoods.load().catch((function(t){return l(t,Q)})).then((function(t){if(t){var e=t.data,r=t.url,i=t.coordinationValues;d(e),o(r,"Neighborhoods"),C(Object(n.a)({spatialNeighborhoodsLayer:I.d},i),s,u),A("neighborhoods")}})):(d({}),a?l(new c.c(e,"neighborhoods",null,null),Q):A("neighborhoods")))}),[t,e]),[f]}function v(t,e,A,n,o,a,s){var I=Object(i.useState)(),u=Object(r.a)(I,2),h=u[0],B=u[1],f=Object(i.useState)([]),d=Object(r.a)(f,2),Q=d[0],E=d[1],p=Object(i.useState)([]),y=Object(r.a)(p,2),v=y[0],m=y[1],b=Object(g.p)();return Object(i.useEffect)((function(){t[e]&&(t[e].loaders.raster?t[e].loaders.raster.load().catch((function(t){return l(t,b)})).then((function(t){if(t){var e=t.data,i=t.url,o=t.coordinationValues;B(e),i.forEach((function(t){var e=Object(r.a)(t,2),A=e[0],i=e[1];n(A,i)}));var g=e.loaders,c=e.meta;E(g),m(c),C(o,a,s),A("raster")}})):(E([]),m([]),o?l(new c.c(e,"raster",null,null),b):A("raster")))}),[t,e]),[h,Q,v]}function m(t,e,A,n,o,a,s){var I=Object(i.useState)(),u=Object(r.a)(I,2),h=u[0],B=u[1],f=Object(g.p)();return Object(i.useEffect)((function(){t[e]&&(t[e].loaders["genomic-profiles"]?t[e].loaders["genomic-profiles"].load().catch((function(t){return l(t,f)})).then((function(t){if(t){var e=t.data,r=t.url,i=t.coordinationValues;B(e),n(r),C(i,a,s),A("genomic-profiles")}})):(B(null),o?l(new c.c(e,"genomic-profiles",null,null),f):A("genomic-profiles")))}),[t,e]),[h]}},function(t,e,A){"use strict";A.d(e,"b",(function(){return n})),A.d(e,"a",(function(){return r}));var n="vs",r="fs"},function(t,e,A){"use strict";A.r(e);var n=A(864),r=A(527),i=A(402),o=A(752),a=A(865),s=A(364),g=A(603),c=A(5),I=A(4),u=A(14),l=A(16),C=A(7),h=A(1413);function B(t){var e=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(t){return!1}}();return function(){var A,n=Object(C.a)(t);if(e){var r=Object(C.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(l.a)(this,A)}}var f=function(t){Object(u.a)(A,t);var e=B(A);function A(){return Object(c.a)(this,A),e.apply(this,arguments)}return Object(I.a)(A,[{key:"getGeometry",value:function(t){return new h.a}},{key:"draw",value:function(t){var e=t.uniforms,A=this.props,n=A.elevationScale,r=A.extruded,i=A.offset,o=A.coverage,a=A.cellSize,s=A.angle;this.state.model.setUniforms(Object.assign({},e,{radius:a/2,angle:s,offset:i,extruded:r,coverage:o,elevationScale:n,edgeDistance:1,isWireframe:!1})).draw()}}]),A}(g.a);f.layerName="GridCellLayer",f.defaultProps={cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",min:0,value:[1,1]}};var d=A(241),Q=A(602),E=A(751),p=A(365),y=A(280),v=A(405),m=A(251);A.d(e,"ArcLayer",(function(){return n.a})),A.d(e,"BitmapLayer",(function(){return r.a})),A.d(e,"IconLayer",(function(){return i.a})),A.d(e,"LineLayer",(function(){return o.a})),A.d(e,"PointCloudLayer",(function(){return a.a})),A.d(e,"ScatterplotLayer",(function(){return s.a})),A.d(e,"ColumnLayer",(function(){return g.a})),A.d(e,"GridCellLayer",(function(){return f})),A.d(e,"PathLayer",(function(){return d.a})),A.d(e,"PolygonLayer",(function(){return Q.a})),A.d(e,"GeoJsonLayer",(function(){return E.a})),A.d(e,"TextLayer",(function(){return p.a})),A.d(e,"SolidPolygonLayer",(function(){return y.a})),A.d(e,"_MultiIconLayer",(function(){return v.a})),A.d(e,"_binaryToFeature",(function(){return m.a})),A.d(e,"_findIndexBinary",(function(){return m.d}))},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(85);e.getCoord=function(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")},e.getCoords=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")},e.containsNumber=function t(e){if(e.length>1&&n.isNumber(e[0])&&n.isNumber(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return t(e[0]);throw new Error("coordinates must only contain numbers")},e.geojsonType=function(t,e,A){if(!e||!A)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+A+": must be a "+e+", given "+t.type)},e.featureOf=function(t,e,A){if(!t)throw new Error("No feature passed");if(!A)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+A+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+A+": must be a "+e+", given "+t.geometry.type)},e.collectionOf=function(t,e,A){if(!t)throw new Error("No featureCollection passed");if(!A)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+A+", FeatureCollection required");for(var n=0,r=t.features;n<r.length;n++){var i=r[n];if(!i||"Feature"!==i.type||!i.geometry)throw new Error("Invalid input to "+A+", Feature with geometry required");if(!i.geometry||i.geometry.type!==e)throw new Error("Invalid input to "+A+": must be a "+e+", given "+i.geometry.type)}},e.getGeom=function(t){return"Feature"===t.type?t.geometry:t},e.getType=function(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error(e||"loader assertion failed.")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return E}));var n=A(22),r=A(1),i=A(5),o=A(4),a=A(35),s=A(14),g=A(16),c=A(7),I=A(342),u=A(39);function l(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function C(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?l(Object(A),!0).forEach((function(e){Object(r.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):l(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function h(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return B(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return B(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function f(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var d=["longitude","latitude","zoom","bearing","pitch"],Q=["longitude","latitude","zoom"],E=function(t){Object(s.a)(A,t);var e=f(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,A);var r=Array.isArray(n)?n:n.transitionProps;return(t=e.call(this,r||{compare:d,extract:d,required:Q})).opts=n,t}return Object(o.a)(A,[{key:"initializeProps",value:function(t,e){var n=Object(a.a)(Object(c.a)(A.prototype),"initializeProps",this).call(this,t,e),r=this.opts,i=r.makeViewport,o=r.around;if(i&&o){var s=i(t),g=i(e),I=s.unproject(o);n.start.around=o,Object.assign(n.end,{around:g.project(I),aroundLngLat:I,width:e.width,height:e.height})}return n}},{key:"interpolateProps",value:function(t,e,A){var r,i={},o=h(this._propsToExtract);try{for(o.s();!(r=o.n()).done;){var a=r.value;i[a]=Object(u.g)(t[a]||0,e[a]||0,A)}}catch(l){o.e(l)}finally{o.f()}if(e.aroundLngLat){var s=this.opts.makeViewport(C(C({},e),i)).getMapCenterByLngLatPosition({lngLat:e.aroundLngLat,pos:Object(u.g)(t.around,e.around,A)}),g=Object(n.a)(s,2),c=g[0],I=g[1];i.longitude=c,i.latitude=I}return i}}]),A}(I.a)},function(t,e,A){"use strict";var n=A(22),r=A(29),i=A(5),o=A(4),a=A(133),s=A(191);function g(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return c(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return c(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var I=function(){function t(e,A,n){Object(i.a)(this,t),this.x=e,this.y=A,this.z=n}return Object(o.a)(t,[{key:"update",value:function(t){var e=t.viewport,A=t.cullingVolume,n=t.elevationBounds,r=t.minZ,i=t.maxZ,o=t.offset,a=t.project,s=this.getBoundingVolume(n,o,a);if(A.computeVisibility(s)<0)return!1;if(!this.childVisible){var c=this.z;if(c<i&&c>=r){var I=s.distanceTo(e.cameraPosition)*e.scale/e.height;c+=Math.floor(Math.log2(I))}if(c>=i)return this.selected=!0,!0}this.selected=!1,this.childVisible=!0;var u,l=g(this.children);try{for(l.s();!(u=l.n()).done;){u.value.update(t)}}catch(C){l.e(C)}finally{l.f()}return!0}},{key:"getSelected",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(this.selected&&t.push(this),this._children){var e,A=g(this._children);try{for(A.s();!(e=A.n()).done;){var n=e.value;n.getSelected(t)}}catch(r){A.e(r)}finally{A.f()}}return t}},{key:"getBoundingVolume",value:function(t,e,A){if(A){var n=f(this.x,this.y,this.z),r=f(this.x+1,this.y+1,this.z),i=f(this.x+.5,this.y+.5,this.z);n.z=t[1],r.z=t[1],i.z=t[0];var o=A(n),g=A(r),c=new s.b(A(i)),I=Math.max(c.distance(o),c.distance(g));return new a.b(c,I)}var u=512/Math.pow(2,this.z),l=this.x*u+512*e,C=512-(this.y+1)*u;return new a.a([l,C,t[0]],[l+u,C+u,t[1]])}},{key:"children",get:function(){if(!this._children){var e=2*this.x,A=2*this.y,n=this.z+1;this._children=[new t(e,A,n),new t(e,A+1,n),new t(e+1,A,n),new t(e+1,A+1,n)]}return this._children}}]),t}();A.d(e,"f",(function(){return l})),A.d(e,"b",(function(){return h})),A.d(e,"d",(function(){return f})),A.d(e,"e",(function(){return Q})),A.d(e,"a",(function(){return p})),A.d(e,"c",(function(){return y}));var u=[-1/0,-1/0,1/0,1/0],l={type:"url",value:"",validate:function(t){return"string"===typeof t||Array.isArray(t)&&t.every((function(t){return"string"===typeof t}))},equals:function(t,e){if(t===e)return!0;if(!Array.isArray(t)||!Array.isArray(e))return!1;var A=t.length;if(A!==e.length)return!1;for(var n=0;n<A;n++)if(t[n]!==e[n])return!1;return!0}};function C(t,e){var A=[e.transformPoint([t[0],t[1]]),e.transformPoint([t[2],t[1]]),e.transformPoint([t[0],t[3]]),e.transformPoint([t[2],t[3]])];return[Math.min.apply(Math,Object(r.a)(A.map((function(t){return t[0]})))),Math.min.apply(Math,Object(r.a)(A.map((function(t){return t[1]})))),Math.max.apply(Math,Object(r.a)(A.map((function(t){return t[0]})))),Math.max.apply(Math,Object(r.a)(A.map((function(t){return t[1]}))))]}function h(t,e){if(!t||!t.length)return null;Array.isArray(t)&&(t=t[Math.abs(e.x+e.y)%t.length]);var A=e.x,n=e.y,r=e.z;return t.replace("{x}",A).replace("{y}",n).replace("{z}",r).replace("{-y}",Math.pow(2,r)-n-1)}function B(t){return Math.pow(2,t)}function f(t,e,A){var n=B(A),r=t/n*360-180,i=Math.PI-2*Math.PI*e/n;return[r,180/Math.PI*Math.atan(.5*(Math.exp(i)-Math.exp(-i)))]}function d(t,e,A){var n=B(A);return[t/n*512,e/n*512]}function Q(t,e,A,r){if(t.isGeospatial){var i=f(e,A,r),o=Object(n.a)(i,2),a=o[0],s=o[1],g=f(e+1,A+1,r),c=Object(n.a)(g,2);return{west:a,north:s,east:c[0],south:c[1]}}var I=d(e,A,r),u=Object(n.a)(I,2),l=u[0],C=u[1],h=d(e+1,A+1,r),B=Object(n.a)(h,2);return{left:l,top:C,right:B[0],bottom:B[1]}}function E(t,e,A,r){for(var i=function(t,e,A){return A?C(t,A).map((function(t){return t*e/512})):t.map((function(t){return t*e/512}))}(function(t,e,A){var r;if(e&&2===e.length){var i=Object(n.a)(e,2),o=i[0],a=i[1],s=t.getBounds({z:o}),g=t.getBounds({z:a});r=[Math.min(s[0],g[0]),Math.min(s[1],g[1]),Math.max(s[2],g[2]),Math.max(s[3],g[3])]}else r=t.getBounds();return t.isGeospatial?[Math.max(r[0],A[0]),Math.max(r[1],A[1]),Math.min(r[2],A[2]),Math.min(r[3],A[3])]:[Math.max(Math.min(r[0],A[2]),A[0]),Math.max(Math.min(r[1],A[3]),A[1]),Math.min(Math.max(r[2],A[0]),A[2]),Math.min(Math.max(r[3],A[1]),A[3])]}(t,null,A),B(e),r),o=Object(n.a)(i,4),a=o[0],s=o[1],g=o[2],c=o[3],I=[],u=Math.floor(a);u<g;u++)for(var l=Math.floor(s);l<c;l++)I.push({x:u,y:l,z:e});return I}function p(t){var e=t.viewport,A=t.maxZoom,n=t.minZoom,r=t.zRange,i=t.extent,o=t.tileSize,s=void 0===o?512:o,g=t.modelMatrix,c=t.modelMatrixInverse,l=Math.round(e.zoom+Math.log2(512/s));if(Number.isFinite(n)&&l<n){if(!i)return[];l=n}Number.isFinite(A)&&l>A&&(l=A);var h=i;return g&&c&&i&&!e.isGeospatial&&(h=C(i,g)),e.isGeospatial?function(t,e,A){var n=t.resolution?t.projectPosition:null,r=Object.values(t.getFrustumPlanes()).map((function(t){var e=t.normal,A=t.distance;return new a.e(e.clone().negate(),A)})),i=new a.c(r),o=t.distanceScales.unitsPerMeter[2],s=A&&A[0]*o||0,g=A&&A[1]*o||0,c=t.pitch<=60?e:0,u=new I(0,0,0),l={viewport:t,project:n,cullingVolume:i,elevationBounds:[s,g],minZ:c,maxZ:e,offset:0};if(u.update(l),t.subViewports&&t.subViewports.length>1){for(l.offset=-1;u.update(l)&&!(--l.offset<-3););for(l.offset=1;u.update(l)&&!(++l.offset>3););}return u.getSelected()}(e,l,r):E(e,l,h||u,c)}function y(t){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(t)}},function(t,e,A){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};return Array.isArray(t)?r(t,e,[]):e(t)?[t]:[]}function r(t,e,A){for(var n=-1;++n<t.length;){var i=t[n];Array.isArray(i)?r(i,e,A):e(i)&&A.push(i)}return A}function i(t){for(var e=t.target,A=t.source,n=t.start,r=void 0===n?0:n,i=t.count,o=void 0===i?1:i,a=A.length,s=o*a,g=0,c=r;g<a;g++)e[c++]=A[g];for(;g<s;)g<s-g?(e.copyWithin(r+g,r,r+g),g*=2):(e.copyWithin(r+g,r,r+s-g),g=s);return e}A.d(e,"b",(function(){return n})),A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";A.d(e,"g",(function(){return r})),A.d(e,"e",(function(){return i})),A.d(e,"f",(function(){return o})),A.d(e,"c",(function(){return a})),A.d(e,"a",(function(){return s})),A.d(e,"d",(function(){return g})),A.d(e,"b",(function(){return c}));var n=A(123),r=["z","t"],i="Min/Max",o={visible:!0,colormap:null,opacity:1,domainType:i,transparentColor:[0,0,0],renderingMode:n.e.ADDITIVE,use3d:!1},a={opacity:1,radius:20,visible:!0},s={opacity:1,radius:50,visible:!0,stroked:!1},g={visible:!1},c=["molecules","cells","neighborhoods","raster"]},function(t,e,A){"use strict";e.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(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(209);function r(t,e){if(t){if("string"===typeof t)return Object(n.a)(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Object(n.a)(t,e):void 0}}},function(t,e,A){"use strict";var n=":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",r="["+n+"][: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]*",i=new RegExp("^"+r+"$");e.isExist=function(t){return"undefined"!==typeof t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,A){if(e)for(var n=Object.keys(e),r=n.length,i=0;i<r;i++)t[n[i]]="strict"===A?[e[n[i]]]:e[n[i]]},e.getValue=function(t){return e.isExist(t)?t:""},e.buildOptions=function(t,e,A){var n={};if(!t)return e;for(var r=0;r<A.length;r++)void 0!==t[A[r]]?n[A[r]]=t[A[r]]:n[A[r]]=e[A[r]];return n},e.isTagNameInArrayMode=function(t,e,A){return!1!==e&&(e instanceof RegExp?e.test(t):"function"===typeof e?!!e(t,A):"strict"===e)},e.isName=function(t){var e=i.exec(t);return!(null===e||"undefined"===typeof e)},e.getAllMatches=function(t,e){for(var A=[],n=e.exec(t);n;){for(var r=[],i=n.length,o=0;o<i;o++)r.push(n[o]);A.push(r),n=e.exec(t)}return A},e.nameRegexp=r},function(t,e,A){"use strict";A.d(e,"c",(function(){return s})),A.d(e,"a",(function(){return g})),A.d(e,"b",(function(){return c}));var n,r=A(22),i=A(1),o=A(49),a=(n={},Object(i.a)(n,5126,[5126,1,"float"]),Object(i.a)(n,35664,[5126,2,"vec2"]),Object(i.a)(n,35665,[5126,3,"vec3"]),Object(i.a)(n,35666,[5126,4,"vec4"]),Object(i.a)(n,5124,[5124,1,"int"]),Object(i.a)(n,35667,[5124,2,"ivec2"]),Object(i.a)(n,35668,[5124,3,"ivec3"]),Object(i.a)(n,35669,[5124,4,"ivec4"]),Object(i.a)(n,5125,[5125,1,"uint"]),Object(i.a)(n,36294,[5125,2,"uvec2"]),Object(i.a)(n,36295,[5125,3,"uvec3"]),Object(i.a)(n,36296,[5125,4,"uvec4"]),Object(i.a)(n,35670,[5126,1,"bool"]),Object(i.a)(n,35671,[5126,2,"bvec2"]),Object(i.a)(n,35672,[5126,3,"bvec3"]),Object(i.a)(n,35673,[5126,4,"bvec4"]),Object(i.a)(n,35674,[5126,8,"mat2"]),Object(i.a)(n,35685,[5126,8,"mat2x3"]),Object(i.a)(n,35686,[5126,8,"mat2x4"]),Object(i.a)(n,35675,[5126,12,"mat3"]),Object(i.a)(n,35687,[5126,12,"mat3x2"]),Object(i.a)(n,35688,[5126,12,"mat3x4"]),Object(i.a)(n,35676,[5126,16,"mat4"]),Object(i.a)(n,35689,[5126,16,"mat4x2"]),Object(i.a)(n,35690,[5126,16,"mat4x3"]),n);function s(t){switch(t){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 g(t){var e=a[t];if(!e)return null;var A=Object(r.a)(e,2);return{type:A[0],components:A[1]}}function c(t,e){switch(t){case 5120:case 5121:case 5122:case 5123:t=5126}for(var A in a){var n=Object(r.a)(a[A],3),i=n[0],o=n[1],s=n[2];if(i===t&&o===e)return{glType:A,name:s}}return null}},function(t,e,A){"use strict";A.d(e,"a",(function(){return a})),A.d(e,"b",(function(){return s}));var n=A(1),r=A(141);function i(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function o(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?i(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):i(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function a(t){if(!t)return!1;Array.isArray(t)&&(t=t[0]);var e=t.parseTextSync||t.parseSync||t.parse||t.parseStream||t.parseInBatches,A=t.options&&t.options[t.id];return e=e||A&&A.workerUrl}function s(t){var e;return Object(r.a)(t,"null loader"),Object(r.a)(a(t),"invalid loader"),Array.isArray(t)&&(e=t[1],t=o(o({},t=t[0]),{},{options:o(o({},t.options),e)})),t.extension&&(t.extensions=t.extensions||t.extension,delete t.extension),Array.isArray(t.extensions)||(t.extensions=[t.extensions]),Object(r.a)(t.extensions&&t.extensions.length>0&&t.extensions[0]),(t.parseTextSync||t.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}},function(t,e,A){"use strict";var n=A(1),r=A(964),i=A(52),o=A(6),a=A.n(o),s=A(11),g="",c={};function I(t){for(var e in c)if(t.startsWith(e)){var A=c[e];t=t.replace(e,A)}return t.startsWith("http://")||t.startsWith("https://")||(t="".concat(g).concat(t)),t}var u=A(198);function l(t){return C.apply(this,arguments)}function C(){return(C=Object(s.a)(a.a.mark((function t(e){var A;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,!e.headers.get("Content-Type").includes("application/json")){t.next=10;break}return t.t0=A,t.next=7,e.text();case 7:A=t.t0+=t.sent,t.next=11;break;case 10:A+=e.statusText;case 11:t.next=16;break;case 13:return t.prev=13,t.t1=t.catch(1),t.abrupt("return",A);case 16:return t.abrupt("return",A);case 17:case"end":return t.stop()}}),t,null,[[1,13]])})))).apply(this,arguments)}function h(t){return B.apply(this,arguments)}function B(){return(B=Object(s.a)(a.a.mark((function t(e){var A,n,r=arguments;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=r.length>1&&void 0!==r[1]?r[1]:{},"string"===typeof e){t.next=5;break}return t.next=4,Object(u.b)(e);case 4:return t.abrupt("return",t.sent);case 5:return e=I(e),t.next=8,fetch(e,A);case 8:if((n=t.sent).ok||!A.throws){t.next=15;break}return t.t0=Error,t.next=13,l(n);case 13:throw t.t1=t.sent,new t.t0(t.t1);case 15:return t.abrupt("return",n);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var f=A(5),d=A(4),Q=function(){function t(){Object(f.a)(this,t)}return Object(d.a)(t,[{key:"log",value:function(){return function(t){}}},{key:"info",value:function(){return function(t){}}},{key:"warn",value:function(){return function(t){}}},{key:"error",value:function(){return function(t){}}}]),t}(),E=function(){function t(){Object(f.a)(this,t),this.console=console}return Object(d.a)(t,[{key:"log",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.log).bind.apply(t,[this.console].concat(A))}},{key:"info",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.info).bind.apply(t,[this.console].concat(A))}},{key:"warn",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.warn).bind.apply(t,[this.console].concat(A))}},{key:"error",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.error).bind.apply(t,[this.console].concat(A))}}]),t}();function p(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return y(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return y(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function v(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function m(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?v(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):v(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}A.d(e,"b",(function(){return w})),A.d(e,"c",(function(){return D})),A.d(e,"a",(function(){return R}));var b={baseUri:"",fetch:null,CDN:"https://unpkg.com/@loaders.gl",worker:!0,log:new E,metadata:!1,transforms:[],reuseWorkers:!0},F={dataType:"(no longer used)",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(){r.a.loaders=r.a.loaders||{};var t=r.a.loaders;return t._state=t._state||{},t._state},S=function(){var t=w();return t.globalOptions=t.globalOptions||m({},b),t.globalOptions};function D(t,e,A,n){return A=A||[],function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console;U(t,null,A,b,F,e);var n,r=p(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=t&&t[i.id]||{},a=i.options&&i.options[i.id]||{},s=i.defaultOptions&&i.defaultOptions[i.id]||{};U(o,i.id,A,a,s,e)}}catch(g){r.e(g)}finally{r.f()}}(t,A=Array.isArray(A)?A:[A]),N(e,t,n)}function R(t,e){var A=S(),n=t.fetch||A.fetch;return"function"===typeof n?n:Object(i.f)(n)?function(t){return h(t,n)}:e&&e.fetch?e.fetch:function(e){return h(e,t)}}function U(t,e,A,n,r,o){var a=e||"Top level",s=e?"".concat(e,"."):"";for(var g in t){var c=!e&&Object(i.f)(t[g]);if(!(g in n))if(g in r)A.warn("".concat(a," loader option '").concat(s).concat(g,"' deprecated, use '").concat(r[g],"'"));else if(!c){var I=G(g,o);A.warn("".concat(a," loader option '").concat(s).concat(g,"' not recognized. ").concat(I))}}}function G(t,e){var A,n=t.toLowerCase(),r="",i=p(e);try{for(i.s();!(A=i.n()).done;){var o=A.value;for(var a in o.options){if(t===a)return"Did you mean '".concat(o.id,".").concat(a,"'?");var s=a.toLowerCase();(n.startsWith(s)||s.startsWith(n))&&(r=r||"Did you mean '".concat(o.id,".").concat(a,"'?"))}}}catch(g){i.e(g)}finally{i.f()}return r}function N(t,e,A){var n=m({},t.options||{});return null===n.log&&(n.log=new Q),k(n,S()),k(n,e),function(t,e){e&&!t.baseUri&&(t.baseUri=e)}(n,A),n}function k(t,e){for(var A in e)if(A in e){var n=e[A];Object(i.g)(n)&&Object(i.g)(t[A])?t[A]=m(m({},t[A]),e[A]):t[A]=e[A]}}},function(t,e,A){"use strict";A.d(e,"b",(function(){return s})),A.d(e,"a",(function(){return g})),A.d(e,"c",(function(){return c})),A.d(e,"d",(function(){return I})),A.d(e,"e",(function(){return u}));var n,r,i,o=A(1),a=A(19),s=(n={},Object(o.a)(n,6407,{dataFormat:6407,types:[5121,33635]}),Object(o.a)(n,6408,{dataFormat:6408,types:[5121,32819,32820]}),Object(o.a)(n,6406,{dataFormat:6406,types:[5121]}),Object(o.a)(n,6409,{dataFormat:6409,types:[5121]}),Object(o.a)(n,6410,{dataFormat:6410,types:[5121]}),Object(o.a)(n,33326,{dataFormat:6403,types:[5126],gl2:!0}),Object(o.a)(n,33328,{dataFormat:33319,types:[5126],gl2:!0}),Object(o.a)(n,34837,{dataFormat:6407,types:[5126],gl2:!0}),Object(o.a)(n,34836,{dataFormat:6408,types:[5126],gl2:!0}),n),g=(r={},Object(o.a)(r,6403,1),Object(o.a)(r,36244,1),Object(o.a)(r,33319,2),Object(o.a)(r,33320,2),Object(o.a)(r,6407,3),Object(o.a)(r,36248,3),Object(o.a)(r,6408,4),Object(o.a)(r,36249,4),Object(o.a)(r,6402,1),Object(o.a)(r,34041,1),Object(o.a)(r,6406,1),Object(o.a)(r,6409,1),Object(o.a)(r,6410,2),r),c=(i={},Object(o.a)(i,5126,4),Object(o.a)(i,5125,4),Object(o.a)(i,5124,4),Object(o.a)(i,5123,2),Object(o.a)(i,5122,2),Object(o.a)(i,5131,2),Object(o.a)(i,5120,1),Object(o.a)(i,5121,1),i);function I(t,e){var A=s[e];if(!A)return!1;if(void 0===A.gl1&&void 0===A.gl2)return!0;var n=Object(a.j)(t)&&A.gl2||A.gl1;return"string"===typeof n?t.getExtension(n):n}function u(t,e){var A=s[e];switch(A&&A.types[0]){case 5126:return t.getExtension("OES_texture_float_linear");case 5131:return t.getExtension("OES_texture_half_float_linear");default:return!0}}},function(t,e,A){"use strict";(function(t,n){var r=A(21),i=A(2),o=A.n(i),a=A(8),s=A(9),g=A(15),c=A(44);A.d(e,"a",(function(){return c.a})),A.d(e,"b",(function(){return c.b})),A.d(e,"c",(function(){return c.c})),A.d(e,"d",(function(){return c.e})),A.d(e,"e",(function(){return c.f}));function I(t){for(var e=t.length;--e>=0;)t[e]=0}var u=new Uint8Array([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]),l=new Uint8Array([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]),C=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),B=new Array(576);I(B);var f=new Array(60);I(f);var d=new Array(512);I(d);var Q=new Array(256);I(Q);var E=new Array(29);I(E);var p,y,v,m=new Array(30);function b(t,e,A,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=A,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function F(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}I(m);var w=function(t){return t<256?d[t]:d[256+(t>>>7)]},S=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},D=function(t,e,A){t.bi_valid>16-A?(t.bi_buf|=e<<t.bi_valid&65535,S(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=A-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=A)},R=function(t,e,A){D(t,A[2*e],A[2*e+1])},U=function(t,e){var A=0;do{A|=1&t,t>>>=1,A<<=1}while(--e>0);return A>>>1},G=function(t,e,A){var n,r,i=new Array(16),o=0;for(n=1;n<=15;n++)i[n]=o=o+A[n-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=U(i[a]++,a))}},N=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},k=function(t){t.bi_valid>8?S(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},x=function(t,e,A,n){var r=2*e,i=2*A;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[A]},O=function(t,e,A){for(var n=t.heap[A],r=A<<1;r<=t.heap_len&&(r<t.heap_len&&x(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!x(e,n,t.heap[r],t.depth));)t.heap[A]=t.heap[r],A=r,r<<=1;t.heap[A]=n},M=function(t,e,A){var n,r,i,o,a=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],r=t.pending_buf[t.l_buf+a],a++,0===n?R(t,r,e):(i=Q[r],R(t,i+256+1,e),0!==(o=u[i])&&(r-=E[i],D(t,r,o)),n--,i=w(n),R(t,i,A),0!==(o=l[i])&&(n-=m[i],D(t,n,o)))}while(a<t.last_lit);R(t,256,e)},L=function(t,e){var A,n,r,i=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.elems,g=-1;for(t.heap_len=0,t.heap_max=573,A=0;A<s;A++)0!==i[2*A]?(t.heap[++t.heap_len]=g=A,t.depth[A]=0):i[2*A+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=g<2?++g:0)]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=o[2*r+1]);for(e.max_code=g,A=t.heap_len>>1;A>=1;A--)O(t,i,A);r=s;do{A=t.heap[1],t.heap[1]=t.heap[t.heap_len--],O(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=A,t.heap[--t.heap_max]=n,i[2*r]=i[2*A]+i[2*n],t.depth[r]=(t.depth[A]>=t.depth[n]?t.depth[A]:t.depth[n])+1,i[2*A+1]=i[2*n+1]=r,t.heap[1]=r++,O(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var A,n,r,i,o,a,s=e.dyn_tree,g=e.max_code,c=e.stat_desc.static_tree,I=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,C=e.stat_desc.max_length,h=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(s[2*t.heap[t.heap_max]+1]=0,A=t.heap_max+1;A<573;A++)(i=s[2*s[2*(n=t.heap[A])+1]+1]+1)>C&&(i=C,h++),s[2*n+1]=i,n>g||(t.bl_count[i]++,o=0,n>=l&&(o=u[n-l]),a=s[2*n],t.opt_len+=a*(i+o),I&&(t.static_len+=a*(c[2*n+1]+o)));if(0!==h){do{for(i=C-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[C]--,h-=2}while(h>0);for(i=C;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--A])>g||(s[2*r+1]!==i&&(t.opt_len+=(i-s[2*r+1])*s[2*r],s[2*r+1]=i),n--)}}(t,e),G(i,g,t.bl_count)},_=function(t,e,A){var n,r,i=-1,o=e[1],a=0,s=7,g=4;for(0===o&&(s=138,g=3),e[2*(A+1)+1]=65535,n=0;n<=A;n++)r=o,o=e[2*(n+1)+1],++a<s&&r===o||(a<g?t.bl_tree[2*r]+=a:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,i=r,0===o?(s=138,g=3):r===o?(s=6,g=3):(s=7,g=4))},J=function(t,e,A){var n,r,i=-1,o=e[1],a=0,s=7,g=4;for(0===o&&(s=138,g=3),n=0;n<=A;n++)if(r=o,o=e[2*(n+1)+1],!(++a<s&&r===o)){if(a<g)do{R(t,r,t.bl_tree)}while(0!==--a);else 0!==r?(r!==i&&(R(t,r,t.bl_tree),a--),R(t,16,t.bl_tree),D(t,a-3,2)):a<=10?(R(t,17,t.bl_tree),D(t,a-3,3)):(R(t,18,t.bl_tree),D(t,a-11,7));a=0,i=r,0===o?(s=138,g=3):r===o?(s=6,g=3):(s=7,g=4)}},T=!1,j=function(t,e,A,n){D(t,0+(n?1:0),3),function(t,e,A,n){k(t),n&&(S(t,A),S(t,~A)),t.pending_buf.set(t.window.subarray(e,e+A),t.pending),t.pending+=A}(t,e,A,!0)},H={_tr_init:function(t){T||(!function(){var t,e,A,n,r,i=new Array(16);for(A=0,n=0;n<28;n++)for(E[n]=A,t=0;t<1<<u[n];t++)Q[A++]=n;for(Q[A-1]=n,r=0,n=0;n<16;n++)for(m[n]=r,t=0;t<1<<l[n];t++)d[r++]=n;for(r>>=7;n<30;n++)for(m[n]=r<<7,t=0;t<1<<l[n]-7;t++)d[256+r++]=n;for(e=0;e<=15;e++)i[e]=0;for(t=0;t<=143;)B[2*t+1]=8,t++,i[8]++;for(;t<=255;)B[2*t+1]=9,t++,i[9]++;for(;t<=279;)B[2*t+1]=7,t++,i[7]++;for(;t<=287;)B[2*t+1]=8,t++,i[8]++;for(G(B,287,i),t=0;t<30;t++)f[2*t+1]=5,f[2*t]=U(t,5);p=new b(B,u,257,286,15),y=new b(f,l,0,30,15),v=new b(new Array(0),C,0,19,7)}(),T=!0),t.l_desc=new F(t.dyn_ltree,p),t.d_desc=new F(t.dyn_dtree,y),t.bl_desc=new F(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,N(t)},_tr_stored_block:j,_tr_flush_block:function(t,e,A,n){var r,i,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,A=4093624447;for(e=0;e<=31;e++,A>>>=1)if(1&A&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),L(t,t.l_desc),L(t,t.d_desc),o=function(t){var e;for(_(t,t.dyn_ltree,t.l_desc.max_code),_(t,t.dyn_dtree,t.d_desc.max_code),L(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=A+5,A+4<=r&&-1!==e?j(t,e,A,n):4===t.strategy||i===r?(D(t,2+(n?1:0),3),M(t,B,f)):(D(t,4+(n?1:0),3),function(t,e,A,n){var r;for(D(t,e-257,5),D(t,A-1,5),D(t,n-4,4),r=0;r<n;r++)D(t,t.bl_tree[2*h[r]+1],3);J(t,t.dyn_ltree,e-1),J(t,t.dyn_dtree,A-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),M(t,t.dyn_ltree,t.dyn_dtree)),N(t),n&&k(t)},_tr_tally:function(t,e,A){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&A,t.last_lit++,0===e?t.dyn_ltree[2*A]++:(t.matches++,e--,t.dyn_ltree[2*(Q[A]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){D(t,2,3),R(t,256,B),function(t){16===t.bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},Y=function(t,e,A,n){for(var r=65535&t|0,i=t>>>16&65535|0,o=0;0!==A;){A-=o=A>2e3?2e3:A;do{i=i+(r=r+e[n++]|0)|0}while(--o);r%=65521,i%=65521}return r|i<<16|0},V=new Uint32Array(function(){for(var t,e=[],A=0;A<256;A++){t=A;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[A]=t}return e}()),Z=function(t,e,A,n){var r=V,i=n+A;t^=-1;for(var o=n;o<i;o++)t=t>>>8^r[255&(t^e[o])];return-1^t},W={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"},K={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_MEM_ERROR:-4,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},P=H._tr_init,q=H._tr_stored_block,X=H._tr_flush_block,z=H._tr_tally,$=H._tr_align,tt=K.Z_NO_FLUSH,et=K.Z_PARTIAL_FLUSH,At=K.Z_FULL_FLUSH,nt=K.Z_FINISH,rt=K.Z_BLOCK,it=K.Z_OK,ot=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,st=K.Z_DATA_ERROR,gt=K.Z_BUF_ERROR,ct=K.Z_DEFAULT_COMPRESSION,It=K.Z_FILTERED,ut=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,Ct=K.Z_FIXED,ht=K.Z_DEFAULT_STRATEGY,Bt=K.Z_UNKNOWN,ft=K.Z_DEFLATED,dt=function(t,e){return t.msg=W[e],e},Qt=function(t){return(t<<1)-(t>4?9:0)},Et=function(t){for(var e=t.length;--e>=0;)t[e]=0},pt=function(t,e,A){return(e<<t.hash_shift^A)&t.hash_mask},yt=function(t){var e=t.state,A=e.pending;A>t.avail_out&&(A=t.avail_out),0!==A&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+A),t.next_out),t.next_out+=A,e.pending_out+=A,t.total_out+=A,t.avail_out-=A,e.pending-=A,0===e.pending&&(e.pending_out=0))},vt=function(t,e){X(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,yt(t.strm)},mt=function(t,e){t.pending_buf[t.pending++]=e},bt=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Ft=function(t,e,A,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),A),1===t.state.wrap?t.adler=Y(t.adler,e,r,A):2===t.state.wrap&&(t.adler=Z(t.adler,e,r,A)),t.next_in+=r,t.total_in+=r,r)},wt=function(t,e){var A,n,r=t.max_chain_length,i=t.strstart,o=t.prev_length,a=t.nice_match,s=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,g=t.window,c=t.w_mask,I=t.prev,u=t.strstart+258,l=g[i+o-1],C=g[i+o];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(g[(A=e)+o]===C&&g[A+o-1]===l&&g[A]===g[i]&&g[++A]===g[i+1]){i+=2,A++;do{}while(g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&i<u);if(n=258-(u-i),i=u-258,n>o){if(t.match_start=e,o=n,n>=a)break;l=g[i+o-1],C=g[i+o]}}}while((e=I[e&c])>s&&0!==--r);return o<=t.lookahead?o:t.lookahead},St=function(t){var e,A,n,r,i,o=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=o+(o-262)){t.window.set(t.window.subarray(o,o+o),0),t.match_start-=o,t.strstart-=o,t.block_start-=o,e=A=t.hash_size;do{n=t.head[--e],t.head[e]=n>=o?n-o:0}while(--A);e=A=o;do{n=t.prev[--e],t.prev[e]=n>=o?n-o:0}while(--A);r+=o}if(0===t.strm.avail_in)break;if(A=Ft(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=A,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=pt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=pt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},Dt=function(t,e){for(var A,n;;){if(t.lookahead<262){if(St(t),t.lookahead<262&&e===tt)return 1;if(0===t.lookahead)break}if(A=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==A&&t.strstart-A<=t.w_size-262&&(t.match_length=wt(t,A)),t.match_length>=3)if(n=z(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=pt(t,t.ins_h,t.window[t.strstart+1]);else n=z(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(vt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(vt(t,!1),0===t.strm.avail_out)?1:2},Rt=function(t,e){for(var A,n,r;;){if(t.lookahead<262){if(St(t),t.lookahead<262&&e===tt)return 1;if(0===t.lookahead)break}if(A=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==A&&t.prev_length<t.max_lazy_match&&t.strstart-A<=t.w_size-262&&(t.match_length=wt(t,A),t.match_length<=5&&(t.strategy===It||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=z(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(vt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=z(t,0,t.window[t.strstart-1]))&&vt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=z(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(vt(t,!1),0===t.strm.avail_out)?1:2};function Ut(t,e,A,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=A,this.max_chain=n,this.func=r}var Gt=[new Ut(0,0,0,0,(function(t,e){var A=65535;for(A>t.pending_buf_size-5&&(A=t.pending_buf_size-5);;){if(t.lookahead<=1){if(St(t),0===t.lookahead&&e===tt)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+A;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,vt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(vt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(vt(t,!1),t.strm.avail_out),1)})),new Ut(4,4,8,4,Dt),new Ut(4,5,16,8,Dt),new Ut(4,6,32,32,Dt),new Ut(4,4,16,16,Rt),new Ut(8,16,32,32,Rt),new Ut(8,16,128,128,Rt),new Ut(8,32,128,256,Rt),new Ut(32,128,258,1024,Rt),new Ut(32,258,258,4096,Rt)];function Nt(){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=ft,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 Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Et(this.dyn_ltree),Et(this.dyn_dtree),Et(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Et(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Et(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}var kt=function(t){if(!t||!t.state)return dt(t,at);t.total_in=t.total_out=0,t.data_type=Bt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=tt,P(e),it},xt=function(t){var e,A=kt(t);return A===it&&((e=t.state).window_size=2*e.w_size,Et(e.head),e.max_lazy_match=Gt[e.level].max_lazy,e.good_match=Gt[e.level].good_length,e.nice_match=Gt[e.level].nice_length,e.max_chain_length=Gt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),A},Ot=function(t,e,A,n,r,i){if(!t)return at;var o=1;if(e===ct&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>9||A!==ft||n<8||n>15||e<0||e>9||i<0||i>Ct)return dt(t,at);8===n&&(n=9);var a=new Nt;return t.state=a,a.strm=t,a.wrap=o,a.gzhead=null,a.w_bits=n,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=r+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<r+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=e,a.strategy=i,a.method=A,xt(t)},Mt={deflateInit:function(t,e){return Ot(t,e,ft,15,8,ht)},deflateInit2:Ot,deflateReset:xt,deflateResetKeep:kt,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?at:(t.state.gzhead=e,it):at},deflate:function(t,e){var A,n;if(!t||!t.state||e>rt||e<0)return t?dt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||666===r.status&&e!==nt)return dt(t,0===t.avail_out?gt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.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>=ut||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&&(t.adler=Z(t.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>=ut||r.level<2?4:0),mt(r,3),r.status=113);else{var o=ft+(r.w_bits-8<<4)<<8;o|=(r.strategy>=ut||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,bt(r,o),0!==r.strstart&&(bt(r,t.adler>>>16),bt(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(A=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),yt(t),A=r.pending,r.pending!==r.pending_buf_size));)mt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){A=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),yt(t),A=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,mt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){A=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),yt(t),A=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,mt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),0===n&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&yt(t),r.pending+2<=r.pending_buf_size&&(mt(r,255&t.adler),mt(r,t.adler>>8&255),t.adler=0,r.status=113)):r.status=113),0!==r.pending){if(yt(t),0===t.avail_out)return r.last_flush=-1,it}else if(0===t.avail_in&&Qt(e)<=Qt(i)&&e!==nt)return dt(t,gt);if(666===r.status&&0!==t.avail_in)return dt(t,gt);if(0!==t.avail_in||0!==r.lookahead||e!==tt&&666!==r.status){var a=r.strategy===ut?function(t,e){for(var A;;){if(0===t.lookahead&&(St(t),0===t.lookahead)){if(e===tt)return 1;break}if(t.match_length=0,A=z(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,A&&(vt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(vt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===lt?function(t,e){for(var A,n,r,i,o=t.window;;){if(t.lookahead<=258){if(St(t),t.lookahead<=258&&e===tt)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=o[r=t.strstart-1])===o[++r]&&n===o[++r]&&n===o[++r]){i=t.strstart+258;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<i);t.match_length=258-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(A=z(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(A=z(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),A&&(vt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(vt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Gt[r.level].func(r,e);if(3!==a&&4!==a||(r.status=666),1===a||3===a)return 0===t.avail_out&&(r.last_flush=-1),it;if(2===a&&(e===et?$(r):e!==rt&&(q(r,0,0,!1),e===At&&(Et(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),yt(t),0===t.avail_out))return r.last_flush=-1,it}return e!==nt?it:r.wrap<=0?ot:(2===r.wrap?(mt(r,255&t.adler),mt(r,t.adler>>8&255),mt(r,t.adler>>16&255),mt(r,t.adler>>24&255),mt(r,255&t.total_in),mt(r,t.total_in>>8&255),mt(r,t.total_in>>16&255),mt(r,t.total_in>>24&255)):(bt(r,t.adler>>>16),bt(r,65535&t.adler)),yt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?it:ot)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?dt(t,at):(t.state=null,113===e?dt(t,st):it)},deflateSetDictionary:function(t,e){var A=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=Y(t.adler,e,A,0)),n.wrap=0,A>=n.w_size){0===r&&(Et(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(A-n.w_size,A),0),e=i,A=n.w_size}var o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=A,t.next_in=0,t.input=e,St(n);n.lookahead>=3;){var g=n.strstart,c=n.lookahead-2;do{n.ins_h=pt(n,n.ins_h,n.window[g+3-1]),n.prev[g&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=g,g++}while(--c);n.strstart=g,n.lookahead=2,St(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,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=r,it},deflateInfo:"pako deflate (from Nodeca project)"},Lt=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},_t=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var A=e.shift();if(A){if("object"!==typeof A)throw new TypeError(A+"must be non-object");for(var n in A)Lt(A,n)&&(t[n]=A[n])}}return t},Jt=function(t){for(var e=0,A=0,n=t.length;A<n;A++)e+=t[A].length;for(var r=new Uint8Array(e),i=0,o=0,a=t.length;i<a;i++){var s=t[i];r.set(s,o),o+=s.length}return r},Tt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(oA){Tt=!1}for(var jt=new Uint8Array(256),Ht=0;Ht<256;Ht++)jt[Ht]=Ht>=252?6:Ht>=248?5:Ht>=240?4:Ht>=224?3:Ht>=192?2:1;jt[254]=jt[254]=1;var Yt=function(t){var e,A,n,r,i,o=t.length,a=0;for(r=0;r<o;r++)55296===(64512&(A=t.charCodeAt(r)))&&r+1<o&&56320===(64512&(n=t.charCodeAt(r+1)))&&(A=65536+(A-55296<<10)+(n-56320),r++),a+=A<128?1:A<2048?2:A<65536?3:4;for(e=new Uint8Array(a),i=0,r=0;i<a;r++)55296===(64512&(A=t.charCodeAt(r)))&&r+1<o&&56320===(64512&(n=t.charCodeAt(r+1)))&&(A=65536+(A-55296<<10)+(n-56320),r++),A<128?e[i++]=A:A<2048?(e[i++]=192|A>>>6,e[i++]=128|63&A):A<65536?(e[i++]=224|A>>>12,e[i++]=128|A>>>6&63,e[i++]=128|63&A):(e[i++]=240|A>>>18,e[i++]=128|A>>>12&63,e[i++]=128|A>>>6&63,e[i++]=128|63&A);return e},Vt=function(t,e){var A,n,r=e||t.length,i=new Array(2*r);for(n=0,A=0;A<r;){var o=t[A++];if(o<128)i[n++]=o;else{var a=jt[o];if(a>4)i[n++]=65533,A+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&A<r;)o=o<<6|63&t[A++],a--;a>1?i[n++]=65533:o<65536?i[n++]=o:(o-=65536,i[n++]=55296|o>>10&1023,i[n++]=56320|1023&o)}}}return function(t,e){if(e<65534&&t.subarray&&Tt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));for(var A="",n=0;n<e;n++)A+=String.fromCharCode(t[n]);return A}(i,n)},Zt=function(t,e){(e=e||t.length)>t.length&&(e=t.length);for(var A=e-1;A>=0&&128===(192&t[A]);)A--;return A<0||0===A?e:A+jt[t[A]]>e?A:e};var Wt=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},Kt=Object.prototype.toString,Pt=K.Z_NO_FLUSH,qt=K.Z_SYNC_FLUSH,Xt=K.Z_FULL_FLUSH,zt=K.Z_FINISH,$t=K.Z_OK,te=K.Z_STREAM_END,ee=K.Z_DEFAULT_COMPRESSION,Ae=K.Z_DEFAULT_STRATEGY,ne=K.Z_DEFLATED;function re(t){this.options=_t({level:ee,method:ne,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ae},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Wt,this.strm.avail_out=0;var A=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(A!==$t)throw new Error(W[A]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"===typeof e.dictionary?Yt(e.dictionary):"[object ArrayBuffer]"===Kt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(A=Mt.deflateSetDictionary(this.strm,n))!==$t)throw new Error(W[A]);this._dict_set=!0}}function ie(t,e){var A=new re(e);if(A.push(t,!0),A.err)throw A.msg||W[A.err];return A.result}re.prototype.push=function(t,e){var A,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?zt:Pt,"string"===typeof t?r.input=Yt(t):"[object ArrayBuffer]"===Kt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===qt||n===Xt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((A=Mt.deflate(r,n))===te)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),A=Mt.deflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===$t;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},re.prototype.onData=function(t){this.chunks.push(t)},re.prototype.onEnd=function(t){t===$t&&(this.result=Jt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var oe={Deflate:re,deflate:ie,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ie(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ie(t,e)},constants:K},ae=function(t,e){var A,n,r,i,o,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F=t.state;A=t.next_in,m=t.input,n=A+(t.avail_in-5),r=t.next_out,b=t.output,i=r-(e-t.avail_out),o=r+(t.avail_out-257),a=F.dmax,s=F.wsize,g=F.whave,c=F.wnext,I=F.window,u=F.hold,l=F.bits,C=F.lencode,h=F.distcode,B=(1<<F.lenbits)-1,f=(1<<F.distbits)-1;t:do{l<15&&(u+=m[A++]<<l,l+=8,u+=m[A++]<<l,l+=8),d=C[u&B];e:for(;;){if(u>>>=Q=d>>>24,l-=Q,0===(Q=d>>>16&255))b[r++]=65535&d;else{if(!(16&Q)){if(0===(64&Q)){d=C[(65535&d)+(u&(1<<Q)-1)];continue e}if(32&Q){F.mode=12;break t}t.msg="invalid literal/length code",F.mode=30;break t}E=65535&d,(Q&=15)&&(l<Q&&(u+=m[A++]<<l,l+=8),E+=u&(1<<Q)-1,u>>>=Q,l-=Q),l<15&&(u+=m[A++]<<l,l+=8,u+=m[A++]<<l,l+=8),d=h[u&f];A:for(;;){if(u>>>=Q=d>>>24,l-=Q,!(16&(Q=d>>>16&255))){if(0===(64&Q)){d=h[(65535&d)+(u&(1<<Q)-1)];continue A}t.msg="invalid distance code",F.mode=30;break t}if(p=65535&d,l<(Q&=15)&&(u+=m[A++]<<l,(l+=8)<Q&&(u+=m[A++]<<l,l+=8)),(p+=u&(1<<Q)-1)>a){t.msg="invalid distance too far back",F.mode=30;break t}if(u>>>=Q,l-=Q,p>(Q=r-i)){if((Q=p-Q)>g&&F.sane){t.msg="invalid distance too far back",F.mode=30;break t}if(y=0,v=I,0===c){if(y+=s-Q,Q<E){E-=Q;do{b[r++]=I[y++]}while(--Q);y=r-p,v=b}}else if(c<Q){if(y+=s+c-Q,(Q-=c)<E){E-=Q;do{b[r++]=I[y++]}while(--Q);if(y=0,c<E){E-=Q=c;do{b[r++]=I[y++]}while(--Q);y=r-p,v=b}}}else if(y+=c-Q,Q<E){E-=Q;do{b[r++]=I[y++]}while(--Q);y=r-p,v=b}for(;E>2;)b[r++]=v[y++],b[r++]=v[y++],b[r++]=v[y++],E-=3;E&&(b[r++]=v[y++],E>1&&(b[r++]=v[y++]))}else{y=r-p;do{b[r++]=b[y++],b[r++]=b[y++],b[r++]=b[y++],E-=3}while(E>2);E&&(b[r++]=b[y++],E>1&&(b[r++]=b[y++]))}break}}break}}while(A<n&&r<o);A-=E=l>>3,u&=(1<<(l-=E<<3))-1,t.next_in=A,t.next_out=r,t.avail_in=A<n?n-A+5:5-(A-n),t.avail_out=r<o?o-r+257:257-(r-o),F.hold=u,F.bits=l},se=new Uint16Array([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]),ge=new Uint8Array([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]),ce=new Uint16Array([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]),Ie=new Uint8Array([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]),ue=function(t,e,A,n,r,i,o,a){var s,g,c,I,u,l,C,h,B,f=a.bits,d=0,Q=0,E=0,p=0,y=0,v=0,m=0,b=0,F=0,w=0,S=null,D=0,R=new Uint16Array(16),U=new Uint16Array(16),G=null,N=0;for(d=0;d<=15;d++)R[d]=0;for(Q=0;Q<n;Q++)R[e[A+Q]]++;for(y=f,p=15;p>=1&&0===R[p];p--);if(y>p&&(y=p),0===p)return r[i++]=20971520,r[i++]=20971520,a.bits=1,0;for(E=1;E<p&&0===R[E];E++);for(y<E&&(y=E),b=1,d=1;d<=15;d++)if(b<<=1,(b-=R[d])<0)return-1;if(b>0&&(0===t||1!==p))return-1;for(U[1]=0,d=1;d<15;d++)U[d+1]=U[d]+R[d];for(Q=0;Q<n;Q++)0!==e[A+Q]&&(o[U[e[A+Q]]++]=Q);if(0===t?(S=G=o,l=19):1===t?(S=se,D-=257,G=ge,N-=257,l=256):(S=ce,G=Ie,l=-1),w=0,Q=0,d=E,u=i,v=y,m=0,c=-1,I=(F=1<<y)-1,1===t&&F>852||2===t&&F>592)return 1;for(;;){C=d-m,o[Q]<l?(h=0,B=o[Q]):o[Q]>l?(h=G[N+o[Q]],B=S[D+o[Q]]):(h=96,B=0),s=1<<d-m,E=g=1<<v;do{r[u+(w>>m)+(g-=s)]=C<<24|h<<16|B|0}while(0!==g);for(s=1<<d-1;w&s;)s>>=1;if(0!==s?(w&=s-1,w+=s):w=0,Q++,0===--R[d]){if(d===p)break;d=e[A+o[Q]]}if(d>y&&(w&I)!==c){for(0===m&&(m=y),u+=E,b=1<<(v=d-m);v+m<p&&!((b-=R[v+m])<=0);)v++,b<<=1;if(F+=1<<v,1===t&&F>852||2===t&&F>592)return 1;r[c=w&I]=y<<24|v<<16|u-i|0}}return 0!==w&&(r[u+w]=d-m<<24|64<<16|0),a.bits=y,0},le=K.Z_FINISH,Ce=K.Z_BLOCK,he=K.Z_TREES,Be=K.Z_OK,fe=K.Z_STREAM_END,de=K.Z_NEED_DICT,Qe=K.Z_STREAM_ERROR,Ee=K.Z_DATA_ERROR,pe=K.Z_MEM_ERROR,ye=K.Z_BUF_ERROR,ve=K.Z_DEFLATED,me=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function be(){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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Fe,we,Se=function(t){if(!t||!t.state)return Qe;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,Be},De=function(t){if(!t||!t.state)return Qe;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Se(t)},Re=function(t,e){var A;if(!t||!t.state)return Qe;var n=t.state;return e<0?(A=0,e=-e):(A=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Qe:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=A,n.wbits=e,De(t))},Ue=function(t,e){if(!t)return Qe;var A=new be;t.state=A,A.window=null;var n=Re(t,e);return n!==Be&&(t.state=null),n},Ge=!0,Ne=function(t){if(Ge){Fe=new Int32Array(512),we=new Int32Array(32);for(var e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ue(1,t.lens,0,288,Fe,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ue(2,t.lens,0,32,we,0,t.work,{bits:5}),Ge=!1}t.lencode=Fe,t.lenbits=9,t.distcode=we,t.distbits=5},ke=function(t,e,A,n){var r,i=t.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),n>=i.wsize?(i.window.set(e.subarray(A-i.wsize,A),0),i.wnext=0,i.whave=i.wsize):((r=i.wsize-i.wnext)>n&&(r=n),i.window.set(e.subarray(A-n,A-n+r),i.wnext),(n-=r)?(i.window.set(e.subarray(A-n,A),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=r,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=r))),0},xe={inflateReset:De,inflateReset2:Re,inflateResetKeep:Se,inflateInit:function(t){return Ue(t,15)},inflateInit2:Ue,inflate:function(t,e){var A,n,r,i,o,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F=0,w=new Uint8Array(4),S=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return Qe;12===(A=t.state).mode&&(A.mode=13),o=t.next_out,r=t.output,s=t.avail_out,i=t.next_in,n=t.input,a=t.avail_in,g=A.hold,c=A.bits,I=a,u=s,v=Be;t:for(;;)switch(A.mode){case 1:if(0===A.wrap){A.mode=13;break}for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(2&A.wrap&&35615===g){A.check=0,w[0]=255&g,w[1]=g>>>8&255,A.check=Z(A.check,w,2,0),g=0,c=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",A.mode=30;break}if((15&g)!==ve){t.msg="unknown compression method",A.mode=30;break}if(c-=4,y=8+(15&(g>>>=4)),0===A.wbits)A.wbits=y;else if(y>A.wbits){t.msg="invalid window size",A.mode=30;break}A.dmax=1<<A.wbits,t.adler=A.check=1,A.mode=512&g?10:12,g=0,c=0;break;case 2:for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(A.flags=g,(255&A.flags)!==ve){t.msg="unknown compression method",A.mode=30;break}if(57344&A.flags){t.msg="unknown header flags set",A.mode=30;break}A.head&&(A.head.text=g>>8&1),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=Z(A.check,w,2,0)),g=0,c=0,A.mode=3;case 3:for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.head&&(A.head.time=g),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,w[2]=g>>>16&255,w[3]=g>>>24&255,A.check=Z(A.check,w,4,0)),g=0,c=0,A.mode=4;case 4:for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.head&&(A.head.xflags=255&g,A.head.os=g>>8),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=Z(A.check,w,2,0)),g=0,c=0,A.mode=5;case 5:if(1024&A.flags){for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.length=g,A.head&&(A.head.extra_len=g),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=Z(A.check,w,2,0)),g=0,c=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&((l=A.length)>a&&(l=a),l&&(A.head&&(y=A.head.extra_len-A.length,A.head.extra||(A.head.extra=new Uint8Array(A.head.extra_len)),A.head.extra.set(n.subarray(i,i+l),y)),512&A.flags&&(A.check=Z(A.check,n,l,i)),a-=l,i+=l,A.length-=l),A.length))break t;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(0===a)break t;l=0;do{y=n[i+l++],A.head&&y&&A.length<65536&&(A.head.name+=String.fromCharCode(y))}while(y&&l<a);if(512&A.flags&&(A.check=Z(A.check,n,l,i)),a-=l,i+=l,y)break t}else A.head&&(A.head.name=null);A.length=0,A.mode=8;case 8:if(4096&A.flags){if(0===a)break t;l=0;do{y=n[i+l++],A.head&&y&&A.length<65536&&(A.head.comment+=String.fromCharCode(y))}while(y&&l<a);if(512&A.flags&&(A.check=Z(A.check,n,l,i)),a-=l,i+=l,y)break t}else A.head&&(A.head.comment=null);A.mode=9;case 9:if(512&A.flags){for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g!==(65535&A.check)){t.msg="header crc mismatch",A.mode=30;break}g=0,c=0}A.head&&(A.head.hcrc=A.flags>>9&1,A.head.done=!0),t.adler=A.check=0,A.mode=12;break;case 10:for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}t.adler=A.check=me(g),g=0,c=0,A.mode=11;case 11:if(0===A.havedict)return t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,de;t.adler=A.check=1,A.mode=12;case 12:if(e===Ce||e===he)break t;case 13:if(A.last){g>>>=7&c,c-=7&c,A.mode=27;break}for(;c<3;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}switch(A.last=1&g,c-=1,3&(g>>>=1)){case 0:A.mode=14;break;case 1:if(Ne(A),A.mode=20,e===he){g>>>=2,c-=2;break t}break;case 2:A.mode=17;break;case 3:t.msg="invalid block type",A.mode=30}g>>>=2,c-=2;break;case 14:for(g>>>=7&c,c-=7&c;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if((65535&g)!==(g>>>16^65535)){t.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&g,g=0,c=0,A.mode=15,e===he)break t;case 15:A.mode=16;case 16:if(l=A.length){if(l>a&&(l=a),l>s&&(l=s),0===l)break t;r.set(n.subarray(i,i+l),o),a-=l,i+=l,s-=l,o+=l,A.length-=l;break}A.mode=12;break;case 17:for(;c<14;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(A.nlen=257+(31&g),g>>>=5,c-=5,A.ndist=1+(31&g),g>>>=5,c-=5,A.ncode=4+(15&g),g>>>=4,c-=4,A.nlen>286||A.ndist>30){t.msg="too many length or distance symbols",A.mode=30;break}A.have=0,A.mode=18;case 18:for(;A.have<A.ncode;){for(;c<3;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.lens[S[A.have++]]=7&g,g>>>=3,c-=3}for(;A.have<19;)A.lens[S[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,m={bits:A.lenbits},v=ue(0,A.lens,0,19,A.lencode,0,A.work,m),A.lenbits=m.bits,v){t.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have<A.nlen+A.ndist;){for(;f=(F=A.lencode[g&(1<<A.lenbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(d<16)g>>>=B,c-=B,A.lens[A.have++]=d;else{if(16===d){for(b=B+2;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g>>>=B,c-=B,0===A.have){t.msg="invalid bit length repeat",A.mode=30;break}y=A.lens[A.have-1],l=3+(3&g),g>>>=2,c-=2}else if(17===d){for(b=B+3;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}c-=B,y=0,l=3+(7&(g>>>=B)),g>>>=3,c-=3}else{for(b=B+7;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}c-=B,y=0,l=11+(127&(g>>>=B)),g>>>=7,c-=7}if(A.have+l>A.nlen+A.ndist){t.msg="invalid bit length repeat",A.mode=30;break}for(;l--;)A.lens[A.have++]=y}}if(30===A.mode)break;if(0===A.lens[256]){t.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,m={bits:A.lenbits},v=ue(1,A.lens,0,A.nlen,A.lencode,0,A.work,m),A.lenbits=m.bits,v){t.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,m={bits:A.distbits},v=ue(2,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,m),A.distbits=m.bits,v){t.msg="invalid distances set",A.mode=30;break}if(A.mode=20,e===he)break t;case 20:A.mode=21;case 21:if(a>=6&&s>=258){t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,ae(t,u),o=t.next_out,r=t.output,s=t.avail_out,i=t.next_in,n=t.input,a=t.avail_in,g=A.hold,c=A.bits,12===A.mode&&(A.back=-1);break}for(A.back=0;f=(F=A.lencode[g&(1<<A.lenbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(f&&0===(240&f)){for(Q=B,E=f,p=d;f=(F=A.lencode[p+((g&(1<<Q+E)-1)>>Q)])>>>16&255,d=65535&F,!(Q+(B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}g>>>=Q,c-=Q,A.back+=Q}if(g>>>=B,c-=B,A.back+=B,A.length=d,0===f){A.mode=26;break}if(32&f){A.back=-1,A.mode=12;break}if(64&f){t.msg="invalid literal/length code",A.mode=30;break}A.extra=15&f,A.mode=22;case 22:if(A.extra){for(b=A.extra;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.length+=g&(1<<A.extra)-1,g>>>=A.extra,c-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;f=(F=A.distcode[g&(1<<A.distbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(0===(240&f)){for(Q=B,E=f,p=d;f=(F=A.distcode[p+((g&(1<<Q+E)-1)>>Q)])>>>16&255,d=65535&F,!(Q+(B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}g>>>=Q,c-=Q,A.back+=Q}if(g>>>=B,c-=B,A.back+=B,64&f){t.msg="invalid distance code",A.mode=30;break}A.offset=d,A.extra=15&f,A.mode=24;case 24:if(A.extra){for(b=A.extra;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.offset+=g&(1<<A.extra)-1,g>>>=A.extra,c-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){t.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(0===s)break t;if(l=u-s,A.offset>l){if((l=A.offset-l)>A.whave&&A.sane){t.msg="invalid distance too far back",A.mode=30;break}l>A.wnext?(l-=A.wnext,C=A.wsize-l):C=A.wnext-l,l>A.length&&(l=A.length),h=A.window}else h=r,C=o-A.offset,l=A.length;l>s&&(l=s),s-=l,A.length-=l;do{r[o++]=h[C++]}while(--l);0===A.length&&(A.mode=21);break;case 26:if(0===s)break t;r[o++]=A.length,s--,A.mode=21;break;case 27:if(A.wrap){for(;c<32;){if(0===a)break t;a--,g|=n[i++]<<c,c+=8}if(u-=s,t.total_out+=u,A.total+=u,u&&(t.adler=A.check=A.flags?Z(A.check,r,u,o-u):Y(A.check,r,u,o-u)),u=s,(A.flags?g:me(g))!==A.check){t.msg="incorrect data check",A.mode=30;break}g=0,c=0}A.mode=28;case 28:if(A.wrap&&A.flags){for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g!==(4294967295&A.total)){t.msg="incorrect length check",A.mode=30;break}g=0,c=0}A.mode=29;case 29:v=fe;break t;case 30:v=Ee;break t;case 31:return pe;case 32:default:return Qe}return t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,(A.wsize||u!==t.avail_out&&A.mode<30&&(A.mode<27||e!==le))&&ke(t,t.output,t.next_out,u-t.avail_out),I-=t.avail_in,u-=t.avail_out,t.total_in+=I,t.total_out+=u,A.total+=u,A.wrap&&u&&(t.adler=A.check=A.flags?Z(A.check,r,u,t.next_out-u):Y(A.check,r,u,t.next_out-u)),t.data_type=A.bits+(A.last?64:0)+(12===A.mode?128:0)+(20===A.mode||15===A.mode?256:0),(0===I&&0===u||e===le)&&v===Be&&(v=ye),v},inflateEnd:function(t){if(!t||!t.state)return Qe;var e=t.state;return e.window&&(e.window=null),t.state=null,Be},inflateGetHeader:function(t,e){if(!t||!t.state)return Qe;var A=t.state;return 0===(2&A.wrap)?Qe:(A.head=e,e.done=!1,Be)},inflateSetDictionary:function(t,e){var A,n=e.length;return t&&t.state?0!==(A=t.state).wrap&&11!==A.mode?Qe:11===A.mode&&Y(1,e,n,0)!==A.check?Ee:ke(t,e,n,n)?(A.mode=31,pe):(A.havedict=1,Be):Qe},inflateInfo:"pako inflate (from Nodeca project)"};var Oe=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},Me=Object.prototype.toString,Le=K.Z_NO_FLUSH,_e=K.Z_FINISH,Je=K.Z_OK,Te=K.Z_STREAM_END,je=K.Z_NEED_DICT,He=K.Z_STREAM_ERROR,Ye=K.Z_DATA_ERROR,Ve=K.Z_MEM_ERROR;function Ze(t){this.options=_t({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Wt,this.strm.avail_out=0;var A=xe.inflateInit2(this.strm,e.windowBits);if(A!==Je)throw new Error(W[A]);if(this.header=new Oe,xe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"===typeof e.dictionary?e.dictionary=Yt(e.dictionary):"[object ArrayBuffer]"===Me.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(A=xe.inflateSetDictionary(this.strm,e.dictionary))!==Je))throw new Error(W[A])}function We(t,e){var A=new Ze(e);if(A.push(t),A.err)throw A.msg||W[A.err];return A.result}Ze.prototype.push=function(t,e){var A,n,r,i=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(n=e===~~e?e:!0===e?_e:Le,"[object ArrayBuffer]"===Me.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(A=xe.inflate(i,n))===je&&a&&((A=xe.inflateSetDictionary(i,a))===Je?A=xe.inflate(i,n):A===Ye&&(A=je));i.avail_in>0&&A===Te&&i.state.wrap>0&&0!==t[i.next_in];)xe.inflateReset(i),A=xe.inflate(i,n);switch(A){case He:case Ye:case je:case Ve:return this.onEnd(A),this.ended=!0,!1}if(r=i.avail_out,i.next_out&&(0===i.avail_out||A===Te))if("string"===this.options.to){var s=Zt(i.output,i.next_out),g=i.next_out-s,c=Vt(i.output,s);i.next_out=g,i.avail_out=o-g,g&&i.output.set(i.output.subarray(s,s+g),0),this.onData(c)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(A!==Je||0!==r){if(A===Te)return A=xe.inflateEnd(this.strm),this.onEnd(A),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},Ze.prototype.onData=function(t){this.chunks.push(t)},Ze.prototype.onEnd=function(t){t===Je&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Jt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ke={Inflate:Ze,inflate:We,inflateRaw:function(t,e){return(e=e||{}).raw=!0,We(t,e)},ungzip:We,constants:K},Pe={Deflate:oe.Deflate,deflate:oe.deflate,deflateRaw:oe.deflateRaw,gzip:oe.gzip,Inflate:Ke.Inflate,inflate:Ke.inflate,inflateRaw:Ke.inflateRaw,ungzip:Ke.ungzip,constants:K},qe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(Object(s.a)(this,t),e<0||e>9)throw new Error("Invalid gzip compression level, it should be between 0 and 9");this.level=e}return Object(g.a)(t,[{key:"encode",value:function(t){return Pe.gzip(t,{level:this.level})}},{key:"decode",value:function(t,e){var A=Pe.ungzip(t);return void 0!==e?(e.set(A),e):A}}],[{key:"fromConfig",value:function(e){return new t(e.level)}}]),t}();qe.codecId="gzip";var Xe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(Object(s.a)(this,t),e<-1||e>9)throw new Error("Invalid zlib compression level, it should be between -1 and 9");this.level=e}return Object(g.a)(t,[{key:"encode",value:function(t){return Pe.deflate(t,{level:this.level})}},{key:"decode",value:function(t,e){var A=Pe.inflate(t);return void 0!==e?(e.set(A),e):A}}],[{key:"fromConfig",value:function(e){return new t(e.level)}}]),t}();Xe.codecId="zlib";var ze="undefined"!==typeof t&&null!=t.versions&&null!=t.versions.node?function(t){return new Uint8Array(n.from(t,"base64"))}:function(){for(var t=new Uint8Array(128),e=0;e<64;e++)t[e<26?e+65:e<52?e+71:e<62?e-4:4*e-205]=e;return function(e){for(var A=e.length,n=new Uint8Array(3*(A-("="==e[A-1])-("="==e[A-2]))/4|0),r=0,i=0;r<A;){var o=t[e.charCodeAt(r++)],a=t[e.charCodeAt(r++)],s=t[e.charCodeAt(r++)],g=t[e.charCodeAt(r++)];n[i++]=o<<2|a>>4,n[i++]=a<<4|s>>2,n[i++]=s<<6|g}return n}}();function $e(t,e){return t({noInitialRun:!0,wasmBinary:ze(e)})}var tA,eA=function(){"undefined"!==typeof document&&document.currentScript&&document.currentScript.src;return function(t){var e,A,n;t=t||{},e||(e="undefined"!==typeof t?t:{}),e.ready=new Promise((function(t,e){A=t,n=e}));var r,i={};for(r in e)e.hasOwnProperty(r)&&(i[r]=e[r]);var o,a="./this.program",s=e.print||console.log.bind(console),g=e.printErr||console.warn.bind(console);for(r in i)i.hasOwnProperty(r)&&(e[r]=i[r]);i=null,e.thisProgram&&(a=e.thisProgram),e.wasmBinary&&(o=e.wasmBinary),e.noExitRuntime&&e.noExitRuntime,"object"!==typeof WebAssembly&&J("no native wasm support detected");var c,I=!1,u="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,e,A){var n=e+A;for(A=e;t[A]&&!(A>=n);)++A;if(16<A-e&&t.subarray&&u)return u.decode(t.subarray(e,A));for(n="";e<A;){var r=t[e++];if(128&r){var i=63&t[e++];if(192==(224&r))n+=String.fromCharCode((31&r)<<6|i);else{var o=63&t[e++];65536>(r=224==(240&r)?(15&r)<<12|i<<6|o:(7&r)<<18|i<<12|o<<6|63&t[e++])?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r))}}else n+=String.fromCharCode(r)}return n}var C,h,B,f,d,Q,E,p,y,v="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function m(t,e){for(var A=t>>1,n=A+e/2;!(A>=n)&&d[A];)++A;if(32<(A<<=1)-t&&v)return v.decode(B.subarray(t,A));for(A=0,n="";;){var r=f[t+2*A>>1];if(0==r||A==e/2)return n;++A,n+=String.fromCharCode(r)}}function b(t,e,A){if(void 0===A&&(A=2147483647),2>A)return 0;var n=e;A=(A-=2)<2*t.length?A/2:t.length;for(var r=0;r<A;++r)f[e>>1]=t.charCodeAt(r),e+=2;return f[e>>1]=0,e-n}function F(t){return 2*t.length}function w(t,e){for(var A=0,n="";!(A>=e/4);){var r=Q[t+4*A>>2];if(0==r)break;++A,65536<=r?(r-=65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r)):n+=String.fromCharCode(r)}return n}function S(t,e,A){if(void 0===A&&(A=2147483647),4>A)return 0;var n=e;A=n+A-4;for(var r=0;r<t.length;++r){var i=t.charCodeAt(r);if(55296<=i&&57343>=i)i=65536+((1023&i)<<10)|1023&t.charCodeAt(++r);if(Q[e>>2]=i,(e+=4)+4>A)break}return Q[e>>2]=0,e-n}function D(t){for(var e=0,A=0;A<t.length;++A){var n=t.charCodeAt(A);55296<=n&&57343>=n&&++A,e+=4}return e}function R(t){C=t,e.HEAP8=h=new Int8Array(t),e.HEAP16=f=new Int16Array(t),e.HEAP32=Q=new Int32Array(t),e.HEAPU8=B=new Uint8Array(t),e.HEAPU16=d=new Uint16Array(t),e.HEAPU32=E=new Uint32Array(t),e.HEAPF32=p=new Float32Array(t),e.HEAPF64=y=new Float64Array(t)}var U=e.INITIAL_MEMORY||16777216;(c=e.wasmMemory?e.wasmMemory:new WebAssembly.Memory({initial:U/65536,maximum:32768}))&&(C=c.buffer),U=C.byteLength,R(C);var G,N=[],k=[],x=[],O=[];function M(){var t=e.preRun.shift();N.unshift(t)}var L=0,_=null;function J(t){throw e.onAbort&&e.onAbort(t),g(t),I=!0,t=new WebAssembly.RuntimeError("abort("+t+"). Build with -s ASSERTIONS=1 for more info."),n(t),t}function T(t){var e=H;return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}function j(){return T("data:application/octet-stream;base64,")}e.preloadedImages={},e.preloadedAudios={};var H="blosc_codec.wasm";if(!j()){var Y=H;H=e.locateFile?e.locateFile(Y,""):""+Y}function V(){try{if(o)return new Uint8Array(o);throw"both async and sync fetching of the wasm failed"}catch(t){J(t)}}function Z(t){for(;0<t.length;){var A=t.shift();if("function"==typeof A)A(e);else{var n=A.T;"number"===typeof n?void 0===A.O?G.get(n)():G.get(n)(A.O):n(void 0===A.O?null:A.O)}}}function W(t){this.N=t-16,this.$=function(t){Q[this.N+8>>2]=t},this.X=function(t){Q[this.N+0>>2]=t},this.Y=function(){Q[this.N+4>>2]=0},this.W=function(){h[this.N+12>>0]=0},this.Z=function(){h[this.N+13>>0]=0},this.V=function(t,e){this.$(t),this.X(e),this.Y(),this.W(),this.Z()}}function K(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var P=void 0;function q(t){for(var e="";B[t];)e+=P[B[t++]];return e}var X={},z={},$={};function tt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?"_"+t:t}function et(t,e){return t=tt(t),new Function("body","return function "+t+'() {\n    "use strict";    return body.apply(this, arguments);\n};\n')(e)}function At(t){var e=Error,A=et(t,(function(e){this.name=t,this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return A.prototype=Object.create(e.prototype),A.prototype.constructor=A,A.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},A}var nt=void 0;function rt(t){throw new nt(t)}var it=void 0;function ot(t,e,A){if(A=A||{},!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||rt('type "'+n+'" must have a positive integer typeid pointer'),z.hasOwnProperty(t)){if(A.U)return;rt("Cannot register type '"+n+"' twice")}z[t]=e,delete $[t],X.hasOwnProperty(t)&&(e=X[t],delete X[t],e.forEach((function(t){t()})))}var at=[],st=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function gt(t){4<t&&0===--st[t].P&&(st[t]=void 0,at.push(t))}function ct(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=at.length?at.pop():st.length;return st[e]={P:1,value:t},e}}function It(t){return this.fromWireType(E[t>>2])}function ut(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function lt(t,e){switch(e){case 2:return function(t){return this.fromWireType(p[t>>2])};case 3:return function(t){return this.fromWireType(y[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Ct(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function ht(t,A,n){e.hasOwnProperty(t)?((void 0===n||void 0!==e[t].L&&void 0!==e[t].L[n])&&rt("Cannot register public name '"+t+"' twice"),function(t,A){var n=e;if(void 0===n[t].L){var r=n[t];n[t]=function(){return n[t].L.hasOwnProperty(arguments.length)||rt("Function '"+A+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+n[t].L+")!"),n[t].L[arguments.length].apply(this,arguments)},n[t].L=[],n[t].L[r.S]=r}}(t,t),e.hasOwnProperty(n)&&rt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),e[t].L[n]=A):(e[t]=A,void 0!==n&&(e[t].ba=n))}function Bt(t,A){var n=-1!=(t=q(t)).indexOf("j")?function(t,A){0<=t.indexOf("j")||J("Assertion failed: getDynCaller should only be called with i64 sigs");var n=[];return function(){n.length=arguments.length;for(var r=0;r<arguments.length;r++)n[r]=arguments[r];return-1!=t.indexOf("j")?n&&n.length?e["dynCall_"+t].apply(null,[A].concat(n)):e["dynCall_"+t].call(null,A):G.get(A).apply(null,n)}}(t,A):G.get(A);return"function"!==typeof n&&rt("unknown function pointer with signature "+t+": "+A),n}var ft=void 0;function dt(t){var e=q(t=Ut(t));return Rt(t),e}function Qt(t,e,A){switch(e){case 0:return A?function(t){return h[t]}:function(t){return B[t]};case 1:return A?function(t){return f[t>>1]}:function(t){return d[t>>1]};case 2:return A?function(t){return Q[t>>2]}:function(t){return E[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var Et={};function pt(){if(!yt){var t,e={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(t in Et)e[t]=Et[t];var A=[];for(t in e)A.push(t+"="+e[t]);yt=A}return yt}for(var yt,vt=[null,[],[]],mt=Array(256),bt=0;256>bt;++bt)mt[bt]=String.fromCharCode(bt);P=mt,nt=e.BindingError=At("BindingError"),it=e.InternalError=At("InternalError"),e.count_emval_handles=function(){for(var t=0,e=5;e<st.length;++e)void 0!==st[e]&&++t;return t},e.get_first_emval=function(){for(var t=5;t<st.length;++t)if(void 0!==st[t])return st[t];return null},ft=e.UnboundTypeError=At("UnboundTypeError"),k.push({T:function(){St()}});var Ft={p:function(t){return Dt(t+16)+16},o:function(t,e,A){throw new W(t).V(e,A),t},z:function(t,e,A,n,r){var i=K(A);ot(t,{name:e=q(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:r},argPackAdvance:8,readValueFromPointer:function(t){if(1===A)var n=h;else if(2===A)n=f;else{if(4!==A)throw new TypeError("Unknown boolean type size: "+e);n=Q}return this.fromWireType(n[t>>i])},M:null})},y:function(t,e){ot(t,{name:e=q(e),fromWireType:function(t){var e=st[t].value;return gt(t),e},toWireType:function(t,e){return ct(e)},argPackAdvance:8,readValueFromPointer:It,M:null})},h:function(t,e,A){A=K(A),ot(t,{name:e=q(e),fromWireType:function(t){return t},toWireType:function(t,e){if("number"!==typeof e&&"boolean"!==typeof e)throw new TypeError('Cannot convert "'+ut(e)+'" to '+this.name);return e},argPackAdvance:8,readValueFromPointer:lt(e,A),M:null})},e:function(t,A,n,r,i,o){var a=function(t,e){for(var A=[],n=0;n<t;n++)A.push(Q[(e>>2)+n]);return A}(A,n);t=q(t),i=Bt(r,i),ht(t,(function(){!function(t,e){var A=[],n={};throw e.forEach((function t(e){n[e]||z[e]||($[e]?$[e].forEach(t):(A.push(e),n[e]=!0))})),new ft(t+": "+A.map(dt).join([", "]))}("Cannot call "+t+" due to unbound types",a)}),A-1),function(t,e){function A(t){if((t=e(t)).length!==n.length)throw new it("Mismatched type converter count");for(var A=0;A<n.length;++A)ot(n[A],t[A])}var n=[];n.forEach((function(e){$[e]=t}));var r=Array(t.length),i=[],o=0;t.forEach((function(t,e){z.hasOwnProperty(t)?r[e]=z[t]:(i.push(t),X.hasOwnProperty(t)||(X[t]=[]),X[t].push((function(){r[e]=z[t],++o===i.length&&A(r)})))})),0===i.length&&A(r)}(a,(function(n){var r=t,a=t;n=[n[0],null].concat(n.slice(1));var s=i,g=n.length;2>g&&rt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=null!==n[1]&&!1,I=!1,u=1;u<n.length;++u)if(null!==n[u]&&void 0===n[u].M){I=!0;break}var l="void"!==n[0].name,C="",h="";for(u=0;u<g-2;++u)C+=(0!==u?", ":"")+"arg"+u,h+=(0!==u?", ":"")+"arg"+u+"Wired";a="return function "+tt(a)+"("+C+") {\nif (arguments.length !== "+(g-2)+") {\nthrowBindingError('function "+a+" called with ' + arguments.length + ' arguments, expected "+(g-2)+" args!');\n}\n",I&&(a+="var destructors = [];\n");var B=I?"destructors":"null";for(C="throwBindingError invoker fn runDestructors retType classParam".split(" "),s=[rt,s,o,Ct,n[0],n[1]],c&&(a+="var thisWired = classParam.toWireType("+B+", this);\n"),u=0;u<g-2;++u)a+="var arg"+u+"Wired = argType"+u+".toWireType("+B+", arg"+u+"); // "+n[u+2].name+"\n",C.push("argType"+u),s.push(n[u+2]);if(c&&(h="thisWired"+(0<h.length?", ":"")+h),a+=(l?"var rv = ":"")+"invoker(fn"+(0<h.length?", ":"")+h+");\n",I)a+="runDestructors(destructors);\n";else for(u=c?1:2;u<n.length;++u)g=1===u?"thisWired":"arg"+(u-2)+"Wired",null!==n[u].M&&(a+=g+"_dtor("+g+"); // "+n[u].name+"\n",C.push(g+"_dtor"),s.push(n[u].M));if(l&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),C.push(a+"}\n"),n=function(t){var e=Function;if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var A=et(e.name||"unknownFunctionName",(function(){}));return A.prototype=e.prototype,A=new A,(t=e.apply(A,t))instanceof Object?t:A}(C).apply(null,s),u=A-1,!e.hasOwnProperty(r))throw new it("Replacing nonexistant public symbol");return void 0!==e[r].L&&void 0!==u?e[r].L[u]=n:(e[r]=n,e[r].S=u),[]}))},c:function(t,e,A,n,r){function i(t){return t}e=q(e),-1===r&&(r=4294967295);var o=K(A);if(0===n){var a=32-8*A;i=function(t){return t<<a>>>a}}var s=-1!=e.indexOf("unsigned");ot(t,{name:e,fromWireType:i,toWireType:function(t,A){if("number"!==typeof A&&"boolean"!==typeof A)throw new TypeError('Cannot convert "'+ut(A)+'" to '+this.name);if(A<n||A>r)throw new TypeError('Passing a number "'+ut(A)+'" from JS side to C/C++ side to an argument of type "'+e+'", which is outside the valid range ['+n+", "+r+"]!");return s?A>>>0:0|A},argPackAdvance:8,readValueFromPointer:Qt(e,o,0!==n),M:null})},b:function(t,e,A){function n(t){var e=E;return new r(C,e[(t>>=2)+1],e[t])}var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];ot(t,{name:A=q(A),fromWireType:n,argPackAdvance:8,readValueFromPointer:n},{U:!0})},i:function(t,e){var A="std::string"===(e=q(e));ot(t,{name:e,fromWireType:function(t){var e=E[t>>2];if(A)for(var n=t+4,r=0;r<=e;++r){var i=t+4+r;if(r==e||0==B[i]){if(n=n?l(B,n,i-n):"",void 0===o)var o=n;else o+=String.fromCharCode(0),o+=n;n=i+1}}else{for(o=Array(e),r=0;r<e;++r)o[r]=String.fromCharCode(B[t+4+r]);o=o.join("")}return Rt(t),o},toWireType:function(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"===typeof e;n||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||rt("Cannot pass non-string to std::string");var r=(A&&n?function(){for(var t=0,A=0;A<e.length;++A){var n=e.charCodeAt(A);55296<=n&&57343>=n&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++A)),127>=n?++t:t=2047>=n?t+2:65535>=n?t+3:t+4}return t}:function(){return e.length})(),i=Dt(4+r+1);if(E[i>>2]=r,A&&n)!function(t,e,A){var n=B;if(0<A){A=e+A-1;for(var r=0;r<t.length;++r){var i=t.charCodeAt(r);if(55296<=i&&57343>=i)i=65536+((1023&i)<<10)|1023&t.charCodeAt(++r);if(127>=i){if(e>=A)break;n[e++]=i}else{if(2047>=i){if(e+1>=A)break;n[e++]=192|i>>6}else{if(65535>=i){if(e+2>=A)break;n[e++]=224|i>>12}else{if(e+3>=A)break;n[e++]=240|i>>18,n[e++]=128|i>>12&63}n[e++]=128|i>>6&63}n[e++]=128|63&i}}n[e]=0}}(e,i+4,r+1);else if(n)for(n=0;n<r;++n){var o=e.charCodeAt(n);255<o&&(Rt(i),rt("String has UTF-16 code units that do not fit in 8 bits")),B[i+4+n]=o}else for(n=0;n<r;++n)B[i+4+n]=e[n];return null!==t&&t.push(Rt,i),i},argPackAdvance:8,readValueFromPointer:It,M:function(t){Rt(t)}})},d:function(t,e,A){if(A=q(A),2===e)var n=m,r=b,i=F,o=function(){return d},a=1;else 4===e&&(n=w,r=S,i=D,o=function(){return E},a=2);ot(t,{name:A,fromWireType:function(t){for(var A,r=E[t>>2],i=o(),s=t+4,g=0;g<=r;++g){var c=t+4+g*e;g!=r&&0!=i[c>>a]||(s=n(s,c-s),void 0===A?A=s:(A+=String.fromCharCode(0),A+=s),s=c+e)}return Rt(t),A},toWireType:function(t,n){"string"!==typeof n&&rt("Cannot pass non-string to C++ string type "+A);var o=i(n),s=Dt(4+o+e);return E[s>>2]=o>>a,r(n,s+4,o+e),null!==t&&t.push(Rt,s),s},argPackAdvance:8,readValueFromPointer:It,M:function(t){Rt(t)}})},A:function(t,e){ot(t,{aa:!0,name:e=q(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},n:gt,x:function(t){4<t&&(st[t].P+=1)},C:function(t,e){var A=z[t];return void 0===A&&rt("_emval_take_value has unknown type "+dt(t)),ct(t=A.readValueFromPointer(e))},t:function(){J()},r:function(t,e,A){B.copyWithin(t,e,e+A)},s:function(t){t>>>=0;var e=B.length;if(2147483648<t)return!1;for(var A=1;4>=A;A*=2){var n=e*(1+.2/A);n=Math.min(n,t+100663296),0<(n=Math.max(16777216,t,n))%65536&&(n+=65536-n%65536);t:{try{c.grow(Math.min(2147483648,n)-C.byteLength+65535>>>16),R(c.buffer);var r=1;break t}catch(i){}r=void 0}if(r)return!0}return!1},u:function(t,e){var A=0;return pt().forEach((function(n,r){var i=e+A;for(r=Q[t+4*r>>2]=i,i=0;i<n.length;++i)h[r++>>0]=n.charCodeAt(i);h[r>>0]=0,A+=n.length+1})),0},v:function(t,e){var A=pt();Q[t>>2]=A.length;var n=0;return A.forEach((function(t){n+=t.length+1})),Q[e>>2]=n,0},w:function(){return 0},q:function(){},g:function(t,e,A,n){for(var r=0,i=0;i<A;i++){for(var o=Q[e+8*i>>2],a=Q[e+(8*i+4)>>2],c=0;c<a;c++){var I=B[o+c],u=vt[t];0===I||10===I?((1===t?s:g)(l(u,0)),u.length=0):u.push(I)}r+=a}return Q[n>>2]=r,0},a:c,l:function(){return 0},k:function(){return 0},j:function(){},B:function(){return 6},m:function(){},f:function(){}};!function(){function t(t){e.asm=t.exports,G=e.asm.D,L--,e.monitorRunDependencies&&e.monitorRunDependencies(L),0==L&&_&&(t=_,_=null,t())}function A(e){t(e.instance)}function r(t){return Promise.resolve().then(V).then((function(t){return WebAssembly.instantiate(t,i)})).then(t,(function(t){g("failed to asynchronously prepare wasm: "+t),J(t)}))}var i={a:Ft};if(L++,e.monitorRunDependencies&&e.monitorRunDependencies(L),e.instantiateWasm)try{return e.instantiateWasm(i,t)}catch(a){return g("Module.instantiateWasm callback failed with error: "+a),!1}(o||"function"!==typeof WebAssembly.instantiateStreaming||j()||T("file://")||"function"!==typeof fetch?r(A):fetch(H,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(A,(function(t){return g("wasm streaming compile failed: "+t),g("falling back to ArrayBuffer instantiation"),r(A)}))}))).catch(n)}();var wt,St=e.___wasm_call_ctors=function(){return(St=e.___wasm_call_ctors=e.asm.E).apply(null,arguments)},Dt=e._malloc=function(){return(Dt=e._malloc=e.asm.F).apply(null,arguments)},Rt=e._free=function(){return(Rt=e._free=e.asm.G).apply(null,arguments)},Ut=e.___getTypeName=function(){return(Ut=e.___getTypeName=e.asm.H).apply(null,arguments)};function Gt(){function t(){if(!wt&&(wt=!0,e.calledRun=!0,!I)){if(Z(k),Z(x),A(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var t=e.postRun.shift();O.unshift(t)}Z(O)}}if(!(0<L)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)M();Z(N),0<L||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),t()}),1)):t())}}if(e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.I).apply(null,arguments)},e.dynCall_jiiiii=function(){return(e.dynCall_jiiiii=e.asm.J).apply(null,arguments)},e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.K).apply(null,arguments)},_=function t(){wt||Gt(),wt||(_=t)},e.run=Gt,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return!0,Gt(),t.ready}}(),AA=" ";!function(t){t[t.NOSHUFFLE=0]="NOSHUFFLE",t[t.SHUFFLE=1]="SHUFFLE",t[t.BITSHUFFLE=2]="BITSHUFFLE",t[t.AUTOSHUFFLE=-1]="AUTOSHUFFLE"}(tA||(tA={}));var nA,rA=new Set(["blosclz","lz4","lz4hc","snappy","zlib","zstd"]),iA=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lz4",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tA.SHUFFLE,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(Object(s.a)(this,t),e<0||e>9)throw new Error("Invalid compression level: '".concat(e,"'. It should be between 0 and 9"));if(!rA.has(A))throw new Error("Invalid compressor '".concat(A,"'. Valid compressors include\n        'blosclz', 'lz4', 'lz4hc','snappy', 'zlib', 'zstd'."));if(n<-1||n>2)throw new Error("Invalid shuffle ".concat(n,". Must be one of 0 (NOSHUFFLE),\n        1 (SHUFFLE), 2 (BITSHUFFLE), -1 (AUTOSHUFFLE)."));this.blocksize=r,this.clevel=e,this.cname=A,this.shuffle=n}return Object(g.a)(t,[{key:"encode",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A,n,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return nA||(nA=$e(eA,AA)),t.next=3,nA;case 3:return A=t.sent,n=A.compress(e,this.cname,this.clevel,this.shuffle,this.blocksize),r=new Uint8Array(n),A.free_result(),t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"decode",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A){var n,r,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return nA||(nA=$e(eA,AA)),t.next=3,nA;case 3:if(n=t.sent,r=n.decompress(e),i=new Uint8Array(r),n.free_result(),void 0===A){t.next=10;break}return A.set(i),t.abrupt("return",A);case 10:return t.abrupt("return",i);case 11:case"end":return t.stop()}}),t)})));return function(e,A){return t.apply(this,arguments)}}()}],[{key:"fromConfig",value:function(e){var A=e.blocksize;return new t(e.clevel,e.cname,e.shuffle,A)}}]),t}();iA.codecId="blosc",iA.COMPRESSORS=Object(r.a)(rA),iA.NOSHUFFLE=tA.NOSHUFFLE,iA.SHUFFLE=tA.SHUFFLE,iA.BITSHUFFLE=tA.BITSHUFFLE,iA.AUTOSHUFFLE=tA.AUTOSHUFFLE,Object(c.d)(Xe.codecId,(function(){return Xe})),Object(c.d)(qe.codecId,(function(){return qe})),Object(c.d)(iA.codecId,(function(){return iA}))}).call(this,A(62),A(104).Buffer)},function(t,e,A){"use strict";A.d(e,"b",(function(){return n})),A.d(e,"c",(function(){return r})),A.d(e,"a",(function(){return i})),A.d(e,"d",(function(){return o}));function n(t){switch(ArrayBuffer.isView(t)?t.constructor:t){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 r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.clamped,n=void 0===A||A;switch(t){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return n?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 i(t){var e=t.data,A=t.width,n=t.height,r=t.bytesPerPixel,i=void 0===r?4:r,o=t.temp,a=A*i;o=o||new Uint8Array(a);for(var s=0;s<n/2;++s){var g=s*a,c=(n-s-1)*a;o.set(e.subarray(g,g+a)),e.copyWithin(g,c,c+a),e.set(o,c)}}function o(t){for(var e=t.data,A=t.width,n=t.height,r=Math.round(A/2),i=Math.round(n/2),o=new Uint8Array(r*i*4),a=0;a<i;a++)for(var s=0;s<r;s++)for(var g=0;g<4;g++)o[4*(a*r+s)+g]=e[4*(2*a*A+2*s)+g];return{data:o,width:r,height:i}}},function(t,e,A){"use strict";function n(t,e){if(t===e)return!0;if(!t||!e)return!1;for(var A in t){var r=t[A],i=e[A];if(!(r===i||Array.isArray(r)&&Array.isArray(i)&&n(r,i)))return!1}return!0}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e,A){var n=e[0],r=e[1],i=A[3]*n+A[7]*r||1;return t[0]=(A[0]*n+A[4]*r)/i,t[1]=(A[1]*n+A[5]*r)/i,t}function r(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i||1;return t[0]=(A[0]*n+A[4]*r+A[8]*i)/o,t[1]=(A[1]*n+A[5]*r+A[9]*i)/o,t[2]=(A[2]*n+A[6]*r+A[10]*i)/o,t}function i(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t[2]=e[2],t}function o(t,e,A){var n=e[0],r=e[1],i=e[2];return t[0]=A[0]*n+A[3]*r+A[6]*i,t[1]=A[1]*n+A[4]*r+A[7]*i,t[2]=A[2]*n+A[5]*r+A[8]*i,t[3]=e[3],t}A.d(e,"a",(function(){return n})),A.d(e,"c",(function(){return r})),A.d(e,"b",(function(){return i})),A.d(e,"d",(function(){return o}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return d}));var n=A(1),r=A(5),i=A(4),o=A(143),a=A(55);function s(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function g(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?s(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):s(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var c={transitionDuration:0},I=function(t){return 1-(1-t)*(1-t)},u=["wheel"],l=["panstart","panmove","panend"],C=["pinchstart","pinchmove","pinchend"],h=["tripanstart","tripanmove","tripanend"],B=["doubletap"],f=["keydown"],d=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,t),Object(a.a)(e),this.ControllerState=e,this.controllerState=null,this.controllerStateProps=null,this.eventManager=null,this.transitionManager=new o.b(e,g(g({},A),{},{onViewStateChange:this._onTransition.bind(this),onStateChange:this._setInteractionState.bind(this)})),this._events=null,this._interactionState={isDragging:!1},this._customEvents=[],this.onViewStateChange=null,this.onStateChange=null,this.handleEvent=this.handleEvent.bind(this),this.setProps(A)}return Object(i.a)(t,[{key:"finalize",value:function(){for(var t in this._events)this._events[t]&&this.eventManager.off(t,this.handleEvent);this.transitionManager.finalize()}},{key:"handleEvent",value:function(t){var e=this.ControllerState;this.controllerState=new e(g(g({makeViewport:this.makeViewport},this.controllerStateProps),this._state));var A=this._eventStartBlocked;switch(t.type){case"panstart":return!A&&this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return!A&&this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchend":return this._onPinchEnd(t);case"tripanstart":return!A&&this._onTriplePanStart(t);case"tripanmove":return this._onTriplePan(t);case"tripanend":return this._onTriplePanEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}},{key:"getCenter",value:function(t){var e=this.controllerStateProps,A=e.x,n=e.y,r=t.offsetCenter;return[r.x-A,r.y-n]}},{key:"isPointInBounds",value:function(t,e){var A=this.controllerStateProps,n=A.width,r=A.height;if(e&&e.handled)return!1;var i=t[0]>=0&&t[0]<=n&&t[1]>=0&&t[1]<=r;return i&&e&&e.stopPropagation(),i}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"isDragging",value:function(){return this._interactionState.isDragging}},{key:"blockEvents",value:function(t){var e=this,A=setTimeout((function(){e._eventStartBlocked===A&&(e._eventStartBlocked=null)}),t);this._eventStartBlocked=A}},{key:"setProps",value:function(t){"onViewStateChange"in t&&(this.onViewStateChange=t.onViewStateChange),"onStateChange"in t&&(this.onStateChange=t.onStateChange),"makeViewport"in t&&(this.makeViewport=t.makeViewport),"dragMode"in t&&(this.dragMode=t.dragMode),this.controllerStateProps=t,"eventManager"in t&&this.eventManager!==t.eventManager&&(this.eventManager=t.eventManager,this._events={},this.toggleEvents(this._customEvents,!0)),"transitionInterpolator"in t||(t.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(t);var e=t.inertia;!0===e&&(e=300),this.inertia=e;var A=t.scrollZoom,n=void 0===A||A,r=t.dragPan,i=void 0===r||r,o=t.dragRotate,a=void 0===o||o,s=t.doubleClickZoom,g=void 0===s||s,c=t.touchZoom,I=void 0===c||c,d=t.touchRotate,Q=void 0!==d&&d,E=t.keyboard,p=void 0===E||E,y=Boolean(this.onViewStateChange);this.toggleEvents(u,y&&n),this.toggleEvents(l,y&&(i||a)),this.toggleEvents(C,y&&(I||Q)),this.toggleEvents(h,y&&Q),this.toggleEvents(B,y&&g),this.toggleEvents(f,y&&p),this.scrollZoom=n,this.dragPan=i,this.dragRotate=a,this.doubleClickZoom=g,this.touchZoom=I,this.touchRotate=Q,this.keyboard=p}},{key:"updateTransition",value:function(){this.transitionManager.updateTransition()}},{key:"toggleEvents",value:function(t,e){var A=this;this.eventManager&&t.forEach((function(t){A._events[t]!==e&&(A._events[t]=e,e?A.eventManager.on(t,A.handleEvent):A.eventManager.off(t,A.handleEvent))}))}},{key:"updateViewport",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Object.assign({},t.getViewportProps(),e),r=this.controllerState!==t;if(this._state=t.getState(),this._setInteractionState(A),r){var i=this.controllerState?this.controllerState.getViewportProps():null;this.onViewStateChange&&this.onViewStateChange({viewState:n,interactionState:this._interactionState,oldViewState:i})}}},{key:"_onTransition",value:function(t){this.onViewStateChange&&(t.interactionState=this._interactionState,this.onViewStateChange(t))}},{key:"_setInteractionState",value:function(t){Object.assign(this._interactionState,t),this.onStateChange&&this.onStateChange(this._interactionState)}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var A=this.isFunctionKeyPressed(t)||t.rightButton;(this.invertPan||"pan"===this.dragMode)&&(A=!A);var n=this.controllerState[A?"panStart":"rotateStart"]({pos:e});return this._panMove=A,this.updateViewport(n,c,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){return!!this.isDragging()&&(this._panMove?this._onPanMove(t):this._onPanRotate(t))}},{key:"_onPanEnd",value:function(t){return!!this.isDragging()&&(this._panMove?this._onPanMoveEnd(t):this._onPanRotateEnd(t))}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),A=this.controllerState.pan({pos:e});return this.updateViewport(A,c,{isDragging:!0,isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(t){var e=this.inertia;if(this.dragPan&&e&&t.velocity){var A=this.getCenter(t),n=[A[0]+t.velocityX*e/2,A[1]+t.velocityY*e/2],r=this.controllerState.pan({pos:n}).panEnd();this.updateViewport(r,g(g({},this._getTransitionProps()),{},{transitionDuration:e,transitionEasing:I}),{isDragging:!1,isPanning:!0})}else{var i=this.controllerState.panEnd();this.updateViewport(i,null,{isDragging:!1,isPanning:!1})}return!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=this.getCenter(t),A=this.controllerState.rotate({pos:e});return this.updateViewport(A,c,{isDragging:!0,isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(t){var e=this.inertia;if(this.dragRotate&&e&&t.velocity){var A=this.getCenter(t),n=[A[0]+t.velocityX*e/2,A[1]+t.velocityY*e/2],r=this.controllerState.rotate({pos:n}).rotateEnd();this.updateViewport(r,g(g({},this._getTransitionProps()),{},{transitionDuration:e,transitionEasing:I}),{isDragging:!1,isRotating:!0})}else{var i=this.controllerState.rotateEnd();this.updateViewport(i,null,{isDragging:!1,isRotating:!1})}return!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;t.preventDefault();var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var A=this.scrollZoom,n=A.speed,r=void 0===n?.01:n,i=A.smooth,o=void 0!==i&&i,a=t.delta,s=2/(1+Math.exp(-Math.abs(a*r)));a<0&&0!==s&&(s=1/s);var c=this.controllerState.zoom({pos:e,scale:s});return this.updateViewport(c,g(g({},this._getTransitionProps({around:e})),{},{transitionDuration:o?250:1}),{isZooming:!0,isPanning:!0}),!0}},{key:"_onTriplePanStart",value:function(t){var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var A=this.controllerState.rotateStart({pos:e});return this.updateViewport(A,c,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(t){if(!this.touchRotate)return!1;if(!this.isDragging())return!1;var e=this.getCenter(t);e[0]-=t.deltaX;var A=this.controllerState.rotate({pos:e});return this.updateViewport(A,c,{isDragging:!0,isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(t){if(!this.isDragging())return!1;var e=this.inertia;if(this.touchRotate&&e&&t.velocityY){var A=this.getCenter(t),n=[A[0],A[1]+=t.velocityY*e/2],r=this.controllerState.rotate({pos:n});this.updateViewport(r,g(g({},this._getTransitionProps()),{},{transitionDuration:e,transitionEasing:I}),{isDragging:!1,isRotating:!0}),this.blockEvents(e)}else{var i=this.controllerState.rotateEnd();this.updateViewport(i,null,{isDragging:!1,isRotating:!1})}return!0}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var A=this.controllerState.zoomStart({pos:e}).rotateStart({pos:e});return this._startPinchRotation=t.rotation,this._lastPinchEvent=t,this.updateViewport(A,c,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;var e=this.controllerState;if(this.touchZoom){var A=t.scale,n=this.getCenter(t);e=e.zoom({pos:n,scale:A})}if(this.touchRotate){var r=t.rotation;e=e.rotate({deltaAngleX:this._startPinchRotation-r})}return this.updateViewport(e,c,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),this._lastPinchEvent=t,!0}},{key:"_onPinchEnd",value:function(t){if(!this.isDragging())return!1;var e=this.inertia,A=this._lastPinchEvent;if(this.touchZoom&&e&&A&&t.scale!==A.scale){var n=this.getCenter(t),r=this.controllerState.rotateEnd(),i=Math.log2(t.scale),o=(i-Math.log2(A.scale))/(t.deltaTime-A.deltaTime),a=Math.pow(2,i+o*e/2);r=r.zoom({pos:n,scale:a}).zoomEnd(),this.updateViewport(r,g(g({},this._getTransitionProps({around:n})),{},{transitionDuration:e,transitionEasing:I}),{isDragging:!1,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:!1}),this.blockEvents(e)}else{var s=this.controllerState.zoomEnd().rotateEnd();this.updateViewport(s,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1})}return this._startPinchRotation=null,this._lastPinchEvent=null,!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;var A=this.isFunctionKeyPressed(t),n=this.controllerState.zoom({pos:e,scale:A?.5:2});return this.updateViewport(n,this._getTransitionProps({around:e}),{isZooming:!0,isPanning:!0}),this.blockEvents(100),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,A=this.isFunctionKeyPressed(t),n=this.keyboard,r=n.zoomSpeed,i=n.moveSpeed,o=n.rotateSpeedX,a=n.rotateSpeedY,s=this.controllerState,g={};switch(t.srcEvent.code){case"Minus":e=A?s.zoomOut(r).zoomOut(r):s.zoomOut(r),g.isZooming=!0;break;case"Equal":e=A?s.zoomIn(r).zoomIn(r):s.zoomIn(r),g.isZooming=!0;break;case"ArrowLeft":A?(e=s.rotateLeft(o),g.isRotating=!0):(e=s.moveLeft(i),g.isPanning=!0);break;case"ArrowRight":A?(e=s.rotateRight(o),g.isRotating=!0):(e=s.moveRight(i),g.isPanning=!0);break;case"ArrowUp":A?(e=s.rotateUp(a),g.isRotating=!0):(e=s.moveUp(i),g.isPanning=!0);break;case"ArrowDown":A?(e=s.rotateDown(a),g.isRotating=!0):(e=s.moveDown(i),g.isPanning=!0);break;default:return!1}return this.updateViewport(e,this._getTransitionProps(),g),!0}},{key:"_getTransitionProps",value:function(){return c}},{key:"events",set:function(t){this.toggleEvents(this._customEvents,!1),this.toggleEvents(t,!0),this._customEvents=t,this.setProps(this.controllerStateProps)}}]),t}()},function(t,e,A){"use strict";var n=A(1),r=A(26),i=A(5),o=A(4),a=A(115),s=/([0-9]+\.?[0-9]*)(%|px)/;function g(t){switch(Object(r.a)(t)){case"number":return{position:t,relative:!1};case"string":var e=t.match(s);if(e&&e.length>=3){var A="%"===e[2],n=parseFloat(e[1]);return{position:A?n/100:n,relative:A}}default:throw new Error("Could not parse position string ".concat(t))}}function c(t,e){return t.relative?Math.round(t.position*e):t.position}var I=A(168),u=A(55);function l(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function C(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?l(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):l(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}A.d(e,"a",(function(){return h}));var h=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,t);var A=e.id,n=void 0===A?null:A,r=e.x,o=void 0===r?0:r,s=e.y,g=void 0===s?0:s,c=e.width,I=void 0===c?"100%":c,l=e.height,C=void 0===l?"100%":l,h=e.projectionMatrix,B=void 0===h?null:h,f=e.fovy,d=void 0===f?50:f,Q=e.near,E=void 0===Q?.1:Q,p=e.far,y=void 0===p?1e3:p,v=e.modelMatrix,m=void 0===v?null:v,b=e.viewportInstance,F=void 0===b?null:b,w=e.type,S=void 0===w?a.a:w;Object(u.a)(!F||F instanceof a.a),this.viewportInstance=F,this.id=n||this.constructor.displayName||"view",this.type=S,this.props=Object.assign({},e,{id:this.id,projectionMatrix:B,fovy:d,near:E,far:y,modelMatrix:m}),this._parseDimensions({x:o,y:g,width:I,height:C}),this.equals=this.equals.bind(this),Object.seal(this)}return Object(o.a)(t,[{key:"equals",value:function(t){return this===t||(this.viewportInstance?t.viewportInstance&&this.viewportInstance.equals(t.viewportInstance):Object(I.a)(this.props,t.props))}},{key:"makeViewport",value:function(t){var e=t.width,A=t.height,n=t.viewState;if(this.viewportInstance)return this.viewportInstance;n=this.filterViewState(n);var r=this.getDimensions({width:e,height:A});return this._getViewport(n,r)}},{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(t){if(this.props.viewState&&"object"===Object(r.a)(this.props.viewState)){if(!this.props.viewState.id)return this.props.viewState;var e=Object.assign({},t);for(var A in this.props.viewState)"id"!==A&&(e[A]=this.props.viewState[A]);return e}return t}},{key:"getDimensions",value:function(t){var e=t.width,A=t.height;return{x:c(this._x,e),y:c(this._y,A),width:c(this._width,e),height:c(this._height,A)}}},{key:"_getControllerProps",value:function(t){var e=this.props.controller;return e?!0===e?t:("function"===typeof e&&(e={type:e}),Object.assign({},t,e)):null}},{key:"_getViewport",value:function(t,e){return new(0,this.type)(C(C(C({},t),this.props),e))}},{key:"_parseDimensions",value:function(t){var e=t.x,A=t.y,n=t.width,r=t.height;this._x=g(e),this._y=g(A),this._width=g(n),this._height=g(r)}}]),t}()},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIntermediatePosition=function(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]},e.GeoJsonEditMode=void 0;var n=g(A(1010)),r=g(A(848)),i=g(A(1011)),o=g(A(1113)),a=A(245),s=A(359);function g(t){return t&&t.__esModule?t:{default:t}}function c(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||I(t)||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(t,e){if(t){if("string"===typeof t)return u(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function l(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var C={type:"FeatureCollection",features:[]},h=[],B=function(){function t(){var e,A,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=[],(A="_clickSequence")in(e=this)?Object.defineProperty(e,A,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[A]=n}var e,A,g;return e=t,(A=[{key:"getGuides",value:function(t){return C}},{key:"getTooltips",value:function(t){return h}},{key:"getSelectedFeature",value:function(t){return 1===t.selectedIndexes.length?t.data.features[t.selectedIndexes[0]]:null}},{key:"getSelectedGeometry",value:function(t){var e=this.getSelectedFeature(t);return e?e.geometry:null}},{key:"getSelectedFeaturesAsFeatureCollection",value:function(t){var e=t.data.features;return{type:"FeatureCollection",features:t.selectedIndexes.map((function(t){return e[t]}))}}},{key:"getClickSequence",value:function(){return this._clickSequence}},{key:"addClickSequence",value:function(t){var e=t.mapCoords;this._clickSequence.push(e)}},{key:"resetClickSequence",value:function(){this._clickSequence=[]}},{key:"getTentativeGuide",value:function(t){return this.getGuides(t).features.find((function(t){return t.properties&&"tentative"===t.properties.guideType}))}},{key:"isSelectionPicked",value:function(t,e){if(!t.length)return!1;var A=(0,a.getNonGuidePicks)(t).map((function(t){return t.index})),n=(0,a.getPickedEditHandles)(t).map((function(t){return t.properties.featureIndex})),r=new Set([].concat(c(A),c(n)));return e.selectedIndexes.some((function(t){return r.has(t)}))}},{key:"rewindPolygon",value:function(t){var e=t.geometry;return"Polygon"===e.type||"MultiPolygon"===e.type?(0,o.default)(t):t}},{key:"getAddFeatureAction",value:function(t,e){var A=t,n="Feature"===A.type?A:{type:"Feature",properties:{},geometry:A},r=this.rewindPolygon(n),i=new s.ImmutableFeatureCollection(e).addFeature(r).getObject();return{updatedData:i,editType:"addFeature",editContext:{featureIndexes:[i.features.length-1]}}}},{key:"getAddManyFeaturesAction",value:function(t,e){var A,n=t.features,r=new s.ImmutableFeatureCollection(e),i=r.getObject().features.length,o=[],a=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=I(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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 n,r,i=!0,o=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){o=!0,r=t},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw r}}}}(n);try{for(a.s();!(A=a.n()).done;){var g=A.value,c=g.properties,u=g.geometry;r=r.addFeature({type:"Feature",properties:c,geometry:u}),o.push(i+o.length)}}catch(l){a.e(l)}finally{a.f()}return{updatedData:r.getObject(),editType:"addFeature",editContext:{featureIndexes:o}}}},{key:"getAddFeatureOrBooleanPolygonAction",value:function(t,e){var A=t,o=this.getSelectedFeature(e),a=e.modeConfig;if(a&&a.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 g,c="Feature"===A.type?A:{type:"Feature",geometry:A};if("union"===a.booleanOperation)g=(0,n.default)(o,c);else if("difference"===a.booleanOperation)g=(0,r.default)(o,c);else{if("intersection"!==a.booleanOperation)return console.warn("Invalid booleanOperation ".concat(a.booleanOperation)),null;g=(0,i.default)(o,c)}if(!g)return console.warn("Canceling edit. Boolean operation erased entire polygon."),null;var I=e.selectedIndexes[0];return{updatedData:new s.ImmutableFeatureCollection(e.data).replaceGeometry(I,g.geometry).getObject(),editType:"unionGeometry",editContext:{featureIndexes:[I]}}}return this.getAddFeatureAction(t,e.data)}},{key:"createTentativeFeature",value:function(t){return null}},{key:"handleClick",value:function(t,e){}},{key:"handlePointerMove",value:function(t,e){var A=this.createTentativeFeature(e);A&&e.onEdit({updatedData:e.data,editType:"updateTentativeFeature",editContext:{feature:A}})}},{key:"handleStartDragging",value:function(t,e){}},{key:"handleStopDragging",value:function(t,e){}},{key:"handleDragging",value:function(t,e){}},{key:"handleKeyUp",value:function(t,e){"Escape"===t.key&&(this.resetClickSequence(),e.onEdit({updatedData:e.data,editType:"cancelFeature",editContext:{}}))}}])&&l(e.prototype,A),g&&l(e,g),t}();e.GeoJsonEditMode=B},function(t,e,A){"use strict";function n(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r="object"===("undefined"===typeof window?"undefined":n(window))&&"object"===("undefined"===typeof document?"undefined":n(document))&&9===document.nodeType;e.a=r},,,function(t,e,A){"use strict";A.d(e,"c",(function(){return c})),A.d(e,"a",(function(){return I})),A.d(e,"b",(function(){return u})),A.d(e,"d",(function(){return l}));var n=A(142),r=A(146),i=A(84),o=A(75),a=A(264);function s(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return g(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return g(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function c(t,e){if(Object(i.a)(Object(o.d)(t),"setParameters requires a WebGL context"),!Object(a.b)(e)){var A={};for(var r in e){var s=Number(r),g=n.e[r];g&&("string"===typeof g?A[g]=!0:g(t,e[r],s))}var c=t.state&&t.state.cache;if(c)for(var I in A){(0,n.a[I])(t,e,c)}}}function I(t,e){if("number"===typeof(e=e||n.c)){var A=e,r=n.d[A];return r?r(t,A):t.getParameter(A)}var i,o={},a=s(Array.isArray(e)?e:Object.keys(e));try{for(a.s();!(i=a.n()).done;){var g=i.value,c=n.d[g];o[g]=c?c(t,Number(g)):t.getParameter(Number(g))}}catch(I){a.e(I)}finally{a.f()}return o}function u(t){c(t,n.c)}function l(t,e,A){if(Object(a.b)(e))return A(t);var n,i=e.nocatch,o=void 0===i||i;if(Object(r.b)(t),c(t,e),o)n=A(t),Object(r.a)(t);else try{n=A(t)}finally{Object(r.a)(t)}return n}},function(t,e,A){"use strict";A.d(e,"a",(function(){return c}));var n=A(5),r=A(4),i=A(16),o=A(7),a=A(14),s=A(414),g=A(33),c=function(t){function e(){return Object(n.a)(this,e),Object(i.a)(this,Object(o.a)(e).apply(this,arguments))}return Object(a.a)(e,t),Object(r.a)(e,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)this[A]=t[A+e];return this.check()}},{key:"to",value:function(t){return t===this?this:Object(g.m)(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)t[e+A]=this[A];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(g.f)}},{key:"formatString",value:function(t){for(var e="",A=0;A<this.ELEMENTS;++A)e+=(A>0?", ":"")+Object(g.l)(this[A],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!Object(g.j)(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,A){void 0===A&&(A=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var r=t[n];this[n]=r+A*(e[n]-r)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t[A]),e[A]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(g.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 t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"elements",get:function(){return this}}]),e}(Object(s.a)(Array))},function(t,e,A){"use strict";function n(t,e,A){var n=e[0],r=e[1],i=A[3]*n+A[7]*r||1;return t[0]=(A[0]*n+A[4]*r)/i,t[1]=(A[1]*n+A[5]*r)/i,t}function r(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i||1;return t[0]=(A[0]*n+A[4]*r+A[8]*i)/o,t[1]=(A[1]*n+A[5]*r+A[9]*i)/o,t[2]=(A[2]*n+A[6]*r+A[10]*i)/o,t}function i(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t[2]=e[2],t}function o(t,e,A){var n=e[0],r=e[1],i=e[2];return t[0]=A[0]*n+A[3]*r+A[6]*i,t[1]=A[1]*n+A[4]*r+A[7]*i,t[2]=A[2]*n+A[5]*r+A[8]*i,t[3]=e[3],t}A.d(e,"a",(function(){return n})),A.d(e,"c",(function(){return r})),A.d(e,"b",(function(){return i})),A.d(e,"d",(function(){return o}))},function(t,e,A){(function(n){e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;var A="color: "+this.color;e.splice(1,0,A,"color: inherit");var n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(n++,"%c"===t&&(r=n))})),e.splice(r,0,A)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(A){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(A){}!t&&"undefined"!==typeof n&&"env"in n&&(t=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0}).DEBUG);return t},e.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+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=function(){var t=!1;return function(){t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}}(),e.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.log=console.debug||console.log||function(){},t.exports=A(648)(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,A(62))},function(t,e,A){"use strict";function n(t,e,A){var n=e[0],r=e[1],i=A[3]*n+A[7]*r||1;return t[0]=(A[0]*n+A[4]*r)/i,t[1]=(A[1]*n+A[5]*r)/i,t}function r(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i||1;return t[0]=(A[0]*n+A[4]*r+A[8]*i)/o,t[1]=(A[1]*n+A[5]*r+A[9]*i)/o,t[2]=(A[2]*n+A[6]*r+A[10]*i)/o,t}function i(t,e,A){var n=e[0],r=e[1];return t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t[2]=e[2],t}A.d(e,"a",(function(){return n})),A.d(e,"c",(function(){return r})),A.d(e,"b",(function(){return i}))},function(t,e,A){"use strict";var n=A(52),r=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,i=/^([-\w.]+\/[-\w.+]+)/;function o(t){if("string"!==typeof t)return"";var e=t.match(r);return e?e[1]:""}A.d(e,"b",(function(){return s})),A.d(e,"a",(function(){return g}));var a=/\?.*/;function s(t){if(Object(n.i)(t)){var e=function(t){if("string"!==typeof t)return"";var e=t.match(i);return e?e[1]:t}(t.headers.get("content-type")),A=o(t.url);return{url:c(t.url||""),type:e||A||null}}return Object(n.b)(t)?{url:c(t.name||""),type:t.type||""}:"string"===typeof t?{url:c(t),type:o(t)}:{url:"",type:""}}function g(t){return Object(n.i)(t)?t.headers["content-length"]||-1:Object(n.b)(t)?t.size:"string"===typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function c(t){return t.replace(a,"")}},function(t,e,A){var n;!function(){"use strict";var A={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var i=typeof n;if("string"===i||"number"===i)t.push(n);else if(Array.isArray(n)&&n.length){var o=r.apply(null,n);o&&t.push(o)}else if("object"===i)for(var a in n)A.call(n,a)&&n[a]&&t.push(a)}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n)}()},function(t,e,A){"use strict";var n=function(t){return Object.assign(Error(t.message),{name:t.name,stack:t.stack})},r=function(t){return{__error_marker:"$$error",message:t.message,name:t.name,stack:t.stack}},i={deserialize:function(t){return(e=t)&&"object"===typeof e&&"__error_marker"in e&&"$$error"===e.__error_marker?n(t):t;var e},serialize:function(t){return t instanceof Error?r(t):t}};A.d(e,"a",(function(){return a})),A.d(e,"b",(function(){return s}));var o=i;function a(t){return o.deserialize(t)}function s(t){return o.serialize(t)}},function(t,e,A){"use strict";A.d(e,"b",(function(){return r})),A.d(e,"a",(function(){return i}));var n=A(49);function r(t,e){if("string"!==typeof e)return e;var A=Number(e);if(!isNaN(A))return A;var r=t[e=e.replace(/^.*\./,"")];return Object(n.a)(void 0!==r,"Accessing undefined constant GL.".concat(e)),r}function i(t,e){for(var A in e=Number(e),t)if(t[A]===e)return"GL.".concat(A);return String(e)}},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var A=i.default.memo(i.default.forwardRef((function(e,A){return i.default.createElement(o.default,(0,r.default)({ref:A},e),t)})));0;return A.muiName=o.default.muiName,A};var r=n(A(240)),i=n(A(0)),o=n(A(536))},function(t,e,A){"use strict";function n(t,e){if(t===e)return!0;if(Array.isArray(t)){var A=t.length;if(!e||e.length!==A)return!1;for(var n=0;n<A;n++)if(t[n]!==e[n])return!1;return!0}return!1}function r(t){var e,A={};return function(r){for(var i in r)if(!n(r[i],A[i])){e=t(r),A=r;break}return e}}A.d(e,"a",(function(){return r}))},function(t,e,A){var n=A(293),r=A(50);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?r(t):e}},function(t,e){function A(e){return t.exports=A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(e)}t.exports=A},function(t,e,A){var n=A(1220);t.exports=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e,A){"use strict";var n=A(98);A.d(e,"a",(function(){return n.a})),A.d(e,"b",(function(){return n.b})),A.d(e,"c",(function(){return n.c}))},function(t,e,A){"use strict";var n=A(288),r=Object(n.a)();e.a=r},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(5),r=A(4),i=A(16),o=A(7),a=A(14),s=A(226),g=A(33),c=A(36),I=A(27),u=A(119),l=[0,0,0],C=function(t){function e(){var t,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(n.a)(this,e),t=Object(i.a)(this,Object(o.a)(e).call(this,-0,-0,-0)),1===arguments.length&&Object(g.m)(A)?t.copy(A):(g.f.debug&&(Object(c.a)(A),Object(c.a)(r),Object(c.a)(a)),t[0]=A,t[1]=r,t[2]=a),t}return Object(a.a)(e,t),Object(r.a)(e,[{key:"set",value:function(t,e,A){return this[0]=t,this[1]=e,this[2]=A,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return g.f.debug&&(Object(c.a)(t.x),Object(c.a)(t.y),Object(c.a)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"angle",value:function(t){return I.a(this,t)}},{key:"cross",value:function(t){return I.c(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?l:A;return I.k(this,this,n,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?l:A;return I.l(this,this,n,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?l:A;return I.m(this,this,n,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return I.q(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return Object(u.c)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return I.p(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return Object(u.b)(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return I.r(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){return this[2]=Object(c.a)(t)}}]),e}(s.a)},function(t,e,A){"use strict";var n=A(962),r=A(40),i=Object.keys(r.a).map((function(t){return"const int COORDINATE_SYSTEM_".concat(t," = ").concat(r.a[t],";")})).join(""),o=Object.keys(r.c).map((function(t){return"const int PROJECTION_MODE_".concat(t," = ").concat(r.c[t],";")})).join(""),a="".concat(i,"\n").concat(o,"\n\nuniform int project_uCoordinateSystem;\nuniform int project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\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 + 180., 360.0) - 180.;\n  }\n  float y = clamp(lnglat.y, -89.9, 89.9);\n  return vec2(\n    radians(x) + PI,\n    PI + log(tan_fp32(PI * 0.25 + radians(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"),s=A(283),g={};e.a={name:"project",dependencies:[n.a],vs:a,getUniforms:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;return t.viewport?Object(s.b)(t):{}}}},function(t,e,A){"use strict";var n=A(593);e.a=function(t,e){return e?Object(n.a)(t,e,{clone:!1}):t}},function(t,e,A){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n=A(0),r=n.createContext({});e.a=r},function(t,e,A){"use strict";A.d(e,"b",(function(){return s})),A.d(e,"a",(function(){return c}));var n=A(6),r=A.n(n),i=A(11),o=A(52),a=A(182);function s(t){return g.apply(this,arguments)}function g(){return(g=Object(i.a)(r.a.mark((function t(e){var A,n,i,s,g,c,I;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Object(o.i)(e)){t.next=2;break}return t.abrupt("return",e);case 2:return A={},(n=Object(a.a)(e))>=0&&(A["content-length"]=String(n)),i=Object(a.b)(e),s=i.url,(g=i.type)&&(A["content-type"]=g),t.next=9,C(e);case 9:return(c=t.sent)&&(A["x-first-bytes"]=c),"string"===typeof e&&(e=(new TextEncoder).encode(e)),I=new Response(e,{headers:A}),Object.defineProperty(I,"url",{value:s}),t.abrupt("return",I);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function c(t){return I.apply(this,arguments)}function I(){return(I=Object(i.a)(r.a.mark((function t(e){var A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=5;break}return t.next=3,u(e);case 3:throw A=t.sent,new Error(A);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function u(t){return l.apply(this,arguments)}function l(){return(l=Object(i.a)(r.a.mark((function t(e){var A,n,i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,n=e.headers.get("Content-Type"),i=e.statusText,!n.includes("application/json")){t.next=11;break}return t.t0=i,t.t1=" ",t.next=9,e.text();case 9:t.t2=t.sent,i=t.t0+=t.t1.concat.call(t.t1,t.t2);case 11:A=(A+=i).length>60?"".concat(A.slice(60),"..."):A,t.next=17;break;case 15:t.prev=15,t.t3=t.catch(1);case 17:return t.abrupt("return",A);case 18:case"end":return t.stop()}}),t,null,[[1,15]])})))).apply(this,arguments)}function C(t){return h.apply(this,arguments)}function h(){return(h=Object(i.a)(r.a.mark((function t(e){var A,n,i,o;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=5,"string"!==typeof e){t.next=3;break}return t.abrupt("return","data:,".concat(e.slice(0,A)));case 3:if(!(e instanceof Blob)){t.next=8;break}return n=e.slice(0,5),t.next=7,new Promise((function(t){var e=new FileReader;e.onload=function(e){return t(e.target&&e.target.result)},e.readAsDataURL(n)}));case 7:return t.abrupt("return",t.sent);case 8:if(!(e instanceof ArrayBuffer)){t.next=12;break}return i=e.slice(0,A),o=B(i),t.abrupt("return","data:base64,".concat(o));case 12:return t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function B(t){for(var e="",A=new Uint8Array(t),n=0;n<A.byteLength;n++)e+=String.fromCharCode(A[n]);return btoa(e)}},function(t,e,A){"use strict";var n,r=A(5),i=A(56),o=A(4),a=A(14),s=A(16),g=A(7),c=A(94),I=A(1),u="EXT_color_buffer_float",l=(n={},Object(I.a)(n,33189,{bpp:2}),Object(I.a)(n,33190,{gl2:!0,bpp:3}),Object(I.a)(n,36012,{gl2:!0,bpp:4}),Object(I.a)(n,36168,{bpp:1}),Object(I.a)(n,34041,{bpp:4}),Object(I.a)(n,35056,{gl2:!0,bpp:4}),Object(I.a)(n,36013,{gl2:!0,bpp:5}),Object(I.a)(n,32854,{bpp:2}),Object(I.a)(n,36194,{bpp:2}),Object(I.a)(n,32855,{bpp:2}),Object(I.a)(n,33321,{gl2:!0,bpp:1}),Object(I.a)(n,33330,{gl2:!0,bpp:1}),Object(I.a)(n,33329,{gl2:!0,bpp:1}),Object(I.a)(n,33332,{gl2:!0,bpp:2}),Object(I.a)(n,33331,{gl2:!0,bpp:2}),Object(I.a)(n,33334,{gl2:!0,bpp:4}),Object(I.a)(n,33333,{gl2:!0,bpp:4}),Object(I.a)(n,33323,{gl2:!0,bpp:2}),Object(I.a)(n,33336,{gl2:!0,bpp:2}),Object(I.a)(n,33335,{gl2:!0,bpp:2}),Object(I.a)(n,33338,{gl2:!0,bpp:4}),Object(I.a)(n,33337,{gl2:!0,bpp:4}),Object(I.a)(n,33340,{gl2:!0,bpp:8}),Object(I.a)(n,33339,{gl2:!0,bpp:8}),Object(I.a)(n,32849,{gl2:!0,bpp:3}),Object(I.a)(n,32856,{gl2:!0,bpp:4}),Object(I.a)(n,32857,{gl2:!0,bpp:4}),Object(I.a)(n,36220,{gl2:!0,bpp:4}),Object(I.a)(n,36238,{gl2:!0,bpp:4}),Object(I.a)(n,36975,{gl2:!0,bpp:4}),Object(I.a)(n,36214,{gl2:!0,bpp:8}),Object(I.a)(n,36232,{gl2:!0,bpp:8}),Object(I.a)(n,36226,{gl2:!0,bpp:16}),Object(I.a)(n,36208,{gl2:!0,bpp:16}),Object(I.a)(n,33325,{gl2:u,bpp:2}),Object(I.a)(n,33327,{gl2:u,bpp:4}),Object(I.a)(n,34842,{gl2:u,bpp:8}),Object(I.a)(n,33326,{gl2:u,bpp:4}),Object(I.a)(n,33328,{gl2:u,bpp:8}),Object(I.a)(n,34836,{gl2:u,bpp:16}),Object(I.a)(n,35898,{gl2:u,bpp:4}),n),C=A(19),h=A(49);function B(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}function f(t,e,A){var n=A[e];if(!n)return!1;var r=Object(C.j)(t)&&n.gl2||n.gl1;return"string"===typeof r?t.getExtension(r):r}A.d(e,"a",(function(){return d}));var d=function(t){Object(a.a)(A,t);var e=B(A);function A(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,A),(n=e.call(this,t,o)).initialize(o),Object.seal(Object(i.a)(n)),n}return Object(o.a)(A,null,[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{format:null},A=e.format;return!A||f(t,A,l)}},{key:"getSamplesForFormat",value:function(t,e){var A=e.format;return t.getInternalformatParameter(36161,A,32937)}}]),Object(o.a)(A,[{key:"initialize",value:function(t){var e=t.format,A=t.width,n=void 0===A?1:A,r=t.height,i=void 0===r?1:r,o=t.samples,a=void 0===o?0:o;return Object(h.a)(e,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==a&&Object(C.j)(this.gl)?this.gl.renderbufferStorageMultisample(36161,a,e,n,i):this.gl.renderbufferStorage(36161,e,n,i),this.format=e,this.width=n,this.height=i,this.samples=a,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*l[this.format].bpp),this}},{key:"resize",value:function(t){var e=t.width,A=t.height;return e!==this.width||A!==this.height?this.initialize({width:e,height:A,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(t){this.gl.bindRenderbuffer(36161,t)}},{key:"_syncHandle",value:function(t){this.format=this.getParameter(36164),this.width=this.getParameter(36162),this.height=this.getParameter(36163),this.samples=this.getParameter(36011)}},{key:"_getParameter",value:function(t){return this.gl.bindRenderbuffer(36161,this.handle),this.gl.getRenderbufferParameter(36161,t)}}]),A}(c.a)},function(t,e,A){"use strict";(function(t){A.d(e,"b",(function(){return n})),A.d(e,"c",(function(){return r})),A.d(e,"a",(function(){return i}));var n="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",r="undefined"!==typeof window?window:t,i=("undefined"!==typeof t||window,"undefined"!==typeof document&&document,!1);try{var o={get passive(){return i=!0,!0}};r.addEventListener("test",o,o),r.removeEventListener("test",o,o)}catch(a){}}).call(this,A(58))},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(85);function r(t,e,A){if(null!==t)for(var n,i,o,a,s,g,c,I,u=0,l=0,C=t.type,h="FeatureCollection"===C,B="Feature"===C,f=h?t.features.length:1,d=0;d<f;d++){s=(I=!!(c=h?t.features[d].geometry:B?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var Q=0;Q<s;Q++){var E=0,p=0;if(null!==(a=I?c.geometries[Q]:c)){g=a.coordinates;var y=a.type;switch(u=!A||"Polygon"!==y&&"MultiPolygon"!==y?0:1,y){case null:break;case"Point":if(!1===e(g,l,d,E,p))return!1;l++,E++;break;case"LineString":case"MultiPoint":for(n=0;n<g.length;n++){if(!1===e(g[n],l,d,E,p))return!1;l++,"MultiPoint"===y&&E++}"LineString"===y&&E++;break;case"Polygon":case"MultiLineString":for(n=0;n<g.length;n++){for(i=0;i<g[n].length-u;i++){if(!1===e(g[n][i],l,d,E,p))return!1;l++}"MultiLineString"===y&&E++,"Polygon"===y&&p++}"Polygon"===y&&E++;break;case"MultiPolygon":for(n=0;n<g.length;n++){for(p=0,i=0;i<g[n].length;i++){for(o=0;o<g[n][i].length-u;o++){if(!1===e(g[n][i][o],l,d,E,p))return!1;l++}p++}E++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===r(a.geometries[n],e,A))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function i(t,e){var A;switch(t.type){case"FeatureCollection":for(A=0;A<t.features.length&&!1!==e(t.features[A].properties,A);A++);break;case"Feature":e(t.properties,0)}}function o(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var A=0;A<t.features.length&&!1!==e(t.features[A],A);A++);}function a(t,e){var A,n,r,i,o,a,s,g,c,I,u=0,l="FeatureCollection"===t.type,C="Feature"===t.type,h=l?t.features.length:1;for(A=0;A<h;A++){for(a=l?t.features[A].geometry:C?t.geometry:t,g=l?t.features[A].properties:C?t.properties:{},c=l?t.features[A].bbox:C?t.bbox:void 0,I=l?t.features[A].id:C?t.id:void 0,o=(s=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,r=0;r<o;r++)if(null!==(i=s?a.geometries[r]:a))switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(i,u,g,c,I))return!1;break;case"GeometryCollection":for(n=0;n<i.geometries.length;n++)if(!1===e(i.geometries[n],u,g,c,I))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,u,g,c,I))return!1;u++}}function s(t,e){a(t,(function(t,A,r,i,o){var a,s=null===t?null:t.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==e(n.feature(t,r,{bbox:i,id:o}),A,0)&&void 0}switch(s){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon"}for(var g=0;g<t.coordinates.length;g++){var c={type:a,coordinates:t.coordinates[g]};if(!1===e(n.feature(c,r),A,g))return!1}}))}function g(t,e){s(t,(function(t,A,i){var o=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var s,g=0,c=0,I=0;return!1!==r(t,(function(r,a,u,l,C){if(void 0===s||A>g||l>c||C>I)return s=r,g=A,c=l,I=C,void(o=0);var h=n.lineString([s,r],t.properties);if(!1===e(h,A,i,C,o))return!1;o++,s=r}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");s(t,(function(t,A,r){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,A,r,0,0))return!1;break;case"Polygon":for(var a=0;a<o.length;a++)if(!1===e(n.lineString(o[a],t.properties),A,r,a))return!1}}}))}e.coordEach=r,e.coordReduce=function(t,e,A,n){var i=A;return r(t,(function(t,n,r,o,a){i=0===n&&void 0===A?t:e(i,t,n,r,o,a)}),n),i},e.propEach=i,e.propReduce=function(t,e,A){var n=A;return i(t,(function(t,r){n=0===r&&void 0===A?t:e(n,t,r)})),n},e.featureEach=o,e.featureReduce=function(t,e,A){var n=A;return o(t,(function(t,r){n=0===r&&void 0===A?t:e(n,t,r)})),n},e.coordAll=function(t){var e=[];return r(t,(function(t){e.push(t)})),e},e.geomEach=a,e.geomReduce=function(t,e,A){var n=A;return a(t,(function(t,r,i,o,a){n=0===r&&void 0===A?t:e(n,t,r,i,o,a)})),n},e.flattenEach=s,e.flattenReduce=function(t,e,A){var n=A;return s(t,(function(t,r,i){n=0===r&&0===i&&void 0===A?t:e(n,t,r,i)})),n},e.segmentEach=g,e.segmentReduce=function(t,e,A){var n=A,r=!1;return g(t,(function(t,i,o,a,s){n=!1===r&&void 0===A?t:e(n,t,i,o,a,s),r=!0})),n},e.lineEach=c,e.lineReduce=function(t,e,A){var n=A;return c(t,(function(t,r,i,o){n=0===r&&void 0===A?t:e(n,t,r,i,o)})),n},e.findSegment=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var A,r=e.featureIndex||0,i=e.multiFeatureIndex||0,o=e.geometryIndex||0,a=e.segmentIndex||0,s=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),s=s||t.features[r].properties,A=t.features[r].geometry;break;case"Feature":s=s||t.properties,A=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":A=t;break;default:throw new Error("geojson is invalid")}if(null===A)return null;var g=A.coordinates;switch(A.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=g.length+a-1),n.lineString([g[a],g[a+1]],s,e);case"Polygon":return o<0&&(o=g.length+o),a<0&&(a=g[o].length+a-1),n.lineString([g[o][a],g[o][a+1]],s,e);case"MultiLineString":return i<0&&(i=g.length+i),a<0&&(a=g[i].length+a-1),n.lineString([g[i][a],g[i][a+1]],s,e);case"MultiPolygon":return i<0&&(i=g.length+i),o<0&&(o=g[i].length+o),a<0&&(a=g[i][o].length-a-1),n.lineString([g[i][o][a],g[i][o][a+1]],s,e)}throw new Error("geojson is invalid")},e.findPoint=function(t,e){if(e=e||{},!n.isObject(e))throw new Error("options is invalid");var A,r=e.featureIndex||0,i=e.multiFeatureIndex||0,o=e.geometryIndex||0,a=e.coordIndex||0,s=e.properties;switch(t.type){case"FeatureCollection":r<0&&(r=t.features.length+r),s=s||t.features[r].properties,A=t.features[r].geometry;break;case"Feature":s=s||t.properties,A=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":A=t;break;default:throw new Error("geojson is invalid")}if(null===A)return null;var g=A.coordinates;switch(A.type){case"Point":return n.point(g,s,e);case"MultiPoint":return i<0&&(i=g.length+i),n.point(g[i],s,e);case"LineString":return a<0&&(a=g.length+a),n.point(g[a],s,e);case"Polygon":return o<0&&(o=g.length+o),a<0&&(a=g[o].length+a),n.point(g[o][a],s,e);case"MultiLineString":return i<0&&(i=g.length+i),a<0&&(a=g[i].length+a),n.point(g[i][a],s,e);case"MultiPolygon":return i<0&&(i=g.length+i),o<0&&(o=g[i].length+o),a<0&&(a=g[i][o].length-a),n.point(g[i][o][a],s,e)}throw new Error("geojson is invalid")}},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a})),A.d(e,"c",(function(){return s})),A.d(e,"d",(function(){return c}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window,a="object"!==("undefined"===typeof n?"undefined":Object(r.a)(n))||"[object process]"!==String(n)||n.browser,s="function"===typeof importScripts,g="undefined"!==typeof n&&n.version&&n.version.match(/v([0-9]*)/),c=g&&parseFloat(g[1])||0}).call(this,A(58),A(62))},function(t,e,A){"use strict";A.d(e,"a",(function(){return h}));var n=A(5),r=A(4),i=A(14),o=A(16),a=A(7),s=A(411),g=A(19),c=A(333),I=A(43);function u(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return l(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return l(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var h=function(t){Object(i.a)(A,t);var e=C(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"render",value:function(t){var e=this.gl;return Object(g.n)(e,{framebuffer:t.target}),this._drawLayers(t)}},{key:"_drawLayers",value:function(t){var e=t.viewports,A=t.views,n=t.onViewportActive,r=t.clearCanvas,i=void 0===r||r,o=this.gl;i&&function(t){var e=t.drawingBufferWidth,A=t.drawingBufferHeight;Object(g.n)(t,{viewport:[0,0,e,A]}),t.clear(16640)}(o);var a,s=[],c=u(e);try{for(c.s();!(a=c.n()).done;){var I=a.value,l=I.viewport||I,C=A&&A[l.id];n(l);var h=this._getDrawLayerParams(l,t);t.view=C;var B,f=u(l.subViewports||[l]);try{for(f.s();!(B=f.n()).done;){var d=B.value;t.viewport=d;var Q=this._drawLayersInViewport(o,t,h);s.push(Q)}}catch(E){f.e(E)}finally{f.f()}}}catch(E){c.e(E)}finally{c.f()}return s}},{key:"_getDrawLayerParams",value:function(t,e){for(var A=e.layers,n=e.pass,r=void 0===n?"unknown":n,i=e.layerFilter,o=e.effects,a=e.moduleParameters,s=[],g=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=function r(i,o){var a,s=i.props._offset,g=i.id,c=i.parent&&i.parent.id;if(c&&!(c in A)&&r(i.parent,!1),c in n){var I=n[c]=n[c]||t(A[c],A);a=I(i,o),n[g]=I}else Number.isFinite(s)?(a=s+(A[c]||0),n[g]=null):a=e;return o&&a>=e&&(e=a+1),A[g]=a,a};return r}(),c=0;c<A.length;c++){var I=A[c],u=this._shouldDrawLayer(I,t,r,i),l={shouldDrawLayer:u,layerRenderIndex:g(I,u)};u&&(l.moduleParameters=this._getModuleParameters(I,o,r,a),l.layerParameters=this.getLayerParameters(I,c)),s[c]=l}return s}},{key:"_drawLayersInViewport",value:function(t,e,A){var n=e.layers,r=e.onError,i=e.viewport,o=e.view,a=function(t,e){var A=e.viewport,n=t.canvas?t.canvas.clientHeight||t.canvas.height:100,r=A,i=Object(g.e)(t);return[r.x*i,(n-r.y-r.height)*i,r.width*i,r.height*i]}(t,{viewport:i});if(o&&o.props.clear){var s=!0===o.props.clear?{color:!0,depth:!0}:o.props.clear;Object(g.o)(t,{scissorTest:!0,scissor:a},(function(){return Object(c.a)(t,s)}))}var u={totalCount:n.length,visibleCount:0,compositeCount:0,pickableCount:0};Object(g.n)(t,{viewport:a});for(var l=0;l<n.length;l++){var C=n[l],h=A[l],B=h.shouldDrawLayer,f=h.layerRenderIndex,d=h.moduleParameters,Q=h.layerParameters;if(B&&C.props.pickable&&u.pickableCount++,C.isComposite)u.compositeCount++;else if(B){u.visibleCount++,d.viewport=i;try{C.drawLayer({moduleParameters:d,uniforms:{layerIndex:f},parameters:Q})}catch(E){r?r(E,C):I.a.error("error during drawing of ".concat(C),E)()}}}return u}},{key:"shouldDrawLayer",value:function(t){return!0}},{key:"getModuleParameters",value:function(t,e){return null}},{key:"getLayerParameters",value:function(t,e){return t.props.parameters}},{key:"_shouldDrawLayer",value:function(t,e,A,n){var r=this.shouldDrawLayer(t)&&t.props.visible;return r&&n&&(r=n({layer:t,viewport:e,isPicking:A.startsWith("picking"),renderPass:A})),r&&t.activateViewport(e),r}},{key:"_getModuleParameters",value:function(t,e,A,n){var r=Object.assign(Object.create(t.props),{autoWrapLongitude:t.wrapLongitude,viewport:t.context.viewport,mousePosition:t.context.mousePosition,pickingActive:0,devicePixelRatio:Object(g.e)(this.gl)});if(e){var i,o=u(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;Object.assign(r,a.getModuleParameters(t))}}catch(s){o.e(s)}finally{o.f()}}return Object.assign(r,this.getModuleParameters(t,e),n)}}]),A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(224);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(t){return!1}}function i(t,e,A){return(i=r()?Reflect.construct:function(t,e,A){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return A&&Object(n.a)(i,A.prototype),i}).apply(null,arguments)}},function(t,e,A){"use strict";A.d(e,"b",(function(){return r})),A.d(e,"d",(function(){return i})),A.d(e,"a",(function(){return o})),A.d(e,"c",(function(){return a}));var n="card card-body my-2 ".concat("tooltip-ancestor"),r="".concat(n," bg-primary"),i="".concat(n," bg-secondary"),o="".concat(n," bg-black"),a="".concat(r," scroll")},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,A){var n=A(689),r=A(692);t.exports=function(t,e){var A=r(t,e);return n(A)?A:void 0}},function(t,e,A){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];return e.reduce((function(t,e){return null==e?t:function(){for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];t.apply(this,n),e.apply(this,n)}}),(function(){}))}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"c",(function(){return i})),A.d(e,"b",(function(){return o})),A.d(e,"a",(function(){return a}));var n=A(49),r={};function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";r[t]=r[t]||1;var e=r[t]++;return"".concat(t,"-").concat(e)}function o(t){return Object(n.a)("number"===typeof t,"Input must be a number"),t&&0===(t&t-1)}function a(t){var e=!0;for(var A in t){e=!1;break}return e}},function(t,e){var A=Array.isArray;t.exports=A},function(t,e,A){"use strict";var n=A(13),r=A(0),i=A.n(r),o=A(546),a=A(439),s=A.n(a),g=A(941),c=A(907),I=A(10),u=A(30),l=(A(25),A(32)),C=A(66),h=A(41),B=A(239),f=A(64),d=A(822),Q=r.forwardRef((function(t,e){var A=t.classes,n=t.className,i=t.color,o=void 0===i?"primary":i,a=t.component,s=void 0===a?"a":a,g=t.onBlur,c=t.onFocus,h=t.TypographyClasses,Q=t.underline,E=void 0===Q?"hover":Q,p=t.variant,y=void 0===p?"inherit":p,v=Object(u.a)(t,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),m=Object(B.a)(),b=m.isFocusVisible,F=m.onBlurVisible,w=m.ref,S=r.useState(!1),D=S[0],R=S[1],U=Object(f.a)(e,w);return r.createElement(d.a,Object(I.a)({className:Object(l.a)(A.root,A["underline".concat(Object(C.a)(E))],n,D&&A.focusVisible,"button"===s&&A.button),classes:h,color:o,component:s,onBlur:function(t){D&&(F(),R(!1)),g&&g(t)},onFocus:function(t){b(t)&&R(!0),c&&c(t)},ref:U,variant:y},v))})),E=Object(h.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"})(Q),p=A(355),y=A.n(p),v=A(354),m=A.n(v),b=A(438),F=A.n(b),w=A(440),S=A.n(w),D=A(206);function R(t){var e,A,n;return e=t,A=0,n=1,t=(Math.min(Math.max(A,e),n)-A)/(n-A),t=(t-=1)*t*t+1}var U=r.forwardRef((function(t,e){var A,n=t.classes,i=t.className,o=t.color,a=void 0===o?"primary":o,s=t.disableShrink,g=void 0!==s&&s,c=t.size,h=void 0===c?40:c,B=t.style,f=t.thickness,d=void 0===f?3.6:f,Q=t.value,E=void 0===Q?0:Q,p=t.variant,y=void 0===p?"indeterminate":p,v=Object(u.a)(t,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),m={},b={},F={};if("determinate"===y||"static"===y){var w=2*Math.PI*((44-d)/2);m.strokeDasharray=w.toFixed(3),F["aria-valuenow"]=Math.round(E),"static"===y?(m.strokeDashoffset="".concat(((100-E)/100*w).toFixed(3),"px"),b.transform="rotate(-90deg)"):(m.strokeDashoffset="".concat((A=(100-E)/100,A*A*w).toFixed(3),"px"),b.transform="rotate(".concat((270*R(E/70)).toFixed(3),"deg)"))}return r.createElement("div",Object(I.a)({className:Object(l.a)(n.root,i,"inherit"!==a&&n["color".concat(Object(C.a)(a))],{indeterminate:n.indeterminate,static:n.static}[y]),style:Object(I.a)({width:h,height:h},b,{},B),ref:e,role:"progressbar"},F,v),r.createElement("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(44," ").concat(44)},r.createElement("circle",{className:Object(l.a)(n.circle,g&&n.circleDisableShrink,{indeterminate:n.circleIndeterminate,static:n.circleStatic}[y]),style:m,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})))})),G=Object(h.a)((function(t){return{root:{display:"inline-block"},static:{transition:t.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:t.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})(U);function N(){return i.a.createElement("div",{className:"loading-indicator-backdrop"},i.a.createElement("div",{className:"loading-indicator-container"},i.a.createElement(G,null)))}var k=A(254);A.d(e,"a",(function(){return T}));var x=Object(o.a)((function(t){return{iconButton:{border:"none",marginLeft:0,background:"none",color:t.palette.primaryForeground,paddingLeft:"0.25em",paddingRight:"0.25em",borderRadius:"2px","&:hover":{backgroundColor:t.palette.primaryBackgroundLight},"&:first-child":{marginLeft:"0.75em"},"&:last-child":{marginRight:"0.25em"},"& svg":{width:"0.7em",height:"0.7em",verticalAlign:"middle"}},downloadLink:{color:t.palette.primaryForeground}}}));function O(t){var e=t.open;return i.a.createElement(i.a.Fragment,null,i.a.createElement(F.a,null),e?i.a.createElement(m.a,null):i.a.createElement(y.a,null))}function M(t){var e=t.options,A=Object(r.useReducer)((function(t){return!t}),!1),o=Object(n.a)(A,2),a=o[0],s=o[1],g=x();return i.a.createElement(k.b,{open:a,toggle:s,buttonIcon:i.a.createElement(O,{open:a}),buttonClassName:g.iconButton,placement:"bottom-end"},e)}function L(t){var e=t.open;return i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,null),e?i.a.createElement(m.a,null):i.a.createElement(y.a,null))}function _(t){var e=t.urls,A=Object(r.useReducer)((function(t){return!t}),!1),o=Object(n.a)(A,2),a=o[0],s=o[1],c=x();return i.a.createElement(k.b,{open:a,toggle:s,buttonIcon:i.a.createElement(L,{open:a}),buttonClassName:c.iconButton,placement:"bottom-end"},e.map((function(t){var e=t.url,A=t.name;return i.a.createElement(g.a,{dense:!0,key:e},i.a.createElement(E,{underline:"none",href:e,target:"_blank",rel:"noopener",className:c.downloadLink},"Download ",A))})))}function J(t){var e=t.removeGridComponent,A=x();return i.a.createElement(c.a,{onClick:e,size:"small",className:A.iconButton,title:"close"},i.a.createElement(S.a,null))}function T(t){var e=t.title,A=t.info,n=t.children,r=t.isScroll,o=t.isSpatial,a=t.removeGridComponent,s=t.urls,g=t.isReady,c=t.options,I=r?D.c:o?D.a:D.d;return i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:"title d-flex justify-content-between align-items-baseline"},i.a.createElement("div",{className:"justify-content-between d-flex align-items-end"},i.a.createElement("span",null,e)),i.a.createElement("span",{className:"details pl-2 align-items-end"},i.a.createElement("span",{className:"d-flex justify-content-between"},A,c&&i.a.createElement(M,{options:c}),s&&s.length>0&&i.a.createElement(_,{urls:s}),i.a.createElement(J,{removeGridComponent:a})))),i.a.createElement("div",{className:I},!g&&i.a.createElement(N,null),n))}},function(t,e,A){var n=A(201),r=A(622),i=A(430),o=Math.max,a=Math.min;t.exports=function(t,e,A){var s,g,c,I,u,l,C=0,h=!1,B=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var A=s,n=g;return s=g=void 0,C=e,I=t.apply(n,A)}function Q(t){return C=t,u=setTimeout(p,e),h?d(t):I}function E(t){var A=t-l;return void 0===l||A>=e||A<0||B&&t-C>=c}function p(){var t=r();if(E(t))return y(t);u=setTimeout(p,function(t){var A=e-(t-l);return B?a(A,c-(t-C)):A}(t))}function y(t){return u=void 0,f&&s?d(t):(s=g=void 0,I)}function v(){var t=r(),A=E(t);if(s=arguments,g=this,l=t,A){if(void 0===u)return Q(l);if(B)return clearTimeout(u),u=setTimeout(p,e),d(l)}return void 0===u&&(u=setTimeout(p,e)),I}return e=i(e)||0,n(A)&&(h=!!A.leading,c=(B="maxWait"in A)?o(i(A.maxWait)||0,e):c,f="trailing"in A?!!A.trailing:f),v.cancel=function(){void 0!==u&&clearTimeout(u),C=0,s=l=g=u=void 0},v.flush=function(){return void 0===u?I:y(r())},v}},function(t,e,A){"use strict";A.d(e,"b",(function(){return o})),A.d(e,"a",(function(){return a}));var n=A(546),r=A(288),i=A(159),o=Object(n.a)((function(){return{paper:{maxHeight:200,overflow:"auto",zIndex:1500},span:{width:"70px",textAlign:"center",paddingLeft:"2px",paddingRight:"2px"},popper:{zIndex:4}}})),a={dark:Object(r.a)({palette:{type:"dark",primary:i.a,secondary:i.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(r.a)({palette:{type:"light",primary:i.a,secondary:i.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(t,e,A){"use strict";var n={};function r(t,e,A){A||(A=Error);var r=function(t){var A,n;function r(A,n,r){return t.call(this,function(t,A,n){return"string"===typeof e?e:e(t,A,n)}(A,n,r))||this}return n=t,(A=r).prototype=Object.create(n.prototype),A.prototype.constructor=A,A.__proto__=n,r}(A);r.prototype.name=A.name,r.prototype.code=t,n[t]=r}function i(t,e){if(Array.isArray(t)){var A=t.length;return t=t.map((function(t){return String(t)})),A>2?"one of ".concat(e," ").concat(t.slice(0,A-1).join(", "),", or ")+t[A-1]:2===A?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,A){var n,r,o,a,s;if("string"===typeof e&&function(t,e,A){return t.substr(!A||A<0?0:+A,e.length)===e}(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be",o=t,a=" argument",(void 0===s||s>o.length)&&(s=o.length),o.substring(s-a.length,s)===a)r="The ".concat(t," ").concat(n," ").concat(i(e,"type"));else{var g=function(t,e,A){return"number"!==typeof A&&(A=0),!(A+e.length>t.length)&&-1!==t.indexOf(e,A)}(t,".")?"property":"argument";r='The "'.concat(t,'" ').concat(g," ").concat(n," ").concat(i(e,"type"))}return r+=". Received type ".concat(typeof A)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,A){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var A in t)e.push(A);return e};t.exports=g;var r=A(458),i=A(463);A(117)(g,r);for(var o=n(i.prototype),a=0;a<o.length;a++){var s=o[a];g.prototype[s]||(g.prototype[s]=i.prototype[s])}function g(t){if(!(this instanceof g))return new g(t);r.call(this,t),i.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||e.nextTick(I,this)}function I(t){t.end()}Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(g.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(g.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(g.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,A(62))},function(t,e,A){"use strict";var n=A(303),r=Object.keys||function(t){var e=[];for(var A in t)e.push(A);return e};t.exports=I;var i=Object.create(A(257));i.inherits=A(117);var o=A(471),a=A(474);i.inherits(I,o);for(var s=r(a.prototype),g=0;g<s.length;g++){var c=s[g];I.prototype[c]||(I.prototype[c]=a.prototype[c])}function I(t){if(!(this instanceof I))return new I(t);o.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||n.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(I.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),I.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],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}}),t.webpackPolyfill=1),t}},function(t,e,A){"use strict";t.exports=function t(e,A){if(e===A)return!0;if(e&&A&&"object"==typeof e&&"object"==typeof A){if(e.constructor!==A.constructor)return!1;var n,r,i;if(Array.isArray(e)){if((n=e.length)!=A.length)return!1;for(r=n;0!==r--;)if(!t(e[r],A[r]))return!1;return!0}if(e.constructor===RegExp)return e.source===A.source&&e.flags===A.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===A.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===A.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(A).length)return!1;for(r=n;0!==r--;)if(!Object.prototype.hasOwnProperty.call(A,i[r]))return!1;for(r=n;0!==r--;){var o=i[r];if(!t(e[o],A[o]))return!1}return!0}return e!==e&&A!==A}},function(t,e,A){"use strict";function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return I}));var n=A(5),r=A(4),i=A(16),o=A(7),a=A(14),s=A(178),g=A(36),c=A(149),I=function(t){function e(){return Object(n.a)(this,e),Object(i.a)(this,Object(o.a)(e).apply(this,arguments))}return Object(a.a)(e,t),Object(r.a)(e,[{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A){var n=this[A]-t[A];e+=n*n}return Object(g.a)(e)}},{key:"dot",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A)e+=this[A]*t[A];return Object(g.a)(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return Object(c.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),Object(g.a)(this[t])}},{key:"setComponent",value:function(t,e){return Object(c.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}},{key:"x",get:function(){return this[0]},set:function(t){return this[0]=Object(g.a)(t)}},{key:"y",get:function(){return this[1]},set:function(t){return this[1]=Object(g.a)(t)}}]),e}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return E}));var n=A(22),r=A(5),i=A(16),o=A(7),a=A(4),s=A(14),g=A(36),c=A(321),I=A(119),u=A(18),l=A(38),C=A(27),h=A(45),B=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),f=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),d=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}),Q={},E=function(t){function e(t){var A;return Object(r.a)(this,e),A=Object(i.a)(this,Object(o.a)(e).call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0)),1===arguments.length&&Array.isArray(t)?A.copy(t):A.identity(),A}return Object(s.a)(e,t),Object(a.a)(e,[{key:"INDICES",get:function(){return d}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return Q.IDENTITY=Q.IDENTITY||Object.freeze(new e(B)),Q.IDENTITY}},{key:"ZERO",get:function(){return Q.ZERO=Q.ZERO||Object.freeze(new e(f)),Q.ZERO}}]),Object(a.a)(e,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this[9]=g,this[10]=c,this[11]=I,this[12]=u,this[13]=l,this[14]=C,this[15]=h,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=r,this[2]=s,this[3]=u,this[4]=e,this[5]=i,this[6]=g,this[7]=l,this[8]=A,this[9]=o,this[10]=c,this[11]=C,this[12]=n,this[13]=a,this[14]=I,this[15]=h,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(B)}},{key:"fromQuaternion",value:function(t){return u.c(this,t),this.check()}},{key:"frustum",value:function(t){var A=t.left,n=t.right,r=t.bottom,i=t.top,o=t.near,a=t.far;return a===1/0?e._computeInfinitePerspectiveOffCenter(this,A,n,r,i,o):u.d(this,A,n,r,i,o,a),this.check()}},{key:"lookAt",value:function(t,e,A){if(1===arguments.length){var n=t;t=n.eye,e=n.center,A=n.up}return e=e||[0,0,0],A=A||[0,1,0],u.g(this,t,e,A),this.check()}},{key:"ortho",value:function(t){var e=t.left,A=t.right,n=t.bottom,r=t.top,i=t.near,o=void 0===i?.1:i,a=t.far,s=void 0===a?500:a;return u.i(this,e,A,n,r,o,s),this.check()}},{key:"orthographic",value:function(t){var A=t.fovy,n=void 0===A?45*Math.PI/180:A,r=t.aspect,i=void 0===r?1:r,o=t.focalDistance,a=void 0===o?1:o,s=t.near,g=void 0===s?.1:s,c=t.far,I=void 0===c?500:c;if(n>2*Math.PI)throw Error("radians");var u=n/2,l=a*Math.tan(u),C=l*i;return(new e).ortho({left:-C,right:C,bottom:-l,top:l,near:g,far:I})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,A=t.fov,n=void 0===A?45*Math.PI/180:A,r=t.aspect,i=void 0===r?1:r,o=t.near,a=void 0===o?.1:o,s=t.far,g=void 0===s?500:s;if((e=e||n)>2*Math.PI)throw Error("radians");return u.j(this,e,i,a,g),this.check()}},{key:"determinant",value:function(){return u.a(this)}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=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],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*r,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*r,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*r,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*r,t[8]=this[10]*i,t}},{key:"transpose",value:function(){return u.q(this,this),this.check()}},{key:"invert",value:function(){return u.f(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return u.h(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return u.h(this,this,t),this.check()}},{key:"rotateX",value:function(t){return u.l(this,this,t),this.check()}},{key:"rotateY",value:function(t){return u.m(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return u.n(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=Object(n.a)(t,3),A=e[0],r=e[1],i=e[2];return this.rotateX(A).rotateY(r).rotateZ(i)}},{key:"rotateAxis",value:function(t,e){return u.k(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?u.o(this,this,t):u.o(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return u.p(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(e=h.n(e||[-0,-0,-0,-0],t,this),Object(g.b)(e,4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=l.j(e||[-0,-0],t,this);break;case 3:e=C.q(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(g.b)(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=Object(I.a)(e||[-0,-0],t,this);break;case 3:e=Object(I.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(g.b)(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,A){return this.identity().translate([t,e,A])}},{key:"transformPoint",value:function(t,e){return Object(g.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return Object(g.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return Object(g.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,A,n,r,i){var o=2*i/(A-e),a=2*i/(r-n),s=(A+e)/(A-e),g=(r+n)/(r-n),c=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=g,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0,t}}]),e}(c.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(22),r=A(5),i=A(16),o=A(7),a=A(4),s=A(14),g=A(178),c=A(33),I=A(36),u=A(261),l="Unknown Euler angle order";var C=function(t){function e(){var t,A,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.DefaultOrder;(Object(r.a)(this,e),t=Object(i.a)(this,Object(o.a)(e).call(this,-0,-0,-0,-0)),arguments.length>0&&Array.isArray(arguments[0]))?(A=t).fromVector3.apply(A,arguments):t.set(n,a,s,g);return t}return Object(s.a)(e,t),Object(a.a)(e,[{key:"ELEMENTS",get:function(){return 4}}],[{key:"rotationOrder",value:function(t){return e.RotationOrders[t]}},{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 e.ZYX}},{key:"RotationOrders",get:function(){return["ZYX","YXZ","XZY","ZXY","YZX","XYZ"]}}]),Object(a.a)(e,[{key:"fromQuaternion",value:function(t){var A=Object(n.a)(t,4),r=A[0],i=A[1],o=A[2],a=A[3],s=i*i,g=-2*(s+o*o)+1,c=2*(r*i+a*o),I=-2*(r*o-a*i),u=2*(i*o+a*r),l=-2*(r*r+s)+1;return I=(I=I>1?1:I)<-1?-1:I,new e(Math.atan2(u,l),Math.asin(I),Math.atan2(c,g),e.RollPitchYaw)}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=Number.isFinite(t[3])||this.order,this.check()}},{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;return this[0]=t,this[1]=e,this[2]=A,this[3]=Number.isFinite(n)?n:this[3],this.check()}},{key:"validate",value:function(){return(t=this[3])>=0&&t<6&&Number.isFinite(this[0])&&Number.isFinite(this[1])&&Number.isFinite(this[2]);var t}},{key:"toArray",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t}},{key:"toArray4",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t[e]=this[0],t[e+1]=this[1],t[e+2]=this[2],t[e+3]=this[3],t}},{key:"toVector3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[0],t[1]=this[1],t[2]=this[2],t}},{key:"fromVector3",value:function(t,e){return this.set(t[0],t[1],t[2],Number.isFinite(e)?e:this[3])}},{key:"fromArray",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this[0]=t[0+e],this[1]=t[1+e],this[2]=t[2+e],void 0!==t[3]&&(this[3]=t[3]),this.check()}},{key:"fromRollPitchYaw",value:function(t,A,n){return this.set(t,A,n,e.ZYX)}},{key:"fromRotationMatrix",value:function(t){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DefaultOrder;return this._fromRotationMatrix(t,A),this.check()}},{key:"getRotationMatrix",value:function(t){return this._getRotationMatrix(t)}},{key:"getQuaternion",value:function(){var t=new u.a;switch(this[4]){case e.XYZ:return t.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);case e.YXZ:return t.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);case e.ZXY:return t.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);case e.ZYX:return t.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);case e.YZX:return t.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);case e.XZY:return t.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);default:throw new Error(l)}}},{key:"_fromRotationMatrix",value:function(t){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DefaultOrder,n=t.elements,r=n[0],i=n[4],o=n[8],a=n[1],s=n[5],g=n[9],I=n[2],u=n[6],C=n[10];switch(A=A||this[3]){case e.XYZ:this[1]=Math.asin(Object(c.d)(o,-1,1)),Math.abs(o)<.99999?(this[0]=Math.atan2(-g,C),this[2]=Math.atan2(-i,r)):(this[0]=Math.atan2(u,s),this[2]=0);break;case e.YXZ:this[0]=Math.asin(-Object(c.d)(g,-1,1)),Math.abs(g)<.99999?(this[1]=Math.atan2(o,C),this[2]=Math.atan2(a,s)):(this[1]=Math.atan2(-I,r),this[2]=0);break;case e.ZXY:this[0]=Math.asin(Object(c.d)(u,-1,1)),Math.abs(u)<.99999?(this[1]=Math.atan2(-I,C),this[2]=Math.atan2(-i,s)):(this[1]=0,this[2]=Math.atan2(a,r));break;case e.ZYX:this[1]=Math.asin(-Object(c.d)(I,-1,1)),Math.abs(I)<.99999?(this[0]=Math.atan2(u,C),this[2]=Math.atan2(a,r)):(this[0]=0,this[2]=Math.atan2(-i,s));break;case e.YZX:this[2]=Math.asin(Object(c.d)(a,-1,1)),Math.abs(a)<.99999?(this[0]=Math.atan2(-g,s),this[1]=Math.atan2(-I,r)):(this[0]=0,this[1]=Math.atan2(o,C));break;case e.XZY:this[2]=Math.asin(-Object(c.d)(i,-1,1)),Math.abs(i)<.99999?(this[0]=Math.atan2(u,s),this[1]=Math.atan2(o,r)):(this[0]=Math.atan2(-g,C),this[1]=0);break;default:throw new Error(l)}return this[3]=A,this}},{key:"_getRotationMatrix",value:function(t){var A=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],n=this.x,r=this.y,i=this.z,o=Math.cos(n),a=Math.cos(r),s=Math.cos(i),g=Math.sin(n),c=Math.sin(r),I=Math.sin(i);switch(this[3]){case e.XYZ:var u=o*s,C=o*I,h=g*s,B=g*I;A[0]=a*s,A[4]=-a*I,A[8]=c,A[1]=C+h*c,A[5]=u-B*c,A[9]=-g*a,A[2]=B-u*c,A[6]=h+C*c,A[10]=o*a;break;case e.YXZ:var f=a*s,d=a*I,Q=c*s,E=c*I;A[0]=f+E*g,A[4]=Q*g-d,A[8]=o*c,A[1]=o*I,A[5]=o*s,A[9]=-g,A[2]=d*g-Q,A[6]=E+f*g,A[10]=o*a;break;case e.ZXY:var p=a*s,y=a*I,v=c*s,m=c*I;A[0]=p-m*g,A[4]=-o*I,A[8]=v+y*g,A[1]=y+v*g,A[5]=o*s,A[9]=m-p*g,A[2]=-o*c,A[6]=g,A[10]=o*a;break;case e.ZYX:var b=o*s,F=o*I,w=g*s,S=g*I;A[0]=a*s,A[4]=w*c-F,A[8]=b*c+S,A[1]=a*I,A[5]=S*c+b,A[9]=F*c-w,A[2]=-c,A[6]=g*a,A[10]=o*a;break;case e.YZX:var D=o*a,R=o*c,U=g*a,G=g*c;A[0]=a*s,A[4]=G-D*I,A[8]=U*I+R,A[1]=I,A[5]=o*s,A[9]=-g*s,A[2]=-c*s,A[6]=R*I+U,A[10]=D-G*I;break;case e.XZY:var N=o*a,k=o*c,x=g*a,O=g*c;A[0]=a*s,A[4]=-I,A[8]=c*s,A[1]=N*I+O,A[5]=o*s,A[9]=k*I-x,A[2]=x*I-k,A[6]=g*s,A[10]=O*I+N;break;default:throw new Error(l)}return A[3]=0,A[7]=0,A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,A}},{key:"toQuaternion",value:function(){var t=Math.cos(.5*this.yaw),e=Math.sin(.5*this.yaw),A=Math.cos(.5*this.roll),n=Math.sin(.5*this.roll),r=Math.cos(.5*this.pitch),i=Math.sin(.5*this.pitch),o=t*A*r+e*n*i,a=t*n*r-e*A*i,s=t*A*i+e*n*r,g=e*A*r-t*n*i;return new u.a(a,s,g,o)}},{key:"x",get:function(){return this[0]},set:function(t){return this[0]=Object(I.a)(t)}},{key:"y",get:function(){return this[1]},set:function(t){return this[1]=Object(I.a)(t)}},{key:"z",get:function(){return this[2]},set:function(t){return this[2]=Object(I.a)(t)}},{key:"alpha",get:function(){return this[0]},set:function(t){return this[0]=Object(I.a)(t)}},{key:"beta",get:function(){return this[1]},set:function(t){return this[1]=Object(I.a)(t)}},{key:"gamma",get:function(){return this[2]},set:function(t){return this[2]=Object(I.a)(t)}},{key:"phi",get:function(){return this[0]},set:function(t){return this[0]=Object(I.a)(t)}},{key:"theta",get:function(){return this[1]},set:function(t){return this[1]=Object(I.a)(t)}},{key:"psi",get:function(){return this[2]},set:function(t){return this[2]=Object(I.a)(t)}},{key:"roll",get:function(){return this[0]},set:function(t){return this[0]=Object(I.a)(t)}},{key:"pitch",get:function(){return this[1]},set:function(t){return this[1]=Object(I.a)(t)}},{key:"yaw",get:function(){return this[2]},set:function(t){return this[2]=Object(I.a)(t)}},{key:"order",get:function(){return this[3]},set:function(t){return this[3]=function(t){if(t<0&&t>=6)throw new Error(l);return t}(t)}}]),e}(g.a)},function(t,e,A){"use strict";function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n=A(29),r=A(22),i=A(40),o=A(194),a=A(39),s=A(187),g=A(72);function c(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return I(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return I(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var u=Object(s.a)((function(t){var e=t.viewport,A=t.center;return new a.a(e.viewProjectionMatrix).invert().transform(A)})),l=Object(s.a)((function(t){var e,A=t.viewport,i=t.shadowMatrices,o=[],s=A.pixelUnprojectionMatrix,I=A.isGeospatial?void 0:1,u=[[0,0,I],[A.width,0,I],[0,A.height,I],[A.width,A.height,I],[0,0,-1],[A.width,0,-1],[0,A.height,-1],[A.width,A.height,-1]].map((function(t){return function(t,e){var A=Object(r.a)(t,3),n=A[0],i=A[1],o=A[2],a=Object(g.l)([n,i,o],e);if(Number.isFinite(o))return a;return[a[0],a[1],0]}(t,s)})),l=c(i);try{var C=function(){var t=e.value,r=t.clone().translate(new a.c(A.center).negate()),i=u.map((function(t){return r.transform(t)})),s=(new a.a).ortho({left:Math.min.apply(Math,Object(n.a)(i.map((function(t){return t[0]})))),right:Math.max.apply(Math,Object(n.a)(i.map((function(t){return t[0]})))),bottom:Math.min.apply(Math,Object(n.a)(i.map((function(t){return t[1]})))),top:Math.max.apply(Math,Object(n.a)(i.map((function(t){return t[1]})))),near:Math.min.apply(Math,Object(n.a)(i.map((function(t){return-t[2]})))),far:Math.max.apply(Math,Object(n.a)(i.map((function(t){return-t[2]}))))});o.push(s.multiplyRight(t))};for(l.s();!(e=l.n()).done;)C()}catch(h){l.e(h)}finally{l.f()}return o})),C=[0,0,0,1],h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];function B(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A={shadow_uDrawShadowMap:Boolean(t.drawToShadowMap),shadow_uUseShadowMap:!!t.shadowMaps&&t.shadowMaps.length>0,shadow_uColor:t.shadowColor||C,shadow_uLightId:t.shadowLightId||0,shadow_uLightCount:t.shadowMatrices.length},n=u({viewport:t.viewport,center:e.project_uCenter}),r=[],o=l({shadowMatrices:t.shadowMatrices,viewport:t.viewport}).slice(),s=0;s<t.shadowMatrices.length;s++){var g=o[s],c=g.clone().translate(new a.c(t.viewport.center).negate());e.project_uCoordinateSystem===i.a.LNGLAT&&e.project_uProjectionMode===i.c.WEB_MERCATOR?(o[s]=c,r[s]=n):(o[s]=g.clone().multiplyRight(h),r[s]=c.transform(n))}for(var I=0;I<o.length;I++)A["shadow_uViewProjectionMatrices[".concat(I,"]")]=o[I],A["shadow_uProjectCenters[".concat(I,"]")]=r[I],t.shadowMaps&&t.shadowMaps.length>0?A["shadow_uShadowMap".concat(I)]=t.shadowMaps[I]:A["shadow_uShadowMap".concat(I)]=t.dummyShadowMap;return A}e.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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.drawToShadowMap||t.shadowMaps&&t.shadowMaps.length>0){var A={},n=t.shadowEnabled,r=void 0===n||n;return r&&t.shadowMatrices&&t.shadowMatrices.length>0?Object.assign(A,B(t,e)):Object.assign(A,{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1}),A}return{}}}},function(t,e,A){"use strict";var n=A(67),r=A(59),i=A(109),o=A(112),a=A(78),s=A(223);var g=A(328);function c(t){var e="function"===typeof Map?new Map:void 0;return(c=function(t){if(null===t||(A=t,-1===Function.toString.call(A).indexOf("[native code]")))return t;var A;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Object(g.a)(t,arguments,Object(a.a)(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Object(s.a)(n,t)})(t)}var I=A(48),u=A(113);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}A.d(e,"a",(function(){return C}));var C=function(t){Object(i.a)(A,t);var e=l(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)this[A]=t[A+e];return this.check()}},{key:"to",value:function(t){return t===this?this:Object(I.d)(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)t[e+A]=this[A];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(I.a)}},{key:"formatString",value:function(t){for(var e="",A=0;A<this.ELEMENTS;++A)e+=(A>0?", ":"")+Object(I.c)(this[A],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!Object(I.b)(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,A){void 0===A&&(A=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var r=t[n];this[n]=r+A*(e[n]-r)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t[A]),e[A]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(I.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 t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"ELEMENTS",get:function(){return Object(u.a)(!1),0}},{key:"RANK",get:function(){return Object(u.a)(!1),0}},{key:"elements",get:function(){return this}}]),A}(c(Array))},function(t,e,A){"use strict";var n=A(105),r=A(97),i=A(106),o=A(107),a=A(74),s=A(229);var g=A(330);function c(t){var e="function"===typeof Map?new Map:void 0;return(c=function(t){if(null===t||(A=t,-1===Function.toString.call(A).indexOf("[native code]")))return t;var A;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Object(g.a)(t,arguments,Object(a.a)(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Object(s.a)(n,t)})(t)}var I=A(46),u=A(114);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}A.d(e,"a",(function(){return C}));var C=function(t){Object(i.a)(A,t);var e=l(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)this[A]=t[A+e];return this.check()}},{key:"to",value:function(t){return t===this?this:Object(I.f)(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)t[e+A]=this[A];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(I.b)}},{key:"formatString",value:function(t){for(var e="",A=0;A<this.ELEMENTS;++A)e+=(A>0?", ":"")+Object(I.e)(this[A],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!Object(I.d)(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,A){void 0===A&&(A=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var r=t[n];this[n]=r+A*(e[n]-r)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t[A]),e[A]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(I.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 t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"ELEMENTS",get:function(){return Object(u.a)(!1),0}},{key:"RANK",get:function(){return Object(u.a)(!1),0}},{key:"elements",get:function(){return this}}]),A}(c(Array))},function(t,e,A){"use strict";var n=A(5),r=A(56),i=A(4),o=A(14),a=A(16),s=A(7),g=A(19),c=A(118),I=A(49),u="";function l(t,e){return Object(I.a)("string"===typeof t),t=u+t,new Promise((function(A,n){try{var r=new Image;r.onload=function(){return A(r)},r.onerror=function(){return n(new Error("Could not load image ".concat(t,".")))},r.crossOrigin=e&&e.crossOrigin||"anonymous",r.src=t}catch(i){n(i)}}))}function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return h}));var h=function(t){Object(o.a)(A,t);var e=C(A);function A(t){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n.a)(this,A),Object(g.b)(t),(o instanceof Promise||"string"===typeof o)&&(o={data:o}),"string"===typeof o.data&&(o=Object.assign({},o,{data:l(o.data)})),(i=e.call(this,t,Object.assign({},o,{target:3553}))).initialize(o),Object.seal(Object(r.a)(i)),i}return Object(i.a)(A,null,[{key:"isSupported",value:function(t,e){return c.a.isSupported(t,e)}}]),A}(c.a)},function(t,e,A){"use strict";var n=A(263);var r=A(315);function i(t){return function(t){if(Array.isArray(t))return Object(n.a)(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Object(r.a)(t)||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.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";var n,r;A.d(e,"a",(function(){return n})),A.d(e,"b",(function(){return r})),function(t){t.cancel="cancel",t.run="run"}(n||(n={})),function(t){t.error="error",t.init="init",t.result="result",t.running="running",t.uncaughtError="uncaughtError"}(r||(r={}))},function(t,e,A){"use strict";var n,r,i=A(1),o=A(84),a=A(75),s=function(t){return Object(a.e)(t)?void 0:0},g=(n={},Object(i.a)(n,3074,(function(t){return Object(a.e)(t)?void 0:36064})),Object(i.a)(n,35723,(function(t){return Object(a.e)(t)?void 0:4352})),Object(i.a)(n,35977,s),Object(i.a)(n,32937,s),Object(i.a)(n,36795,(function(t,e){var A=Object(a.e)(t)?t.getExtension("EXT_disjoint_timer_query_webgl2"):t.getExtension("EXT_disjoint_timer_query");return A&&A.GPU_DISJOINT_EXT?e(A.GPU_DISJOINT_EXT):0})),Object(i.a)(n,37445,(function(t,e){var A=t.getExtension("WEBGL_debug_renderer_info");return e(A&&A.UNMASKED_VENDOR_WEBGL||7936)})),Object(i.a)(n,37446,(function(t,e){var A=t.getExtension("WEBGL_debug_renderer_info");return e(A&&A.UNMASKED_RENDERER_WEBGL||7937)})),Object(i.a)(n,34047,(function(t,e){var A=t.luma.extensions.EXT_texture_filter_anisotropic;return A?e(A.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1})),Object(i.a)(n,32883,s),Object(i.a)(n,35071,s),Object(i.a)(n,37447,s),Object(i.a)(n,36063,(function(t,e){if(!Object(a.e)(t)){var A=t.getExtension("WEBGL_draw_buffers");return A?e(A.MAX_COLOR_ATTACHMENTS_WEBGL):0}})),Object(i.a)(n,35379,s),Object(i.a)(n,35374,s),Object(i.a)(n,35377,s),Object(i.a)(n,34852,(function(t){if(!Object(a.e)(t)){var e=t.getExtension("WEBGL_draw_buffers");return e?e.MAX_DRAW_BUFFERS_WEBGL:0}})),Object(i.a)(n,36203,(function(t){return t.getExtension("OES_element_index")?2147483647:65535})),Object(i.a)(n,33001,(function(t){return t.getExtension("OES_element_index")?16777216:65535})),Object(i.a)(n,33e3,(function(t){return 16777216})),Object(i.a)(n,37157,s),Object(i.a)(n,35373,s),Object(i.a)(n,35657,s),Object(i.a)(n,36183,s),Object(i.a)(n,37137,s),Object(i.a)(n,34045,s),Object(i.a)(n,35978,s),Object(i.a)(n,35979,s),Object(i.a)(n,35968,s),Object(i.a)(n,35376,s),Object(i.a)(n,35375,s),Object(i.a)(n,35659,s),Object(i.a)(n,37154,s),Object(i.a)(n,35371,s),Object(i.a)(n,35658,s),Object(i.a)(n,35076,s),Object(i.a)(n,35077,s),Object(i.a)(n,35380,s),n);A.d(e,"b",(function(){return c})),A.d(e,"a",(function(){return I}));var c=(r={},Object(i.a)(r,"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(i.a)(r,"ANGLE_instanced_arrays",{meta:{suffix:"ANGLE"},vertexAttribDivisor:function(t,e){Object(o.a)(0===e,"WebGL instanced rendering not supported")},drawElementsInstanced:function(){},drawArraysInstanced:function(){}}),Object(i.a)(r,"WEBGL_draw_buffers",{meta:{suffix:"WEBGL"},drawBuffers:function(){Object(o.a)(!1)}}),Object(i.a)(r,"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(t,e){return this.getQueryObject(t,e)},getQueryParameter:function(t,e){return this.getQueryObject(t,e)},getQueryObject:function(){}}),r),I={readBuffer:function(t,e,A){Object(a.e)(t)&&e(A)},getVertexAttrib:function(t,e,A,n){var r,i=function(t,e){return{webgl2:Object(a.e)(t),ext:t.getExtension(e)}}(t,"ANGLE_instanced_arrays"),o=i.webgl2,s=i.ext;switch(n){case 35069:r=!!o&&void 0;break;case 35070:r=o||s?void 0:0}return void 0!==r?r:e(A,n)},getProgramParameter:function(t,e,A,n){if(!Object(a.e)(t))switch(n){case 35967:return 35981;case 35971:case 35382:return 0}return e(A,n)},getInternalformatParameter:function(t,e,A,n,r){if(!Object(a.e)(t))switch(r){case 32937:return new Int32Array([0])}return t.getInternalformatParameter(A,n,r)},getTexParameter:function(t,e,A,n){switch(n){case 34046:var r=t.luma.extensions.EXT_texture_filter_anisotropic;n=r&&r.TEXTURE_MAX_ANISOTROPY_EXT||34046}return e(A,n)},getParameter:function(t,e,A){var n=g[A],r="function"===typeof n?n(t,e,A):n;return void 0!==r?r:e(A)},hint:function(t,e,A,n){return e(A,n)}}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(1305);Object.defineProperty(e,"Alpha",{enumerable:!0,get:function(){return I(n).default}});var r=A(930);Object.defineProperty(e,"Checkboard",{enumerable:!0,get:function(){return I(r).default}});var i=A(1308);Object.defineProperty(e,"EditableInput",{enumerable:!0,get:function(){return I(i).default}});var o=A(1309);Object.defineProperty(e,"Hue",{enumerable:!0,get:function(){return I(o).default}});var a=A(1311);Object.defineProperty(e,"Raised",{enumerable:!0,get:function(){return I(a).default}});var s=A(1316);Object.defineProperty(e,"Saturation",{enumerable:!0,get:function(){return I(s).default}});var g=A(1106);Object.defineProperty(e,"ColorWrap",{enumerable:!0,get:function(){return I(g).default}});var c=A(1321);function I(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"Swatch",{enumerable:!0,get:function(){return I(c).default}})},function(t,e,A){"use strict";e.a=function(t,e){}},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(0),r=A(68),i=!0,o=!1,a=null,s={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 g(t){t.metaKey||t.altKey||t.ctrlKey||(i=!0)}function c(){i=!1}function I(){"hidden"===this.visibilityState&&o&&(i=!0)}function u(t){var e=t.target;try{return e.matches(":focus-visible")}catch(A){}return i||function(t){var e=t.type,A=t.tagName;return!("INPUT"!==A||!s[e]||t.readOnly)||("TEXTAREA"===A&&!t.readOnly||!!t.isContentEditable)}(e)}function l(){o=!0,window.clearTimeout(a),a=window.setTimeout((function(){o=!1}),100)}function C(){return{isFocusVisible:u,onBlurVisible:l,ref:n.useCallback((function(t){var e,A=r.findDOMNode(t);null!=A&&((e=A.ownerDocument).addEventListener("keydown",g,!0),e.addEventListener("mousedown",c,!0),e.addEventListener("pointerdown",c,!0),e.addEventListener("touchstart",c,!0),e.addEventListener("visibilitychange",I,!0))}),[])}}},function(t,e){function A(){return t.exports=A=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},A.apply(this,arguments)}t.exports=A},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(479),c=A(480),I=A(43),u=A(279),l=A(412),C=A(255),h=A(1),B=A(742),f=A(125);function d(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Q(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Q(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Q(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function E(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function p(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?E(Object(A),!0).forEach((function(e){Object(h.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):E(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function y(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var v=function(t){Object(o.a)(A,t);var e=y(A);function A(t){return Object(n.a)(this,A),e.call(this,p(p({},t),{},{attributes:{positions:{size:3,padding:18,initialize:!0,type:t.fp64?Float64Array:Float32Array},segmentTypes:{size:1,type:Uint8ClampedArray}}}))}return Object(r.a)(A,[{key:"getGeometryFromBuffer",value:function(t){return this.normalize?Object(i.a)(Object(s.a)(A.prototype),"getGeometryFromBuffer",this).call(this,t):function(){return null}}},{key:"normalizeGeometry",value:function(t){return this.normalize?function(t,e,A,n){var r=t;if(Array.isArray(t[0])){var i=t.length*e;r=new Array(i);for(var o=0;o<t.length;o++)for(var a=0;a<e;a++)r[o*e+a]=t[o][a]||0}return A?Object(f.d)(r,{size:e,gridResolution:A}):n?Object(f.e)(r,{size:e}):r}(t,this.positionSize,this.opts.resolution,this.opts.wrapLongitude):t}},{key:"get",value:function(t){return this.attributes[t]}},{key:"getGeometrySize",value:function(t){if(Array.isArray(t[0])){var e,A=0,n=d(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;A+=this.getGeometrySize(r)}}catch(o){n.e(o)}finally{n.f()}return A}var i=this.getPathLength(t);return i<2?0:this.isClosed(t)?i<3?0:i+2:i}},{key:"updateGeometryAttributes",value:function(t,e){if(0!==e.geometrySize)if(t&&Array.isArray(t[0])){var A,n=d(t);try{for(n.s();!(A=n.n()).done;){var r=A.value,i=this.getGeometrySize(r);e.geometrySize=i,this.updateGeometryAttributes(r,e),e.vertexStart+=i}}catch(o){n.e(o)}finally{n.f()}}else this._updateSegmentTypes(t,e),this._updatePositions(t,e)}},{key:"_updateSegmentTypes",value:function(t,e){var A=this.attributes.segmentTypes,n=this.isClosed(t),r=e.vertexStart,i=e.geometrySize;A.fill(0,r,r+i),n?(A[r]=4,A[r+i-2]=4):(A[r]+=1,A[r+i-2]+=2),A[r+i-1]=4}},{key:"_updatePositions",value:function(t,e){var A=this.attributes.positions;if(A)for(var n=e.vertexStart,r=e.geometrySize,i=new Array(3),o=n,a=0;a<r;o++,a++)this.getPointOnPath(t,a,i),A[3*o]=i[0],A[3*o+1]=i[1],A[3*o+2]=i[2]}},{key:"getPathLength",value:function(t){return t.length/this.positionSize}},{key:"getPointOnPath",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=this.positionSize;e*n>=t.length&&(e+=1-t.length/n);var r=e*n;return A[0]=t[r],A[1]=t[r+1],A[2]=3===n&&t[r+2]||0,A}},{key:"isClosed",value:function(t){if(!this.normalize)return this.opts.loop;var e=this.positionSize,A=t.length-e;return t[0]===t[A]&&t[1]===t[A+1]&&(2===e||t[2]===t[A+2])}}]),A}(B.a);function m(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return S}));var b=[0,0,0,255],F={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(t){return t.path}},getColor:{type:"accessor",value:b},getWidth:{type:"accessor",value:1}},w={enter:function(t,e){return e.length?e.subarray(e.length-t.length):t}},S=function(t){Object(o.a)(A,t);var e=m(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){return Object(i.a)(Object(s.a)(A.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:[g.a,c.a]})}},{key:"initializeState",value:function(){var t=this;this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:w,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:w,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:w,defaultValue:b},instancePickingColors:{size:3,type:5121,accessor:function(e,A){var n=A.index,r=A.target;return t.encodePickingColor(e&&e.__source?e.__source.index:n,r)}}}),this.setState({pathTesselator:new v({fp64:this.use64bitPositions()})}),this.props.getDashArray&&!this.props.extensions.length&&I.a.removed("getDashArray","PathStyleExtension")()}},{key:"updateState",value:function(t){var e=t.oldProps,n=t.props,r=t.changeFlags;Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,{props:n,oldProps:e,changeFlags:r});var o=this.getAttributeManager();if(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getPath)){var a=this.state.pathTesselator,g=n.data.attributes||{};a.updateGeometry({data:n.data,geometryBuffer:g.getPath,buffers:g,normalize:!n._pathType,loop:"loop"===n._pathType,getGeometry:n.getPath,positionFormat:n.positionFormat,wrapLongitude:n.wrapLongitude,resolution:this.context.viewport.resolution,dataChanged:r.dataChanged}),this.setState({numInstances:a.instanceCount,startIndices:a.vertexStarts}),r.dataChanged||o.invalidateAll()}if(r.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(t){var e=Object(i.a)(Object(s.a)(A.prototype),"getPickingInfo",this).call(this,t),n=e.index,r=this.props.data;return r[0]&&r[0].__source&&(e.object=r.find((function(t){return t.__source.index===n}))),e}},{key:"disablePickingIndex",value:function(t){var e=this.props.data;if(e[0]&&e[0].__source)for(var A=0;A<e.length;A++)e[A].__source.index===t&&this._disablePickingIndex(A);else this._disablePickingIndex(t)}},{key:"draw",value:function(t){var e=t.uniforms,A=this.context.viewport,n=this.props,r=n.rounded,i=n.billboard,o=n.miterLimit,a=n.widthUnits,s=n.widthScale,g=n.widthMinPixels,c=n.widthMaxPixels,I="pixels"===a?A.metersPerPixel:1;this.state.model.setUniforms(Object.assign({},e,{jointType:Number(r),billboard:i,widthScale:s*I,miterLimit:o,widthMinPixels:g,widthMaxPixels:c})).draw()}},{key:"_getModel",value:function(t){return new l.a(t,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new C.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(t){var e=this.state.pathTesselator;t.startIndices=e.vertexStarts,t.value=e.get("positions")}},{key:"calculateSegmentTypes",value:function(t){var e=this.state.pathTesselator;t.startIndices=e.vertexStarts,t.value=e.get("segmentTypes")}},{key:"wrapLongitude",get:function(){return!1}}]),A}(u.a);S.layerName="PathLayer",S.defaultProps=F},function(t,e,A){var n;!function(A){"use strict";var r=function(t){return.5*(Math.exp(t)+Math.exp(-t))},i=function(t){return.5*(Math.exp(t)-Math.exp(-t))},o=function(){throw SyntaxError("Invalid Param")};function a(t,e){var A=Math.abs(t),n=Math.abs(e);return 0===t?Math.log(n):0===e?Math.log(A):A<3e3&&n<3e3?.5*Math.log(t*t+e*e):Math.log(t/Math.cos(Math.atan2(e,t)))}function s(t,e){if(!(this instanceof s))return new s(t,e);var A=function(t,e){var A={re:0,im:0};if(void 0===t||null===t)A.re=A.im=0;else if(void 0!==e)A.re=t,A.im=e;else switch(typeof t){case"object":if("im"in t&&"re"in t)A.re=t.re,A.im=t.im;else if("abs"in t&&"arg"in t){if(!Number.isFinite(t.abs)&&Number.isFinite(t.arg))return s.INFINITY;A.re=t.abs*Math.cos(t.arg),A.im=t.abs*Math.sin(t.arg)}else if("r"in t&&"phi"in t){if(!Number.isFinite(t.r)&&Number.isFinite(t.phi))return s.INFINITY;A.re=t.r*Math.cos(t.phi),A.im=t.r*Math.sin(t.phi)}else 2===t.length?(A.re=t[0],A.im=t[1]):o();break;case"string":A.im=A.re=0;var n=t.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),r=1,i=0;null===n&&o();for(var a=0;a<n.length;a++){var g=n[a];" "===g||"\t"===g||"\n"===g||("+"===g?r++:"-"===g?i++:"i"===g||"I"===g?(r+i===0&&o()," "===n[a+1]||isNaN(n[a+1])?A.im+=parseFloat((i%2?"-":"")+"1"):(A.im+=parseFloat((i%2?"-":"")+n[a+1]),a++),r=i=0):((r+i===0||isNaN(g))&&o(),"i"===n[a+1]||"I"===n[a+1]?(A.im+=parseFloat((i%2?"-":"")+g),a++):A.re+=parseFloat((i%2?"-":"")+g),r=i=0))}r+i>0&&o();break;case"number":A.im=0,A.re=t;break;default:o()}return isNaN(A.re)||isNaN(A.im),A}(t,e);this.re=A.re,this.im=A.im}s.prototype={re:0,im:0,sign:function(){var t=this.abs();return new s(this.re/t,this.im/t)},add:function(t,e){var A=new s(t,e);return this.isInfinite()&&A.isInfinite()?s.NAN:this.isInfinite()||A.isInfinite()?s.INFINITY:new s(this.re+A.re,this.im+A.im)},sub:function(t,e){var A=new s(t,e);return this.isInfinite()&&A.isInfinite()?s.NAN:this.isInfinite()||A.isInfinite()?s.INFINITY:new s(this.re-A.re,this.im-A.im)},mul:function(t,e){var A=new s(t,e);return this.isInfinite()&&A.isZero()||this.isZero()&&A.isInfinite()?s.NAN:this.isInfinite()||A.isInfinite()?s.INFINITY:0===A.im&&0===this.im?new s(this.re*A.re,0):new s(this.re*A.re-this.im*A.im,this.re*A.im+this.im*A.re)},div:function(t,e){var A=new s(t,e);if(this.isZero()&&A.isZero()||this.isInfinite()&&A.isInfinite())return s.NAN;if(this.isInfinite()||A.isZero())return s.INFINITY;if(this.isZero()||A.isInfinite())return s.ZERO;t=this.re,e=this.im;var n,r,i=A.re,o=A.im;return 0===o?new s(t/i,e/i):Math.abs(i)<Math.abs(o)?new s((t*(r=i/o)+e)/(n=i*r+o),(e*r-t)/n):new s((t+e*(r=o/i))/(n=o*r+i),(e-t*r)/n)},pow:function(t,e){var A=new s(t,e);if(t=this.re,e=this.im,A.isZero())return s.ONE;if(0===A.im){if(0===e&&t>=0)return new s(Math.pow(t,A.re),0);if(0===t)switch((A.re%4+4)%4){case 0:return new s(Math.pow(e,A.re),0);case 1:return new s(0,Math.pow(e,A.re));case 2:return new s(-Math.pow(e,A.re),0);case 3:return new s(0,-Math.pow(e,A.re))}}if(0===t&&0===e&&A.re>0&&A.im>=0)return s.ZERO;var n=Math.atan2(e,t),r=a(t,e);return t=Math.exp(A.re*r-A.im*n),e=A.im*r+A.re*n,new s(t*Math.cos(e),t*Math.sin(e))},sqrt:function(){var t,e,A=this.re,n=this.im,r=this.abs();if(A>=0){if(0===n)return new s(Math.sqrt(A),0);t=.5*Math.sqrt(2*(r+A))}else t=Math.abs(n)/Math.sqrt(2*(r-A));return e=A<=0?.5*Math.sqrt(2*(r-A)):Math.abs(n)/Math.sqrt(2*(r+A)),new s(t,n<0?-e:e)},exp:function(){var t=Math.exp(this.re);return this.im,new s(t*Math.cos(this.im),t*Math.sin(this.im))},expm1:function(){var t=this.re,e=this.im;return new s(Math.expm1(t)*Math.cos(e)+function(t){var e=Math.PI/4;if(t<-e||t>e)return Math.cos(t)-1;var A=t*t;return A*(A*(1/24+A*(-1/720+A*(1/40320+A*(-1/3628800+A*(1/4790014600+A*(-1/87178291200+A*(1/20922789888e3)))))))-.5)}(e),Math.exp(t)*Math.sin(e))},log:function(){var t=this.re,e=this.im;return new s(a(t,e),Math.atan2(e,t))},abs:function(){return function(t,e){var A=Math.abs(t),n=Math.abs(e);return A<3e3&&n<3e3?Math.sqrt(A*A+n*n):(A<n?(A=n,n=t/e):n=e/t,A*Math.sqrt(1+n*n))}(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var t=this.re,e=this.im;return new s(Math.sin(t)*r(e),Math.cos(t)*i(e))},cos:function(){var t=this.re,e=this.im;return new s(Math.cos(t)*r(e),-Math.sin(t)*i(e))},tan:function(){var t=2*this.re,e=2*this.im,A=Math.cos(t)+r(e);return new s(Math.sin(t)/A,i(e)/A)},cot:function(){var t=2*this.re,e=2*this.im,A=Math.cos(t)-r(e);return new s(-Math.sin(t)/A,i(e)/A)},sec:function(){var t=this.re,e=this.im,A=.5*r(2*e)+.5*Math.cos(2*t);return new s(Math.cos(t)*r(e)/A,Math.sin(t)*i(e)/A)},csc:function(){var t=this.re,e=this.im,A=.5*r(2*e)-.5*Math.cos(2*t);return new s(Math.sin(t)*r(e)/A,-Math.cos(t)*i(e)/A)},asin:function(){var t=this.re,e=this.im,A=new s(e*e-t*t+1,-2*t*e).sqrt(),n=new s(A.re-e,A.im+t).log();return new s(n.im,-n.re)},acos:function(){var t=this.re,e=this.im,A=new s(e*e-t*t+1,-2*t*e).sqrt(),n=new s(A.re-e,A.im+t).log();return new s(Math.PI/2-n.im,n.re)},atan:function(){var t=this.re,e=this.im;if(0===t){if(1===e)return new s(0,1/0);if(-1===e)return new s(0,-1/0)}var A=t*t+(1-e)*(1-e),n=new s((1-e*e-t*t)/A,-2*t/A).log();return new s(-.5*n.im,.5*n.re)},acot:function(){var t=this.re,e=this.im;if(0===e)return new s(Math.atan2(1,t),0);var A=t*t+e*e;return 0!==A?new s(t/A,-e/A).atan():new s(0!==t?t/0:0,0!==e?-e/0:0).atan()},asec:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new s(0,1/0);var A=t*t+e*e;return 0!==A?new s(t/A,-e/A).acos():new s(0!==t?t/0:0,0!==e?-e/0:0).acos()},acsc:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new s(Math.PI/2,1/0);var A=t*t+e*e;return 0!==A?new s(t/A,-e/A).asin():new s(0!==t?t/0:0,0!==e?-e/0:0).asin()},sinh:function(){var t=this.re,e=this.im;return new s(i(t)*Math.cos(e),r(t)*Math.sin(e))},cosh:function(){var t=this.re,e=this.im;return new s(r(t)*Math.cos(e),i(t)*Math.sin(e))},tanh:function(){var t=2*this.re,e=2*this.im,A=r(t)+Math.cos(e);return new s(i(t)/A,Math.sin(e)/A)},coth:function(){var t=2*this.re,e=2*this.im,A=r(t)-Math.cos(e);return new s(i(t)/A,-Math.sin(e)/A)},csch:function(){var t=this.re,e=this.im,A=Math.cos(2*e)-r(2*t);return new s(-2*i(t)*Math.cos(e)/A,2*r(t)*Math.sin(e)/A)},sech:function(){var t=this.re,e=this.im,A=Math.cos(2*e)+r(2*t);return new s(2*r(t)*Math.cos(e)/A,-2*i(t)*Math.sin(e)/A)},asinh:function(){var t=this.im;this.im=-this.re,this.re=t;var e=this.asin();return this.re=-this.im,this.im=t,t=e.re,e.re=-e.im,e.im=t,e},acosh:function(){var t=this.acos();if(t.im<=0){var e=t.re;t.re=-t.im,t.im=e}else{e=t.im;t.im=-t.re,t.re=e}return t},atanh:function(){var t=this.re,e=this.im,A=t>1&&0===e,n=1-t,r=1+t,i=n*n+e*e,o=0!==i?new s((r*n-e*e)/i,(e*n+r*e)/i):new s(-1!==t?t/0:0,0!==e?e/0:0),g=o.re;return o.re=a(o.re,o.im)/2,o.im=Math.atan2(o.im,g)/2,A&&(o.im=-o.im),o},acoth:function(){var t=this.re,e=this.im;if(0===t&&0===e)return new s(0,Math.PI/2);var A=t*t+e*e;return 0!==A?new s(t/A,-e/A).atanh():new s(0!==t?t/0:0,0!==e?-e/0:0).atanh()},acsch:function(){var t=this.re,e=this.im;if(0===e)return new s(0!==t?Math.log(t+Math.sqrt(t*t+1)):1/0,0);var A=t*t+e*e;return 0!==A?new s(t/A,-e/A).asinh():new s(0!==t?t/0:0,0!==e?-e/0:0).asinh()},asech:function(){var t=this.re,e=this.im;if(this.isZero())return s.INFINITY;var A=t*t+e*e;return 0!==A?new s(t/A,-e/A).acosh():new s(0!==t?t/0:0,0!==e?-e/0:0).acosh()},inverse:function(){if(this.isZero())return s.INFINITY;if(this.isInfinite())return s.ZERO;var t=this.re,e=this.im,A=t*t+e*e;return new s(t/A,-e/A)},conjugate:function(){return new s(this.re,-this.im)},neg:function(){return new s(-this.re,-this.im)},ceil:function(t){return t=Math.pow(10,t||0),new s(Math.ceil(this.re*t)/t,Math.ceil(this.im*t)/t)},floor:function(t){return t=Math.pow(10,t||0),new s(Math.floor(this.re*t)/t,Math.floor(this.im*t)/t)},round:function(t){return t=Math.pow(10,t||0),new s(Math.round(this.re*t)/t,Math.round(this.im*t)/t)},equals:function(t,e){var A=new s(t,e);return Math.abs(A.re-this.re)<=s.EPSILON&&Math.abs(A.im-this.im)<=s.EPSILON},clone:function(){return new s(this.re,this.im)},toString:function(){var t=this.re,e=this.im,A="";return this.isNaN()?"NaN":this.isZero()?"0":this.isInfinite()?"Infinity":(0!==t&&(A+=t),0!==e&&(0!==t?A+=e<0?" - ":" + ":e<0&&(A+="-"),1!==(e=Math.abs(e))&&(A+=e),A+="i"),A||"0")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){return isNaN(this.re)||isNaN(this.im)})),isZero:function(){return(0===this.re||-0===this.re)&&(0===this.im||-0===this.im)},isFinite:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){return isFinite(this.re)&&isFinite(this.im)})),isInfinite:function(){return!(this.isNaN()||this.isFinite())}},s.ZERO=new s(0,0),s.ONE=new s(1,0),s.I=new s(0,1),s.PI=new s(Math.PI,0),s.E=new s(Math.E,0),s.INFINITY=new s(1/0,1/0),s.NAN=new s(NaN,NaN),s.EPSILON=1e-16,void 0===(n=function(){return s}.apply(e,[]))||(t.exports=n)}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(5),r=A(4),i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(n.a)(this,t);var A=e.id,r=void 0===A?"effect":A;this.id=r,this.props={},Object.assign(this.props,e)}return Object(r.a)(t,[{key:"preRender",value:function(){}},{key:"getModuleParameters",value:function(){}},{key:"cleanup",value:function(){}}]),t}()},function(t,e,A){var n=A(337),r=A(623),i=A(624),o=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?r(t):i(t)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(t))return e;return[255*t[0],255*t[1],255*t[2],255*t[3]]},e.recursivelyTraverseNestedArrays=function t(e,A,n){if(!Array.isArray(e[0]))return!0;for(var r=0;r<e.length;r++)if(t(e[r],[].concat(c(A),[r]),n)){n(e,A);break}return!1},e.generatePointsParallelToLinePoints=function(t,e,A){var a={type:"LineString",coordinates:[t,e]},s=(0,o.point)(A),g=(0,i.default)(s,a),c=(0,r.default)(t,e),I=(A[0]-t[0])*(e[1]-t[1])-(A[1]-t[1])*(e[0]-t[0])<0?c-90:c-270,u=(0,n.default)(e,g,I),l=(0,n.default)(t,g,I);return[u.geometry.coordinates,l.geometry.coordinates]},e.distance2d=l,e.mix=C,e.nearestPointOnProjectedLine=function(t,e,A){var n=new a.default(A),r=t.geometry.coordinates.map((function(t){var e=g(t,3),A=e[0],r=e[1],i=e[2],o=void 0===i?0:i;return n.project([A,r,o])})),i=g(n.project(e.geometry.coordinates),2),o=i[0],s=i[1],c=1/0,I={};r.forEach((function(t,e){var A=g(t,2),n=A[0],i=A[1];if(0!==e){var a=g(r[e-1],2),u=a[0],l=a[1],C=l-i,h=n-u,B=u*i-n*l,f=C*C+h*h,d=Math.abs(C*o+h*s+B)/Math.sqrt(f);d<c&&(c=d,I={index:e,x0:(h*(h*o-C*s)-C*B)/f,y0:(C*(-h*o+C*s)-h*B)/f})}}));var u=I,h=u.index,B=u.x0,f=u.y0,d=g(r[h-1],3),Q=d[0],E=d[1],p=d[2],y=void 0===p?0:p,v=g(r[h],3),m=v[0],b=v[1],F=v[2],w=void 0===F?0:F,S=l(Q,E,m,b),D=l(Q,E,B,f),R=C(y,w,D/S);return{type:"Feature",geometry:{type:"Point",coordinates:n.unproject([B,f,R])},properties:{dist:c,index:h-1}}},e.getPickedEditHandle=function(t){var e=h(t);return e.length?e[0]:null},e.getPickedSnapSourceEditHandle=function(t){return h(t).find((function(t){return"snap-source"===t.properties.editHandleType}))},e.getNonGuidePicks=function(t){return t&&t.filter((function(t){return!t.isGuide}))},e.getPickedExistingEditHandle=function(t){return h(t).find((function(t){var e=t.properties;return e.featureIndex>=0&&"existing"===e.editHandleType}))},e.getPickedIntermediateEditHandle=function(t){return h(t).find((function(t){var e=t.properties;return e.featureIndex>=0&&"intermediate"===e.editHandleType}))},e.getPickedEditHandles=h,e.getEditHandlesForGeometry=function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"existing",n=[];switch(t.type){case"Point":n=[{type:"Feature",properties:{guideType:"editHandle",editHandleType:A,positionIndexes:[],featureIndex:e},geometry:{type:"Point",coordinates:t.coordinates}}];break;case"MultiPoint":case"LineString":n=n.concat(B(t.coordinates,[],e,A));break;case"Polygon":case"MultiLineString":for(var r=0;r<t.coordinates.length;r++)n=n.concat(B(t.coordinates[r],[r],e,A)),"Polygon"===t.type&&(n=n.slice(0,-1));break;case"MultiPolygon":for(var i=0;i<t.coordinates.length;i++)for(var o=0;o<t.coordinates[i].length;o++)n=(n=n.concat(B(t.coordinates[i][o],[i,o],e,A))).slice(0,-1);break;default:throw Error("Unhandled geometry type: ".concat(t.type))}return n};var n=s(A(497)),r=s(A(294)),i=s(A(849)),o=A(85),a=s(A(850));function s(t){return t&&t.__esModule?t:{default:t}}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||I(t,e)||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(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||I(t)||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(t,e){if(t){if("string"===typeof t)return u(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function l(t,e,A,n){var r=t-A,i=e-n;return Math.sqrt(r*r+i*i)}function C(t,e,A){return e*A+t*(1-A)}function h(t){return t&&t.filter((function(t){return t.isGuide&&"editHandle"===t.object.properties.guideType})).map((function(t){return t.object}))||[]}function B(t,e,A){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"existing",r=[],i=0;i<t.length;i++){var o=t[i];r.push({type:"Feature",properties:{guideType:"editHandle",positionIndexes:[].concat(c(e),[i]),featureIndex:A,editHandleType:n},geometry:{type:"Point",coordinates:o}})}return r}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(753),r=A(192);function i(){return Object(n.a)()||r.a}},function(t,e,A){var n=A(772)();t.exports=n},function(t,e,A){"use strict";A.r(e),A.d(e,"UNITS",(function(){return l})),A.d(e,"h3IsValid",(function(){return G})),A.d(e,"h3IsPentagon",(function(){return N})),A.d(e,"h3IsResClassIII",(function(){return k})),A.d(e,"h3GetBaseCell",(function(){return x})),A.d(e,"h3GetFaces",(function(){return O})),A.d(e,"h3GetResolution",(function(){return M})),A.d(e,"geoToH3",(function(){return L})),A.d(e,"h3ToGeo",(function(){return _})),A.d(e,"h3ToGeoBoundary",(function(){return J})),A.d(e,"h3ToParent",(function(){return T})),A.d(e,"h3ToChildren",(function(){return j})),A.d(e,"h3ToCenterChild",(function(){return H})),A.d(e,"kRing",(function(){return Y})),A.d(e,"kRingDistances",(function(){return V})),A.d(e,"hexRing",(function(){return Z})),A.d(e,"polyfill",(function(){return W})),A.d(e,"h3SetToMultiPolygon",(function(){return K})),A.d(e,"compact",(function(){return P})),A.d(e,"uncompact",(function(){return q})),A.d(e,"h3IndexesAreNeighbors",(function(){return X})),A.d(e,"getH3UnidirectionalEdge",(function(){return z})),A.d(e,"getOriginH3IndexFromUnidirectionalEdge",(function(){return $})),A.d(e,"getDestinationH3IndexFromUnidirectionalEdge",(function(){return tt})),A.d(e,"h3UnidirectionalEdgeIsValid",(function(){return et})),A.d(e,"getH3IndexesFromUnidirectionalEdge",(function(){return At})),A.d(e,"getH3UnidirectionalEdgesFromHexagon",(function(){return nt})),A.d(e,"getH3UnidirectionalEdgeBoundary",(function(){return rt})),A.d(e,"h3Distance",(function(){return it})),A.d(e,"h3Line",(function(){return ot})),A.d(e,"experimentalH3ToLocalIj",(function(){return at})),A.d(e,"experimentalLocalIjToH3",(function(){return st})),A.d(e,"pointDist",(function(){return gt})),A.d(e,"cellArea",(function(){return ct})),A.d(e,"exactEdgeLength",(function(){return It})),A.d(e,"hexArea",(function(){return ut})),A.d(e,"edgeLength",(function(){return lt})),A.d(e,"numHexagons",(function(){return Ct})),A.d(e,"getRes0Indexes",(function(){return ht})),A.d(e,"getPentagonIndexes",(function(){return Bt})),A.d(e,"degsToRads",(function(){return ft})),A.d(e,"radsToDegs",(function(){return dt}));var n=function(t){var e,A="undefined"!==typeof(t=t||{})?t:{},n={};for(e in A)A.hasOwnProperty(e)&&(n[e]=A[e]);var r,i=[],o="";document.currentScript&&(o=document.currentScript.src),o=0!==o.indexOf("blob:")?o.substr(0,o.lastIndexOf("/")+1):"",r=function(t,e,A){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){if(200==n.status||0==n.status&&n.response)e(n.response);else{var r=P(t);r?e(r.buffer):A()}},n.onerror=A,n.send(null)};var a=A.print||console.log.bind(console),s=A.printErr||console.warn.bind(console);for(e in n)n.hasOwnProperty(e)&&(A[e]=n[e]);n=null,A.arguments&&(i=A.arguments);var g=0,c=function(){return g};var I=!1;function u(t){var e,n=A["_"+t];return e="Cannot call unknown function "+t+", make sure it is exported",n||st("Assertion failed: "+e),n}function l(t,e,A,n,r){var i={string:function(t){var e=0;if(null!==t&&void 0!==t&&0!==t){var A=1+(t.length<<2);(function(t,e,A){(function(t,e,A,n){if(!(n>0))return 0;for(var r=A,i=A+n-1,o=0;o<t.length;++o){var a=t.charCodeAt(o);if(a>=55296&&a<=57343){var s=t.charCodeAt(++o);a=65536+((1023&a)<<10)|1023&s}if(a<=127){if(A>=i)break;e[A++]=a}else if(a<=2047){if(A+1>=i)break;e[A++]=192|a>>6,e[A++]=128|63&a}else if(a<=65535){if(A+2>=i)break;e[A++]=224|a>>12,e[A++]=128|a>>6&63,e[A++]=128|63&a}else{if(A+3>=i)break;e[A++]=240|a>>18,e[A++]=128|a>>12&63,e[A++]=128|a>>6&63,e[A++]=128|63&a}}e[A]=0})(t,d,e,A)})(t,e=tt(A),A)}return e},array:function(t){var e=tt(t.length);return function(t,e){f.set(t,e)}(t,e),e}};var o=u(t),a=[],s=0;if(n)for(var g=0;g<n.length;g++){var c=i[A[g]];c?(0===s&&(s=At()),a[g]=c(n[g])):a[g]=n[g]}var I=o.apply(null,a);return I=function(t){return"string"===e?h(t):"boolean"===e?Boolean(t):t}(I),0!==s&&et(s),I}var C="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(t,e){return t?function(t,e,A){for(var n=e+A,r=e;t[r]&&!(r>=n);)++r;if(r-e>16&&t.subarray&&C)return C.decode(t.subarray(e,r));for(var i="";e<r;){var o=t[e++];if(128&o){var a=63&t[e++];if(192!=(224&o)){var s=63&t[e++];if((o=224==(240&o)?(15&o)<<12|a<<6|s:(7&o)<<18|a<<12|s<<6|63&t[e++])<65536)i+=String.fromCharCode(o);else{var g=o-65536;i+=String.fromCharCode(55296|g>>10,56320|1023&g)}}else i+=String.fromCharCode((31&o)<<6|a)}else i+=String.fromCharCode(o)}return i}(d,t,e):""}var B,f,d,Q,E,p,y;"undefined"!==typeof TextDecoder&&new TextDecoder("utf-16le");function v(t,e){return t%e>0&&(t+=e-t%e),t}function m(t){B=t,A.HEAP8=f=new Int8Array(t),A.HEAP16=Q=new Int16Array(t),A.HEAP32=E=new Int32Array(t),A.HEAPU8=d=new Uint8Array(t),A.HEAPU16=new Uint16Array(t),A.HEAPU32=new Uint32Array(t),A.HEAPF32=p=new Float32Array(t),A.HEAPF64=y=new Float64Array(t)}var b=A.TOTAL_MEMORY||33554432;function F(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var n=e.func;"number"===typeof n?void 0===e.arg?A.dynCall_v(n):A.dynCall_vi(n,e.arg):n(void 0===e.arg?null:e.arg)}else e()}}b=(B=A.buffer?A.buffer:new ArrayBuffer(b)).byteLength,m(B),E[6004]=5266928;var w=[],S=[],D=[],R=[];var U=Math.abs,G=Math.ceil,N=Math.floor,k=Math.min,x=0,O=null,M=null;A.preloadedImages={},A.preloadedAudios={};var L,_,J=null,T="data:application/octet-stream;base64,";function j(t){return String.prototype.startsWith?t.startsWith(T):0===t.indexOf(T)}J="data:application/octet-stream;base64, ";function H(t){return t}function Y(t){return t.replace(/\b__Z[\w\d_]+/g,(function(t){return t===t?t:t+" ["+t+"]"}))}function V(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function Z(){return f.length}function W(t){try{var e=new ArrayBuffer(t);if(e.byteLength!=t)return;return new Int8Array(e).set(f),$(e),m(e),1}catch(A){}}var K="function"===typeof atob?atob:function(t){var e,A,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="",g=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{e=a.indexOf(t.charAt(g++))<<2|(r=a.indexOf(t.charAt(g++)))>>4,A=(15&r)<<4|(i=a.indexOf(t.charAt(g++)))>>2,n=(3&i)<<6|(o=a.indexOf(t.charAt(g++))),s+=String.fromCharCode(e),64!==i&&(s+=String.fromCharCode(A)),64!==o&&(s+=String.fromCharCode(n))}while(g<t.length);return s};function P(t){if(j(t))return function(t){try{for(var e=K(t),A=new Uint8Array(e.length),n=0;n<e.length;++n)A[n]=e.charCodeAt(n);return A}catch(r){throw new Error("Converting base64 string to bytes failed.")}}(t.slice(T.length))}var q,X,z=function(t,e,A){var n=new t.Int8Array(A),r=new t.Int32Array(A),i=(new t.Uint8Array(A),new t.Float32Array(A),new t.Float64Array(A)),o=0|e.p,a=t.Math.floor,s=t.Math.abs,g=t.Math.sqrt,c=t.Math.pow,I=t.Math.cos,u=t.Math.sin,l=t.Math.tan,C=t.Math.acos,h=t.Math.asin,B=t.Math.atan,f=t.Math.atan2,d=t.Math.ceil,Q=t.Math.imul,E=t.Math.min,p=t.Math.clz32,y=e.b,v=e.c,m=e.d,b=e.e,F=e.f,w=e.g,S=e.h,D=e.i,R=24048;function U(t,e,A,n){var r,i;0|G(t|=0,e|=0,A|=0,n|=0,0)&&(De(0|n,0,(i=1+(0|Q(3*A|0,A+1|0))|0)<<3|0),(r=0|Qe(i,4))&&(N(t,e,A,n,r,i,0),de(r)))}function G(t,e,A,n,i){t|=0,e|=0,A|=0,i|=0;var o,a=0,s=0,g=0,c=0,I=0,u=0,l=0,C=0;if(o=R,R=R+16|0,C=o,r[(a=n|=0)>>2]=t,r[a+4>>2]=e,(a=0!=(0|i))&&(r[i>>2]=0),0|kt(t,e))return R=o,0|(C=1);r[C>>2]=0;t:do{if((0|A)>=1)if(a)for(I=0,u=1,l=1,s=0,a=t;;){if(!(s|I)){if(0==(0|(a=0|k(a,e,4,C)))&0==(0|(e=0|v()))){a=2;break t}if(0|kt(a,e)){a=1;break t}}if(0==(0|(a=0|k(a,e,0|r[16+(I<<2)>>2],C)))&0==(0|(e=0|v()))){a=2;break t}if(r[(t=n+(l<<3)|0)>>2]=a,r[t+4>>2]=e,r[i+(l<<2)>>2]=u,t=(0|(s=s+1|0))==(0|u),c=6==(0|(g=I+1|0)),0|kt(a,e)){a=1;break t}if((0|(u=u+(c&t&1)|0))>(0|A)){a=0;break}I=t?c?0:g:I,l=l+1|0,s=t?0:s}else for(I=0,u=1,l=1,s=0,a=t;;){if(!(s|I)){if(0==(0|(a=0|k(a,e,4,C)))&0==(0|(e=0|v()))){a=2;break t}if(0|kt(a,e)){a=1;break t}}if(0==(0|(a=0|k(a,e,0|r[16+(I<<2)>>2],C)))&0==(0|(e=0|v()))){a=2;break t}if(r[(t=n+(l<<3)|0)>>2]=a,r[t+4>>2]=e,t=(0|(s=s+1|0))==(0|u),c=6==(0|(g=I+1|0)),0|kt(a,e)){a=1;break t}if((0|(u=u+(c&t&1)|0))>(0|A)){a=0;break}I=t?c?0:g:I,l=l+1|0,s=t?0:s}else a=0}while(0);return R=o,0|(C=a)}function N(t,e,A,n,i,o,a){A|=0,n|=0,i|=0,o|=0,a|=0;var s,g,c=0,I=0,u=0,l=0,C=0;if(g=R,R=R+16|0,s=g,0==(0|(t|=0))&0==(0|(e|=0)))R=g;else{if(c=0|ve(0|t,0|e,0|o,((0|o)<0)<<31>>31|0),v(),!(0==(0|(C=0|r[(l=I=n+(c<<3)|0)>>2]))&0==(0|(l=0|r[l+4>>2]))|(u=(0|C)==(0|t)&(0|l)==(0|e))))do{u=(0|(l=0|r[(C=I=n+((c=(c+1|0)%(0|o)|0)<<3)|0)>>2]))==(0|t)&(0|(C=0|r[C+4>>2]))==(0|e)}while(!(0==(0|l)&0==(0|C)|u));c=i+(c<<2)|0,u&&(0|r[c>>2])<=(0|a)||(r[(C=I)>>2]=t,r[C+4>>2]=e,r[c>>2]=a,(0|a)>=(0|A)||(C=a+1|0,r[s>>2]=0,N(l=0|k(t,e,2,s),0|v(),A,n,i,o,C),r[s>>2]=0,N(l=0|k(t,e,3,s),0|v(),A,n,i,o,C),r[s>>2]=0,N(l=0|k(t,e,1,s),0|v(),A,n,i,o,C),r[s>>2]=0,N(l=0|k(t,e,5,s),0|v(),A,n,i,o,C),r[s>>2]=0,N(l=0|k(t,e,4,s),0|v(),A,n,i,o,C),r[s>>2]=0,N(l=0|k(t,e,6,s),0|v(),A,n,i,o,C))),R=g}}function k(t,e,A,n){t|=0,e|=0,A|=0;var i,o,a=0,s=0,g=0,c=0,I=0,u=0,l=0;if((0|r[(n|=0)>>2])>0){a=0;do{A=0|st(A),a=a+1|0}while((0|a)<(0|r[n>>2]))}i=0|me(0|t,0|e,45),v(),o=127&i,s=0|xt(t,e),a=0|me(0|t,0|e,52),v(),a&=15;t:do{if(a)for(;;){if(u=0|me(0|t,0|e,0|(I=3*(15-a|0)|0)),v(),u&=7,l=0==(0|Jt(a)),a=a+-1|0,c=0|be(7,0,0|I),e&=~(0|v()),t=(I=0|be(0|r[(l?464:48)+(28*u|0)+(A<<2)>>2],0,0|I))|t&~c,e|=0|v(),!(A=0|r[(l?672:256)+(28*u|0)+(A<<2)>>2])){A=0;break t}if(!a){g=6;break}}else g=6}while(0);6==(0|g)&&(t|=u=0|be(0|(l=0|r[880+(28*o|0)+(A<<2)>>2]),0,45),e=0|v()|-1040385&e,A=0|r[4304+(28*o|0)+(A<<2)>>2],127==(127&l|0)&&(l=0|be(0|r[880+(28*o|0)+20>>2],0,45),e=0|v()|-1040385&e,A=0|r[4304+(28*o|0)+20>>2],t=0|Mt(l|t,e),e=0|v(),r[n>>2]=1+(0|r[n>>2]))),g=0|me(0|t,0|e,45),v(),g&=127;t:do{if(0|O(g)){e:do{if(1==(0|xt(t,e))){if((0|o)!=(0|g)){if(0|J(g,0|r[7728+(28*o|0)>>2])){t=0|_t(t,e),s=1,e=0|v();break}t=0|Mt(t,e),s=1,e=0|v();break}switch(0|s){case 5:t=0|_t(t,e),e=0|v(),r[n>>2]=5+(0|r[n>>2]),s=0;break e;case 3:t=0|Mt(t,e),e=0|v(),r[n>>2]=1+(0|r[n>>2]),s=0;break e;default:return l=0,y(0|(u=0)),0|l}}else s=0}while(0);if((0|A)>0){a=0;do{t=0|Ot(t,e),e=0|v(),a=a+1|0}while((0|a)!=(0|A))}if((0|o)!=(0|g)){if(!(0|M(g))){if(0!=(0|s)|5!=(0|xt(t,e)))break;r[n>>2]=1+(0|r[n>>2]);break}switch(127&i){case 8:case 118:break t}3!=(0|xt(t,e))&&(r[n>>2]=1+(0|r[n>>2]))}}else if((0|A)>0){a=0;do{t=0|Mt(t,e),e=0|v(),a=a+1|0}while((0|a)!=(0|A))}}while(0);return r[n>>2]=((0|r[n>>2])+A|0)%6|0,l=t,y(0|(u=e)),0|l}function x(t,e,A,n,o,a){e|=0,A|=0,n|=0,o|=0,a|=0;var s,g,c,I,u,l,C,h,B,f=0,d=0,Q=0,E=0,p=0,y=0,m=0,b=0,F=0,w=0,S=0,D=0,U=0,G=0;if(B=R,R=R+48|0,l=B+32|0,C=B+16|0,h=B,(0|(f=0|r[(t|=0)>>2]))<=0)return R=B,0|(D=0);s=t+4|0,g=l+8|0,c=C+8|0,I=h+8|0,u=((0|e)<0)<<31>>31,S=0;t:for(;;){F=(d=0|r[s>>2])+(S<<4)|0,r[l>>2]=r[F>>2],r[l+4>>2]=r[F+4>>2],r[l+8>>2]=r[F+8>>2],r[l+12>>2]=r[F+12>>2],(0|S)==(f+-1|0)?(r[C>>2]=r[d>>2],r[C+4>>2]=r[d+4>>2],r[C+8>>2]=r[d+8>>2],r[C+12>>2]=r[d+12>>2]):(F=d+(S+1<<4)|0,r[C>>2]=r[F>>2],r[C+4>>2]=r[F+4>>2],r[C+8>>2]=r[F+8>>2],r[C+12>>2]=r[F+12>>2]),F=0|Z(l,C,A);e:do{if((0|F)>0){w=+(0|F),b=0;A:for(;;){G=+(F-b|0),U=+(0|b),i[h>>3]=+i[l>>3]*G/w+ +i[C>>3]*U/w,i[I>>3]=+i[g>>3]*G/w+ +i[c>>3]*U/w,d=0|ve(0|(y=0|Tt(h,A)),0|(m=0|v()),0|e,0|u),v(),E=0|r[(Q=f=a+(d<<3)|0)>>2],Q=0|r[Q+4>>2];n:do{if(0==(0|E)&0==(0|Q))D=14;else for(p=0;;){if((0|p)>(0|e)){f=1;break n}if((0|E)==(0|y)&(0|Q)==(0|m)){f=7;break n}if(0==(0|(E=0|r[(Q=f=a+((d=(d+1|0)%(0|e)|0)<<3)|0)>>2]))&0==(0|(Q=0|r[Q+4>>2]))){D=14;break}p=p+1|0}}while(0);switch(14==(0|D)&&(D=0,0==(0|y)&0==(0|m)?f=7:(r[f>>2]=y,r[f+4>>2]=m,f=0|r[n>>2],r[(p=o+(f<<3)|0)>>2]=y,r[p+4>>2]=m,r[n>>2]=f+1,f=0)),7&f){case 7:case 0:break;default:break A}if((0|F)<=(0|(b=b+1|0))){D=8;break e}}if(0|f){f=-1,D=20;break t}}else D=8}while(0);if(8==(0|D)&&(D=0),(0|(S=S+1|0))>=(0|(f=0|r[t>>2]))){f=0,D=20;break}}return 20==(0|D)?(R=B,0|f):0}function O(t){return 0|r[7728+(28*(t|=0)|0)+16>>2]}function M(t){return 4==(0|(t|=0))|117==(0|t)|0}function L(t){return 0|r[11152+(216*(0|r[(t|=0)>>2])|0)+(72*(0|r[t+4>>2])|0)+(24*(0|r[t+8>>2])|0)+(r[t+12>>2]<<3)>>2]}function _(t){return 0|r[11152+(216*(0|r[(t|=0)>>2])|0)+(72*(0|r[t+4>>2])|0)+(24*(0|r[t+8>>2])|0)+(r[t+12>>2]<<3)+4>>2]}function J(t,e){return e|=0,(0|r[7728+(28*(t|=0)|0)+20>>2])==(0|e)?0|(e=1):0|(e=(0|r[7728+(28*t|0)+24>>2])==(0|e))}function T(t,e){return 0|r[880+(28*(t|=0)|0)+((e|=0)<<2)>>2]}function j(t,e){return e|=0,(0|r[880+(28*(t|=0)|0)>>2])==(0|e)?0|(e=0):(0|r[880+(28*t|0)+4>>2])==(0|e)?0|(e=1):(0|r[880+(28*t|0)+8>>2])==(0|e)?0|(e=2):(0|r[880+(28*t|0)+12>>2])==(0|e)?0|(e=3):(0|r[880+(28*t|0)+16>>2])==(0|e)?0|(e=4):(0|r[880+(28*t|0)+20>>2])==(0|e)?0|(e=5):0|((0|r[880+(28*t|0)+24>>2])==(0|e)?6:7)}function H(t){return+i[(t|=0)+16>>3]<+i[t+24>>3]|0}function Y(t,e){t|=0;var A,n,r=0;return(r=+i[(e|=0)>>3])>=+i[t+8>>3]&&r<=+i[t>>3]?(A=+i[t+16>>3],r=+i[t+24>>3],e=(n=+i[e+8>>3])>=r,t=n<=A&1,A<r?e&&(t=1):e||(t=0),0|(e=0!=(0|t))):0|(e=0)}function V(t,e){t|=0,e|=0;var A,n,o,a,g,c,I=0,u=0;a=R,R=R+288|0,A=a+264|0,n=a+96|0,u=(I=o=a)+96|0;do{r[I>>2]=0,I=I+4|0}while((0|I)<(0|u));return Zt(e,o),Yt(u=0|r[(I=o)>>2],I=0|r[I+4>>2],A),Vt(u,I,n),g=+St(A,n+8|0),i[A>>3]=+i[t>>3],i[(I=A+8|0)>>3]=+i[t+16>>3],i[n>>3]=+i[t+8>>3],i[(u=n+8|0)>>3]=+i[t+24>>3],c=+St(A,n),u=~~+d(+c*c/+Fe(+ +s(+(+i[I>>3]-+i[u>>3])/(+i[A>>3]-+i[n>>3])),3)/(g*(2.59807621135*g)*.8)),R=a,0|(0==(0|u)?1:u)}function Z(t,e,A){t|=0,e|=0,A|=0;var n,i,o,a,s,g=0,c=0;a=R,R=R+288|0,n=a+264|0,i=a+96|0,c=(g=o=a)+96|0;do{r[g>>2]=0,g=g+4|0}while((0|g)<(0|c));return Zt(A,o),Yt(g=0|r[(c=o)>>2],c=0|r[c+4>>2],n),Vt(g,c,i),s=+St(n,i+8|0),c=~~+d(+ +St(t,e)/(2*s)),R=a,0|(0==(0|c)?1:c)}function W(t,e,A,n){e|=0,A|=0,n|=0,r[(t|=0)>>2]=e,r[t+4>>2]=A,r[t+8>>2]=n}function K(t,e){t|=0;var A,n,o,a,g=0,c=0,I=0,u=0,l=0,C=0,h=0;r[(a=(e|=0)+8|0)>>2]=0,n=+i[t>>3],u=+s(+n),o=+i[t+8>>3],u+=.5*(l=+s(+o)/.8660254037844386),u-=+(0|(g=~~u)),l-=+(0|(t=~~l));do{if(u<.5){if(u<.3333333333333333){if(r[e>>2]=g,l<.5*(u+1)){r[e+4>>2]=t;break}t=t+1|0,r[e+4>>2]=t;break}if(t=(1&!(l<(h=1-u)))+t|0,r[e+4>>2]=t,h<=l&l<2*u){g=g+1|0,r[e>>2]=g;break}r[e>>2]=g;break}if(!(u<.6666666666666666)){if(g=g+1|0,r[e>>2]=g,l<.5*u){r[e+4>>2]=t;break}t=t+1|0,r[e+4>>2]=t;break}if(l<1-u){if(r[e+4>>2]=t,2*u-1<l){r[e>>2]=g;break}}else t=t+1|0,r[e+4>>2]=t;g=g+1|0,r[e>>2]=g}while(0);do{if(n<0){if(1&t){g=~~(+(0|g)-(2*(+((C=0|Ee(0|g,((0|g)<0)<<31>>31|0,0|(C=(t+1|0)/2|0),((0|C)<0)<<31>>31|0))>>>0)+4294967296*+(0|v()))+1)),r[e>>2]=g;break}g=~~(+(0|g)-2*(+((C=0|Ee(0|g,((0|g)<0)<<31>>31|0,0|(C=(0|t)/2|0),((0|C)<0)<<31>>31|0))>>>0)+4294967296*+(0|v()))),r[e>>2]=g;break}}while(0);C=e+4|0,o<0&&(g=g-((1|t<<1)/2|0)|0,r[e>>2]=g,t=0-t|0,r[C>>2]=t),c=t-g|0,(0|g)<0?(I=0-g|0,r[C>>2]=c,r[a>>2]=I,r[e>>2]=0,t=c,g=0):I=0,(0|t)<0&&(g=g-t|0,r[e>>2]=g,I=I-t|0,r[a>>2]=I,r[C>>2]=0,t=0),A=g-I|0,c=t-I|0,(0|I)<0&&(r[e>>2]=A,r[C>>2]=c,r[a>>2]=0,t=c,g=A,I=0),(0|(c=(0|I)<(0|(c=(0|t)<(0|g)?t:g))?I:c))<=0||(r[e>>2]=g-c,r[C>>2]=t-c,r[a>>2]=I-c)}function P(t){var e,A=0,n=0,i=0,o=0,a=0;A=0|r[(t|=0)>>2],n=0|r[(e=t+4|0)>>2],(0|A)<0&&(n=n-A|0,r[e>>2]=n,r[(a=t+8|0)>>2]=(0|r[a>>2])-A,r[t>>2]=0,A=0),(0|n)<0?(A=A-n|0,r[t>>2]=A,o=(0|r[(a=t+8|0)>>2])-n|0,r[a>>2]=o,r[e>>2]=0,n=0):(a=o=t+8|0,o=0|r[o>>2]),(0|o)<0&&(A=A-o|0,r[t>>2]=A,n=n-o|0,r[e>>2]=n,r[a>>2]=0,o=0),(0|(i=(0|o)<(0|(i=(0|n)<(0|A)?n:A))?o:i))<=0||(r[t>>2]=A-i,r[e>>2]=n-i,r[a>>2]=o-i)}function q(t,e){e|=0;var A,n;n=0|r[(t|=0)+8>>2],A=+((0|r[t+4>>2])-n|0),i[e>>3]=+((0|r[t>>2])-n|0)-.5*A,i[e+8>>3]=.8660254037844386*A}function X(t,e,A){t|=0,e|=0,r[(A|=0)>>2]=(0|r[e>>2])+(0|r[t>>2]),r[A+4>>2]=(0|r[e+4>>2])+(0|r[t+4>>2]),r[A+8>>2]=(0|r[e+8>>2])+(0|r[t+8>>2])}function z(t,e,A){t|=0,e|=0,r[(A|=0)>>2]=(0|r[t>>2])-(0|r[e>>2]),r[A+4>>2]=(0|r[t+4>>2])-(0|r[e+4>>2]),r[A+8>>2]=(0|r[t+8>>2])-(0|r[e+8>>2])}function $(t,e){e|=0;var A,n=0;n=0|Q(0|r[(t|=0)>>2],e),r[t>>2]=n,A=0|Q(0|r[(n=t+4|0)>>2],e),r[n>>2]=A,e=0|Q(0|r[(t=t+8|0)>>2],e),r[t>>2]=e}function tt(t){var e,A,n=0,i=0,o=0,a=0,s=0;s=(0|(A=0|r[(t|=0)>>2]))<0,t=(t=(i=(0|(a=((e=(0|(o=(0|r[t+4>>2])-(s?A:0)|0))<0)?0-o|0:0)+((0|r[t+8>>2])-(s?A:0))|0))<0)?0:a)-((o=(0|(i=(0|t)<(0|(i=(0|(n=(e?0:o)-(i?a:0)|0))<(0|(a=(s?0:A)-(e?o:0)-(i?a:0)|0))?n:a))?t:i))>0)?i:0)|0,n=n-(o?i:0)|0;t:do{switch(a-(o?i:0)|0){case 0:switch(0|n){case 0:return 0|(s=0==(0|t)?0:1==(0|t)?1:7);case 1:return 0|(s=0==(0|t)?2:1==(0|t)?3:7);default:break t}case 1:switch(0|n){case 0:return 0|(s=0==(0|t)?4:1==(0|t)?5:7);case 1:if(t)break t;return 0|(t=6);default:break t}}}while(0);return 0|(s=7)}function et(t){var e,A,n=0,i=0,o=0,a=0,s=0;i=0|r[(e=(t|=0)+8|0)>>2],o=0|Be(+((3*(n=(0|r[t>>2])-i|0)|0)-(i=(0|r[(A=t+4|0)>>2])-i|0)|0)/7),r[t>>2]=o,n=0|Be(+((i<<1)+n|0)/7),r[A>>2]=n,r[e>>2]=0,i=n-o|0,(0|o)<0?(s=0-o|0,r[A>>2]=i,r[e>>2]=s,r[t>>2]=0,n=i,o=0,i=s):i=0,(0|n)<0&&(o=o-n|0,r[t>>2]=o,i=i-n|0,r[e>>2]=i,r[A>>2]=0,n=0),s=o-i|0,a=n-i|0,(0|i)<0?(r[t>>2]=s,r[A>>2]=a,r[e>>2]=0,n=a,a=s,i=0):a=o,(0|(o=(0|i)<(0|(o=(0|n)<(0|a)?n:a))?i:o))<=0||(r[t>>2]=a-o,r[A>>2]=n-o,r[e>>2]=i-o)}function At(t){var e,A,n=0,i=0,o=0,a=0,s=0;i=0|r[(e=(t|=0)+8|0)>>2],o=0|Be(+(((n=(0|r[t>>2])-i|0)<<1)+(i=(0|r[(A=t+4|0)>>2])-i|0)|0)/7),r[t>>2]=o,n=0|Be(+((3*i|0)-n|0)/7),r[A>>2]=n,r[e>>2]=0,i=n-o|0,(0|o)<0?(s=0-o|0,r[A>>2]=i,r[e>>2]=s,r[t>>2]=0,n=i,o=0,i=s):i=0,(0|n)<0&&(o=o-n|0,r[t>>2]=o,i=i-n|0,r[e>>2]=i,r[A>>2]=0,n=0),s=o-i|0,a=n-i|0,(0|i)<0?(r[t>>2]=s,r[A>>2]=a,r[e>>2]=0,n=a,a=s,i=0):a=o,(0|(o=(0|i)<(0|(o=(0|n)<(0|a)?n:a))?i:o))<=0||(r[t>>2]=a-o,r[A>>2]=n-o,r[e>>2]=i-o)}function nt(t){var e,A,n,i=0,o=0,a=0,s=0;i=0|r[(t|=0)>>2],o=0|r[(A=t+4|0)>>2],a=0|r[(n=t+8|0)>>2],s=o+(3*i|0)|0,r[t>>2]=s,o=a+(3*o|0)|0,r[A>>2]=o,i=(3*a|0)+i|0,r[n>>2]=i,a=o-s|0,(0|s)<0?(i=i-s|0,r[A>>2]=a,r[n>>2]=i,r[t>>2]=0,o=a,a=0):a=s,(0|o)<0&&(a=a-o|0,r[t>>2]=a,i=i-o|0,r[n>>2]=i,r[A>>2]=0,o=0),e=a-i|0,s=o-i|0,(0|i)<0?(r[t>>2]=e,r[A>>2]=s,r[n>>2]=0,a=e,i=0):s=o,(0|(o=(0|i)<(0|(o=(0|s)<(0|a)?s:a))?i:o))<=0||(r[t>>2]=a-o,r[A>>2]=s-o,r[n>>2]=i-o)}function rt(t){var e,A,n,i=0,o=0,a=0,s=0;s=0|r[(t|=0)>>2],a=(3*(i=0|r[(A=t+4|0)>>2])|0)+s|0,s=(o=0|r[(n=t+8|0)>>2])+(3*s|0)|0,r[t>>2]=s,r[A>>2]=a,i=(3*o|0)+i|0,r[n>>2]=i,o=a-s|0,(0|s)<0?(i=i-s|0,r[A>>2]=o,r[n>>2]=i,r[t>>2]=0,s=0):o=a,(0|o)<0&&(s=s-o|0,r[t>>2]=s,i=i-o|0,r[n>>2]=i,r[A>>2]=0,o=0),e=s-i|0,a=o-i|0,(0|i)<0?(r[t>>2]=e,r[A>>2]=a,r[n>>2]=0,s=e,i=0):a=o,(0|(o=(0|i)<(0|(o=(0|a)<(0|s)?a:s))?i:o))<=0||(r[t>>2]=s-o,r[A>>2]=a-o,r[n>>2]=i-o)}function it(t,e){t|=0;var A,n,i,o=0,a=0,s=0;((e|=0)+-1|0)>>>0>=6||(s=(0|r[15472+(12*e|0)>>2])+(0|r[t>>2])|0,r[t>>2]=s,i=t+4|0,a=(0|r[15472+(12*e|0)+4>>2])+(0|r[i>>2])|0,r[i>>2]=a,n=t+8|0,e=(0|r[15472+(12*e|0)+8>>2])+(0|r[n>>2])|0,r[n>>2]=e,o=a-s|0,(0|s)<0?(e=e-s|0,r[i>>2]=o,r[n>>2]=e,r[t>>2]=0,a=0):(o=a,a=s),(0|o)<0&&(a=a-o|0,r[t>>2]=a,e=e-o|0,r[n>>2]=e,r[i>>2]=0,o=0),A=a-e|0,s=o-e|0,(0|e)<0?(r[t>>2]=A,r[i>>2]=s,r[n>>2]=0,a=A,e=0):s=o,(0|(o=(0|e)<(0|(o=(0|s)<(0|a)?s:a))?e:o))<=0||(r[t>>2]=a-o,r[i>>2]=s-o,r[n>>2]=e-o))}function ot(t){var e,A,n,i=0,o=0,a=0,s=0;s=0|r[(t|=0)>>2],a=(i=0|r[(A=t+4|0)>>2])+s|0,s=(o=0|r[(n=t+8|0)>>2])+s|0,r[t>>2]=s,r[A>>2]=a,i=o+i|0,r[n>>2]=i,o=a-s|0,(0|s)<0?(i=i-s|0,r[A>>2]=o,r[n>>2]=i,r[t>>2]=0,a=0):(o=a,a=s),(0|o)<0&&(a=a-o|0,r[t>>2]=a,i=i-o|0,r[n>>2]=i,r[A>>2]=0,o=0),e=a-i|0,s=o-i|0,(0|i)<0?(r[t>>2]=e,r[A>>2]=s,r[n>>2]=0,a=e,i=0):s=o,(0|(o=(0|i)<(0|(o=(0|s)<(0|a)?s:a))?i:o))<=0||(r[t>>2]=a-o,r[A>>2]=s-o,r[n>>2]=i-o)}function at(t){var e,A,n,i=0,o=0,a=0,s=0;i=0|r[(t|=0)>>2],a=0|r[(A=t+4|0)>>2],o=0|r[(n=t+8|0)>>2],s=a+i|0,r[t>>2]=s,a=o+a|0,r[A>>2]=a,i=o+i|0,r[n>>2]=i,o=a-s|0,(0|s)<0?(i=i-s|0,r[A>>2]=o,r[n>>2]=i,r[t>>2]=0,a=0):(o=a,a=s),(0|o)<0&&(a=a-o|0,r[t>>2]=a,i=i-o|0,r[n>>2]=i,r[A>>2]=0,o=0),e=a-i|0,s=o-i|0,(0|i)<0?(r[t>>2]=e,r[A>>2]=s,r[n>>2]=0,a=e,i=0):s=o,(0|(o=(0|i)<(0|(o=(0|s)<(0|a)?s:a))?i:o))<=0||(r[t>>2]=a-o,r[A>>2]=s-o,r[n>>2]=i-o)}function st(t){switch(0|(t|=0)){case 1:t=5;break;case 5:t=4;break;case 4:t=6;break;case 6:t=2;break;case 2:t=3;break;case 3:t=1}return 0|t}function gt(t){switch(0|(t|=0)){case 1:t=3;break;case 3:t=2;break;case 2:t=6;break;case 6:t=4;break;case 4:t=5;break;case 5:t=1}return 0|t}function ct(t){var e,A,n,i=0,o=0,a=0,s=0;i=0|r[(t|=0)>>2],o=0|r[(A=t+4|0)>>2],a=0|r[(n=t+8|0)>>2],s=o+(i<<1)|0,r[t>>2]=s,o=a+(o<<1)|0,r[A>>2]=o,i=(a<<1)+i|0,r[n>>2]=i,a=o-s|0,(0|s)<0?(i=i-s|0,r[A>>2]=a,r[n>>2]=i,r[t>>2]=0,o=a,a=0):a=s,(0|o)<0&&(a=a-o|0,r[t>>2]=a,i=i-o|0,r[n>>2]=i,r[A>>2]=0,o=0),e=a-i|0,s=o-i|0,(0|i)<0?(r[t>>2]=e,r[A>>2]=s,r[n>>2]=0,a=e,i=0):s=o,(0|(o=(0|i)<(0|(o=(0|s)<(0|a)?s:a))?i:o))<=0||(r[t>>2]=a-o,r[A>>2]=s-o,r[n>>2]=i-o)}function It(t){var e,A,n,i=0,o=0,a=0,s=0;s=0|r[(t|=0)>>2],a=((i=0|r[(A=t+4|0)>>2])<<1)+s|0,s=(o=0|r[(n=t+8|0)>>2])+(s<<1)|0,r[t>>2]=s,r[A>>2]=a,i=(o<<1)+i|0,r[n>>2]=i,o=a-s|0,(0|s)<0?(i=i-s|0,r[A>>2]=o,r[n>>2]=i,r[t>>2]=0,s=0):o=a,(0|o)<0&&(s=s-o|0,r[t>>2]=s,i=i-o|0,r[n>>2]=i,r[A>>2]=0,o=0),e=s-i|0,a=o-i|0,(0|i)<0?(r[t>>2]=e,r[A>>2]=a,r[n>>2]=0,s=e,i=0):a=o,(0|(o=(0|i)<(0|(o=(0|a)<(0|s)?a:s))?i:o))<=0||(r[t>>2]=s-o,r[A>>2]=a-o,r[n>>2]=i-o)}function ut(t,e){e|=0;var A,n,i,o=0,a=0,s=0;return i=(0|(n=(0|r[(t|=0)>>2])-(0|r[e>>2])|0))<0,A=(0|(a=(0|r[t+4>>2])-(0|r[e+4>>2])-(i?n:0)|0))<0,e=(e=(t=(0|(s=(i?0-n|0:0)+(0|r[t+8>>2])-(0|r[e+8>>2])+(A?0-a|0:0)|0))<0)?0:s)-((a=(0|(t=(0|e)<(0|(t=(0|(o=(A?0:a)-(t?s:0)|0))<(0|(s=(i?0:n)-(A?a:0)-(t?s:0)|0))?o:s))?e:t))>0)?t:0)|0,o=o-(a?t:0)|0,0|((0|(t=(0|(t=s-(a?t:0)|0))>-1?t:0-t|0))>(0|(e=(0|(o=(0|o)>-1?o:0-o|0))>(0|(e=(0|e)>-1?e:0-e|0))?o:e))?t:e)}function lt(t,e){e|=0;var A;A=0|r[(t|=0)+8>>2],r[e>>2]=(0|r[t>>2])-A,r[e+4>>2]=(0|r[t+4>>2])-A}function Ct(t,e){e|=0;var A,n,i,o=0,a=0,s=0;a=0|r[(t|=0)>>2],r[e>>2]=a,t=0|r[t+4>>2],r[(n=e+4|0)>>2]=t,r[(i=e+8|0)>>2]=0,o=t-a|0,(0|a)<0?(t=0-a|0,r[n>>2]=o,r[i>>2]=t,r[e>>2]=0,a=0):(o=t,t=0),(0|o)<0&&(a=a-o|0,r[e>>2]=a,t=t-o|0,r[i>>2]=t,r[n>>2]=0,o=0),A=a-t|0,s=o-t|0,(0|t)<0?(r[e>>2]=A,r[n>>2]=s,r[i>>2]=0,o=s,s=A,t=0):s=a,(0|(a=(0|t)<(0|(a=(0|o)<(0|s)?o:s))?t:a))<=0||(r[e>>2]=s-a,r[n>>2]=o-a,r[i>>2]=t-a)}function ht(t){var e,A,n,i;A=(i=0|r[(e=(t|=0)+8|0)>>2])-(0|r[t>>2])|0,r[t>>2]=A,t=(0|r[(n=t+4|0)>>2])-i|0,r[n>>2]=t,r[e>>2]=0-(t+A)}function Bt(t){var e,A,n=0,i=0,o=0,a=0,s=0;n=0-(i=0|r[(t|=0)>>2])|0,r[t>>2]=n,r[(e=t+8|0)>>2]=0,a=(o=0|r[(A=t+4|0)>>2])+i|0,(0|i)>0?(r[A>>2]=a,r[e>>2]=i,r[t>>2]=0,n=0,o=a):i=0,(0|o)<0?(s=n-o|0,r[t>>2]=s,i=i-o|0,r[e>>2]=i,r[A>>2]=0,a=s-i|0,n=0-i|0,(0|i)<0?(r[t>>2]=a,r[A>>2]=n,r[e>>2]=0,o=n,i=0):(o=0,a=s)):a=n,(0|(n=(0|i)<(0|(n=(0|o)<(0|a)?o:a))?i:n))<=0||(r[t>>2]=a-n,r[A>>2]=o-n,r[e>>2]=i-n)}function ft(t,e,A,n){e|=0,A|=0,n|=0;var o,a=0,s=0,g=0,c=0;if(o=R,R=R+32|0,function(t,e){e|=0;var A,n,r=0;r=+i[(t=t|0)>>3],A=+I(+r),r=+u(+r),i[e+16>>3]=r,r=+i[t+8>>3],n=A*+I(+r),i[e>>3]=n,r=A*+u(+r),i[e+8>>3]=r}(t|=0,s=o),r[A>>2]=0,a=+se(15888,s),(g=+se(15912,s))<a&&(r[A>>2]=1,a=g),(g=+se(15936,s))<a&&(r[A>>2]=2,a=g),(g=+se(15960,s))<a&&(r[A>>2]=3,a=g),(g=+se(15984,s))<a&&(r[A>>2]=4,a=g),(g=+se(16008,s))<a&&(r[A>>2]=5,a=g),(g=+se(16032,s))<a&&(r[A>>2]=6,a=g),(g=+se(16056,s))<a&&(r[A>>2]=7,a=g),(g=+se(16080,s))<a&&(r[A>>2]=8,a=g),(g=+se(16104,s))<a&&(r[A>>2]=9,a=g),(g=+se(16128,s))<a&&(r[A>>2]=10,a=g),(g=+se(16152,s))<a&&(r[A>>2]=11,a=g),(g=+se(16176,s))<a&&(r[A>>2]=12,a=g),(g=+se(16200,s))<a&&(r[A>>2]=13,a=g),(g=+se(16224,s))<a&&(r[A>>2]=14,a=g),(g=+se(16248,s))<a&&(r[A>>2]=15,a=g),(g=+se(16272,s))<a&&(r[A>>2]=16,a=g),(g=+se(16296,s))<a&&(r[A>>2]=17,a=g),(g=+se(16320,s))<a&&(r[A>>2]=18,a=g),(g=+se(16344,s))<a&&(r[A>>2]=19,a=g),(g=+C(+(1-.5*a)))<1e-16)return r[n>>2]=0,r[n+4>>2]=0,r[n+8>>2]=0,r[n+12>>2]=0,void(R=o);if(A=0|r[A>>2],a=+Ft((a=+i[16368+(24*A|0)>>3])-+Ft(+function(t,e){t|=0;var A,n,r,o,a;return o=+i[(e=e|0)>>3],n=+I(+o),r=+i[e+8>>3]-+i[t+8>>3],a=n*+u(+r),A=+i[t>>3],+ +f(+a,+(+u(+o)*+I(+A)-+I(+r)*(n*+u(+A))))}(15568+(A<<4)|0,t))),c=0|Jt(e)?+Ft(a+-.3334731722518321):a,a=+l(+g)/.381966011250105,(0|e)>0){s=0;do{a*=2.6457513110645907,s=s+1|0}while((0|s)!=(0|e))}g=+I(+c)*a,i[n>>3]=g,c=+u(+c)*a,i[n+8>>3]=c,R=o}function dt(t,e,A,n,o){e|=0,A|=0,n|=0,o|=0;var a=0,c=0;if((a=+function(t){var e,A;return A=+i[(t=t|0)>>3],e=+i[t+8>>3],+ +g(+(A*A+e*e))}(t|=0))<1e-16)return e=15568+(e<<4)|0,r[o>>2]=r[e>>2],r[o+4>>2]=r[e+4>>2],r[o+8>>2]=r[e+8>>2],void(r[o+12>>2]=r[e+12>>2]);if(c=+f(+ +i[t+8>>3],+ +i[t>>3]),(0|A)>0){t=0;do{a/=2.6457513110645907,t=t+1|0}while((0|t)!=(0|A))}n?(a/=3,A=0==(0|Jt(A)),a=+B(.381966011250105*(A?a:a/2.6457513110645907))):(a=+B(.381966011250105*a),0|Jt(A)&&(c=+Ft(c+.3334731722518321))),function(t,e,A,n){t|=0,e=+e,n|=0;var o=0,a=0,g=0,c=0;if((A=+A)<1e-16)return r[n>>2]=r[t>>2],r[n+4>>2]=r[t+4>>2],r[n+8>>2]=r[t+8>>2],void(r[n+12>>2]=r[t+12>>2]);a=e<0?e+6.283185307179586:e,a=e>=6.283185307179586?a+-6.283185307179586:a;do{if(!(a<1e-16)){if(o=+s(+(a+-3.141592653589793))<1e-16,e=+i[t>>3],o){e-=A,i[n>>3]=e,o=n;break}if(g=+I(+A),A=+u(+A),e=g*+u(+e)+ +I(+a)*(A*+I(+e)),e=+h(+((e=e>1?1:e)<-1?-1:e)),i[n>>3]=e,+s(+(e+-1.5707963267948966))<1e-16)return i[n>>3]=1.5707963267948966,void(i[n+8>>3]=0);if(+s(+(e+1.5707963267948966))<1e-16)return i[n>>3]=-1.5707963267948966,void(i[n+8>>3]=0);if(c=+I(+e),a=A*+u(+a)/c,A=+i[t>>3],e=(g-+u(+e)*+u(+A))/+I(+A)/c,g=a>1?1:a,e=e>1?1:e,(e=+i[t+8>>3]+ +f(+(g<-1?-1:g),+(e<-1?-1:e)))>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);return void(i[n+8>>3]=e)}e=+i[t>>3]+A,i[n>>3]=e,o=n}while(0);if(+s(+(e+-1.5707963267948966))<1e-16)return i[o>>3]=1.5707963267948966,void(i[n+8>>3]=0);if(+s(+(e+1.5707963267948966))<1e-16)return i[o>>3]=-1.5707963267948966,void(i[n+8>>3]=0);if((e=+i[t+8>>3])>3.141592653589793)do{e+=-6.283185307179586}while(e>3.141592653589793);if(e<-3.141592653589793)do{e+=6.283185307179586}while(e<-3.141592653589793);i[n+8>>3]=e}(15568+(e<<4)|0,+Ft(+i[16368+(24*e|0)>>3]-c),a,o)}function Qt(t,e,A){e|=0,A|=0;var n,i;n=R,R=R+16|0,q((t|=0)+4|0,i=n),dt(i,0|r[t>>2],e,0,A),R=n}function Et(t,e,A,n,o){t|=0,e|=0,A|=0,n|=0,o|=0;var a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,b,F,w,S,D,U=0,G=0,N=0,k=0,x=0,O=0;if(D=R,R=R+272|0,k=D+240|0,F=D,w=D+224|0,S=D+208|0,f=D+176|0,d=D+160|0,Q=D+192|0,E=D+144|0,p=D+128|0,y=D+112|0,v=D+96|0,b=D+80|0,r[(U=D+256|0)>>2]=e,r[k>>2]=r[t>>2],r[k+4>>2]=r[t+4>>2],r[k+8>>2]=r[t+8>>2],r[k+12>>2]=r[t+12>>2],pt(k,U,F),r[o>>2]=0,(0|(k=n+A+(5==(0|n)&1)|0))<=(0|A))R=D;else{s=w+4|0,g=f+4|0,c=A+5|0,I=16848+((a=0|r[U>>2])<<2)|0,u=16928+(a<<2)|0,l=p+8|0,C=y+8|0,h=v+8|0,B=S+4|0,N=A;t:for(;;){G=F+(((0|N)%5|0)<<4)|0,r[S>>2]=r[G>>2],r[S+4>>2]=r[G+4>>2],r[S+8>>2]=r[G+8>>2],r[S+12>>2]=r[G+12>>2];do{}while(2==(0|yt(S,a,0,1)));if((0|N)>(0|A)&0!=(0|Jt(e))){if(r[f>>2]=r[S>>2],r[f+4>>2]=r[S+4>>2],r[f+8>>2]=r[S+8>>2],r[f+12>>2]=r[S+12>>2],q(s,d),n=0|r[f>>2],U=0|r[17008+(80*n|0)+(r[w>>2]<<2)>>2],r[f>>2]=r[18608+(80*n|0)+(20*U|0)>>2],(0|(G=0|r[18608+(80*n|0)+(20*U|0)+16>>2]))>0){t=0;do{ot(g),t=t+1|0}while((0|t)<(0|G))}switch(G=18608+(80*n|0)+(20*U|0)+4|0,r[Q>>2]=r[G>>2],r[Q+4>>2]=r[G+4>>2],r[Q+8>>2]=r[G+8>>2],$(Q,3*(0|r[I>>2])|0),X(g,Q,g),P(g),q(g,E),x=+(0|r[u>>2]),i[p>>3]=3*x,i[l>>3]=0,O=-1.5*x,i[y>>3]=O,i[C>>3]=2.598076211353316*x,i[v>>3]=O,i[h>>3]=-2.598076211353316*x,0|r[17008+(80*(0|r[f>>2])|0)+(r[S>>2]<<2)>>2]){case 1:t=y,n=p;break;case 3:t=v,n=y;break;case 2:t=p,n=v;break;default:t=12;break t}oe(d,E,n,t,b),dt(b,0|r[f>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])}if((0|N)<(0|c)&&(q(B,f),dt(f,0|r[S>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])),r[w>>2]=r[S>>2],r[w+4>>2]=r[S+4>>2],r[w+8>>2]=r[S+8>>2],r[w+12>>2]=r[S+12>>2],(0|(N=N+1|0))>=(0|k)){t=3;break}}3!=(0|t)?12==(0|t)&&m(22474,22521,581,22531):R=D}}function pt(t,e,A){t|=0,e|=0,A|=0;var n,i=0,o=0,a=0,s=0,g=0;n=R,R=R+128|0,o=n,s=20208,g=(a=i=n+64|0)+60|0;do{r[a>>2]=r[s>>2],a=a+4|0,s=s+4|0}while((0|a)<(0|g));s=20272,g=(a=o)+60|0;do{r[a>>2]=r[s>>2],a=a+4|0,s=s+4|0}while((0|a)<(0|g));i=(g=0==(0|Jt(0|r[e>>2])))?i:o,ct(o=t+4|0),It(o),0|Jt(0|r[e>>2])&&(rt(o),r[e>>2]=1+(0|r[e>>2])),r[A>>2]=r[t>>2],X(o,i,e=A+4|0),P(e),r[A+16>>2]=r[t>>2],X(o,i+12|0,e=A+20|0),P(e),r[A+32>>2]=r[t>>2],X(o,i+24|0,e=A+36|0),P(e),r[A+48>>2]=r[t>>2],X(o,i+36|0,e=A+52|0),P(e),r[A+64>>2]=r[t>>2],X(o,i+48|0,A=A+68|0),P(A),R=n}function yt(t,e,A,n){A|=0,n|=0;var i,o,a,s,g,c,I=0,u=0,l=0,C=0,h=0;if(c=R,R=R+32|0,g=c+12|0,o=c,h=(t|=0)+4|0,C=0|r[16928+((e|=0)<<2)>>2],C=(s=0!=(0|n))?3*C|0:C,I=0|r[h>>2],i=0|r[(a=t+8|0)>>2],s){if((0|(I=i+I+(n=0|r[(u=t+12|0)>>2])|0))==(0|C))return R=c,0|(h=1);l=u}else I=i+I+(n=0|r[(l=t+12|0)>>2])|0;if((0|I)<=(0|C))return R=c,0|(h=0);do{if((0|n)>0){if(n=0|r[t>>2],(0|i)>0){u=18608+(80*n|0)+60|0,n=t;break}n=18608+(80*n|0)+40|0,A?(W(g,C,0,0),z(h,g,o),at(o),X(o,g,h),u=n,n=t):(u=n,n=t)}else u=18608+(80*(0|r[t>>2])|0)+20|0,n=t}while(0);if(r[n>>2]=r[u>>2],(0|r[(I=u+16|0)>>2])>0){n=0;do{ot(h),n=n+1|0}while((0|n)<(0|r[I>>2]))}return t=u+4|0,r[g>>2]=r[t>>2],r[g+4>>2]=r[t+4>>2],r[g+8>>2]=r[t+8>>2],e=0|r[16848+(e<<2)>>2],$(g,s?3*e|0:e),X(h,g,h),P(h),n=s&&((0|r[a>>2])+(0|r[h>>2])+(0|r[l>>2])|0)==(0|C)?1:2,R=c,0|(h=n)}function vt(t,e){t|=0,e|=0;var A=0;do{A=0|yt(t,e,0,1)}while(2==(0|A));return 0|A}function mt(t,e,A,n,o){t|=0,e|=0,A|=0,n|=0,o|=0;var a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,b,F=0,w=0,S=0,D=0,U=0;if(b=R,R=R+240|0,E=b+208|0,p=b,y=b+192|0,v=b+176|0,h=b+160|0,B=b+144|0,f=b+128|0,d=b+112|0,Q=b+96|0,r[(F=b+224|0)>>2]=e,r[E>>2]=r[t>>2],r[E+4>>2]=r[t+4>>2],r[E+8>>2]=r[t+8>>2],r[E+12>>2]=r[t+12>>2],bt(E,F,p),r[o>>2]=0,(0|(C=n+A+(6==(0|n)&1)|0))<=(0|A))R=b;else{s=A+6|0,g=16928+((a=0|r[F>>2])<<2)|0,c=B+8|0,I=f+8|0,u=d+8|0,l=y+4|0,w=0,S=A,n=-1;t:for(;;){if(t=p+((F=(0|S)%6|0)<<4)|0,r[y>>2]=r[t>>2],r[y+4>>2]=r[t+4>>2],r[y+8>>2]=r[t+8>>2],r[y+12>>2]=r[t+12>>2],t=w,w=0|yt(y,a,0,1),(0|S)>(0|A)&0!=(0|Jt(e))&&(1!=(0|t)&&(0|r[y>>2])!=(0|n))){switch(q(p+(((F+5|0)%6|0)<<4)+4|0,v),q(p+(F<<4)+4|0,h),D=+(0|r[g>>2]),i[B>>3]=3*D,i[c>>3]=0,U=-1.5*D,i[f>>3]=U,i[I>>3]=2.598076211353316*D,i[d>>3]=U,i[u>>3]=-2.598076211353316*D,F=0|r[E>>2],0|r[17008+(80*F|0)+(((0|n)==(0|F)?0|r[y>>2]:n)<<2)>>2]){case 1:t=f,n=B;break;case 3:t=d,n=f;break;case 2:t=B,n=d;break;default:t=8;break t}oe(v,h,n,t,Q),0|ae(v,Q)||0|ae(h,Q)||(dt(Q,0|r[E>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2]))}if((0|S)<(0|s)&&(q(l,v),dt(v,0|r[y>>2],a,1,o+8+(r[o>>2]<<4)|0),r[o>>2]=1+(0|r[o>>2])),(0|(S=S+1|0))>=(0|C)){t=3;break}n=0|r[y>>2]}3!=(0|t)?8==(0|t)&&m(22557,22521,746,22602):R=b}}function bt(t,e,A){t|=0,e|=0,A|=0;var n,i=0,o=0,a=0,s=0,g=0;n=R,R=R+160|0,o=n,s=20336,g=(a=i=n+80|0)+72|0;do{r[a>>2]=r[s>>2],a=a+4|0,s=s+4|0}while((0|a)<(0|g));s=20416,g=(a=o)+72|0;do{r[a>>2]=r[s>>2],a=a+4|0,s=s+4|0}while((0|a)<(0|g));i=(g=0==(0|Jt(0|r[e>>2])))?i:o,ct(o=t+4|0),It(o),0|Jt(0|r[e>>2])&&(rt(o),r[e>>2]=1+(0|r[e>>2])),r[A>>2]=r[t>>2],X(o,i,e=A+4|0),P(e),r[A+16>>2]=r[t>>2],X(o,i+12|0,e=A+20|0),P(e),r[A+32>>2]=r[t>>2],X(o,i+24|0,e=A+36|0),P(e),r[A+48>>2]=r[t>>2],X(o,i+36|0,e=A+52|0),P(e),r[A+64>>2]=r[t>>2],X(o,i+48|0,e=A+68|0),P(e),r[A+80>>2]=r[t>>2],X(o,i+60|0,A=A+84|0),P(A),R=n}function Ft(t){var e;return e=(t=+t)<0?t+6.283185307179586:t,+(t>=6.283185307179586?e+-6.283185307179586:e)}function wt(t,e){return e|=0,+s(+(+i[(t|=0)>>3]-+i[e>>3]))<17453292519943298e-27?0|(e=+s(+(+i[t+8>>3]-+i[e+8>>3]))<17453292519943298e-27):0|(e=0)}function St(t,e){t|=0;var A,n,r,o=0;return n=+i[(e|=0)>>3],A=+i[t>>3],o=(r=+u(.5*(n-A)))*r+(o=+u(.5*(+i[e+8>>3]-+i[t+8>>3])))*(+I(+n)*+I(+A)*o),2*+f(+ +g(+o),+ +g(+(1-o)))*6371.007180918475}function Dt(t,e,A){t|=0,A|=0;var n,r,o,a,s=0,c=0,C=0,h=0,d=0,Q=0;return Q=+i[(e|=0)>>3],o=+i[t>>3],d=+u(.5*(Q-o)),C=+i[e+8>>3],r=+i[t+8>>3],h=+u(.5*(C-r)),n=+I(+o),a=+I(+Q),h=2*+f(+ +g(+(h=d*d+h*(a*n*h))),+ +g(+(1-h))),d=+i[A>>3],Q=+u(.5*(d-Q)),s=+i[A+8>>3],C=+u(.5*(s-C)),c=+I(+d),C=2*+f(+ +g(+(C=Q*Q+C*(a*c*C))),+ +g(+(1-C))),d=+u(.5*(o-d)),s=+u(.5*(r-s)),s=2*+f(+ +g(+(s=d*d+s*(n*c*s))),+ +g(+(1-s))),4*+B(+ +g(+ +l(.5*(c=.5*(h+C+s)))*+l(.5*(c-h))*+l(.5*(c-C))*+l(.5*(c-s))))}function Rt(t,e){return e=0|me(0|(t|=0),0|(e|=0),45),v(),127&e|0}function Ut(t,e){var A=0,n=0,r=0,i=0,o=0,a=0;if(!(!0&134217728==(-16777216&(e|=0)|0)))return 0|(e=0);if(o=0|me(0|(t|=0),0|e,45),v(),(o&=127)>>>0>121)return 0|(e=0);A=0|me(0|t,0|e,52),v(),A&=15;do{if(0|A){for(r=1,n=0;;){if(i=0|me(0|t,0|e,3*(15-r|0)|0),v(),0!=(0|(i&=7))&(1^n)){if(1==(0|i)&0!=(0|O(o))){a=0,n=13;break}n=1}if(7==(0|i)){a=0,n=13;break}if(!(r>>>0<A>>>0)){n=9;break}r=r+1|0}if(9==(0|n)){if(15!=(0|A))break;return 0|(a=1)}if(13==(0|n))return 0|a}}while(0);for(;;){if(a=0|me(0|t,0|e,3*(14-A|0)|0),v(),!(7==(7&a|0)&!0)){a=0,n=13;break}if(!(A>>>0<14)){a=1,n=13;break}A=A+1|0}return 13==(0|n)?0|a:0}function Gt(t,e,A){A|=0;var n=0,r=0;if(n=0|me(0|(t|=0),0|(e|=0),52),v(),(0|(n&=15))>=(0|A)){if((0|n)!=(0|A))if(A>>>0<=15){if(t|=r=0|be(0|A,0,52),e=0|v()|-15728641&e,(0|n)>(0|A))do{r=0|be(7,0,3*(14-A|0)|0),A=A+1|0,t|=r,e=0|v()|e}while((0|A)<(0|n))}else e=0,t=0}else e=0,t=0;return y(0|e),0|t}function Nt(t,e,A,n){A|=0,n|=0;var i,o=0,a=0,s=0,g=0,c=0,I=0;if(s=0|me(0|(t|=0),0|(e|=0),52),v(),(0|A)<16&(0|(s&=15))<=(0|A)){if((0|s)==(0|A))return r[(A=n)>>2]=t,void(r[A+4>>2]=e);if(i=(0|(c=0|ee(7,A-s|0)))/7|0,g=0|me(0|t,0|e,45),v(),0|O(127&g)){t:do{if(s)for(a=1;;){if(o=0|me(0|t,0|e,3*(15-a|0)|0),v(),0|(o&=7))break t;if(!(a>>>0<s>>>0)){o=0;break}a=a+1|0}else o=0}while(0);a=0==(0|o)}else a=0;if(I=0|be(s+1|0,0,52),o=0|v()|-15728641&e,Nt(e=(I|t)&~(e=0|be(7,0,0|(g=3*(14-s|0)|0))),s=o&~(0|v()),A,n),o=n+(i<<3)|0,!a)return Nt((I=0|be(1,0,0|g))|e,0|v()|s,A,o),I=o+(i<<3)|0,Nt((c=0|be(2,0,0|g))|e,0|v()|s,A,I),I=I+(i<<3)|0,Nt((c=0|be(3,0,0|g))|e,0|v()|s,A,I),I=I+(i<<3)|0,Nt((c=0|be(4,0,0|g))|e,0|v()|s,A,I),I=I+(i<<3)|0,Nt((c=0|be(5,0,0|g))|e,0|v()|s,A,I),void Nt((c=0|be(6,0,0|g))|e,0|v()|s,A,I+(i<<3)|0);a=o+(i<<3)|0,(0|c)>6&&(De(0|o,0,(I=(a>>>0>(c=o+8|0)>>>0?a:c)+-1+(0-o)|0)+8&-8|0),o=c+(I>>>3<<3)|0),Nt((I=0|be(2,0,0|g))|e,0|v()|s,A,o),I=o+(i<<3)|0,Nt((c=0|be(3,0,0|g))|e,0|v()|s,A,I),I=I+(i<<3)|0,Nt((c=0|be(4,0,0|g))|e,0|v()|s,A,I),I=I+(i<<3)|0,Nt((c=0|be(5,0,0|g))|e,0|v()|s,A,I),Nt((c=0|be(6,0,0|g))|e,0|v()|s,A,I+(i<<3)|0)}}function kt(t,e){var A=0,n=0,r=0;if(r=0|me(0|(t|=0),0|(e|=0),45),v(),!(0|O(127&r)))return 0|(r=0);r=0|me(0|t,0|e,52),v(),r&=15;t:do{if(r)for(n=1;;){if(A=0|me(0|t,0|e,3*(15-n|0)|0),v(),0|(A&=7))break t;if(!(n>>>0<r>>>0)){A=0;break}n=n+1|0}else A=0}while(0);return 0|(r=0==(0|A)&1)}function xt(t,e){var A=0,n=0,r=0;if(r=0|me(0|(t|=0),0|(e|=0),52),v(),!(r&=15))return 0|(r=0);for(n=1;;){if(A=0|me(0|t,0|e,3*(15-n|0)|0),v(),0|(A&=7)){n=5;break}if(!(n>>>0<r>>>0)){A=0,n=5;break}n=n+1|0}return 5==(0|n)?0|A:0}function Ot(t,e){var A=0,n=0,r=0,i=0,o=0,a=0,s=0;if(s=0|me(0|(t|=0),0|(e|=0),52),v(),!(s&=15))return s=t,y(0|(a=e)),0|s;for(a=1,A=0;;){n=0|be(7,0,0|(i=3*(15-a|0)|0)),r=0|v(),o=0|me(0|t,0|e,0|i),v(),t=(i=0|be(0|st(7&o),0,0|i))|t&~n,e=(o=0|v())|e&~r;t:do{if(!A)if(0==(i&n|0)&0==(o&r|0))A=0;else if(n=0|me(0|t,0|e,52),v(),n&=15){A=1;e:for(;;){switch(o=0|me(0|t,0|e,3*(15-A|0)|0),v(),7&o){case 1:break e;case 0:break;default:A=1;break t}if(!(A>>>0<n>>>0)){A=1;break t}A=A+1|0}for(A=1;;){if(r=0|me(0|t,0|e,0|(o=3*(15-A|0)|0)),v(),i=0|be(7,0,0|o),e&=~(0|v()),t=t&~i|(o=0|be(0|st(7&r),0,0|o)),e=0|e|v(),!(A>>>0<n>>>0)){A=1;break}A=A+1|0}}else A=1}while(0);if(!(a>>>0<s>>>0))break;a=a+1|0}return y(0|e),0|t}function Mt(t,e){var A=0,n=0,r=0,i=0,o=0;if(n=0|me(0|(t|=0),0|(e|=0),52),v(),!(n&=15))return n=t,y(0|(A=e)),0|n;for(A=1;o=0|me(0|t,0|e,0|(i=3*(15-A|0)|0)),v(),r=0|be(7,0,0|i),e&=~(0|v()),t=(i=0|be(0|st(7&o),0,0|i))|t&~r,e=0|v()|e,A>>>0<n>>>0;)A=A+1|0;return y(0|e),0|t}function Lt(t,e){var A=0,n=0,r=0,i=0,o=0,a=0,s=0;if(s=0|me(0|(t|=0),0|(e|=0),52),v(),!(s&=15))return s=t,y(0|(a=e)),0|s;for(a=1,A=0;;){n=0|be(7,0,0|(i=3*(15-a|0)|0)),r=0|v(),o=0|me(0|t,0|e,0|i),v(),t=(i=0|be(0|gt(7&o),0,0|i))|t&~n,e=(o=0|v())|e&~r;t:do{if(!A)if(0==(i&n|0)&0==(o&r|0))A=0;else if(n=0|me(0|t,0|e,52),v(),n&=15){A=1;e:for(;;){switch(o=0|me(0|t,0|e,3*(15-A|0)|0),v(),7&o){case 1:break e;case 0:break;default:A=1;break t}if(!(A>>>0<n>>>0)){A=1;break t}A=A+1|0}for(A=1;;){if(i=0|be(7,0,0|(r=3*(15-A|0)|0)),o=e&~(0|v()),e=0|me(0|t,0|e,0|r),v(),t=t&~i|(e=0|be(0|gt(7&e),0,0|r)),e=0|o|v(),!(A>>>0<n>>>0)){A=1;break}A=A+1|0}}else A=1}while(0);if(!(a>>>0<s>>>0))break;a=a+1|0}return y(0|e),0|t}function _t(t,e){var A=0,n=0,r=0,i=0,o=0;if(n=0|me(0|(t|=0),0|(e|=0),52),v(),!(n&=15))return n=t,y(0|(A=e)),0|n;for(A=1;i=0|be(7,0,0|(o=3*(15-A|0)|0)),r=e&~(0|v()),e=0|me(0|t,0|e,0|o),v(),t=(e=0|be(0|gt(7&e),0,0|o))|t&~i,e=0|v()|r,A>>>0<n>>>0;)A=A+1|0;return y(0|e),0|t}function Jt(t){return 0|(0|(t|=0))%2}function Tt(t,e){t|=0;var A,n;return n=R,R=R+16|0,A=n,(e|=0)>>>0<=15&&2146435072!=(2146435072&r[t+4>>2]|0)&&2146435072!=(2146435072&r[t+8+4>>2]|0)?(!function(t,e,A){var n,r;n=R,R=R+16|0,ft(t|=0,e|=0,A|=0,r=n),K(r,A+4|0),R=n}(t,e,A),e=0|function(t,e){t|=0;var A,n=0,i=0,o=0,a=0,s=0,g=0,c=0,I=0;if(A=R,R=R+64|0,g=A+40|0,i=A+24|0,o=A+12|0,a=A,be(0|(e|=0),0,52),n=134225919|v(),!e)return(0|r[t+4>>2])>2||(0|r[t+8>>2])>2||(0|r[t+12>>2])>2?(g=0,y(0|(s=0)),R=A,0|g):(be(0|L(t),0,45),s=0|v()|n,g=-1,y(0|s),R=A,0|g);if(r[g>>2]=r[t>>2],r[g+4>>2]=r[t+4>>2],r[g+8>>2]=r[t+8>>2],r[g+12>>2]=r[t+12>>2],s=g+4|0,(0|e)>0)for(t=-1;r[i>>2]=r[s>>2],r[i+4>>2]=r[s+4>>2],r[i+8>>2]=r[s+8>>2],1&e?(et(s),r[o>>2]=r[s>>2],r[o+4>>2]=r[s+4>>2],r[o+8>>2]=r[s+8>>2],nt(o)):(At(s),r[o>>2]=r[s>>2],r[o+4>>2]=r[s+4>>2],r[o+8>>2]=r[s+8>>2],rt(o)),z(i,o,a),P(a),c=0|be(7,0,0|(I=3*(15-e|0)|0)),n&=~(0|v()),t=(I=0|be(0|tt(a),0,0|I))|t&~c,n=0|v()|n,(0|e)>1;)e=e+-1|0;else t=-1;t:do{if((0|r[s>>2])<=2&&(0|r[g+8>>2])<=2&&(0|r[g+12>>2])<=2){if(e=0|be(0|(i=0|L(g)),0,45),e|=t,t=0|v()|-1040385&n,a=0|_(g),!(0|O(i))){if((0|a)<=0)break;for(o=0;;){if(i=0|me(0|e,0|t,52),v(),i&=15)for(n=1;g=0|me(0|e,0|t,0|(I=3*(15-n|0)|0)),v(),c=0|be(7,0,0|I),t&=~(0|v()),e=e&~c|(I=0|be(0|st(7&g),0,0|I)),t=0|t|v(),n>>>0<i>>>0;)n=n+1|0;if((0|(o=o+1|0))==(0|a))break t}}o=0|me(0|e,0|t,52),v(),o&=15;e:do{if(o){n=1;A:for(;;){switch(I=0|me(0|e,0|t,3*(15-n|0)|0),v(),7&I){case 1:break A;case 0:break;default:break e}if(!(n>>>0<o>>>0))break e;n=n+1|0}if(0|J(i,0|r[g>>2]))for(n=1;c=0|be(7,0,0|(g=3*(15-n|0)|0)),I=t&~(0|v()),t=0|me(0|e,0|t,0|g),v(),e=e&~c|(t=0|be(0|gt(7&t),0,0|g)),t=0|I|v(),n>>>0<o>>>0;)n=n+1|0;else for(n=1;g=0|me(0|e,0|t,0|(I=3*(15-n|0)|0)),v(),c=0|be(7,0,0|I),t&=~(0|v()),e=e&~c|(I=0|be(0|st(7&g),0,0|I)),t=0|t|v(),n>>>0<o>>>0;)n=n+1|0}}while(0);if((0|a)>0){n=0;do{e=0|Ot(e,t),t=0|v(),n=n+1|0}while((0|n)!=(0|a))}}else e=0,t=0}while(0);return I=e,y(0|(c=t)),R=A,0|I}(A,e),t=0|v()):(t=0,e=0),y(0|t),R=n,0|e}function jt(t,e,A){var n,i=0,o=0,a=0;if(n=(A|=0)+4|0,o=0|me(0|(t|=0),0|(e|=0),52),v(),o&=15,a=0|me(0|t,0|e,45),v(),i=0==(0|o),0|O(127&a)){if(i)return 0|(a=1);i=1}else{if(i)return 0|(a=0);i=0==(0|r[n>>2])&&0==(0|r[A+8>>2])?0!=(0|r[A+12>>2])&1:1}for(A=1;1&A?nt(n):rt(n),a=0|me(0|t,0|e,3*(15-A|0)|0),v(),it(n,7&a),A>>>0<o>>>0;)A=A+1|0;return 0|i}function Ht(t,e,A){A|=0;var n,i,o=0,a=0,s=0,g=0,c=0,I=0;i=R,R=R+16|0,n=i,I=0|me(0|(t|=0),0|(e|=0),45),v(),I&=127;t:do{if(0!=(0|O(I))&&(s=0|me(0|t,0|e,52),v(),0!=(0|(s&=15)))){o=1;e:for(;;){switch(c=0|me(0|t,0|e,3*(15-o|0)|0),v(),7&c){case 5:break e;case 0:break;default:o=e;break t}if(!(o>>>0<s>>>0)){o=e;break t}o=o+1|0}for(a=1,o=e;g=0|be(7,0,0|(e=3*(15-a|0)|0)),c=o&~(0|v()),o=0|me(0|t,0|o,0|e),v(),t=t&~g|(o=0|be(0|gt(7&o),0,0|e)),o=0|c|v(),a>>>0<s>>>0;)a=a+1|0}else o=e}while(0);if(c=7728+(28*I|0)|0,r[A>>2]=r[c>>2],r[A+4>>2]=r[c+4>>2],r[A+8>>2]=r[c+8>>2],r[A+12>>2]=r[c+12>>2],0|jt(t,o,A)){if(g=A+4|0,r[n>>2]=r[g>>2],r[n+4>>2]=r[g+4>>2],r[n+8>>2]=r[g+8>>2],s=0|me(0|t,0|o,52),v(),c=15&s,1&s?(rt(g),s=c+1|0):s=c,0|O(I)){t:do{if(c)for(e=1;;){if(a=0|me(0|t,0|o,3*(15-e|0)|0),v(),0|(a&=7)){o=a;break t}if(!(e>>>0<c>>>0)){o=0;break}e=e+1|0}else o=0}while(0);o=4==(0|o)&1}else o=0;if(0|yt(A,s,o,0)){if(0|O(I))do{}while(0!=(0|yt(A,s,0,0)));(0|s)!=(0|c)&&At(g)}else(0|s)!=(0|c)&&(r[g>>2]=r[n>>2],r[g+4>>2]=r[n+4>>2],r[g+8>>2]=r[n+8>>2]);R=i}else R=i}function Yt(t,e,A){A|=0;var n,r;n=R,R=R+16|0,Ht(t|=0,e|=0,r=n),e=0|me(0|t,0|e,52),v(),Qt(r,15&e,A),R=n}function Vt(t,e,A){A|=0;var n,r,i=0,o=0;r=R,R=R+16|0,Ht(t|=0,e|=0,n=r),i=0|me(0|t,0|e,45),v(),i=0==(0|O(127&i)),o=0|me(0|t,0|e,52),v(),o&=15;t:do{if(!i){if(0|o)for(i=1;;){if(!(0==((0|be(7,0,3*(15-i|0)|0))&t|0)&0==((0|v())&e|0)))break t;if(!(i>>>0<o>>>0))break;i=i+1|0}return Et(n,o,0,5,A),void(R=r)}}while(0);mt(n,o,0,6,A),R=r}function Zt(t,e){e|=0;var A,n=0,i=0,o=0,a=0,s=0,g=0;if(be(0|(t|=0),0,52),A=134225919|v(),(0|t)<1){i=0,n=0;do{0|O(i)&&(be(0|i,0,45),s=0|A|v(),r[(t=e+(n<<3)|0)>>2]=-1,r[t+4>>2]=s,n=n+1|0),i=i+1|0}while(122!=(0|i))}else{s=0,n=0;do{if(0|O(s)){for(be(0|s,0,45),i=1,o=-1,a=0|A|v();o&=~(g=0|be(7,0,3*(15-i|0)|0)),a&=~(0|v()),(0|i)!=(0|t);)i=i+1|0;r[(g=e+(n<<3)|0)>>2]=o,r[g+4>>2]=a,n=n+1|0}s=s+1|0}while(122!=(0|s))}}function Wt(t,e,A,n){var i,o=0,a=0,s=0,g=0,c=0;if(i=R,R=R+64|0,s=i,(0|(t|=0))==(0|(A|=0))&(0|(e|=0))==(0|(n|=0))|!1|134217728!=(2013265920&e|0)|!1|134217728!=(2013265920&n|0))return R=i,0|(s=0);if(o=0|me(0|t,0|e,52),v(),o&=15,a=0|me(0|A,0|n,52),v(),(0|o)!=(15&a|0))return R=i,0|(s=0);if(a=o+-1|0,o>>>0>1&&(c=0|Gt(t,e,a),g=0|v(),(0|c)==(0|(a=0|Gt(A,n,a)))&(0|g)==(0|v()))){if(o=0|me(0|t,0|e,0|(a=3*(15^o)|0)),v(),o&=7,a=0|me(0|A,0|n,0|a),v(),0==(0|o)|0==(0|(a&=7)))return R=i,0|(c=1);if((0|r[21136+(o<<2)>>2])==(0|a))return R=i,0|(c=1);if((0|r[21168+(o<<2)>>2])==(0|a))return R=i,0|(c=1)}a=(o=s)+56|0;do{r[o>>2]=0,o=o+4|0}while((0|o)<(0|a));return U(t,e,1,s),o=(0|r[(c=s)>>2])==(0|A)&&(0|r[c+4>>2])==(0|n)||(0|r[(c=s+8|0)>>2])==(0|A)&&(0|r[c+4>>2])==(0|n)||(0|r[(c=s+16|0)>>2])==(0|A)&&(0|r[c+4>>2])==(0|n)||(0|r[(c=s+24|0)>>2])==(0|A)&&(0|r[c+4>>2])==(0|n)||(0|r[(c=s+32|0)>>2])==(0|A)&&(0|r[c+4>>2])==(0|n)||(0|r[(c=s+40|0)>>2])==(0|A)&&(0|r[c+4>>2])==(0|n)?1:1&((0|r[(o=s+48|0)>>2])==(0|A)?(0|r[o+4>>2])==(0|n):0),R=i,0|(c=o)}function Kt(t,e,A){A|=0;var n,i,o,a,s=0;if(o=R,R=R+16|0,i=o,s=0|me(0|(t|=0),0|(e|=0),56),v(),-1==(0|(e=0|function(t,e,A){A|=0;var n,i=0;if(i=0|kt(t=t|0,e=e|0),(A+-1|0)>>>0>5)return 0|(A=-1);if(1==(0|A)&(n=0!=(0|i)))return 0|(A=-1);return i=0|function(t,e){var A,n,i,o=0,a=0,s=0,g=0,c=0;if(i=R,R=R+32|0,n=i,Ht(t=t|0,e=e|0,A=i+16|0),s=0|Rt(t,e),c=0|xt(t,e),function(t,e){t=7728+(28*(t|=0)|0)|0,r[(e|=0)>>2]=r[t>>2],r[e+4>>2]=r[t+4>>2],r[e+8>>2]=r[t+8>>2],r[e+12>>2]=r[t+12>>2]}(s,n),e=0|function(t,e){t|=0;var A=0,n=0;if((e|=0)>>>0>20)return 0|(e=-1);do{if((0|r[11152+(216*e|0)>>2])!=(0|t))if((0|r[11152+(216*e|0)+8>>2])!=(0|t))if((0|r[11152+(216*e|0)+16>>2])!=(0|t))if((0|r[11152+(216*e|0)+24>>2])!=(0|t))if((0|r[11152+(216*e|0)+32>>2])!=(0|t))if((0|r[11152+(216*e|0)+40>>2])!=(0|t))if((0|r[11152+(216*e|0)+48>>2])!=(0|t))if((0|r[11152+(216*e|0)+56>>2])!=(0|t))if((0|r[11152+(216*e|0)+64>>2])!=(0|t))if((0|r[11152+(216*e|0)+72>>2])!=(0|t))if((0|r[11152+(216*e|0)+80>>2])!=(0|t))if((0|r[11152+(216*e|0)+88>>2])!=(0|t))if((0|r[11152+(216*e|0)+96>>2])!=(0|t))if((0|r[11152+(216*e|0)+104>>2])!=(0|t))if((0|r[11152+(216*e|0)+112>>2])!=(0|t))if((0|r[11152+(216*e|0)+120>>2])!=(0|t))if((0|r[11152+(216*e|0)+128>>2])!=(0|t)){if((0|r[11152+(216*e|0)+136>>2])!=(0|t)){if((0|r[11152+(216*e|0)+144>>2])==(0|t)){t=0,A=2,n=0;break}if((0|r[11152+(216*e|0)+152>>2])==(0|t)){t=0,A=2,n=1;break}if((0|r[11152+(216*e|0)+160>>2])==(0|t)){t=0,A=2,n=2;break}if((0|r[11152+(216*e|0)+168>>2])==(0|t)){t=1,A=2,n=0;break}if((0|r[11152+(216*e|0)+176>>2])==(0|t)){t=1,A=2,n=1;break}if((0|r[11152+(216*e|0)+184>>2])==(0|t)){t=1,A=2,n=2;break}if((0|r[11152+(216*e|0)+192>>2])==(0|t)){t=2,A=2,n=0;break}if((0|r[11152+(216*e|0)+200>>2])==(0|t)){t=2,A=2,n=1;break}if((0|r[11152+(216*e|0)+208>>2])==(0|t)){t=2,A=2,n=2;break}return 0|(t=-1)}t=2,A=1,n=2}else t=2,A=1,n=1;else t=2,A=1,n=0;else t=1,A=1,n=2;else t=1,A=1,n=1;else t=1,A=1,n=0;else t=0,A=1,n=2;else t=0,A=1,n=1;else t=0,A=1,n=0;else t=2,A=0,n=2;else t=2,A=0,n=1;else t=2,A=0,n=0;else t=1,A=0,n=2;else t=1,A=0,n=1;else t=1,A=0,n=0;else t=0,A=0,n=2;else t=0,A=0,n=1;else t=0,A=0,n=0}while(0);return 0|(e=0|r[11152+(216*e|0)+(72*A|0)+(24*t|0)+(n<<3)+4>>2])}(s,0|r[A>>2]),!(0|O(s)))return R=i,0|(c=e);switch(0|s){case 4:t=0,o=14;break;case 14:t=1,o=14;break;case 24:t=2,o=14;break;case 38:t=3,o=14;break;case 49:t=4,o=14;break;case 58:t=5,o=14;break;case 63:t=6,o=14;break;case 72:t=7,o=14;break;case 83:t=8,o=14;break;case 97:t=9,o=14;break;case 107:t=10,o=14;break;case 117:t=11,o=14;break;default:g=0,a=0}14==(0|o)&&(g=0|r[22096+(24*t|0)+8>>2],a=0|r[22096+(24*t|0)+16>>2]);(0|(t=0|r[A>>2]))!=(0|r[n>>2])&&(s=0|M(s),t=0|r[A>>2],s|(0|t)==(0|a)&&(e=(e+1|0)%6|0));if(3==(0|c)&(0|t)==(0|a))return R=i,0|(c=(e+5|0)%6|0);if(!(5==(0|c)&(0|t)==(0|g)))return R=i,0|(c=e);return R=i,0|(c=(e+1|0)%6|0)}(t,e),n?0|(A=(5-i+(0|r[22384+(A<<2)>>2])|0)%5|0):0|(A=(6-i+(0|r[22416+(A<<2)>>2])|0)%6|0)}(n=(a=!0&268435456==(2013265920&e|0))?t:0,t=a?-2130706433&e|134217728:0,7&s))))return r[A>>2]=0,void(R=o);Ht(n,t,i),s=0|me(0|n,0|t,52),v(),s&=15,0|kt(n,t)?Et(i,s,e,2,A):mt(i,s,e,2,A),R=o}function Pt(t){t|=0;var e,A,n=0;return(e=0|Qe(1,12))||m(22691,22646,49,22704),0|(n=0|r[(A=t+4|0)>>2])?(r[(n=n+8|0)>>2]=e,r[A>>2]=e,0|e):(0|r[t>>2]&&m(22721,22646,61,22744),r[(n=t)>>2]=e,r[A>>2]=e,0|e)}function qt(t,e){t|=0,e|=0;var A,n;return(n=0|fe(24))||m(22758,22646,78,22772),r[n>>2]=r[e>>2],r[n+4>>2]=r[e+4>>2],r[n+8>>2]=r[e+8>>2],r[n+12>>2]=r[e+12>>2],r[n+16>>2]=0,0|(A=0|r[(e=t+4|0)>>2])?(r[A+16>>2]=n,r[e>>2]=n,0|n):(0|r[t>>2]&&m(22787,22646,82,22772),r[t>>2]=n,r[e>>2]=n,0|n)}function Xt(t){var e,A,n=0,o=0,a=0,g=0,c=0,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0,E=0,p=0,y=0,v=0,b=0,F=0,w=0,S=0,D=0,R=0,U=0,G=0,N=0,k=0,x=0,O=0;if(0|r[(g=(t|=0)+8|0)>>2])return 0|(O=1);if(!(a=0|r[t>>2]))return 0|(O=0);n=a,o=0;do{o=o+1|0,n=0|r[n+8>>2]}while(0!=(0|n));if(o>>>0<2)return 0|(O=0);(A=0|fe(o<<2))||m(22807,22646,317,22826),(e=0|fe(o<<5))||m(22848,22646,321,22826),r[t>>2]=0,r[(S=t+4|0)>>2]=0,r[g>>2]=0,o=0,k=0,w=0,B=0;t:for(;;){if(h=0|r[a>>2]){c=0,I=h;do{if(l=+i[I+8>>3],n=I,I=0|r[I+16>>2],u=+i[(g=(C=0==(0|I))?h:I)+8>>3],+s(+(l-u))>3.141592653589793){O=14;break}c+=(u-l)*(+i[n>>3]+ +i[g>>3])}while(!C);if(14==(0|O)){O=0,c=0,n=h;do{F=+i[n+8>>3],G=0|r[(N=n+16|0)>>2],b=+i[(G=0==(0|G)?h:G)+8>>3],c+=(+i[n>>3]+ +i[G>>3])*((b<0?b+6.283185307179586:b)-(F<0?F+6.283185307179586:F)),n=0|r[(0==(0|n)?a:N)>>2]}while(0!=(0|n))}c>0?(r[A+(k<<2)>>2]=a,k=k+1|0,g=w,n=B):O=19}else O=19;if(19==(0|O)){O=0;do{if(!o){if(B){g=S,I=B+8|0,n=a,o=t;break}if(0|r[t>>2]){O=27;break t}g=S,I=t,n=a,o=t;break}if(0|r[(n=o+8|0)>>2]){O=21;break t}if(!(o=0|Qe(1,12))){O=23;break t}r[n>>2]=o,g=o+4|0,I=o,n=B}while(0);if(r[I>>2]=a,r[g>>2]=a,I=e+(w<<5)|0,C=0|r[a>>2]){for(i[(h=e+(w<<5)+8|0)>>3]=17976931348623157e292,i[(B=e+(w<<5)+24|0)>>3]=17976931348623157e292,i[I>>3]=-17976931348623157e292,i[(f=e+(w<<5)+16|0)>>3]=-17976931348623157e292,y=17976931348623157e292,v=-17976931348623157e292,g=0,d=C,l=17976931348623157e292,E=17976931348623157e292,p=-17976931348623157e292,u=-17976931348623157e292;c=+i[d>>3],F=+i[d+8>>3],d=0|r[d+16>>2],b=+i[((Q=0==(0|d))?C:d)+8>>3],c<l&&(i[h>>3]=c,l=c),F<E&&(i[B>>3]=F,E=F),c>p?i[I>>3]=c:c=p,F>u&&(i[f>>3]=F,u=F),y=F>0&F<y?F:y,v=F<0&F>v?F:v,g|=+s(+(F-b))>3.141592653589793,!Q;)p=c;g&&(i[f>>3]=v,i[B>>3]=y)}else r[I>>2]=0,r[I+4>>2]=0,r[I+8>>2]=0,r[I+12>>2]=0,r[I+16>>2]=0,r[I+20>>2]=0,r[I+24>>2]=0,r[I+28>>2]=0;g=w+1|0}if(a=0|r[(N=a+8|0)>>2],r[N>>2]=0,!a){O=45;break}w=g,B=n}if(21==(0|O))m(22624,22646,35,22658);else if(23==(0|O))m(22678,22646,37,22658);else if(27==(0|O))m(22721,22646,61,22744);else if(45==(0|O)){t:do{if((0|k)>0){for(N=0==(0|g),U=g<<2,G=0==(0|t),R=0,n=0;;){if(D=0|r[A+(R<<2)>>2],N)O=73;else{if(!(w=0|fe(U))){O=50;break}if(!(S=0|fe(U))){O=52;break}e:do{if(G)o=0;else{for(g=0,o=0,I=t;a=e+(g<<5)|0,0|zt(0|r[I>>2],a,0|r[D>>2])?(r[w+(o<<2)>>2]=I,r[S+(o<<2)>>2]=a,Q=o+1|0):Q=o,I=0|r[I+8>>2];)g=g+1|0,o=Q;if((0|Q)>0)if(a=0|r[w>>2],1==(0|Q))o=a;else for(f=0,d=-1,o=a,B=a;;){for(C=0|r[B>>2],a=0,I=0;h=(0|(g=0|r[r[w+(I<<2)>>2]>>2]))==(0|C)?a:a+(1&(0|zt(g,0|r[S+(I<<2)>>2],0|r[C>>2])))|0,(0|(I=I+1|0))!=(0|Q);)a=h;if(o=(g=(0|h)>(0|d))?B:o,(0|(a=f+1|0))==(0|Q))break e;f=a,d=g?h:d,B=0|r[w+(a<<2)>>2]}else o=0}}while(0);if(de(w),de(S),o){if(a=0|r[(g=o+4|0)>>2])o=a+8|0;else if(0|r[o>>2]){O=70;break}r[o>>2]=D,r[g>>2]=D}else O=73}if(73==(0|O)){if(O=0,0|(n=0|r[D>>2]))do{S=n,n=0|r[n+16>>2],de(S)}while(0!=(0|n));de(D),n=2}if((0|(R=R+1|0))>=(0|k)){x=n;break t}}50==(0|O)?m(22863,22646,249,22882):52==(0|O)?m(22901,22646,252,22882):70==(0|O)&&m(22721,22646,61,22744)}else x=0}while(0);return de(A),de(e),0|(O=x)}return 0}function zt(t,e,A){t|=0;var n,o=0,a=0,s=0,g=0,c=0,I=0,u=0;if(!(0|Y(e|=0,A|=0)))return 0|(t=0);if(e=0|H(e),n=+i[A>>3],o=e&(o=+i[A+8>>3])<0?o+6.283185307179586:o,!(t=0|r[t>>2]))return 0|(t=0);if(e){e=0,A=t;t:for(;;){for(;g=+i[A>>3],I=+i[A+8>>3],u=0|r[(A=A+16|0)>>2],s=+i[(u=0==(0|u)?t:u)>>3],a=+i[u+8>>3],g>s?(c=g,g=I):(c=s,s=g,g=a,a=I),n<s|n>c;)if(!(A=0|r[A>>2])){A=22;break t}if(o=(g=g<0?g+6.283185307179586:g)==o|(I=a<0?a+6.283185307179586:a)==o?o+-2220446049250313e-31:o,((I+=(n-s)/(c-s)*(g-I))<0?I+6.283185307179586:I)>o&&(e^=1),!(A=0|r[A>>2])){A=22;break}}if(22==(0|A))return 0|e}else{e=0,A=t;t:for(;;){for(;g=+i[A>>3],I=+i[A+8>>3],u=0|r[(A=A+16|0)>>2],s=+i[(u=0==(0|u)?t:u)>>3],a=+i[u+8>>3],g>s?(c=g,g=I):(c=s,s=g,g=a,a=I),n<s|n>c;)if(!(A=0|r[A>>2])){A=22;break t}if(a+(n-s)/(c-s)*(g-a)>(o=g==o|a==o?o+-2220446049250313e-31:o)&&(e^=1),!(A=0|r[A>>2])){A=22;break}}if(22==(0|A))return 0|e}return 0}function $t(t,e,A,i,o){A|=0,i|=0,o|=0;var a,s,g,c,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0,E=0;if(c=R,R=R+32|0,E=c+16|0,g=c,I=0|me(0|(t|=0),0|(e|=0),52),v(),I&=15,f=0|me(0|A,0|i,52),v(),(0|I)!=(15&f|0))return R=c,0|(E=1);if(h=0|me(0|t,0|e,45),v(),h&=127,B=0|me(0|A,0|i,45),v(),f=(0|h)!=(0|(B&=127))){if(7==(0|(l=0|j(h,B))))return R=c,0|(E=2);7==(0|(C=0|j(B,h)))?m(22925,22949,151,22959):(d=l,u=C)}else d=0,u=0;a=0|O(h),s=0|O(B),r[E>>2]=0,r[E+4>>2]=0,r[E+8>>2]=0,r[E+12>>2]=0;do{if(d){if(l=(0|(B=0|r[4304+(28*h|0)+(d<<2)>>2]))>0,s)if(l){h=0,C=A,l=i;do{C=0|Lt(C,l),l=0|v(),1==(0|(u=0|gt(u)))&&(u=0|gt(1)),h=h+1|0}while((0|h)!=(0|B));B=u,h=C,C=l}else B=u,h=A,C=i;else if(l){h=0,C=A,l=i;do{C=0|_t(C,l),l=0|v(),u=0|gt(u),h=h+1|0}while((0|h)!=(0|B));B=u,h=C,C=l}else B=u,h=A,C=i;if(jt(h,C,E),f||m(22972,22949,181,22959),(l=0!=(0|a))&(u=0!=(0|s))&&m(22999,22949,182,22959),l){if(u=0|xt(t,e),0|n[22032+(7*u|0)+d>>0]){I=3;break}h=C=0|r[21200+(28*u|0)+(d<<2)>>2],Q=26}else if(u){if(u=0|xt(h,C),0|n[22032+(7*u|0)+B>>0]){I=4;break}h=0,C=0|r[21200+(28*B|0)+(u<<2)>>2],Q=26}else u=0;if(26==(0|Q))if((0|C)<=-1&&m(23030,22949,212,22959),(0|h)<=-1&&m(23053,22949,213,22959),(0|C)>0){l=E+4|0,u=0;do{at(l),u=u+1|0}while((0|u)!=(0|C));u=h}else u=h;if(r[g>>2]=0,r[g+4>>2]=0,r[g+8>>2]=0,it(g,d),0|I)for(;0|Jt(I)?nt(g):rt(g),(0|I)>1;)I=I+-1|0;if((0|u)>0){I=0;do{at(g),I=I+1|0}while((0|I)!=(0|u))}X(Q=E+4|0,g,Q),P(Q),Q=50}else if(jt(A,i,E),0!=(0|a)&0!=(0|s))if((0|B)!=(0|h)&&m(23077,22949,243,22959),u=0|xt(t,e),I=0|xt(A,i),0|n[22032+(7*u|0)+I>>0])I=5;else if((0|(u=0|r[21200+(28*u|0)+(I<<2)>>2]))>0){l=E+4|0,I=0;do{at(l),I=I+1|0}while((0|I)!=(0|u));Q=50}else Q=50;else Q=50}while(0);return 50==(0|Q)&&(I=E+4|0,r[o>>2]=r[I>>2],r[o+4>>2]=r[I+4>>2],r[o+8>>2]=r[I+8>>2],I=0),R=c,0|(E=I)}function te(t,e,A,n){A|=0,n|=0;var i,o,a=0,s=0,g=0,c=0,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0;if(o=R,R=R+48|0,g=o+36|0,c=o+24|0,I=o+12|0,u=o,s=0|me(0|(t|=0),0|(e|=0),52),v(),s&=15,C=0|me(0|t,0|e,45),v(),i=0|O(C&=127),be(0|s,0,52),f=134225919|v(),r[(B=n)>>2]=-1,r[B+4>>2]=f,!s)return(0|r[A>>2])>1||(0|r[A+4>>2])>1||(0|r[A+8>>2])>1||127==(0|(a=0|T(C,0|tt(A))))?(R=o,0|(f=1)):(h=0|be(0|a,0,45),B=0|v(),B=-1040385&r[(C=n)+4>>2]|B,r[(f=n)>>2]=r[C>>2]|h,r[f+4>>2]=B,R=o,0|(f=0));for(r[g>>2]=r[A>>2],r[g+4>>2]=r[A+4>>2],r[g+8>>2]=r[A+8>>2];r[c>>2]=r[g>>2],r[c+4>>2]=r[g+4>>2],r[c+8>>2]=r[g+8>>2],0|Jt(s)?(et(g),r[I>>2]=r[g>>2],r[I+4>>2]=r[g+4>>2],r[I+8>>2]=r[g+8>>2],nt(I)):(At(g),r[I>>2]=r[g>>2],r[I+4>>2]=r[g+4>>2],r[I+8>>2]=r[g+8>>2],rt(I)),z(c,I,u),P(u),d=0|r[(B=n)>>2],B=0|r[B+4>>2],A=0|be(7,0,0|(Q=3*(15-s|0)|0)),B&=~(0|v()),Q=0|be(0|tt(u),0,0|Q),B=0|v()|B,r[(f=n)>>2]=Q|d&~A,r[f+4>>2]=B,(0|s)>1;)s=s+-1|0;t:do{if((0|r[g>>2])<=1&&(0|r[g+4>>2])<=1&&(0|r[g+8>>2])<=1){u=127==(0|(c=0|T(C,s=0|tt(g))))?0:0|O(c);e:do{if(s){if(i){if(g=21408+(28*(0|xt(t,e))|0)+(s<<2)|0,(0|(g=0|r[g>>2]))>0){A=0;do{s=0|st(s),A=A+1|0}while((0|A)!=(0|g))}if(1==(0|s)){a=3;break t}127==(0|(A=0|T(C,s)))&&m(23104,22949,376,23134),0|O(A)?m(23147,22949,377,23134):(h=g,l=s,a=A)}else h=0,l=s,a=c;if((0|(I=0|r[4304+(28*C|0)+(l<<2)>>2]))<=-1&&m(23178,22949,384,23134),!u){if((0|h)<=-1&&m(23030,22949,417,23134),0|h){s=0,A=0|r[(g=n)>>2],g=0|r[g+4>>2];do{A=0|Mt(A,g),g=0|v(),r[(Q=n)>>2]=A,r[Q+4>>2]=g,s=s+1|0}while((0|s)<(0|h))}if((0|I)<=0){s=54;break}for(s=0,A=0|r[(g=n)>>2],g=0|r[g+4>>2];;)if(A=0|Mt(A,g),g=0|v(),r[(Q=n)>>2]=A,r[Q+4>>2]=g,(0|(s=s+1|0))==(0|I)){s=54;break e}}if(7==(0|(c=0|j(a,C)))&&m(22925,22949,393,23134),A=0|r[(s=n)>>2],s=0|r[s+4>>2],(0|I)>0){g=0;do{A=0|Mt(A,s),s=0|v(),r[(Q=n)>>2]=A,r[Q+4>>2]=s,g=g+1|0}while((0|g)!=(0|I))}if(A=0|xt(A,s),Q=0|M(a),(0|(A=0|r[(Q?21824:21616)+(28*c|0)+(A<<2)>>2]))<=-1&&m(23030,22949,412,23134),A){s=0,g=0|r[(c=n)>>2],c=0|r[c+4>>2];do{g=0|Ot(g,c),c=0|v(),r[(Q=n)>>2]=g,r[Q+4>>2]=c,s=s+1|0}while((0|s)<(0|A));s=54}else s=54}else if(0!=(0|i)&0!=(0|u))if(s=21408+(28*(Q=0|xt(t,e))|0)+((0|xt(0|r[(s=n)>>2],0|r[s+4>>2]))<<2)|0,(0|(s=0|r[s>>2]))<=-1&&m(23201,22949,433,23134),s){a=0,A=0|r[(g=n)>>2],g=0|r[g+4>>2];do{A=0|Mt(A,g),g=0|v(),r[(Q=n)>>2]=A,r[Q+4>>2]=g,a=a+1|0}while((0|a)<(0|s));a=c,s=54}else a=c,s=55;else a=c,s=54}while(0);if(54==(0|s)&&u&&(s=55),55==(0|s)&&1==(0|xt(0|r[(Q=n)>>2],0|r[Q+4>>2]))){a=4;break}f=0|r[(Q=n)>>2],Q=-1040385&r[Q+4>>2],d=0|be(0|a,0,45),Q=0|Q|v(),r[(a=n)>>2]=f|d,r[a+4>>2]=Q,a=0}else a=2}while(0);return R=o,0|(Q=a)}function ee(t,e){var A=0;if(!(e|=0))return 0|(A=1);A=t|=0,t=1;do{t=0|Q(0==(1&e|0)?1:A,t),e>>=1,A=0|Q(A,A)}while(0!=(0|e));return 0|t}function Ae(t,e,A){t|=0;var n,o,a=0,s=0,g=0,c=0,I=0,u=0,l=0,C=0;if(!(0|Y(e|=0,A|=0)))return 0|(C=0);if(e=0|H(e),o=+i[A>>3],a=e&(a=+i[A+8>>3])<0?a+6.283185307179586:a,(0|(C=0|r[t>>2]))<=0)return 0|(C=0);if(n=0|r[t+4>>2],e){e=0,A=-1,t=0;t:for(;;){for(l=t;c=+i[n+(l<<4)>>3],u=+i[n+(l<<4)+8>>3],g=+i[n+((t=(A+2|0)%(0|C)|0)<<4)>>3],s=+i[n+(t<<4)+8>>3],c>g?(I=c,c=u):(I=g,g=c,c=s,s=u),o<g|o>I;){if(!((0|(A=l+1|0))<(0|C))){A=22;break t}t=l,l=A,A=t}if(a=(c=c<0?c+6.283185307179586:c)==a|(u=s<0?s+6.283185307179586:s)==a?a+-2220446049250313e-31:a,((u+=(o-g)/(I-g)*(c-u))<0?u+6.283185307179586:u)>a&&(e^=1),(0|(t=l+1|0))>=(0|C)){A=22;break}A=l}if(22==(0|A))return 0|e}else{e=0,A=-1,t=0;t:for(;;){for(l=t;c=+i[n+(l<<4)>>3],u=+i[n+(l<<4)+8>>3],g=+i[n+((t=(A+2|0)%(0|C)|0)<<4)>>3],s=+i[n+(t<<4)+8>>3],c>g?(I=c,c=u):(I=g,g=c,c=s,s=u),o<g|o>I;){if(!((0|(A=l+1|0))<(0|C))){A=22;break t}t=l,l=A,A=t}if(s+(o-g)/(I-g)*(c-s)>(a=c==a|s==a?a+-2220446049250313e-31:a)&&(e^=1),(0|(t=l+1|0))>=(0|C)){A=22;break}A=l}if(22==(0|A))return 0|e}return 0}function ne(t,e){e|=0;var A,n,o,a,g,c=0,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0,E=0,p=0;if(!(n=0|r[(t|=0)>>2]))return r[e>>2]=0,r[e+4>>2]=0,r[e+8>>2]=0,r[e+12>>2]=0,r[e+16>>2]=0,r[e+20>>2]=0,r[e+24>>2]=0,void(r[e+28>>2]=0);if(i[(o=e+8|0)>>3]=17976931348623157e292,i[(a=e+24|0)>>3]=17976931348623157e292,i[e>>3]=-17976931348623157e292,i[(g=e+16|0)>>3]=-17976931348623157e292,!((0|n)<=0)){for(A=0|r[t+4>>2],f=17976931348623157e292,d=-17976931348623157e292,Q=0,t=-1,l=17976931348623157e292,C=17976931348623157e292,B=-17976931348623157e292,I=-17976931348623157e292,E=0;c=+i[A+(E<<4)>>3],h=+i[A+(E<<4)+8>>3],u=+i[A+(((0|(t=t+2|0))==(0|n)?0:t)<<4)+8>>3],c<l&&(i[o>>3]=c,l=c),h<C&&(i[a>>3]=h,C=h),c>B?i[e>>3]=c:c=B,h>I&&(i[g>>3]=h,I=h),f=h>0&h<f?h:f,d=h<0&h>d?h:d,Q|=+s(+(h-u))>3.141592653589793,(0|(t=E+1|0))!=(0|n);)p=E,B=c,E=t,t=p;Q&&(i[g>>3]=d,i[a>>3]=f)}}function re(t,e){e|=0;var A,n=0,o=0,a=0,g=0,c=0,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0,E=0,p=0,y=0,v=0,m=0,b=0,F=0;if(d=0|r[(t|=0)>>2]){if(i[(Q=e+8|0)>>3]=17976931348623157e292,i[(E=e+24|0)>>3]=17976931348623157e292,i[e>>3]=-17976931348623157e292,i[(p=e+16|0)>>3]=-17976931348623157e292,(0|d)>0){for(a=0|r[t+4>>2],B=17976931348623157e292,f=-17976931348623157e292,o=0,n=-1,u=17976931348623157e292,l=17976931348623157e292,h=-17976931348623157e292,c=-17976931348623157e292,y=0;g=+i[a+(y<<4)>>3],C=+i[a+(y<<4)+8>>3],I=+i[a+(((0|(b=n+2|0))==(0|d)?0:b)<<4)+8>>3],g<u&&(i[Q>>3]=g,u=g),C<l&&(i[E>>3]=C,l=C),g>h?i[e>>3]=g:g=h,C>c&&(i[p>>3]=C,c=C),B=C>0&C<B?C:B,f=C<0&C>f?C:f,o|=+s(+(C-I))>3.141592653589793,(0|(n=y+1|0))!=(0|d);)b=y,h=g,y=n,n=b;o&&(i[p>>3]=f,i[E>>3]=B)}}else r[e>>2]=0,r[e+4>>2]=0,r[e+8>>2]=0,r[e+12>>2]=0,r[e+16>>2]=0,r[e+20>>2]=0,r[e+24>>2]=0,r[e+28>>2]=0;if(!((0|(n=0|r[(b=t+8|0)>>2]))<=0)){A=t+12|0,m=0;do{if(a=0|r[A>>2],o=m,E=e+((m=m+1|0)<<5)|0,p=0|r[a+(o<<3)>>2]){if(i[(y=e+(m<<5)+8|0)>>3]=17976931348623157e292,i[(t=e+(m<<5)+24|0)>>3]=17976931348623157e292,i[E>>3]=-17976931348623157e292,i[(v=e+(m<<5)+16|0)>>3]=-17976931348623157e292,(0|p)>0){for(d=0|r[a+(o<<3)+4>>2],B=17976931348623157e292,f=-17976931348623157e292,a=0,o=-1,Q=0,u=17976931348623157e292,l=17976931348623157e292,C=-17976931348623157e292,c=-17976931348623157e292;g=+i[d+(Q<<4)>>3],h=+i[d+(Q<<4)+8>>3],I=+i[d+(((0|(o=o+2|0))==(0|p)?0:o)<<4)+8>>3],g<u&&(i[y>>3]=g,u=g),h<l&&(i[t>>3]=h,l=h),g>C?i[E>>3]=g:g=C,h>c&&(i[v>>3]=h,c=h),B=h>0&h<B?h:B,f=h<0&h>f?h:f,a|=+s(+(h-I))>3.141592653589793,(0|(o=Q+1|0))!=(0|p);)F=Q,Q=o,C=g,o=F;a&&(i[v>>3]=f,i[t>>3]=B)}}else r[E>>2]=0,r[E+4>>2]=0,r[E+8>>2]=0,r[E+12>>2]=0,r[E+16>>2]=0,r[E+20>>2]=0,r[E+24>>2]=0,r[E+28>>2]=0,n=0|r[b>>2]}while((0|m)<(0|n))}}function ie(t,e,A){var n=0,i=0,o=0;if(!(0|Ae(t|=0,e|=0,A|=0)))return 0|(i=0);if((0|r[(i=t+8|0)>>2])<=0)return 0|(i=1);for(n=t+12|0,t=0;;){if(o=t,t=t+1|0,0|Ae((0|r[n>>2])+(o<<3)|0,e+(t<<5)|0,A)){t=0,n=6;break}if((0|t)>=(0|r[i>>2])){t=1,n=6;break}}return 6==(0|n)?0|t:0}function oe(t,e,A,n,r){e|=0,A|=0,n|=0,r|=0;var o,a,s,g,c,I,u,l=0;g=+i[(t|=0)>>3],s=+i[e>>3]-g,a=+i[t+8>>3],o=+i[e+8>>3]-a,I=+i[A>>3],l=((l=+i[n>>3]-I)*(a-(u=+i[A+8>>3]))-(g-I)*(c=+i[n+8>>3]-u))/(s*c-o*l),i[r>>3]=g+s*l,i[r+8>>3]=a+o*l}function ae(t,e){return e|=0,+i[(t|=0)>>3]!=+i[e>>3]?0|(e=0):0|(e=+i[t+8>>3]==+i[e+8>>3])}function se(t,e){e|=0;var A,n,r;return+((r=+i[(t|=0)>>3]-+i[e>>3])*r+(n=+i[t+8>>3]-+i[e+8>>3])*n+(A=+i[t+16>>3]-+i[e+16>>3])*A)}function ge(t,e,A){t|=0,A|=0;var n=0;(0|(e|=0))>0?(n=0|Qe(e,4),r[t>>2]=n,n||m(23230,23253,40,23267)):r[t>>2]=0,r[t+4>>2]=e,r[t+8>>2]=0,r[t+12>>2]=A}function ce(t){var e,A,n,o=0,a=0,g=0,I=0;e=(t|=0)+4|0,A=t+12|0,n=t+8|0;t:for(;;){for(a=0|r[e>>2],o=0;;){if((0|o)>=(0|a))break t;if(g=0|r[t>>2],I=0|r[g+(o<<2)>>2])break;o=o+1|0}o=g+(~~(+s(+ +c(10,+ +(15-(0|r[A>>2])|0))*(+i[I>>3]+ +i[I+8>>3]))%+(0|a))>>>0<<2)|0,a=0|r[o>>2];e:do{if(0|a){if(g=I+32|0,(0|a)==(0|I))r[o>>2]=r[g>>2];else{if(!(o=0|r[(a=a+32|0)>>2]))break;for(;(0|o)!=(0|I);)if(!(o=0|r[(a=o+32|0)>>2]))break e;r[a>>2]=r[g>>2]}de(I),r[n>>2]=(0|r[n>>2])-1}}while(0)}de(0|r[t>>2])}function Ie(t){var e,A=0,n=0;for(e=0|r[(t|=0)+4>>2],n=0;;){if((0|n)>=(0|e)){A=0,n=4;break}if(A=0|r[(0|r[t>>2])+(n<<2)>>2]){n=4;break}n=n+1|0}return 4==(0|n)?0|A:0}function ue(t,e){e|=0;var A=0,n=0,o=0,a=0;if(A=~~(+s(+ +c(10,+ +(15-(0|r[(t|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|r[t+4>>2]))>>>0,A=(0|r[t>>2])+(A<<2)|0,!(n=0|r[A>>2]))return 0|(a=1);a=e+32|0;do{if((0|n)!=(0|e)){if(!(A=0|r[n+32>>2]))return 0|(a=1);for(o=A;;){if((0|o)==(0|e)){o=8;break}if(!(A=0|r[o+32>>2])){A=1,o=10;break}n=o,o=A}if(8==(0|o)){r[n+32>>2]=r[a>>2];break}if(10==(0|o))return 0|A}else r[A>>2]=r[a>>2]}while(0);return de(e),r[(a=t+8|0)>>2]=(0|r[a>>2])-1,0|(a=0)}function le(t,e,A){t|=0,e|=0,A|=0;var n,o=0,a=0,g=0;(n=0|fe(40))||m(23283,23253,98,23296),r[n>>2]=r[e>>2],r[n+4>>2]=r[e+4>>2],r[n+8>>2]=r[e+8>>2],r[n+12>>2]=r[e+12>>2],r[(a=n+16|0)>>2]=r[A>>2],r[a+4>>2]=r[A+4>>2],r[a+8>>2]=r[A+8>>2],r[a+12>>2]=r[A+12>>2],r[n+32>>2]=0,a=~~(+s(+ +c(10,+ +(15-(0|r[t+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|r[t+4>>2]))>>>0,a=(0|r[t>>2])+(a<<2)|0,o=0|r[a>>2];do{if(o){for(;!(0|wt(o,e)&&0|wt(o+16|0,A));)if(a=0|r[o+32>>2],!(0|r[(o=0==(0|a)?o:a)+32>>2])){g=10;break}if(10==(0|g)){r[o+32>>2]=n;break}return de(n),0|(g=o)}r[a>>2]=n}while(0);return r[(g=t+8|0)>>2]=1+(0|r[g>>2]),0|(g=n)}function Ce(t,e,A){e|=0,A|=0;var n=0,o=0;if(o=~~(+s(+ +c(10,+ +(15-(0|r[(t|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|r[t+4>>2]))>>>0,!(o=0|r[(0|r[t>>2])+(o<<2)>>2]))return 0|(A=0);if(!A){for(t=o;;){if(0|wt(t,e)){n=10;break}if(!(t=0|r[t+32>>2])){t=0,n=10;break}}if(10==(0|n))return 0|t}for(t=o;;){if(0|wt(t,e)&&0|wt(t+16|0,A)){n=10;break}if(!(t=0|r[t+32>>2])){t=0,n=10;break}}return 10==(0|n)?0|t:0}function he(t,e){e|=0;var A=0;if(A=~~(+s(+ +c(10,+ +(15-(0|r[(t|=0)+12>>2])|0))*(+i[e>>3]+ +i[e+8>>3]))%+(0|r[t+4>>2]))>>>0,!(t=0|r[(0|r[t>>2])+(A<<2)>>2]))return 0|(A=0);for(;;){if(0|wt(t,e)){e=5;break}if(!(t=0|r[t+32>>2])){t=0,e=5;break}}return 5==(0|e)?0|t:0}function Be(t){return 0|~~+function(t){return+ +Re(+(t=+t))}(t=+t)}function fe(t){t|=0;var e,A=0,n=0,i=0,o=0,a=0,s=0,g=0,c=0,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0,E=0,p=0,y=0;e=R,R=R+16|0,C=e;do{if(t>>>0<245){if(t=(I=t>>>0<11?16:t+11&-8)>>>3,3&(n=(l=0|r[5829])>>>t)|0)return i=0|r[(n=(t=23356+((A=(1&n^1)+t|0)<<1<<2)|0)+8|0)>>2],(0|(a=0|r[(o=i+8|0)>>2]))==(0|t)?r[5829]=l&~(1<<A):(r[a+12>>2]=t,r[n>>2]=a),y=A<<3,r[i+4>>2]=3|y,r[(y=i+y+4|0)>>2]=1|r[y>>2],R=e,0|(y=o);if(I>>>0>(u=0|r[5831])>>>0){if(0|n)return A=((A=n<<t&((A=2<<t)|0-A))&0-A)-1|0,a=0|r[(t=(A=23356+((i=((n=(A>>>=g=A>>>12&16)>>>5&8)|g|(a=(A>>>=n)>>>2&4)|(t=(A>>>=a)>>>1&2)|(i=(A>>>=t)>>>1&1))+(A>>>i)|0)<<1<<2)|0)+8|0)>>2],(0|(n=0|r[(g=a+8|0)>>2]))==(0|A)?(t=l&~(1<<i),r[5829]=t):(r[n+12>>2]=A,r[t>>2]=n,t=l),s=(y=i<<3)-I|0,r[a+4>>2]=3|I,r[(o=a+I|0)+4>>2]=1|s,r[a+y>>2]=s,0|u&&(i=0|r[5834],n=23356+((A=u>>>3)<<1<<2)|0,t&(A=1<<A)?A=0|r[(t=n+8|0)>>2]:(r[5829]=t|A,A=n,t=n+8|0),r[t>>2]=i,r[A+12>>2]=i,r[i+8>>2]=A,r[i+12>>2]=n),r[5831]=s,r[5834]=o,R=e,0|(y=g);if(a=0|r[5830]){for(n=(a&0-a)-1|0,n=c=0|r[23620+(((i=(n>>>=o=n>>>12&16)>>>5&8)|o|(s=(n>>>=i)>>>2&4)|(g=(n>>>=s)>>>1&2)|(c=(n>>>=g)>>>1&1))+(n>>>c)<<2)>>2],g=c,c=(-8&r[c+4>>2])-I|0;(t=0|r[n+16>>2])||(t=0|r[n+20>>2]);)n=t,g=(o=(s=(-8&r[t+4>>2])-I|0)>>>0<c>>>0)?t:g,c=o?s:c;if((s=g+I|0)>>>0>g>>>0){o=0|r[g+24>>2],A=0|r[g+12>>2];do{if((0|A)==(0|g)){if(!(A=0|r[(t=g+20|0)>>2])&&!(A=0|r[(t=g+16|0)>>2])){n=0;break}for(;;)if(n=0|r[(i=A+20|0)>>2])A=n,t=i;else{if(!(n=0|r[(i=A+16|0)>>2]))break;A=n,t=i}r[t>>2]=0,n=A}else n=0|r[g+8>>2],r[n+12>>2]=A,r[A+8>>2]=n,n=A}while(0);do{if(0|o){if(A=0|r[g+28>>2],(0|g)==(0|r[(t=23620+(A<<2)|0)>>2])){if(r[t>>2]=n,!n){r[5830]=a&~(1<<A);break}}else if(r[((0|r[(y=o+16|0)>>2])==(0|g)?y:o+20|0)>>2]=n,!n)break;r[n+24>>2]=o,0|(A=0|r[g+16>>2])&&(r[n+16>>2]=A,r[A+24>>2]=n),0|(A=0|r[g+20>>2])&&(r[n+20>>2]=A,r[A+24>>2]=n)}}while(0);return c>>>0<16?(y=c+I|0,r[g+4>>2]=3|y,r[(y=g+y+4|0)>>2]=1|r[y>>2]):(r[g+4>>2]=3|I,r[s+4>>2]=1|c,r[s+c>>2]=c,0|u&&(i=0|r[5834],n=23356+((A=u>>>3)<<1<<2)|0,(A=1<<A)&l?A=0|r[(t=n+8|0)>>2]:(r[5829]=A|l,A=n,t=n+8|0),r[t>>2]=i,r[A+12>>2]=i,r[i+8>>2]=A,r[i+12>>2]=n),r[5831]=c,r[5834]=s),R=e,0|(y=g+8|0)}l=I}else l=I}else l=I}else if(t>>>0<=4294967231)if(I=-8&(t=t+11|0),i=0|r[5830]){o=0-I|0,c=(t>>>=8)?I>>>0>16777215?31:I>>>((c=14-((g=((f=t<<(l=(t+1048320|0)>>>16&8))+520192|0)>>>16&4)|l|(c=((f<<=g)+245760|0)>>>16&2))+(f<<c>>>15)|0)+7|0)&1|c<<1:0,n=0|r[23620+(c<<2)>>2];t:do{if(n)for(t=0,g=I<<(31==(0|c)?0:25-(c>>>1)|0),a=0;;){if((s=(-8&r[n+4>>2])-I|0)>>>0<o>>>0){if(!s){t=n,o=0,f=65;break t}t=n,o=s}if(a=0==(0|(f=0|r[n+20>>2]))|(0|f)==(0|(n=0|r[n+16+(g>>>31<<2)>>2]))?a:f,!n){n=a,f=61;break}g<<=1}else n=0,t=0,f=61}while(0);if(61==(0|f)){if(0==(0|n)&0==(0|t)){if(!(t=((t=2<<c)|0-t)&i)){l=I;break}l=(t&0-t)-1|0,t=0,n=0|r[23620+(((a=(l>>>=s=l>>>12&16)>>>5&8)|s|(g=(l>>>=a)>>>2&4)|(c=(l>>>=g)>>>1&2)|(n=(l>>>=c)>>>1&1))+(l>>>n)<<2)>>2]}n?f=65:(g=t,s=o)}if(65==(0|f))for(a=n;;){if(o=(n=(l=(-8&r[a+4>>2])-I|0)>>>0<o>>>0)?l:o,t=n?a:t,(n=0|r[a+16>>2])||(n=0|r[a+20>>2]),!n){g=t,s=o;break}a=n}if(0!=(0|g)&&s>>>0<((0|r[5831])-I|0)>>>0&&(u=g+I|0)>>>0>g>>>0){a=0|r[g+24>>2],A=0|r[g+12>>2];do{if((0|A)==(0|g)){if(!(A=0|r[(t=g+20|0)>>2])&&!(A=0|r[(t=g+16|0)>>2])){A=0;break}for(;;)if(n=0|r[(o=A+20|0)>>2])A=n,t=o;else{if(!(n=0|r[(o=A+16|0)>>2]))break;A=n,t=o}r[t>>2]=0}else y=0|r[g+8>>2],r[y+12>>2]=A,r[A+8>>2]=y}while(0);do{if(a){if(t=0|r[g+28>>2],(0|g)==(0|r[(n=23620+(t<<2)|0)>>2])){if(r[n>>2]=A,!A){i&=~(1<<t),r[5830]=i;break}}else if(r[((0|r[(y=a+16|0)>>2])==(0|g)?y:a+20|0)>>2]=A,!A)break;r[A+24>>2]=a,0|(t=0|r[g+16>>2])&&(r[A+16>>2]=t,r[t+24>>2]=A),(t=0|r[g+20>>2])&&(r[A+20>>2]=t,r[t+24>>2]=A)}}while(0);t:do{if(s>>>0<16)y=s+I|0,r[g+4>>2]=3|y,r[(y=g+y+4|0)>>2]=1|r[y>>2];else{if(r[g+4>>2]=3|I,r[u+4>>2]=1|s,r[u+s>>2]=s,A=s>>>3,s>>>0<256){n=23356+(A<<1<<2)|0,(t=0|r[5829])&(A=1<<A)?A=0|r[(t=n+8|0)>>2]:(r[5829]=t|A,A=n,t=n+8|0),r[t>>2]=u,r[A+12>>2]=u,r[u+8>>2]=A,r[u+12>>2]=n;break}if(A=23620+((n=(A=s>>>8)?s>>>0>16777215?31:s>>>((n=14-((E=((y=A<<(p=(A+1048320|0)>>>16&8))+520192|0)>>>16&4)|p|(n=((y<<=E)+245760|0)>>>16&2))+(y<<n>>>15)|0)+7|0)&1|n<<1:0)<<2)|0,r[u+28>>2]=n,r[(t=u+16|0)+4>>2]=0,r[t>>2]=0,!(i&(t=1<<n))){r[5830]=i|t,r[A>>2]=u,r[u+24>>2]=A,r[u+12>>2]=u,r[u+8>>2]=u;break}A=0|r[A>>2];e:do{if((-8&r[A+4>>2]|0)!=(0|s)){for(i=s<<(31==(0|n)?0:25-(n>>>1)|0);t=0|r[(n=A+16+(i>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|s)){A=t;break e}i<<=1,A=t}r[n>>2]=u,r[u+24>>2]=A,r[u+12>>2]=u,r[u+8>>2]=u;break t}}while(0);y=0|r[(p=A+8|0)>>2],r[y+12>>2]=u,r[p>>2]=u,r[u+8>>2]=y,r[u+12>>2]=A,r[u+24>>2]=0}}while(0);return R=e,0|(y=g+8|0)}l=I}else l=I;else l=-1}while(0);if((n=0|r[5831])>>>0>=l>>>0)return A=n-l|0,t=0|r[5834],A>>>0>15?(y=t+l|0,r[5834]=y,r[5831]=A,r[y+4>>2]=1|A,r[t+n>>2]=A,r[t+4>>2]=3|l):(r[5831]=0,r[5834]=0,r[t+4>>2]=3|n,r[(y=t+n+4|0)>>2]=1|r[y>>2]),R=e,0|(y=t+8|0);if((s=0|r[5832])>>>0>l>>>0)return E=s-l|0,r[5832]=E,p=(y=0|r[5835])+l|0,r[5835]=p,r[p+4>>2]=1|E,r[y+4>>2]=3|l,R=e,0|(y=y+8|0);if(0|r[5947]?t=0|r[5949]:(r[5949]=4096,r[5948]=4096,r[5950]=-1,r[5951]=-1,r[5952]=0,r[5940]=0,r[5947]=-16&C^1431655768,t=4096),g=l+48|0,(I=(a=t+(c=l+47|0)|0)&(o=0-t|0))>>>0<=l>>>0)return R=e,0|(y=0);if(0|(t=0|r[5939])&&(C=(u=0|r[5937])+I|0)>>>0<=u>>>0|C>>>0>t>>>0)return R=e,0|(y=0);t:do{if(4&r[5940])A=0,f=143;else{n=0|r[5835];e:do{if(n){for(i=23764;!((C=0|r[i>>2])>>>0<=n>>>0&&(C+(0|r[i+4>>2])|0)>>>0>n>>>0);){if(!(t=0|r[i+8>>2])){f=128;break e}i=t}if((A=a-s&o)>>>0<2147483647)if((0|(t=0|Ue(0|A)))==((0|r[i>>2])+(0|r[i+4>>2])|0)){if(-1!=(0|t)){s=A,a=t,f=145;break t}}else i=t,f=136;else A=0}else f=128}while(0);do{if(128==(0|f))if(-1!=(0|(n=0|Ue(0)))&&(A=n,B=(A=(0==((B=(h=0|r[5948])+-1|0)&A|0)?0:(B+A&0-h)-A|0)+I|0)+(h=0|r[5937])|0,A>>>0>l>>>0&A>>>0<2147483647)){if(0|(C=0|r[5939])&&B>>>0<=h>>>0|B>>>0>C>>>0){A=0;break}if((0|(t=0|Ue(0|A)))==(0|n)){s=A,a=n,f=145;break t}i=t,f=136}else A=0}while(0);do{if(136==(0|f)){if(n=0-A|0,!(g>>>0>A>>>0&A>>>0<2147483647&-1!=(0|i))){if(-1==(0|i)){A=0;break}s=A,a=i,f=145;break t}if((t=c-A+(t=0|r[5949])&0-t)>>>0>=2147483647){s=A,a=i,f=145;break t}if(-1==(0|Ue(0|t))){Ue(0|n),A=0;break}s=t+A|0,a=i,f=145;break t}}while(0);r[5940]=4|r[5940],f=143}}while(0);if(143==(0|f)&&I>>>0<2147483647&&!(-1==(0|(E=0|Ue(0|I)))|1^(Q=(d=(B=0|Ue(0))-E|0)>>>0>(l+40|0)>>>0)|E>>>0<B>>>0&-1!=(0|E)&-1!=(0|B)^1)&&(s=Q?d:A,a=E,f=145),145==(0|f)){A=(0|r[5937])+s|0,r[5937]=A,A>>>0>(0|r[5938])>>>0&&(r[5938]=A),c=0|r[5835];t:do{if(c){for(A=23764;;){if((0|a)==((t=0|r[A>>2])+(n=0|r[A+4>>2])|0)){f=154;break}if(!(i=0|r[A+8>>2]))break;A=i}if(154==(0|f)&&(p=A+4|0,0==(8&r[A+12>>2]|0))&&a>>>0>c>>>0&t>>>0<=c>>>0){r[p>>2]=n+s,p=c+(E=0==(7&(E=c+8|0)|0)?0:0-E&7)|0,E=(y=(0|r[5832])+s|0)-E|0,r[5835]=p,r[5832]=E,r[p+4>>2]=1|E,r[c+y+4>>2]=40,r[5836]=r[5951];break}for(a>>>0<(0|r[5833])>>>0&&(r[5833]=a),n=a+s|0,A=23764;;){if((0|r[A>>2])==(0|n)){f=162;break}if(!(t=0|r[A+8>>2]))break;A=t}if(162==(0|f)&&0==(8&r[A+12>>2]|0)){r[A>>2]=a,r[(u=A+4|0)>>2]=(0|r[u>>2])+s,I=(u=a+(0==(7&(u=a+8|0)|0)?0:0-u&7)|0)+l|0,g=(A=n+(0==(7&(A=n+8|0)|0)?0:0-A&7)|0)-u-l|0,r[u+4>>2]=3|l;e:do{if((0|c)==(0|A))y=(0|r[5832])+g|0,r[5832]=y,r[5835]=I,r[I+4>>2]=1|y;else{if((0|r[5834])==(0|A)){y=(0|r[5831])+g|0,r[5831]=y,r[5834]=I,r[I+4>>2]=1|y,r[I+y>>2]=y;break}if(1==(3&(t=0|r[A+4>>2])|0)){s=-8&t,i=t>>>3;A:do{if(t>>>0<256){if(t=0|r[A+8>>2],(0|(n=0|r[A+12>>2]))==(0|t)){r[5829]=r[5829]&~(1<<i);break}r[t+12>>2]=n,r[n+8>>2]=t;break}a=0|r[A+24>>2],t=0|r[A+12>>2];do{if((0|t)==(0|A)){if(t=0|r[(i=(n=A+16|0)+4|0)>>2])n=i;else if(!(t=0|r[n>>2])){t=0;break}for(;;)if(i=0|r[(o=t+20|0)>>2])t=i,n=o;else{if(!(i=0|r[(o=t+16|0)>>2]))break;t=i,n=o}r[n>>2]=0}else y=0|r[A+8>>2],r[y+12>>2]=t,r[t+8>>2]=y}while(0);if(!a)break;i=23620+((n=0|r[A+28>>2])<<2)|0;do{if((0|r[i>>2])==(0|A)){if(r[i>>2]=t,0|t)break;r[5830]=r[5830]&~(1<<n);break A}if(r[((0|r[(y=a+16|0)>>2])==(0|A)?y:a+20|0)>>2]=t,!t)break A}while(0);if(r[t+24>>2]=a,0|(i=0|r[(n=A+16|0)>>2])&&(r[t+16>>2]=i,r[i+24>>2]=t),!(n=0|r[n+4>>2]))break;r[t+20>>2]=n,r[n+24>>2]=t}while(0);A=A+s|0,o=s+g|0}else o=g;if(r[(A=A+4|0)>>2]=-2&r[A>>2],r[I+4>>2]=1|o,r[I+o>>2]=o,A=o>>>3,o>>>0<256){n=23356+(A<<1<<2)|0,(t=0|r[5829])&(A=1<<A)?A=0|r[(t=n+8|0)>>2]:(r[5829]=t|A,A=n,t=n+8|0),r[t>>2]=I,r[A+12>>2]=I,r[I+8>>2]=A,r[I+12>>2]=n;break}A=o>>>8;do{if(A){if(o>>>0>16777215){i=31;break}i=o>>>((i=14-((E=((y=A<<(p=(A+1048320|0)>>>16&8))+520192|0)>>>16&4)|p|(i=((y<<=E)+245760|0)>>>16&2))+(y<<i>>>15)|0)+7|0)&1|i<<1}else i=0}while(0);if(A=23620+(i<<2)|0,r[I+28>>2]=i,r[(t=I+16|0)+4>>2]=0,r[t>>2]=0,!((t=0|r[5830])&(n=1<<i))){r[5830]=t|n,r[A>>2]=I,r[I+24>>2]=A,r[I+12>>2]=I,r[I+8>>2]=I;break}A=0|r[A>>2];A:do{if((-8&r[A+4>>2]|0)!=(0|o)){for(i=o<<(31==(0|i)?0:25-(i>>>1)|0);t=0|r[(n=A+16+(i>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|o)){A=t;break A}i<<=1,A=t}r[n>>2]=I,r[I+24>>2]=A,r[I+12>>2]=I,r[I+8>>2]=I;break e}}while(0);y=0|r[(p=A+8|0)>>2],r[y+12>>2]=I,r[p>>2]=I,r[I+8>>2]=y,r[I+12>>2]=A,r[I+24>>2]=0}}while(0);return R=e,0|(y=u+8|0)}for(A=23764;!((t=0|r[A>>2])>>>0<=c>>>0&&(y=t+(0|r[A+4>>2])|0)>>>0>c>>>0);)A=0|r[A+8>>2];A=(t=(t=(o=y+-47|0)+(0==(7&(t=o+8|0)|0)?0:0-t&7)|0)>>>0<(o=c+16|0)>>>0?c:t)+8|0,p=a+(E=0==(7&(E=a+8|0)|0)?0:0-E&7)|0,E=(n=s+-40|0)-E|0,r[5835]=p,r[5832]=E,r[p+4>>2]=1|E,r[a+n+4>>2]=40,r[5836]=r[5951],r[(n=t+4|0)>>2]=27,r[A>>2]=r[5941],r[A+4>>2]=r[5942],r[A+8>>2]=r[5943],r[A+12>>2]=r[5944],r[5941]=a,r[5942]=s,r[5944]=0,r[5943]=A,A=t+24|0;do{p=A,r[(A=A+4|0)>>2]=7}while((p+8|0)>>>0<y>>>0);if((0|t)!=(0|c)){if(a=t-c|0,r[n>>2]=-2&r[n>>2],r[c+4>>2]=1|a,r[t>>2]=a,A=a>>>3,a>>>0<256){n=23356+(A<<1<<2)|0,(t=0|r[5829])&(A=1<<A)?A=0|r[(t=n+8|0)>>2]:(r[5829]=t|A,A=n,t=n+8|0),r[t>>2]=c,r[A+12>>2]=c,r[c+8>>2]=A,r[c+12>>2]=n;break}if(n=23620+((i=(A=a>>>8)?a>>>0>16777215?31:a>>>((i=14-((E=((y=A<<(p=(A+1048320|0)>>>16&8))+520192|0)>>>16&4)|p|(i=((y<<=E)+245760|0)>>>16&2))+(y<<i>>>15)|0)+7|0)&1|i<<1:0)<<2)|0,r[c+28>>2]=i,r[c+20>>2]=0,r[o>>2]=0,!((A=0|r[5830])&(t=1<<i))){r[5830]=A|t,r[n>>2]=c,r[c+24>>2]=n,r[c+12>>2]=c,r[c+8>>2]=c;break}A=0|r[n>>2];e:do{if((-8&r[A+4>>2]|0)!=(0|a)){for(i=a<<(31==(0|i)?0:25-(i>>>1)|0);t=0|r[(n=A+16+(i>>>31<<2)|0)>>2];){if((-8&r[t+4>>2]|0)==(0|a)){A=t;break e}i<<=1,A=t}r[n>>2]=c,r[c+24>>2]=A,r[c+12>>2]=c,r[c+8>>2]=c;break t}}while(0);y=0|r[(p=A+8|0)>>2],r[y+12>>2]=c,r[p>>2]=c,r[c+8>>2]=y,r[c+12>>2]=A,r[c+24>>2]=0}}else 0==(0|(y=0|r[5833]))|a>>>0<y>>>0&&(r[5833]=a),r[5941]=a,r[5942]=s,r[5944]=0,r[5838]=r[5947],r[5837]=-1,r[5842]=23356,r[5841]=23356,r[5844]=23364,r[5843]=23364,r[5846]=23372,r[5845]=23372,r[5848]=23380,r[5847]=23380,r[5850]=23388,r[5849]=23388,r[5852]=23396,r[5851]=23396,r[5854]=23404,r[5853]=23404,r[5856]=23412,r[5855]=23412,r[5858]=23420,r[5857]=23420,r[5860]=23428,r[5859]=23428,r[5862]=23436,r[5861]=23436,r[5864]=23444,r[5863]=23444,r[5866]=23452,r[5865]=23452,r[5868]=23460,r[5867]=23460,r[5870]=23468,r[5869]=23468,r[5872]=23476,r[5871]=23476,r[5874]=23484,r[5873]=23484,r[5876]=23492,r[5875]=23492,r[5878]=23500,r[5877]=23500,r[5880]=23508,r[5879]=23508,r[5882]=23516,r[5881]=23516,r[5884]=23524,r[5883]=23524,r[5886]=23532,r[5885]=23532,r[5888]=23540,r[5887]=23540,r[5890]=23548,r[5889]=23548,r[5892]=23556,r[5891]=23556,r[5894]=23564,r[5893]=23564,r[5896]=23572,r[5895]=23572,r[5898]=23580,r[5897]=23580,r[5900]=23588,r[5899]=23588,r[5902]=23596,r[5901]=23596,r[5904]=23604,r[5903]=23604,p=a+(E=0==(7&(E=a+8|0)|0)?0:0-E&7)|0,E=(y=s+-40|0)-E|0,r[5835]=p,r[5832]=E,r[p+4>>2]=1|E,r[a+y+4>>2]=40,r[5836]=r[5951]}while(0);if((A=0|r[5832])>>>0>l>>>0)return E=A-l|0,r[5832]=E,p=(y=0|r[5835])+l|0,r[5835]=p,r[p+4>>2]=1|E,r[y+4>>2]=3|l,R=e,0|(y=y+8|0)}return r[(y=23312)>>2]=12,R=e,0|(y=0)}function de(t){var e=0,A=0,n=0,i=0,o=0,a=0,s=0,g=0;if(t|=0){A=t+-8|0,i=0|r[5833],g=A+(e=-8&(t=0|r[t+-4>>2]))|0;do{if(1&t)s=A,a=A;else{if(n=0|r[A>>2],!(3&t))return;if(o=n+e|0,(a=A+(0-n)|0)>>>0<i>>>0)return;if((0|r[5834])==(0|a)){if(3!=(3&(e=0|r[(t=g+4|0)>>2])|0)){s=a,e=o;break}return r[5831]=o,r[t>>2]=-2&e,r[a+4>>2]=1|o,void(r[a+o>>2]=o)}if(A=n>>>3,n>>>0<256){if(t=0|r[a+8>>2],(0|(e=0|r[a+12>>2]))==(0|t)){r[5829]=r[5829]&~(1<<A),s=a,e=o;break}r[t+12>>2]=e,r[e+8>>2]=t,s=a,e=o;break}i=0|r[a+24>>2],t=0|r[a+12>>2];do{if((0|t)==(0|a)){if(t=0|r[(A=(e=a+16|0)+4|0)>>2])e=A;else if(!(t=0|r[e>>2])){t=0;break}for(;;)if(A=0|r[(n=t+20|0)>>2])t=A,e=n;else{if(!(A=0|r[(n=t+16|0)>>2]))break;t=A,e=n}r[e>>2]=0}else s=0|r[a+8>>2],r[s+12>>2]=t,r[t+8>>2]=s}while(0);if(i){if(e=0|r[a+28>>2],(0|r[(A=23620+(e<<2)|0)>>2])==(0|a)){if(r[A>>2]=t,!t){r[5830]=r[5830]&~(1<<e),s=a,e=o;break}}else if(r[((0|r[(s=i+16|0)>>2])==(0|a)?s:i+20|0)>>2]=t,!t){s=a,e=o;break}r[t+24>>2]=i,0|(A=0|r[(e=a+16|0)>>2])&&(r[t+16>>2]=A,r[A+24>>2]=t),(e=0|r[e+4>>2])?(r[t+20>>2]=e,r[e+24>>2]=t,s=a,e=o):(s=a,e=o)}else s=a,e=o}}while(0);if(!(a>>>0>=g>>>0)&&1&(n=0|r[(t=g+4|0)>>2])){if(2&n)r[t>>2]=-2&n,r[s+4>>2]=1|e,r[a+e>>2]=e,i=e;else{if((0|r[5835])==(0|g)){if(g=(0|r[5832])+e|0,r[5832]=g,r[5835]=s,r[s+4>>2]=1|g,(0|s)!=(0|r[5834]))return;return r[5834]=0,void(r[5831]=0)}if((0|r[5834])==(0|g))return g=(0|r[5831])+e|0,r[5831]=g,r[5834]=a,r[s+4>>2]=1|g,void(r[a+g>>2]=g);i=(-8&n)+e|0,A=n>>>3;do{if(n>>>0<256){if(e=0|r[g+8>>2],(0|(t=0|r[g+12>>2]))==(0|e)){r[5829]=r[5829]&~(1<<A);break}r[e+12>>2]=t,r[t+8>>2]=e;break}o=0|r[g+24>>2],t=0|r[g+12>>2];do{if((0|t)==(0|g)){if(t=0|r[(A=(e=g+16|0)+4|0)>>2])e=A;else if(!(t=0|r[e>>2])){A=0;break}for(;;)if(A=0|r[(n=t+20|0)>>2])t=A,e=n;else{if(!(A=0|r[(n=t+16|0)>>2]))break;t=A,e=n}r[e>>2]=0,A=t}else A=0|r[g+8>>2],r[A+12>>2]=t,r[t+8>>2]=A,A=t}while(0);if(0|o){if(t=0|r[g+28>>2],(0|r[(e=23620+(t<<2)|0)>>2])==(0|g)){if(r[e>>2]=A,!A){r[5830]=r[5830]&~(1<<t);break}}else if(r[((0|r[(n=o+16|0)>>2])==(0|g)?n:o+20|0)>>2]=A,!A)break;r[A+24>>2]=o,0|(e=0|r[(t=g+16|0)>>2])&&(r[A+16>>2]=e,r[e+24>>2]=A),0|(t=0|r[t+4>>2])&&(r[A+20>>2]=t,r[t+24>>2]=A)}}while(0);if(r[s+4>>2]=1|i,r[a+i>>2]=i,(0|s)==(0|r[5834]))return void(r[5831]=i)}if(t=i>>>3,i>>>0<256)return A=23356+(t<<1<<2)|0,(e=0|r[5829])&(t=1<<t)?t=0|r[(e=A+8|0)>>2]:(r[5829]=e|t,t=A,e=A+8|0),r[e>>2]=s,r[t+12>>2]=s,r[s+8>>2]=t,void(r[s+12>>2]=A);t=23620+((n=(t=i>>>8)?i>>>0>16777215?31:i>>>((n=14-((o=((g=t<<(a=(t+1048320|0)>>>16&8))+520192|0)>>>16&4)|a|(n=((g<<=o)+245760|0)>>>16&2))+(g<<n>>>15)|0)+7|0)&1|n<<1:0)<<2)|0,r[s+28>>2]=n,r[s+20>>2]=0,r[s+16>>2]=0,e=0|r[5830],A=1<<n;t:do{if(e&A){t=0|r[t>>2];e:do{if((-8&r[t+4>>2]|0)!=(0|i)){for(n=i<<(31==(0|n)?0:25-(n>>>1)|0);e=0|r[(A=t+16+(n>>>31<<2)|0)>>2];){if((-8&r[e+4>>2]|0)==(0|i)){t=e;break e}n<<=1,t=e}r[A>>2]=s,r[s+24>>2]=t,r[s+12>>2]=s,r[s+8>>2]=s;break t}}while(0);g=0|r[(a=t+8|0)>>2],r[g+12>>2]=s,r[a>>2]=s,r[s+8>>2]=g,r[s+12>>2]=t,r[s+24>>2]=0}else r[5830]=e|A,r[t>>2]=s,r[s+24>>2]=t,r[s+12>>2]=s,r[s+8>>2]=s}while(0);if(g=(0|r[5837])-1|0,r[5837]=g,!(0|g)){for(t=23772;t=0|r[t>>2];)t=t+8|0;r[5837]=-1}}}}function Qe(t,e){e|=0;var A=0;return(t|=0)?(A=0|Q(e,t),(e|t)>>>0>65535&&(A=(0|(A>>>0)/(t>>>0))==(0|e)?A:-1)):A=0,(t=0|fe(A))&&3&r[t+-4>>2]?(De(0|t,0,0|A),0|t):0|t}function Ee(t,e,A,n){return 0|(y(0|(n=(e|=0)-(n|=0)-((A|=0)>>>0>(t|=0)>>>0|0)>>>0)),t-A>>>0|0)}function pe(t){return 0|((t|=0)?31-(0|p(t^t-1))|0:32)}function ye(t,e,A,n,i){i|=0;var o=0,a=0,s=0,g=0,c=0,I=0,u=0,l=0,C=0,h=0;if(I=t|=0,a=A|=0,s=l=n|=0,!(c=g=e|=0))return o=0!=(0|i),s?o?(r[i>>2]=0|t,r[i+4>>2]=0&e,i=0,0|(y(0|(l=0)),i)):(i=0,0|(y(0|(l=0)),i)):(o&&(r[i>>2]=(I>>>0)%(a>>>0),r[i+4>>2]=0),i=(I>>>0)/(a>>>0)>>>0,0|(y(0|(l=0)),i));o=0==(0|s);do{if(a){if(!o){if((o=(0|p(0|s))-(0|p(0|c))|0)>>>0<=31){a=u=o+1|0,t=I>>>(u>>>0)&(e=o-31>>31)|c<<(s=31-o|0),e&=c>>>(u>>>0),o=0,s=I<<s;break}return i?(r[i>>2]=0|t,r[i+4>>2]=g|0&e,i=0,0|(y(0|(l=0)),i)):(i=0,0|(y(0|(l=0)),i))}if((o=a-1|0)&a|0){a=s=33+(0|p(0|a))-(0|p(0|c))|0,t=(u=32-s|0)-1>>31&c>>>((C=s-32|0)>>>0)|(c<<u|I>>>(s>>>0))&(e=C>>31),e&=c>>>(s>>>0),o=I<<(h=64-s|0)&(g=u>>31),s=(c<<h|I>>>(C>>>0))&g|I<<u&s-33>>31;break}return 0|i&&(r[i>>2]=o&I,r[i+4>>2]=0),1==(0|a)?(h=0|t,0|(y(0|(C=g|0&e)),h)):(C=c>>>((h=0|pe(0|a))>>>0)|0,h=c<<32-h|I>>>(h>>>0)|0,0|(y(0|C),h))}if(o)return 0|i&&(r[i>>2]=(c>>>0)%(a>>>0),r[i+4>>2]=0),h=(c>>>0)/(a>>>0)>>>0,0|(y(0|(C=0)),h);if(!I)return 0|i&&(r[i>>2]=0,r[i+4>>2]=(c>>>0)%(s>>>0)),h=(c>>>0)/(s>>>0)>>>0,0|(y(0|(C=0)),h);if(!((o=s-1|0)&s))return 0|i&&(r[i>>2]=0|t,r[i+4>>2]=o&c|0&e),C=0,h=c>>>((0|pe(0|s))>>>0),0|(y(0|C),h);if((o=(0|p(0|s))-(0|p(0|c))|0)>>>0<=30){a=e=o+1|0,t=c<<(s=31-o|0)|I>>>(e>>>0),e=c>>>(e>>>0),o=0,s=I<<s;break}return i?(r[i>>2]=0|t,r[i+4>>2]=g|0&e,h=0,0|(y(0|(C=0)),h)):(h=0,0|(y(0|(C=0)),h))}while(0);if(a){c=0|function(t,e,A,n){return 0|(y((e|=0)+(n|=0)+((A=(t|=0)+(A|=0)>>>0)>>>0<t>>>0|0)>>>0|0),0|A)}(0|(u=0|A),0|(I=l|0&n),-1,-1),A=0|v(),g=s,s=0;do{n=g,g=o>>>31|g<<1,o=s|o<<1,Ee(0|c,0|A,0|(n=t<<1|n>>>31|0),0|(l=t>>>31|e<<1|0)),s=1&(C=(h=0|v())>>31|((0|h)<0?-1:0)<<1),t=0|Ee(0|n,0|l,C&u|0,(((0|h)<0?-1:0)>>31|((0|h)<0?-1:0)<<1)&I|0),e=0|v(),a=a-1|0}while(0!=(0|a));c=g,g=0}else c=s,g=0,s=0;return a=0,0|i&&(r[i>>2]=t,r[i+4>>2]=e),h=-2&(o<<1|0)|s,0|(y(0|(C=(0|o)>>>31|(c|a)<<1|0&(a<<1|o>>>31)|g)),h)}function ve(t,e,A,n){var i,o;return o=R,R=R+16|0,ye(t|=0,e|=0,A|=0,n|=0,i=0|o),R=o,0|(y(0|r[i+4>>2]),0|r[i>>2])}function me(t,e,A){return t|=0,e|=0,(0|(A|=0))<32?(y(e>>>A|0),t>>>A|(e&(1<<A)-1)<<32-A):(y(0),e>>>A-32|0)}function be(t,e,A){return t|=0,e|=0,(0|(A|=0))<32?(y(e<<A|(t&(1<<A)-1<<32-A)>>>32-A|0),t<<A):(y(t<<A-32|0),0)}function Fe(t,e){return e=+e,(t=+t)!=t?+e:e!=e?+t:+E(+t,+e)}function we(t){return(t=+t)>=0?+a(t+.5):+d(t-.5)}function Se(t,e,A){t|=0,e|=0;var i,o,a=0;if((0|(A|=0))>=8192)return w(0|t,0|e,0|A),0|t;if(o=0|t,i=t+A|0,(3&t)==(3&e)){for(;3&t;){if(!A)return 0|o;n[t>>0]=0|n[e>>0],t=t+1|0,e=e+1|0,A=A-1|0}for(a=(A=-4&i|0)-64|0;(0|t)<=(0|a);)r[t>>2]=r[e>>2],r[t+4>>2]=r[e+4>>2],r[t+8>>2]=r[e+8>>2],r[t+12>>2]=r[e+12>>2],r[t+16>>2]=r[e+16>>2],r[t+20>>2]=r[e+20>>2],r[t+24>>2]=r[e+24>>2],r[t+28>>2]=r[e+28>>2],r[t+32>>2]=r[e+32>>2],r[t+36>>2]=r[e+36>>2],r[t+40>>2]=r[e+40>>2],r[t+44>>2]=r[e+44>>2],r[t+48>>2]=r[e+48>>2],r[t+52>>2]=r[e+52>>2],r[t+56>>2]=r[e+56>>2],r[t+60>>2]=r[e+60>>2],t=t+64|0,e=e+64|0;for(;(0|t)<(0|A);)r[t>>2]=r[e>>2],t=t+4|0,e=e+4|0}else for(A=i-4|0;(0|t)<(0|A);)n[t>>0]=0|n[e>>0],n[t+1>>0]=0|n[e+1>>0],n[t+2>>0]=0|n[e+2>>0],n[t+3>>0]=0|n[e+3>>0],t=t+4|0,e=e+4|0;for(;(0|t)<(0|i);)n[t>>0]=0|n[e>>0],t=t+1|0,e=e+1|0;return 0|o}function De(t,e,A){e|=0;var i,o=0,a=0,s=0;if(i=(t|=0)+(A|=0)|0,e&=255,(0|A)>=67){for(;3&t;)n[t>>0]=e,t=t+1|0;for(s=e|e<<8|e<<16|e<<24,a=(o=-4&i|0)-64|0;(0|t)<=(0|a);)r[t>>2]=s,r[t+4>>2]=s,r[t+8>>2]=s,r[t+12>>2]=s,r[t+16>>2]=s,r[t+20>>2]=s,r[t+24>>2]=s,r[t+28>>2]=s,r[t+32>>2]=s,r[t+36>>2]=s,r[t+40>>2]=s,r[t+44>>2]=s,r[t+48>>2]=s,r[t+52>>2]=s,r[t+56>>2]=s,r[t+60>>2]=s,t=t+64|0;for(;(0|t)<(0|o);)r[t>>2]=s,t=t+4|0}for(;(0|t)<(0|i);)n[t>>0]=e,t=t+1|0;return i-A|0}function Re(t){return(t=+t)>=0?+a(t+.5):+d(t-.5)}function Ue(t){t|=0;var e,A,n;return n=0|F(),(0|t)>0&(0|(e=(A=0|r[o>>2])+t|0))<(0|A)|(0|e)<0?(D(0|e),b(12),-1):(0|e)>(0|n)&&!(0|S(0|e))?(b(12),-1):(r[o>>2]=e,0|A)}return{___uremdi3:ve,_bitshift64Lshr:me,_bitshift64Shl:be,_calloc:Qe,_cellAreaKm2:function(t,e){var A,n,i,o=0;if(i=R,R=R+192|0,n=i,Yt(t|=0,e|=0,A=i+168|0),Vt(t,e,n),(0|(e=0|r[n>>2]))>0){if(o=+Dt(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,A)+0,1!=(0|e)){t=1;do{o+=+Dt(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,A)}while((0|t)<(0|e))}}else o=0;return R=i,6371.007180918475*o*6371.007180918475},_cellAreaM2:function(t,e){var A,n,i,o=0;if(i=R,R=R+192|0,n=i,Yt(t|=0,e|=0,A=i+168|0),Vt(t,e,n),(0|(e=0|r[n>>2]))>0){if(o=+Dt(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,A)+0,1!=(0|e)){t=1;do{o+=+Dt(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,A)}while((0|t)<(0|e))}}else o=0;return R=i,6371.007180918475*o*6371.007180918475*1e3*1e3},_cellAreaRads2:function(t,e){var A,n,i,o=0;if(i=R,R=R+192|0,n=i,Yt(t|=0,e|=0,A=i+168|0),Vt(t,e,n),(0|(e=0|r[n>>2]))<=0)return R=i,+(o=0);if(o=+Dt(n+8|0,n+8+((1!=(0|e)&1)<<4)|0,A)+0,1==(0|e))return R=i,+o;t=1;do{o+=+Dt(n+8+(t<<4)|0,n+8+(((0|(t=t+1|0))%(0|e)|0)<<4)|0,A)}while((0|t)<(0|e));return R=i,+o},_compact:function(t,e,A){e|=0;var n,i=0,o=0,a=0,s=0,g=0,c=0,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0,E=0,p=0,y=0,m=0,b=0,F=0;if(!(A|=0))return 0|(b=0);if(i=0|r[(o=t|=0)>>2],!0&0==(15728640&(o=0|r[o+4>>2])|0)){if((0|A)<=0)return 0|(b=0);if(r[(b=e)>>2]=i,r[b+4>>2]=o,1==(0|A))return 0|(b=0);i=1;do{m=0|r[(y=t+(i<<3)|0)+4>>2],r[(b=e+(i<<3)|0)>>2]=r[y>>2],r[b+4>>2]=m,i=i+1|0}while((0|i)!=(0|A));return 0|(i=0)}if(!(m=0|fe(y=A<<3)))return 0|(b=-3);if(Se(0|m,0|t,0|y),!(n=0|Qe(A,8)))return de(m),0|(b=-3);i=A;t:for(;;){E=0|me(0|(u=0|r[(s=m)>>2]),0|(s=0|r[s+4>>2]),52),v(),p=(E&=15)+-1|0,Q=(0|i)>0;e:do{if(Q){if(d=((0|i)<0)<<31>>31,B=0|be(0|p,0,52),f=0|v(),p>>>0>15)for(o=0,t=u,A=s;;){if(!(0==(0|t)&0==(0|A))){if(a=0|me(0|t,0|A,52),v(),g=(0|(a&=15))<(0|p),a=(0|a)==(0|p),A=0|ve(0|(I=g?0:a?t:0),0|(t=g?0:a?A:0),0|i,0|d),v(),0==(0|(c=0|r[(g=a=n+(A<<3)|0)>>2]))&0==(0|(g=0|r[g+4>>2])))A=I;else for(B=0,h=A,C=g,A=I;;){if((0|B)>(0|i)){b=41;break t}if((0|c)==(0|A)&(-117440513&C|0)==(0|t)){I=0|me(0|c,0|C,56),v(),l=(I&=7)+1|0,f=0|me(0|c,0|C,45),v();A:do{if(0|O(127&f)){if(c=0|me(0|c,0|C,52),v(),!(c&=15)){g=6;break}for(g=1;;){if(!(0==((f=0|be(7,0,3*(15-g|0)|0))&A|0)&0==((0|v())&t|0))){g=7;break A}if(!(g>>>0<c>>>0)){g=6;break}g=g+1|0}}else g=7}while(0);if((I+2|0)>>>0>g>>>0){b=51;break t}f=0|be(0|l,0,56),t=0|v()|-117440513&t,r[(g=a)>>2]=0,r[g+4>>2]=0,g=h,A|=f}else g=(h+1|0)%(0|i)|0;if(0==(0|(c=0|r[(C=a=n+(g<<3)|0)>>2]))&0==(0|(C=0|r[C+4>>2])))break;B=B+1|0,h=g}r[(f=a)>>2]=A,r[f+4>>2]=t}if((0|(o=o+1|0))>=(0|i))break e;t=0|r[(A=m+(o<<3)|0)>>2],A=0|r[A+4>>2]}for(o=0,t=u,A=s;;){if(!(0==(0|t)&0==(0|A))){if(g=0|me(0|t,0|A,52),v(),(0|(g&=15))>=(0|p)){if((0|g)!=(0|p)&&(t|=B,A=-15728641&A|f,g>>>0>=E>>>0)){a=p;do{h=0|be(7,0,3*(14-a|0)|0),a=a+1|0,t|=h,A=0|v()|A}while(a>>>0<g>>>0)}}else t=0,A=0;if(g=0|ve(0|t,0|A,0|i,0|d),v(),!(0==(0|(I=0|r[(c=a=n+(g<<3)|0)>>2]))&0==(0|(c=0|r[c+4>>2]))))for(h=0;;){if((0|h)>(0|i)){b=41;break t}if((0|I)==(0|t)&(-117440513&c|0)==(0|A)){l=0|me(0|I,0|c,56),v(),C=(l&=7)+1|0,F=0|me(0|I,0|c,45),v();A:do{if(0|O(127&F)){if(I=0|me(0|I,0|c,52),v(),!(I&=15)){c=6;break}for(c=1;;){if(!(0==((F=0|be(7,0,3*(15-c|0)|0))&t|0)&0==((0|v())&A|0))){c=7;break A}if(!(c>>>0<I>>>0)){c=6;break}c=c+1|0}}else c=7}while(0);if((l+2|0)>>>0>c>>>0){b=51;break t}F=0|be(0|C,0,56),A=0|v()|-117440513&A,r[(C=a)>>2]=0,r[C+4>>2]=0,t|=F}else g=(g+1|0)%(0|i)|0;if(0==(0|(I=0|r[(c=a=n+(g<<3)|0)>>2]))&0==(0|(c=0|r[c+4>>2])))break;h=h+1|0}r[(F=a)>>2]=t,r[F+4>>2]=A}if((0|(o=o+1|0))>=(0|i))break e;t=0|r[(A=m+(o<<3)|0)>>2],A=0|r[A+4>>2]}}}while(0);if((i+5|0)>>>0<11){b=99;break}if(!(f=0|Qe((0|i)/6|0,8))){b=58;break}e:do{if(Q){h=0,C=0;do{if(!(0==(0|(o=0|r[(t=g=n+(h<<3)|0)>>2]))&0==(0|(t=0|r[t+4>>2])))){c=0|me(0|o,0|t,56),v(),A=(c&=7)+1|0,I=-117440513&t,F=0|me(0|o,0|t,45),v();A:do{if(0|O(127&F)){if(l=0|me(0|o,0|t,52),v(),0|(l&=15))for(a=1;;){if(!(0==(o&(F=0|be(7,0,3*(15-a|0)|0))|0)&0==(I&(0|v())|0)))break A;if(!(a>>>0<l>>>0))break;a=a+1|0}o|=t=0|be(0|A,0,56),t=0|v()|I,r[(A=g)>>2]=o,r[A+4>>2]=t,A=c+2|0}}while(0);7==(0|A)&&(r[(F=f+(C<<3)|0)>>2]=o,r[F+4>>2]=-117440513&t,C=C+1|0)}h=h+1|0}while((0|h)!=(0|i));if(Q){if(B=((0|i)<0)<<31>>31,l=0|be(0|p,0,52),h=0|v(),p>>>0>15)for(t=0,o=0;;){do{if(!(0==(0|u)&0==(0|s))){for(c=0|me(0|u,0|s,52),v(),a=(0|(c&=15))<(0|p),c=(0|c)==(0|p),a=0|ve(0|(g=a?0:c?u:0),0|(c=a?0:c?s:0),0|i,0|B),v(),A=0;;){if((0|A)>(0|i)){b=98;break t}if((-117440513&(I=0|r[(F=n+(a<<3)|0)+4>>2])|0)==(0|c)&&(0|r[F>>2])==(0|g)){b=70;break}if((0|r[(F=n+((a=(a+1|0)%(0|i)|0)<<3)|0)>>2])==(0|g)&&(0|r[F+4>>2])==(0|c))break;A=A+1|0}if(70==(0|b)&&(b=0,!0&100663296==(117440512&I|0)))break;r[(F=e+(o<<3)|0)>>2]=u,r[F+4>>2]=s,o=o+1|0}}while(0);if((0|(t=t+1|0))>=(0|i)){i=C;break e}u=0|r[(s=m+(t<<3)|0)>>2],s=0|r[s+4>>2]}for(t=0,o=0;;){do{if(!(0==(0|u)&0==(0|s))){if(c=0|me(0|u,0|s,52),v(),(0|(c&=15))>=(0|p))if((0|c)!=(0|p))if(A=u|l,a=-15728641&s|h,c>>>0<E>>>0)c=a;else{g=p;do{F=0|be(7,0,3*(14-g|0)|0),g=g+1|0,A|=F,a=0|v()|a}while(g>>>0<c>>>0);c=a}else A=u,c=s;else A=0,c=0;for(g=0|ve(0|A,0|c,0|i,0|B),v(),a=0;;){if((0|a)>(0|i)){b=98;break t}if((-117440513&(I=0|r[(F=n+(g<<3)|0)+4>>2])|0)==(0|c)&&(0|r[F>>2])==(0|A)){b=93;break}if((0|r[(F=n+((g=(g+1|0)%(0|i)|0)<<3)|0)>>2])==(0|A)&&(0|r[F+4>>2])==(0|c))break;a=a+1|0}if(93==(0|b)&&(b=0,!0&100663296==(117440512&I|0)))break;r[(F=e+(o<<3)|0)>>2]=u,r[F+4>>2]=s,o=o+1|0}}while(0);if((0|(t=t+1|0))>=(0|i)){i=C;break e}u=0|r[(s=m+(t<<3)|0)>>2],s=0|r[s+4>>2]}}else o=0,i=C}else o=0,i=0}while(0);if(De(0|n,0,0|y),Se(0|m,0|f,i<<3|0),de(f),!i)break;e=e+(o<<3)|0}return 41==(0|b)?(de(m),de(n),0|(F=-1)):51==(0|b)?(de(m),de(n),0|(F=-2)):58==(0|b)?(de(m),de(n),0|(F=-3)):98==(0|b)?(de(f),de(m),de(n),0|(F=-1)):(99==(0|b)&&Se(0|e,0|m,i<<3|0),de(m),de(n),0|(F=0))},_destroyLinkedPolygon:function(t){var e=0,A=0,n=0,i=0;if(t|=0)for(n=1;;){if(0|(e=0|r[t>>2]))do{if(0|(A=0|r[e>>2]))do{i=A,A=0|r[A+16>>2],de(i)}while(0!=(0|A));i=e,e=0|r[e+8>>2],de(i)}while(0!=(0|e));if(e=t,t=0|r[t+8>>2],n||de(e),!t)break;n=0}},_edgeLengthKm:function(t){return+ +i[20752+((t|=0)<<3)>>3]},_edgeLengthM:function(t){return+ +i[20880+((t|=0)<<3)>>3]},_emscripten_replace_memory:function(t){return n=new Int8Array(t),new Uint8Array(t),r=new Int32Array(t),new Float32Array(t),i=new Float64Array(t),A=t,!0},_exactEdgeLengthKm:function(t,e){var A,n,o=0,a=0,s=0,c=0,l=0,C=0;if(n=R,R=R+176|0,Kt(t|=0,e|=0,A=n),(0|(t=0|r[A>>2]))<=1)return R=n,+(s=0);e=t+-1|0,t=0,o=0,a=+i[A+8>>3],s=+i[A+16>>3];do{l=a,a=+i[A+8+((t=t+1|0)<<4)>>3],C=+u(.5*(a-l)),c=s,s=+i[A+8+(t<<4)+8>>3],c=C*C+(c=+u(.5*(s-c)))*(+I(+l)*+I(+a)*c),o+=2*+f(+ +g(+c),+ +g(+(1-c)))}while((0|t)!=(0|e));return R=n,+(C=6371.007180918475*o)},_exactEdgeLengthM:function(t,e){var A,n,o=0,a=0,s=0,c=0,l=0,C=0;if(n=R,R=R+176|0,Kt(t|=0,e|=0,A=n),(0|(t=0|r[A>>2]))<=1)return R=n,+(s=0);e=t+-1|0,t=0,o=0,a=+i[A+8>>3],s=+i[A+16>>3];do{l=a,a=+i[A+8+((t=t+1|0)<<4)>>3],C=+u(.5*(a-l)),c=s,s=+i[A+8+(t<<4)+8>>3],c=C*C+(c=+u(.5*(s-c)))*(+I(+l)*+I(+a)*c),o+=2*+f(+ +g(+c),+ +g(+(1-c)))}while((0|t)!=(0|e));return R=n,+(C=6371.007180918475*o*1e3)},_exactEdgeLengthRads:function(t,e){var A,n,o=0,a=0,s=0,c=0,l=0,C=0;if(n=R,R=R+176|0,Kt(t|=0,e|=0,A=n),(0|(t=0|r[A>>2]))<=1)return R=n,+(s=0);e=t+-1|0,t=0,o=0,a=+i[A+8>>3],s=+i[A+16>>3];do{l=a,a=+i[A+8+((t=t+1|0)<<4)>>3],C=+u(.5*(a-l)),c=s,s=+i[A+8+(t<<4)+8>>3],c=C*C+(c=+u(.5*(s-c)))*(+I(+a)*+I(+l)*c),o+=2*+f(+ +g(+c),+ +g(+(1-c)))}while((0|t)<(0|e));return R=n,+o},_experimentalH3ToLocalIj:function(t,e,A,n,r){var i,o;return r|=0,o=R,R=R+16|0,(t=0|$t(t|=0,e|=0,A|=0,n|=0,i=o))||(lt(i,r),t=0),R=o,0|t},_experimentalLocalIjToH3:function(t,e,A,n){var r,i;return t|=0,e|=0,n|=0,r=R,R=R+16|0,Ct(A|=0,i=r),n=0|te(t,e,i,n),R=r,0|n},_free:de,_geoToH3:Tt,_getDestinationH3IndexFromUnidirectionalEdge:function(t,e){t|=0;var A,n,i=0;return A=R,R=R+16|0,i=A,!0&268435456==(2013265920&(e|=0)|0)?(n=0|me(0|t,0|e,56),v(),r[i>>2]=0,i=0|k(t,-2130706433&e|134217728,7&n,i),e=0|v(),y(0|e),R=A,0|i):(i=0,y(0|(e=0)),R=A,0|i)},_getH3IndexesFromUnidirectionalEdge:function(t,e,A){t|=0;var n,i,o,a,s=0;o=R,R=R+16|0,n=o,a=!0&268435456==(2013265920&(e|=0)|0),i=-2130706433&e|134217728,r[(s=A|=0)>>2]=a?t:0,r[s+4>>2]=a?i:0,a?(e=0|me(0|t,0|e,56),v(),r[n>>2]=0,t=0|k(t,i,7&e,n),e=0|v()):(t=0,e=0),r[(s=A+8|0)>>2]=t,r[s+4>>2]=e,R=o},_getH3UnidirectionalEdge:function(t,e,A,n){var i,o,a=0,s=0,g=0,c=0,I=0;if(o=R,R=R+16|0,i=o,!(0|Wt(t|=0,e|=0,A|=0,n|=0)))return c=0,y(0|(g=0)),R=o,0|c;for(g=-2130706433&e,a=(a=0==(0|kt(t,e)))?1:2;r[i>>2]=0,s=a+1|0,!((0|(I=0|k(t,e,a,i)))==(0|A)&(0|v())==(0|n));){if(!(s>>>0<7)){a=0,t=0,c=6;break}a=s}return 6==(0|c)?(y(0|a),R=o,0|t):(I=0|be(0|a,0,56),c=0|g|v()|268435456,I|=t,y(0|c),R=o,0|I)},_getH3UnidirectionalEdgeBoundary:Kt,_getH3UnidirectionalEdgesFromHexagon:function(t,e,A){A|=0;var n,i=0;n=0==(0|kt(t|=0,e|=0)),e&=-2130706433,r[(i=A)>>2]=n?t:0,r[i+4>>2]=n?285212672|e:0,r[(i=A+8|0)>>2]=t,r[i+4>>2]=301989888|e,r[(i=A+16|0)>>2]=t,r[i+4>>2]=318767104|e,r[(i=A+24|0)>>2]=t,r[i+4>>2]=335544320|e,r[(i=A+32|0)>>2]=t,r[i+4>>2]=352321536|e,r[(A=A+40|0)>>2]=t,r[A+4>>2]=369098752|e},_getOriginH3IndexFromUnidirectionalEdge:function(t,e){var A;return t|=0,y(0|((A=!0&268435456==(2013265920&(e|=0)|0))?-2130706433&e|134217728:0)),0|(A?t:0)},_getPentagonIndexes:Zt,_getRes0Indexes:function(t){t|=0;var e=0,A=0,n=0;e=0;do{be(0|e,0,45),n=134225919|v(),r[(A=t+(e<<3)|0)>>2]=-1,r[A+4>>2]=n,e=e+1|0}while(122!=(0|e))},_h3Distance:function(t,e,A,n){var r,i,o;return A|=0,n|=0,o=R,R=R+32|0,i=o,t=0==(0|$t(t|=0,e|=0,t,e,r=o+12|0))&&0==(0|$t(t,e,A,n,i))?0|ut(r,i):-1,R=o,0|t},_h3GetBaseCell:Rt,_h3GetFaces:function t(e,A,n){n|=0;var i,o=0,a=0,s=0,g=0,c=0,I=0,u=0,l=0;i=R,R=R+128|0,u=i+112|0,s=i+96|0,l=i,a=0|me(0|(e|=0),0|(A|=0),52),v(),c=15&a,r[u>>2]=c,g=0|me(0|e,0|A,45),v(),g&=127;t:do{if(0|O(g)){if(0|c)for(o=1;;){if(!(0==((I=0|be(7,0,3*(15-o|0)|0))&e|0)&0==((0|v())&A|0))){a=0;break t}if(!(o>>>0<c>>>0))break;o=o+1|0}if(!(1&a))return I=0|be(c+1|0,0,52),l=0|v()|-15728641&A,t((I|e)&~(u=0|be(7,0,3*(14-c|0)|0)),l&~(0|v()),n),void(R=i);a=1}else a=0}while(0);Ht(e,A,s),a?(pt(s,u,l),I=5):(bt(s,u,l),I=6);t:do{if(0|O(g))if(c)for(o=1;;){if(!(0==((g=0|be(7,0,3*(15-o|0)|0))&e|0)&0==((0|v())&A|0))){o=8;break t}if(!(o>>>0<c>>>0)){o=20;break}o=o+1|0}else o=20;else o=8}while(0);if(De(0|n,-1,0|o),a){a=0;do{for(vt(s=l+(a<<4)|0,0|r[u>>2]),s=0|r[s>>2],o=0;!(-1==(0|(c=0|r[(g=n+(o<<2)|0)>>2]))|(0|c)==(0|s));)o=o+1|0;r[g>>2]=s,a=a+1|0}while((0|a)!=(0|I))}else{a=0;do{for(yt(s=l+(a<<4)|0,0|r[u>>2],0,1),s=0|r[s>>2],o=0;!(-1==(0|(c=0|r[(g=n+(o<<2)|0)>>2]))|(0|c)==(0|s));)o=o+1|0;r[g>>2]=s,a=a+1|0}while((0|a)!=(0|I))}R=i},_h3IndexesAreNeighbors:Wt,_h3IsPentagon:kt,_h3IsResClassIII:function(t,e){return e=0|me(0|(t|=0),0|(e|=0),52),v(),1&e|0},_h3IsValid:Ut,_h3Line:function(t,e,A,n,i){A|=0,n|=0,i|=0;var o,a=0,g=0,c=0,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0,E=0,p=0,y=0,v=0,m=0;if(o=R,R=R+48|0,g=o+12|0,v=o,0==(0|$t(t|=0,e|=0,t,e,a=o+24|0))&&0==(0|$t(t,e,A,n,g))){if((0|(y=0|ut(a,g)))<0)return R=o,0|(v=y);for(r[a>>2]=0,r[a+4>>2]=0,r[a+8>>2]=0,r[g>>2]=0,r[g+4>>2]=0,r[g+8>>2]=0,$t(t,e,t,e,a),$t(t,e,A,n,g),ht(a),ht(g),y?(B=+(0|y),p=a,A=l=0|r[a>>2],n=C=0|r[(Q=a+4|0)>>2],a=h=0|r[(E=a+8|0)>>2],f=+((0|r[g>>2])-l|0)/B,d=+((0|r[g+4>>2])-C|0)/B,B=+((0|r[g+8>>2])-h|0)/B):(Q=n=a+4|0,E=h=a+8|0,p=a,A=0|r[a>>2],n=0|r[n>>2],a=0|r[h>>2],f=0,d=0,B=0),r[v>>2]=A,r[(h=v+4|0)>>2]=n,r[(C=v+8|0)>>2]=a,l=0;;){m=f*(I=+(0|l))+ +(0|A),c=d*I+ +(0|r[Q>>2]),I=B*I+ +(0|r[E>>2]),n=~~+we(+m),g=~~+we(+c),A=~~+we(+I),m=+s(+(+(0|n)-m)),c=+s(+(+(0|g)-c)),I=+s(+(+(0|A)-I));do{if(!(m>c&m>I)){if(u=0-n|0,c>I){a=u-A|0;break}a=g,A=u-g|0;break}n=0-(g+A)|0,a=g}while(0);if(r[v>>2]=n,r[h>>2]=a,r[C>>2]=A,Bt(v),te(t,e,v,i+(l<<3)|0),(0|l)==(0|y))break;l=l+1|0,A=0|r[p>>2]}return R=o,0|(v=0)}return R=o,0|(v=-1)},_h3LineSize:function(t,e,A,n){var r,i,o;return A|=0,n|=0,o=R,R=R+32|0,i=o,t=0==(0|$t(t|=0,e|=0,t,e,r=o+12|0))&&0==(0|$t(t,e,A,n,i))?0|ut(r,i):-1,R=o,(t>>>31^1)+t|0},_h3SetToLinkedGeo:function(t,e,A){A|=0;var n,i,o,a=0;if(o=R,R=R+32|0,n=o,function(t,e,A){t|=0,A|=0;var n,i,o=0,a=0,s=0,g=0,c=0;if(i=R,R=R+176|0,n=i,(0|(e|=0))<1)return ge(A,0,0),void(R=i);g=0|me(0|r[(g=t)>>2],0|r[g+4>>2],52),v(),ge(A,(0|e)>6?e:6,15&g),g=0;do{if(Vt(0|r[(o=t+(g<<3)|0)>>2],0|r[o+4>>2],n),(0|(o=0|r[n>>2]))>0){c=0;do{s=n+8+(c<<4)|0,(a=0|Ce(A,o=n+8+(((0|(c=c+1|0))%(0|o)|0)<<4)|0,s))?ue(A,a):le(A,s,o),o=0|r[n>>2]}while((0|c)<(0|o))}g=g+1|0}while((0|g)!=(0|e));R=i}(t|=0,e|=0,i=o+16|0),r[A>>2]=0,r[A+4>>2]=0,r[A+8>>2]=0,!(t=0|Ie(i)))return Xt(A),ce(i),void(R=o);do{e=0|Pt(A);do{qt(e,t),a=t+16|0,r[n>>2]=r[a>>2],r[n+4>>2]=r[a+4>>2],r[n+8>>2]=r[a+8>>2],r[n+12>>2]=r[a+12>>2],ue(i,t),t=0|he(i,n)}while(0!=(0|t));t=0|Ie(i)}while(0!=(0|t));Xt(A),ce(i),R=o},_h3ToCenterChild:function(t,e,A){A|=0;var n=0,r=0;if(n=0|me(0|(t|=0),0|(e|=0),52),v(),(0|A)<16&(0|(n&=15))<=(0|A)){if((0|n)!=(0|A)&&(t|=r=0|be(0|A,0,52),e=0|v()|-15728641&e,(0|n)<(0|A)))do{r=0|be(7,0,3*(14-n|0)|0),n=n+1|0,t&=~r,e&=~(0|v())}while((0|n)<(0|A))}else e=0,t=0;return y(0|e),0|t},_h3ToChildren:Nt,_h3ToGeo:Yt,_h3ToGeoBoundary:Vt,_h3ToParent:Gt,_h3UnidirectionalEdgeIsValid:function(t,e){var A=0;if(!(!0&268435456==(2013265920&(e|=0)|0)))return 0|(A=0);switch(A=0|me(0|(t|=0),0|e,56),v(),7&A){case 0:case 7:return 0|(A=0)}return!0&16777216==(117440512&e|0)&0!=(0|kt(t,A=-2130706433&e|134217728))?0|(A=0):0|(A=0|Ut(t,A))},_hexAreaKm2:function(t){return+ +i[20496+((t|=0)<<3)>>3]},_hexAreaM2:function(t){return+ +i[20624+((t|=0)<<3)>>3]},_hexRing:function(t,e,A,n){t|=0,e|=0,n|=0;var i,o=0,a=0,s=0,g=0,c=0,I=0,u=0;if(i=R,R=R+16|0,u=i,!(A|=0))return r[(u=n)>>2]=t,r[u+4>>2]=e,R=i,0|(u=0);r[u>>2]=0;t:do{if(0|kt(t,e))t=1;else{if(a=(0|A)>0){o=0,I=t;do{if(0==(0|(I=0|k(I,e,4,u)))&0==(0|(e=0|v()))){t=2;break t}if(o=o+1|0,0|kt(I,e)){t=1;break t}}while((0|o)<(0|A));if(r[(c=n)>>2]=I,r[c+4>>2]=e,c=A+-1|0,a){a=0,s=1,o=I,t=e;do{if(0==(0|(o=0|k(o,t,2,u)))&0==(0|(t=0|v()))){t=2;break t}if(r[(g=n+(s<<3)|0)>>2]=o,r[g+4>>2]=t,s=s+1|0,0|kt(o,t)){t=1;break t}a=a+1|0}while((0|a)<(0|A));g=0,a=s;do{if(0==(0|(o=0|k(o,t,3,u)))&0==(0|(t=0|v()))){t=2;break t}if(r[(s=n+(a<<3)|0)>>2]=o,r[s+4>>2]=t,a=a+1|0,0|kt(o,t)){t=1;break t}g=g+1|0}while((0|g)<(0|A));s=0;do{if(0==(0|(o=0|k(o,t,1,u)))&0==(0|(t=0|v()))){t=2;break t}if(r[(g=n+(a<<3)|0)>>2]=o,r[g+4>>2]=t,a=a+1|0,0|kt(o,t)){t=1;break t}s=s+1|0}while((0|s)<(0|A));s=0;do{if(0==(0|(o=0|k(o,t,5,u)))&0==(0|(t=0|v()))){t=2;break t}if(r[(g=n+(a<<3)|0)>>2]=o,r[g+4>>2]=t,a=a+1|0,0|kt(o,t)){t=1;break t}s=s+1|0}while((0|s)<(0|A));s=0;do{if(0==(0|(o=0|k(o,t,4,u)))&0==(0|(t=0|v()))){t=2;break t}if(r[(g=n+(a<<3)|0)>>2]=o,r[g+4>>2]=t,a=a+1|0,0|kt(o,t)){t=1;break t}s=s+1|0}while((0|s)<(0|A));for(s=0;;){if(0==(0|(o=0|k(o,t,6,u)))&0==(0|(t=0|v()))){t=2;break t}if((0|s)!=(0|c)){if(r[(g=n+(a<<3)|0)>>2]=o,r[g+4>>2]=t,0|kt(o,t)){t=1;break t}a=a+1|0}if((0|(s=s+1|0))>=(0|A)){s=I,a=e;break}}}else s=I,o=I,a=e,t=e}else r[(s=n)>>2]=t,r[s+4>>2]=e,s=t,o=t,a=e,t=e;t=1&((0|s)!=(0|o)|(0|a)!=(0|t))}}while(0);return R=i,0|(u=t)},_i64Subtract:Ee,_kRing:U,_kRingDistances:function(t,e,A,n,r){var i;if(0|G(t|=0,e|=0,A|=0,n|=0,r|=0)){if(De(0|n,0,(i=1+(0|Q(3*A|0,A+1|0))|0)<<3|0),0|r)return De(0|r,0,i<<2|0),void N(t,e,A,n,r,i,0);(r=0|Qe(i,4))&&(N(t,e,A,n,r,i,0),de(r))}},_llvm_minnum_f64:Fe,_llvm_round_f64:we,_malloc:fe,_maxFaceCount:function(t,e){var A=0,n=0;if(n=0|me(0|(t|=0),0|(e|=0),45),v(),!(0|O(127&n)))return 0|(n=2);if(n=0|me(0|t,0|e,52),v(),!(n&=15))return 0|(n=5);for(A=1;;){if(!(0==((0|be(7,0,3*(15-A|0)|0))&t|0)&0==((0|v())&e|0))){A=2,t=6;break}if(!(A>>>0<n>>>0)){A=5,t=6;break}A=A+1|0}return 6==(0|t)?0|A:0},_maxH3ToChildrenSize:function(t,e,A){return A|=0,t=0|me(0|(t|=0),0|(e|=0),52),v(),(0|A)<16&(0|(t&=15))<=(0|A)?0|(A=0|ee(7,A-t|0)):0|(A=0)},_maxKringSize:function(t){return 1+(0|Q(3*(t|=0)|0,t+1|0))|0},_maxPolyfillSize:function(t,e){e|=0;var A,n=0,i=0,o=0,a=0,s=0;if(A=R,R=R+48|0,o=A+8|0,i=A,a=0|r[(s=t|=0)+4>>2],r[(n=i)>>2]=r[s>>2],r[n+4>>2]=a,ne(i,o),o=0|V(o,e),e=0|r[i>>2],(0|(i=0|r[t+8>>2]))<=0)return R=A,0|(s=(s=(a=(0|o)<(0|(s=e)))?s:o)+12|0);n=0|r[t+12>>2],t=0;do{e=(0|r[n+(t<<3)>>2])+e|0,t=t+1|0}while((0|t)<(0|i));return R=A,0|(s=(s=(s=(0|o)<(0|e))?e:o)+12|0)},_maxUncompactSize:function(t,e,A){t|=0,A|=0;var n=0,i=0,o=0,a=0;if((0|(e|=0))<=0)return 0|(A=0);if((0|A)>=16){for(n=0;;){if(!(0==(0|r[(a=t+(n<<3)|0)>>2])&0==(0|r[a+4>>2]))){n=-1,i=13;break}if((0|(n=n+1|0))>=(0|e)){n=0,i=13;break}}if(13==(0|i))return 0|n}n=0,a=0;t:for(;;){o=0|r[(i=t+(a<<3)|0)>>2],i=0|r[i+4>>2];do{if(!(0==(0|o)&0==(0|i))){if(i=0|me(0|o,0|i,52),v(),(0|(i&=15))>(0|A)){n=-1,i=13;break t}if((0|i)==(0|A)){n=n+1|0;break}n=(0|ee(7,A-i|0))+n|0;break}}while(0);if((0|(a=a+1|0))>=(0|e)){i=13;break}}return 13==(0|i)?0|n:0},_memcpy:Se,_memset:De,_numHexagons:function(t){var e;return t=0|r[(e=21008+((t|=0)<<3)|0)>>2],y(0|r[e+4>>2]),0|t},_pentagonIndexCount:function(){return 12},_pointDistKm:St,_pointDistM:function(t,e){t|=0;var A,n,r,o=0;return n=+i[(e|=0)>>3],A=+i[t>>3],o=(r=+u(.5*(n-A)))*r+(o=+u(.5*(+i[e+8>>3]-+i[t+8>>3])))*(+I(+n)*+I(+A)*o),2*+f(+ +g(+o),+ +g(+(1-o)))*6371.007180918475*1e3},_pointDistRads:function(t,e){t|=0;var A,n,r,o=0;return n=+i[(e|=0)>>3],A=+i[t>>3],o=(r=+u(.5*(n-A)))*r+(o=+u(.5*(+i[e+8>>3]-+i[t+8>>3])))*(+I(+n)*+I(+A)*o),2*+f(+ +g(+o),+ +g(+(1-o)))},_polyfill:function(t,e,A){var n,i=0,o=0,a=0,s=0,g=0;if(n=R,R=R+48|0,i=n+8|0,o=n,0|function(t,e,A){e|=0,A|=0;var n,i,o,a,s,g=0,c=0,I=0,u=0,l=0,C=0,h=0,B=0,f=0,d=0,Q=0,E=0,p=0,y=0,b=0,F=0,w=0,S=0,D=0,U=0,k=0,O=0,M=0,L=0,_=0;s=R,R=R+112|0,i=s+80|0,C=s+72|0,o=s,a=s+56|0,(_=0|fe(32+(r[(h=(t=t|0)+8|0)>>2]<<5)|0))||m(22848,22448,800,22456);if(re(t,_),g=0|r[(I=t)+4>>2],r[(l=C)>>2]=r[I>>2],r[l+4>>2]=g,ne(C,i),l=0|V(i,e),g=0|r[C>>2],(0|(I=0|r[h>>2]))>0){u=0|r[t+12>>2],c=0;do{g=(0|r[u+(c<<3)>>2])+g|0,c=c+1|0}while((0|c)!=(0|I))}if(c=0|Qe(n=(l=(0|l)<(0|g)?g:l)+12|0,8),B=0|Qe(n,8),r[i>>2]=0,L=0|r[(M=t)+4>>2],r[(g=C)>>2]=r[M>>2],r[g+4>>2]=L,0|(g=0|x(C,n,e,i,c,B)))return de(c),de(B),de(_),R=s,0|(_=g);t:do{if((0|r[h>>2])>0){for(I=t+12|0,g=0;u=0|x((0|r[I>>2])+(g<<3)|0,n,e,i,c,B),g=g+1|0,!(0|u);)if((0|g)>=(0|r[h>>2]))break t;return de(c),de(B),de(_),R=s,0|(_=u)}}while(0);(0|l)>-12&&De(0|B,0,((0|n)>1?n:1)<<3|0);t:do{if((0|r[i>>2])>0){L=((0|n)<0)<<31>>31,S=c,D=B,U=c,k=c,O=B,M=c,g=c,y=c,b=B,F=B,w=B,c=B;e:for(;;){for(p=0|r[i>>2],Q=0,E=0,I=0;;){l=(u=o)+56|0;do{r[u>>2]=0,u=u+4|0}while((0|u)<(0|l));if(C=0|r[(e=S+(Q<<3)|0)>>2],e=0|r[e+4>>2],0|G(C,e,1,o,0)){l=(u=o)+56|0;do{r[u>>2]=0,u=u+4|0}while((0|u)<(0|l));0|(u=0|Qe(7,4))&&(N(C,e,1,o,u,7,0),de(u))}d=0;do{B=0|r[(f=o+(d<<3)|0)>>2],f=0|r[f+4>>2];A:do{if(!(0==(0|B)&0==(0|f))){if(C=0|ve(0|B,0|f,0|n,0|L),v(),e=0|r[(l=u=A+(C<<3)|0)>>2],l=0|r[l+4>>2],!(0==(0|e)&0==(0|l)))for(h=0;;){if((0|h)>(0|n))break e;if((0|e)==(0|B)&(0|l)==(0|f))break A;if(e=0|r[(l=u=A+((C=(C+1|0)%(0|n)|0)<<3)|0)>>2],l=0|r[l+4>>2],0==(0|e)&0==(0|l))break;h=h+1|0}0==(0|B)&0==(0|f)||(Yt(B,f,a),0|ie(t,_,a)&&(r[(h=u)>>2]=B,r[h+4>>2]=f,r[(h=D+(I<<3)|0)>>2]=B,r[h+4>>2]=f,I=I+1|0))}}while(0);d=d+1|0}while(d>>>0<7);if((0|(E=E+1|0))>=(0|p))break;Q=Q+1|0}if((0|p)>0&&De(0|U,0,p<<3|0),r[i>>2]=I,!((0|I)>0))break t;B=c,f=w,d=M,Q=F,E=b,p=D,c=y,w=g,F=k,b=U,y=B,g=f,M=O,O=d,k=Q,U=E,D=S,S=p}return de(k),de(O),de(_),R=s,0|(_=-1)}g=B}while(0);return de(_),de(c),de(g),R=s,0|(_=0)}(t|=0,e|=0,A|=0)){if(a=0|r[(g=t)+4>>2],r[(s=o)>>2]=r[g>>2],r[s+4>>2]=a,ne(o,i),s=0|V(i,e),e=0|r[o>>2],(0|(a=0|r[t+8>>2]))>0){o=0|r[t+12>>2],i=0;do{e=(0|r[o+(i<<3)>>2])+e|0,i=i+1|0}while((0|i)!=(0|a))}(0|(e=(0|s)<(0|e)?e:s))<=-12||De(0|A,0,8+(((0|(g=e+11|0))>0?g:0)<<3)|0),R=n}else R=n},_res0IndexCount:function(){return 122},_round:Re,_sbrk:Ue,_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(t,e,A,n,i){t|=0,A|=0,n|=0,i|=0;var o=0,a=0,s=0,g=0,c=0,I=0;if((0|(e|=0))<=0)return 0|(i=0);if((0|i)>=16){for(o=0;;){if(!(0==(0|r[(I=t+(o<<3)|0)>>2])&0==(0|r[I+4>>2]))){o=14;break}if((0|(o=o+1|0))>=(0|e)){a=0,o=16;break}}if(14==(0|o))return 0|((0|n)>0?-2:-1);if(16==(0|o))return 0|a}o=0,I=0;t:for(;;){a=0|r[(s=c=t+(I<<3)|0)>>2],s=0|r[s+4>>2];do{if(!(0==(0|a)&0==(0|s))){if((0|o)>=(0|n)){a=-1,o=16;break t}if(g=0|me(0|a,0|s,52),v(),(0|(g&=15))>(0|i)){a=-2,o=16;break t}if((0|g)==(0|i)){r[(c=A+(o<<3)|0)>>2]=a,r[c+4>>2]=s,o=o+1|0;break}if((0|(a=(0|ee(7,i-g|0))+o|0))>(0|n)){a=-1,o=16;break t}Nt(0|r[c>>2],0|r[c+4>>2],i,A+(o<<3)|0),o=a}}while(0);if((0|(I=I+1|0))>=(0|e)){a=0,o=16;break}}return 16==(0|o)?0|a:0},establishStackSpace:function(t,e){R=t|=0},stackAlloc:function(t){var e;return e=R,R=(R=R+(t|=0)|0)+15&-16,0|e},stackRestore:function(t){R=t|=0},stackSave:function(){return 0|R}}}({Math:Math,Int8Array:Int8Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Float32Array:Float32Array,Float64Array:Float64Array},{a:st,b:function(t){g=t},c:c,d:function(t,e,A,n){st("Assertion failed: "+h(t)+", at: "+[e?h(e):"unknown filename",A,n?h(n):"unknown function"])},e:function(t){return A.___errno_location&&(E[A.___errno_location()>>2]=t),t},f:Z,g:function(t,e,A){d.set(d.subarray(e,e+A),t)},h:function(t){var e=Z();if(t>2130706432)return!1;for(var A=Math.max(e,16777216);A<t;)A=A<=536870912?v(2*A,16777216):Math.min(v((3*A+2147483648)/4,16777216),2130706432);return!!W(A)},i:function(t){st("OOM")},j:H,k:Y,l:W,m:V,n:function(){var t=V();return A.extraStackTrace&&(t+="\n"+A.extraStackTrace()),Y(t)},o:24032,p:24016},B),$=(A.___uremdi3=z.___uremdi3,A._bitshift64Lshr=z._bitshift64Lshr,A._bitshift64Shl=z._bitshift64Shl,A._calloc=z._calloc,A._cellAreaKm2=z._cellAreaKm2,A._cellAreaM2=z._cellAreaM2,A._cellAreaRads2=z._cellAreaRads2,A._compact=z._compact,A._destroyLinkedPolygon=z._destroyLinkedPolygon,A._edgeLengthKm=z._edgeLengthKm,A._edgeLengthM=z._edgeLengthM,A._emscripten_replace_memory=z._emscripten_replace_memory),tt=(A._exactEdgeLengthKm=z._exactEdgeLengthKm,A._exactEdgeLengthM=z._exactEdgeLengthM,A._exactEdgeLengthRads=z._exactEdgeLengthRads,A._experimentalH3ToLocalIj=z._experimentalH3ToLocalIj,A._experimentalLocalIjToH3=z._experimentalLocalIjToH3,A._free=z._free,A._geoToH3=z._geoToH3,A._getDestinationH3IndexFromUnidirectionalEdge=z._getDestinationH3IndexFromUnidirectionalEdge,A._getH3IndexesFromUnidirectionalEdge=z._getH3IndexesFromUnidirectionalEdge,A._getH3UnidirectionalEdge=z._getH3UnidirectionalEdge,A._getH3UnidirectionalEdgeBoundary=z._getH3UnidirectionalEdgeBoundary,A._getH3UnidirectionalEdgesFromHexagon=z._getH3UnidirectionalEdgesFromHexagon,A._getOriginH3IndexFromUnidirectionalEdge=z._getOriginH3IndexFromUnidirectionalEdge,A._getPentagonIndexes=z._getPentagonIndexes,A._getRes0Indexes=z._getRes0Indexes,A._h3Distance=z._h3Distance,A._h3GetBaseCell=z._h3GetBaseCell,A._h3GetFaces=z._h3GetFaces,A._h3IndexesAreNeighbors=z._h3IndexesAreNeighbors,A._h3IsPentagon=z._h3IsPentagon,A._h3IsResClassIII=z._h3IsResClassIII,A._h3IsValid=z._h3IsValid,A._h3Line=z._h3Line,A._h3LineSize=z._h3LineSize,A._h3SetToLinkedGeo=z._h3SetToLinkedGeo,A._h3ToCenterChild=z._h3ToCenterChild,A._h3ToChildren=z._h3ToChildren,A._h3ToGeo=z._h3ToGeo,A._h3ToGeoBoundary=z._h3ToGeoBoundary,A._h3ToParent=z._h3ToParent,A._h3UnidirectionalEdgeIsValid=z._h3UnidirectionalEdgeIsValid,A._hexAreaKm2=z._hexAreaKm2,A._hexAreaM2=z._hexAreaM2,A._hexRing=z._hexRing,A._i64Subtract=z._i64Subtract,A._kRing=z._kRing,A._kRingDistances=z._kRingDistances,A._llvm_minnum_f64=z._llvm_minnum_f64,A._llvm_round_f64=z._llvm_round_f64,A._malloc=z._malloc,A._maxFaceCount=z._maxFaceCount,A._maxH3ToChildrenSize=z._maxH3ToChildrenSize,A._maxKringSize=z._maxKringSize,A._maxPolyfillSize=z._maxPolyfillSize,A._maxUncompactSize=z._maxUncompactSize,A._memcpy=z._memcpy,A._memset=z._memset,A._numHexagons=z._numHexagons,A._pentagonIndexCount=z._pentagonIndexCount,A._pointDistKm=z._pointDistKm,A._pointDistM=z._pointDistM,A._pointDistRads=z._pointDistRads,A._polyfill=z._polyfill,A._res0IndexCount=z._res0IndexCount,A._round=z._round,A._sbrk=z._sbrk,A._sizeOfCoordIJ=z._sizeOfCoordIJ,A._sizeOfGeoBoundary=z._sizeOfGeoBoundary,A._sizeOfGeoCoord=z._sizeOfGeoCoord,A._sizeOfGeoPolygon=z._sizeOfGeoPolygon,A._sizeOfGeofence=z._sizeOfGeofence,A._sizeOfH3Index=z._sizeOfH3Index,A._sizeOfLinkedGeoPolygon=z._sizeOfLinkedGeoPolygon,A._uncompact=z._uncompact,A.establishStackSpace=z.establishStackSpace,A.stackAlloc=z.stackAlloc),et=A.stackRestore=z.stackRestore,At=A.stackSave=z.stackSave;if(A.asm=z,A.cwrap=function(t,e,A,n){var r=(A=A||[]).every((function(t){return"number"===t}));return"string"!==e&&r&&!n?u(t):function(){return l(t,e,A,arguments)}},A.setValue=function(t,e,A,n){switch("*"===(A=A||"i8").charAt(A.length-1)&&(A="i32"),A){case"i1":case"i8":f[t>>0]=e;break;case"i16":Q[t>>1]=e;break;case"i32":E[t>>2]=e;break;case"i64":_=[e>>>0,(L=e,+U(L)>=1?L>0?(0|k(+N(L/4294967296),4294967295))>>>0:~~+G((L-+(~~L>>>0))/4294967296)>>>0:0)],E[t>>2]=_[0],E[t+4>>2]=_[1];break;case"float":p[t>>2]=e;break;case"double":y[t>>3]=e;break;default:st("invalid type for setValue: "+A)}},A.getValue=function(t,e,A){switch("*"===(e=e||"i8").charAt(e.length-1)&&(e="i32"),e){case"i1":case"i8":return f[t>>0];case"i16":return Q[t>>1];case"i32":case"i64":return E[t>>2];case"float":return p[t>>2];case"double":return y[t>>3];default:st("invalid type for getValue: "+e)}return null},A.getTempRet0=c,J){j(J)||(q=J,J=A.locateFile?A.locateFile(q,o):o+q),x++,A.monitorRunDependencies&&A.monitorRunDependencies(x);var nt=function(t){t.byteLength&&(t=new Uint8Array(t)),d.set(t,8),A.memoryInitializerRequest&&delete A.memoryInitializerRequest.response,function(t){if(x--,A.monitorRunDependencies&&A.monitorRunDependencies(x),0==x&&(null!==O&&(clearInterval(O),O=null),M)){var e=M;M=null,e()}}()},rt=function(){r(J,nt,(function(){throw"could not load memory initializer "+J}))},it=P(J);if(it)nt(it.buffer);else if(A.memoryInitializerRequest){var ot=function(){var t=A.memoryInitializerRequest,e=t.response;if(200!==t.status&&0!==t.status){var n=P(A.memoryInitializerRequestURL);if(!n)return console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+t.status+", retrying "+J),void rt();e=n.buffer}nt(e)};A.memoryInitializerRequest.response?setTimeout(ot,0):A.memoryInitializerRequest.addEventListener("load",ot)}else rt()}function at(t){function e(){X||(X=!0,I||(F(S),F(D),A.onRuntimeInitialized&&A.onRuntimeInitialized(),function(){if(A.postRun)for("function"==typeof A.postRun&&(A.postRun=[A.postRun]);A.postRun.length;)t=A.postRun.shift(),R.unshift(t);var t;F(R)}()))}t=t||i,x>0||(!function(){if(A.preRun)for("function"==typeof A.preRun&&(A.preRun=[A.preRun]);A.preRun.length;)t=A.preRun.shift(),w.unshift(t);var t;F(w)}(),x>0||(A.setStatus?(A.setStatus("Running..."),setTimeout((function(){setTimeout((function(){A.setStatus("")}),1),e()}),1)):e()))}function st(t){throw A.onAbort&&A.onAbort(t),a(t+=""),s(t),I=!0,"abort("+t+"). Build with -s ASSERTIONS=1 for more info."}if(M=function t(){X||at(),X||(M=t)},A.run=at,A.abort=st,A.preInit)for("function"==typeof A.preInit&&(A.preInit=[A.preInit]);A.preInit.length>0;)A.preInit.pop()();return at(),t}("object"===typeof n?n:{}),r="number",i={};[["sizeOfH3Index",r],["sizeOfGeoCoord",r],["sizeOfGeoBoundary",r],["sizeOfGeoPolygon",r],["sizeOfGeofence",r],["sizeOfLinkedGeoPolygon",r],["sizeOfCoordIJ",r],["h3IsValid","number",["number","number"]],["geoToH3","number",[r,r,"number"]],["h3ToGeo",null,["number","number",r]],["h3ToGeoBoundary",null,["number","number",r]],["maxKringSize",r,[r]],["kRing",null,["number","number",r,r]],["kRingDistances",null,["number","number",r,r,r]],["hexRing",null,["number","number",r,r]],["maxPolyfillSize",r,[r,"number"]],["polyfill",null,[r,"number",r]],["h3SetToLinkedGeo",null,[r,r,r]],["destroyLinkedPolygon",null,[r]],["compact",r,[r,r,r]],["uncompact",r,[r,r,r,r,"number"]],["maxUncompactSize",r,[r,r,"number"]],["h3IsPentagon","number",["number","number"]],["h3IsResClassIII","number",["number","number"]],["h3GetBaseCell",r,["number","number"]],["maxFaceCount",r,["number","number"]],["h3GetFaces",null,["number","number",r]],["h3ToParent","number",["number","number","number"]],["h3ToChildren",null,["number","number","number",r]],["h3ToCenterChild","number",["number","number","number"]],["maxH3ToChildrenSize",r,["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",r]],["getH3UnidirectionalEdgesFromHexagon",null,["number","number",r]],["getH3UnidirectionalEdgeBoundary",null,["number","number",r]],["h3Distance",r,["number","number","number","number"]],["h3Line",r,["number","number","number","number",r]],["h3LineSize",r,["number","number","number","number"]],["experimentalH3ToLocalIj",r,["number","number","number","number",r]],["experimentalLocalIjToH3",r,["number","number",r,r]],["hexAreaM2",r,["number"]],["hexAreaKm2",r,["number"]],["edgeLengthM",r,["number"]],["edgeLengthKm",r,["number"]],["pointDistM",r,[r,r]],["pointDistKm",r,[r,r]],["pointDistRads",r,[r,r]],["cellAreaM2",r,["number","number"]],["cellAreaKm2",r,["number","number"]],["cellAreaRads2",r,["number","number"]],["exactEdgeLengthM",r,["number","number"]],["exactEdgeLengthKm",r,["number","number"]],["exactEdgeLengthRads",r,["number","number"]],["numHexagons",r,["number"]],["getRes0Indexes",null,[r]],["res0IndexCount",r],["getPentagonIndexes",null,[r,r]],["pentagonIndexCount",r]].forEach((function(t){i[t[0]]=n.cwrap.apply(n,t)}));var o=i.sizeOfH3Index(),a=i.sizeOfGeoCoord(),s=i.sizeOfGeoBoundary(),g=i.sizeOfGeoPolygon(),c=i.sizeOfGeofence(),I=i.sizeOfLinkedGeoPolygon(),u=i.sizeOfCoordIJ(),l={m:"m",m2:"m2",km:"km",km2:"km2",rads:"rads",rads2:"rads2"};function C(t){if("number"!==typeof t||t<0||t>15||Math.floor(t)!==t)throw new Error("Invalid resolution: "+t)}var h=/[^0-9a-fA-F]/;function B(t){if(Array.isArray(t)&&2===t.length&&Number.isInteger(t[0])&&Number.isInteger(t[1]))return t;if("string"!==typeof t||h.test(t))return[0,0];var e=parseInt(t.substring(0,t.length-8),16);return[parseInt(t.substring(t.length-8),16),e]}function f(t){if(t>=0)return t.toString(16);var e=Q(8,(t&=2147483647).toString(16));return e=(parseInt(e[0],16)+8).toString(16)+e.substring(1)}function d(t,e){return f(e)+Q(8,f(t))}function Q(t,e){for(var A=t-e.length,n="",r=0;r<A;r++)n+="0";return n+=e}function E(t,e,A){for(var r=t.length,i=n._calloc(r,a),o=A?1:0,s=A?0:1,g=0;g<2*r;g+=2)n.HEAPF64.set([t[g/2][o],t[g/2][s]].map(ft),i/8+g);return n.HEAPU32.set([r,i],e/4),e}function p(t){return[t,n.getTempRet0()]}function y(t){var e=p(t),A=e[0],n=e[1];return n?d(A,n):null}function v(t,e){void 0===e&&(e=0);var A=n.getValue(t+4*e*2,"i32"),r=n.getValue(t+4*(2*e+1),"i32");return r?d(A,r):null}function m(t,e,A){n.HEAPU32.set(B(t),e/4+2*A)}function b(t,e){for(var A=[],n=0;n<e;n++){var r=v(t,n);null!==r&&A.push(r)}return A}function F(t,e){for(var A=e.length,n=0;n<A;n++)m(e[n],t,n)}function w(t,e){var A=n._calloc(1,a);return n.HEAPF64.set([t,e].map(ft),A/8),A}function S(t){return dt(n.getValue(t,"double"))}function D(t){return[S(t),S(t+8)]}function R(t){return[S(t+8),S(t)]}function U(t,e,A){for(var r=n.getValue(t,"i32"),i=t+8,o=[],a=e?R:D,s=0;s<2*r;s+=2)o.push(a(i+8*s));return A&&o.push(o[0]),o}function G(t){var e=B(t),A=e[0],n=e[1];return Boolean(i.h3IsValid(A,n))}function N(t){var e=B(t),A=e[0],n=e[1];return Boolean(i.h3IsPentagon(A,n))}function k(t){var e=B(t),A=e[0],n=e[1];return Boolean(i.h3IsResClassIII(A,n))}function x(t){var e=B(t),A=e[0],n=e[1];return i.h3GetBaseCell(A,n)}function O(t){var e=B(t),A=e[0],r=e[1],o=i.maxFaceCount(A,r),a=n._malloc(4*o);i.h3GetFaces(A,r,a);var s=function(t,e){for(var A=[],r=0;r<e;r++){var i=n.getValue(t+4*r,"i32");i>=0&&A.push(i)}return A}(a,o);return n._free(a),s}function M(t){return"string"!==typeof t?-1:parseInt(t.charAt(1),16)}function L(t,e,A){var r=n._malloc(a);n.HEAPF64.set([t,e].map(ft),r/8);var o=y(i.geoToH3(r,A));return n._free(r),o}function _(t){var e=n._malloc(a),A=B(t),r=A[0],o=A[1];i.h3ToGeo(r,o,e);var s=D(e);return n._free(e),s}function J(t,e){var A=n._malloc(s),r=B(t),o=r[0],a=r[1];i.h3ToGeoBoundary(o,a,A);var g=U(A,e,e);return n._free(A),g}function T(t,e){var A=B(t),n=A[0],r=A[1];return y(i.h3ToParent(n,r,e))}function j(t,e){if(!G(t))return[];var A=B(t),r=A[0],a=A[1],s=i.maxH3ToChildrenSize(r,a,e),g=n._calloc(s,o);i.h3ToChildren(r,a,e,g);var c=b(g,s);return n._free(g),c}function H(t,e){var A=B(t),n=A[0],r=A[1];return y(i.h3ToCenterChild(n,r,e))}function Y(t,e){var A=B(t),r=A[0],a=A[1],s=i.maxKringSize(e),g=n._calloc(s,o);i.kRing(r,a,e,g);var c=b(g,s);return n._free(g),c}function V(t,e){var A=B(t),r=A[0],a=A[1],s=i.maxKringSize(e),g=n._calloc(s,o),c=n._calloc(s,4);i.kRingDistances(r,a,e,g,c);for(var I=[],u=0;u<e+1;u++)I.push([]);for(var l=0;l<2*s;l+=2){var C=n.getValue(g+4*l,"i32"),h=n.getValue(g+4*(l+1),"i32"),f=n.getValue(c+l/2*4,"i32");0===C&&0===h||I[f].push(d(C,h))}return n._free(g),n._free(c),I}function Z(t,e){var A=0===e?1:6*e,r=n._calloc(A,o);if(0!==i.hexRing.apply(i,B(t).concat([e],[r])))throw n._free(r),new Error("Failed to get hexRing (encountered a pentagon?)");var a=b(r,A);return n._free(r),a}function W(t,e,A){if(C(e),A=Boolean(A),0===t.length||0===t[0].length)return[];"number"===typeof t[0][0]&&(t=[t]);var r=function(t,e){var A,r=t.length-1,i=n._calloc(g),o=0+c,a=o+4;if(E(t[0],i+0,e),r>0){A=n._calloc(r,c);for(var s=0;s<r;s++)E(t[s+1],A+c*s,e)}return n.setValue(i+o,r,"i32"),n.setValue(i+a,A,"i32"),i}(t,A),a=i.maxPolyfillSize(r,e),s=n._calloc(a,o);i.polyfill(r,e,s);var I=b(s,a);return n._free(s),function(t){var e=0+c,A=e+4;n._free(n.getValue(t+0,"i8*"));for(var r=n.getValue(t+e,"i32"),i=0;i<r;i++)n._free(n.getValue(t+A+c*i,"i8*"));n._free(t)}(r),I}function K(t,e){if(!t||!t.length)return[];var A=t.length,r=n._calloc(A,o);F(r,t);var a=n._calloc(I),s=a;i.h3SetToLinkedGeo(r,A,a);var g=function(t,e){for(var A,r,i,o,a=[],s=e?R:D;t;){for(a.push(A=[]),r=n.getValue(t,"i8*");r;){for(A.push(i=[]),o=n.getValue(r,"i8*");o;)i.push(s(o)),o=n.getValue(o+16,"i8*");e&&i.push(i[0]),r=n.getValue(r+8,"i8*")}t=n.getValue(t+8,"i8*")}return a}(a,e);return i.destroyLinkedPolygon(s),n._free(s),n._free(r),g}function P(t){if(!t||!t.length)return[];var e=t.length,A=n._calloc(e,o);F(A,t);var r=n._calloc(e,o);if(0!==i.compact(A,r,e))throw n._free(A),n._free(r),new Error("Failed to compact, malformed input data (duplicate hexagons?)");var a=b(r,e);return n._free(A),n._free(r),a}function q(t,e){if(C(e),!t||!t.length)return[];var A=t.length,r=n._calloc(A,o);F(r,t);var a=i.maxUncompactSize(r,A,e),s=n._calloc(a,o);if(0!==i.uncompact(r,A,s,a,e))throw n._free(r),n._free(s),new Error("Failed to uncompact (bad resolution?)");var g=b(s,a);return n._free(r),n._free(s),g}function X(t,e){var A=B(t),n=A[0],r=A[1],o=B(e),a=o[0],s=o[1];return Boolean(i.h3IndexesAreNeighbors(n,r,a,s))}function z(t,e){var A=B(t),n=A[0],r=A[1],o=B(e),a=o[0],s=o[1];return y(i.getH3UnidirectionalEdge(n,r,a,s))}function $(t){var e=B(t),A=e[0],n=e[1];return y(i.getOriginH3IndexFromUnidirectionalEdge(A,n))}function tt(t){var e=B(t),A=e[0],n=e[1];return y(i.getDestinationH3IndexFromUnidirectionalEdge(A,n))}function et(t){var e=B(t),A=e[0],n=e[1];return Boolean(i.h3UnidirectionalEdgeIsValid(A,n))}function At(t){var e=B(t),A=e[0],r=e[1],a=n._calloc(2,o);i.getH3IndexesFromUnidirectionalEdge(A,r,a);var s=b(a,2);return n._free(a),s}function nt(t){var e=B(t),A=e[0],r=e[1],a=n._calloc(6,o);i.getH3UnidirectionalEdgesFromHexagon(A,r,a);var s=b(a,6);return n._free(a),s}function rt(t,e){var A=n._malloc(s),r=B(t),o=r[0],a=r[1];i.getH3UnidirectionalEdgeBoundary(o,a,A);var g=U(A,e);return n._free(A),g}function it(t,e){var A=B(t),n=A[0],r=A[1],o=B(e),a=o[0],s=o[1];return i.h3Distance(n,r,a,s)}function ot(t,e){var A=B(t),r=A[0],a=A[1],s=B(e),g=s[0],c=s[1],I=i.h3LineSize(r,a,g,c);if(I<0)throw new Error("Line cannot be calculated");var u=n._calloc(I,o);i.h3Line(r,a,g,c,u);var l=b(u,I);return n._free(u),l}function at(t,e){var A,r=n._malloc(u),o=i.experimentalH3ToLocalIj.apply(i,B(t).concat(B(e),[r])),a=(A=r,{i:n.getValue(A,"i32"),j:n.getValue(A+4,"i32")});switch(n._free(r),o){case 0:return a;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 st(t,e){if(!e||"number"!==typeof e.i||"number"!==typeof e.j)throw new Error("Coordinates must be provided as an {i, j} object");var A=n._malloc(u),r=n._malloc(o);!function(t,e){var A=e.i,r=e.j;n.setValue(t,A,"i32"),n.setValue(t+4,r,"i32")}(A,e);var a=i.experimentalLocalIjToH3.apply(i,B(t).concat([A],[r])),s=v(r);if(n._free(A),n._free(r),0!==a)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 s}function gt(t,e,A){var r,o=w(t[0],t[1]),a=w(e[0],e[1]);switch(A){case l.m:r=i.pointDistM(o,a);break;case l.km:r=i.pointDistKm(o,a);break;case l.rads:r=i.pointDistRads(o,a);break;default:r=null}if(n._free(o),n._free(a),null===r)throw new Error("Unknown unit: "+A);return r}function ct(t,e){var A=B(t),n=A[0],r=A[1];switch(e){case l.m2:return i.cellAreaM2(n,r);case l.km2:return i.cellAreaKm2(n,r);case l.rads2:return i.cellAreaRads2(n,r);default:throw new Error("Unknown unit: "+e)}}function It(t,e){var A=B(t),n=A[0],r=A[1];switch(e){case l.m:return i.exactEdgeLengthM(n,r);case l.km:return i.exactEdgeLengthKm(n,r);case l.rads:return i.exactEdgeLengthRads(n,r);default:throw new Error("Unknown unit: "+e)}}function ut(t,e){switch(C(t),e){case l.m2:return i.hexAreaM2(t);case l.km2:return i.hexAreaKm2(t);default:throw new Error("Unknown unit: "+e)}}function lt(t,e){switch(C(t),e){case l.m:return i.edgeLengthM(t);case l.km:return i.edgeLengthKm(t);default:throw new Error("Unknown unit: "+e)}}function Ct(t){C(t);var e=p(i.numHexagons(t)),A=e[0],n=e[1];return n?n*Math.pow(2,32)+A:A}function ht(){var t=i.res0IndexCount(),e=n._malloc(o*t);i.getRes0Indexes(e);var A=b(e,t);return n._free(e),A}function Bt(t){C(t);var e=i.pentagonIndexCount(),A=n._malloc(o*e);i.getPentagonIndexes(t,A);var r=b(A,e);return n._free(A),r}function ft(t){return t*Math.PI/180}function dt(t){return 180*t/Math.PI}},,function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return Xt})),A.d(e,"b",(function(){return D})),A.d(e,"c",(function(){return E})),A.d(e,"d",(function(){return zt})),A.d(e,"e",(function(){return O}));var r=A(20),i=A(116),o=A(13),a=A(21),s=A(15),g=A(2),c=A.n(g),I=A(17),u=A(9),l=A(54),C=A(23),h=A(24),B=A(77),f=A(8),d=c.a.mark(W),Q=new Map;function E(t,e){Q.set(t,e)}function p(t){return y.apply(this,arguments)}function y(){return(y=Object(f.a)(c.a.mark((function t(e){var A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Q.has(e.id)){t.next=2;break}throw new Error("Compression codec ".concat(e.id," is not supported by Zarr.js yet."));case 2:return t.next=4,Q.get(e.id)();case 4:return A=t.sent,t.abrupt("return",A.fromConfig(e));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function v(t){return new Proxy(t,{set:function(t,e,A,n){return t.setItem(e,A)},get:function(t,e,A){return t.getItem(e)},deleteProperty:function(t,e){return t.deleteItem(e)},has:function(t,e){return t.containsItem(e)}})}function m(t){return"object"===typeof(e=t)&&null!==e&&"__zarr__"in e&&"KeyError"===t.__zarr__;var e}var b=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,"path ".concat(t," contains an array"))).__zarr__="ContainsArrayError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),F=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,"path ".concat(t," contains a group"))).__zarr__="ContainsGroupError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),w=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,"array not found at path ".concat(t))).__zarr__="ArrayNotFoundError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),S=(Error,Error,function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).__zarr__="PermissionError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error))),D=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,"key ".concat(t," not present"))).__zarr__="KeyError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),R=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t,n){var r;return Object(u.a)(this,A),(r=e.call(this,"too many indices for array; expected ".concat(n.length,", got ").concat(t.length))).__zarr__="TooManyIndicesError",Object.setPrototypeOf(Object(l.a)(r),A.prototype),r}return A}(Object(B.a)(RangeError)),U=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).__zarr__="BoundsCheckError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(RangeError)),G=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t,n,r,i){var o;return Object(u.a)(this,A),(o=e.call(this,"slice arguments slice(".concat(t,", ").concat(n,", ").concat(r,") invalid: ").concat(i))).__zarr__="InvalidSliceError",Object.setPrototypeOf(Object(l.a)(o),A.prototype),o}return A}(Object(B.a)(RangeError)),N=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(){var t;return Object(u.a)(this,A),(t=e.call(this,"Negative step size is not supported when indexing.")).__zarr__="NegativeStepError",Object.setPrototypeOf(Object(l.a)(t),A.prototype),t}return A}(Object(B.a)(Error)),k=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).__zarr__="ValueError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error)),x=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).__zarr__="HTTPError",Object.setPrototypeOf(Object(l.a)(n),A.prototype),n}return A}(Object(B.a)(Error));function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0===t)throw new G(t,e,A,"The first argument must not be undefined");if("string"===typeof t&&":"!==t||"string"===typeof e&&":"!==e)throw new G(t,e,A,'Arguments can only be integers, ":" or null');return void 0===e&&(e=t,t=null),{start:":"===t?null:t,stop:":"===e?null:e,step:A,_slice:!0}}function M(t,e){var A,n,r;r=null===t.step?1:t.step,null===t.start?A=r<0?Number.MAX_SAFE_INTEGER:0:(A=t.start)<0&&(A+=e),null===t.stop?n=r<0?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER:(n=t.stop)<0&&(n+=e);var i=function(t,e,A,n){if(t<0?(t+=n)<0&&(t=A<0?-1:0):t>=n&&(t=A<0?n-1:n),e<0?(e+=n)<0&&(e=A<0?-1:0):e>=n&&(e=A<0?n-1:n),A<0){if(e<t)return[t,e,A,Math.floor((t-e-1)/-A+1)]}else if(t<e)return[t,e,A,Math.floor((e-t-1)/A+1)];return[t,e,A,0]}(A,n,r,e);if(A=i[0],n=i[1],r=i[2],e=i[3],0===r)throw new Error("Step size 0 is invalid");return[A,n,r,e]}function L(t){return Array.isArray(t)?t:[t]}function _(t,e){for(var A=[],n=[],r=0;r<t.length;r++){var i=t[r];if("number"===typeof i)A.push(i);else{var o=M(i,e[r]),a=o[3];n.push(a),A.push(o)}}return[A,n]}function J(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=T(t,e);for(var n=0;n<t.length;n++){var r=t[n];if("number"===typeof r)t[n]=A?O(r,r+1,1):j(r,e[n]);else{if(H(r))throw new TypeError("Integer array selections are not supported (yet)");":"!==r&&null!==r||(t[n]=O(null,null,1))}}return t}function T(t,e){t=L(t);for(var A=-1,n=0,r=0;r<t.length;r++)"..."===t[r]&&(A=r,n+=1);if(n>1)throw new RangeError("an index can only have a single ellipsis ('...')");if(1===n){var i=A,o=t.length-(i+1),a=t.length-1;if(a>=e.length)t=t.filter((function(t){return"..."!==t}));else{var s=e.length-a,g=t.slice(0,i).concat(new Array(s).fill(null));o>0&&(g=g.concat(t.slice(t.length-o))),t=g}}if(t.length<e.length){var c=e.length-t.length;t=t.concat(new Array(c).fill(null))}return function(t,e){if(t.length>e.length)throw new R(t,e)}(t,e),t}function j(t,e){if(t<0&&(t=e+t),t>=e||t<0)throw new U("index out of bounds for dimension with length ".concat(e));return t}function H(t){if(!Array.isArray(t))return!1;var e,A=Object(I.a)(t);try{for(A.s();!(e=A.n()).done;){if("number"!==typeof e.value)return!1}}catch(n){A.e(n)}finally{A.f()}return!0}function Y(t){return null!==t&&!0===t._slice}function V(t){return Y(t)&&(null===t.step||1===t.step)}function Z(t){t=L(t);for(var e=0;e<t.length;e++){var A=t[e];if(!H(A)&&!V(A)&&"..."!==A)return!1}return!0}function W(){var t,e,A,n,r,i,o=arguments;return c.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=o.length,e=new Array(t),A=0;A<t;A++)e[A]=o[A];if(0!==e.length){a.next=3;break}return a.abrupt("return");case 3:n=e.map((function(t){return t()})),r=n.map((function(t){return t.next()})),i=0;case 6:if(!r[i].done){a.next=13;break}if(n[i]=e[i](),r[i]=n[i].next(),!(++i>=n.length)){a.next=11;break}return a.abrupt("return");case 11:a.next=16;break;case 13:return a.next=15,r.map((function(t){return t.value}));case 15:i=0;case 16:r[i]=n[i].next();case 17:a.next=6;break;case 19:case"end":return a.stop()}}),d)}var K=function(){function t(e,A){Object(u.a)(this,t),e=J(e,A.shape),this.dimIndexers=[];for(var n=A.shape,r=0;r<n.length;r++){var i=e[r],o=n[r],a=A.chunks[r];if(null===i&&(i=O(null)),"number"===typeof i)this.dimIndexers.push(new P(i,o,a));else{if(!Y(i))throw new RangeError("Unspported selection item for basic indexing; expected integer or slice, got ".concat(i));this.dimIndexers.push(new q(i,o,a))}}this.shape=[];var s,g=Object(I.a)(this.dimIndexers);try{for(g.s();!(s=g.n()).done;){var c=s.value;c instanceof q&&this.shape.push(c.numItems)}}catch(l){g.e(l)}finally{g.f()}this.dropAxes=null}return Object(s.a)(t,[{key:"iter",value:c.a.mark((function t(){var e,A,n,r,i,o,s,g,u,l,C;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.dimIndexers.map((function(t){return function(){return t.iter()}})),A=W.apply(void 0,Object(a.a)(e)),n=Object(I.a)(A),t.prev=3,n.s();case 5:if((r=n.n()).done){t.next=16;break}i=r.value,o=[],s=[],g=[],u=Object(I.a)(i);try{for(u.s();!(l=u.n()).done;)C=l.value,o.push(C.dimChunkIndex),s.push(C.dimChunkSelection),null!==C.dimOutSelection&&g.push(C.dimOutSelection)}catch(c){u.e(c)}finally{u.f()}return t.next=14,{chunkCoords:o,chunkSelection:s,outSelection:g};case 14:t.next=5;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(3),n.e(t.t0);case 21:return t.prev=21,n.f(),t.finish(21);case 24:case"end":return t.stop()}}),t,this,[[3,18,21,24]])}))}]),t}(),P=function(){function t(e,A,n){Object(u.a)(this,t),e=j(e,A),this.dimSelection=e,this.dimLength=A,this.dimChunkLength=n,this.numItems=1}return Object(s.a)(t,[{key:"iter",value:c.a.mark((function t(){var e,A,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Math.floor(this.dimSelection/this.dimChunkLength),A=e*this.dimChunkLength,n=this.dimSelection-A,null,t.next=6,{dimChunkIndex:e,dimChunkSelection:n,dimOutSelection:null};case 6:case"end":return t.stop()}}),t,this)}))}]),t}(),q=function(){function t(e,A,n){Object(u.a)(this,t);var r=M(e,A),i=Object(o.a)(r,3),a=i[0],s=i[1],g=i[2];if(this.start=a,this.stop=s,this.step=g,this.step<1)throw new N;this.dimLength=A,this.dimChunkLength=n,this.numItems=Math.max(0,Math.ceil((this.stop-this.start)/this.step)),this.numChunks=Math.ceil(this.dimLength/this.dimChunkLength)}return Object(s.a)(t,[{key:"iter",value:c.a.mark((function t(){var e,A,n,r,i,o,a,s,g,I,u,l,C;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=Math.floor(this.start/this.dimChunkLength),A=Math.ceil(this.stop/this.dimChunkLength),n=e;case 3:if(!(n<A)){t.next=20;break}return r=n*this.dimChunkLength,i=Math.min(this.dimLength,(n+1)*this.dimChunkLength),o=i-r,a=void 0,s=void 0,g=void 0,this.start<r?(a=0,(I=(r-this.start)%this.step)>0&&(a+=this.step-I),g=Math.ceil((r-this.start)/this.step)):(a=this.start-r,g=0),s=this.stop>i?o:this.stop-r,u=O(a,s,this.step),l=Math.ceil((s-a)/this.step),C=O(g,g+l),t.next=17,{dimChunkIndex:n,dimChunkSelection:u,dimOutSelection:C};case 17:n++,t.next=3;break;case 20:case"end":return t.stop()}}),t,this)}))}]),t}(),X="undefined"!==typeof t&&t.versions&&t.versions.node;function z(t){if(null===t)return"";for(t instanceof String&&(t=t.valueOf()),t=t.replace(/\\/g,"/");t.length>0&&"/"===t[0];)t=t.slice(1);for(;t.length>0&&"/"===t[t.length-1];)t=t.slice(0,t.length-1);var e,A=(t=t.replace(/\/\/+/g,"/")).split("/"),n=Object(I.a)(A);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("."===r||".."===r)throw Error("path containing '.' or '..' segment not allowed")}}catch(i){n.e(i)}finally{n.f()}return t}function $(t){return"number"===typeof t&&(t=[t]),t.map((function(t){return Math.floor(t)}))}function tt(t,e){if(null===t||!0===t)throw new Error("Chunk guessing is not supported yet");return!1===t?e:("number"===typeof t&&(t=[t]),t.length<e.length&&(t=t.concat(e.slice(t.length))),t.map((function(t,A){return-1===t||null===t?e[A]:Math.floor(t)})))}function et(t){return t=t.toUpperCase()}function At(t,e){if(null===t)return!0;Array.isArray(t)||(t=[t]);for(var A=0;A<Math.min(t.length,e.length);A++){var n=t[A];if(null!==n){if(Y(n)){var r=n,i=1===r.step||null===r.step;if(null===r.start&&null===r.stop&&i)continue;if(r.stop-r.start===e[A]&&i)continue;return!1}return!1}}return!0}function nt(t,e){if(t.length!==e.length)return!1;for(var A=0;A<t.length;A++)if(t[A]!==e[A])return!1;return!0}function rt(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];return e.map((function(t,e){return 0===e?t.trim().replace(/[\/]*$/g,""):t.trim().replace(/(^[\/]*|[\/]*$)/g,"")})).filter((function(t){return t.length})).join("/")}function it(t){var e=t.BYTES_PER_ELEMENT;if(1!==e){if(X){var A=n.from(t.buffer,t.byteOffset,t.length*e);return 2===e&&A.swap16(),4===e&&A.swap32(),void(8===e&&A.swap64())}for(var r,i=new Uint8Array(t.buffer,t.byteOffset,t.length*e),o=e/2,a=e-1,s=0;s<i.length;s+=e)for(var g=0;g<o;g++)r=i[s+g],i[s+g]=i[s+a-g],i[s+a-g]=r}}function ot(t){var e=t.slice();return it(e),e}function at(t){return st.apply(this,arguments)}function st(){return(st=Object(f.a)(c.a.mark((function t(e){var A,n,r,i=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=z(A=i.length>1&&void 0!==i[1]?i[1]:null),n=It(A),r=n+".zarray",t.abrupt("return",e.containsItem(r));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gt(t){return ct.apply(this,arguments)}function ct(){return(ct=Object(f.a)(c.a.mark((function t(e){var A,n,r,i=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=z(A=i.length>1&&void 0!==i[1]?i[1]:null),n=It(A),r=n+".zgroup",t.abrupt("return",e.containsItem(r));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function It(t){return t.length>0?t+"/":""}function ut(t,e,A,n){return lt.apply(this,arguments)}function lt(){return(lt=Object(f.a)(c.a.mark((function t(e,A,n,r){var i,o,a,s,g;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==A.length){t.next=2;break}return t.abrupt("return");case 2:i=A.split("/"),o="",a=Object(I.a)(i.slice(0,i.length-1)),t.prev=5,a.s();case 7:if((s=a.n()).done){t.next=25;break}return g=s.value,o+=g,t.next=12,at(e,o);case 12:if(!t.sent){t.next=17;break}return t.next=15,Ct(e,o,r);case 15:t.next=22;break;case 17:return t.next=19,gt(e,o);case 19:if(t.sent){t.next=22;break}return t.next=22,Ct(e,o);case 22:o+="/";case 23:t.next=7;break;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(5),a.e(t.t0);case 30:return t.prev=30,a.f(),t.finish(30);case 33:case"end":return t.stop()}}),t,null,[[5,27,30,33]])})))).apply(this,arguments)}function Ct(t){return ht.apply(this,arguments)}function ht(){return(ht=Object(f.a)(c.a.mark((function t(e){var A,n,r,i,o=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=o.length>1&&void 0!==o[1]?o[1]:null,n=o.length>2&&void 0!==o[2]&&o[2],A=z(A),!n){t.next=7;break}throw Error("Group overwriting not implemented yet :(");case 7:return t.next=9,at(e,A);case 9:if(!t.sent){t.next=13;break}throw new b(A);case 13:return t.next=15,gt(e,A);case 15:if(!t.sent){t.next=17;break}throw new F(A);case 17:return r={zarr_format:2},i=It(A)+".zgroup",t.next=21,e.setItem(i,JSON.stringify(r));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Bt(t,e,A,n,r,i,o,a,s,g,c){return ft.apply(this,arguments)}function ft(){return(ft=Object(f.a)(c.a.mark((function t(e,A,n,r,i,o,a,s,g,I,u){var l,C,h;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!g){t.next=4;break}throw Error("Array overwriting not implemented yet :(");case 4:return t.next=6,at(e,i);case 6:if(!t.sent){t.next=10;break}throw new b(i);case 10:return t.next=12,gt(e,i);case 12:if(!t.sent){t.next=14;break}throw new F(i);case 14:if(r=r,A=$(A),n=tt(n,A),s=et(s),a=a,!(null!==u&&u.length>0)){t.next=21;break}throw Error("Filters are not supported yet");case 21:return l=a,"number"===typeof a&&(Number.isNaN(a)&&(l="NaN"),Number.POSITIVE_INFINITY===a&&(l="Infinity"),Number.NEGATIVE_INFINITY===a&&(l="-Infinity")),C={zarr_format:2,shape:A,chunks:n,dtype:r,fill_value:l,order:s,compressor:o,filters:u=null},h=It(i)+".zarray",t.next=28,e.setItem(h,JSON.stringify(C));case 28:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function dt(t,e,A,n){return Qt.apply(this,arguments)}function Qt(){return(Qt=Object(f.a)(c.a.mark((function t(e,A,n,r){var i,o,a,s,g,I,u,l=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=l.length>4&&void 0!==l[4]?l[4]:null,o=l.length>5&&void 0!==l[5]?l[5]:null,a=l.length>6&&void 0!==l[6]?l[6]:null,s=l.length>7&&void 0!==l[7]?l[7]:"C",g=l.length>8&&void 0!==l[8]&&l[8],I=l.length>9&&void 0!==l[9]?l[9]:null,u=l.length>10&&void 0!==l[10]?l[10]:null,i=z(i),t.next=10,ut(e,i,I,g);case 10:return t.next=12,Bt(e,A,n,r,i,o,a,s,g,I,u);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Et(t){if("string"!==typeof t){if(X&&n.isBuffer(t))return JSON.parse(t.toString());if(t instanceof ArrayBuffer){var e=new TextDecoder,A=new Uint8Array(t);return JSON.parse(e.decode(A))}return t}return JSON.parse(t)}var pt=function(){function t(e,A,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Object(u.a)(this,t),this.store=e,this.key=A,this.readOnly=n,this.cache=r,this.cachedValue=null}return Object(s.a)(t,[{key:"asObject",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cache||null===this.cachedValue){t.next=2;break}return t.abrupt("return",this.cachedValue);case 2:return t.next=4,this.getNoSync();case 4:return e=t.sent,this.cache&&(this.cachedValue=e),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"getNoSync",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.store.getItem(this.key);case 3:return e=t.sent,t.abrupt("return",Et(e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{});case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));return function(){return t.apply(this,arguments)}}()},{key:"setNoSync",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNoSync();case 2:return(n=t.sent)[e]=A,t.next=6,this.putNoSync(n);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"putNoSync",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.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)})));return function(e){return t.apply(this,arguments)}}()},{key:"delNoSync",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNoSync();case 2:return delete(A=t.sent)[e],t.next=6,this.putNoSync(A);case 6:return t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"put",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new S("attributes are read-only");case 2:return t.abrupt("return",this.putNoSync(e));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"setItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new S("attributes are read-only");case 2:return t.abrupt("return",this.setNoSync(e,A));case 3:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"getItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.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)})));return function(e){return t.apply(this,arguments)}}()},{key:"deleteItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.readOnly){t.next=2;break}throw new S("attributes are read-only");case 2:return t.abrupt("return",this.delNoSync(e));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"containsItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){return c.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)})));return function(e){return t.apply(this,arguments)}}()},{key:"proxy",value:function(){return v(this)}}]),t}(),yt={"|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 vt(t){if(t instanceof Uint8Array)return"|u1";if(t instanceof Int8Array)return"|i1";if(t instanceof Uint16Array)return"<u2";if(t instanceof Int16Array)return"<i2";if(t instanceof Uint32Array)return"<u4";if(t instanceof Int32Array)return"<i4";if(t instanceof Float32Array)return"<f4";if(t instanceof Float64Array)return"<f8";throw new k("Mapping for TypedArray to Dtypestring not known")}function mt(t){return void 0!==t.byteLength?t.constructor:mt(t[0])}function bt(t,e,A){var n=_(J(A,e),e),r=Object(o.a)(n,2),i=r[0],a=r[1];return[function t(e,A,n){var r=n[0];if("number"===typeof r)return 1===A.length?e[r]:t(e[r],A.slice(1),n.slice(1));var i=Object(o.a)(r,4),a=i[0],s=i[1],g=i[2],c=i[3];if(0===c)return new(mt(e))(0);if(1===A.length){if(1===g)return e.slice(a,s);for(var I=new e.constructor(c),u=0;u<c;u++)I[u]=e[a+u*g];return I}for(var l=new Array(c),C=0;C<c;C++)l[C]=t(e[a+C*g],A.slice(1),n.slice(1));if(c>0&&"number"===typeof l[0]){var h=e[0].constructor;l=h.from(l)}return l}(t,e,i),a]}function Ft(t,e,A,n){var r=_(J(n,A,!0),A),i=Object(o.a)(r,2),a=i[0];i[1];St(t,e,A,a)}function wt(t,e,A,n,r){var i=_(J(r,A,!1),A),a=Object(o.a)(i,2),s=a[0],g=a[1];if(JSON.stringify(g)!==JSON.stringify(n))throw new k("Shape mismatch in target and source NestedArray: ".concat(g," and ").concat(n));!function t(e,A,n,r){var i=r[0];if("number"===typeof A)return void St(e,A,n,r.map((function(t){return"number"===typeof t?[t,t+1,1,1]:t})));if("number"===typeof i)return void t(e[i],A,n.slice(1),r.slice(1));var a=Object(o.a)(i,4),s=a[0],g=(a[1],a[2]),c=a[3];if(1===n.length){if(1===g)e.set(A,s);else for(var I=0;I<c;I++)e[s+I*g]=A[I];return}for(var u=0;u<c;u++)t(e[s+u*g],A[u],n.slice(1),r.slice(1))}(t,e,A,s)}function St(t,e,A,n){var r=n[0],i=Object(o.a)(r,4),a=i[0],s=i[1],g=i[2],c=i[3];if(1!==A.length)for(var I=0;I<c;I++)St(t[a+I*g],e,A.slice(1),n.slice(1));else if(1===g)t.fill(e,a,s);else for(var u=0;u<c;u++)t[a+u*g]=e}function Dt(t,e,A){void 0===A&&(A=mt(t));var n=new A(e.reduce((function(t,e){return t*e}),1));return function t(e,A,n,r){if(1===A.length)return void n.set(e,r);if(2===A.length){for(var i=0;i<A[0];i++)n.set(e[i],r+A[1]*i);return e}for(var o=A.slice(1),a=o.reduce((function(t,e){return t*e}),1),s=0;s<A[0];s++)t(e[s],o,n,r+a*s);return e}(t,e,n,0),n}var Rt=function(){function t(e,A,r){Object(u.a)(this,t);var i=null!==e&&!!e.BYTES_PER_ELEMENT;if(void 0===A){if(!i)throw new k("Shape argument is required unless you pass in a TypedArray");A=[e.length]}if(void 0===r){if(!i)throw new k("Dtype argument is required unless you pass in a TypedArray");r=vt(e)}if(A=$(A),this.shape=A,this.dtype=r,i&&1!==A.length&&(e=e.buffer),0===this.shape.length)this.data=new yt[r](1);else if(X&&n.isBuffer(e)||e instanceof ArrayBuffer||null===e||e.toString().startsWith("[object ArrayBuffer]")){var o=A.reduce((function(t,e){return t*e}),1);null===e&&(e=new ArrayBuffer(o*parseInt(r[r.length-1],10)));var a=e.byteLength/parseInt(r[r.length-1],10);if(o!==a)throw new Error("Buffer has ".concat(a," of dtype ").concat(r,", shape is too large or small ").concat(A," (flat=").concat(o,")"));var s=yt[r];this.data=function t(e,A,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(1===n.length)return new A(e.slice(r,r+n[0]*A.BYTES_PER_ELEMENT));var i=new Array(n[0]);if(2===n.length){for(var o=0;o<n[0];o++)i[o]=new A(e.slice(r+n[1]*o*A.BYTES_PER_ELEMENT,r+n[1]*(o+1)*A.BYTES_PER_ELEMENT));return i}for(var a=n.slice(1),s=a.reduce((function(t,e){return t*e}),1),g=0;g<n[0];g++)i[g]=t(e,A,a,r+s*g*A.BYTES_PER_ELEMENT);return i}(e,s,A)}else this.data=e}return Object(s.a)(t,[{key:"get",value:function(e){var A=bt(this.data,this.shape,e),n=Object(o.a)(A,2),r=n[0],i=n[1];return 0===i.length?r:new t(r,i,this.dtype)}},{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;null===t&&(t=[O(null)]),"number"===typeof e?0===this.shape.length?this.data[0]=e:Ft(this.data,e,this.shape,t):wt(this.data,e.data,this.shape,e.shape,t)}},{key:"flatten",value:function(){return 1===this.shape.length?this.data:Dt(this.data,this.shape,yt[this.dtype])}}],[{key:"arange",value:function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"<i4",n=yt[A],r=Ut([e],n);return new t(r,[e],A)}}]),t}();function Ut(t,e){var A=t.reduce((function(t,e){return t*e}),1),n=new e(A);return n.set(Object(a.a)(Array(A).keys())),n}function Gt(t,e,A,n,r){var a=_(J(n,A,!0),A);!function t(e,A,n,r){var a=Object(i.a)(r),s=a[0],g=a.slice(1),c=Object(i.a)(n),I=c[0],u=c.slice(1),l=Object(o.a)(s,4),C=l[0],h=(l[1],l[2]),B=l[3];if(1===n.length){if(1===h&&1===I)A.fill(e,C,C+B);else for(var f=0;f<B;f++)A[I*(C+h*f)]=e;return}for(var d=0;d<B;d++)t(e,A.subarray(I*(C+h*d)),u,g)}(r,t,e,Object(o.a)(a,1)[0])}function Nt(t,e,A,n,r,a,s){var g=_(J(n,A,!1),A),c=Object(o.a)(g,2),I=c[0],u=c[1];if(JSON.stringify(u)!==JSON.stringify(s))throw new k("Shape mismatch in target and source RawArray: ".concat(u," and ").concat(s));!function t(e,A,n,r,a){if(0===n.length)return void e.set(r);var s=Object(i.a)(n),g=s[0],c=s.slice(1),I=Object(i.a)(A),u=I[0],l=I.slice(1);if("number"===typeof g)return void t(e.subarray(g*u),l,c,r,a);var C=Object(i.a)(a),h=C[0],B=C.slice(1),f=Object(o.a)(g,4),d=f[0],Q=(f[1],f[2]),E=f[3];if(1===A.length){if(1===Q&&1===u&&1===h)e.set(r.subarray(0,E),d);else for(var p=0;p<E;p++)e[u*(d+Q*p)]=r[h*p];return}for(var y=0;y<E;y++)t(e.subarray(u*(d+y*Q)),l,c,r.subarray(h*y),B)}(t,e,I,r,a)}function kt(t,e,A,n,r,a,s,g){var c=_(J(n,A,!0),A),I=Object(o.a)(c,1)[0],u=_(J(g,s,!1),s);!function t(e,A,n,r,a,s){if(0===s.length)return void e.set(r.subarray(0,e.length));var g=Object(i.a)(n),c=g[0],I=g.slice(1),u=Object(i.a)(s),l=u[0],C=u.slice(1),h=Object(i.a)(A),B=h[0],f=h.slice(1),d=Object(i.a)(a),Q=d[0],E=d.slice(1);if("number"===typeof l)return void t(e,A,n,r.subarray(Q*l),E,C);var p=Object(o.a)(c,4),y=p[0],v=(p[1],p[2]),m=p[3],b=Object(o.a)(l,4),F=b[0],w=(b[1],b[2]);b[3];if(1===A.length&&1===a.length){if(1===v&&1===B&&1===w&&1===Q)e.set(r.subarray(F,F+m),y);else for(var S=0;S<m;S++)e[B*(y+v*S)]=r[Q*(F+w*S)];return}for(var D=0;D<m;D++)t(e.subarray(B*(y+D*v)),f,I,r.subarray(Q*(F+D*w)),E,C)}(t,e,I,r,a,Object(o.a)(u,1)[0])}var xt=function(){function t(e,A,r,i){Object(u.a)(this,t);var o=null!==e&&!!e.BYTES_PER_ELEMENT;if(void 0===A){if(!o)throw new k("Shape argument is required unless you pass in a TypedArray");A=[e.length]}if(A=$(A),void 0===r){if(!o)throw new k("Dtype argument is required unless you pass in a TypedArray");r=vt(e)}if(void 0===i&&(i=function(t){for(var e=t.length,A=Array(e),n=1,r=e-1;r>=0;r--)A[r]=n,n*=t[r];return A}(A)),this.shape=A,this.dtype=r,this.strides=i,o&&1!==A.length&&(e=e.buffer),0===this.shape.length)this.data=new yt[r](1);else if(X&&n.isBuffer(e)||e instanceof ArrayBuffer||null===e||e.toString().startsWith("[object ArrayBuffer]")){var a=A.reduce((function(t,e){return t*e}),1);null===e&&(e=new ArrayBuffer(a*parseInt(r[r.length-1],10)));var s=e.byteLength/parseInt(r[r.length-1],10);if(a!==s)throw new Error("Buffer has ".concat(s," of dtype ").concat(r,", shape is too large or small ").concat(A," (flat=").concat(a,")"));var g=yt[r];this.data=new g(e)}else this.data=e}return Object(s.a)(t,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,A=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;null===e&&(e=[O(null)]),"number"===typeof A?0===this.shape.length?this.data[0]=A:Gt(this.data,this.strides,this.shape,e,A):A instanceof t&&n?kt(this.data,this.strides,this.shape,e,A.data,A.strides,A.shape,n):Nt(this.data,this.strides,this.shape,e,A.data,A.strides,A.shape)}}]),t}();function Ot(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Mt(t,e){return t(e={exports:{}},e.exports),e.exports}var Lt=Mt((function(t){var e=Object.prototype.hasOwnProperty,A="~";function n(){}function r(t,e,A){this.fn=t,this.context=e,this.once=A||!1}function i(t,e,n,i,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var a=new r(n,i||t,o),s=A?A+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],a]:t._events[s].push(a):(t._events[s]=a,t._eventsCount++),t}function o(t,e){0===--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(A=!1)),a.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(A?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t){var e=A?A+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r<i;r++)o[r]=n[r].fn;return o},a.prototype.listenerCount=function(t){var e=A?A+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,r,i,o){var a=A?A+t:t;if(!this._events[a])return!1;var s,g,c=this._events[a],I=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),I){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,i),!0;case 6:return c.fn.call(c.context,e,n,r,i,o),!0}for(g=1,s=new Array(I-1);g<I;g++)s[g-1]=arguments[g];c.fn.apply(c.context,s)}else{var u,l=c.length;for(g=0;g<l;g++)switch(c[g].once&&this.removeListener(t,c[g].fn,void 0,!0),I){case 1:c[g].fn.call(c[g].context);break;case 2:c[g].fn.call(c[g].context,e);break;case 3:c[g].fn.call(c[g].context,e,n);break;case 4:c[g].fn.call(c[g].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(I-1);u<I;u++)s[u-1]=arguments[u];c[g].fn.apply(c[g].context,s)}}return!0},a.prototype.on=function(t,e,A){return i(this,t,e,A,!1)},a.prototype.once=function(t,e,A){return i(this,t,e,A,!0)},a.prototype.removeListener=function(t,e,n,r){var i=A?A+t:t;if(!this._events[i])return this;if(!e)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||o(this,i);else{for(var s=0,g=[],c=a.length;s<c;s++)(a[s].fn!==e||r&&!a[s].once||n&&a[s].context!==n)&&g.push(a[s]);g.length?this._events[i]=1===g.length?g[0]:g:o(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=A?A+t:t,this._events[e]&&o(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=A,a.EventEmitter=a,t.exports=a})),_t=function(t){Object(C.a)(A,t);var e=Object(h.a)(A);function A(t){var n;return Object(u.a)(this,A),(n=e.call(this,t)).name="TimeoutError",n}return A}(Object(B.a)(Error)),Jt=function(t,e,A){return new Promise((function(n,r){if("number"!==typeof e||e<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(e!==1/0){var i=setTimeout((function(){if("function"!==typeof A){var i="string"===typeof A?A:"Promise timed out after ".concat(e," milliseconds"),o=A instanceof Error?A:new _t(i);"function"===typeof t.cancel&&t.cancel(),r(o)}else try{n(A())}catch(a){r(a)}}),e);!function(t,e){e=e||function(){},t.then((function(t){return new Promise((function(t){t(e())})).then((function(){return t}))}),(function(t){return new Promise((function(t){t(e())})).then((function(){throw t}))}))}(t.then(n,r),(function(){clearTimeout(i)}))}else n(t)}))},Tt=Jt,jt=Jt,Ht=_t;Tt.default=jt,Tt.TimeoutError=Ht;var Yt=Mt((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,A){for(var n=0,r=t.length;r>0;){var i=r/2|0,o=n+i;A(t[o],e)<=0?(n=++o,r-=i+1):r=i}return n}}));Ot(Yt);var Vt=Mt((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(){Object(u.a)(this,t),this._queue=[]}return Object(s.a)(t,[{key:"enqueue",value:function(t,e){var A={priority:(e=Object.assign({priority:0},e)).priority,run:t};if(this.size&&this._queue[this.size-1].priority>=e.priority)this._queue.push(A);else{var n=Yt.default(this._queue,A,(function(t,e){return e.priority-t.priority}));this._queue.splice(n,0,A)}}},{key:"dequeue",value:function(){var t=this._queue.shift();return t&&t.run}},{key:"size",get:function(){return this._queue.length}}]),t}();e.default=A}));Ot(Vt);var Zt,Wt=Ot(Mt((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){},n=new Tt.default.TimeoutError,r=function(t){Object(C.a)(r,t);var e=Object(h.a)(r);function r(t){var n;if(Object(u.a)(this,r),(n=e.call(this))._intervalCount=0,n._intervalEnd=0,n._pendingCount=0,n._resolveEmpty=A,n._resolveIdle=A,!("number"===typeof(t=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:Vt.default},t)).intervalCap&&t.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat(t.intervalCap,"` (").concat(typeof t.intervalCap,")"));if(void 0===t.interval||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat(t.interval,"` (").concat(typeof t.interval,")"));return n._carryoverConcurrencyCount=t.carryoverConcurrencyCount,n._isIntervalIgnored=t.intervalCap===1/0||0===t.interval,n._intervalCap=t.intervalCap,n._interval=t.interval,n._queue=new t.queueClass,n._queueClass=t.queueClass,n.concurrency=t.concurrency,n._timeout=t.timeout,n._throwOnTimeout=!0===t.throwOnTimeout,n._isPaused=!1===t.autoStart,n}return Object(s.a)(r,[{key:"_next",value:function(){this._pendingCount--,this._tryToStartAnother()}},{key:"_resolvePromises",value:function(){this._resolveEmpty(),this._resolveEmpty=A,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=A)}},{key:"_onResumeInterval",value:function(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}},{key:"_isIntervalPaused",value:function(){var t=this,e=Date.now();if(void 0===this._intervalId){var A=this._intervalEnd-e;if(!(A<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((function(){t._onResumeInterval()}),A)),!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 t=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother)return this.emit("active"),this._queue.dequeue()(),t&&this._initializeIntervalIfNeeded(),!0}return!1}},{key:"_initializeIntervalIfNeeded",value:function(){var t=this;this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((function(){t._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 t=Object(f.a)(c.a.mark((function t(e){var A,r=this,i=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=i.length>1&&void 0!==i[1]?i[1]:{},t.abrupt("return",new Promise((function(t,i){var o=function(){var o=Object(f.a)(c.a.mark((function o(){var a;return c.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r._pendingCount++,r._intervalCount++,o.prev=2,a=void 0===r._timeout&&void 0===A.timeout?e():Tt.default(Promise.resolve(e()),void 0===A.timeout?r._timeout:A.timeout,(function(){(void 0===A.throwOnTimeout?r._throwOnTimeout:A.throwOnTimeout)&&i(n)})),o.t0=t,o.next=7,a;case 7:o.t1=o.sent,(0,o.t0)(o.t1),o.next=14;break;case 11:o.prev=11,o.t2=o.catch(2),i(o.t2);case 14:r._next();case 15:case"end":return o.stop()}}),o,null,[[2,11]])})));return function(){return o.apply(this,arguments)}}();r._queue.enqueue(o,A),r._tryToStartAnother()})));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"addAll",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.map(function(){var t=Object(f.a)(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.add(e,A));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 1:case"end":return t.stop()}}),t)})));return function(e,A){return t.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 t=Object(f.a)(c.a.mark((function t(){var e=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==this._queue.size){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise((function(t){var A=e._resolveEmpty;e._resolveEmpty=function(){A(),t()}})));case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"onIdle",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==this._pendingCount||0!==this._queue.size){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise((function(t){var A=e._resolveIdle;e._resolveIdle=function(){A(),t()}})));case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.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(t){if(!("number"===typeof t&&t>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(t,"` (").concat(typeof t,")"));this._concurrency=t,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(t){this._timeout=t},get:function(){return this._timeout}}]),r}(Lt);e.default=r}))),Kt=function(){function t(e){var A=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]:null,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];Object(u.a)(this,t),this.store=e,this._chunkStore=i,this.path=z(A),this.keyPrefix=It(this.path),this.readOnly=r,this.cacheMetadata=o,this.cacheAttrs=a,this.meta=n,null!==this.meta.compressor?this.compressor=p(this.meta.compressor):this.compressor=null;var s=this.keyPrefix+".zattrs";this.attrs=new pt(this.store,s,this.readOnly,a)}return Object(s.a)(t,[{key:"reloadMetadata",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e,A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.keyPrefix+".zarray",A=this.store.getItem(e),t.t0=Et,t.next=5,A;case 5:return t.t1=t.sent,this.meta=(0,t.t0)(t.t1),t.abrupt("return",this.meta);case 8:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"refreshMetadata",value:function(){var t=Object(f.a)(c.a.mark((function t(){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.cacheMetadata){t.next=3;break}return t.next=3,this.reloadMetadata();case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"get",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getBasicSelection(t,!1,e)}},{key:"getRaw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getBasicSelection(t,!0,e)}},{key:"getBasicSelection",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A,n,r,i,o,a=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=a.length>1&&void 0!==a[1]&&a[1],n=a.length>2&&void 0!==a[2]?a[2]:{},r=n.concurrencyLimit,i=void 0===r?10:r,o=n.progressCallback,this.cacheMetadata){t.next=5;break}return t.next=5,this.reloadMetadata();case 5:if(this.shape!==[]){t.next=9;break}throw new Error("Shape [] indexing is not supported yet");case 9:return t.abrupt("return",this.getBasicSelectionND(e,A,i,o));case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"getBasicSelectionND",value:function(t,e,A,n){var r=new K(t,this);return this.getSelection(r,e,A,n)}},{key:"getSelection",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n,r){var i,o,a,s,g,u,l,C,h,B,d,Q,E=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.dtype,o=e.shape,a=e.shape.reduce((function(t,e){return t*e}),1),!A||a!==this.chunkSize){t.next=12;break}if(s=e.iter(),!1!==(g=s.next()).done||!0!==s.next().done){t.next=12;break}return u=g.value,t.next=10,this.decodeDirectToRawArray(u,o,a);case 10:return l=t.sent,t.abrupt("return",l);case 12:if(C=A?new xt(null,o,i):new Rt(null,o,i),0!==a){t.next=15;break}return t.abrupt("return",C);case 15:if(h=new Wt({concurrency:n}),r)!function(){var t,A=0,n=0,i=Object(I.a)(e.iter());try{for(i.s();!(t=i.n()).done;){t.value;n+=1}}catch(g){i.e(g)}finally{i.f()}r({progress:0,queueSize:n});var o,a=Object(I.a)(e.iter());try{var s=function(){var t=o.value;Object(f.a)(c.a.mark((function i(){return c.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,h.add((function(){return E.chunkGetItem(t.chunkCoords,t.chunkSelection,C,t.outSelection,e.dropAxes)}));case 2:r({progress:A+=1,queueSize:n});case 4:case"end":return i.stop()}}),i)})))()};for(a.s();!(o=a.n()).done;)s()}catch(g){a.e(g)}finally{a.f()}}();else{B=Object(I.a)(e.iter());try{for(Q=function(){var t=d.value;h.add((function(){return E.chunkGetItem(t.chunkCoords,t.chunkSelection,C,t.outSelection,e.dropAxes)}))},B.s();!(d=B.n()).done;)Q()}catch(p){B.e(p)}finally{B.f()}}return t.next=19,h.onIdle();case 19:if(0!==C.shape.length){t.next=21;break}return t.abrupt("return",C.data[0]);case 21:return t.abrupt("return",C);case 22:case"end":return t.stop()}}),t,this)})));return function(e,A,n,r){return t.apply(this,arguments)}}()},{key:"chunkGetItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n,r,i){var o,a,s,g,I;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length===this._chunkDataShape.length){t.next=2;break}throw new k("Inconsistent shapes: chunkCoordsLength: ".concat(e.length,", cDataShapeLength: ").concat(this.chunkDataShape.length));case 2:return o=this.chunkKey(e),t.prev=3,t.next=6,this.chunkStore.getItem(o);case 6:return a=t.sent,t.next=9,this.decodeChunk(a);case 9:if(s=t.sent,!(n instanceof Rt)){t.next=21;break}if(!Z(r)||!At(A,this.chunks)||this.meta.filters){t.next=14;break}return n.set(r,this.toNestedArray(s)),t.abrupt("return");case 14:if(g=this.toNestedArray(s),I=g.get(A),null===i){t.next=18;break}throw new Error("Drop axes is not supported yet");case 18:n.set(r,I),t.next=22;break;case 21:n.set(r,this.chunkBufferToRawArray(s),A);case 22:t.next=31;break;case 24:if(t.prev=24,t.t0=t.catch(3),!m(t.t0)){t.next=30;break}null!==this.fillValue&&n.set(r,this.fillValue),t.next=31;break;case 30:throw t.t0;case 31:case"end":return t.stop()}}),t,this,[[3,24]])})));return function(e,A,n,r,i){return t.apply(this,arguments)}}()},{key:"getRawChunk",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,r,i,o,a,s;return c.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]=j(e[n],r);t.next=13;break;case 6:if(t.prev=6,t.t0=t.catch(2),!(t.t0 instanceof U)){t.next=12;break}throw new U("index ".concat(e.join(".")," is out of bounds for shape: ").concat(this.shape," and chunks ").concat(this.chunks));case 12:throw t.t0;case 13:return i=this.chunkKey(e),o=this.chunkStore.getItem(i,null===A||void 0===A?void 0:A.storeOptions),t.t1=this,t.next=18,o;case 18:return t.t2=t.sent,t.next=21,t.t1.decodeChunk.call(t.t1,t.t2);case 21:return a=t.sent,s=this.chunks.filter((function(t){return 1!==t})),t.abrupt("return",new xt(a,s,this.dtype));case 24:case"end":return t.stop()}}),t,this,[[2,6]])})));return function(e,A){return t.apply(this,arguments)}}()},{key:"chunkKey",value:function(t){return this.keyPrefix+t.join(".")}},{key:"ensureByteArray",value:function(t){return"string"===typeof t?new Uint8Array(n.from(t).buffer):new Uint8Array(t)}},{key:"toTypedArray",value:function(t){return new yt[this.dtype](t)}},{key:"toNestedArray",value:function(t){var e=this.ensureByteArray(t).buffer;return new Rt(e,this.chunks,this.dtype)}},{key:"decodeChunk",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=this.ensureByteArray(e),null===this.compressor){t.next=7;break}return t.next=4,this.compressor;case 4:return t.next=6,t.sent.decode(A);case 6:A=t.sent;case 7:return this.dtype.includes(">")&&it(this.toTypedArray(A.buffer)),t.abrupt("return",A.buffer);case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"chunkBufferToRawArray",value:function(t){return new xt(t,this.chunks,this.dtype)}},{key:"decodeDirectToRawArray",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n){var r,i,o,a;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.chunkCoords,i=this.chunkKey(r),t.prev=2,t.next=5,this.chunkStore.getItem(i);case 5:return o=t.sent,t.t0=xt,t.next=9,this.decodeChunk(o);case 9:return t.t1=t.sent,t.t2=A,t.t3=this.dtype,t.abrupt("return",new t.t0(t.t1,t.t2,t.t3));case 15:if(t.prev=15,t.t4=t.catch(2),!m(t.t4)){t.next=22;break}return a=new yt[this.dtype](n),t.abrupt("return",new xt(a.fill(this.fillValue),A));case 22:throw t.t4;case 23:case"end":return t.stop()}}),t,this,[[2,15]])})));return function(e,A,n){return t.apply(this,arguments)}}()},{key:"set",value:function(){var t=Object(f.a)(c.a.mark((function t(){var e,A,n,r=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:null,A=r.length>1?r[1]:void 0,n=r.length>2&&void 0!==r[2]?r[2]:{},t.next=5,this.setBasicSelection(e,A,n);case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"setBasicSelection",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,r,i,o,a=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=a.length>2&&void 0!==a[2]?a[2]:{},r=n.concurrencyLimit,i=void 0===r?10:r,o=n.progressCallback,!this.readOnly){t.next=3;break}throw new S("Object is read only");case 3:if(this.cacheMetadata){t.next=6;break}return t.next=6,this.reloadMetadata();case 6:if(this.shape!==[]){t.next=10;break}throw new Error("Shape [] indexing is not supported yet");case 10:return t.next=12,this.setBasicSelectionND(e,A,i,o);case 12:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"setBasicSelectionND",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n,r){var i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=new K(e,this),t.next=3,this.setSelection(i,A,n,r);case 3:case"end":return t.stop()}}),t,this)})));return function(e,A,n,r){return t.apply(this,arguments)}}()},{key:"getChunkValue",value:function(t,e,A,n){var r;if(n===[])r=A;else if("number"===typeof A)r=A;else if(r=A.get(t.outSelection),null!==e.dropAxes)throw new Error("Handling drop axes not supported yet");return r}},{key:"setSelection",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n,r){var i,o,a,s,g,u=this;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((i=e.shape)!==[]){t.next=5;break}t.next=15;break;case 5:if("number"!==typeof A){t.next=9;break}t.next=15;break;case 9:if(!(A instanceof Rt)){t.next=14;break}if(nt(A.shape,i)){t.next=12;break}throw new k("Shape mismatch in source NestedArray and set selection: ".concat(A.shape," and ").concat(i));case 12:t.next=15;break;case 14:throw new Error("Unknown data type for setting :(");case 15:if(o=new Wt({concurrency:n}),r)!function(){var t,n=0,a=Object(I.a)(e.iter());try{for(a.s();!(t=a.n()).done;){t.value;n+=1}}catch(h){a.e(h)}finally{a.f()}var s=0;r({progress:0,queueSize:n});var g,l=Object(I.a)(e.iter());try{var C=function(){var t=g.value,a=u.getChunkValue(t,e,A,i);Object(f.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.add((function(){return u.chunkSetItem(t.chunkCoords,t.chunkSelection,a)}));case 2:r({progress:s+=1,queueSize:n});case 4:case"end":return e.stop()}}),e)})))()};for(l.s();!(g=l.n()).done;)C()}catch(h){l.e(h)}finally{l.f()}}();else{a=Object(I.a)(e.iter());try{for(g=function(){var t=s.value,n=u.getChunkValue(t,e,A,i);o.add((function(){return u.chunkSetItem(t.chunkCoords,t.chunkSelection,n)}))},a.s();!(s=a.n()).done;)g()}catch(l){a.e(l)}finally{a.f()}}return t.next=19,o.onIdle();case 19:case"end":return t.stop()}}),t)})));return function(e,A,n,r){return t.apply(this,arguments)}}()},{key:"chunkSetItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A,n){var r,i,o,a,s,g,I,u,l;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this.chunkKey(e),i=null,o=yt[this.dtype],a=this.chunkSize,!At(A,this.chunks)){t.next=8;break}"number"===typeof n?(i=new o(a)).fill(n):i=n.flatten(),t.next=29;break;case 8:return t.prev=8,t.next=11,this.chunkStore.getItem(r);case 11:return g=t.sent,t.next=14,this.decodeChunk(g);case 14:I=t.sent,s=this.toTypedArray(I),t.next=26;break;case 18:if(t.prev=18,t.t0=t.catch(8),!m(t.t0)){t.next=25;break}s=new o(a),null!==this.fillValue&&s.fill(this.fillValue),t.next=26;break;case 25:throw t.t0;case 26:(u=new Rt(s,this.chunks,this.dtype)).set(A,n),i=u.flatten();case 29:return t.next=31,this.encodeChunk(i);case 31:l=t.sent,this.chunkStore.setItem(r,l);case 33:case"end":return t.stop()}}),t,this,[[8,18]])})));return function(e,A,n){return t.apply(this,arguments)}}()},{key:"encodeChunk",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A,n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dtype.includes(">")&&(e=ot(e)),null===this.compressor){t.next=9;break}return A=new Uint8Array(e.buffer),t.next=5,this.compressor;case 5:return t.next=7,t.sent.encode(A);case 7:return n=t.sent,t.abrupt("return",n.buffer);case 9:return t.abrupt("return",e.buffer);case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{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 t=this.name;if(null===t)return null;var e=t.split("/");return e[e.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(t,e){return t*e}),1)}},{key:"dtype",get:function(){return this.meta.dtype}},{key:"fillValue",get:function(){var t=this.meta.fill_value;return"NaN"===t?NaN:"Infinity"===t?1/0:"-Infinity"===t?-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(t,e){return t*e}),1)}},{key:"length",get:function(){return this.shape[0]}},{key:"_chunkDataShape",get:function(){if(this.shape===[])return[1];for(var t=[],e=0;e<this.shape.length;e++)t[e]=Math.ceil(this.shape[e]/this.chunks[e]);return t}},{key:"chunkDataShape",get:function(){return this._chunkDataShape}},{key:"numChunks",get:function(){return this.chunkDataShape.reduce((function(t,e){return t*e}),1)}}],[{key:"create",value:function(){var e=Object(f.a)(c.a.mark((function e(A){var n,r,i,o,a,s,g=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=g.length>1&&void 0!==g[1]?g[1]:null,r=g.length>2&&void 0!==g[2]&&g[2],i=g.length>3&&void 0!==g[3]?g[3]:null,o=!(g.length>4&&void 0!==g[4])||g[4],a=!(g.length>5&&void 0!==g[5])||g[5],e.next=7,this.loadMetadataForConstructor(A,n);case 7:return s=e.sent,e.abrupt("return",new t(A,n,s,r,i,o,a));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadMetadataForConstructor",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,A=z(A),n=It(A),t.next=5,e.getItem(n+".zarray");case 5:return r=t.sent,t.abrupt("return",Et(r));case 9:return t.prev=9,t.t0=t.catch(0),t.next=13,gt(e,A);case 13:if(!t.sent){t.next=15;break}throw new F(null!==A&&void 0!==A?A:"");case 15:throw new Error("Failed to load metadata for ZarrArray:"+t.t0.toString());case 16:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e,A){return t.apply(this,arguments)}}()}]),t}(),Pt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(u.a)(this,t),this.root=e}return Object(s.a)(t,[{key:"proxy",value:function(){return v(this)}},{key:"getParent",value:function(t){var e,A=this.root,n=t.split("/"),r=Object(I.a)(n.slice(0,n.length-1));try{for(r.s();!(e=r.n()).done;){if(!(A=A[e.value]))throw Error(t)}}catch(i){r.e(i)}finally{r.f()}return[A,n[n.length-1]]}},{key:"requireParent",value:function(t){var e,A=this.root,n=t.split("/"),r=Object(I.a)(n.slice(0,n.length-1));try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0===A[i]&&(A[i]={}),A=A[i]}}catch(o){r.e(o)}finally{r.f()}return[A,n[n.length-1]]}},{key:"getItem",value:function(t){var e=this.getParent(t),A=Object(o.a)(e,2),n=A[0][A[1]];if(void 0===n)throw new D(t);return n}},{key:"setItem",value:function(t,e){var A=this.requireParent(t),n=Object(o.a)(A,2);return n[0][n[1]]=e,!0}},{key:"deleteItem",value:function(t){var e=this.getParent(t),A=Object(o.a)(e,2);return delete A[0][A[1]]}},{key:"containsItem",value:function(t){try{return void 0!==this.getItem(t)}catch(e){return!1}}},{key:"keys",value:function(){throw new Error("Method not implemented.")}}]),t}();!function(t){t.HEAD="HEAD",t.GET="GET",t.PUT="PUT"}(Zt||(Zt={}));var qt=[Zt.HEAD,Zt.GET,Zt.PUT],Xt=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(u.a)(this,t),this.url=e;var n=A.fetchOptions,r=void 0===n?{}:n,i=A.supportedMethods,o=void 0===i?qt:i;this.fetchOptions=r,this.supportedMethods=new Set(o)}return Object(s.a)(t,[{key:"keys",value:function(){throw new Error("Method not implemented.")}},{key:"getItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var i,o;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=rt(this.url,e),t.next=3,fetch(i,Object(r.a)({},this.fetchOptions,{},A));case 3:if(404!==(o=t.sent).status){t.next=8;break}throw new D(e);case 8:if(200===o.status){t.next=10;break}throw new x(String(o.status));case 10:if(!X){t.next=18;break}return t.t0=n,t.next=14,o.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",o.arrayBuffer());case 19:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"setItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e,A){var n,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.supportedMethods.has(Zt.PUT)){t.next=2;break}throw new Error("HTTP PUT no a supported method for store.");case 2:return n=rt(this.url,e),"string"===typeof A&&(A=(new TextEncoder).encode(A).buffer),t.next=6,fetch(n,Object(r.a)({},this.fetchOptions,{method:Zt.PUT,body:A}));case 6:return i=t.sent,t.abrupt("return","2"===i.status.toString()[0]);case 8:case"end":return t.stop()}}),t,this)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"deleteItem",value:function(t){throw new Error("Method not implemented.")}},{key:"containsItem",value:function(){var t=Object(f.a)(c.a.mark((function t(e){var A,n,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=rt(this.url,e),n=this.supportedMethods.has(Zt.HEAD)?Zt.HEAD:Zt.GET,t.next=4,fetch(A,Object(r.a)({},this.fetchOptions,{method:n}));case 4:return i=t.sent,t.abrupt("return",200===i.status);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),t}();function zt(){return $t.apply(this,arguments)}function $t(){return($t=Object(f.a)(c.a.mark((function t(){var e,A,n,r,i,o,a,s,g,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,S,D,R,U=arguments;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=U.length>0&&void 0!==U[0]?U[0]:{},A=e.shape,n=e.mode,r=void 0===n?"a":n,i=e.chunks,o=void 0===i||i,a=e.dtype,s=void 0===a?"<i4":a,g=e.compressor,I=void 0===g?null:g,u=e.fillValue,l=void 0===u?null:u,C=e.order,h=void 0===C?"C":C,B=e.store,f=e.overwrite,d=void 0!==f&&f,Q=e.path,E=void 0===Q?null:Q,p=e.chunkStore,y=e.filters,v=e.cacheMetadata,m=void 0===v||v,S=e.cacheAttrs,D=void 0===S||S,B=te(B),void 0===p&&(p=te(B)),E=z(E),"r"!==r&&"r+"!==r){t.next=15;break}return t.next=7,at(B,E);case 7:if(t.sent){t.next=13;break}return t.next=10,gt(B,E);case 10:if(!t.sent){t.next=12;break}throw new F(E);case 12:throw new w(E);case 13:t.next=56;break;case 15:if("w"!==r){t.next=22;break}if(void 0!==A){t.next=18;break}throw new k("Shape can not be undefined when creating a new array");case 18:return t.next=20,dt(B,A,o,s,E,I,l,h,d,p,y);case 20:t.next=56;break;case 22:if("a"!==r){t.next=36;break}return t.next=25,at(B,E);case 25:if(t.sent){t.next=34;break}return t.next=28,gt(B,E);case 28:if(!t.sent){t.next=30;break}throw new F(E);case 30:if(void 0!==A){t.next=32;break}throw new k("Shape can not be undefined when creating a new array");case 32:return t.next=34,dt(B,A,o,s,E,I,l,h,d,p,y);case 34:t.next=56;break;case 36:if("w-"!==r&&"x"!==r){t.next=55;break}return t.next=39,at(B,E);case 39:if(!t.sent){t.next=43;break}throw new b(E);case 43:return t.next=45,gt(B,E);case 45:if(!t.sent){t.next=49;break}throw new F(E);case 49:if(void 0!==A){t.next=51;break}throw new k("Shape can not be undefined when creating a new array");case 51:return t.next=53,dt(B,A,o,s,E,I,l,h,d,p,y);case 53:t.next=56;break;case 55:throw new k("Invalid mode argument: ".concat(r));case 56:return R="r"===r,t.abrupt("return",Kt.create(B,E,R,p,m,D));case 58:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function te(t){return void 0===t?new Pt:"string"===typeof t?new Xt(t):t}}).call(this,A(62),A(104).Buffer)},function(t,e,A){"use strict";A.d(e,"a",(function(){return g})),A.d(e,"b",(function(){return c})),A.d(e,"d",(function(){return u})),A.d(e,"c",(function(){return C}));var n=A(1);function r(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return i(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return i(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==A.return||A.return()}finally{if(s)throw o}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function o(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function a(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?o(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):o(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var s=["points","lines","polygons"];function g(t,e){if(!t)return null;var A=t.featureIds.value.indexOf(e);return-1!==A?I(t,e,A):null}function c(t,e){if(!t)return null;var A="startIndices"in t?t.startIndices[e]:e,n=t.featureIds.value[A];return-1!==A?I(t,n,A):null}function I(t,e,A){var n={properties:a({},t.properties[e])};for(var r in t.numericProps)n.properties[r]=t.numericProps[r].value[A];return n}function u(t,e,A){if(!t)return-1;var n,i=r(s);try{for(i.s();!(n=i.n()).done;){var o=l(t,e,A,n.value);if(-1!==o)return o}}catch(a){i.e(a)}finally{i.f()}return-1}function l(t,e,A,n){if(!t)return-1;if(!(n in t)||!t[n].positions.value.length)return-1;var r=-1;if(t[n].numericProps[e])r=t[n].numericProps[e].value.indexOf(A);else{var i=t[n].properties.findIndex((function(t){return t[e]===A}));r=t[n].featureIds.value.indexOf(i)}return r}function C(t,e){var A={points:null,lines:null,polygons:null};for(var n in A){var r=t[n].featureIds.value;A[n]=new Uint8ClampedArray(3*r.length);for(var i=[],o=0;o<r.length;o++)e(r[o],i),A[n][3*o+0]=i[0],A[n][3*o+1]=i[1],A[n][3*o+2]=i[2]}return A}},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(10),r=A(0),i=A(348);function o(t,e){var A=r.memo(r.forwardRef((function(e,A){return r.createElement(i.a,Object(n.a)({},e,{ref:A}),t)})));return A.muiName=i.a.muiName,A}},function(t,e,A){"use strict";var n=A(0),r=A.n(n);e.a=r.a.createContext(null)},function(t,e,A){"use strict";var n=A(0),r=A.n(n),i=A(821),o=A(10),a=A(30),s=(A(25),A(437)),g=A(753),c=A(906),I=A(210),u=A(122),l=A(64);function C(t){return"function"===typeof t?t():t}var h="undefined"!==typeof window?n.useLayoutEffect:n.useEffect,B={},f=n.forwardRef((function(t,e){var A=t.anchorEl,r=t.children,i=t.container,f=t.disablePortal,d=void 0!==f&&f,Q=t.keepMounted,E=void 0!==Q&&Q,p=t.modifiers,y=t.open,v=t.placement,m=void 0===v?"bottom":v,b=t.popperOptions,F=void 0===b?B:b,w=t.popperRef,S=t.transition,D=void 0!==S&&S,R=Object(a.a)(t,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),U=n.useRef(null),G=Object(l.a)(U,e),N=n.useRef(null),k=Object(l.a)(N,w),x=n.useRef(k);h((function(){x.current=k}),[k]),n.useImperativeHandle(w,(function(){return N.current}),[]);var O=n.useState(!0),M=O[0],L=O[1],_=function(t,e){if("ltr"===(e&&e.direction||"ltr"))return t;switch(t){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 t}}(m,Object(g.a)()),J=n.useState(_),T=J[0],j=J[1];n.useEffect((function(){N.current&&N.current.update()}));var H=n.useCallback((function(){if(U.current&&A&&y){N.current&&(N.current.destroy(),x.current(null));var t=function(t){j(t.placement)},e=(C(A),new s.a(C(A),U.current,Object(o.a)({placement:_},F,{modifiers:Object(o.a)({},d?{}:{preventOverflow:{boundariesElement:"window"}},{},p,{},F.modifiers),onCreate:Object(I.a)(t,F.onCreate),onUpdate:Object(I.a)(t,F.onUpdate)})));x.current(e)}}),[A,d,p,y,_,F]),Y=n.useCallback((function(t){Object(u.a)(G,t),H()}),[G,H]),V=function(){N.current&&(N.current.destroy(),x.current(null))};if(n.useEffect((function(){H()}),[H]),n.useEffect((function(){return function(){V()}}),[]),n.useEffect((function(){y||D||V()}),[y,D]),!E&&!y&&(!D||M))return null;var Z={placement:T};return D&&(Z.TransitionProps={in:y,onEnter:function(){L(!1)},onExited:function(){L(!0),V()}}),n.createElement(c.a,{disablePortal:d,container:i},n.createElement("div",Object(o.a)({ref:Y,role:"tooltip"},R,{style:Object(o.a)({position:"fixed",top:0,left:0},R.style)}),"function"===typeof r?r(Z):r))})),d=A(907),Q=A(942),E=A(68),p=A(100),y=A(90);function v(t){return t.substring(2).toLowerCase()}var m=n.forwardRef((function(t,e){var A=t.children,r=t.mouseEvent,i=void 0===r?"onClick":r,o=t.touchEvent,a=void 0===o?"onTouchEnd":o,s=t.onClickAway,g=n.useRef(!1),c=n.useRef(null),I=n.useRef(!1);n.useEffect((function(){return I.current=!0,function(){I.current=!1}}),[]);var C=Object(l.a)(c,e),h=n.useCallback((function(t){Object(u.a)(C,E.findDOMNode(t))}),[C]),B=Object(l.a)(A.ref,h),f=Object(y.a)((function(t){if(I.current)if(g.current)g.current=!1;else if(c.current){var e=Object(p.a)(c.current);e.documentElement&&e.documentElement.contains(t.target)&&!c.current.contains(t.target)&&s(t)}})),d=n.useCallback((function(){g.current=!0}),[]);return n.useEffect((function(){if(!1!==a){var t=v(a),e=Object(p.a)(c.current);return e.addEventListener(t,f),e.addEventListener("touchmove",d),function(){e.removeEventListener(t,f),e.removeEventListener("touchmove",d)}}}),[f,d,a]),n.useEffect((function(){if(!1!==i){var t=v(i),e=Object(p.a)(c.current);return e.addEventListener(t,f),function(){e.removeEventListener(t,f)}}}),[f,i]),n.createElement(n.Fragment,null,n.cloneElement(A,{ref:B}))})),b=A(215);function F(t){var e=Object(b.b)(),A=t.anchorEl,n=t.open,i=t.placement,o=void 0===i?"bottom-start":i,a=t.children;return r.a.createElement(f,{className:e.popper,open:n,anchorEl:A.current,placement:o},a)}function w(t){var e=t.children,A=Object(b.b)();return r.a.createElement(i.a,{className:A.paper,elevation:4},e)}function S(t){var e=t.children,A=Object(b.b)();return r.a.createElement("span",{className:A.span},e)}function D(t){var e=t.buttonIcon,A=t.open,i=t.toggle,o=t.children,a=t.placement,s=t.buttonClassName,g=Object(n.useRef)(null),c=Object(b.b)();return r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:i,size:"small",ref:g,className:s},e),r.a.createElement(F,{className:c.popper,open:A,anchorEl:g,placement:a},r.a.createElement(w,null,r.a.createElement(m,{onClickAway:i},r.a.createElement(Q.a,null,o)))))}A.d(e,"a",(function(){return S})),A.d(e,"b",(function(){return D}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return c}));var n=A(1),r=A(5),i=A(4),o=A(211),a=A(49);function s(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}var g={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,t);var A=e.id,n=void 0===A?Object(o.c)("geometry"):A,i=e.drawMode,a=void 0===i?g.TRIANGLES:i,s=e.attributes,c=void 0===s?{}:s,I=e.indices,u=void 0===I?null:I,l=e.vertexCount,C=void 0===l?null:l;this.id=n,this.drawMode=0|a,this.attributes={},this.userData={},this._setAttributes(c,u),this.vertexCount=C||this._calculateVertexCount(this.attributes,this.indices)}return Object(i.a)(t,null,[{key:"DRAW_MODE",get:function(){return g}}]),Object(i.a)(t,[{key:"getVertexCount",value:function(){return this.vertexCount}},{key:"getAttributes",value:function(){return this.indices?function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?s(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):s(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({indices:this.indices},this.attributes):this.attributes}},{key:"_print",value:function(t){return"Geometry ".concat(this.id," attribute ").concat(t)}},{key:"_setAttributes",value:function(t,e){for(var A in e&&(this.indices=ArrayBuffer.isView(e)?{value:e,size:1}:e),t){var n=t[A];n=ArrayBuffer.isView(n)?{value:n}:n,Object(a.a)(ArrayBuffer.isView(n.value),"".concat(this._print(A),": must be typed array or object with value as typed array")),"POSITION"!==A&&"positions"!==A||n.size||(n.size=3),"indices"===A?(Object(a.a)(!this.indices),this.indices=n):this.attributes[A]=n}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}},{key:"_calculateVertexCount",value:function(t,e){if(e)return e.value.length;var A=1/0;for(var n in t){var r=t[n],i=r.value,o=r.size;!r.constant&&i&&o>=1&&(A=Math.min(A,i.length/o))}return Object(a.a)(Number.isFinite(A)),A}},{key:"mode",get:function(){return this.drawMode}}]),t}()},,function(t,e,A){(function(t){function A(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===A(t)},e.isBoolean=function(t){return"boolean"===typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"===typeof t},e.isString=function(t){return"string"===typeof t},e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===A(t)},e.isObject=function(t){return"object"===typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===A(t)},e.isError=function(t){return"[object Error]"===A(t)||t instanceof Error},e.isFunction=function(t){return"function"===typeof t},e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=t.isBuffer}).call(this,A(104).Buffer)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(153),r=A(85);e.default=function(t,e,A){void 0===A&&(A={});var i=n.getCoord(t),o=n.getCoord(e),a=r.degreesToRadians(o[1]-i[1]),s=r.degreesToRadians(o[0]-i[0]),g=r.degreesToRadians(i[1]),c=r.degreesToRadians(o[1]),I=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(g)*Math.cos(c);return r.radiansToLength(2*Math.atan2(Math.sqrt(I),Math.sqrt(1-I)),A.units)}},function(t,e,A){"use strict";A.d(e,"d",(function(){return s})),A.d(e,"a",(function(){return g})),A.d(e,"b",(function(){return c})),A.d(e,"c",(function(){return I}));var n=A(26),r=A(154),i=A(387);function o(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function s(t){if(i.toArrayBuffer&&(t=i.toArrayBuffer(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.buffer;if("string"===typeof t){var e=t;return(new TextEncoder).encode(e).buffer}return t&&"object"===Object(n.a)(t)&&t._toArrayBuffer?t._toArrayBuffer():Object(r.a)(!1)}function g(t,e,A){if(A=A||t.byteLength,t.byteLength<A||e.byteLength<A)return!1;for(var n=new Uint8Array(t),r=new Uint8Array(e),i=0;i<n.length;++i)if(n[i]!==r[i])return!1;return!0}function c(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];var n,r=e.map((function(t){return t instanceof ArrayBuffer?new Uint8Array(t):t})),i=r.reduce((function(t,e){return t+e.byteLength}),0),a=new Uint8Array(i),s=0,g=o(r);try{for(g.s();!(n=g.n()).done;){var c=n.value;a.set(c,s),s+=c.byteLength}}catch(I){g.e(I)}finally{g.f()}return a.buffer}function I(t,e,A){var n=void 0!==A?new Uint8Array(t).subarray(e,e+A):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}},function(t,e,A){"use strict";(function(t){function n(){var e;if("undefined"!==typeof window&&window.performance)e=window.performance.now();else if("undefined"!==typeof t&&t.hrtime){var A=t.hrtime();e=1e3*A[0]+A[1]/1e6}else e=Date.now();return e}A.d(e,"a",(function(){return n}))}).call(this,A(62))},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(5),r=A(4),i=A(16),o=A(7),a=A(14),s=A(178),g=A(36),c=A(149),I=A(34),u=A(45),l=[0,0,0,1],C=function(t){function e(){var t,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(n.a)(this,e),t=Object(i.a)(this,Object(o.a)(e).call(this,-0,-0,-0,-0)),Array.isArray(A)&&1===arguments.length?t.copy(A):t.set(A,r,a,s),t}return Object(a.a)(e,t),Object(r.a)(e,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}},{key:"set",value:function(t,e,A,n){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this.check()}},{key:"fromMatrix3",value:function(t){return I.e(this,t),this.check()}},{key:"identity",value:function(){return I.f(this),this.check()}},{key:"fromAxisRotation",value:function(t,e){return I.p(this,t,e),this.check()}},{key:"setAxisAngle",value:function(t,e){return this.fromAxisRotation(t,e)}},{key:"len",value:function(){return I.h(this)}},{key:"lengthSquared",value:function(t){return I.r(this)}},{key:"dot",value:function(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return I.d(this,t)}},{key:"rotationTo",value:function(t,e){return I.n(this,t,e),this.check()}},{key:"add",value:function(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return I.a(this,this,t),this.check()}},{key:"calculateW",value:function(){return I.b(this,this),this.check()}},{key:"conjugate",value:function(){return I.c(this,this),this.check()}},{key:"invert",value:function(){return I.g(this,this),this.check()}},{key:"lerp",value:function(t,e,A){return I.i(this,t,e,A),this.check()}},{key:"multiplyRight",value:function(t,e){return Object(c.a)(!e),I.j(this,this,t),this.check()}},{key:"multiplyLeft",value:function(t,e){return Object(c.a)(!e),I.j(this,t,this),this.check()}},{key:"normalize",value:function(){var t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}},{key:"rotateX",value:function(t){return I.k(this,this,t),this.check()}},{key:"rotateY",value:function(t){return I.l(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return I.m(this,this,t),this.check()}},{key:"scale",value:function(t){return I.o(this,this,t),this.check()}},{key:"slerp",value:function(t,e,A){switch(arguments.length){case 1:var n=arguments[0],r=n.start;t=void 0===r?l:r,e=n.target,A=n.ratio;break;case 2:var i=Array.prototype.slice.call(arguments);e=i[0],A=i[1],t=this}return I.q(this,t,e,A),this.check()}},{key:"transformVector4",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return u.o(e,t,this),Object(g.b)(e,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(t,e){return this.setAxisAngle(t,e)}},{key:"premultiply",value:function(t,e){return this.multiplyLeft(t,e)}},{key:"multiply",value:function(t,e){return this.multiplyRight(t,e)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(t){return this[0]=Object(g.a)(t)}},{key:"y",get:function(){return this[1]},set:function(t){return this[1]=Object(g.a)(t)}},{key:"z",get:function(){return this[2]},set:function(t){return this[2]=Object(g.a)(t)}},{key:"w",get:function(){return this[3]},set:function(t){return this[3]=Object(g.a)(t)}}]),e}(s.a)},function(t,e,A){"use strict";(function(t){function n(){var e;if("undefined"!==typeof window&&window.performance)e=window.performance.now();else if("undefined"!==typeof t&&t.hrtime){var A=t.hrtime();e=1e3*A[0]+A[1]/1e6}else e=Date.now();return e}A.d(e,"a",(function(){return n}))}).call(this,A(62))},function(t,e,A){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t){for(var e in t)return!1;return!0}function r(t,e){if(t===e)return!0;var A=Array.isArray(t)||ArrayBuffer.isView(t),n=Array.isArray(e)||ArrayBuffer.isView(e);if(A&&n&&t.length===e.length){for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0}return!1}A.d(e,"b",(function(){return n})),A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"b",(function(){return h})),A.d(e,"a",(function(){return B}));var n=A(22),r=A(523),i=A.n(r),o=A(125);function a(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return s(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return s(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var g=o.a.CLOCKWISE,c=o.a.COUNTER_CLOCKWISE,I={isClosed:!0};function u(t,e,A,n){for(var r=0;r<e;r++)if(t[A+r]!==t[n-e+r])return!1;return!0}function l(t,e,A,n,r){for(var i=e,a=A.length,s=0;s<a;s++)for(var g=0;g<n;g++)t[i++]=A[s][g]||0;if(!function(t){var e=t[0],A=t[t.length-1];return e[0]===A[0]&&e[1]===A[1]&&e[2]===A[2]}(A))for(var c=0;c<n;c++)t[i++]=A[0][c]||0;return I.start=e,I.end=i,I.size=n,Object(o.f)(t,r,I),i}function C(t,e,A,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,s=(i=i||A.length)-r;if(s<=0)return e;for(var g=e,c=0;c<s;c++)t[g++]=A[r+c];if(!u(A,n,r,i))for(var l=0;l<n;l++)t[g++]=A[r+l];return I.start=e,I.end=g,I.size=n,Object(o.f)(t,a,I),g}function h(t,e){!function(t){if(t=t&&t.positions||t,!Array.isArray(t)&&!ArrayBuffer.isView(t))throw new Error("invalid polygon")}(t);var A=[],r=[];if(t.positions){var i=t,o=i.positions,s=i.holeIndices;if(s){for(var I=0,u=0;u<=s.length;u++)I=C(A,I,o,e,s[u-1],s[u],0===u?g:c),r.push(I);return r.pop(),{positions:A,holeIndices:r}}t=o}if(Number.isFinite(t[0]))return C(A,0,t,e,0,A.length,g),A;if(!function(t){return t.length>=1&&t[0].length>=2&&Number.isFinite(t[0][0])}(t)){var h,B=0,f=a(t.entries());try{for(f.s();!(h=f.n()).done;){var d=Object(n.a)(h.value,2),Q=d[0];B=l(A,B,d[1],e,0===Q?g:c),r.push(B)}}catch(E){f.e(E)}finally{f.f()}return r.pop(),{positions:A,holeIndices:r}}return l(A,0,t,e,g),A}function B(t,e,A){var n=null;t.holeIndices&&(n=t.holeIndices.map((function(t){return t/e})));var r=t.positions||t;if(A){var o=r.length;r=r.slice();for(var a=[],s=0;s<o;s+=e){a[0]=r[s],a[1]=r[s+1];var g=A(a);r[s]=g[0],r[s+1]=g[1]}}return i()(r,n,e)}},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window,a="object"!==("undefined"===typeof n?"undefined":Object(r.a)(n))||"[object process]"!==String(n)||n.browser,s="undefined"!==typeof n&&n.version&&n.version.match(/v([0-9]*)/);s&&parseFloat(s[1])}).call(this,A(58),A(62))},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window,a="object"!==("undefined"===typeof n?"undefined":Object(r.a)(n))||"[object process]"!==String(n)||n.browser,s="undefined"!==typeof n&&n.version&&n.version.match(/v([0-9]*)/);s&&parseFloat(s[1])}).call(this,A(58),A(62))},function(t,e,A){"use strict";function n(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n=A(9),r=A(15),i=A(17),o=function(){return"function"===typeof Symbol},a=function(t){return o()&&Boolean(Symbol[t])},s=function(t){return a(t)?Symbol[t]:"@@"+t};a("asyncIterator")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator"));var g=s("iterator"),c=s("observable"),I=s("species");function u(t,e){var A=t[e];if(null!=A){if("function"!==typeof A)throw new TypeError(A+" is not a function");return A}}function l(t){var e=t.constructor;return void 0!==e&&null===(e=e[I])&&(e=void 0),void 0!==e?e:y}function C(t){C.log?C.log(t):setTimeout((function(){throw t}),0)}function h(t){Promise.resolve().then((function(){try{t()}catch(e){C(e)}}))}function B(t){var e=t._cleanup;if(void 0!==e&&(t._cleanup=void 0,e))try{if("function"===typeof e)e();else{var A=u(e,"unsubscribe");A&&A.call(e)}}catch(n){C(n)}}function f(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function d(t,e,A){t._state="running";var n=t._observer;try{var r=n?u(n,e):void 0;switch(e){case"next":r&&r.call(n,A);break;case"error":if(f(t),!r)throw A;r.call(n,A);break;case"complete":f(t),r&&r.call(n)}}catch(i){C(i)}"closed"===t._state?B(t):"running"===t._state&&(t._state="ready")}function Q(t,e,A){if("closed"!==t._state)return"buffering"===t._state?(t._queue=t._queue||[],void t._queue.push({type:e,value:A})):"ready"!==t._state?(t._state="buffering",t._queue=[{type:e,value:A}],void h((function(){return function(t){var e=t._queue;if(e){t._queue=void 0,t._state="ready";var A,n=Object(i.a)(e);try{for(n.s();!(A=n.n()).done;){var r=A.value;if(d(t,r.type,r.value),"closed"===t._state)break}}catch(o){n.e(o)}finally{n.f()}}}(t)}))):void d(t,e,A)}var E=function(){function t(e,A){Object(n.a)(this,t),this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new p(this);try{this._cleanup=A.call(void 0,r)}catch(i){r.error(i)}"initializing"===this._state&&(this._state="ready")}return Object(r.a)(t,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(f(this),B(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),t}(),p=function(){function t(e){Object(n.a)(this,t),this._subscription=e}return Object(r.a)(t,[{key:"next",value:function(t){Q(this._subscription,"next",t)}},{key:"error",value:function(t){Q(this._subscription,"error",t)}},{key:"complete",value:function(){Q(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),t}(),y=function(){function t(e){if(Object(n.a)(this,t),!(this instanceof t))throw new TypeError("Observable cannot be called as a function");if("function"!==typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}return Object(r.a)(t,[{key:"subscribe",value:function(t,e,A){return"object"===typeof t&&null!==t||(t={next:t,error:e,complete:A}),new E(t,this._subscriber)}},{key:"pipe",value:function(t){for(var e=this,A=arguments.length,n=new Array(A>1?A-1:0),r=1;r<A;r++)n[r-1]=arguments[r];for(var i=0,o=[t].concat(n);i<o.length;i++){var a=o[i];e=a(e)}return e}},{key:"tap",value:function(e,A,n){var r=this,i="object"!==typeof e||null===e?{next:e,error:A,complete:n}:e;return new t((function(t){return r.subscribe({next:function(e){i.next&&i.next(e),t.next(e)},error:function(e){i.error&&i.error(e),t.error(e)},complete:function(){i.complete&&i.complete(),t.complete()},start:function(t){i.start&&i.start(t)}})}))}},{key:"forEach",value:function(t){var e=this;return new Promise((function(A,n){if("function"===typeof t)var r=e.subscribe({next:function(e){try{t(e,i)}catch(A){n(A),r.unsubscribe()}},error:function(t){n(t)},complete:function(){A(void 0)}});else n(new TypeError(t+" is not a function"));function i(){r.unsubscribe(),A(void 0)}}))}},{key:"map",value:function(t){var e=this;if("function"!==typeof t)throw new TypeError(t+" is not a function");return new(l(this))((function(A){return e.subscribe({next:function(e){var n=e;try{n=t(e)}catch(r){return A.error(r)}A.next(n)},error:function(t){A.error(t)},complete:function(){A.complete()}})}))}},{key:"filter",value:function(t){var e=this;if("function"!==typeof t)throw new TypeError(t+" is not a function");return new(l(this))((function(A){return e.subscribe({next:function(e){try{if(!t(e))return}catch(n){return A.error(n)}A.next(e)},error:function(t){A.error(t)},complete:function(){A.complete()}})}))}},{key:"reduce",value:function(t,e){var A=this;if("function"!==typeof t)throw new TypeError(t+" is not a function");var n=l(this),r=arguments.length>1,i=!1,o=e;return new n((function(e){return A.subscribe({next:function(A){var n=!i;if(i=!0,!n||r)try{o=t(o,A)}catch(a){return e.error(a)}else o=A},error:function(t){e.error(t)},complete:function(){if(!i&&!r)return e.error(new TypeError("Cannot reduce an empty sequence"));e.next(o),e.complete()}})}))}},{key:"concat",value:function(){for(var t=this,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];var r=l(this);return new r((function(e){var n,i=0;return function t(o){n=o.subscribe({next:function(t){e.next(t)},error:function(t){e.error(t)},complete:function(){i===A.length?(n=void 0,e.complete()):t(r.from(A[i++]))}})}(t),function(){n&&(n.unsubscribe(),n=void 0)}}))}},{key:"flatMap",value:function(t){var e=this;if("function"!==typeof t)throw new TypeError(t+" is not a function");var A=l(this);return new A((function(n){var r=[],i=e.subscribe({next:function(e){var i;if(t)try{i=t(e)}catch(s){return n.error(s)}else i=e;var a=A.from(i).subscribe({next:function(t){n.next(t)},error:function(t){n.error(t)},complete:function(){var t=r.indexOf(a);t>=0&&r.splice(t,1),o()}});r.push(a)},error:function(t){n.error(t)},complete:function(){o()}});function o(){i.closed&&0===r.length&&n.complete()}return function(){r.forEach((function(t){return t.unsubscribe()})),i.unsubscribe()}}))}},{key:(Symbol.observable,c),value:function(){return this}}],[{key:"from",value:function(e){var A="function"===typeof this?this:t;if(null==e)throw new TypeError(e+" is not an object");var n=u(e,c);if(n){var r=n.call(e);if(Object(r)!==r)throw new TypeError(r+" is not an object");return function(t){return t instanceof y}(r)&&r.constructor===A?r:new A((function(t){return r.subscribe(t)}))}if(a("iterator")){var o=u(e,g);if(o)return new A((function(t){h((function(){if(!t.closed){var A,n=Object(i.a)(o.call(e));try{for(n.s();!(A=n.n()).done;){var r=A.value;if(t.next(r),t.closed)return}}catch(a){n.e(a)}finally{n.f()}t.complete()}}))}))}if(Array.isArray(e))return new A((function(t){h((function(){if(!t.closed){var A,n=Object(i.a)(e);try{for(n.s();!(A=n.n()).done;){var r=A.value;if(t.next(r),t.closed)return}}catch(o){n.e(o)}finally{n.f()}t.complete()}}))}));throw new TypeError(e+" is not observable")}},{key:"of",value:function(){for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];var r="function"===typeof this?this:t;return new r((function(t){h((function(){if(!t.closed){var e,n=Object(i.a)(A);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(t.next(r),t.closed)return}}catch(o){n.e(o)}finally{n.f()}t.complete()}}))}))}},{key:I,get:function(){return this}}]),t}();o()&&Object.defineProperty(y,Symbol("extensions"),{value:{symbol:c,hostReportError:C},configurable:!0});e.a=y},function(t,e,A){"use strict";var n;A.d(e,"a",(function(){return n})),function(t){t.internalError="internalError",t.message="message",t.termination="termination"}(n||(n={}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return s}));var n=A(5),r=A(4),i=A(19),o=A(741),a=A(60),s=new(function(){function t(){Object(n.a)(this,t),this.stats=new Map}return Object(r.a)(t,[{key:"get",value:function(t){return this.stats.has(t)||this.stats.set(t,new o.a({id:t})),this.stats.get(t)}}]),t}());if(a.global.luma&&"8.4.4"!==a.global.luma.VERSION)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(a.global.luma.VERSION," vs ").concat("8.4.4"));a.global.luma||(Object(a.isBrowser)()&&i.k.log(1,"luma.gl ".concat("8.4.4"," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),a.global.luma=a.global.luma||{VERSION:"8.4.4",version:"8.4.4",log:i.k,stats:s,globals:{modules:{},nodeIO:{}}});a.global.luma},function(t,e,A){var n;!function(r,i,o,a){"use strict";var s,g=["","webkit","Moz","MS","ms","o"],c=i.createElement("div"),I=Math.round,u=Math.abs,l=Date.now;function C(t,e,A){return setTimeout(p(t,A),e)}function h(t,e,A){return!!Array.isArray(t)&&(B(t,A[e],A),!0)}function B(t,e,A){var n;if(t)if(t.forEach)t.forEach(e,A);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(A,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(A,t[n],n,t)}function f(t,e,A){var n="DEPRECATED METHOD: "+e+"\n"+A+" AT \n";return function(){var e=new Error("get-stack-trace"),A=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=r.console&&(r.console.warn||r.console.log);return i&&i.call(r.console,n,A),t.apply(this,arguments)}}s="function"!==typeof Object.assign?function(t){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),A=1;A<arguments.length;A++){var n=arguments[A];if(void 0!==n&&null!==n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}:Object.assign;var d=f((function(t,e,A){for(var n=Object.keys(e),r=0;r<n.length;)(!A||A&&void 0===t[n[r]])&&(t[n[r]]=e[n[r]]),r++;return t}),"extend","Use `assign`."),Q=f((function(t,e){return d(t,e,!0)}),"merge","Use `assign`.");function E(t,e,A){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,A&&s(n,A)}function p(t,e){return function(){return t.apply(e,arguments)}}function y(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function v(t,e){return void 0===t?e:t}function m(t,e,A){B(S(e),(function(e){t.addEventListener(e,A,!1)}))}function b(t,e,A){B(S(e),(function(e){t.removeEventListener(e,A,!1)}))}function F(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function w(t,e){return t.indexOf(e)>-1}function S(t){return t.trim().split(/\s+/g)}function D(t,e,A){if(t.indexOf&&!A)return t.indexOf(e);for(var n=0;n<t.length;){if(A&&t[n][A]==e||!A&&t[n]===e)return n;n++}return-1}function R(t){return Array.prototype.slice.call(t,0)}function U(t,e,A){for(var n=[],r=[],i=0;i<t.length;){var o=e?t[i][e]:t[i];D(r,o)<0&&n.push(t[i]),r[i]=o,i++}return A&&(n=e?n.sort((function(t,A){return t[e]>A[e]})):n.sort()),n}function G(t,e){for(var A,n,r=e[0].toUpperCase()+e.slice(1),i=0;i<g.length;){if((n=(A=g[i])?A+r:e)in t)return n;i++}}var N=1;function k(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var x="ontouchstart"in r,O=void 0!==G(r,"PointerEvent"),M=x&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),L=["x","y"],_=["clientX","clientY"];function J(t,e){var A=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){y(t.options.enable,[t])&&A.handler(e)},this.init()}function T(t,e,A){var n=A.pointers.length,r=A.changedPointers.length,i=1&e&&n-r===0,o=12&e&&n-r===0;A.isFirst=!!i,A.isFinal=!!o,i&&(t.session={}),A.eventType=e,function(t,e){var A=t.session,n=e.pointers,r=n.length;A.firstInput||(A.firstInput=j(e));r>1&&!A.firstMultiple?A.firstMultiple=j(e):1===r&&(A.firstMultiple=!1);var i=A.firstInput,o=A.firstMultiple,a=o?o.center:i.center,s=e.center=H(n);e.timeStamp=l(),e.deltaTime=e.timeStamp-i.timeStamp,e.angle=W(a,s),e.distance=Z(a,s),function(t,e){var A=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},i=t.prevInput||{};1!==e.eventType&&4!==i.eventType||(r=t.prevDelta={x:i.deltaX||0,y:i.deltaY||0},n=t.offsetDelta={x:A.x,y:A.y});e.deltaX=r.x+(A.x-n.x),e.deltaY=r.y+(A.y-n.y)}(A,e),e.offsetDirection=V(e.deltaX,e.deltaY);var g=Y(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=g.x,e.overallVelocityY=g.y,e.overallVelocity=u(g.x)>u(g.y)?g.x:g.y,e.scale=o?(c=o.pointers,I=n,Z(I[0],I[1],_)/Z(c[0],c[1],_)):1,e.rotation=o?function(t,e){return W(e[1],e[0],_)+W(t[1],t[0],_)}(o.pointers,n):0,e.maxPointers=A.prevInput?e.pointers.length>A.prevInput.maxPointers?e.pointers.length:A.prevInput.maxPointers:e.pointers.length,function(t,e){var A,n,r,i,o=t.lastInterval||e,a=e.timeStamp-o.timeStamp;if(8!=e.eventType&&(a>25||void 0===o.velocity)){var s=e.deltaX-o.deltaX,g=e.deltaY-o.deltaY,c=Y(a,s,g);n=c.x,r=c.y,A=u(c.x)>u(c.y)?c.x:c.y,i=V(s,g),t.lastInterval=e}else A=o.velocity,n=o.velocityX,r=o.velocityY,i=o.direction;e.velocity=A,e.velocityX=n,e.velocityY=r,e.direction=i}(A,e);var c,I;var C=t.element;F(e.srcEvent.target,C)&&(C=e.srcEvent.target);e.target=C}(t,A),t.emit("hammer.input",A),t.recognize(A),t.session.prevInput=A}function j(t){for(var e=[],A=0;A<t.pointers.length;)e[A]={clientX:I(t.pointers[A].clientX),clientY:I(t.pointers[A].clientY)},A++;return{timeStamp:l(),pointers:e,center:H(e),deltaX:t.deltaX,deltaY:t.deltaY}}function H(t){var e=t.length;if(1===e)return{x:I(t[0].clientX),y:I(t[0].clientY)};for(var A=0,n=0,r=0;r<e;)A+=t[r].clientX,n+=t[r].clientY,r++;return{x:I(A/e),y:I(n/e)}}function Y(t,e,A){return{x:e/t||0,y:A/t||0}}function V(t,e){return t===e?1:u(t)>=u(e)?t<0?2:4:e<0?8:16}function Z(t,e,A){A||(A=L);var n=e[A[0]]-t[A[0]],r=e[A[1]]-t[A[1]];return Math.sqrt(n*n+r*r)}function W(t,e,A){A||(A=L);var n=e[A[0]]-t[A[0]],r=e[A[1]]-t[A[1]];return 180*Math.atan2(r,n)/Math.PI}J.prototype={handler:function(){},init:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(k(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&b(this.element,this.evEl,this.domHandler),this.evTarget&&b(this.target,this.evTarget,this.domHandler),this.evWin&&b(k(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4};function P(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,J.apply(this,arguments)}E(P,J,{handler:function(t){var e=K[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var q={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 tt(){this.evEl=z,this.evWin=$,J.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(z="MSPointerDown",$="MSPointerMove MSPointerUp MSPointerCancel"),E(tt,J,{handler:function(t){var e=this.store,A=!1,n=t.type.toLowerCase().replace("ms",""),r=q[n],i=X[t.pointerType]||t.pointerType,o="touch"==i,a=D(e,t.pointerId,"pointerId");1&r&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):12&r&&(A=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:i,srcEvent:t}),A&&e.splice(a,1))}});var et={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function At(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,J.apply(this,arguments)}function nt(t,e){var A=R(t.touches),n=R(t.changedTouches);return 12&e&&(A=U(A.concat(n),"identifier",!0)),[A,n]}E(At,J,{handler:function(t){var e=et[t.type];if(1===e&&(this.started=!0),this.started){var A=nt.call(this,t,e);12&e&&A[0].length-A[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:A[0],changedPointers:A[1],pointerType:"touch",srcEvent:t})}}});var rt={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function it(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},J.apply(this,arguments)}function ot(t,e){var A=R(t.touches),n=this.targetIds;if(3&e&&1===A.length)return n[A[0].identifier]=!0,[A,A];var r,i,o=R(t.changedTouches),a=[],s=this.target;if(i=A.filter((function(t){return F(t.target,s)})),1===e)for(r=0;r<i.length;)n[i[r].identifier]=!0,r++;for(r=0;r<o.length;)n[o[r].identifier]&&a.push(o[r]),12&e&&delete n[o[r].identifier],r++;return a.length?[U(i.concat(a),"identifier",!0),a]:void 0}E(it,J,{handler:function(t){var e=rt[t.type],A=ot.call(this,t,e);A&&this.callback(this.manager,e,{pointers:A[0],changedPointers:A[1],pointerType:"touch",srcEvent:t})}});function at(){J.apply(this,arguments);var t=p(this.handler,this);this.touch=new it(this.manager,t),this.mouse=new P(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function st(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,gt.call(this,e)):12&t&&gt.call(this,e)}function gt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var A={x:e.clientX,y:e.clientY};this.lastTouches.push(A);var n=this.lastTouches;setTimeout((function(){var t=n.indexOf(A);t>-1&&n.splice(t,1)}),2500)}}function ct(t){for(var e=t.srcEvent.clientX,A=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],i=Math.abs(e-r.x),o=Math.abs(A-r.y);if(i<=25&&o<=25)return!0}return!1}E(at,J,{handler:function(t,e,A){var n="touch"==A.pointerType,r="mouse"==A.pointerType;if(!(r&&A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents)){if(n)st.call(this,e,A);else if(r&&ct.call(this,A))return;this.callback(t,e,A)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var It=G(c.style,"touchAction"),ut=void 0!==It,lt=function(){if(!ut)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(A){t[A]=!e||r.CSS.supports("touch-action",A)})),t}();function Ct(t,e){this.manager=t,this.set(e)}Ct.prototype={set:function(t){"compute"==t&&(t=this.compute()),ut&&this.manager.element.style&&lt[t]&&(this.manager.element.style[It]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return B(this.manager.recognizers,(function(e){y(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(w(t,"none"))return"none";var e=w(t,"pan-x"),A=w(t,"pan-y");if(e&&A)return"none";if(e||A)return e?"pan-x":"pan-y";if(w(t,"manipulation"))return"manipulation";return"auto"}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,A=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,r=w(n,"none")&&!lt.none,i=w(n,"pan-y")&&!lt["pan-y"],o=w(n,"pan-x")&&!lt["pan-x"];if(r){var a=1===t.pointers.length,s=t.distance<2,g=t.deltaTime<250;if(a&&s&&g)return}if(!o||!i)return r||i&&6&A||o&&24&A?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};function ht(t){this.options=s({},this.defaults,t||{}),this.id=N++,this.manager=null,this.options.enable=v(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Bt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function ft(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function dt(t,e){var A=e.manager;return A?A.get(t):t}function Qt(){ht.apply(this,arguments)}function Et(){Qt.apply(this,arguments),this.pX=null,this.pY=null}function pt(){Qt.apply(this,arguments)}function yt(){ht.apply(this,arguments),this._timer=null,this._input=null}function vt(){Qt.apply(this,arguments)}function mt(){Qt.apply(this,arguments)}function bt(){ht.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ft(t,e){return(e=e||{}).recognizers=v(e.recognizers,Ft.defaults.preset),new wt(t,e)}ht.prototype={defaults:{},set:function(t){return s(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(h(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=dt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return h(t,"dropRecognizeWith",this)||(t=dt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(h(t,"requireFailure",this))return this;var e=this.requireFail;return-1===D(e,t=dt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(h(t,"dropRequireFailure",this))return this;t=dt(t,this);var e=D(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,A=this.state;function n(A){e.manager.emit(A,t)}A<8&&n(e.options.event+Bt(A)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),A>=8&&n(e.options.event+Bt(A))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=s({},t);if(!y(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},E(Qt,ht,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,A=t.eventType,n=6&e,r=this.attrTest(t);return n&&(8&A||!r)?16|e:n||r?4&A?8|e:2&e?4|e:2:32}}),E(Et,Qt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push("pan-y"),24&t&&e.push("pan-x"),e},directionTest:function(t){var e=this.options,A=!0,n=t.distance,r=t.direction,i=t.deltaX,o=t.deltaY;return r&e.direction||(6&e.direction?(r=0===i?1:i<0?2:4,A=i!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?1:o<0?8:16,A=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,A&&n>e.threshold&&r&e.direction},attrTest:function(t){return Qt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=ft(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),E(pt,Qt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),E(yt,ht,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(t){var e=this.options,A=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!n||!A||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=C((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}}),E(vt,Qt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),E(mt,Qt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,A=this.options.direction;return 30&A?e=t.overallVelocity:6&A?e=t.overallVelocityX:24&A&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&A&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&u(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=ft(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),E(bt,ht,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(t){var e=this.options,A=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(n&&r&&A){if(4!=t.eventType)return this.failTimeout();var i=!this.pTime||t.timeStamp-this.pTime<e.interval,o=!this.pCenter||Z(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,o&&i?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=C((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return 32},failTimeout:function(){return this._timer=C((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))}}),Ft.VERSION="2.0.7",Ft.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[vt,{enable:!1}],[pt,{enable:!1},["rotate"]],[mt,{direction:6}],[Et,{direction:6},["swipe"]],[bt],[bt,{event:"doubletap",taps:2},["tap"]],[yt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function wt(t,e){this.options=s({},Ft.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=function(t){var e=t.options.inputClass;return new(e||(O?tt:M?it:x?at:P))(t,T)}(this),this.touchAction=new Ct(this,this.options.touchAction),St(this,!0),B(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function St(t,e){var A,n=t.element;n.style&&(B(t.options.cssProps,(function(r,i){A=G(n.style,i),e?(t.oldCssProps[A]=n.style[A],n.style[A]=r):n.style[A]=t.oldCssProps[A]||""})),e||(t.oldCssProps={}))}wt.prototype={set:function(t){return s(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var A;this.touchAction.preventDefaults(t);var n=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var i=0;i<n.length;)A=n[i],2===e.stopped||r&&A!=r&&!A.canRecognizeWith(r)?A.reset():A.recognize(t),!r&&14&A.state&&(r=e.curRecognizer=A),i++}},get:function(t){if(t instanceof ht)return t;for(var e=this.recognizers,A=0;A<e.length;A++)if(e[A].options.event==t)return e[A];return null},add:function(t){if(h(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(h(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,A=D(e,t);-1!==A&&(e.splice(A,1),this.touchAction.update())}return this},on:function(t,e){if(void 0!==t&&void 0!==e){var A=this.handlers;return B(S(t),(function(t){A[t]=A[t]||[],A[t].push(e)})),this}},off:function(t,e){if(void 0!==t){var A=this.handlers;return B(S(t),(function(t){e?A[t]&&A[t].splice(D(A[t],e),1):delete A[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var A=i.createEvent("Event");A.initEvent(t,!0,!0),A.gesture=e,e.target.dispatchEvent(A)}(t,e);var A=this.handlers[t]&&this.handlers[t].slice();if(A&&A.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<A.length;)A[n](e),n++}},destroy:function(){this.element&&St(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},s(Ft,{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:wt,Input:J,TouchAction:Ct,TouchInput:it,MouseInput:P,PointerEventInput:tt,TouchMouseInput:at,SingleTouchInput:At,Recognizer:ht,AttrRecognizer:Qt,Tap:bt,Pan:Et,Swipe:mt,Pinch:pt,Rotate:vt,Press:yt,on:m,off:b,each:B,merge:Q,extend:d,assign:s,inherit:E,bindFn:p,prefixed:G}),("undefined"!==typeof r?r:"undefined"!==typeof self?self:{}).Hammer=Ft,void 0===(n=function(){return Ft}.call(e,A,e,t))||(t.exports=n)}(window,document)},function(t,e,A){"use strict";var n,r="object"===typeof Reflect?Reflect:null,i=r&&"function"===typeof r.apply?r.apply:function(t,e,A){return Function.prototype.apply.call(t,e,A)};n=r&&"function"===typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!==t};function a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function g(t){if("function"!==typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function I(t,e,A,n){var r,i,o,a;if(g(A),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,A.listener?A.listener:A),i=t._events),o=i[e]),void 0===o)o=i[e]=A,++t._eventsCount;else if("function"===typeof o?o=i[e]=n?[A,o]:[o,A]:n?o.unshift(A):o.push(A),(r=c(t))>0&&o.length>r&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=o.length,a=s,console&&console.warn&&console.warn(a)}return t}function u(){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 l(t,e,A){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:A},r=u.bind(n);return r.listener=A,n.wrapFn=r,r}function C(t,e,A){var n=t._events;if(void 0===n)return[];var r=n[e];return void 0===r?[]:"function"===typeof r?A?[r.listener||r]:[r]:A?function(t){for(var e=new Array(t.length),A=0;A<e.length;++A)e[A]=t[A].listener||t[A];return e}(r):B(r,r.length)}function h(t){var e=this._events;if(void 0!==e){var A=e[t];if("function"===typeof A)return 1;if(void 0!==A)return A.length}return 0}function B(t,e){for(var A=new Array(e),n=0;n<e;++n)A[n]=t[n];return A}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!==typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),a.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},a.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(t){for(var e=[],A=1;A<arguments.length;A++)e.push(arguments[A]);var n="error"===t,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=r[t];if(void 0===s)return!1;if("function"===typeof s)i(s,this,e);else{var g=s.length,c=B(s,g);for(A=0;A<g;++A)i(c[A],this,e)}return!0},a.prototype.addListener=function(t,e){return I(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return I(this,t,e,!0)},a.prototype.once=function(t,e){return g(e),this.on(t,l(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return g(e),this.prependListener(t,l(this,t,e)),this},a.prototype.removeListener=function(t,e){var A,n,r,i,o;if(g(e),void 0===(n=this._events))return this;if(void 0===(A=n[t]))return this;if(A===e||A.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,A.listener||e));else if("function"!==typeof A){for(r=-1,i=A.length-1;i>=0;i--)if(A[i]===e||A[i].listener===e){o=A[i].listener,r=i;break}if(r<0)return this;0===r?A.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(A,r),1===A.length&&(n[t]=A[0]),void 0!==n.removeListener&&this.emit("removeListener",t,o||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,A,n;if(void 0===(A=this._events))return this;if(void 0===A.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==A[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete A[t]),this;if(0===arguments.length){var r,i=Object.keys(A);for(n=0;n<i.length;++n)"removeListener"!==(r=i[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"===typeof(e=A[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return C(this,t,!0)},a.prototype.rawListeners=function(t){return C(this,t,!1)},a.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,A){"use strict";A.d(e,"a",(function(){return f}));var n=A(1),r=A(5),i=A(4),o=A(56),a=A(14),s=A(16),g=A(7),c=A(115),I=A(72),u=A(38),l=A(39);function C(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function h(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?C(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):C(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function B(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}var f=function(t){Object(a.a)(A,t);var e=B(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,A);var i=n.latitude,a=void 0===i?0:i,s=n.longitude,g=void 0===s?0:s,c=n.zoom,u=void 0===c?11:c,C=n.pitch,h=void 0===C?0:C,B=n.bearing,f=void 0===B?0:B,d=n.nearZMultiplier,Q=void 0===d?.1:d,E=n.farZMultiplier,p=void 0===E?1.01:E,y=n.orthographic,v=void 0!==y&&y,m=n.repeat,b=void 0!==m&&m,F=n.worldOffset,w=void 0===F?0:F,S=n.width,D=n.height,R=n.altitude,U=void 0===R?1.5:R,G=Math.pow(2,u);S=S||1,D=D||1,U=Math.max(.75,U);var N=Object(I.h)({width:S,height:D,pitch:h,altitude:U,nearZMultiplier:Q,farZMultiplier:p}),k=N.fov,x=N.aspect,O=N.focalDistance,M=N.near,L=N.far,_=Object(I.i)({height:D,pitch:h,bearing:f,scale:G,altitude:U});if(w){var J=(new l.a).translate([512*w,0,0]);_=J.multiplyLeft(_)}var T=Object.assign({},n,{width:S,height:D,viewMatrix:_,longitude:g,latitude:a,zoom:u,orthographic:v,fovyRadians:k,aspect:x,focalDistance:v?O:1,near:M,far:L});return(t=e.call(this,T)).latitude=a,t.longitude=g,t.zoom=u,t.pitch=h,t.bearing=f,t.altitude=U,t.orthographic=v,t._subViewports=b?[]:null,Object.freeze(Object(o.a)(t)),t}return Object(i.a)(A,[{key:"addMetersToLngLat",value:function(t,e){return Object(I.a)(t,e)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e=t.lngLat,A=t.pos,n=Object(I.l)(A,this.pixelUnprojectionMatrix),r=this.projectFlat(e),i=u.a([],r,u.d([],n)),o=u.a([],this.center,i);return this.unprojectFlat(o)}},{key:"getBounds",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(I.d)(this,t.z||0);return[Math.min(e[0][0],e[1][0],e[2][0],e[3][0]),Math.min(e[0][1],e[1][1],e[2][1],e[3][1]),Math.max(e[0][0],e[1][0],e[2][0],e[3][0]),Math.max(e[0][1],e[1][1],e[2][1],e[3][1])]}},{key:"fitBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.width,r=this.height,i=Object(I.b)(Object.assign({width:n,height:r,bounds:t},e)),o=i.longitude,a=i.latitude,s=i.zoom;return new A({width:n,height:r,longitude:o,latitude:a,zoom:s})}},{key:"subViewports",get:function(){if(this._subViewports&&!this._subViewports.length)for(var t=this.getBounds(),e=Math.floor((t[0]+180)/360),n=Math.ceil((t[2]-180)/360),r=e;r<=n;r++){var i=r?new A(h(h({},this),{},{worldOffset:r})):this;this._subViewports.push(i)}return this._subViewports}}]),A}(c.a);f.displayName="WebMercatorViewport"},function(t,e,A){"use strict";A.d(e,"a",(function(){return d})),A.d(e,"b",(function(){return Q}));var n=A(5),r=A(4),i=A(14),o=A(16),a=A(7),s=A(39),g=A(170),c=A(284),I=A(155),u=A(143),l=A(99);function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var h={orbitAxis:"Z",rotationX:0,rotationOrbit:0,zoom:0,target:[0,0,0],minRotationX:-90,maxRotationX:90,minZoom:-1/0,maxZoom:1/0},B={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new I.a(["target","zoom","rotationX","rotationOrbit"]),transitionInterruption:u.a.BREAK},f=function(t){return Math.pow(2,t)},d=function(t){Object(i.a)(A,t);var e=C(A);function A(t){var r,i=t.makeViewport,o=t.width,a=t.height,s=t.orbitAxis,g=void 0===s?h.orbitAxis:s,c=t.rotationX,I=void 0===c?h.rotationX:c,u=t.rotationOrbit,l=void 0===u?h.rotationOrbit:u,C=t.target,B=void 0===C?h.target:C,f=t.zoom,d=void 0===f?h.zoom:f,Q=t.minRotationX,E=void 0===Q?h.minRotationX:Q,p=t.maxRotationX,y=void 0===p?h.maxRotationX:p,v=t.minZoom,m=void 0===v?h.minZoom:v,b=t.maxZoom,F=void 0===b?h.maxZoom:b,w=t.startPanPosition,S=t.startTarget,D=t.startRotatePos,R=t.startRotationX,U=t.startRotationOrbit,G=t.startZoomPosition,N=t.startZoom;return Object(n.a)(this,A),(r=e.call(this,{width:o,height:a,orbitAxis:g,rotationX:I,rotationOrbit:l,target:B,zoom:d,minRotationX:E,maxRotationX:y,minZoom:m,maxZoom:F}))._state={startPanPosition:w,startTarget:S,startRotatePos:D,startRotationX:R,startRotationOrbit:U,startZoomPosition:G,startZoom:N},r.makeViewport=i,r}return Object(r.a)(A,[{key:"panStart",value:function(t){var e=t.pos,A=this._viewportProps.target;return this._getUpdatedState({startPanPosition:e,startTarget:A})}},{key:"pan",value:function(t){var e=t.pos,A=(t.startPos,this._state),n=A.startPanPosition,r=A.startTarget,i=new s.b(e).subtract(n);return this._getUpdatedState({target:this._calculateNewTarget({startTarget:r,pixelOffset:i})})}},{key:"panEnd",value:function(){return this._getUpdatedState({startPanPosition:null,startTarget:null})}},{key:"rotateStart",value:function(t){var e=t.pos;return this._getUpdatedState({startRotatePos:e,startRotationX:this._viewportProps.rotationX,startRotationOrbit:this._viewportProps.rotationOrbit})}},{key:"rotate",value:function(t){var e,A=t.pos,n=t.deltaAngleX,r=void 0===n?0:n,i=t.deltaAngleY,o=void 0===i?0:i,a=this._state,s=a.startRotatePos,g=a.startRotationX,c=a.startRotationOrbit,I=this._viewportProps,u=I.width,l=I.height;if(!s||!Number.isFinite(g)||!Number.isFinite(c))return this;if(A){var C=(A[0]-s[0])/u;(g<-90||g>90)&&(C*=-1),e={rotationX:g+180*((A[1]-s[1])/l),rotationOrbit:c+180*C}}else e={rotationX:g+o,rotationOrbit:c+r};return this._getUpdatedState(e)}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),A=Object.assign({},this._viewportProps),n=A.rotationOrbit;return Math.abs(n-e.rotationOrbit)>180&&(A.rotationOrbit=n<0?n+360:n-360),A}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedState({startZoomPosition:e,startTarget:this._viewportProps.target,startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,A=t.startPos,n=t.scale,r=this._viewportProps,i=r.zoom,o=r.width,a=r.height,s=r.target,g=this._state,c=g.startZoom,I=g.startZoomPosition,u=g.startTarget;Number.isFinite(c)||(c=i,u=s,I=A||e);var l=this._calculateNewZoom({scale:n,startZoom:c}),C=f(c),h=f(l),B=(o/2-I[0])*(h/C-1),d=(a/2-I[1])*(h/C-1);return this._getUpdatedState({zoom:l,target:this._calculateNewTarget({startTarget:u,zoom:l,pixelOffset:[B,d]})})}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomPosition:null,startTarget:null,startZoom:null})}},{key:"zoomIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._getUpdatedState({zoom:this._calculateNewZoom({scale:t})})}},{key:"zoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._getUpdatedState({zoom:this._calculateNewZoom({scale:1/t})})}},{key:"moveLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=[-t,0];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=[t,0];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=[0,-t];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"moveDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,e=[0,t];return this._getUpdatedState({target:this._calculateNewTarget({pixelOffset:e})})}},{key:"rotateLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({rotationOrbit:this._viewportProps.rotationOrbit-t})}},{key:"rotateRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({rotationOrbit:this._viewportProps.rotationOrbit+t})}},{key:"rotateUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({rotationX:this._viewportProps.rotationX-t})}},{key:"rotateDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({rotationX:this._viewportProps.rotationX+t})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,A=t.startZoom,n=this._viewportProps,r=n.maxZoom,i=n.minZoom;Number.isFinite(A)||(A=this._viewportProps.zoom);var o=A+Math.log2(e);return Object(s.e)(o,i,r)}},{key:"_calculateNewTarget",value:function(t){var e=t.startTarget,A=t.zoom,n=t.pixelOffset,r=Object.assign({},this._viewportProps);Number.isFinite(A)&&(r.zoom=A),e&&(r.target=e);var i=this.makeViewport(r),o=i.project(r.target);return i.unproject([o[0]-n[0],o[1]-n[1],o[2]])}},{key:"_getUpdatedState",value:function(t){return new A(Object.assign({},this._viewportProps,this._state,t))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,A=t.minZoom,n=t.zoom,r=t.maxRotationX,i=t.minRotationX,o=t.rotationOrbit;return t.zoom=Object(s.e)(n,A,e),t.rotationX=Object(s.e)(t.rotationX,i,r),(o<-180||o>180)&&(t.rotationOrbit=Object(l.e)(o+180,360)-180),t}}]),A}(c.a),Q=function(t){Object(i.a)(A,t);var e=C(A);function A(t){return Object(n.a)(this,A),e.call(this,d,t)}return Object(r.a)(A,[{key:"_getTransitionProps",value:function(){return B}}]),A}(g.a)},function(t,e,A){"use strict";var n=A(22),r=A(5),i=A(4),o=A(14),a=A(16),s=A(7),g=A(40),c=A(403),I=A(1),u=A(103),l=A(39),C=A(148);function h(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var B=function(t){Object(o.a)(A,t);var e=h(A);function A(){return Object(r.a)(this,A),e.apply(this,arguments)}return Object(i.a)(A,[{key:"_onUpdate",value:function(){var t=this.time,e=this.settings,A=e.fromValue,n=e.toValue,r=e.duration,i=(0,e.easing)(t/r);this._value=Object(l.g)(A,n,i)}},{key:"value",get:function(){return this._value}}]),A}(C.a);function f(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}function d(t,e,A,n,r){var i=e-t;return(A-e)*r+-i*n+i+e}function Q(t,e){if(Array.isArray(t)){for(var A=0,n=0;n<t.length;n++){var r=t[n]-e[n];A+=r*r}return Math.sqrt(A)}return Math.abs(t-e)}var E=function(t){Object(o.a)(A,t);var e=f(A);function A(){return Object(r.a)(this,A),e.apply(this,arguments)}return Object(i.a)(A,[{key:"_onUpdate",value:function(){var t=this.settings,e=t.fromValue,A=t.toValue,n=t.damping,r=t.stiffness,i=this._prevValue,o=void 0===i?e:i,a=this._currValue,s=void 0===a?e:a,g=function(t,e,A,n,r){if(Array.isArray(A)){for(var i=[],o=0;o<A.length;o++)i[o]=d(t[o],e[o],A[o],n,r);return i}return d(t,e,A,n,r)}(o,s,A,n,r),c=Q(g,A),I=Q(g,s);c<1e-5&&I<1e-5&&(g=A,this.end()),this._prevValue=s,this._currValue=g}},{key:"value",get:function(){return this._currValue}}]),A}(C.a),p=A(43);function y(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return v(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return v(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function m(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function b(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?m(Object(A),!0).forEach((function(e){Object(I.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):m(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var F,w={interpolation:B,spring:E},S=function(){function t(e){Object(r.a)(this,t),this.transitions=new Map,this.timeline=e}return Object(i.a)(t,[{key:"add",value:function(t,e,A,n){var r=this.transitions;if(r.has(t)){var i=r.get(t),o=i.value;e=void 0===o?i.settings.fromValue:o,this.remove(t)}if(n=Object(u.e)(n)){var a=w[n.type];if(a){var s=new a(this.timeline);s.start(b(b({},n),{},{fromValue:e,toValue:A})),r.set(t,s)}else p.a.error("unsupported transition type '".concat(n.type,"'"))()}}},{key:"remove",value:function(t){var e=this.transitions;e.has(t)&&(e.get(t).cancel(),e.delete(t))}},{key:"update",value:function(){var t,e={},A=y(this.transitions);try{for(A.s();!(t=A.n()).done;){var r=Object(n.a)(t.value,2),i=r[0],o=r[1];o.update(),e[i]=o.value,o.inProgress||this.remove(i)}}catch(a){A.e(a)}finally{A.f()}return e}},{key:"clear",value:function(){var t,e=y(this.transitions.keys());try{for(e.s();!(t=e.n()).done;){var A=t.value;this.remove(A)}}catch(n){e.e(n)}finally{e.f()}}},{key:"active",get:function(){return this.transitions.size>0}}]),t}(),D=A(338),R=A(396),U=A(79),G=A(19),N=A(55),k=A(187),x=A(395),O=A(340),M=A(139),L=A(80),_=A(124),J=A(26),T=A(233);function j(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function H(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?j(Object(A),!0).forEach((function(e){Object(I.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):j(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var Y=(F={},Object(I.a)(F,10241,9987),Object(I.a)(F,10240,9729),Object(I.a)(F,10242,33071),Object(I.a)(F,10243,33071),F),V={};var Z={boolean:{validate:function(t,e){return!0},equal:function(t,e,A){return Boolean(t)===Boolean(e)}},number:{validate:function(t,e){return Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)}},color:{validate:function(t,e){return e.optional&&!t||q(t)&&(3===t.length||4===t.length)},equal:function(t,e,A){return W(t,e)}},accessor:{validate:function(t,e){var A=X(t);return"function"===A||A===X(e.value)},equal:function(t,e,A){return"function"===typeof e||W(t,e)}},array:{validate:function(t,e){return e.optional&&!t||q(t)},equal:function(t,e,A){return A.compare?W(t,e):t===e}},function:{validate:function(t,e){return e.optional&&!t||"function"===typeof t},equal:function(t,e,A){return!A.compare||t===e}},data:{transform:function(t,e,A){var n=(A?A.props:{}).dataTransform;return n&&t?n(t):t}},image:{transform:function(t,e,A){return function(t,e){var A=t.context&&t.context.gl;if(!A||!e)return null;if(e instanceof T.a)return e;e.constructor&&"Object"!==e.constructor.name&&(e={data:e});var n=null;e.compressed&&(n=Object(I.a)({},10241,e.data.length>1?9985:9729));var r=new T.a(A,H(H({},e),{},{parameters:H(H(H({},Y),n),t.props.textureParameters)}));return V[r.id]=!0,r}(A,t)},release:function(t){var e;(e=t)&&e instanceof T.a&&V[e.id]&&(e.delete(),delete V[e.id])}}};function W(t,e){if(t===e)return!0;if(!q(t)||!q(e))return!1;var A=t.length;if(A!==e.length)return!1;for(var n=0;n<A;n++)if(t[n]!==e[n])return!1;return!0}function K(t,e){switch(X(e)){case"object":return P(t,e);case"array":return P(t,{type:"array",value:e,compare:!1});case"boolean":return P(t,{type:"boolean",value:e});case"number":return P(t,{type:"number",value:e});case"function":return P(t,{type:"function",value:e,compare:!0});default:return{name:t,type:"unknown",value:e}}}function P(t,e){return"type"in e?Object.assign({name:t},Z[e.type],e):"value"in e?Object.assign({name:t,type:X(e.value)},e):{name:t,type:"object",value:e}}function q(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function X(t){return q(t)?"array":null===t?"null":Object(J.a)(t)}function z(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return $(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return $(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var tt=L.b.COMPONENT,et=L.b.ASYNC_ORIGINAL,At=L.b.ASYNC_RESOLVED,nt=L.b.ASYNC_DEFAULTS;function rt(){var t=this,e=it(t.constructor),A=Object.create(e);A[tt]=t,A[et]={},A[At]={};for(var n=0;n<arguments.length;++n){var r=arguments[n];for(var i in r)A[i]=r[i]}return Object.freeze(A),A}function it(t){var e=st(t,"_mergedDefaultProps");return e||(function(t){if(!t.prototype)return;var e=Object.getPrototypeOf(t),A=it(e),r=function(t){for(var e={},A={},r={},i=0,o=Object.entries(t);i<o.length;i++){var a=Object(n.a)(o[i],2),s=a[0],g=a[1];if(g&&g.deprecatedFor)r[s]=Array.isArray(g.deprecatedFor)?g.deprecatedFor:[g.deprecatedFor];else{var c=K(s,g);e[s]=c,A[s]=c.value}}return{propTypes:e,defaultProps:A,deprecatedProps:r}}(st(t,"defaultProps")||{}),i=function(t,e,A){var n=Object.create(null);Object.assign(n,e,t);var r=function(t){var e=st(t,"layerName")||st(t,"componentName");e||p.a.once(0,"".concat(t.name,".componentName not specified"))();return e||t.name}(A);return delete t.id,Object.defineProperties(n,{id:{writable:!0,value:r}}),n}(r.defaultProps,A,t),o=Object.assign({},e._propTypes,r.propTypes);!function(t,e){var A={},n={};for(var r in e){var i=e[r],o=i.name,a=i.value;i.async&&(A[o]=a,n[o]=ot(o))}t[nt]=A,t[et]={},Object.defineProperties(t,n)}(i,o);var a=Object.assign({},e._deprecatedProps,r.deprecatedProps);(function(t,e){var A=function(A){Object.defineProperty(t,A,{enumerable:!1,set:function(t){var n,r="".concat(this.id,": ").concat(A),i=z(e[A]);try{for(i.s();!(n=i.n()).done;){var o=n.value;at(this,o)||(this[o]=t)}}catch(a){i.e(a)}finally{i.f()}p.a.deprecated(r,e[A].join("/"))()}})};for(var n in e)A(n)})(i,a),t._mergedDefaultProps=i,t._propTypes=o,t._deprecatedProps=a}(t),t._mergedDefaultProps)}function ot(t){return{enumerable:!0,set:function(e){"string"===typeof e||e instanceof Promise||Object(_.c)(e)?this[et][t]=e:this[At][t]=e},get:function(){if(this[At]){if(t in this[At])return this[At][t]||this[nt][t];if(t in this[et]){var e=this[tt]&&this[tt].internalState;if(e&&e.hasAsyncProp(t))return e.getAsyncProp(t)||this[nt][t]}}return this[nt][t]}}}function at(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function st(t,e){return at(t,e)&&t[e]}var gt=A(6),ct=A.n(gt),It=A(11),ut=A(110),lt=L.b.ASYNC_ORIGINAL,Ct=L.b.ASYNC_RESOLVED,ht=L.b.ASYNC_DEFAULTS,Bt=Object.freeze({}),ft=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(r.a)(this,t),this.component=e,this.asyncProps={},this.onAsyncPropUpdated=function(){},this.oldProps=Bt,this.oldAsyncProps=null}return Object(i.a)(t,[{key:"finalize",value:function(){for(var t in this.asyncProps){var e=this.asyncProps[t];e.type&&e.type.release&&e.type.release(e.resolvedValue,e.type,this.component)}}},{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 t in this.oldProps=this.oldProps||this.component.props,this.oldAsyncProps=Object.create(this.oldProps),this.asyncProps)Object.defineProperty(this.oldAsyncProps,t,{enumerable:!0,value:this.oldProps[t]})}},{key:"hasAsyncProp",value:function(t){return t in this.asyncProps}},{key:"getAsyncProp",value:function(t){var e=this.asyncProps[t];return e&&e.resolvedValue}},{key:"isAsyncPropLoading",value:function(t){if(t){var e=this.asyncProps[t];return Boolean(e&&e.pendingLoadCount>0&&e.pendingLoadCount!==e.resolvedLoadCount)}for(var A in this.asyncProps)if(this.isAsyncPropLoading(A))return!0;return!1}},{key:"reloadAsyncProp",value:function(t,e){this._watchPromise(t,Promise.resolve(e))}},{key:"setAsyncProps",value:function(t){var e=t[Ct]||{},A=t[lt]||t,n=t[ht]||{};for(var r in e){var i=e[r];this._createAsyncPropData(r,n[r]),this._updateAsyncProp(r,i),e[r]=this.getAsyncProp(r)}for(var o in A){var a=A[o];this._createAsyncPropData(o,n[o]),this._updateAsyncProp(o,a)}}},{key:"_updateAsyncProp",value:function(t,e){if(this._didAsyncInputValueChange(t,e)){if("string"===typeof e){var A=this.layer&&this.layer.props.fetch;A&&(e=A(e,{propName:t,layer:this.layer}))}e instanceof Promise?this._watchPromise(t,e):Object(_.c)(e)?this._resolveAsyncIterable(t,e):this._setPropValue(t,e)}}},{key:"_didAsyncInputValueChange",value:function(t,e){var A=this.asyncProps[t];return e!==A.resolvedValue&&e!==A.lastValue&&(A.lastValue=e,!0)}},{key:"_setPropValue",value:function(t,e){var A=this.asyncProps[t];e=this._postProcessValue(A,e),A.resolvedValue=e,A.pendingLoadCount++,A.resolvedLoadCount=A.pendingLoadCount}},{key:"_setAsyncPropValue",value:function(t,e,A){var n=this.asyncProps[t];n&&A>=n.resolvedLoadCount&&void 0!==e&&(this.freezeAsyncOldProps(),n.resolvedValue=e,n.resolvedLoadCount=A,this.onAsyncPropUpdated(t,e))}},{key:"_watchPromise",value:function(t,e){var A=this,n=this.asyncProps[t];n.pendingLoadCount++;var r=n.pendingLoadCount;e.then((function(e){e=A._postProcessValue(n,e),A._setAsyncPropValue(t,e,r);var i=A.layer&&A.layer.props.onDataLoad;"data"===t&&i&&i(e,{propName:t,layer:A.layer})})).catch((function(t){return p.a.error(t)()}))}},{key:"_resolveAsyncIterable",value:function(){var t=Object(It.a)(ct.a.mark((function t(e,A){var n,r,i,o,a,s,g,c,I,u,l,C,h,B;return ct.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"data"!==e&&this._setPropValue(e,A),(n=this.asyncProps[e]).pendingLoadCount++,r=n.pendingLoadCount,i=[],o=0,a=!0,s=!1,t.prev=8,c=Object(ut.a)(A);case 10:return t.next=12,c.next();case 12:return I=t.sent,a=I.done,t.next=16,I.value;case 16:if(u=t.sent,a){t.next=27;break}l=u,C=this.component?this.component.props:{},h=C.dataTransform,i=h?h(l,i):i.concat(l),Object.defineProperty(i,"__diff",{enumerable:!1,value:[{startRow:o,endRow:i.length}]}),o=i.length,this._setAsyncPropValue(e,i,r);case 24:a=!0,t.next=10;break;case 27:t.next=33;break;case 29:t.prev=29,t.t0=t.catch(8),s=!0,g=t.t0;case 33:if(t.prev=33,t.prev=34,a||null==c.return){t.next=38;break}return t.next=38,c.return();case 38:if(t.prev=38,!s){t.next=41;break}throw g;case 41:return t.finish(38);case 42:return t.finish(33);case 43:(B=this.layer&&this.layer.props.onDataLoad)&&B(i,{propName:e,layer:this.layer});case 45:case"end":return t.stop()}}),t,this,[[8,29,33,43],[34,,38,42]])})));return function(e,A){return t.apply(this,arguments)}}()},{key:"_postProcessValue",value:function(t,e){var A=t.type;return A&&(A.release&&A.release(t.resolvedValue,A,this.component),A.transform)?A.transform(e,A,this.component):e}},{key:"_createAsyncPropData",value:function(t,e){if(!this.asyncProps[t]){var A=this.component&&this.component.constructor._propTypes;this.asyncProps[t]={type:A&&A[t],lastValue:null,resolvedValue:e,pendingLoadCount:0,resolvedLoadCount:0}}}}]),t}(),dt=L.b.ASYNC_ORIGINAL,Qt=L.b.ASYNC_RESOLVED,Et=L.b.ASYNC_DEFAULTS,pt=0,yt=function(){function t(){Object(r.a)(this,t),this.props=rt.apply(this,arguments),this.id=this.props.id,this.count=pt++,this.lifecycle=L.a.NO_STATE,this.parent=null,this.context=null,this.state=null,this.internalState=null,Object.seal(this)}return Object(i.a)(t,[{key:"clone",value:function(t){var e=this.props,A={};for(var n in e[Et])n in e[Qt]?A[n]=e[Qt][n]:n in e[dt]&&(A[n]=e[dt][n]);return new this.constructor(Object.assign({},e,A,t))}},{key:"_initState",value:function(){this.internalState=new ft({})}},{key:"stats",get:function(){return this.internalState.stats}}]),t}();function vt(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}yt.componentName="Component",yt.defaultProps={};var mt=function(t){Object(o.a)(A,t);var e=vt(A);function A(t){var n,i=t.attributeManager,o=t.layer;return Object(r.a)(this,A),(n=e.call(this,o)).attributeManager=i,n.model=null,n.needsRedraw=!0,n.subLayers=null,n.usesPickingColorCache=!1,n}return Object(i.a)(A,[{key:"layer",get:function(){return this.component},set:function(t){this.component=t}}]),A}(ft),bt=A(72),Ft=A(969);function wt(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return St(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return St(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function St(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Dt(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return xt}));var Rt=Math.pow(2,24)-1,Ut=Object.freeze([]),Gt=Object(k.a)((function(t){var e=t.oldViewport,A=t.viewport;return e.equals(A)})),Nt=new Uint8ClampedArray(0),kt={data:{type:"data",value:Ut,async:!0},dataComparator:null,_dataDiff:{type:"function",value:function(t){return t&&t.__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(t,e){var A=e.propName,n=e.layer,r=n.context.resourceManager,i=n.getLoadOptions(),o=n.props.loaders,a=r.contains(t);return a||i||(r.add({resourceId:t,data:Object(Ft.a)(t,o),persistent:!1}),a=!0),a?r.subscribe({resourceId:t,onChange:function(t){return n.internalState.reloadAsyncProp(A,t)},consumerId:n.id,requestId:A}):Object(Ft.a)(t,o,i)},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:g.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:{},transitions:null,extensions:[],loaders:{type:"array",value:[],optional:!0,compare:!0},getPolygonOffset:{type:"function",value:function(t){return[0,100*-t.layerIndex]},compare:!1},highlightedObjectIndex:-1,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}},xt=function(t){Object(o.a)(A,t);var e=Dt(A);function A(){return Object(r.a)(this,A),e.apply(this,arguments)}return Object(i.a)(A,[{key:"toString",value:function(){var t=this.constructor.layerName||this.constructor.name;return"".concat(t,"({id: '").concat(this.props.id,"'})")}},{key:"setState",value:function(t){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,t),this.setNeedsRedraw()}},{key:"setNeedsRedraw",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.internalState&&(this.internalState.needsRedraw=t)}},{key:"setNeedsUpdate",value:function(){this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0}},{key:"getNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};return this._getNeedsRedraw(t)}},{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(t){var e=this.context.viewport,A=Object(O.a)(t,{viewport:e,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),r=Object(bt.n)(A,e.pixelProjectionMatrix),i=Object(n.a)(r,3),o=i[0],a=i[1],s=i[2];return 2===t.length?[o,a]:[o,a,s]}},{key:"unproject",value:function(t){return this.context.viewport.unproject(t)}},{key:"projectPosition",value:function(t){return Object(O.b)(t,{viewport:this.context.viewport,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem})}},{key:"use64bitPositions",value:function(){var t=this.props.coordinateSystem;return t===g.a.DEFAULT||t===g.a.LNGLAT||t===g.a.CARTESIAN}},{key:"onHover",value:function(t,e){return!!this.props.onHover&&this.props.onHover(t,e)}},{key:"onClick",value:function(t,e){return!!this.props.onClick&&this.props.onClick(t,e)}},{key:"nullPickingColor",value:function(){return[0,0,0]}},{key:"encodePickingColor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e[0]=t+1&255,e[1]=t+1>>8&255,e[2]=t+1>>8>>8&255,e}},{key:"decodePickingColor",value:function(t){Object(N.a)(t instanceof Uint8Array);var e=Object(n.a)(t,3);return e[0]+256*e[1]+65536*e[2]-1}},{key:"initializeState",value:function(){throw new Error("Layer ".concat(this," has not defined initializeState"))}},{key:"getShaders",value:function(t){var e,A=wt(this.props.extensions);try{for(A.s();!(e=A.n()).done;){var n=e.value;t=Object(x.a)(t,n.getShaders.call(this,n))}}catch(r){A.e(r)}finally{A.f()}return t}},{key:"shouldUpdateState",value:function(t){t.oldProps,t.props,t.context;return t.changeFlags.propsOrDataChanged}},{key:"updateState",value:function(t){var e=t.oldProps,A=t.props,n=(t.context,t.changeFlags),r=this.getAttributeManager();if(n.dataChanged&&r){var i=n.dataChanged;if(Array.isArray(i)){var o,a=wt(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;r.invalidateAll(s)}}catch(h){a.e(h)}finally{a.f()}}else r.invalidateAll()}var g=e.highlightedObjectIndex>=0||e.pickable,c=A.highlightedObjectIndex>=0||A.pickable;if(g!==c&&r){var I=r.attributes,u=I.pickingColors,l=I.instancePickingColors,C=u||l;C&&(c&&C.constant&&(C.constant=!1,r.invalidate(C.id)),C.value||c||(C.constant=!0,C.value=[0,0,0]))}}},{key:"finalizeState",value:function(){var t,e=wt(this.getModels());try{for(e.s();!(t=e.n()).done;){t.value.delete()}}catch(n){e.e(n)}finally{e.f()}var A=this.getAttributeManager();A&&A.finalize(),this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState.uniformTransitions.clear(),this.internalState.finalize()}},{key:"draw",value:function(t){var e,A=wt(this.getModels());try{for(A.s();!(e=A.n()).done;){e.value.draw(t)}}catch(n){A.e(n)}finally{A.f()}}},{key:"getPickingInfo",value:function(t){var e=t.info,A=(t.mode,e.index);return A>=0&&Array.isArray(this.props.data)&&(e.object=this.props.data[A]),e}},{key:"activateViewport",value:function(t){var e=this.internalState.viewport;this.internalState.viewport=t,e&&Gt({oldViewport:e,viewport:t})||(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}},{key:"invalidateAttribute",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",e=(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.getAttributeManager());e&&("all"===t?e.invalidateAll():e.invalidate(t))}},{key:"updateAttributes",value:function(t){var e,A=wt(this.getModels());try{for(A.s();!(e=A.n()).done;){var n=e.value;this._setModelAttributes(n,t)}}catch(r){A.e(r)}finally{A.f()}}},{key:"_updateAttributes",value:function(t){var e=this.getAttributeManager();if(e){var A=this.getNumInstances(t),n=this.getStartIndices(t);e.update({data:t.data,numInstances:A,startIndices:n,props:t,transitions:t.transitions,buffers:t.data.attributes,context:this,ignoreUnknownAttributes:!0});var r=e.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(r)}}},{key:"_updateAttributeTransition",value:function(){var t=this.getAttributeManager();t&&t.updateTransition()}},{key:"_updateUniformTransition",value:function(){var t=this.internalState.uniformTransitions;if(t.active){var e=t.update(),A=Object.create(this.props);for(var n in e)Object.defineProperty(A,n,{value:e[n]});return A}return this.props}},{key:"calculateInstancePickingColors",value:function(t,e){var A=e.numInstances;if(!t.constant){var n=Nt.length/3;if(this.internalState.usesPickingColorCache=!0,n<A){A>Rt&&p.a.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")();for(var r=(Nt=M.a.allocate(Nt,A,{size:3,copy:!0,maxCount:Math.max(A,Rt)})).length/3,i=[],o=n;o<r;o++)this.encodePickingColor(o,i),Nt[3*o+0]=i[0],Nt[3*o+1]=i[1],Nt[3*o+2]=i[2]}t.value=Nt.subarray(0,3*A)}}},{key:"_setModelAttributes",value:function(t,e){var A=this.getAttributeManager(),n=t.userData.excludeAttributes||{},r=A.getShaderAttributes(e,n);t.setAttributes(r)}},{key:"disablePickingIndex",value:function(t){this._disablePickingIndex(t)}},{key:"_disablePickingIndex",value:function(t){var e=this.getAttributeManager().attributes,A=e.pickingColors,n=e.instancePickingColors,r=A||n,i=r.getVertexOffset(t),o=r.getVertexOffset(t+1);r.buffer.subData({data:new Uint8Array(o-i),offset:i})}},{key:"restorePickingColors",value:function(){var t=this.getAttributeManager().attributes,e=t.pickingColors,A=t.instancePickingColors,n=e||A;this.internalState.usesPickingColorCache&&n.value.buffer!==Nt.buffer&&(n.value=Nt.subarray(0,n.value.length)),n.updateSubBuffer({startOffset:0})}},{key:"getNumInstances",value:function(t){return void 0!==(t=t||this.props).numInstances?t.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:Object(R.a)(t.data)}},{key:"getStartIndices",value:function(t){return void 0!==(t=t||this.props).startIndices?t.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}},{key:"_initialize",value:function(){Object(U.a)("layer.initialize",this),this._initState(),this.initializeState(this.context);var t,e=wt(this.props.extensions);try{for(e.s();!(t=e.n()).done;){var A=t.value;A.initializeState.call(this,this.context,A)}}catch(n){e.e(n)}finally{e.f()}this.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,extensionsChanged:!0}),this._updateState()}},{key:"_update",value:function(){var t=this.needsUpdate();Object(U.a)("layer.update",this,t),t&&this._updateState()}},{key:"_updateState",value:function(){var t=this.props,e=this.context.viewport,A=this._updateUniformTransition();this.internalState.propsInTransition=A,this.context.viewport=this.internalState.viewport||e,this.props=A;try{var n=this._getUpdateParams(),r=this.getModels();if(this.context.gl)this.updateState(n);else try{this.updateState(n)}catch(g){}var i,o=wt(this.props.extensions);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.updateState.call(this,n,a)}}catch(c){o.e(c)}finally{o.f()}var s=this.getModels()[0]!==r[0];this._updateModules(n,s),this.isComposite?this._renderLayers(n):(this.setNeedsRedraw(),this._updateAttributes(this.props),this.state.model&&this.state.model.setInstanceCount(this.getNumInstances()))}finally{this.context.viewport=e,this.props=t,this.clearChangeFlags(),this.internalState.needsUpdate=!1,this.internalState.resetOldProps()}}},{key:"_finalize",value:function(){Object(U.a)("layer.finalize",this),Object(N.a)(this.internalState&&this.state),this.finalizeState(this.context);var t,e=wt(this.props.extensions);try{for(e.s();!(t=e.n()).done;){var A=t.value;A.finalizeState.call(this,A)}}catch(n){e.e(n)}finally{e.f()}}},{key:"drawLayer",value:function(t){var e=this,A=t.moduleParameters,n=void 0===A?null:A,r=t.uniforms,i=void 0===r?{}:r,o=t.parameters,a=void 0===o?{}:o;this._updateAttributeTransition();var s=this.props;this.props=this.internalState.propsInTransition||s;var g=this.props.opacity;i.opacity=Math.pow(g,1/2.2);try{n&&this.setModuleParameters(n);var c=this.props.getPolygonOffset,I=c&&c(i)||[0,0];Object(G.n)(this.context.gl,{polygonOffset:I}),Object(G.o)(this.context.gl,a,(function(){var t,A={moduleParameters:n,uniforms:i,parameters:a,context:e.context},r=wt(e.props.extensions);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.draw.call(e,A,o)}}catch(s){r.e(s)}finally{r.f()}e.draw(A)}))}finally{this.props=s}}},{key:"getChangeFlags",value:function(){return this.internalState.changeFlags}},{key:"setChangeFlags",value:function(t){var e=this.internalState.changeFlags;for(var A in t)if(t[A]){var n=!1;switch(A){case"dataChanged":Array.isArray(e[A])&&(e[A]=Array.isArray(t[A])?e[A].concat(t[A]):t[A],n=!0);default:e[A]||(e[A]=t[A],n=!0)}n&&Object(U.a)("layer.changeFlag",this,A,t)}var r=e.dataChanged||e.updateTriggersChanged||e.propsChanged||e.extensionsChanged;e.propsOrDataChanged=r,e.somethingChanged=r||t.viewportChanged||t.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(t,e){var A=Object(D.b)(t,e);if(A.updateTriggersChanged)for(var n in A.updateTriggersChanged)A.updateTriggersChanged[n]&&this.invalidateAttribute(n);if(A.transitionsChanged)for(var r in A.transitionsChanged)this.internalState.uniformTransitions.add(r,e[r],t[r],t.transitions[r]);return this.setChangeFlags(A)}},{key:"validateProps",value:function(){Object(D.c)(this.props)}},{key:"setModuleParameters",value:function(t){var e,A=wt(this.getModels());try{for(A.s();!(e=A.n()).done;){e.value.updateModuleSettings(t)}}catch(n){A.e(n)}finally{A.f()}}},{key:"_updateModules",value:function(t,e){var A=t.props,n=t.oldProps,r=A.autoHighlight,i=A.highlightedObjectIndex,o=A.highlightColor;if(e||n.autoHighlight!==r||n.highlightedObjectIndex!==i||n.highlightColor!==o){var a={};r||(a.pickingSelectedColor=null),Array.isArray(o)&&(a.pickingHighlightColor=o),Number.isInteger(i)&&(a.pickingSelectedColor=i>=0?this.encodePickingColor(i):null),this.setModuleParameters(a)}}},{key:"_getUpdateParams",value:function(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}},{key:"_getNeedsRedraw",value:function(t){if(!this.internalState)return!1;var e=!1;e=e||this.internalState.needsRedraw&&this.id,this.internalState.needsRedraw=this.internalState.needsRedraw&&!t.clearRedrawFlags;var A=this.getAttributeManager(),n=A&&A.getNeedsRedraw(t);return e=e||n}},{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(N.a)(!this.internalState&&!this.state),Object(N.a)(isFinite(this.props.coordinateSystem),"".concat(this.id,": invalid coordinateSystem"));var t=this._getAttributeManager();t&&t.addInstanced({instancePickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateInstancePickingColors}}),this.internalState=new mt({attributeManager:t,layer:this}),this.clearChangeFlags(),this.state={},Object.defineProperty(this.state,"attributeManager",{get:function(){return p.a.deprecated("layer.state.attributeManager","layer.getAttributeManager()"),t}}),this.internalState.layer=this,this.internalState.uniformTransitions=new S(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props)}},{key:"_transferState",value:function(t){Object(U.a)("layer.matched",this,this===t);var e=t.state,A=t.internalState;Object(N.a)(e&&A),this!==t&&(this.internalState=A,this.internalState.layer=this,this.state=e,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}}]),A}(yt);xt.layerName="Layer",xt.defaultProps=kt},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(479),c=A(974),I=A(480),u=A(40),l=A(279),C=A(737),h=A(385),B=A(412),f=A(255),d=A(1),Q=A(268),E=A(742),p=A(125);function y(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return v(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return v(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function m(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function b(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?m(Object(A),!0).forEach((function(e){Object(d.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):m(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function F(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var w=function(t){Object(o.a)(A,t);var e=F(A);function A(t){Object(n.a)(this,A);var r=t.fp64,i=t.IndexType,o=void 0===i?Uint32Array:i;return e.call(this,b(b({},t),{},{attributes:{positions:{size:3,type:r?Float64Array:Float32Array},vertexValid:{type:Uint8ClampedArray,size:1},indices:{type:o,size:1}}}))}return Object(r.a)(A,[{key:"get",value:function(t){var e=this.attributes;return"indices"===t?e.indices&&e.indices.subarray(0,this.vertexCount):e[t]}},{key:"updateGeometry",value:function(t){Object(i.a)(Object(s.a)(A.prototype),"updateGeometry",this).call(this,t);var e=this.buffers.indices;e&&(this.vertexCount=(e.value||e).length)}},{key:"normalizeGeometry",value:function(t){if(this.normalize){if(t=Q.b(t,this.positionSize),this.opts.resolution)return Object(p.b)(t.positions||t,t.holeIndices,{size:this.positionSize,gridResolution:this.opts.resolution,edgeTypes:!0});if(this.opts.wrapLongitude)return Object(p.c)(t.positions||t,t.holeIndices,{size:this.positionSize,maxLatitude:86,edgeTypes:!0})}return t}},{key:"getGeometrySize",value:function(t){if(Array.isArray(t)&&!Number.isFinite(t[0])){var e,A=0,n=y(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;A+=this.getGeometrySize(r)}}catch(i){n.e(i)}finally{n.f()}return A}return(t.positions||t).length/this.positionSize}},{key:"getGeometryFromBuffer",value:function(t){return this.normalize||!this.buffers.indices?Object(i.a)(Object(s.a)(A.prototype),"getGeometryFromBuffer",this).call(this,t):function(){return null}}},{key:"updateGeometryAttributes",value:function(t,e){if(Array.isArray(t)&&!Number.isFinite(t[0])){var A,n=y(t);try{for(n.s();!(A=n.n()).done;){var r=A.value,i=this.getGeometrySize(r);e.geometrySize=i,this.updateGeometryAttributes(r,e),e.vertexStart+=i,e.indexStart=this.indexStarts[e.geometryIndex+1]}}catch(o){n.e(o)}finally{n.f()}}else this._updateIndices(t,e),this._updatePositions(t,e),this._updateVertexValid(t,e)}},{key:"_updateIndices",value:function(t,e){var A=e.geometryIndex,n=e.vertexStart,r=e.indexStart,i=this.attributes,o=this.indexStarts,a=this.typedArrayManager,s=i.indices;if(s){var g=r,c=Q.a(t,this.positionSize,this.opts.preproject);s=a.allocate(s,r+c.length,{copy:!0});for(var I=0;I<c.length;I++)s[g++]=c[I]+n;o[A+1]=r+c.length,i.indices=s}}},{key:"_updatePositions",value:function(t,e){var A=e.vertexStart,n=e.geometrySize,r=this.attributes.positions,i=this.positionSize;if(r)for(var o=t.positions||t,a=A,s=0;s<n;a++,s++){var g=o[s*i],c=o[s*i+1],I=i>2?o[s*i+2]:0;r[3*a]=g,r[3*a+1]=c,r[3*a+2]=I}}},{key:"_updateVertexValid",value:function(t,e){var A=e.vertexStart,n=e.geometrySize,r=this.attributes.vertexValid,i=this.positionSize,o=t&&t.holeIndices;if(t&&t.edgeTypes?r.set(t.edgeTypes,A):r.fill(1,A,A+n),o)for(var a=0;a<o.length;a++)r[A+o[a]/i-1]=0;r[A+n-1]=0}}]),A}(E.a),S="\nattribute vec2 vertexPositions;\nattribute float vertexValid;\n\nuniform bool extruded;\nuniform bool isWireframe;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\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#ifdef IS_SIDE_VERTEX\n  if(vertexValid < 0.5){\n    gl_Position = vec4(0.);\n    return;\n  }\n#endif\n\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#else\n  pos = props.positions;\n  pos64Low = props.positions64Low;\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",D="#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(S,"\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"),R="#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(S,"\n\nvoid main(void) {\n  PolygonProps props;\n\n  #if RING_WINDING_ORDER_CW == 1\n    props.positions = instancePositions;\n    props.positions64Low = instancePositions64Low;\n    props.nextPositions = nextPositions;\n    props.nextPositions64Low = nextPositions64Low;\n  #else\n    props.positions = nextPositions;\n    props.positions64Low = nextPositions64Low;\n    props.nextPositions = instancePositions;\n    props.nextPositions64Low = instancePositions64Low;\n  #endif\n  props.elevations = instanceElevations;\n  props.fillColors = instanceFillColors;\n  props.lineColors = instanceLineColors;\n  props.pickingColors = instancePickingColors;\n\n  calculatePosition(props);\n}\n");function U(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return x}));var G=[0,0,0,255],N={filled:!0,extruded:!1,wireframe:!1,_normalize:!0,_windingOrder:"CW",elevationScale:{type:"number",min:0,value:1},getPolygon:{type:"accessor",value:function(t){return t.polygon}},getElevation:{type:"accessor",value:1e3},getFillColor:{type:"accessor",value:G},getLineColor:{type:"accessor",value:G},material:!0},k={enter:function(t,e){return e.length?e.subarray(e.length-t.length):t}},x=function(t){Object(o.a)(A,t);var e=U(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(t){return Object(i.a)(Object(s.a)(A.prototype),"getShaders",this).call(this,{vs:"top"===t?D:R,fs:"#define SHADER_NAME solid-polygon-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n  gl_FragColor = vColor;\n\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",defines:{RING_WINDING_ORDER_CW:this.props._normalize||"CCW"!==this.props._windingOrder?1:0},modules:[g.a,c.a,I.a]})}},{key:"initializeState",value:function(){var t=this,e=this.context,A=e.gl,n=e.viewport,r=this.props.coordinateSystem;n.isGeospatial&&r===u.a.DEFAULT&&(r=u.a.LNGLAT),this.setState({numInstances:0,polygonTesselator:new w({preproject:r===u.a.LNGLAT&&n.projectFlat,fp64:this.use64bitPositions(),IndexType:!A||Object(C.c)(A,h.a.ELEMENT_INDEX_UINT32)?Uint32Array:Uint16Array})});var i=this.getAttributeManager();i.remove(["instancePickingColors"]),i.add({indices:{size:1,isIndexed:!0,update:this.calculateIndices,noAlloc:!0},positions:{size:3,type:5130,fp64:this.use64bitPositions(),transition:k,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:k,accessor:"getElevation",shaderAttributes:{elevations:{divisor:0},instanceElevations:{divisor:1}}},fillColors:{alias:"colors",size:this.props.colorFormat.length,type:5121,normalized:!0,transition:k,accessor:"getFillColor",defaultValue:G,shaderAttributes:{fillColors:{divisor:0},instanceFillColors:{divisor:1}}},lineColors:{alias:"colors",size:this.props.colorFormat.length,type:5121,normalized:!0,transition:k,accessor:"getLineColor",defaultValue:G,shaderAttributes:{lineColors:{divisor:0},instanceLineColors:{divisor:1}}},pickingColors:{size:3,type:5121,accessor:function(e,A){var n=A.index,r=A.target;return t.encodePickingColor(e&&e.__source?e.__source.index:n,r)},shaderAttributes:{pickingColors:{divisor:0},instancePickingColors:{divisor:1}}}})}},{key:"getPickingInfo",value:function(t){var e=Object(i.a)(Object(s.a)(A.prototype),"getPickingInfo",this).call(this,t),n=e.index,r=this.props.data;return r[0]&&r[0].__source&&(e.object=r.find((function(t){return t.__source.index===n}))),e}},{key:"disablePickingIndex",value:function(t){var e=this.props.data;if(e[0]&&e[0].__source)for(var A=0;A<e.length;A++)e[A].__source.index===t&&this._disablePickingIndex(A);else this._disablePickingIndex(t)}},{key:"draw",value:function(t){var e=t.uniforms,A=this.props,n=A.extruded,r=A.filled,i=A.wireframe,o=A.elevationScale,a=this.state,s=a.topModel,g=a.sideModel,c=a.polygonTesselator,I=Object.assign({},e,{extruded:Boolean(n),elevationScale:o});g&&(g.setInstanceCount(c.instanceCount-1),g.setUniforms(I),i&&(g.setDrawMode(3),g.setUniforms({isWireframe:!0}).draw()),r&&(g.setDrawMode(6),g.setUniforms({isWireframe:!1}).draw())),s&&(s.setVertexCount(c.vertexCount),s.setUniforms(I).draw())}},{key:"updateState",value:function(t){Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,t),this.updateGeometry(t);var e=t.props,n=t.oldProps,r=t.changeFlags,o=this.getAttributeManager();(r.extensionsChanged||e.filled!==n.filled||e.extruded!==n.extruded)&&(this.state.models&&this.state.models.forEach((function(t){return t.delete()})),this.setState(this._getModels(this.context.gl)),o.invalidateAll())}},{key:"updateGeometry",value:function(t){var e=t.props,A=(t.oldProps,t.changeFlags);if(A.dataChanged||A.updateTriggersChanged&&(A.updateTriggersChanged.all||A.updateTriggersChanged.getPolygon)){var n=this.state.polygonTesselator,r=e.data.attributes||{};n.updateGeometry({data:e.data,normalize:e._normalize,geometryBuffer:r.getPolygon,buffers:r,getGeometry:e.getPolygon,positionFormat:e.positionFormat,wrapLongitude:e.wrapLongitude,resolution:this.context.viewport.resolution,fp64:this.use64bitPositions(),dataChanged:A.dataChanged}),this.setState({numInstances:n.instanceCount,startIndices:n.vertexStarts}),A.dataChanged||this.getAttributeManager().invalidateAll()}}},{key:"_getModels",value:function(t){var e,A,n=this.props,r=n.id,i=n.filled,o=n.extruded;if(i){var a=this.getShaders("top");a.defines.NON_INSTANCED_MODEL=1,e=new B.a(t,Object.assign({},a,{id:"".concat(r,"-top"),drawMode:4,attributes:{vertexPositions:new Float32Array([0,1])},uniforms:{isWireframe:!1,isSideVertex:!1},vertexCount:0,isIndexed:!0}))}return o&&((A=new B.a(t,Object.assign({},this.getShaders("side"),{id:"".concat(r,"-side"),geometry:new f.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:[A,e].filter(Boolean),topModel:e,sideModel:A}}},{key:"calculateIndices",value:function(t){var e=this.state.polygonTesselator;t.startIndices=e.indexStarts,t.value=e.get("indices")}},{key:"calculatePositions",value:function(t){var e=this.state.polygonTesselator;t.startIndices=e.vertexStarts,t.value=e.get("positions")}},{key:"calculateVertexValid",value:function(t){t.value=this.state.polygonTesselator.get("vertexValid")}},{key:"wrapLongitude",get:function(){return!1}}]),A}(l.a);x.layerName="SolidPolygonLayer",x.defaultProps=N},function(t,e,A){"use strict";function n(t){if(Array.isArray(t))return t}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return C})),A.d(e,"b",(function(){return h}));var n=A(18),r=A(45),i=A(40),o=A(187),a=A(55),s=[0,0,0,0],g=[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],I=[0,0,0],u=[0,0,0],l=Object(o.a)((function(t){var e=t.viewport,A=t.devicePixelRatio,o=t.coordinateSystem,a=t.coordinateOrigin,c=function(t,e,A){var i=t.viewMatrixUncentered,o=t.projectionMatrix,a=t.viewMatrix,c=t.viewProjectionMatrix,I=s,u=t.cameraPosition,l=C(t,e,A),h=l.geospatialOrigin,B=l.shaderCoordinateOrigin;if(l.offsetMode){var f=t.projectPosition(h||B);u=[u[0]-f[0],u[1]-f[1],u[2]-f[2]],f[3]=1,I=r.n([],f,c),a=i||a,c=n.h([],o,a),c=n.h([],c,g)}return{viewMatrix:a,viewProjectionMatrix:c,projectionCenter:I,cameraPosCommon:u,shaderCoordinateOrigin:B,geospatialOrigin:h}}(e,o,a),u=c.projectionCenter,l=c.viewProjectionMatrix,h=c.cameraPosCommon,B=c.shaderCoordinateOrigin,f=c.geospatialOrigin,d=e.getDistanceScales(),Q=[e.width*A,e.height*A],E={project_uCoordinateSystem:o,project_uProjectionMode:e.projectionMode,project_uCoordinateOrigin:B,project_uCenter:u,project_uViewportSize:Q,project_uDevicePixelRatio:A,project_uFocalDistance:e.focalDistance||1,project_uCommonUnitsPerMeter:d.unitsPerMeter,project_uCommonUnitsPerWorldUnit:d.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:I,project_uScale:e.scale,project_uViewProjectionMatrix:l,project_uCameraPosition:h};if(f){var p=e.getDistanceScales(f);switch(o){case i.a.METER_OFFSETS:E.project_uCommonUnitsPerWorldUnit=p.unitsPerMeter,E.project_uCommonUnitsPerWorldUnit2=p.unitsPerMeter2;break;case i.a.LNGLAT:case i.a.LNGLAT_OFFSETS:E.project_uCommonUnitsPerWorldUnit=p.unitsPerDegree,E.project_uCommonUnitsPerWorldUnit2=p.unitsPerDegree2;break;case i.a.CARTESIAN:E.project_uCommonUnitsPerWorldUnit=[1,1,p.unitsPerMeter[2]],E.project_uCommonUnitsPerWorldUnit2=[0,0,p.unitsPerMeter2[2]]}}return E}));function C(t,e){var A,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,r=n,o=!0;switch(A=e===i.a.LNGLAT_OFFSETS||e===i.a.METER_OFFSETS?n:t.isGeospatial?[Math.fround(t.longitude),Math.fround(t.latitude),0]:null,t.projectionMode){case i.c.WEB_MERCATOR:e!==i.a.LNGLAT&&e!==i.a.CARTESIAN||(o=!1);break;case i.c.WEB_MERCATOR_AUTO_OFFSET:e===i.a.LNGLAT?r=A:e===i.a.CARTESIAN&&(r=[Math.fround(t.center[0]),Math.fround(t.center[1]),0],A=t.unprojectPosition(r),r[0]-=n[0],r[1]-=n[1],r[2]-=n[2]);break;case i.c.IDENTITY:r=t.position.map(Math.fround);break;case i.c.GLOBE:o=!1,A=null;break;default:o=!1}return r[2]=r[2]||0,{geospatialOrigin:A,shaderCoordinateOrigin:r,offsetMode:o}}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.viewport,A=t.devicePixelRatio,n=void 0===A?1:A,r=t.modelMatrix,o=void 0===r?null:r,s=t.coordinateSystem,g=void 0===s?i.a.DEFAULT:s,I=t.coordinateOrigin,u=t.autoWrapLongitude,C=void 0!==u&&u;t.projectionMode,t.positionOrigin;Object(a.a)(e),g===i.a.DEFAULT&&(g=e.isGeospatial?i.a.LNGLAT:i.a.CARTESIAN);var h=l({viewport:e,devicePixelRatio:n,coordinateSystem:g,coordinateOrigin:I});return h.project_uWrapLongitude=C,h.project_uModelMatrix=o||c,h}},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(5),r=A(4),i=A(55),o=function(){function t(e){Object(n.a)(this,t),Object(i.a)(Number.isFinite(e.width),"`width` must be supplied"),Object(i.a)(Number.isFinite(e.height),"`height` must be supplied"),this._viewportProps=this._applyConstraints(e)}return Object(r.a)(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getState",value:function(){return this._state}},{key:"shortestPathFrom",value:function(t){return this._viewportProps}},{key:"_applyConstraints",value:function(t){return t}}]),t}()},function(t,e,A){"use strict";t.exports=A(581)},function(t,e,A){"use strict";var n=A(29),r=A(22),i=A(5),o=A(4),a=A(45);function s(t,e){var A=a.n([],e,t);return a.k(A,A,1/A[3]),A}function g(t,e){var A=t%e;return A<0?e+A:A}function c(t,e,A){return A*e+(1-A)*t}var I=A(18),u=A(38),l=A(27);function C(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}var h=Math.PI,B=h/4,f=h/180,d=180/h;function Q(t){return Math.pow(2,t)}function E(t){return Math.log2(t)}function p(t){var e=Object(r.a)(t,2),A=e[0],n=e[1];C(Number.isFinite(A)),C(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");var i=n*f;return[512*(A*f+h)/(2*h),512*(h+Math.log(Math.tan(B+.5*i)))/(2*h)]}function y(t){var e=Object(r.a)(t,2),A=e[0],n=e[1],i=A/512*(2*h)-h,o=2*(Math.atan(Math.exp(n/512*(2*h)-h))-B);return[i*d,o*d]}function v(t){var e=t.latitude;return C(Number.isFinite(e)),E(4003e4*Math.cos(e*f))-9}function m(t){var e=t.latitude,A=t.longitude,n=t.highPrecision,r=void 0!==n&&n;C(Number.isFinite(e)&&Number.isFinite(A));var i={},o=Math.cos(e*f),a=512/360/o,s=512/4003e4/o;if(i.unitsPerMeter=[s,s,s],i.metersPerUnit=[1/s,1/s,1/s],i.unitsPerDegree=[512/360,a,s],i.degreesPerUnit=[.703125,1/a,1/s],r){var g=f*Math.tan(e*f)/o,c=512/360*g/2,I=512/4003e4*g,u=I/a*s;i.unitsPerDegree2=[0,c,I],i.unitsPerMeter2=[u,0,u]}return i}function b(t,e){var A=Object(r.a)(t,3),n=A[0],i=A[1],o=A[2],a=Object(r.a)(e,3),s=a[0],g=a[1],c=a[2],I=m({longitude:n,latitude:i,highPrecision:!0}),u=I.unitsPerMeter,l=I.unitsPerMeter2,C=p(t);C[0]+=s*(u[0]+l[0]*g),C[1]+=g*(u[1]+l[1]*g);var h=y(C),B=(o||0)+(c||0);return Number.isFinite(o)||Number.isFinite(c)?[h[0],h[1],B]:h}function F(t){var e=t.height,A=t.pitch,n=t.bearing,r=t.altitude,i=t.scale,o=t.center,a=void 0===o?null:o,s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return I.p(s,s,[0,0,-r]),I.l(s,s,-A*f),I.n(s,s,n*f),i/=e,I.o(s,s,[i,i,i]),a&&I.p(s,s,l.i([],a)),s}function w(t){var e=t.width,A=t.height,n=t.altitude,r=void 0===n?1.5:n,i=t.pitch,o=void 0===i?0:i,a=t.nearZMultiplier,s=void 0===a?1:a,g=t.farZMultiplier,c=void 0===g?1:g,I=o*f,u=Math.atan(.5/r),l=Math.sin(u)*r/Math.sin(Math.min(Math.max(Math.PI/2-I-u,.01),Math.PI-.01));return{fov:2*u,aspect:e/A,focalDistance:r,near:s,far:(Math.sin(I)*l+r)*c}}function S(t){var e=t.width,A=t.height,n=t.pitch,r=w({width:e,height:A,altitude:t.altitude,pitch:n,nearZMultiplier:t.nearZMultiplier,farZMultiplier:t.farZMultiplier}),i=r.fov,o=r.aspect,a=r.near,s=r.far;return I.j([],i,o,a,s)}function D(t,e){var A=Object(r.a)(t,3),n=A[0],i=A[1],o=A[2],a=void 0===o?0:o;return C(Number.isFinite(n)&&Number.isFinite(i)&&Number.isFinite(a)),s(e,[n,i,a,1])}function R(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=Object(r.a)(t,3),i=n[0],o=n[1],a=n[2];if(C(Number.isFinite(i)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a)){var g=s(e,[i,o,a,1]);return g}var c=s(e,[i,o,0,1]),I=s(e,[i,o,1,1]),l=c[2],h=I[2],B=l===h?0:((A||0)-l)/(h-l);return u.c([],c,I,B)}function U(t){var e=t.width,A=t.height,n=t.bounds,i=t.minExtent,o=void 0===i?0:i,a=t.maxZoom,s=void 0===a?24:a,g=t.padding,c=void 0===g?0:g,I=t.offset,u=void 0===I?[0,0]:I,l=Object(r.a)(n,2),h=Object(r.a)(l[0],2),B=h[0],f=h[1],d=Object(r.a)(l[1],2),Q=d[0],E=d[1];if(Number.isFinite(c)){c={top:c,bottom:c,left:c,right:c}}else C(Number.isFinite(c.top)&&Number.isFinite(c.bottom)&&Number.isFinite(c.left)&&Number.isFinite(c.right));var p=new x({width:e,height:A,longitude:0,latitude:0,zoom:0}),y=p.project([B,E]),v=p.project([Q,f]),m=[Math.max(Math.abs(v[0]-y[0]),o),Math.max(Math.abs(v[1]-y[1]),o)],b=[e-c.left-c.right-2*Math.abs(u[0]),A-c.top-c.bottom-2*Math.abs(u[1])];C(b[0]>0&&b[1]>0);var F=b[0]/m[0],w=b[1]/m[1],S=(c.right-c.left)/2/F,D=(c.bottom-c.top)/2/w,R=[(v[0]+y[0])/2+S,(v[1]+y[1])/2+D],U=p.unproject(R),G=Math.min(s,p.zoom+Math.log2(Math.abs(Math.min(F,w))));return C(Number.isFinite(G)),{longitude:U[0],latitude:U[1],zoom:G}}var G=Math.PI/180;function N(t){var e,A,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.width,i=t.height,o=t.unproject,a={targetZ:n},s=o([0,i],a),g=o([r,i],a),c=Math.atan(.5/t.altitude),I=(90-t.pitch)*G;return c>I-.01?(e=k(t,0,n),A=k(t,r,n)):(e=o([0,0],a),A=o([r,0],a)),[s,g,A,e]}function k(t,e,A){var n=t.pixelUnprojectionMatrix,r=s(n,[e,0,1,1]),i=s(n,[e,t.height,1,1]),o=(A*t.distanceScales.unitsPerMeter[2]-r[2])/(i[2]-r[2]),a=y(u.c([],r,i,o));return a[2]=A,a}var x=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:1,height:1},A=e.width,n=e.height,r=e.latitude,o=void 0===r?0:r,a=e.longitude,s=void 0===a?0:a,g=e.zoom,c=void 0===g?0:g,I=e.pitch,u=void 0===I?0:I,l=e.bearing,C=void 0===l?0:l,h=e.altitude,B=void 0===h?1.5:h,f=e.nearZMultiplier,d=void 0===f?.02:f,E=e.farZMultiplier,y=void 0===E?1.01:E;Object(i.a)(this,t),A=A||1,n=n||1;var v=Q(c);B=Math.max(.75,B);var b=p([s,o]);b[2]=0,this.projectionMatrix=S({width:A,height:n,pitch:u,altitude:B,nearZMultiplier:d,farZMultiplier:y}),this.viewMatrix=F({height:n,scale:v,center:b,pitch:u,bearing:C,altitude:B}),this.width=A,this.height=n,this.scale=v,this.latitude=o,this.longitude=s,this.zoom=c,this.pitch=u,this.bearing=C,this.altitude=B,this.center=b,this.distanceScales=m(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)(t,[{key:"_initMatrices",value:function(){var t=this.width,e=this.height,A=this.projectionMatrix,n=this.viewMatrix,r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];I.h(r,r,A),I.h(r,r,n),this.viewProjectionMatrix=r;var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];I.o(i,i,[t/2,-e/2,1]),I.p(i,i,[1,-1,0]),I.h(i,i,r);var o=I.f([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],i);if(!o)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=i,this.pixelUnprojectionMatrix=o}},{key:"equals",value:function(e){return e instanceof t&&(e.width===this.width&&e.height===this.height&&I.b(e.projectionMatrix,this.projectionMatrix)&&I.b(e.viewMatrix,this.viewMatrix))}},{key:"project",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.topLeft,n=void 0===A||A,i=this.projectPosition(t),o=D(i,this.pixelProjectionMatrix),a=Object(r.a)(o,2),s=a[0],g=a[1],c=n?g:this.height-g;return 2===t.length?[s,c]:[s,c,o[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.topLeft,n=void 0===A||A,i=e.targetZ,o=void 0===i?void 0:i,a=Object(r.a)(t,3),s=a[0],g=a[1],c=a[2],I=n?g:this.height-g,u=o&&o*this.distanceScales.unitsPerMeter[2],l=R([s,I,c],this.pixelUnprojectionMatrix,u),C=this.unprojectPosition(l),h=Object(r.a)(C,3),B=h[0],f=h[1],d=h[2];return Number.isFinite(c)?[B,f,d]:Number.isFinite(o)?[B,f,o]:[B,f]}},{key:"projectPosition",value:function(t){var e=p(t),A=Object(r.a)(e,2);return[A[0],A[1],(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}},{key:"unprojectPosition",value:function(t){var e=y(t),A=Object(r.a)(e,2);return[A[0],A[1],(t[2]||0)*this.distanceScales.metersPerUnit[2]]}},{key:"projectFlat",value:function(t){return p(t)}},{key:"unprojectFlat",value:function(t){return y(t)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e=t.lngLat,A=R(t.pos,this.pixelUnprojectionMatrix),n=p(e),r=u.a([],n,u.d([],A));return y(u.a([],this.center,r))}},{key:"getLocationAtPoint",value:function(t){var e=t.lngLat,A=t.pos;return this.getMapCenterByLngLatPosition({lngLat:e,pos:A})}},{key:"fitBounds",value:function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.width,r=this.height,i=U(Object.assign({width:n,height:r,bounds:e},A)),o=i.longitude,a=i.latitude,s=i.zoom;return new t({width:n,height:r,longitude:o,latitude:a,zoom:s})}},{key:"getBounds",value:function(t){var e=this.getBoundingRegion(t),A=Math.min.apply(Math,Object(n.a)(e.map((function(t){return t[0]})))),r=Math.max.apply(Math,Object(n.a)(e.map((function(t){return t[0]}))));return[[A,Math.min.apply(Math,Object(n.a)(e.map((function(t){return t[1]}))))],[r,Math.max.apply(Math,Object(n.a)(e.map((function(t){return t[1]}))))]]}},{key:"getBoundingRegion",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return N(this,t.z||0)}}]),t}();function O(t){var e=t.width,A=t.height,n=t.longitude,r=t.latitude,i=t.zoom,o=t.pitch,a=void 0===o?0:o,s=t.bearing,c=void 0===s?0:s;(n<-180||n>180)&&(n=g(n+180,360)-180),(c<-180||c>180)&&(c=g(c+180,360)-180);var I=new x({width:e,height:A,longitude:n,latitude:r,zoom:i}),u=I.project([n,85.05113])[1],l=I.project([n,-85.05113])[1],C=0;return l-u<A&&(i+=Math.log2(A/(l-u)),u=(I=new x({width:e,height:A,longitude:n,latitude:r,zoom:i})).project([n,85.05113])[1],l=I.project([n,-85.05113])[1]),u>0?C=u:l<A&&(C=l-A),C&&(r=I.unproject([e/2,A/2+C])[1]),{width:e,height:A,longitude:n,latitude:r,zoom:i,pitch:a,bearing:c}}function M(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return L(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return L(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var _=["longitude","latitude","zoom"],J={curve:1.414,speed:1.2};function T(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={},i=H(t,e,n),o=i.startZoom,a=i.startCenterXY,s=i.uDelta,g=i.w0,I=i.u1,l=i.S,C=i.rho,h=i.rho2,B=i.r0;if(I<.01){var f,d=M(_);try{for(d.s();!(f=d.n()).done;){var Q=f.value,p=t[Q],v=e[Q];r[Q]=c(p,v,A)}}catch(U){d.e(U)}finally{d.f()}return r}var m=A*l,b=Math.cosh(B)/Math.cosh(B+C*m),F=g*((Math.cosh(B)*Math.tanh(B+C*m)-Math.sinh(B))/h)/I,w=1/b,S=o+E(w),D=u.e([],s,F);u.a(D,D,a);var R=y(D);return r.longitude=R[0],r.latitude=R[1],r.zoom=S,r}function j(t,e){var A,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n=Object.assign({},J,n),i=r.screenSpeed,o=r.speed,a=r.maxDuration,s=H(t,e,n),g=s.S,c=s.rho,I=1e3*g;return A=Number.isFinite(i)?I/(i/c):I/o,Number.isFinite(a)&&A>a?0:A}function H(t,e,A){var n=(A=Object.assign({},J,A)).curve,r=t.zoom,i=[t.longitude,t.latitude],o=Q(r),a=e.zoom,s=[e.longitude,e.latitude],g=Q(a-r),c=p(i),I=p(s),l=u.f([],I,c),C=Math.max(t.width,t.height),h=C/g,B=u.b(l)*o,f=Math.max(B,.01),d=n*n,E=(h*h-C*C+d*d*f*f)/(2*C*d*f),y=(h*h-C*C-d*d*f*f)/(2*h*d*f),v=Math.log(Math.sqrt(E*E+1)-E),m=Math.log(Math.sqrt(y*y+1)-y);return{startZoom:r,startCenterXY:c,uDelta:l,w0:C,u1:B,S:(m-v)/n,rho:n,rho2:d,r0:v,r1:m}}A.d(e,"a",(function(){return x})),A.d(e,"e",(function(){return N})),A.d(e,"c",(function(){return U})),A.d(e,"m",(function(){return O})),A.d(e,"d",(function(){return T})),A.d(e,"g",(function(){return j})),A.d(e,"l",(function(){return p})),A.d(e,"p",(function(){return y})),A.d(e,"q",(function(){return D})),A.d(e,"n",(function(){return R})),A.d(e,"r",(function(){return Q})),A.d(e,"o",(function(){return E})),A.d(e,"h",(function(){return v})),A.d(e,"f",(function(){return m})),A.d(e,"b",(function(){return b})),A.d(e,"k",(function(){return F})),A.d(e,"i",(function(){return S})),A.d(e,"j",(function(){return w}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return g}));var n=A(5),r=A(4),i=A(39),o=[255,255,255],a=[0,0,-1],s=0,g=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(n.a)(this,t);var A=e.color,r=void 0===A?o:A,g=e.intensity,c=void 0===g?1:g,I=e.direction,u=void 0===I?a:I,l=e._shadow,C=void 0!==l&&l;this.id=e.id||"directional-".concat(s++),this.color=r,this.intensity=c,this.type="directional",this.direction=new i.c(u).normalize().toArray(),this.shadow=C}return Object(r.a)(t,[{key:"getProjectedLight",value:function(){return this}}]),t}()},function(t,e,A){"use strict";var n=A(1),r=A(30),i=A(593),o=A(10),a=["xs","sm","md","lg","xl"];function s(t){var e=t.values,A=void 0===e?{xs:0,sm:600,md:960,lg:1280,xl:1920}:e,n=t.unit,i=void 0===n?"px":n,s=t.step,g=void 0===s?5:s,c=Object(r.a)(t,["values","unit","step"]);function I(t){var e="number"===typeof A[t]?A[t]:t;return"@media (min-width:".concat(e).concat(i,")")}function u(t,e){var n=a.indexOf(e);return n===a.length-1?I(t):"@media (min-width:".concat("number"===typeof A[t]?A[t]:t).concat(i,") and ")+"(max-width:".concat((-1!==n&&"number"===typeof A[a[n+1]]?A[a[n+1]]:e)-g/100).concat(i,")")}return Object(o.a)({keys:a,values:A,up:I,down:function(t){var e=a.indexOf(t)+1,n=A[a[e]];return e===a.length?I("xs"):"@media (max-width:".concat(("number"===typeof n&&e>0?n:t)-g/100).concat(i,")")},between:u,only:function(t){return u(t,t)},width:function(t){return A[t]}},c)}function g(t,e,A){var r;return Object(o.a)({gutters:function(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(o.a)({paddingLeft:e(2),paddingRight:e(2)},A,Object(n.a)({},t.up("sm"),Object(o.a)({paddingLeft:e(3),paddingRight:e(3)},A[t.up("sm")])))},toolbar:(r={minHeight:56},Object(n.a)(r,"".concat(t.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(n.a)(r,t.up("sm"),{minHeight:64}),r)},A)}var c={black:"#000",white:"#fff"},I=A(159),u={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"},l={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"},C={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"},h={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"},B={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"},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"},d=A(86),Q={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:I.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}},E={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:I.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 p(t,e,A,n){t[e]||(t.hasOwnProperty(A)?t[e]=t[A]:"light"===e?t.light=Object(d.d)(t.main,n):"dark"===e&&(t.dark=Object(d.a)(t.main,1.5*n)))}function y(t){var e=t.primary,A=void 0===e?{light:u[300],main:u[500],dark:u[700]}:e,n=t.secondary,a=void 0===n?{light:l.A200,main:l.A400,dark:l.A700}:n,s=t.error,g=void 0===s?{light:C[300],main:C[500],dark:C[700]}:s,y=t.warning,v=void 0===y?{light:h[300],main:h[500],dark:h[700]}:y,m=t.info,b=void 0===m?{light:B[300],main:B[500],dark:B[700]}:m,F=t.success,w=void 0===F?{light:f[300],main:f[500],dark:f[700]}:F,S=t.type,D=void 0===S?"light":S,R=t.contrastThreshold,U=void 0===R?3:R,G=t.tonalOffset,N=void 0===G?.2:G,k=Object(r.a)(t,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function x(t){if(!t)throw new TypeError("Material-UI: missing background argument in getContrastText(".concat(t,")."));return Object(d.c)(t,E.text.primary)>=U?E.text.primary:Q.text.primary}function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(t=Object(o.a)({},t)).main&&t[e]&&(t.main=t[e]),p(t,"light",A,N),p(t,"dark",n,N),t.contrastText||(t.contrastText=x(t.main)),t}var M={dark:E,light:Q};return Object(i.a)(Object(o.a)({common:c,type:D,primary:O(A),secondary:O(a,"A400","A200","A700"),error:O(g),warning:O(v),info:O(b),success:O(w),grey:I.a,contrastThreshold:U,getContrastText:x,augmentColor:O,tonalOffset:N},M[D]),k)}function v(t){return Math.round(1e5*t)/1e5}var m={textTransform:"uppercase"};function b(t,e){var A="function"===typeof e?e(t):e,n=A.fontFamily,a=void 0===n?'"Roboto", "Helvetica", "Arial", sans-serif':n,s=A.fontSize,g=void 0===s?14:s,c=A.fontWeightLight,I=void 0===c?300:c,u=A.fontWeightRegular,l=void 0===u?400:u,C=A.fontWeightMedium,h=void 0===C?500:C,B=A.fontWeightBold,f=void 0===B?700:B,d=A.htmlFontSize,Q=void 0===d?16:d,E=A.allVariants,p=A.pxToRem,y=Object(r.a)(A,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var b=g/14,F=p||function(t){return"".concat(t/Q*b,"rem")},w=function(t,e,A,n,r){return Object(o.a)({fontFamily:a,fontWeight:t,fontSize:F(e),lineHeight:A},'"Roboto", "Helvetica", "Arial", sans-serif'===a?{letterSpacing:"".concat(v(n/e),"em")}:{},{},r,{},E)},S={h1:w(I,96,1.167,-1.5),h2:w(I,60,1.2,-.5),h3:w(l,48,1.167,0),h4:w(l,34,1.235,.25),h5:w(l,24,1.334,0),h6:w(h,20,1.6,.15),subtitle1:w(l,16,1.75,.15),subtitle2:w(h,14,1.57,.1),body1:w(l,16,1.5,.15),body2:w(l,14,1.43,.15),button:w(h,14,1.75,.4,m),caption:w(l,12,1.66,.4),overline:w(l,12,2.66,1,m)};return Object(i.a)(Object(o.a)({htmlFontSize:Q,pxToRem:F,round:v,fontFamily:a,fontSize:g,fontWeightLight:I,fontWeightRegular:l,fontWeightMedium:h,fontWeightBold:f},S),y,{clone:!1})}function F(){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 w=["none",F(0,2,1,-1,0,1,1,0,0,1,3,0),F(0,3,1,-2,0,2,2,0,0,1,5,0),F(0,3,3,-2,0,3,4,0,0,1,8,0),F(0,2,4,-1,0,4,5,0,0,1,10,0),F(0,3,5,-1,0,5,8,0,0,1,14,0),F(0,3,5,-1,0,6,10,0,0,1,18,0),F(0,4,5,-2,0,7,10,1,0,2,16,1),F(0,5,5,-3,0,8,10,1,0,3,14,2),F(0,5,6,-3,0,9,12,1,0,3,16,2),F(0,6,6,-3,0,10,14,1,0,4,18,3),F(0,6,7,-4,0,11,15,1,0,4,20,3),F(0,7,8,-4,0,12,17,2,0,5,22,4),F(0,7,8,-4,0,13,19,2,0,5,24,4),F(0,7,9,-4,0,14,21,2,0,5,26,4),F(0,8,9,-5,0,15,22,2,0,6,28,5),F(0,8,10,-5,0,16,24,2,0,6,30,5),F(0,8,11,-5,0,17,26,2,0,6,32,5),F(0,9,11,-5,0,18,28,2,0,7,34,6),F(0,9,12,-6,0,19,29,2,0,7,36,6),F(0,10,13,-6,0,20,31,3,0,8,38,7),F(0,10,13,-6,0,21,33,3,0,8,40,7),F(0,10,14,-6,0,22,35,3,0,8,42,7),F(0,11,14,-7,0,23,36,3,0,9,44,8),F(0,11,15,-7,0,24,38,3,0,9,46,8)],S={borderRadius:4},D=A(943);function R(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var e=Object(D.a)({spacing:t}),A=function(){for(var t=arguments.length,A=new Array(t),n=0;n<t;n++)A[n]=arguments[n];return 0===A.length?e(1):1===A.length?e(A[0]):A.map((function(t){var A=e(t);return"number"===typeof A?"".concat(A,"px"):A})).join(" ")};return Object.defineProperty(A,"unit",{get:function(){return t}}),A.mui=!0,A}var U=A(384),G=A(351);e.a=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.breakpoints,A=void 0===e?{}:e,n=t.mixins,o=void 0===n?{}:n,a=t.palette,c=void 0===a?{}:a,I=t.spacing,u=t.typography,l=void 0===u?{}:u,C=Object(r.a)(t,["breakpoints","mixins","palette","spacing","typography"]),h=y(c),B=s(A),f=R(I),d=Object(i.a)({breakpoints:B,direction:"ltr",mixins:g(B,f,o),overrides:{},palette:h,props:{},shadows:w,typography:b(h,l),spacing:f,shape:S,transitions:U.a,zIndex:G.a},C),Q=arguments.length,E=new Array(Q>1?Q-1:0),p=1;p<Q;p++)E[p-1]=arguments[p];return d=E.reduce((function(t,e){return Object(i.a)(t,e)}),d)}},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,A){"use strict";function n(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";e.__esModule=!0;var n,r=A(1237),i=(n=r)&&n.__esModule?n:{default:n};e.default=i.default||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}},,function(t,e){function A(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?t.exports=A=function(t){return typeof t}:t.exports=A=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(e)}t.exports=A},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(85),r=A(153);function i(t,e,A){if(void 0===A&&(A={}),!0===A.final)return function(t,e){var A=i(e,t);return A=(A+180)%360}(t,e);var o=r.getCoord(t),a=r.getCoord(e),s=n.degreesToRadians(o[0]),g=n.degreesToRadians(a[0]),c=n.degreesToRadians(o[1]),I=n.degreesToRadians(a[1]),u=Math.sin(g-s)*Math.cos(I),l=Math.cos(c)*Math.sin(I)-Math.sin(c)*Math.cos(I)*Math.cos(g-s);return n.radiansToDegrees(Math.atan2(u,l))}e.default=i},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(100);function r(t){return Object(n.a)(t).defaultView||window}},function(t,e,A){"use strict";function n(t){var e=t.props,A=t.states,n=t.muiFormControl;return A.reduce((function(t,A){return t[A]=e[A],n&&"undefined"===typeof e[A]&&(t[A]=n[A]),t}),{})}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(0),r=A(389);function i(){return n.useContext(r.a)}},function(t,e,A){var n=A(908),r=A(430);t.exports=function(t,e,A){return void 0===A&&(A=e,e=void 0),void 0!==A&&(A=(A=r(A))===A?A:0),void 0!==e&&(e=(e=r(e))===e?e:0),n(r(t),e,A)}},function(t,e,A){"use strict";e.__esModule=!0;var n,r=A(1089),i=(n=r)&&n.__esModule?n:{default:n};e.default=function(t,e,A){return e in t?(0,i.default)(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}},,function(t,e,A){"use strict";var n=A(633).Buffer,r=n.isEncoding||function(t){switch((t=""+t)&&t.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 i(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!==typeof e&&(n.isEncoding===r||!r(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=s,this.end=g,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=I,e=3;break;default:return this.write=u,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,A=function(t,e,A){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==A?A:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2===0){var A=t.toString("utf16le",e);if(A){var n=A.charCodeAt(A.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],A.slice(0,-1)}return A}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function g(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var A=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,A)}return e}function c(t,e){var A=(t.length-e)%3;return 0===A?t.toString("base64",e):(this.lastNeed=3-A,this.lastTotal=3,1===A?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-A))}function I(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function l(t){return t&&t.length?this.write(t):""}e.StringDecoder=i,i.prototype.write=function(t){if(0===t.length)return"";var e,A;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";A=this.lastNeed,this.lastNeed=0}else A=0;return A<t.length?e?e+this.text(t,A):this.text(t,A):e||""},i.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\ufffd":e},i.prototype.text=function(t,e){var A=function(t,e,A){var n=e.length-1;if(n<A)return 0;var r=o(e[n]);if(r>=0)return r>0&&(t.lastNeed=r-1),r;if(--n<A||-2===r)return 0;if((r=o(e[n]))>=0)return r>0&&(t.lastNeed=r-2),r;if(--n<A||-2===r)return 0;if((r=o(e[n]))>=0)return r>0&&(2===r?r=0:t.lastNeed=r-3),r;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=A;var n=t.length-(A-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},i.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,A){"use strict";var n="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var A=e.shift();if(A){if("object"!==typeof A)throw new TypeError(A+"must be non-object");for(var n in A)r(A,n)&&(t[n]=A[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,A,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(A,A+n),r);else for(var i=0;i<n;i++)t[r+i]=e[A+i]},flattenChunks:function(t){var e,A,n,r,i,o;for(n=0,e=0,A=t.length;e<A;e++)n+=t[e].length;for(o=new Uint8Array(n),r=0,e=0,A=t.length;e<A;e++)i=t[e],o.set(i,r),r+=i.length;return o}},o={arraySet:function(t,e,A,n,r){for(var i=0;i<n;i++)t[r+i]=e[A+i]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,i)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(n)},function(t,e,A){"use strict";(function(e){"undefined"===typeof e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,A,n,r){if("function"!==typeof t)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,A)}));case 3:return e.nextTick((function(){t.call(null,A,n)}));case 4:return e.nextTick((function(){t.call(null,A,n,r)}));default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return e.nextTick((function(){t.apply(null,i)}))}}}:t.exports=e}).call(this,A(62))},function(t,e,A){"use strict";var n=A(161),r=A(161).buildOptions,i=A(670);"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,n.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(t,e){return t},attrValueProcessor:function(t,e){return t},stopNodes:[]};e.defaultOptions=o;var a=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","ignoreNameSpace","allowBooleanAttributes","parseNodeValue","parseAttributeValue","arrayMode","trimValues","cdataTagName","cdataPositionChar","tagValueProcessor","attrValueProcessor","parseTrueNumberOnly","stopNodes"];function s(t,e,A){return e&&(A.trimValues&&(e=e.trim()),e=c(e=A.tagValueProcessor(e,t),A.parseNodeValue,A.parseTrueNumberOnly)),e}function g(t,e){if(e.ignoreNameSpace){var A=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===A[0])return"";2===A.length&&(t=n+A[1])}return t}function c(t,e,A){var r;return e&&"string"===typeof t?(""===t.trim()||isNaN(t)?r="true"===t||"false"!==t&&t:(-1!==t.indexOf("0x")?r=Number.parseInt(t,16):-1!==t.indexOf(".")?(r=Number.parseFloat(t),t=t.replace(/\.?0+$/,"")):r=Number.parseInt(t,10),A&&(r=String(r)===t?r:t)),r):n.isExist(t)?t:""}e.props=a;var I=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function u(t,e){if(!e.ignoreAttributes&&"string"===typeof t){t=t.replace(/\r?\n/g," ");for(var A=n.getAllMatches(t,I),r=A.length,i={},o=0;o<r;o++){var a=g(A[o][1],e);a.length&&(void 0!==A[o][4]?(e.trimValues&&(A[o][4]=A[o][4].trim()),A[o][4]=e.attrValueProcessor(A[o][4],a),i[e.attributeNamePrefix+a]=c(A[o][4],e.parseAttributeValue,e.parseTrueNumberOnly)):e.allowBooleanAttributes&&(i[e.attributeNamePrefix+a]=!0))}if(!Object.keys(i).length)return;if(e.attrNodeName){var s={};return s[e.attrNodeName]=i,s}return i}}function l(t,e){for(var A,n="",r=e;r<t.length;r++){var i=t[r];if(A)i===A&&(A="");else if('"'===i||"'"===i)A=i;else{if(">"===i)return{data:n,index:r};"\t"===i&&(i=" ")}n+=i}}function C(t,e,A,n){var r=t.indexOf(e,A);if(-1===r)throw new Error(n);return r+e.length-1}e.getTraversalObj=function(t,e){t=t.replace(/\r\n?/g,"\n"),e=r(e,o,a);for(var A=new i("!xml"),g=A,c="",I=0;I<t.length;I++){if("<"===t[I])if("/"===t[I+1]){var h=C(t,">",I,"Closing Tag is not closed."),B=t.substring(I+2,h).trim();if(e.ignoreNameSpace){var f=B.indexOf(":");-1!==f&&(B=B.substr(f+1))}g&&(g.val?g.val=n.getValue(g.val)+""+s(B,c,e):g.val=s(B,c,e)),e.stopNodes.length&&e.stopNodes.includes(g.tagname)&&(g.child=[],void 0==g.attrsMap&&(g.attrsMap={}),g.val=t.substr(g.startIndex+1,I-g.startIndex-1)),g=g.parent,c="",I=h}else if("?"===t[I+1])I=C(t,"?>",I,"Pi Tag is not closed.");else if("!--"===t.substr(I+1,3))I=C(t,"--\x3e",I,"Comment is not closed.");else if("!D"===t.substr(I+1,2)){var d=C(t,">",I,"DOCTYPE is not closed.");I=t.substring(I,d).indexOf("[")>=0?t.indexOf("]>",I)+1:d}else if("!["===t.substr(I+1,2)){var Q=C(t,"]]>",I,"CDATA is not closed.")-2,E=t.substring(I+9,Q);if(c&&(g.val=n.getValue(g.val)+""+s(g.tagname,c,e),c=""),e.cdataTagName){var p=new i(e.cdataTagName,g,E);g.addChild(p),g.val=n.getValue(g.val)+e.cdataPositionChar,E&&(p.val=E)}else g.val=(g.val||"")+(E||"");I=Q+2}else{var y=l(t,I+1),v=y.data,m=y.index,b=v.indexOf(" "),F=v,w=!0;if(-1!==b&&(F=v.substr(0,b).replace(/\s\s*$/,""),v=v.substr(b+1)),e.ignoreNameSpace){var S=F.indexOf(":");-1!==S&&(w=(F=F.substr(S+1))!==y.data.substr(S+1))}if(g&&c&&"!xml"!==g.tagname&&(g.val=n.getValue(g.val)+""+s(g.tagname,c,e)),v.length>0&&v.lastIndexOf("/")===v.length-1){v="/"===F[F.length-1]?F=F.substr(0,F.length-1):v.substr(0,v.length-1);var D=new i(F,g,"");F!==v&&(D.attrsMap=u(v,e)),g.addChild(D)}else{var R=new i(F,g);e.stopNodes.length&&e.stopNodes.includes(R.tagname)&&(R.startIndex=m),F!==v&&w&&(R.attrsMap=u(v,e)),g.addChild(R),g=R}c="",I=m}else c+=t[I]}return A}},function(t,e,A){"use strict";A.d(e,"a",(function(){return g}));var n=A(326),r=A(111),i=A(102),o=A(37),a=A(311),s=A(27),g=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.phi,n=void 0===A?0:A,i=e.theta,o=void 0===i?0:i,a=e.radius,s=void 0===a?1:a,g=e.bearing,c=void 0===g?void 0:g,I=e.pitch,u=void 0===I?void 0:I,l=e.altitude,C=void 0===l?void 0:l,h=e.radiusScale,B=void 0===h?6371e3:h;Object(r.a)(this,t),this.phi=n,this.theta=o,this.radius=s||C||1,this.radiusScale=B||1,void 0!==c&&(this.bearing=c),void 0!==u&&(this.pitch=u),this.check()}return Object(i.a)(t,[{key:"toString",value:function(){return this.formatString(o.b)}},{key:"formatString",value:function(t){var e=t.printTypes,A=void 0!==e&&e,n=o.e;return"".concat(A?"Spherical":"","[rho:").concat(n(this.radius),",theta:").concat(n(this.theta),",phi:").concat(n(this.phi),"]")}},{key:"equals",value:function(t){return Object(o.d)(this.radius,t.radius)&&Object(o.d)(this.theta,t.theta)&&Object(o.d)(this.phi,t.phi)}},{key:"exactEquals",value:function(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}},{key:"set",value:function(t,e,A){return this.radius=t,this.phi=e,this.theta=A,this.check()}},{key:"clone",value:function(){return(new t).copy(this)}},{key:"copy",value:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}},{key:"fromLngLatZ",value:function(t){var e=Object(n.a)(t,3),A=e[0],r=e[1],i=e[2];this.radius=1+i/this.radiusScale,this.phi=Object(o.h)(r),this.theta=Object(o.h)(A)}},{key:"fromVector3",value:function(t){return this.radius=s.g(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos(Object(o.a)(t[2]/this.radius,-1,1))),this.check()}},{key:"toVector3",value:function(){return new a.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(t){this.phi=Math.PI-Object(o.h)(t)}},{key:"pitch",get:function(){return Object(o.c)(this.theta)},set:function(t){this.theta=Object(o.h)(t)}},{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}}]),t}()},function(t,e,A){var n=A(679),r=A(680),i=A(681),o=A(682),a=A(683);function s(t){var e=-1,A=null==t?0:t.length;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s},function(t,e,A){var n=A(357);t.exports=function(t,e){for(var A=t.length;A--;)if(n(t[A][0],e))return A;return-1}},function(t,e,A){var n=A(208)(Object,"create");t.exports=n},function(t,e,A){var n=A(701);t.exports=function(t,e){var A=t.__data__;return n(e)?A["string"==typeof e?"string":"hash"]:A.map}},function(t,e,A){"use strict";var n=A(664),r=A(665);function i(){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}e.parse=Q,e.resolve=function(t,e){return Q(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?Q(t,!1,!0).resolveObject(e):e},e.format=function(t){r.isString(t)&&(t=Q(t));return t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i;var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,s=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,g=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(g),I=["%","/","?",";","#"].concat(c),u=["/","?","#"],l=/^[+a-z0-9A-Z_-]{0,63}$/,C=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},B={javascript:!0,"javascript:":!0},f={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},d=A(666);function Q(t,e,A){if(t&&r.isObject(t)&&t instanceof i)return t;var n=new i;return n.parse(t,e,A),n}i.prototype.parse=function(t,e,A){if(!r.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),a=-1!==i&&i<t.indexOf("#")?"?":"#",g=t.split(a);g[0]=g[0].replace(/\\/g,"/");var Q=t=g.join(a);if(Q=Q.trim(),!A&&1===t.split("#").length){var E=s.exec(Q);if(E)return this.path=Q,this.href=Q,this.pathname=E[1],E[2]?(this.search=E[2],this.query=e?d.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=o.exec(Q);if(p){var y=(p=p[0]).toLowerCase();this.protocol=y,Q=Q.substr(p.length)}if(A||p||Q.match(/^\/\/[^@\/]+@[^@\/]+/)){var v="//"===Q.substr(0,2);!v||p&&B[p]||(Q=Q.substr(2),this.slashes=!0)}if(!B[p]&&(v||p&&!f[p])){for(var m,b,F=-1,w=0;w<u.length;w++){-1!==(S=Q.indexOf(u[w]))&&(-1===F||S<F)&&(F=S)}-1!==(b=-1===F?Q.lastIndexOf("@"):Q.lastIndexOf("@",F))&&(m=Q.slice(0,b),Q=Q.slice(b+1),this.auth=decodeURIComponent(m)),F=-1;for(w=0;w<I.length;w++){var S;-1!==(S=Q.indexOf(I[w]))&&(-1===F||S<F)&&(F=S)}-1===F&&(F=Q.length),this.host=Q.slice(0,F),Q=Q.slice(F),this.parseHost(),this.hostname=this.hostname||"";var D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D)for(var R=this.hostname.split(/\./),U=(w=0,R.length);w<U;w++){var G=R[w];if(G&&!G.match(l)){for(var N="",k=0,x=G.length;k<x;k++)G.charCodeAt(k)>127?N+="x":N+=G[k];if(!N.match(l)){var O=R.slice(0,w),M=R.slice(w+1),L=G.match(C);L&&(O.push(L[1]),M.unshift(L[2])),M.length&&(Q="/"+M.join(".")+Q),this.hostname=O.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=n.toASCII(this.hostname));var _=this.port?":"+this.port:"",J=this.hostname||"";this.host=J+_,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==Q[0]&&(Q="/"+Q))}if(!h[y])for(w=0,U=c.length;w<U;w++){var T=c[w];if(-1!==Q.indexOf(T)){var j=encodeURIComponent(T);j===T&&(j=escape(T)),Q=Q.split(T).join(j)}}var H=Q.indexOf("#");-1!==H&&(this.hash=Q.substr(H),Q=Q.slice(0,H));var Y=Q.indexOf("?");if(-1!==Y?(this.search=Q.substr(Y),this.query=Q.substr(Y+1),e&&(this.query=d.parse(this.query)),Q=Q.slice(0,Y)):e&&(this.search="",this.query={}),Q&&(this.pathname=Q),f[y]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){_=this.pathname||"";var V=this.search||"";this.path=_+V}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",A=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&r.isObject(this.query)&&Object.keys(this.query).length&&(o=d.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||f[e])&&!1!==i?(i="//"+(i||""),A&&"/"!==A.charAt(0)&&(A="/"+A)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+i+(A=A.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+n},i.prototype.resolve=function(t){return this.resolveObject(Q(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(r.isString(t)){var e=new i;e.parse(t,!1,!0),t=e}for(var A=new i,n=Object.keys(this),o=0;o<n.length;o++){var a=n[o];A[a]=this[a]}if(A.hash=t.hash,""===t.href)return A.href=A.format(),A;if(t.slashes&&!t.protocol){for(var s=Object.keys(t),g=0;g<s.length;g++){var c=s[g];"protocol"!==c&&(A[c]=t[c])}return f[A.protocol]&&A.hostname&&!A.pathname&&(A.path=A.pathname="/"),A.href=A.format(),A}if(t.protocol&&t.protocol!==A.protocol){if(!f[t.protocol]){for(var I=Object.keys(t),u=0;u<I.length;u++){var l=I[u];A[l]=t[l]}return A.href=A.format(),A}if(A.protocol=t.protocol,t.host||B[t.protocol])A.pathname=t.pathname;else{for(var C=(t.pathname||"").split("/");C.length&&!(t.host=C.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==C[0]&&C.unshift(""),C.length<2&&C.unshift(""),A.pathname=C.join("/")}if(A.search=t.search,A.query=t.query,A.host=t.host||"",A.auth=t.auth,A.hostname=t.hostname||t.host,A.port=t.port,A.pathname||A.search){var h=A.pathname||"",d=A.search||"";A.path=h+d}return A.slashes=A.slashes||t.slashes,A.href=A.format(),A}var Q=A.pathname&&"/"===A.pathname.charAt(0),E=t.host||t.pathname&&"/"===t.pathname.charAt(0),p=E||Q||A.host&&t.pathname,y=p,v=A.pathname&&A.pathname.split("/")||[],m=(C=t.pathname&&t.pathname.split("/")||[],A.protocol&&!f[A.protocol]);if(m&&(A.hostname="",A.port=null,A.host&&(""===v[0]?v[0]=A.host:v.unshift(A.host)),A.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===C[0]?C[0]=t.host:C.unshift(t.host)),t.host=null),p=p&&(""===C[0]||""===v[0])),E)A.host=t.host||""===t.host?t.host:A.host,A.hostname=t.hostname||""===t.hostname?t.hostname:A.hostname,A.search=t.search,A.query=t.query,v=C;else if(C.length)v||(v=[]),v.pop(),v=v.concat(C),A.search=t.search,A.query=t.query;else if(!r.isNullOrUndefined(t.search)){if(m)A.hostname=A.host=v.shift(),(D=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@"))&&(A.auth=D.shift(),A.host=A.hostname=D.shift());return A.search=t.search,A.query=t.query,r.isNull(A.pathname)&&r.isNull(A.search)||(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.href=A.format(),A}if(!v.length)return A.pathname=null,A.search?A.path="/"+A.search:A.path=null,A.href=A.format(),A;for(var b=v.slice(-1)[0],F=(A.host||t.host||v.length>1)&&("."===b||".."===b)||""===b,w=0,S=v.length;S>=0;S--)"."===(b=v[S])?v.splice(S,1):".."===b?(v.splice(S,1),w++):w&&(v.splice(S,1),w--);if(!p&&!y)for(;w--;w)v.unshift("..");!p||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),F&&"/"!==v.join("/").substr(-1)&&v.push("");var D,R=""===v[0]||v[0]&&"/"===v[0].charAt(0);m&&(A.hostname=A.host=R?"":v.length?v.shift():"",(D=!!(A.host&&A.host.indexOf("@")>0)&&A.host.split("@"))&&(A.auth=D.shift(),A.host=A.hostname=D.shift()));return(p=p||A.host&&v.length)&&!R&&v.unshift(""),v.length?A.pathname=v.join("/"):(A.pathname=null,A.path=null),r.isNull(A.pathname)&&r.isNull(A.search)||(A.path=(A.pathname?A.pathname:"")+(A.search?A.search:"")),A.auth=t.auth||A.auth,A.slashes=A.slashes||t.slashes,A.href=A.format(),A},i.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,A){"use strict";A.d(e,"a",(function(){return B}));var n=A(111),r=A(102),i=A(128),o=A(129),a=A(88),s=A(320),g=A(37),c=A(65),I=A(27),u=A(181);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var C=[0,0,0],h={},B=function(t){Object(i.a)(A,t);var e=l(A);function A(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(n.a)(this,A),t=e.call(this,-0,-0,-0),1===arguments.length&&Object(g.f)(r)?t.copy(r):(g.b.debug&&(Object(c.a)(r),Object(c.a)(i),Object(c.a)(o)),t[0]=r,t[1]=i,t[2]=o),t}return Object(r.a)(A,null,[{key:"ZERO",get:function(){return h.ZERO=h.ZERO||Object.freeze(new A(0,0,0,0))}}]),Object(r.a)(A,[{key:"set",value:function(t,e,A){return this[0]=t,this[1]=e,this[2]=A,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return g.b.debug&&(Object(c.a)(t.x),Object(c.a)(t.y),Object(c.a)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"angle",value:function(t){return I.a(this,t)}},{key:"cross",value:function(t){return I.c(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?C:A;return I.k(this,this,n,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?C:A;return I.l(this,this,n,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?C:A;return I.m(this,this,n,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return I.q(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return Object(u.c)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return I.p(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return Object(u.b)(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return I.r(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=Object(c.a)(t)}}]),A}(s.a)},function(t,e,A){"use strict";(function(t){A.d(e,"a",(function(){return i}));var n=A(26),r=A(313);function i(){return!("object"===("undefined"===typeof t?"undefined":Object(n.a)(t))&&"[object process]"===String(t)&&!t.browser)||Object(r.a)()}}).call(this,A(62))},function(t,e,A){"use strict";(function(t){A.d(e,"a",(function(){return r}));var n=A(26);function r(e){if("undefined"!==typeof window&&"object"===Object(n.a)(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!==typeof t&&"object"===Object(n.a)(t.versions)&&Boolean(t.versions.electron))return!0;var A="object"===("undefined"===typeof navigator?"undefined":Object(n.a)(navigator))&&"string"===typeof navigator.userAgent&&navigator.userAgent,r=e||A;return!!(r&&r.indexOf("Electron")>=0)}}).call(this,A(62))},function(t,e,A){"use strict";function n(){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(t){return!1}}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(263);function r(t,e){if(t){if("string"===typeof t)return Object(n.a)(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Object(n.a)(t,e):void 0}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return u}));var n=A(67),r=A(59),i=A(109),o=A(112),a=A(78),s=A(231),g=A(51),c=A(48);function I(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var u=function(t){Object(i.a)(A,t);var e=I(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"toString",value:function(){var t="[";if(c.a.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var A=0;A<this.RANK;++A)t+=" ".concat(this[A*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,A){return this[e*this.RANK+t]=Object(g.a)(A),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),A=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[A+n];return e}},{key:"setColumn",value:function(t,e){for(var A=t*this.RANK,n=0;n<this.RANK;++n)this[A+n]=e[n];return this}}]),A}(s.a)},function(t,e,A){(function(t){var n=A(654),r=A(469),i=A(662),o=A(663),a=A(310),s=e;s.request=function(e,A){e="string"===typeof e?a.parse(e):i(e);var r=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||r,s=e.hostname||e.host,g=e.port,c=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?o+"//"+s:"")+(g?":"+g:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var I=new n(e);return A&&I.on("response",A),I},s.get=function(t,e){var A=s.request(t,e);return A.end(),A},s.ClientRequest=n,s.IncomingMessage=r.IncomingMessage,s.Agent=function(){},s.Agent.defaultMaxSockets=4,s.globalAgent=new s.Agent,s.STATUS_CODES=o,s.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,A(58))},function(t,e,A){"use strict";function n(t){this.wrapped=t}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(265);function r(t,e){if(t){if("string"===typeof t)return Object(n.a)(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Object(n.a)(t,e):void 0}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return u}));var n=A(111),r=A(102),i=A(128),o=A(129),a=A(88),s=A(327),g=A(65),c=A(138);function I(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var u=function(t){Object(i.a)(A,t);var e=I(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"copy",value:function(t){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 t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A){var n=this[A]-t[A];e+=n*n}return Object(g.a)(e)}},{key:"dot",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A)e+=this[A]*t[A];return Object(g.a)(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return Object(c.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),Object(g.a)(this[t])}},{key:"setComponent",value:function(t,e){return Object(c.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=Object(g.a)(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=Object(g.a)(t)}}]),A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return I}));var n=A(5),r=A(4),i=A(16),o=A(7),a=A(14),s=A(178),g=A(36),c=A(33),I=function(t){function e(){return Object(n.a)(this,e),Object(i.a)(this,Object(o.a)(e).apply(this,arguments))}return Object(a.a)(e,t),Object(r.a)(e,[{key:"toString",value:function(){var t="[";if(c.f.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var A=0;A<this.RANK;++A)t+=" ".concat(this[A*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,A){return this[e*this.RANK+t]=Object(g.a)(A),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),A=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[A+n];return e}},{key:"setColumn",value:function(t,e){for(var A=t*this.RANK,n=0;n<this.RANK;++n)this[A+n]=e[n];return this}}]),e}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(266);function r(t,e){if(t){if("string"===typeof t)return Object(n.a)(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Object(n.a)(t,e):void 0}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return u}));var n=A(105),r=A(97),i=A(106),o=A(107),a=A(74),s=A(232),g=A(47),c=A(46);function I(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var u=function(t){Object(i.a)(A,t);var e=I(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"toString",value:function(){var t="[";if(c.b.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var A=0;A<this.RANK;++A)t+=" ".concat(this[A*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,A){return this[e*this.RANK+t]=Object(g.a)(A),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),A=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[A+n];return e}},{key:"setColumn",value:function(t,e){for(var A=t*this.RANK,n=0;n<this.RANK;++n)this[A+n]=e[n];return this}}]),A}(s.a)},function(t,e,A){"use strict";function n(t){for(var e=t.data,A=t.getIndex,n=t.dataRange,r=t.replace,i=n.startRow,o=void 0===i?0:i,a=n.endRow,s=void 0===a?1/0:a,g=e.length,c=g,I=g,u=0;u<g;u++){var l=A(e[u]);if(c>u&&l>=o&&(c=u),l>=s){I=u;break}}for(var C=c,h=I-c!==r.length,B=h&&e.slice(I),f=0;f<r.length;f++)e[C++]=r[f];if(h){for(var d=0;d<B.length;d++)e[C++]=B[d];e.length=C}return{startRow:c,endRow:c+r.length}}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return B}));var n=A(1),r=A(5),i=A(4),o=A(35),a=A(14),s=A(16),g=A(7),c=A(204),I=A(19);function u(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function l(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?u(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):u(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}var h={blendFunc:[1,0,32771,0],blendEquation:32774},B=function(t){Object(a.a)(A,t);var e=C(A);function A(){return Object(r.a)(this,A),e.apply(this,arguments)}return Object(i.a)(A,[{key:"render",value:function(t){t.pickingFBO?(this.useAlpha=!0,this._drawPickingBuffer(t)):(this.useAlpha=!1,Object(o.a)(Object(g.a)(A.prototype),"render",this).call(this,t))}},{key:"_drawPickingBuffer",value:function(t){var e=this,n=t.layers,r=t.layerFilter,i=t.views,a=t.viewports,s=t.onViewportActive,c=t.pickingFBO,u=t.deviceRect,C=u.x,B=u.y,f=u.width,d=u.height,Q=t.pass,E=void 0===Q?"picking":Q,p=t.redrawReason,y=t.pickZ,v=this.gl;return this.pickZ=y,Object(I.o)(v,l(l({scissorTest:!0,scissor:[C,B,f,d],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0]},h),{},{blend:!y}),(function(){Object(o.a)(Object(g.a)(A.prototype),"render",e).call(e,{target:c,layers:n,layerFilter:r,views:i,viewports:a,onViewportActive:s,pass:E,redrawReason:p})}))}},{key:"shouldDrawLayer",value:function(t){return t.props.pickable}},{key:"getModuleParameters",value:function(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}},{key:"getLayerParameters",value:function(t,e){var A=this.pickZ?{blend:!1}:l(l({},h),{},{blend:!0,blendColor:[0,0,0,this.useAlpha?(e+1)/255:1]});return Object.assign({},t.props.parameters,A)}}]),A}(c.a)},function(t,e,A){"use strict";var n=A(319);function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}(t,e)||Object(n.a)(t,e)||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.")}()}A.d(e,"a",(function(){return r}))},function(t,e,A){"use strict";var n=A(111),r=A(102),i=A(128),o=A(129),a=A(88),s=A(225);var g=A(329);function c(t){var e="function"===typeof Map?new Map:void 0;return(c=function(t){if(null===t||(A=t,-1===Function.toString.call(A).indexOf("[native code]")))return t;var A;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Object(g.a)(t,arguments,Object(a.a)(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Object(s.a)(n,t)})(t)}var I=A(37),u=A(138);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}A.d(e,"a",(function(){return C}));var C=function(t){Object(i.a)(A,t);var e=l(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)this[A]=t[A+e];return this.check()}},{key:"to",value:function(t){return t===this?this:Object(I.f)(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)t[e+A]=this[A];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(I.b)}},{key:"formatString",value:function(t){for(var e="",A=0;A<this.ELEMENTS;++A)e+=(A>0?", ":"")+Object(I.e)(this[A],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!Object(I.d)(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,A){void 0===A&&(A=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var r=t[n];this[n]=r+A*(e[n]-r)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t[A]),e[A]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(I.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 t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"ELEMENTS",get:function(){return Object(u.a)(!1),0}},{key:"RANK",get:function(){return Object(u.a)(!1),0}},{key:"elements",get:function(){return this}}]),A}(c(Array))},function(t,e,A){"use strict";var n=A(223);function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,e,A){return(i=r()?Reflect.construct:function(t,e,A){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return A&&Object(n.a)(i,A.prototype),i}).apply(null,arguments)}A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";var n=A(225);function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,e,A){return(i=r()?Reflect.construct:function(t,e,A){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return A&&Object(n.a)(i,A.prototype),i}).apply(null,arguments)}A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";var n=A(229);function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,e,A){return(i=r()?Reflect.construct:function(t,e,A){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return A&&Object(n.a)(i,A.prototype),i}).apply(null,arguments)}A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";function n(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==t&&void 0!==t&&this.setState(t)}function r(t){this.setState(function(e){var A=this.constructor.getDerivedStateFromProps(t,e);return null!==A&&void 0!==A?A:null}.bind(this))}function i(t,e){try{var A=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(A,n)}finally{this.props=A,this.state=n}}function o(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof t.getDerivedStateFromProps&&"function"!==typeof e.getSnapshotBeforeUpdate)return t;var A=null,o=null,a=null;if("function"===typeof e.componentWillMount?A="componentWillMount":"function"===typeof e.UNSAFE_componentWillMount&&(A="UNSAFE_componentWillMount"),"function"===typeof e.componentWillReceiveProps?o="componentWillReceiveProps":"function"===typeof e.UNSAFE_componentWillReceiveProps&&(o="UNSAFE_componentWillReceiveProps"),"function"===typeof e.componentWillUpdate?a="componentWillUpdate":"function"===typeof e.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==A||null!==o||null!==a){var s=t.displayName||t.name,g="function"===typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+g+" but also contains the following legacy lifecycles:"+(null!==A?"\n  "+A:"")+(null!==o?"\n  "+o:"")+(null!==a?"\n  "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof t.getDerivedStateFromProps&&(e.componentWillMount=n,e.componentWillReceiveProps=r),"function"===typeof e.getSnapshotBeforeUpdate){if("function"!==typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=i;var c=e.componentDidUpdate;e.componentDidUpdate=function(t,e,A){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:A;c.call(this,t,e,n)}}return t}A.d(e,"a",(function(){return o})),n.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(t,e){},function(t,e,A){"use strict";A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a}));var n=A(22),r=A(19),i=A(49);function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.framebuffer,n=void 0===A?null:A,o=e.color,a=void 0===o?null:o,s=e.depth,g=void 0===s?null:s,c=e.stencil,I=void 0===c?null:c,u={};n&&(u.framebuffer=n);var l=0;a&&(l|=16384,!0!==a&&(u.clearColor=a)),g&&(l|=256,!0!==g&&(u.clearDepth=g)),I&&(l|=1024,!0!==g&&(u.clearStencil=g)),Object(i.a)(0!==l,"clear: bad arguments"),Object(r.o)(t,u,(function(){t.clear(l)}))}function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.framebuffer,o=void 0===A?null:A,a=e.buffer,s=void 0===a?6144:a,g=e.drawBuffer,c=void 0===g?0:g,I=e.value,u=void 0===I?[0,0,0,0]:I;Object(r.a)(t),Object(r.o)(t,{framebuffer:o},(function(){switch(s){case 6144:switch(u.constructor){case Int32Array:t.clearBufferiv(s,c,u);break;case Uint32Array:t.clearBufferuiv(s,c,u);break;case Float32Array:default:t.clearBufferfv(s,c,u)}break;case 6145:t.clearBufferfv(6145,0,[u]);break;case 6146:t.clearBufferiv(6146,0,[u]);break;case 34041:var e=Object(n.a)(u,2),A=e[0],r=e[1];t.clearBufferfi(34041,0,A,r);break;default:Object(i.a)(!1,"clear: bad arguments")}}))}},function(t,e,A){"use strict";function n(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n,r=A(1),i=A(151),o=A(334);A.d(e,"a",(function(){return s})),A.d(e,"c",(function(){return u})),A.d(e,"b",(function(){return l}));var a=(n={},Object(r.a)(n,i.b,"#ifdef MODULE_LOGDEPTH\n  logdepth_adjustPosition(gl_Position);\n#endif\n"),Object(r.a)(n,i.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"),n),s="__LUMA_INJECT_DECLARATIONS__",g=/void\s+main\s*\([^)]*\)\s*\{\n?/,c=/}\n?[^{}]*$/,I=[];function u(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=e===i.b,o=function(e){var n=A[e];n.sort((function(t,e){return t.order-e.order})),I.length=n.length;for(var i=0,o=n.length;i<o;++i)I[i]=n[i].injection;var a="".concat(I.join("\n"),"\n");switch(e){case"vs:#decl":r&&(t=t.replace(s,a));break;case"vs:#main-start":r&&(t=t.replace(g,(function(t){return t+a})));break;case"vs:#main-end":r&&(t=t.replace(c,(function(t){return a+t})));break;case"fs:#decl":r||(t=t.replace(s,a));break;case"fs:#main-start":r||(t=t.replace(g,(function(t){return t+a})));break;case"fs:#main-end":r||(t=t.replace(c,(function(t){return a+t})));break;default:t=t.replace(e,(function(t){return t+a}))}};for(var u in A)o(u);return t=t.replace(s,""),n&&(t=t.replace(/\}\s*$/,(function(t){return t+a[e]}))),t}function l(t){var e={};return Object(o.a)(Array.isArray(t)&&t.length>1),t.forEach((function(t){for(var A in t)e[A]=e[A]?"".concat(e[A],"\n").concat(t[A]):t[A]})),e}},,function(t,e,A){var n=A(144).Symbol;t.exports=n},function(t,e,A){"use strict";A.d(e,"c",(function(){return i})),A.d(e,"b",(function(){return o})),A.d(e,"a",(function(){return s}));var n=A(26),r=A(80).b.COMPONENT;function i(t){var e=u(t);for(var A in e){var n=e[A],r=n.validate;if(r&&!r(t[A],n))throw new Error("Invalid prop ".concat(A,": ").concat(t[A]))}}function o(t,e){var A=s({newProps:t,oldProps:e,propTypes:u(t),ignoreProps:{data:null,updateTriggers:null,extensions:null,transitions:null}}),n=function(t,e){if(null===e)return"oldProps is null, initial diff";var A=null,n=t.dataComparator,r=t._dataDiff;n?n(t.data,e.data)||(A="Data comparator detected a change"):t.data!==e.data&&(A="A new data container was supplied");A&&r&&(A=r(t.data,e.data)||A);return A}(t,e),r=!1;return n||(r=function(t,e){if(null===e)return"oldProps is null, initial diff";if("all"in t.updateTriggers){if(I(t,e,"all"))return{all:!0}}var A={},n=!1;for(var r in t.updateTriggers){if("all"!==r)I(t,e,r)&&(A[r]=!0,n=A)}return n}(t,e)),{dataChanged:n,propsChanged:A,updateTriggersChanged:r,extensionsChanged:c(t,e),transitionsChanged:a(t,e)}}function a(t,e){if(!t.transitions)return null;var A={},n=u(t);for(var r in t.transitions){var i=n[r],o=i&&i.type;("number"===o||"color"===o||"array"===o)&&g(t[r],e[r],i)&&(A[r]=!0)}return A}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.newProps,A=t.oldProps,r=t.ignoreProps,i=void 0===r?{}:r,o=t.propTypes,a=void 0===o?{}:o,s=t.triggerName,c=void 0===s?"props":s;if(A===e)return null;if("object"!==Object(n.a)(e)||null===e)return"".concat(c," changed shallowly");if("object"!==Object(n.a)(A)||null===A)return"".concat(c," changed shallowly");for(var I=0,u=Object.keys(e);I<u.length;I++){var l=u[I];if(!(l in i)){if(!(l in A))return"".concat(c,".").concat(l," added");var C=g(e[l],A[l],a[l]);if(C)return"".concat(c,".").concat(l," ").concat(C)}}for(var h=0,B=Object.keys(A);h<B.length;h++){var f=B[h];if(!(f in i)){if(!(f in e))return"".concat(c,".").concat(f," dropped");if(!Object.hasOwnProperty.call(e,f)){var d=g(e[f],A[f],a[f]);if(d)return"".concat(c,".").concat(f," ").concat(d)}}}return null}function g(t,e,A){var n=A&&A.equal;return n&&!n(t,e,A)?"changed deeply":n||!(n=t&&e&&t.equals)||n.call(t,e)?n||e===t?null:"changed shallowly":"changed deeply"}function c(t,e){if(null===e)return"oldProps is null, initial diff";var A=e.extensions,n=t.extensions;if(n===A)return!1;if(n.length!==A.length)return!0;for(var r=0;r<n.length;r++)if(!n[r].equals(A[r]))return!0;return!1}function I(t,e,A){var n=t.updateTriggers[A];n=void 0===n||null===n?{}:n;var r=e.updateTriggers[A];return s({oldProps:r=void 0===r||null===r?{}:r,newProps:n,triggerName:A})}function u(t){var e=t[r],A=e&&e.constructor;return A?A._propTypes:{}}},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(14),o=A(16),a=A(7),s=A(525),g=A(233),c=A(401),I=A(287),u=A(243),l=A(39),C=A(1),h=A(35),B=A(204),f=A(199),d=A(147),Q=A(19);function E(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function p(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?E(Object(A),!0).forEach((function(e){Object(C.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):E(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function y(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var v=function(t){Object(i.a)(A,t);var e=y(A);function A(t,r){var i,o,a;return Object(n.a)(this,A),(a=e.call(this,t,r)).shadowMap=new g.a(t,{width:1,height:1,parameters:(i={},Object(C.a)(i,10241,9729),Object(C.a)(i,10240,9729),Object(C.a)(i,10242,33071),Object(C.a)(i,10243,33071),i)}),a.depthBuffer=new f.a(t,{format:33189,width:1,height:1}),a.fbo=new d.a(t,{id:"shadowmap",width:1,height:1,attachments:(o={},Object(C.a)(o,36064,a.shadowMap),Object(C.a)(o,36096,a.depthBuffer),o)}),a}return Object(r.a)(A,[{key:"render",value:function(t){var e=this,n=this.fbo;Object(Q.o)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},(function(){var r=t.viewports[0],i=Object(Q.e)(e.gl),o=r.width*i,s=r.height*i;o===n.width&&s===n.height||n.resize({width:o,height:s}),Object(h.a)(Object(a.a)(A.prototype),"render",e).call(e,p(p({},t),{},{target:n,pass:"shadow"}))}))}},{key:"shouldDrawLayer",value:function(t){return!1!==t.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)}}]),A}(B.a),m=A(230);function b(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return F(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return F(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function w(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}A.d(e,"a",(function(){return U}));var S={color:[255,255,255],intensity:1},D=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],R=[0,0,0,200/255],U=function(t){Object(i.a)(A,t);var e=w(A);function A(t){var r;for(var i in Object(n.a)(this,A),(r=e.call(this,t)).ambientLight=null,r.directionalLights=[],r.pointLights=[],r.shadowColor=R,r.shadowPasses=[],r.shadowMaps=[],r.dummyShadowMap=null,r.shadow=!1,r.programManager=null,t){var o=t[i];switch(o.type){case"ambient":r.ambientLight=o;break;case"directional":r.directionalLights.push(o);break;case"point":r.pointLights.push(o)}}return r._applyDefaultLights(),r.shadow=r.directionalLights.some((function(t){return t.shadow})),r}return Object(r.a)(A,[{key:"preRender",value:function(t,e){var A=e.layers,n=e.layerFilter,r=e.viewports,i=e.onViewportActive,o=e.views;if(this.shadow){this.shadowMatrices=this._createLightMatrix(),0===this.shadowPasses.length&&this._createShadowPasses(t),this.programManager||(this.programManager=s.a.getDefaultProgramManager(t),m.a&&this.programManager.addDefaultModule(m.a)),this.dummyShadowMap||(this.dummyShadowMap=new g.a(t,{width:1,height:1}));for(var a=0;a<this.shadowPasses.length;a++){this.shadowPasses[a].render({layers:A,layerFilter:n,viewports:r,onViewportActive:i,views:o,moduleParameters:{shadowLightId:a,dummyShadowMap:this.dummyShadowMap,shadowMatrices:this.shadowMatrices}})}}}},{key:"getModuleParameters",value:function(t){var e=this.shadow?{shadowMaps:this.shadowMaps,dummyShadowMap:this.dummyShadowMap,shadowColor:this.shadowColor,shadowMatrices:this.shadowMatrices}:{};return e.lightSources={ambientLight:this.ambientLight,directionalLights:this.directionalLights.map((function(e){return e.getProjectedLight({layer:t})})),pointLights:this.pointLights.map((function(e){return e.getProjectedLight({layer:t})}))},e}},{key:"cleanup",value:function(){var t,e=b(this.shadowPasses);try{for(e.s();!(t=e.n()).done;){t.value.delete()}}catch(A){e.e(A)}finally{e.f()}this.shadowPasses.length=0,this.shadowMaps.length=0,this.dummyShadowMap&&(this.dummyShadowMap.delete(),this.dummyShadowMap=null),this.shadow&&this.programManager&&(this.programManager.removeDefaultModule(m.a),this.programManager=null)}},{key:"_createLightMatrix",value:function(){var t,e=[],A=b(this.directionalLights);try{for(A.s();!(t=A.n()).done;){var n=t.value,r=(new l.a).lookAt({eye:new l.c(n.direction).negate()});e.push(r)}}catch(i){A.e(i)}finally{A.f()}return e}},{key:"_createShadowPasses",value:function(t){for(var e=0;e<this.directionalLights.length;e++){var A=new v(t);this.shadowPasses[e]=A,this.shadowMaps[e]=A.shadowMap}}},{key:"_applyDefaultLights",value:function(){var t=this.ambientLight,e=this.pointLights,A=this.directionalLights;t||0!==e.length||0!==A.length||(this.ambientLight=new c.a(S),this.directionalLights.push(new I.a(D[0]),new I.a(D[1])))}}]),A}(u.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return I})),A.d(e,"b",(function(){return u}));var n=A(22),r=A(40),i=A(283),o=A(277),a=A(45),s=A(27),g=A(72);function c(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.projectPosition(t);if(A&&e instanceof o.a){var i=Object(n.a)(t,3),a=i[0],s=i[1],g=i[2],c=void 0===g?0:g,I=e.getDistanceScales([a,s]);r[2]=c*I.unitsPerMeter[2]}return r}function I(t,e){var A=e.viewport,i=e.modelMatrix,o=e.coordinateSystem,s=e.coordinateOrigin,I=e.offsetMode,u=Object(n.a)(t,3),l=u[0],C=u[1],h=u[2],B=void 0===h?0:h;if(i){var f=a.n([],[l,C,B,1],i),d=Object(n.a)(f,3);l=d[0],C=d[1],B=d[2]}switch(o){case r.a.LNGLAT:return c([l,C,B],A,I);case r.a.LNGLAT_OFFSETS:return c([l+s[0],C+s[1],B+(s[2]||0)],A,I);case r.a.METER_OFFSETS:return c(Object(g.a)(s,[l,C,B]),A,I);case r.a.CARTESIAN:default:return A.isGeospatial?[l+s[0],C+s[1],B+s[2]]:A.projectPosition([l,C,B])}}function u(t,e){var A=function(t){var e=Object.assign({},t),A=t.coordinateSystem,n=t.viewport,i=t.coordinateOrigin,o=t.fromCoordinateSystem,a=t.fromCoordinateOrigin;return A===r.a.DEFAULT&&(A=n.isGeospatial?r.a.LNGLAT:r.a.CARTESIAN),void 0===o&&(e.fromCoordinateSystem=A),void 0===a&&(e.fromCoordinateOrigin=i),e.coordinateSystem=A,e}(e),n=A.viewport,o=A.coordinateSystem,a=A.coordinateOrigin,g=A.modelMatrix,c=A.fromCoordinateSystem,u=A.fromCoordinateOrigin,l=Object(i.a)(n,o,a),C=l.geospatialOrigin,h=l.shaderCoordinateOrigin,B=l.offsetMode,f=I(t,{viewport:n,modelMatrix:g,coordinateSystem:c,coordinateOrigin:u,offsetMode:B});if(B){var d=n.projectPosition(C||h);s.o(f,f,d)}return f}},function(t,e,A){"use strict";var n="#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";function r(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return i(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return i(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==A.return||A.return()}finally{if(s)throw o}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return g}));var o={lightSources:{}};function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.color,A=void 0===e?[0,0,0]:e,n=t.intensity,r=void 0===n?1:n;return A.map((function(t){return t*r/255}))}function s(t){var e=t.ambientLight,A=t.pointLights,n=void 0===A?[]:A,r=t.directionalLights,i=void 0===r?[]:r,o={};return o["lighting_uAmbientLight.color"]=e?a(e):[0,0,0],n.forEach((function(t,e){o["lighting_uPointLight[".concat(e,"].color")]=a(t),o["lighting_uPointLight[".concat(e,"].position")]=t.position,o["lighting_uPointLight[".concat(e,"].attenuation")]=t.attenuation||[1,0,0]})),o.lighting_uPointLightCount=n.length,i.forEach((function(t,e){o["lighting_uDirectionalLight[".concat(e,"].color")]=a(t),o["lighting_uDirectionalLight[".concat(e,"].direction")]=t.direction})),o.lighting_uDirectionalLightCount=i.length,o}var g={name:"lights",vs:n,fs:n,getUniforms:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;if("lightSources"in e){var A=e.lightSources||{},n=A.ambientLight,i=A.pointLights,a=A.directionalLights,g=n||i&&i.length>0||a&&a.length>0;return g?Object.assign({},s({ambientLight:n,pointLights:i,directionalLights:a}),{lighting_uEnabled:!0}):{lighting_uEnabled:!1}}if("lights"in e){var c,I={pointLights:[],directionalLights:[]},u=r(e.lights||[]);try{for(u.s();!(c=u.n()).done;){var l=c.value;switch(l.type){case"ambient":I.ambientLight=l;break;case"directional":I.directionalLights.push(l);break;case"point":I.pointLights.push(l)}}}catch(C){u.e(C)}finally{u.f()}return t({lightSources:I})}return{}},defines:{MAX_LIGHTS:3}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return g}));var n=A(5),r=A(4),i=A(39),o=A(55);function a(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return s(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return s(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var g=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(n.a)(this,t),Array.isArray(e)&&(e={compare:e,extract:e,required:e});var A=e,r=A.compare,i=A.extract,o=A.required;this._propsToCompare=r,this._propsToExtract=i,this._requiredProps=o}return Object(r.a)(t,[{key:"arePropsEqual",value:function(t,e){var A,n=a(this._propsToCompare||Object.keys(e));try{for(n.s();!(A=n.n()).done;){var r=A.value;if(!(r in t)||!(r in e)||!Object(i.f)(t[r],e[r]))return!1}}catch(o){n.e(o)}finally{n.f()}return!0}},{key:"initializeProps",value:function(t,e){var A;if(this._propsToExtract){var n,r={},i={},o=a(this._propsToExtract);try{for(o.s();!(n=o.n()).done;){var s=n.value;r[s]=t[s],i[s]=e[s]}}catch(g){o.e(g)}finally{o.f()}A={start:r,end:i}}else A={start:t,end:e};return this._checkRequiredProps(A.start),this._checkRequiredProps(A.end),A}},{key:"interpolateProps",value:function(t,e,A){return e}},{key:"getDuration",value:function(t,e){return e.transitionDuration}},{key:"_checkRequiredProps",value:function(t){this._requiredProps&&this._requiredProps.forEach((function(e){var A=t[e];Object(o.a)(Number.isFinite(A)||Array.isArray(A),"".concat(e," is required for transition"))}))}}]),t}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return S})),A.d(e,"b",(function(){return D}));var n=A(1),r=A(22),i=A(5),o=A(4),a=A(14),s=A(16),g=A(7),c=A(39),I=A(170),u=A(284),l=A(72),C=A(55),h=A(155),B=A(143);function f(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function d(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?f(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):f(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Q(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}var E={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new h.a,transitionInterruption:B.a.BREAK},p=0,y=0,v=1.5,m=0,b=20,F=0,w=60,S=function(t){Object(a.a)(A,t);var e=Q(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.makeViewport,o=n.width,a=n.height,s=n.latitude,g=n.longitude,c=n.zoom,I=n.bearing,u=void 0===I?y:I,l=n.pitch,h=void 0===l?p:l,B=n.altitude,f=void 0===B?v:B,d=n.maxZoom,Q=void 0===d?b:d,E=n.minZoom,S=void 0===E?m:E,D=n.maxPitch,R=void 0===D?w:D,U=n.minPitch,G=void 0===U?F:U,N=n.startPanLngLat,k=n.startZoomLngLat,x=n.startRotatePos,O=n.startBearing,M=n.startPitch,L=n.startZoom;return Object(i.a)(this,A),Object(C.a)(Number.isFinite(g),"`longitude` must be supplied"),Object(C.a)(Number.isFinite(s),"`latitude` must be supplied"),Object(C.a)(Number.isFinite(c),"`zoom` must be supplied"),(t=e.call(this,{width:o,height:a,latitude:s,longitude:g,zoom:c,bearing:u,pitch:h,altitude:f,maxZoom:Q,minZoom:S,maxPitch:R,minPitch:G}))._state={startPanLngLat:N,startZoomLngLat:k,startRotatePos:x,startBearing:O,startPitch:M,startZoom:L},t.makeViewport=r,t}return Object(o.a)(A,[{key:"panStart",value:function(t){var e=t.pos;return this._getUpdatedState({startPanLngLat:this._unproject(e)})}},{key:"pan",value:function(t){var e=t.pos,A=t.startPos,n=this._state.startPanLngLat||this._unproject(A);if(!n)return this;var i=this._calculateNewLngLat({startPanLngLat:n,pos:e}),o=Object(r.a)(i,2),a=o[0],s=o[1];return this._getUpdatedState({longitude:a,latitude:s})}},{key:"panEnd",value:function(){return this._getUpdatedState({startPanLngLat:null})}},{key:"rotateStart",value:function(t){var e=t.pos;return this._getUpdatedState({startRotatePos:e,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e,A=t.pos,n=t.deltaAngleX,r=void 0===n?0:n,i=t.deltaAngleY,o=void 0===i?0:i,a=this._state,s=a.startRotatePos,g=a.startBearing,c=a.startPitch;return s&&Number.isFinite(g)&&Number.isFinite(c)?(e=A?this._calculateNewPitchAndBearing(d(d({},this._getRotationParams(A,s)),{},{startBearing:g,startPitch:c})):{bearing:g+r,pitch:c+o},this._getUpdatedState(e)):this}},{key:"rotateEnd",value:function(){return this._getUpdatedState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedState({startZoomLngLat:this._unproject(e),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,A=t.startPos,n=t.scale,i=this._state,o=i.startZoom,a=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,a=this._unproject(A)||this._unproject(e));var s=this._calculateNewZoom({scale:n,startZoom:o}),g=this.makeViewport(d(d({},this._viewportProps),{},{zoom:s})).getMapCenterByLngLatPosition({lngLat:a,pos:e}),c=Object(r.a)(g,2),I=c[0],u=c[1];return this._getUpdatedState({zoom:s,longitude:I,latitude:u})}},{key:"zoomEnd",value:function(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}},{key:"zoomIn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(t)}},{key:"zoomOut",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;return this._zoomFromCenter(1/t)}},{key:"moveLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([t,0])}},{key:"moveRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([-t,0])}},{key:"moveUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,t])}},{key:"moveDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;return this._panFromCenter([0,-t])}},{key:"rotateLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this._viewportProps.bearing-t})}},{key:"rotateRight",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:15;return this._getUpdatedState({bearing:this._viewportProps.bearing+t})}},{key:"rotateUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this._viewportProps.pitch+t})}},{key:"rotateDown",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;return this._getUpdatedState({pitch:this._viewportProps.pitch-t})}},{key:"shortestPathFrom",value:function(t){var e=t.getViewportProps(),A=Object.assign({},this._viewportProps),n=A.bearing,r=A.longitude;return Math.abs(n-e.bearing)>180&&(A.bearing=n<0?n+360:n-360),Math.abs(r-e.longitude)>180&&(A.longitude=r<0?r+360:r-360),A}},{key:"_zoomFromCenter",value:function(t){var e=this._viewportProps,A=e.width,n=e.height;return this.zoom({pos:[A/2,n/2],scale:t})}},{key:"_panFromCenter",value:function(t){var e=this._viewportProps,A=e.width,n=e.height;return this.pan({startPos:[A/2,n/2],pos:[A/2+t[0],n/2+t[1]]})}},{key:"_getUpdatedState",value:function(t){return new this.constructor(d(d(d({makeViewport:this.makeViewport},this._viewportProps),this._state),t))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,A=t.minZoom,n=t.zoom;t.zoom=Object(c.e)(n,A,e);var r=t.maxPitch,i=t.minPitch,o=t.pitch;return t.pitch=Object(c.e)(o,i,r),Object.assign(t,Object(l.k)(t)),t}},{key:"_unproject",value:function(t){var e=this.makeViewport(this._viewportProps);return t&&e.unproject(t)}},{key:"_calculateNewLngLat",value:function(t){var e=t.startPanLngLat,A=t.pos;return this.makeViewport(this._viewportProps).getMapCenterByLngLatPosition({lngLat:e,pos:A})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,A=t.startZoom,n=this._viewportProps,r=n.maxZoom,i=n.minZoom,o=A+Math.log2(e);return Object(c.e)(o,i,r)}},{key:"_calculateNewPitchAndBearing",value:function(t){var e=t.deltaScaleX,A=t.deltaScaleY,n=t.startBearing,r=t.startPitch;A=Object(c.e)(A,-1,1);var i=this._viewportProps,o=i.minPitch,a=i.maxPitch,s=r;return A>0?s=r+A*(a-r):A<0&&(s=r-A*(o-r)),{pitch:s,bearing:n+180*e}}},{key:"_getRotationParams",value:function(t,e){var A=t[0]-e[0],n=t[1]-e[1],r=t[1],i=e[1],o=this._viewportProps,a=o.width,s=o.height,g=A/a,c=0;return n>0?Math.abs(s-i)>5&&(c=n/(i-s)*1.2):n<0&&i>5&&(c=1-r/i),{deltaScaleX:g,deltaScaleY:c=Math.min(1,Math.max(-1,c))}}}]),A}(u.a),D=function(t){Object(a.a)(A,t);var e=Q(A);function A(t){return Object(i.a)(this,A),t.dragMode=t.dragMode||"pan",e.call(this,S,t)}return Object(o.a)(A,[{key:"_getTransitionProps",value:function(t){return t?d(d({},E),{},{transitionInterpolator:new h.a(d(d({},t),{},{makeViewport:this.controllerState.makeViewport}))}):E}}]),A}(I.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(0);function r(t){var e=t.controlled,A=t.default,r=(t.name,n.useRef(void 0!==e).current),i=n.useState(A),o=i[0],a=i[1];return[r?e:o,n.useCallback((function(t){r||a(t)}),[])]}},function(t,e,A){"use strict";function n(t){var e={type:"Feature"};return Object.keys(t).forEach((function(A){switch(A){case"type":case"properties":case"geometry":return;default:e[A]=t[A]}})),e.properties=function t(e){var A={};return e?(Object.keys(e).forEach((function(n){var r=e[n];"object"===typeof r?null===r?A[n]=null:r.length?A[n]=r.map((function(t){return t})):A[n]=t(r):A[n]=r})),A):A}(t.properties),e.geometry=r(t.geometry),e}function r(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return r(t)})),e):(e.coordinates=function t(e){if("object"!==typeof e[0])return e.slice();return e.map((function(e){return t(e)}))}(t.coordinates),e)}e.a=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return n(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(A){switch(A){case"type":case"features":return;default:e[A]=t[A]}})),e.features=t.features.map((function(t){return n(t)})),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return r(t);default:throw new Error("unknown GeoJSON type")}}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ArrowStyles",{enumerable:!0,get:function(){return n.ArrowStyles}}),Object.defineProperty(e,"DEFAULT_ARROWS",{enumerable:!0,get:function(){return n.DEFAULT_ARROWS}}),Object.defineProperty(e,"MAX_ARROWS",{enumerable:!0,get:function(){return n.MAX_ARROWS}}),Object.defineProperty(e,"SELECTION_TYPE",{enumerable:!0,get:function(){return r.SELECTION_TYPE}}),Object.defineProperty(e,"Feature",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"LayerMouseEvent",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"NebulaLayer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"JunctionsLayer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"TextsLayer",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"SegmentsLayer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"NebulaCore",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"toDeckColor",{enumerable:!0,get:function(){return u.toDeckColor}}),Object.defineProperty(e,"EditableGeoJsonLayer",{enumerable:!0,get:function(){return l.EditableGeoJsonLayer}}),Object.defineProperty(e,"SelectionLayer",{enumerable:!0,get:function(){return l.SelectionLayer}}),Object.defineProperty(e,"ElevatedEditHandleLayer",{enumerable:!0,get:function(){return l.ElevatedEditHandleLayer}}),Object.defineProperty(e,"PathOutlineLayer",{enumerable:!0,get:function(){return l.PathOutlineLayer}}),Object.defineProperty(e,"PathMarkerLayer",{enumerable:!0,get:function(){return l.PathMarkerLayer}}),Object.defineProperty(e,"GeoJsonEditMode",{enumerable:!0,get:function(){return C.GeoJsonEditMode}}),Object.defineProperty(e,"ModifyMode",{enumerable:!0,get:function(){return C.ModifyMode}}),Object.defineProperty(e,"TranslateMode",{enumerable:!0,get:function(){return C.TranslateMode}}),Object.defineProperty(e,"ScaleMode",{enumerable:!0,get:function(){return C.ScaleMode}}),Object.defineProperty(e,"RotateMode",{enumerable:!0,get:function(){return C.RotateMode}}),Object.defineProperty(e,"DuplicateMode",{enumerable:!0,get:function(){return C.DuplicateMode}}),Object.defineProperty(e,"ExtendLineStringMode",{enumerable:!0,get:function(){return C.ExtendLineStringMode}}),Object.defineProperty(e,"SplitPolygonMode",{enumerable:!0,get:function(){return C.SplitPolygonMode}}),Object.defineProperty(e,"ExtrudeMode",{enumerable:!0,get:function(){return C.ExtrudeMode}}),Object.defineProperty(e,"ElevationMode",{enumerable:!0,get:function(){return C.ElevationMode}}),Object.defineProperty(e,"TransformMode",{enumerable:!0,get:function(){return C.TransformMode}}),Object.defineProperty(e,"DrawPointMode",{enumerable:!0,get:function(){return C.DrawPointMode}}),Object.defineProperty(e,"DrawLineStringMode",{enumerable:!0,get:function(){return C.DrawLineStringMode}}),Object.defineProperty(e,"DrawPolygonMode",{enumerable:!0,get:function(){return C.DrawPolygonMode}}),Object.defineProperty(e,"DrawRectangleMode",{enumerable:!0,get:function(){return C.DrawRectangleMode}}),Object.defineProperty(e,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return C.DrawCircleByDiameterMode}}),Object.defineProperty(e,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return C.DrawCircleFromCenterMode}}),Object.defineProperty(e,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return C.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(e,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return C.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(e,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return C.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(e,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return C.Draw90DegreePolygonMode}}),Object.defineProperty(e,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return C.DrawPolygonByDraggingMode}}),Object.defineProperty(e,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return C.ImmutableFeatureCollection}}),Object.defineProperty(e,"ViewMode",{enumerable:!0,get:function(){return C.ViewMode}}),Object.defineProperty(e,"MeasureDistanceMode",{enumerable:!0,get:function(){return C.MeasureDistanceMode}}),Object.defineProperty(e,"MeasureAreaMode",{enumerable:!0,get:function(){return C.MeasureAreaMode}}),Object.defineProperty(e,"MeasureAngleMode",{enumerable:!0,get:function(){return C.MeasureAngleMode}}),Object.defineProperty(e,"CompositeMode",{enumerable:!0,get:function(){return C.CompositeMode}}),Object.defineProperty(e,"SnappableMode",{enumerable:!0,get:function(){return C.SnappableMode}});var n=A(845),r=A(846),i=h(A(1007)),o=h(A(847)),a=h(A(558)),s=h(A(1008)),g=h(A(1047)),c=h(A(1048)),I=h(A(1049)),u=A(601),l=A(779),C=A(409);function h(t){return t&&t.__esModule?t:{default:t}}},function(t,e,A){var n=A(931),r=A(932),i=A(817),o=A(816),a=o.MAX_LENGTH,s=o.MAX_SAFE_INTEGER,g=A(728),c=g.re,I=g.t,u=A(933).compareIdentifiers,l=function(){"use strict";function t(e,A){if(n(this,t),A&&"object"===typeof A||(A={loose:!!A,includePrerelease:!1}),e instanceof t){if(e.loose===!!A.loose&&e.includePrerelease===!!A.includePrerelease)return e;e=e.version}else if("string"!==typeof e)throw new TypeError("Invalid Version: ".concat(e));if(e.length>a)throw new TypeError("version is longer than ".concat(a," characters"));i("SemVer",e,A),this.options=A,this.loose=!!A.loose,this.includePrerelease=!!A.includePrerelease;var r=e.trim().match(A.loose?c[I.LOOSE]:c[I.FULL]);if(!r)throw new TypeError("Invalid Version: ".concat(e));if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((function(t){if(/^[0-9]+$/.test(t)){var e=+t;if(e>=0&&e<s)return e}return t})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}return r(t,[{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(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if("string"===typeof e&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}},{key:"compareMain",value:function(e){return e instanceof t||(e=new t(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}},{key:"comparePre",value:function(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var A=0;do{var n=this.prerelease[A],r=e.prerelease[A];if(i("prerelease compare",A,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return u(n,r)}while(++A)}},{key:"compareBuild",value:function(e){e instanceof t||(e=new t(e,this.options));var A=0;do{var n=this.build[A],r=e.build[A];if(i("prerelease compare",A,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return u(n,r)}while(++A)}},{key:"inc",value:function(t,e){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e),this.inc("pre",e);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e),this.inc("pre",e);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 A=this.prerelease.length;--A>=0;)"number"===typeof this.prerelease[A]&&(this.prerelease[A]++,A=-2);-1===A&&this.prerelease.push(0)}e&&(this.prerelease[0]===e?isNaN(this.prerelease[1])&&(this.prerelease=[e,0]):this.prerelease=[e,0]);break;default:throw new Error("invalid increment argument: ".concat(t))}return this.format(),this.raw=this.version,this}}]),t}();t.exports=l},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=(A(25),A(32)),a=A(41),s=A(66),g=i.forwardRef((function(t,e){var A=t.children,a=t.classes,g=t.className,c=t.color,I=void 0===c?"inherit":c,u=t.component,l=void 0===u?"svg":u,C=t.fontSize,h=void 0===C?"default":C,B=t.htmlColor,f=t.titleAccess,d=t.viewBox,Q=void 0===d?"0 0 24 24":d,E=Object(r.a)(t,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(l,Object(n.a)({className:Object(o.a)(a.root,g,"inherit"!==I&&a["color".concat(Object(s.a)(I))],"default"!==h&&a["fontSize".concat(Object(s.a)(h))]),focusable:"false",viewBox:Q,color:B,"aria-hidden":f?void 0:"true",role:f?"img":"presentation",ref:e},E),A,f?i.createElement("title",null,f):null)}));g.muiName="SvgIcon",e.a=Object(a.a)((function(t){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:t.typography.pxToRem(24),transition:t.transitions.create("fill",{duration:t.transitions.duration.shorter})},colorPrimary:{color:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorAction:{color:t.palette.action.active},colorError:{color:t.palette.error.main},colorDisabled:{color:t.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:t.typography.pxToRem(20)},fontSizeLarge:{fontSize:t.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(g)},function(t,e,A){"use strict";var n=A(285),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={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},a={};function s(t){return n.isMemo(t)?o:a[t.$$typeof]||r}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=o;var g=Object.defineProperty,c=Object.getOwnPropertyNames,I=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,C=Object.prototype;t.exports=function t(e,A,n){if("string"!==typeof A){if(C){var r=l(A);r&&r!==C&&t(e,r,n)}var o=c(A);I&&(o=o.concat(I(A)));for(var a=s(e),h=s(A),B=0;B<o.length;++B){var f=o[B];if(!i[f]&&(!n||!n[f])&&(!h||!h[f])&&(!a||!a[f])){var d=u(A,f);try{g(e,f,d)}catch(Q){}}}}return e}},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));A(29),A(10);var n=A(26),r=(A(25),A(195),{xs:0,sm:600,md:960,lg:1280,xl:1920}),i={keys:["xs","sm","md","lg","xl"],up:function(t){return"@media (min-width:".concat(r[t],"px)")}};function o(t,e,A){if(Array.isArray(e)){var r=t.theme.breakpoints||i;return e.reduce((function(t,n,i){return t[r.up(r.keys[i])]=A(e[i]),t}),{})}if("object"===Object(n.a)(e)){var o=t.theme.breakpoints||i;return Object.keys(e).reduce((function(t,n){return t[o.up(n)]=A(e[n]),t}),{})}return A(e)}},function(t,e,A){"use strict";e.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(t,e,A){"use strict";function n(){var t=document.createElement("div");t.style.width="99px",t.style.height="99px",t.style.position="absolute",t.style.top="-9999px",t.style.overflow="scroll",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(0);function r(t,e){return n.isValidElement(t)&&-1!==e.indexOf(t.type.muiName)}},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.default.createElement("path",{d:"M7 14l5-5 5 5z"}),"ArrowDropUp");e.default=i},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.default.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");e.default=i},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(Object.is(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var A=Object.keys(t);if(A.length!==Object.keys(e).length)return!1;for(var n=0;n<A.length;n++)if(!Object.prototype.hasOwnProperty.call(e,A[n])||!Object.is(t[A[n]],e[A[n]]))return!1;return!0}},function(t,e){t.exports=function(t,e){return t===e||t!==t&&e!==e}},function(t,e,A){"use strict";A.d(e,"c",(function(){return C})),A.d(e,"b",(function(){return h})),A.d(e,"a",(function(){return B}));var n=A(20),r=A(2),i=A.n(r),o=A(8),a=A(123),s=A(136);function g(t){return c.apply(this,arguments)}function c(){return(c=Object(o.a)(i.a.mark((function t(e){var A,n,r,o,s,g,c;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.loader,n=e.selection,r=Array.isArray(A)?A[A.length-1]:A,t.next=4,r.getRaster({selection:n});case 4:return o=t.sent,s=Object(a.j)(o.data),g=s.domain,c=s.autoSliders,t.abrupt("return",{domain:g,slider:c});case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function I(t){return u.apply(this,arguments)}function u(){return(u=Object(o.a)(i.a.mark((function t(e){var A,r,o,s,g,c,I,u,l,C,h,B;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.loader,r=e.selection,o=A[A.length-1],s=o.shape,g=o.labels,c=s[g.indexOf("z")]>>A.length-1,t.next=6,o.getRaster({selection:Object(n.a)({},r,{z:0})});case 6:return I=t.sent,t.next=9,o.getRaster({selection:Object(n.a)({},r,{z:Math.floor(c/2)})});case 9:return u=t.sent,t.next=12,o.getRaster({selection:Object(n.a)({},r,{z:c-1})});case 12:return l=t.sent,C=Object(a.j)(I.data),h=Object(a.j)(u.data),B=Object(a.j)(l.data),t.abrupt("return",{domain:[Math.min(C.domain[0],h.domain[0],B.domain[0]),Math.max(C.domain[1],h.domain[1],B.domain[1])],slider:[Math.min(C.autoSliders[0],h.autoSliders[0],B.autoSliders[0]),Math.max(C.autoSliders[1],h.autoSliders[1],B.autoSliders[1])]});case 17:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var l=function(){var t=Object(o.a)(i.a.mark((function t(e){var A,n,r,o;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.loader,n=e.selection,r=e.use3d,o=r?I:g,t.abrupt("return",o({loader:A,selection:n}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),C=function(){var t=Object(o.a)(i.a.mark((function t(e){var A,n,r,o,a,s;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.loader,n=e.selections,r=e.use3d,t.next=3,Promise.all(n.map((function(t){return l({loader:A,selection:t,use3d:r})})));case 3:return o=t.sent,a=o.map((function(t){return t.domain})),s=o.map((function(t){return t.slider})),t.abrupt("return",{domains:a,sliders:s});case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function h(t){var e=Array.isArray(t)?t[0]:t,A=e.shape,n=e.labels,r=function(t){var e,A,n=null!==(e=null===t||void 0===t||null===(A=t.meta)||void 0===A?void 0:A.physicalSizes)&&void 0!==e?e:{},r=n.x,i=n.y,o=n.z;if((null===r||void 0===r?void 0:r.size)&&(null===i||void 0===i?void 0:i.size)&&(null===o||void 0===o?void 0:o.size)){var a=Math.min(o.size,r.size,i.size),g=[r.size/a,i.size/a,o.size/a];return(new s.Matrix4).scale(g)}return(new s.Matrix4).identity()}(e);return[[0,r[0]*A[n.indexOf("x")]],[0,r[5]*A[n.indexOf("y")]],[0,r[10]*A[n.indexOf("z")]]]}function B(t){var e=5;Number.isInteger(t)||--e,t<1&&--e;var A=Intl.NumberFormat("en-US",{maximumSignificantDigits:e,useGrouping:!1}).format(t);return A.length<=5?A:t.toExponential(0)}},function(t,e,A){"use strict";function n(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return r(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return r(t,e)}(t)||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 r(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function i(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function o(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?i(Object(A),!0).forEach((function(e){s(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):i(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function a(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}Object.defineProperty(e,"__esModule",{value:!0}),e.ImmutableFeatureCollection=void 0;var g=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,"featureCollection",void 0),this.featureCollection=e}var e,A,r;return e=t,(A=[{key:"getObject",value:function(){return this.featureCollection}},{key:"replacePosition",value:function(t,e,A){var n=this.featureCollection.features[t].geometry,r="Polygon"===n.type||"MultiPolygon"===n.type,i=o({},n,{coordinates:I(n.coordinates,e,A,r)});return this.replaceGeometry(t,i)}},{key:"removePosition",value:function(t,e){var A=this.featureCollection.features[t].geometry;if("Point"===A.type)throw Error("Can't remove a position from a Point or there'd be nothing left");if("MultiPoint"===A.type&&A.coordinates.length<2)throw Error("Can't remove the last point of a MultiPoint or there'd be nothing left");if("LineString"===A.type&&A.coordinates.length<3)throw Error("Can't remove position. LineString must have at least two positions");if("Polygon"===A.type&&A.coordinates[0].length<5&&Array.isArray(e)&&0===e[0])throw Error("Can't remove position. Polygon's outer ring must have at least four positions");if("MultiLineString"===A.type&&1===A.coordinates.length&&A.coordinates[0].length<3)throw Error("Can't remove position. MultiLineString must have at least two positions");if("MultiPolygon"===A.type&&1===A.coordinates.length&&A.coordinates[0][0].length<5&&Array.isArray(e)&&0===e[0]&&0===e[1])throw Error("Can't remove position. MultiPolygon's outer ring must have at least four positions");var n="Polygon"===A.type||"MultiPolygon"===A.type,r=o({},A,{coordinates:u(A.coordinates,e,n)});return function(t){switch(t.type){case"Polygon":!function(t){for(var e=t.coordinates,A=1;A<e.length;A++)C(e,A)&&A--}(t);break;case"MultiLineString":!function(t){for(var e=0;e<t.coordinates.length;e++)1===t.coordinates[e].length&&(t.coordinates.splice(e,1),e--)}(t);break;case"MultiPolygon":!function(t){for(var e=0;e<t.coordinates.length;e++){var A=t.coordinates[e];A[0].length<=3&&(t.coordinates.splice(e,1),e--);for(var n=1;n<A.length;n++)C(A,n)&&n--}}(t)}}(r),this.replaceGeometry(t,r)}},{key:"addPosition",value:function(t,e,A){var n=this.featureCollection.features[t].geometry;if("Point"===n.type)throw new Error("Unable to add a position to a Point feature");var r="Polygon"===n.type||"MultiPolygon"===n.type,i=o({},n,{coordinates:l(n.coordinates,e,A,r)});return this.replaceGeometry(t,i)}},{key:"replaceGeometry",value:function(e,A){var r=o({},this.featureCollection.features[e],{geometry:A});return new t(o({},this.featureCollection,{features:[].concat(n(this.featureCollection.features.slice(0,e)),[r],n(this.featureCollection.features.slice(e+1)))}))}},{key:"addFeature",value:function(t){return this.addFeatures([t])}},{key:"addFeatures",value:function(e){return new t(o({},this.featureCollection,{features:[].concat(n(this.featureCollection.features),n(e))}))}},{key:"deleteFeature",value:function(t){return this.deleteFeatures([t])}},{key:"deleteFeatures",value:function(e){var A=n(this.featureCollection.features);e.sort();for(var r=e.length-1;r>=0;r--){var i=e[r];i>=0&&i<A.length&&A.splice(i,1)}return new t(o({},this.featureCollection,{features:A}))}}])&&a(e.prototype,A),r&&a(e,r),t}();function c(t,e){if(2===t.length&&3===e.length){var A=e[2];return[t[0],t[1],A]}return t}function I(t,e,A,r){if(!e)return t;if(0===e.length)return c(A,t);if(1===e.length){var i=[].concat(n(t.slice(0,e[0])),[c(A,t[e[0]])],n(t.slice(e[0]+1)));return!r||0!==e[0]&&e[0]!==t.length-1||(i[0]=c(A,t[0]),i[t.length-1]=c(A,t[0])),i}return[].concat(n(t.slice(0,e[0])),[I(t[e[0]],e.slice(1,e.length),A,r)],n(t.slice(e[0]+1)))}function u(t,e,A){if(!e)return t;if(0===e.length)throw Error("Must specify the index of the position to remove");if(1===e.length){var r=[].concat(n(t.slice(0,e[0])),n(t.slice(e[0]+1)));return!A||0!==e[0]&&e[0]!==t.length-1||(0===e[0]?r[r.length-1]=r[0]:e[0]===t.length-1&&(r[0]=r[r.length-1])),r}return[].concat(n(t.slice(0,e[0])),[u(t[e[0]],e.slice(1,e.length),A)],n(t.slice(e[0]+1)))}function l(t,e,A,r){if(!e)return t;if(0===e.length)throw Error("Must specify the index of the position to remove");return 1===e.length?[].concat(n(t.slice(0,e[0])),[A],n(t.slice(e[0]))):[].concat(n(t.slice(0,e[0])),[l(t[e[0]],e.slice(1,e.length),A,r)],n(t.slice(e[0]+1)))}function C(t,e){return t[e].length<=3&&(t.splice(e,1),!0)}e.ImmutableFeatureCollection=g},function(t,e,A){var n=A(770),r=A(771);t.exports=function(t,e,A){var i=e&&A||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;++a)e[i+a]=o[a];return e||r(o)}},function(t,e,A){"use strict";function n(t){var e,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function n(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=this,a=function(){t.apply(o,r)};clearTimeout(e),e=setTimeout(a,A)}return n.clear=function(){clearTimeout(e)},n}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n={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 r(t,e,A){if(!c(A=A||{}))throw new Error("options is invalid");var n=A.bbox,r=A.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");n&&I(n),r&&u(r);var i={type:"Feature"};return r&&(i.id=r),n&&(i.bbox=n),i.properties=e||{},i.geometry=t,i}function i(t,e,A){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,A)}function o(t,e){if(void 0===t||null===t)throw new Error("distance is required");if(e&&"string"!==typeof e)throw new Error("units must be a string");var A=n[e||"kilometers"];if(!A)throw new Error(e+" units is invalid");return t/A}function a(t){if(null===t||void 0===t)throw new Error("degrees is required");return t%360*Math.PI/180}function s(t,e,A){if(null===t||void 0===t)throw new Error("length is required");if(!(t>=0))throw new Error("length must be a positive number");return function(t,e){if(void 0===t||null===t)throw new Error("radians is required");if(e&&"string"!==typeof e)throw new Error("units must be a string");var A=n[e||"kilometers"];if(!A)throw new Error(e+" units is invalid");return t*A}(o(t,e),A||"kilometers")}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function c(t){return!!t&&t.constructor===Object}function I(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!g(t))throw new Error("bbox must only contain numbers")}))}function u(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}e.a=function(t,e,A,n){if(!c(n=n||{}))throw new Error("options is invalid");var r=n.units,o=n.properties;if(!t)throw new Error("origin is required");if(void 0===e||null===e)throw new Error("distance is required");if(void 0===A||null===A)throw new Error("bearing is required");if(!(e>=0))throw new Error("distance must be greater than 0");var g=s(e,r,"meters"),I=function(t){if(!t)throw new Error("coord is required");if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates;if(Array.isArray(t)&&t.length>=2&&void 0===t[0].length&&void 0===t[1].length)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(t),u=function(t,e,A,n){n=void 0===n?6371008.8:Number(n);var r=e/n,i=t[0]*Math.PI/180,o=a(t[1]),s=a(A),g=r*Math.cos(s),c=o+g;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var I=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),u=Math.abs(I)>1e-11?g/I:Math.cos(o),l=r*Math.sin(s)/u;return[(180*(i+l)/Math.PI+540)%360-180,180*c/Math.PI]}(I,g,A);return u[0]+=u[0]-I[0]>180?-360:I[0]-u[0]>180?360:0,i(u,o)}},function(t,e,A){var n=A(444),r=A(447);t.exports=function(t){return null!=t&&r(t.length)&&!n(t)}},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(479),c=A(480),I=A(279),u=A(412),l=A(255);function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return f}));var h=[0,0,0,255],B={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(t){return t.position}},getRadius:{type:"accessor",value:1},getFillColor:{type:"accessor",value:h},getLineColor:{type:"accessor",value:h},getLineWidth:{type:"accessor",value:1},strokeWidth:{deprecatedFor:"getLineWidth"},outline:{deprecatedFor:"stroked"},getColor:{deprecatedFor:["getFillColor","getLineColor"]}},f=function(t){Object(o.a)(A,t);var e=C(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){return Object(i.a)(Object(s.a)(A.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:[g.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(t){var e=t.props,n=t.oldProps,r=t.changeFlags;if(Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,{props:e,oldProps:n,changeFlags:r}),r.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(t){var e=t.uniforms,A=this.context.viewport,n=this.props,r=n.radiusUnits,i=n.radiusScale,o=n.radiusMinPixels,a=n.radiusMaxPixels,s=n.stroked,g=n.filled,c=n.lineWidthUnits,I=n.lineWidthScale,u=n.lineWidthMinPixels,l=n.lineWidthMaxPixels,C="pixels"===r?A.metersPerPixel:1,h="pixels"===c?A.metersPerPixel:1;this.state.model.setUniforms(e).setUniforms({stroked:s?1:0,filled:g,radiusScale:i*C,radiusMinPixels:o,radiusMaxPixels:a,lineWidthScale:I*h,lineWidthMinPixels:u,lineWidthMaxPixels:l}).draw()}},{key:"_getModel",value:function(t){return new u.a(t,Object.assign(this.getShaders(),{id:this.props.id,geometry:new l.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}))}}]),A}(I.a);f.layerName="ScatterplotLayer",f.defaultProps=B},function(t,e,A){"use strict";var n=A(22),r=A(1),i=A(5),o=A(4),a=A(14),s=A(16),g=A(7),c=A(124),I=A(393),u=A(405),l=A(524),C=A.n(l),h=A(43);function B(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return f(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var d=[];function Q(t,e,A,n){for(var r=0,i=e;i<A;i++){var o=t[i],a=null,s=n&&n[o];s&&(a=s.width),r+=a}return r}function E(t,e,A,n,r,i){for(var o=e,a=0,s=e;s<A;s++){var g=Q(t,s,s+1,r);a+g>n&&(o<s&&i.push(s),o=s,a=0),a+=g}return a}function p(t,e,A,n,r,i){for(var o=e,a=e,s=e,g=0,c=e;c<A;c++)if(" "===t[c]?s=c+1:" "!==t[c+1]&&c+1!==A||(s=c+1),s>a){var I=Q(t,a,s,r);g+I>n&&(o<a&&(i.push(a),o=a,g=0),I>n&&(I=E(t,a,s,n,r,i),o=i[i.length-1])),a=s,g+=I}return g}function y(t,e,A,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5?arguments[5]:void 0;void 0===i&&(i=t.length);var o=[];return"break-all"===e?E(t,r,i,A,n,o):p(t,r,i,A,n,o),o}function v(t,e,A,n,r,i){for(var o=0,a=0,s=e;s<A;s++){var g=t[s],c=n[g];c?(a||(a=c.height),r[s]=o+c.width/2,o+=c.width):(h.a.warn("Missing character: ".concat(g," (").concat(g.codePointAt(0),")"))(),r[s]=o,o+=32)}i[0]=o,i[1]=a}var m=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;Object(i.a)(this,t),this.limit=e,this.clear()}return Object(o.a)(t,[{key:"clear",value:function(){this._cache={},this._order=[]}},{key:"get",value:function(t){var e=this._cache[t];return e&&(this._deleteOrder(t),this._appendOrder(t)),e}},{key:"set",value:function(t,e){this._cache[t]?(this.delete(t),this._cache[t]=e,this._appendOrder(t)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[t]=e,this._appendOrder(t))}},{key:"delete",value:function(t){this._cache[t]&&(this._deleteCache(t),this._deleteOrder(t))}},{key:"_deleteCache",value:function(t){delete this._cache[t]}},{key:"_deleteOrder",value:function(t){var e=this._order.findIndex((function(e){return e===t}));e>=0&&this._order.splice(e,1)}},{key:"_appendOrder",value:function(t){this._order.push(t)}}]),t}();function b(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return F(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return F(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var w=function(){for(var t=[],e=32;e<128;e++)t.push(String.fromCharCode(e));return t}(),S=new m(3),D=["fontFamily","fontWeight","characterSet","fontSize","sdf","buffer","cutoff","radius"];function R(t,e){var A=S.get(t);if(!A)return e;var n=[],r=A.mapping,i=Object.keys(r);i=new Set(i);var o=e;return o instanceof Array&&(o=new Set(o)),o.forEach((function(t){i.has(t)||n.push(t)})),n}function U(t,e){for(var A=0;A<t.length;A++)e.data[4*A+3]=t[A]}function G(t,e,A,n){t.font="".concat(n," ").concat(A,"px ").concat(e),t.fillStyle="#000",t.textBaseline="baseline",t.textAlign="left"}var N=function(){function t(){Object(i.a)(this,t),this.props={fontFamily:"Monaco, monospace",fontWeight:"normal",characterSet:w,fontSize:64,buffer:2,sdf:!1,cutoff:.25,radius:3},this._key=null,this._atlas=null}return Object(o.a)(t,[{key:"setProps",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D.forEach((function(A){A in e&&(t.props[A]=e[A])}));var A=this._key;this._key=this._getKey();var n=R(this._key,this.props.characterSet),r=S.get(this._key);if(r&&0===n.length)this._key!==A&&(this._atlas=r);else{var i=this._generateFontAtlas(this._key,n,r);this._atlas=i,S.set(this._key,i)}}},{key:"_generateFontAtlas",value:function(t,e,A){var n=this.props,r=n.fontFamily,i=n.fontWeight,o=n.fontSize,a=n.buffer,s=n.sdf,g=n.radius,c=n.cutoff,I=A&&A.data;I||((I=document.createElement("canvas")).width=1024);var u=I.getContext("2d");G(u,r,o,i);var l=function(t){var e,A=t.characterSet,n=t.getFontWidth,r=t.fontHeight,i=t.buffer,o=t.maxCanvasWidth,a=t.mapping,s=void 0===a?{}:a,g=t.xOffset,c=void 0===g?0:g,I=t.yOffset,u=void 0===I?0:I,l=0,C=c,h=0,f=B(A);try{for(f.s();!(e=f.n()).done;){var d=e.value;if(!s[d]){var Q=n(d,h++);C+Q+2*i>o&&(C=0,l++),s[d]={x:C+i,y:u+l*(r+2*i)+i,width:Q,height:r},C+=Q+2*i}}}catch(y){f.e(y)}finally{f.f()}var E,p=r+2*i;return{mapping:s,xOffset:C,yOffset:u+l*p,canvasHeight:(E=u+(l+1)*p,Math.pow(2,Math.ceil(Math.log2(E))))}}(Object.assign({getFontWidth:function(t){return u.measureText(t).width},fontHeight:1.2*o,buffer:a,characterSet:e,maxCanvasWidth:1024},A&&{mapping:A.mapping,xOffset:A.xOffset,yOffset:A.yOffset})),h=l.mapping,f=l.canvasHeight,d=l.xOffset,Q=l.yOffset;if(I.height!==f){var E=u.getImageData(0,0,I.width,I.height);I.height=f,u.putImageData(E,0,0)}if(G(u,r,o,i),s){var p,y=new C.a(o,a,g,c,r,i),v=u.getImageData(0,0,y.size,y.size),m=b(e);try{for(m.s();!(p=m.n()).done;){var F=p.value;U(y.draw(F),v),u.putImageData(v,h[F].x-a,h[F].y-a)}}catch(R){m.e(R)}finally{m.f()}}else{var w,S=b(e);try{for(S.s();!(w=S.n()).done;){var D=w.value;u.fillText(D,h[D].x,h[D].y+.9*o)}}catch(R){S.e(R)}finally{S.f()}}return{xOffset:d,yOffset:Q,mapping:h,data:I,width:I.width,height:I.height}}},{key:"_getKey",value:function(){var t=this.props,e=t.fontFamily,A=t.fontWeight,n=t.fontSize,r=t.buffer,i=t.sdf,o=t.radius,a=t.cutoff;return i?"".concat(e," ").concat(A," ").concat(n," ").concat(r," ").concat(o," ").concat(a):"".concat(e," ").concat(A," ").concat(n," ").concat(r)}},{key:"texture",get:function(){return this._atlas}},{key:"mapping",get:function(){return this._atlas&&this._atlas.mapping}},{key:"scale",get:function(){return 1.2}}]),t}();function k(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return x(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return x(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function O(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function M(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?O(Object(A),!0).forEach((function(e){Object(r.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):O(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function L(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}A.d(e,"a",(function(){return Y}));var _={fontSize:64,buffer:2,sdf:!1,radius:3,cutoff:.25},J={start:1,middle:0,end:-1},T={top:1,center:0,bottom:-1},j=["fontSize","buffer","sdf","radius","cutoff"],H={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,backgroundColor:{type:"color",value:null,optional:!0},characterSet:w,fontFamily:"Monaco, monospace",fontWeight:"normal",lineHeight:1,fontSettings:{},wordBreak:"break-word",maxWidth:{type:"number",value:-1},getText:{type:"accessor",value:function(t){return t.text}},getPosition:{type:"accessor",value:function(t){return t.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]}},Y=function(t){Object(a.a)(A,t);var e=L(A);function A(){return Object(i.a)(this,A),e.apply(this,arguments)}return Object(o.a)(A,[{key:"initializeState",value:function(){this.state={styleVersion:0,fontAtlasManager:new N}}},{key:"updateState",value:function(t){var e=t.props,A=t.oldProps,n=t.changeFlags,r=this._fontChanged(A,e);r&&this._updateFontAtlas(A,e);var i=r||e.lineHeight!==A.lineHeight||e.wordBreak!==A.wordBreak||e.maxWidth!==A.maxWidth;(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getText))&&this._updateText(),i&&this.setState({styleVersion:this.state.styleVersion+1})}},{key:"getPickingInfo",value:function(t){var e=t.info;return Object.assign(e,{object:e.index>=0?this.props.data[e.index]:null})}},{key:"_updateFontAtlas",value:function(t,e){var A=e.characterSet,n=e.fontSettings,r=e.fontFamily,i=e.fontWeight;this.state.fontAtlasManager.setProps(Object.assign({},_,n,{characterSet:A,fontFamily:r,fontWeight:i})),this.setNeedsRedraw(!0)}},{key:"_fontChanged",value:function(t,e){if(t.fontFamily!==e.fontFamily||t.characterSet!==e.characterSet||t.fontWeight!==e.fontWeight)return!0;if(t.fontSettings===e.fontSettings)return!1;var A=t.fontSettings||{},n=e.fontSettings||{};return j.some((function(t){return A[t]!==n[t]}))}},{key:"_updateText",value:function(){var t,e=this.props.data,A=e.attributes&&e.attributes.getText,n=this.props.getText,r=e.startIndices;if(A&&r){var i=function(t){var e=t.value,A=t.length,n=t.stride,r=t.offset,i=t.startIndices,o=e.BYTES_PER_ELEMENT,a=n?n/o:1,s=r?r/o:0,g=i[A]||Math.floor((e.length-s-o)/a)+1,c=new Array(A),I=e;if(a>1||s>0){I=new e.constructor(g);for(var u=0;u<g;u++)I[u]=e[u*a+s]}for(var l=0;l<A;l++){var C=i[l],h=i[l+1]||g;c[l]=String.fromCodePoint.apply(null,I.subarray(C,h))}return{texts:c,characterCount:g}}(M(M({},ArrayBuffer.isView(A)?{value:A}:A),{},{length:e.length,startIndices:r})),o=i.texts;t=i.characterCount,n=function(t,e){var A=e.index;return o[A]}}else{var a=Object(c.a)(e),s=a.iterable,g=a.objectInfo;r=[0],t=0;var I,u=k(s);try{for(u.s();!(I=u.n()).done;){var l=I.value;g.index++;var C=n(l,g)||"";t+=Array.from(C).length,r.push(t)}}catch(h){u.e(h)}finally{u.f()}}this.setState({getText:n,startIndices:r,numInstances:t})}},{key:"getIconOffsets",value:function(t,e){for(var A=this.state.fontAtlasManager.mapping,r=this.state.getText,i=this.props,o=i.wordBreak,a=i.maxWidth,s=i.lineHeight,g=i.getTextAnchor,c=i.getAlignmentBaseline,I=function(t,e,A,n,r){for(var i=(t=Array.from(t)).length,o=new Array(i),a=new Array(i),s=new Array(i),g=("break-word"===A||"break-all"===A)&&isFinite(n)&&n>0,c=[0,0],I=[],u=0,l=0,C=0,h=0;h<=i;h++){var B=t[h];if("\n"!==B&&h!==i||(C=h),C>l){for(var f=g?y(t,A,n,r,l,C):d,Q=0;Q<=f.length;Q++){var E=0===Q?l:f[Q-1],p=Q<f.length?f[Q]:C;v(t,E,p,r,o,I);for(var m=E;m<p;m++)a[m]=u+I[1]/2,s[m]=I[0];u+=I[1]*e,c[0]=g?n:Math.max(c[0],I[0])}l=C}"\n"===B&&(o[l]=0,a[l]=0,s[l]=0,l++)}return c[1]=u,{x:o,y:a,rowWidth:s,size:c}}(r(t,e)||"",s,o,a,A),u=I.x,l=I.y,C=I.rowWidth,h=Object(n.a)(I.size,2),B=h[0],f=h[1],Q=J["function"===typeof g?g(t,e):g],E=T["function"===typeof c?c(t,e):c],p=u.length,m=new Array(2*p),b=0,F=0;F<p;F++){var w=(1-Q)*(B-C[F])/2;m[b++]=(Q-1)*B/2+w+u[F],m[b++]=(E-1)*f/2+l[F]}return m}},{key:"renderLayers",value:function(){var t=this.state,e=t.startIndices,A=t.numInstances,n=t.getText,r=t.fontAtlasManager,i=r.scale,o=r.texture,a=r.mapping,s=t.styleVersion,g=this.props,c=g.data,I=g._dataDiff,l=g.backgroundColor,C=g.getPosition,h=g.getColor,B=g.getSize,f=g.getAngle,d=g.getPixelOffset,Q=g.billboard,E=g.fontSettings,p=g.sizeScale,y=g.sizeUnits,v=g.sizeMinPixels,m=g.sizeMaxPixels,b=g.transitions,F=g.updateTriggers,w=this.getIconOffsets.bind(this);return new(this.getSubLayerClass("characters",u.a))({sdf:E.sdf,iconAtlas:o,iconMapping:a,backgroundColor:l,getPosition:C,getColor:h,getSize:B,getAngle:f,getPixelOffset:d,billboard:Q,sizeScale:p*i,sizeUnits:y,sizeMinPixels:v*i,sizeMaxPixels:m*i,transitions:b&&{getPosition:b.getPosition,getAngle:b.getAngle,getColor:b.getColor,getSize:b.getSize,getPixelOffset:b.getPixelOffset}},this.getSubLayerProps({id:"characters",updateTriggers:{getIcon:F.getText,getPosition:F.getPosition,getAngle:F.getAngle,getColor:F.getColor,getSize:F.getSize,getPixelOffset:F.getPixelOffset,getIconOffsets:{getText:F.getText,getTextAnchor:F.getTextAnchor,getAlignmentBaseline:F.getAlignmentBaseline,styleVersion:s}}}),{data:c,_dataDiff:I,startIndices:e,numInstances:A,getIconOffsets:w,getIcon:n})}}]),A}(I.a);Y.layerName="TextLayer",Y.defaultProps=H},,,,,,,,,,function(t,e,A){"use strict";var n=A(217).codes.ERR_STREAM_PREMATURE_CLOSE;function r(){}t.exports=function t(e,A,i){if("function"===typeof A)return t(e,null,A);A||(A={}),i=function(t){var e=!1;return function(){if(!e){e=!0;for(var A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];t.apply(this,n)}}}(i||r);var o=A.readable||!1!==A.readable&&e.readable,a=A.writable||!1!==A.writable&&e.writable,s=function(){e.writable||c()},g=e._writableState&&e._writableState.finished,c=function(){a=!1,g=!0,o||i.call(e)},I=e._readableState&&e._readableState.endEmitted,u=function(){o=!1,I=!0,a||i.call(e)},l=function(t){i.call(e,t)},C=function(){var t;return o&&!I?(e._readableState&&e._readableState.ended||(t=new n),i.call(e,t)):a&&!g?(e._writableState&&e._writableState.ended||(t=new n),i.call(e,t)):void 0},h=function(){e.req.on("finish",c)};return!function(t){return t.setHeader&&"function"===typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",s),e.on("close",s)):(e.on("complete",c),e.on("abort",C),e.req?h():e.on("request",h)),e.on("end",u),e.on("finish",c),!1!==A.error&&e.on("error",l),e.on("close",C),function(){e.removeListener("complete",c),e.removeListener("abort",C),e.removeListener("request",h),e.req&&e.req.removeListener("finish",c),e.removeListener("end",s),e.removeListener("close",s),e.removeListener("finish",c),e.removeListener("end",u),e.removeListener("error",l),e.removeListener("close",C)}}},function(t,e,A){var n=A(104),r=n.Buffer;function i(t,e){for(var A in t)e[A]=t[A]}function o(t,e,A){return r(t,e,A)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=o),i(r,o),o.from=function(t,e,A){if("number"===typeof t)throw new TypeError("Argument must not be a number");return r(t,e,A)},o.alloc=function(t,e,A){if("number"!==typeof t)throw new TypeError("Argument must be a number");var n=r(t);return void 0!==e?"string"===typeof A?n.fill(e,A):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r(t)},o.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,A){"use strict";(function(t){var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){if("undefined"!==typeof window&&"object"===(0,r.default)(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!==typeof t&&"object"===(0,r.default)(t.versions)&&Boolean(t.versions.electron))return!0;var A="object"===("undefined"===typeof navigator?"undefined":(0,r.default)(navigator))&&"string"===typeof navigator.userAgent&&navigator.userAgent,n=e||A;if(n&&n.indexOf("Electron")>=0)return!0;return!1};var r=n(A(293))}).call(this,A(62))},function(t,e,A){var n=A(208)(A(144),"Map");t.exports=n},function(t,e,A){var n=A(1312),r=A(1315)((function(t,e,A){n(t,e,A)}));t.exports=r},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(14),o=A(16),a=A(7),s=A(1),g=A(157),c=A(393),I=A(751),u=A(968),l=A(22),C=A(6),h=A.n(C),B=A(11),f=A(43),d=function(){function t(e){var A=e.x,r=e.y,i=e.z,o=e.onTileLoad,a=e.onTileError;Object(n.a)(this,t),this.x=A,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=o,this.onTileError=a}return Object(r.a)(t,[{key:"_loadData",value:function(){var t=Object(B.a)(h.a.mark((function t(e,A){var n,r,i,o,a,s,g,c;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.x,r=this.y,i=this.z,o=this.bbox,this._abortController=new AbortController,a=this._abortController.signal,t.next=5,A.scheduleRequest(this,(function(t){return t.isSelected?1:-1}));case 5:if(s=t.sent){t.next=9;break}return this._isCancelled=!0,t.abrupt("return");case 9:if(!this._isCancelled){t.next=12;break}return s.done(),t.abrupt("return");case 12:return t.prev=12,t.next=15,e({x:n,y:r,z:i,bbox:o,signal:a});case 15:g=t.sent,t.next=21;break;case 18:t.prev=18,t.t0=t.catch(12),c=t.t0||!0;case 21:return t.prev=21,s.done(),this._isCancelled&&!g?this._isLoaded=!1:(this._isLoaded=!0,this._isCancelled=!1),t.finish(21);case 25:if(this._isLoaded){t.next=27;break}return t.abrupt("return");case 27:c?this.onTileError(c,this):(this.content=g,this.onTileLoad(this));case 28:case"end":return t.stop()}}),t,this,[[12,18,21,25]])})));return function(e,A){return t.apply(this,arguments)}}()},{key:"loadData",value:function(t,e){var A=this;t&&(this._isCancelled=!1,this._loader=this._loadData(t,e),this._loader.finally((function(){A._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 t=this.content?this.content.byteLength:0;return Number.isFinite(t)||f.a.error("byteLength not defined in tile data")(),t}}]),t}(),Q=A(156),E=A(743),p=A(191);function y(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return v(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return v(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var m=function(){function t(e){var A=this;Object(n.a)(this,t),this.opts=e,this._getTileData=e.getTileData,this.onTileError=e.onTileError,this.onTileLoad=function(t){e.onTileLoad(t),A.opts.maxCacheByteSize&&(A._cacheByteSize+=t.byteLength,A._resizeCache())},this.onTileUnload=e.onTileUnload,this._requestScheduler=new E.a({maxRequests:e.maxRequests,throttleRequests:e.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(e)}return Object(r.a)(t,[{key:"setOptions",value:function(t){Object.assign(this.opts,t),Number.isFinite(t.maxZoom)&&(this._maxZoom=Math.floor(t.maxZoom)),Number.isFinite(t.minZoom)&&(this._minZoom=Math.ceil(t.minZoom))}},{key:"finalize",value:function(){var t,e=y(this._cache.values());try{for(e.s();!(t=e.n()).done;){var A=t.value;A.isLoading&&A.abort()}}catch(n){e.e(n)}finally{e.f()}}},{key:"update",value:function(t){var e=this,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A.zRange,r=A.modelMatrix,i=new p.a(r),o=!i.equals(this._modelMatrix);if(!t.equals(this._viewport)||o){o&&(this._modelMatrixInverse=r&&i.clone().invert(),this._modelMatrix=r&&i),this._viewport=t;var a=this.getTileIndices({viewport:t,maxZoom:this._maxZoom,minZoom:this._minZoom,zRange:n,modelMatrix:this._modelMatrix,modelMatrixInverse:this._modelMatrixInverse});this._selectedTiles=a.map((function(t){return e._getTile(t,!0)})),this._dirty&&this._rebuildTree()}var s=this.updateTileStates();return this._dirty&&this._resizeCache(),s&&this._frameNumber++,this._frameNumber}},{key:"getTileIndices",value:function(t){var e=t.viewport,A=t.maxZoom,n=t.minZoom,r=t.zRange,i=t.modelMatrix,o=t.modelMatrixInverse,a=this.opts,s=a.tileSize,g=a.extent;return Object(Q.a)({viewport:e,maxZoom:A,minZoom:n,zRange:r,tileSize:s,extent:g,modelMatrix:i,modelMatrixInverse:o})}},{key:"getTileMetadata",value:function(t){var e=t.x,A=t.y,n=t.z;return{bbox:Object(Q.e)(this._viewport,e,A,n)}}},{key:"getParentIndex",value:function(t){return t.x=Math.floor(t.x/2),t.y=Math.floor(t.y/2),t.z-=1,t}},{key:"updateTileStates",value:function(){this._updateTileStates(this.selectedTiles);var t,e=this.opts.maxRequests,A=[],n=0,r=!1,i=y(this._cache.values());try{for(i.s();!(t=i.n()).done;){var o=t.value,a=Boolean(1&o.state);o.isVisible!==a&&(r=!0,o.isVisible=a),o.isSelected=5===o.state,o.isLoading&&(n++,o.isSelected||A.push(o))}}catch(s){i.e(s)}finally{i.f()}if(e>0)for(;n>e&&A.length>0;){A.shift().abort(),n--}return r}},{key:"_rebuildTree",value:function(){var t,e=this._cache,A=y(e.values());try{for(A.s();!(t=A.n()).done;){var n=t.value;n.parent=null,n.children.length=0}}catch(s){A.e(s)}finally{A.f()}var r,i=y(e.values());try{for(i.s();!(r=i.n()).done;){var o=r.value,a=this._getNearestAncestor(o.x,o.y,o.z);o.parent=a,a&&a.children.push(o)}}catch(s){i.e(s)}finally{i.f()}}},{key:"_updateTileStates",value:function(t){var e,A=this._cache,n=this.opts.refinementStrategy||"best-available",r=y(A.values());try{for(r.s();!(e=r.n()).done;){e.value.state=0}}catch(u){r.e(u)}finally{r.f()}var i,o=y(t);try{for(o.s();!(i=o.n()).done;){i.value.state=5}}catch(u){o.e(u)}finally{o.f()}if("never"!==n){var a,s=y(t);try{for(s.s();!(a=s.n()).done;){F(a.value,n)}}catch(u){s.e(u)}finally{s.f()}var g,c=y(t);try{for(c.s();!(g=c.n()).done;){var I=g.value;b(I)&&w(I)}}catch(u){c.e(u)}finally{c.f()}}}},{key:"_resizeCache",value:function(){var t=this._cache,e=this.opts,A=e.maxCacheSize||(e.maxCacheByteSize?1/0:5*this.selectedTiles.length),n=e.maxCacheByteSize||1/0;if(t.size>A||this._cacheByteSize>n){var r,i=y(t);try{for(i.s();!(r=i.n()).done;){var o=Object(l.a)(r.value,2),a=o[0],s=o[1];if(s.isVisible||(this._cacheByteSize-=e.maxCacheByteSize?s.byteLength:0,t.delete(a),this.onTileUnload(s)),t.size<=A&&this._cacheByteSize<=n)break}}catch(g){i.e(g)}finally{i.f()}this._rebuildTree(),this._dirty=!0}this._dirty&&(this._tiles=Array.from(this._cache.values()).sort((function(t,e){return t.z-e.z})),this._dirty=!1)}},{key:"_getTile",value:function(t,e){var A=t.x,n=t.y,r=t.z,i="".concat(A,",").concat(n,",").concat(r),o=this._cache.get(i);return!o&&e?(o=new d({x:A,y:n,z:r,onTileLoad:this.onTileLoad,onTileError:this.onTileError}),Object.assign(o,this.getTileMetadata(o)),o.loadData(this._getTileData,this._requestScheduler),this._cache.set(i,o),this._dirty=!0):o&&o.isCancelled&&!o.isLoading&&o.loadData(this._getTileData,this._requestScheduler),o}},{key:"_getNearestAncestor",value:function(t,e,A){for(var n=this._minZoom,r=void 0===n?0:n,i={x:t,y:e,z:A};i.z>r;){i=this.getParentIndex(i);var o=this._getTile(i);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(t){return t.isLoaded}))}}]),t}();function b(t){for(var e=t;e;){if(!1&e.state)return!0;if(e.isLoaded)return!1;e=e.parent}return!0}function F(t,e){for(var A,n=3;A=t.parent;){if(t.isLoaded&&(n=4,"best-available"===e))return;A.state=Math.max(A.state,n),t=A}}function w(t){var e,A=y(t.children);try{for(A.s();!(e=A.n()).done;){var n=e.value;n.state=Math.max(n.state,3),n.isLoaded||w(n)}}catch(r){A.e(r)}finally{A.f()}}function S(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}function D(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function R(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?D(Object(A),!0).forEach((function(e){Object(s.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):D(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}A.d(e,"a",(function(){return G}));var U={data:[],dataComparator:Q.f.equals,renderSubLayers:{type:"function",value:function(t){return new I.a(t)},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(t){},compare:!1},onTileUnload:{type:"function",value:function(t){},compare:!1},onTileError:{type:"function",value:function(t){return console.error(t)},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(t,e){var A=e.layer,n=e.signal,r=R({},A.getLoadOptions());return r.fetch=R(R({},r.fetch),{},{signal:n}),Object(u.a)(t,r)},compare:!1},maxRequests:6},G=function(t){Object(i.a)(A,t);var e=S(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"initializeState",value:function(){this.state={tileset:null,isLoaded:!1}}},{key:"finalizeState",value:function(){var t=this.state.tileset;t&&t.finalize()}},{key:"shouldUpdateState",value:function(t){return t.changeFlags.somethingChanged}},{key:"updateState",value:function(t){var e=t.props,A=(t.oldProps,t.context,t.changeFlags),n=this.state.tileset;if(!n||A.dataChanged||A.updateTriggersChanged&&(A.updateTriggersChanged.all||A.updateTriggersChanged.getTileData)){n&&n.finalize();var r=Number.isFinite(this.state.maxZoom)?this.state.maxZoom:e.maxZoom,i=Number.isFinite(this.state.minZoom)?this.state.minZoom:e.minZoom,o=e.tileSize,a=e.maxCacheSize,s=e.maxCacheByteSize,g=e.refinementStrategy,c=e.extent,I=e.maxRequests;n=new m({getTileData:this.getTileData.bind(this),maxCacheSize:a,maxCacheByteSize:s,maxZoom:r,minZoom:i,tileSize:o,refinementStrategy:g,extent:c,onTileLoad:this._onTileLoad.bind(this),onTileError:this._onTileError.bind(this),onTileUnload:this._onTileUnload.bind(this),maxRequests:I}),this.setState({tileset:n})}else(A.propsChanged||A.updateTriggersChanged)&&(n.setOptions(e),this.state.tileset.tiles.forEach((function(t){t.layers=null})));this._updateTileset()}},{key:"_updateTileset",value:function(){var t=this.state.tileset,e=this.props,A=e.zRange,n=e.modelMatrix,r=t.update(this.context.viewport,{zRange:A,modelMatrix:n}),i=t.isLoaded,o=this.state.isLoaded!==i,a=this.state.frameNumber!==r;i&&(o||a)&&this._onViewportLoad(),a&&this.setState({frameNumber:r}),this.state.isLoaded=i}},{key:"_onViewportLoad",value:function(){var t=this.state.tileset,e=this.props.onViewportLoad;e&&e(t.selectedTiles)}},{key:"_onTileLoad",value:function(t){this.getCurrentLayer().props.onTileLoad(t),t.isVisible&&this.setNeedsUpdate()}},{key:"_onTileError",value:function(t,e){var A=this.getCurrentLayer();A.props.onTileError(t),A._updateTileset(),e.isVisible&&this.setNeedsUpdate()}},{key:"_onTileUnload",value:function(t){this.getCurrentLayer().props.onTileUnload(t)}},{key:"getTileData",value:function(t){var e=this.props.data,A=this.getCurrentLayer().props,n=A.getTileData,r=A.fetch,i=t.signal;return t.url=Object(Q.b)(e,t),n?n(t):t.url?r(t.url,{layer:this,signal:i}):null}},{key:"renderSubLayers",value:function(t){return this.props.renderSubLayers(t)}},{key:"getHighlightedObjectIndex",value:function(){return-1}},{key:"getPickingInfo",value:function(t){var e=t.info,A=t.sourceLayer;return e.sourceLayer=A,e.tile=A.props.tile,e}},{key:"renderLayers",value:function(){var t=this,e=this.props.visible;return this.state.tileset.tiles.map((function(A){var n=e&&A.isVisible,r=t.getHighlightedObjectIndex(A);if(A.isLoaded)if(A.layers)!A.layers[0]||A.layers[0].props.visible===n&&A.layers[0].props.highlightedObjectIndex===r||(A.layers=A.layers.map((function(t){return t.clone({visible:n,highlightedObjectIndex:r})})));else{var i=t.renderSubLayers(Object.assign({},t.props,{id:"".concat(t.id,"-").concat(A.x,"-").concat(A.y,"-").concat(A.z),data:A.data,visible:n,_offset:0,tile:A,highlightedObjectIndex:r}));A.layers=Object(g.b)(i,Boolean)}else;return A.layers}))}},{key:"isLoaded",get:function(){return this.state.tileset.selectedTiles.every((function(t){return t.layers&&t.layers.every((function(t){return t.isLoaded}))}))}}]),A}(c.a);G.layerName="TileLayer",G.defaultProps=U},function(t,e,A){"use strict";function n(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(t){if(Array.isArray(t))return t}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";function n(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"b",(function(){return i}));var n=A(30),r={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)"},i={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function o(t){return"".concat(Math.round(t),"ms")}e.a={easing:r,duration:i,create:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.duration,a=void 0===A?i.standard:A,s=e.easing,g=void 0===s?r.easeInOut:s,c=e.delay,I=void 0===c?0:c;Object(n.a)(e,["duration","easing","delay"]);return(Array.isArray(t)?t:[t]).map((function(t){return"".concat(t," ").concat("string"===typeof a?a:o(a)," ").concat(g," ").concat("string"===typeof I?I:o(I))})).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var e=t/36;return Math.round(10*(4+15*Math.pow(e,.25)+e/5))}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return a}));var n,r=A(1),i=A(147),o=A(233),a={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"};e.b=(n={},Object(r.a)(n,a.WEBGL2,[!1,!0]),Object(r.a)(n,a.VERTEX_ARRAY_OBJECT,["OES_vertex_array_object",!0]),Object(r.a)(n,a.TIMER_QUERY,["EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2"]),Object(r.a)(n,a.INSTANCED_RENDERING,["ANGLE_instanced_arrays",!0]),Object(r.a)(n,a.MULTIPLE_RENDER_TARGETS,["WEBGL_draw_buffers",!0]),Object(r.a)(n,a.ELEMENT_INDEX_UINT32,["OES_element_index_uint",!0]),Object(r.a)(n,a.BLEND_EQUATION_MINMAX,["EXT_blend_minmax",!0]),Object(r.a)(n,a.FLOAT_BLEND,["EXT_float_blend"]),Object(r.a)(n,a.COLOR_ENCODING_SRGB,["EXT_sRGB",!0]),Object(r.a)(n,a.TEXTURE_DEPTH,["WEBGL_depth_texture",!0]),Object(r.a)(n,a.TEXTURE_FLOAT,["OES_texture_float",!0]),Object(r.a)(n,a.TEXTURE_HALF_FLOAT,["OES_texture_half_float",!0]),Object(r.a)(n,a.TEXTURE_FILTER_LINEAR_FLOAT,["OES_texture_float_linear"]),Object(r.a)(n,a.TEXTURE_FILTER_LINEAR_HALF_FLOAT,["OES_texture_half_float_linear"]),Object(r.a)(n,a.TEXTURE_FILTER_ANISOTROPIC,["EXT_texture_filter_anisotropic"]),Object(r.a)(n,a.COLOR_ATTACHMENT_RGBA32F,[function(t){var e=new o.a(t,{format:6408,type:5126,dataFormat:6408}),A=new i.a(t,{id:"test-framebuffer",check:!1,attachments:Object(r.a)({},36064,e)}),n=A.getStatus();return e.delete(),A.delete(),36053===n},"EXT_color_buffer_float"]),Object(r.a)(n,a.COLOR_ATTACHMENT_FLOAT,[!1,"EXT_color_buffer_float"]),Object(r.a)(n,a.COLOR_ATTACHMENT_HALF_FLOAT,["EXT_color_buffer_half_float"]),Object(r.a)(n,a.GLSL_FRAG_DATA,["WEBGL_draw_buffers",!0]),Object(r.a)(n,a.GLSL_FRAG_DEPTH,["EXT_frag_depth",!0]),Object(r.a)(n,a.GLSL_DERIVATIVES,["OES_standard_derivatives",!0]),Object(r.a)(n,a.GLSL_TEXTURE_LOD,["EXT_shader_texture_lod",!0]),n)},function(t,e){},function(t,e){},function(t,e){},function(t,e,A){"use strict";A.d(e,"b",(function(){return i}));var n=A(0),r=n.createContext();function i(){return n.useContext(r)}e.a=r},function(t,e,A){"use strict";var n=A(83),r=A(147),i=A(118),o=A(19),a=A(167),s=A(49);function g(t){switch(t){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(s.a)(!1),0}}var c=A(515);function I(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.sourceX,n=void 0===A?0:A,r=e.sourceY,i=void 0===r?0:r,o=e.sourceFormat,g=void 0===o?6408:o,c=e.sourceAttachment,I=void 0===c?36064:c,u=e.target,l=void 0===u?null:u,C=e.sourceWidth,f=e.sourceHeight,d=e.sourceType,Q=h(t),E=Q.framebuffer,p=Q.deleteFramebuffer;Object(s.a)(E);var y=E.gl,v=E.handle,m=E.attachments;C=C||E.width,f=f||E.height,36064===I&&null===v&&(I=1028),Object(s.a)(m[I]),l=B(l,d=d||m[I].type,g,C,f),d=d||Object(a.b)(l);var b=y.bindFramebuffer(36160,v);return y.readPixels(n,i,C,f,g,d,l),y.bindFramebuffer(36160,b||null),p&&E.delete(),l}function u(t,e){var A=e.sourceX,r=void 0===A?0:A,i=e.sourceY,a=void 0===i?0:i,c=e.sourceFormat,I=void 0===c?6408:c,u=e.target,l=void 0===u?null:u,C=e.targetByteOffset,B=void 0===C?0:C,f=e.sourceWidth,d=e.sourceHeight,Q=e.sourceType,E=h(t),p=E.framebuffer,y=E.deleteFramebuffer;Object(s.a)(p),f=f||p.width,d=d||p.height;var v=Object(o.a)(p.gl);if(Q=Q||(l?l.type:5121),!l){var m=g(I),b=function(t){switch(t){case 5121:return 1;case 33635:case 32819:case 32820:return 2;case 5126:return 4;default:return Object(s.a)(!1),0}}(Q),F=B+f*d*m*b;l=new n.a(v,{byteLength:F,accessor:{type:Q,size:m}})}return l.bind({target:35051}),Object(o.o)(v,{framebuffer:p},(function(){v.readPixels(r,a,f,d,I,Q,B)})),l.unbind({target:35051}),y&&p.delete(),l}function l(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.sourceAttachment,n=void 0===A?36064:A,r=e.targetMaxHeight,i=void 0===r?Number.MAX_SAFE_INTEGER:r,o=I(t,{sourceAttachment:n}),s=t.width,g=t.height;g>i;){var c=Object(a.d)({data:o,width:s,height:g});o=c.data,s=c.width,g=c.height}Object(a.a)({data:o,width:s,height:g});var u=document.createElement("canvas");u.width=s,u.height=g;var l=u.getContext("2d"),C=l.createImageData(s,g);return C.data.set(o),l.putImageData(C,0,0),u.toDataURL()}function C(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=A.sourceX,r=void 0===n?0:n,a=A.sourceY,g=void 0===a?0:a,c=A.targetMipmaplevel,I=void 0===c?0:c,u=A.targetInternalFormat,l=void 0===u?6408:u,C=A.targetX,B=A.targetY,f=A.targetZ,d=A.width,Q=A.height,E=h(t),p=E.framebuffer,y=E.deleteFramebuffer;Object(s.a)(p);var v=p.gl,m=p.handle,b="undefined"!==typeof C||"undefined"!==typeof B||"undefined"!==typeof f;C=C||0,B=B||0,f=f||0;var F=v.bindFramebuffer(36160,m);Object(s.a)(e);var w=null;if(e instanceof i.a&&(w=e,d=Number.isFinite(d)?d:w.width,Q=Number.isFinite(Q)?Q:w.height,w.bind(0),e=w.target),b)switch(e){case 3553:case 34067:v.copyTexSubImage2D(e,I,C,B,r,g,d,Q);break;case 35866:case 32879:var S=Object(o.a)(v);S.copyTexSubImage3D(e,I,C,B,f,r,g,d,Q)}else v.copyTexImage2D(e,I,l,r,g,d,Q,0);return w&&w.unbind(),v.bindFramebuffer(36160,F||null),y&&p.delete(),w}function h(t){return t instanceof r.a?{framebuffer:t,deleteFramebuffer:!1}:{framebuffer:Object(c.b)(t),deleteFramebuffer:!0}}function B(t,e,A,n,r){return t||(e=e||5121,new(Object(a.c)(e,{clamped:!1}))(n*r*g(A)))}A.d(e,"c",(function(){return I})),A.d(e,"d",(function(){return u})),A.d(e,"a",(function(){return l})),A.d(e,"b",(function(){return C}))},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(334),o=A(26),a={number:{validate:function(t,e){return Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)}},array:{validate:function(t,e){return Array.isArray(t)||ArrayBuffer.isView(t)}}};function s(t){var e=g(t);return"object"===e?t?"type"in t?Object.assign({},t,a[t.type]):"value"in t?(e=g(t.value),Object.assign({type:e},t,a[e])):{type:"object",value:t}:{type:"object",value:null}:Object.assign({type:e,value:t},a[e])}function g(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":Object(o.a)(t)}A.d(e,"a",(function(){return c})),A.d(e,"b",(function(){return I}));var c=function(){function t(e){var A=e.name,r=e.vs,o=e.fs,a=e.dependencies,g=void 0===a?[]:a,c=e.uniforms,I=e.getUniforms,u=e.deprecations,l=void 0===u?[]:u,C=e.defines,h=void 0===C?{}:C,B=e.inject,f=void 0===B?{}:B,d=e.vertexShader,Q=e.fragmentShader;Object(n.a)(this,t),Object(i.a)("string"===typeof A),this.name=A,this.vs=r||d,this.fs=o||Q,this.getModuleUniforms=I,this.dependencies=g,this.deprecations=this._parseDeprecationDefinitions(l),this.defines=h,this.injections=function(t){var e={vs:{},fs:{}};for(var A in t){var n=t[A],r=A.slice(0,2);"string"===typeof n&&(n={order:0,injection:n}),e[r][A]=n}return e}(f),c&&(this.uniforms=function(t){var e={};for(var A in t){var n=s(t[A]);e[A]=n}return e}(c))}return Object(r.a)(t,[{key:"getModuleSource",value:function(t){var e;switch(t){case"vs":e=this.vs||"";break;case"fs":e=this.fs||"";break;default:Object(i.a)(!1)}return"#define MODULE_".concat(this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_"),"\n").concat(e,"// END MODULE_").concat(this.name,"\n\n")}},{key:"getUniforms",value:function(t,e){return this.getModuleUniforms?this.getModuleUniforms(t,e):this.uniforms?this._defaultGetUniforms(t):{}}},{key:"getDefines",value:function(){return this.defines}},{key:"checkDeprecations",value:function(t,e){this.deprecations.forEach((function(A){A.regex.test(t)&&(A.deprecated?e.deprecated(A.old,A.new)():e.removed(A.old,A.new)())}))}},{key:"_parseDeprecationDefinitions",value:function(t){return t.forEach((function(t){switch(t.type){case"function":t.regex=new RegExp("\\b".concat(t.old,"\\("));break;default:t.regex=new RegExp("".concat(t.type," ").concat(t.old,";"))}})),t}},{key:"_defaultGetUniforms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={},A=this.uniforms;for(var n in A){var r=A[n];n in t&&!r.private?(r.validate&&Object(i.a)(r.validate(t[n],r),"".concat(this.name,": invalid ").concat(n)),e[n]=t[n]):e[n]=r.value}return e}}]),t}();function I(t){if(!t.normalized&&(t.normalized=!0,t.uniforms&&!t.getUniforms)){var e=new c(t);t.getUniforms=e.getUniforms.bind(e)}return t}},function(t,e,A){"use strict";var n=A(21),r=A(17),i=A(180),o=A.n(i),a=A(272),s=A(975),g=A(184),c=A(9),I=A(15),u=A(54),l=A(71),C=A(92),h=A(23),B=A(24),f=function(){},d=function(t){return t},Q=function(t){return Promise.resolve().then(t)};function E(t){throw t}var p=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(c.a)(this,A),(n=e.call(this,(function(e){var A=Object(u.a)(n),r=Object.assign(Object.assign({},e),{complete:function(){e.complete(),A.onCompletion()},error:function(t){e.error(t),A.onError(t)},next:function(t){e.next(t),A.onNext(t)}});try{return n.initHasRun=!0,t(r)}catch(i){r.error(i)}}))).initHasRun=!1,n.fulfillmentCallbacks=[],n.rejectionCallbacks=[],n.firstValueSet=!1,n.state="pending",n}return Object(I.a)(A,[{key:"onNext",value:function(t){this.firstValueSet||(this.firstValue=t,this.firstValueSet=!0)}},{key:"onError",value:function(t){this.state="rejected",this.rejection=t;var e,A=Object(r.a)(this.rejectionCallbacks);try{var n=function(){var A=e.value;Q((function(){return A(t)}))};for(A.s();!(e=A.n()).done;)n()}catch(i){A.e(i)}finally{A.f()}}},{key:"onCompletion",value:function(){var t=this;this.state="fulfilled";var e,A=Object(r.a)(this.fulfillmentCallbacks);try{var n=function(){var A=e.value;Q((function(){return A(t.firstValue)}))};for(A.s();!(e=A.n()).done;)n()}catch(i){A.e(i)}finally{A.f()}}},{key:"then",value:function(t,e){var A=this,n=t||d,r=e||E,i=!1;return new Promise((function(t,e){var o=function(A){if(!i){i=!0;try{t(r(A))}catch(n){e(n)}}};return A.initHasRun||A.subscribe({error:o}),"fulfilled"===A.state?t(n(A.firstValue)):"rejected"===A.state?(i=!0,t(r(A.rejection))):(A.fulfillmentCallbacks.push((function(e){try{t(n(e))}catch(A){o(A)}})),void A.rejectionCallbacks.push(o))}))}},{key:"catch",value:function(t){return this.then(void 0,t)}},{key:"finally",value:function(t){var e=t||f;return this.then((function(t){return e(),t}),(function(){return e()}))}}],[{key:"from",value:function(t){return function(t){return t&&"function"===typeof t.then}(t)?new A((function(e){t.then((function(t){e.next(t),e.complete()}),(function(t){e.error(t)}))})):Object(C.a)(Object(l.a)(A),"from",this).call(this,t)}}]),A}(a.a),y=A(511),v=A(235);A.d(e,"a",(function(){return S})),A.d(e,"b",(function(){return D}));var m=o()("threads:master:messages"),b=1;function F(t,e){return new a.a((function(A){var n,r=function r(i){var o;if(m("Message from worker:",i.data),i.data&&i.data.uid===e)if((o=i.data)&&o.type===v.b.running)n=i.data.resultType;else if(function(t){return t&&t.type===v.b.result}(i.data))"promise"===n?("undefined"!==typeof i.data.payload&&A.next(Object(g.a)(i.data.payload)),A.complete(),t.removeEventListener("message",r)):(i.data.payload&&A.next(Object(g.a)(i.data.payload)),i.data.complete&&(A.complete(),t.removeEventListener("message",r)));else if(function(t){return t&&t.type===v.b.error}(i.data)){var a=Object(g.a)(i.data.error);A.error(a),t.removeEventListener("message",r)}};return t.addEventListener("message",r),function(){if("observable"===n||!n){var A={type:v.a.cancel,uid:e};t.postMessage(A)}t.removeEventListener("message",r)}}))}function w(t){if(0===t.length)return{args:[],transferables:[]};var e,A,i=[],o=[],a=Object(r.a)(t);try{for(a.s();!(e=a.n()).done;){var s=e.value;Object(y.b)(s)?(i.push(Object(g.b)(s.send)),o.push.apply(o,Object(n.a)(s.transferables))):i.push(Object(g.b)(s))}}catch(c){a.e(c)}finally{a.f()}return{args:i,transferables:0===o.length?o:(A=o,Array.from(new Set(A)))}}function S(t,e){return function(){for(var A=b++,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=w(r),a=o.args,g=o.transferables,c={type:v.a.run,uid:A,method:e,args:a};m("Sending command to run function to worker:",c);try{t.postMessage(c,g)}catch(I){return p.from(Promise.reject(I))}return p.from(Object(s.a)(F(t,A)))}}function D(t,e){var A,n={},i=Object(r.a)(e);try{for(i.s();!(A=i.n()).done;){var o=A.value;n[o]=S(t,o)}}catch(a){i.e(a)}finally{i.f()}return n}},function(t,e,A){"use strict";A.d(e,"a",(function(){return h}));var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(279),c=A(79),I=A(157);function u(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return l(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return l(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var h=function(t){Object(o.a)(A,t);var e=C(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getSubLayers",value:function(){return this.internalState&&this.internalState.subLayers||[]}},{key:"initializeState",value:function(){}},{key:"setState",value:function(t){Object(i.a)(Object(s.a)(A.prototype),"setState",this).call(this,t),this.setNeedsUpdate()}},{key:"getPickingInfo",value:function(t){var e=t.info,A=e.object;return A&&A.__source&&A.__source.parent&&A.__source.parent.id===this.id?Object.assign(e,{object:A.__source.object,index:A.__source.index}):e}},{key:"renderLayers",value:function(){return null}},{key:"shouldRenderSubLayer",value:function(t,e){var A=this.props._subLayerProps;return e&&e.length||A&&A[t]}},{key:"getSubLayerClass",value:function(t,e){var A=this.props._subLayerProps;return A&&A[t]&&A[t].type||e}},{key:"getSubLayerRow",value:function(t,e,A){return t.__source={parent:this,object:e,index:A},t}},{key:"getSubLayerAccessor",value:function(t){if("function"===typeof t){var e={data:this.props.data,target:[]};return function(A,n){return A&&A.__source?(e.index=A.__source.index,t(A.__source.object,e)):t(A,n)}}return t}},{key:"getSubLayerProps",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.props,A=e.opacity,n=e.pickable,r=e.visible,i=e.parameters,o=e.getPolygonOffset,a=e.highlightedObjectIndex,s=e.autoHighlight,g=e.highlightColor,c=e.coordinateSystem,I=e.coordinateOrigin,l=e.wrapLongitude,C=e.positionFormat,h=e.modelMatrix,B=e.extensions,f=e._subLayerProps,d={opacity:A,pickable:n,visible:r,parameters:i,getPolygonOffset:o,highlightedObjectIndex:a,autoHighlight:s,highlightColor:g,coordinateSystem:c,coordinateOrigin:I,wrapLongitude:l,positionFormat:C,modelMatrix:h,extensions:B},Q=f&&f[t.id],E=Q&&Q.updateTriggers,p=t.id||"sublayer";if(Q){var y=this.constructor._propTypes;for(var v in Q){var m=y[v];m&&"accessor"===m.type&&(Q[v]=this.getSubLayerAccessor(Q[v]))}}Object.assign(d,t,Q,{id:"".concat(this.props.id,"-").concat(p),updateTriggers:Object.assign({all:this.props.updateTriggers.all},t.updateTriggers,E)});var b,F=u(B);try{for(F.s();!(b=F.n()).done;){var w=b.value,S=w.getSubLayerProps.call(this,w);S&&Object.assign(d,S,{updateTriggers:Object.assign(d.updateTriggers,S.updateTriggers)})}}catch(D){F.e(D)}finally{F.f()}return d}},{key:"_getAttributeManager",value:function(){return null}},{key:"_renderLayers",value:function(){var t=this.internalState.subLayers,e=!t||this.needsUpdate();e&&(t=this.renderLayers(),t=Object(I.b)(t,Boolean),this.internalState.subLayers=t),Object(c.a)("compositeLayer.renderLayers",this,e,t);var A,n=u(t);try{for(n.s();!(A=n.n()).done;){A.value.parent=this}}catch(r){n.e(r)}finally{n.f()}}},{key:"isComposite",get:function(){return!0}},{key:"isLoaded",get:function(){return Object(i.a)(Object(s.a)(A.prototype),"isLoaded",this)&&this.getSubLayers().every((function(t){return t.isLoaded}))}}]),A}(g.a);h.layerName="CompositeLayer"},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(19);function r(t,e,A){var r=A.removedProps,i=void 0===r?{}:r,o=A.deprecatedProps,a=void 0===o?{}:o,s=A.replacedProps,g=void 0===s?{}:s;for(var c in i)if(c in e){var I=i[c]?"".concat(t,".").concat(i[c]):"N/A";n.k.removed("".concat(t,".").concat(c),I)()}for(var u in a)if(u in e){var l=a[u];n.k.deprecated("".concat(t,".").concat(u),"".concat(t,".").concat(l))()}var C=null;for(var h in g)if(h in e){var B=g[h];n.k.deprecated("".concat(t,".").concat(h),"".concat(t,".").concat(B))(),(C=C||Object.assign({},e))[B]=e[h],delete C[h]}return C||e}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(1);function r(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function i(t,e){if(!e)return t;var A=Object.assign({},t,e);if("defines"in e&&(A.defines=Object.assign({},t.defines,e.defines)),"modules"in e&&(A.modules=(t.modules||[]).concat(e.modules),e.modules.some((function(t){return"project64"===t.name})))){var i=A.modules.findIndex((function(t){return"project32"===t.name}));i>=0&&A.modules.splice(i,1)}if("inject"in e)if(t.inject){var o=function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?r(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):r(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},t.inject);for(var a in e.inject)o[a]=(o[a]||"")+e.inject[a];A.inject=o}else A.inject=e.inject;return A}},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(26);function r(t){if(null===(e=t)||"object"!==Object(n.a)(e))throw new Error("count(): argument not an object");var e;if("function"===typeof t.count)return t.count();if(Number.isFinite(t.size))return t.size;if(Number.isFinite(t.length))return t.length;if(function(t){return null!==t&&"object"===Object(n.a)(t)&&t.constructor===Object}(t))return Object.keys(t).length;throw new Error("count(): argument not a container")}},function(t,e,A){"use strict";A.d(e,"a",(function(){return g}));var n=A(6),r=A.n(n),i=A(11),o=A(5),a=A(4),s=A(408),g=function(){function t(e){var A=e.source,n=e.name,r=void 0===n?"unnamed":n,i=e.maxConcurrency,a=void 0===i?1:i,s=e.onMessage,g=e.onDebug,c=void 0===g?function(){}:g,I=e.reuseWorkers,u=void 0===I||I;Object(o.a)(this,t),this.source=A,this.name=r,this.maxConcurrency=a,this.onMessage=s,this.onDebug=c,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1,this.reuseWorkers=u}return Object(a.a)(t,[{key:"destroy",value:function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0}},{key:"process",value:function(t,e){var A=this;return new Promise((function(n,r){A.jobQueue.push({data:t,jobName:e,resolve:n,reject:r}),A._startQueuedJob()}))}},{key:"_startQueuedJob",value:function(){var t=Object(i.a)(r.a.mark((function t(){var e,A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jobQueue.length){t.next=2;break}return t.abrupt("return");case 2:if(e=this._getAvailableWorker()){t.next=5;break}return t.abrupt("return");case 5:return A=this.jobQueue.shift(),this.onDebug({message:"processing",worker:e.name,job:A.jobName,backlog:this.jobQueue.length}),t.prev=7,t.t0=A,t.next=11,e.process(A.data);case 11:t.t1=t.sent,t.t0.resolve.call(t.t0,t.t1),t.next=18;break;case 15:t.prev=15,t.t2=t.catch(7),A.reject(t.t2);case 18:return t.prev=18,this._onWorkerDone(e),t.finish(18);case 21:case"end":return t.stop()}}),t,this,[[7,15,18,21]])})));return function(){return t.apply(this,arguments)}}()},{key:"_onWorkerDone",value:function(t){this.isDestroyed?t.destroy():(this.reuseWorkers?this.idleQueue.push(t):(t.destroy(),this.count--),this._startQueuedJob())}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;var t="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new s.a({source:this.source,onMessage:this.onMessage,name:t})}return null}}]),t}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(26);function r(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],A=arguments.length>2?arguments[2]:void 0,o=A||new Set;if(t){if(i(t))o.add(t);else if(i(t.buffer))o.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"===Object(n.a)(t))for(var a in t)r(t[a],e,o)}else;return void 0===A?Array.from(o):[]}function i(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!==typeof MessagePort&&t instanceof MessagePort||("undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(5),r=A(4),i=A(14),o=A(16),a=A(7),s=A(170),g=A(278),c=A(155),I=A(143);function u(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var l={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new c.a(["target","zoom"]),transitionInterruption:I.a.BREAK},C=function(t){Object(i.a)(A,t);var e=u(A);function A(t){return Object(n.a)(this,A),t.dragMode=t.dragMode||"pan",e.call(this,g.a,t)}return Object(r.a)(A,[{key:"_onPanRotate",value:function(t){return!1}},{key:"_getTransitionProps",value:function(){return l}}]),A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return u}));var n=A(5),r=A(4),i=A(14),o=A(16),a=A(7),s=A(171),g=A(277),c=A(343);function I(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var u=function(t){Object(i.a)(A,t);var e=I(A);function A(t){return Object(n.a)(this,A),e.call(this,Object.assign({},t,{type:g.a}))}return Object(r.a)(A,[{key:"controller",get:function(){return this._getControllerProps({type:c.b})}}]),A}(s.a);u.displayName="MapView"},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(5),r=[255,255,255],i=0,o=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(n.a)(this,t);var A=e.color,o=void 0===A?r:A,a=e.intensity,s=void 0===a?1:a;this.id=e.id||"ambient-".concat(i++),this.color=o,this.intensity=s,this.type="ambient"}},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(479),c=A(480),I=A(43),u=A(279),l=A(412),C=A(255),h=A(1),B=A(515),f=A(390),d=A(233),Q=A(6),E=A.n(Q),p=A(11);function y(t,e){if(!t)throw new Error(e)}var v=A(269),m=v.a._parseImageNode,b="undefined"!==typeof Image,F="undefined"!==typeof ImageBitmap,w=Boolean(m),S=!!v.b||w;var D=A(26);function R(t){var e=G(t);if(!e)throw new Error("Not an image");return e}function U(t){switch(R(t)){case"data":return t;case"image":case"imagebitmap":var e=document.createElement("canvas"),A=e.getContext("2d");if(A)return e.width=t.width,e.height=t.height,A.drawImage(t,0,0),A.getImageData(0,0,t.width,t.height);default:return y(!1)}}function G(t){return"undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&t instanceof Image?"image":t&&"object"===Object(D.a)(t)&&t.data&&t.width&&t.height?"data":null}var N=/^data:image\/svg\+xml/,k=/\.svg((\?|#).*)?$/;function x(t){return t&&(N.test(t)||k.test(t))}function O(t,e){if(x(e)){var A=(new TextDecoder).decode(t);return"data:image/svg+xml;base64,".concat(btoa(A))}return M(t,e)}function M(t,e){if(x(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}function L(t,e,A){return _.apply(this,arguments)}function _(){return(_=Object(p.a)(E.a.mark((function t(e,A,n){var r,i,o;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=O(e,n),i=self.URL||self.webkitURL,o="string"!==typeof r&&i.createObjectURL(r),t.prev=3,t.next=6,J(o||r,A);case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,o&&i.revokeObjectURL(o),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[3,,7,10]])})))).apply(this,arguments)}function J(t,e){return T.apply(this,arguments)}function T(){return(T=Object(p.a)(E.a.mark((function t(e,A){var n;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=new Image).src=e,!(A.image&&A.image.decode&&n.decode)){t.next=6;break}return t.next=5,n.decode();case 5:return t.abrupt("return",n);case 6:return t.next=8,new Promise((function(t,A){try{n.onload=function(){return t(n)},n.onerror=function(t){return A(new Error("Could not load image ".concat(e,": ").concat(t)))}}catch(r){A(r)}}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var j={},H=!0;function Y(t,e,A){return V.apply(this,arguments)}function V(){return(V=Object(p.a)(E.a.mark((function t(e,A,n){var r,i,o;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!x(n)){t.next=7;break}return t.next=3,L(e,A,n);case 3:i=t.sent,r=i,t.next=8;break;case 7:r=M(e,n);case 8:return o=A&&A.imagebitmap,t.next=11,Z(r,o);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Z(t){return W.apply(this,arguments)}function W(){return(W=Object(p.a)(E.a.mark((function t(e){var A,n=arguments;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!K(A=n.length>1&&void 0!==n[1]?n[1]:null)&&H||(A=null),!A){t.next=13;break}return t.prev=3,t.next=6,createImageBitmap(e,A);case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(3),console.warn(t.t0),H=!1;case 13:return t.next=15,createImageBitmap(e);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function K(t){for(var e in t||j)return!1;return!0}function P(t){var e=q(t);return function(t){var e=q(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){var e=q(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;var A=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var A=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:A}}(),n=A.tableMarkers,r=A.sofMarkers,i=2;for(;i+9<e.byteLength;){var o=e.getUint16(i,!1);if(r.has(o))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!n.has(o))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){var e=q(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){var e=q(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function q(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}function X(t,e){var A=(P(t)||{}).mimeType,n=v.a._parseImageNode;return y(n),n(t,A,e)}function z(){return(z=Object(p.a)(E.a.mark((function t(e,A,n){var r,i,o,a,s;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(A=A||{}).image||{},i=r.type||"auto",o=(n||{}).url,a=$(i),t.t0=a,t.next="imagebitmap"===t.t0?8:"image"===t.t0?12:"data"===t.t0?16:20;break;case 8:return t.next=10,Y(e,A,o);case 10:return s=t.sent,t.abrupt("break",21);case 12:return t.next=14,L(e,A,o);case 14:return s=t.sent,t.abrupt("break",21);case 16:return t.next=18,X(e,A);case 18:return s=t.sent,t.abrupt("break",21);case 20:y(!1);case 21:return"data"===i&&(s=U(s)),t.abrupt("return",s);case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $(t){switch(t){case"auto":case"data":return function(){if(F)return"imagebitmap";if(b)return"image";if(S)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return F||b||S;case"imagebitmap":return F;case"image":return b;case"data":return S;case"html":return b;case"ndarray":return S;default:throw new Error("@loaders.gl/images: image ".concat(t," not supported in this environment"))}}(t),t}}var tt={id:"image",name:"Images",version:"2.3.13",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(t,e,A){return z.apply(this,arguments)},tests:[function(t){return Boolean(P(new DataView(t)))}],options:{image:{type:"auto",decode:!0}}},et=function(t){return"boolean"===typeof t},At=function(t){return"function"===typeof t},nt=function(t){return null!==t&&"object"===Object(D.a)(t)},rt=function(t){return nt(t)&&t.constructor==={}.constructor},it=function(t){return t&&"function"===typeof t[Symbol.iterator]},ot=function(t){return t&&"function"===typeof t[Symbol.asyncIterator]},at=function(t){return"undefined"!==typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json},st=function(t){return"undefined"!==typeof Blob&&t instanceof Blob},gt=function(t){return function(t){return"undefined"!==typeof ReadableStream&&t instanceof ReadableStream||nt(t)&&At(t.tee)&&At(t.cancel)&&At(t.getReader)}(t)||function(t){return nt(t)&&At(t.read)&&At(t.pipe)&&et(t.readable)}(t)};function ct(t,e){if(!t)throw new Error(e||"loader assertion failed.")}function It(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function ut(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?It(Object(A),!0).forEach((function(e){Object(h.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):It(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function lt(t){if(!t)return!1;Array.isArray(t)&&(t=t[0]);var e=t.parseTextSync||t.parseSync||t.parse||t.parseStream||t.parseInBatches,A=t.options&&t.options[t.id];return e=e||A&&A.workerUrl}function Ct(t){var e;return ct(t,"null loader"),ct(lt(t),"invalid loader"),Array.isArray(t)&&(e=t[1],t=ut(ut({},t=t[0]),{},{options:ut(ut({},t.options),e)})),t.extension&&(t.extensions=t.extensions||t.extension,delete t.extension),Array.isArray(t.extensions)||(t.extensions=[t.extensions]),ct(t.extensions&&t.extensions.length>0&&t.extensions[0]),(t.parseTextSync||t.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}var ht=A(965),Bt="",ft={};function dt(t){for(var e in ft)if(t.startsWith(e)){var A=ft[e];t=t.replace(e,A)}return t.startsWith("http://")||t.startsWith("https://")||(t="".concat(Bt).concat(t)),t}var Qt=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,Et=/^([-\w.]+\/[-\w.+]+)/;function pt(t){if("string"!==typeof t)return"";var e=t.match(Qt);return e?e[1]:""}var yt=/\?.*/;function vt(t){if(at(t)){var e=function(t){if("string"!==typeof t)return"";var e=t.match(Et);return e?e[1]:t}(t.headers.get("content-type")),A=pt(t.url);return{url:bt(t.url||""),type:e||A||null}}return st(t)?{url:bt(t.name||""),type:t.type||""}:"string"===typeof t?{url:bt(t),type:pt(t)}:{url:"",type:""}}function mt(t){return at(t)?t.headers["content-length"]||-1:st(t)?t.size:"string"===typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function bt(t){return t.replace(yt,"")}function Ft(t){return wt.apply(this,arguments)}function wt(){return(wt=Object(p.a)(E.a.mark((function t(e){var A,n,r,i,o,a,s;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!at(e)){t.next=2;break}return t.abrupt("return",e);case 2:return A={},(n=mt(e))>=0&&(A["content-length"]=String(n)),r=vt(e),i=r.url,(o=r.type)&&(A["content-type"]=o),t.next=9,Gt(e);case 9:return(a=t.sent)&&(A["x-first-bytes"]=a),"string"===typeof e&&(e=(new TextEncoder).encode(e)),s=new Response(e,{headers:A}),Object.defineProperty(s,"url",{value:i}),t.abrupt("return",s);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function St(t){return Dt.apply(this,arguments)}function Dt(){return(Dt=Object(p.a)(E.a.mark((function t(e){var A;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=5;break}return t.next=3,Rt(e);case 3:throw A=t.sent,new Error(A);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Rt(t){return Ut.apply(this,arguments)}function Ut(){return(Ut=Object(p.a)(E.a.mark((function t(e){var A,n,r;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,n=e.headers.get("Content-Type"),r=e.statusText,!n.includes("application/json")){t.next=11;break}return t.t0=r,t.t1=" ",t.next=9,e.text();case 9:t.t2=t.sent,r=t.t0+=t.t1.concat.call(t.t1,t.t2);case 11:A=(A+=r).length>60?"".concat(A.slice(60),"..."):A,t.next=17;break;case 15:t.prev=15,t.t3=t.catch(1);case 17:return t.abrupt("return",A);case 18:case"end":return t.stop()}}),t,null,[[1,15]])})))).apply(this,arguments)}function Gt(t){return Nt.apply(this,arguments)}function Nt(){return(Nt=Object(p.a)(E.a.mark((function t(e){var A,n,r,i;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=5,"string"!==typeof e){t.next=3;break}return t.abrupt("return","data:,".concat(e.slice(0,A)));case 3:if(!(e instanceof Blob)){t.next=8;break}return n=e.slice(0,5),t.next=7,new Promise((function(t){var e=new FileReader;e.onload=function(e){return t(e.target&&e.target.result)},e.readAsDataURL(n)}));case 7:return t.abrupt("return",t.sent);case 8:if(!(e instanceof ArrayBuffer)){t.next=12;break}return r=e.slice(0,A),i=kt(r),t.abrupt("return","data:base64,".concat(i));case 12:return t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function kt(t){for(var e="",A=new Uint8Array(t),n=0;n<A.byteLength;n++)e+=String.fromCharCode(A[n]);return btoa(e)}function xt(t){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(p.a)(E.a.mark((function t(e){var A;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,!e.headers.get("Content-Type").includes("application/json")){t.next=10;break}return t.t0=A,t.next=7,e.text();case 7:A=t.t0+=t.sent,t.next=11;break;case 10:A+=e.statusText;case 11:t.next=16;break;case 13:return t.prev=13,t.t1=t.catch(1),t.abrupt("return",A);case 16:return t.abrupt("return",A);case 17:case"end":return t.stop()}}),t,null,[[1,13]])})))).apply(this,arguments)}function Mt(t){return Lt.apply(this,arguments)}function Lt(){return(Lt=Object(p.a)(E.a.mark((function t(e){var A,n,r=arguments;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=r.length>1&&void 0!==r[1]?r[1]:{},"string"===typeof e){t.next=5;break}return t.next=4,Ft(e);case 4:return t.abrupt("return",t.sent);case 5:return e=dt(e),t.next=8,fetch(e,A);case 8:if((n=t.sent).ok||!A.throws){t.next=15;break}return t.t0=Error,t.next=13,xt(n);case 13:throw t.t1=t.sent,new t.t0(t.t1);case 15:return t.abrupt("return",n);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var _t=function(){function t(){Object(n.a)(this,t)}return Object(r.a)(t,[{key:"log",value:function(){return function(t){}}},{key:"info",value:function(){return function(t){}}},{key:"warn",value:function(){return function(t){}}},{key:"error",value:function(){return function(t){}}}]),t}();function Jt(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Tt(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Tt(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function jt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Ht(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(A),!0).forEach((function(e){Object(h.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):jt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var Yt={fetch:null,CDN:"https://unpkg.com/@loaders.gl",worker:!0,log:new(function(){function t(){Object(n.a)(this,t),this.console=console}return Object(r.a)(t,[{key:"log",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.log).bind.apply(t,[this.console].concat(A))}},{key:"info",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.info).bind.apply(t,[this.console].concat(A))}},{key:"warn",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.warn).bind.apply(t,[this.console].concat(A))}},{key:"error",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.error).bind.apply(t,[this.console].concat(A))}}]),t}()),metadata:!1,transforms:[]},Vt={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"},Zt=function(){ht.a.loaders=ht.a.loaders||{};var t=ht.a.loaders;return t._state=t._state||{},t._state},Wt=function(){var t=Zt();return t.globalOptions=t.globalOptions||Ht({},Yt),t.globalOptions};function Kt(t,e,A,n){return A=A||[],function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console;qt(t,null,A,Yt,Vt,e);var n,r=Jt(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=t&&t[i.id]||{},a=i.options&&i.options[i.id]||{},s=i.defaultOptions&&i.defaultOptions[i.id]||{};qt(o,i.id,A,a,s,e)}}catch(g){r.e(g)}finally{r.f()}}(t,A=Array.isArray(A)?A:[A]),zt(e,t,n)}function Pt(t,e){var A=Wt(),n=t.fetch||A.fetch;return"function"===typeof n?n:nt(n)?function(t){return Mt(t,n)}:e&&e.fetch?e.fetch:function(e){return Mt(e,t)}}function qt(t,e,A,n,r,i){var o=e||"Top level",a=e?"".concat(e,"."):"";for(var s in t){var g=!e&&nt(t[s]);if(!(s in n))if(s in r)A.warn("".concat(o," loader option '").concat(a).concat(s,"' deprecated, use '").concat(r[s],"'"));else if(!g){var c=Xt(s,i);A.warn("".concat(o," loader option '").concat(a).concat(s,"' not recognized. ").concat(c))}}}function Xt(t,e){var A,n=t.toLowerCase(),r="",i=Jt(e);try{for(i.s();!(A=i.n()).done;){var o=A.value;for(var a in o.options){if(t===a)return"Did you mean '".concat(o.id,".").concat(a,"'?");var s=a.toLowerCase();(n.startsWith(s)||s.startsWith(n))&&(r=r||"Did you mean '".concat(o.id,".").concat(a,"'?"))}}}catch(g){i.e(g)}finally{i.f()}return r}function zt(t,e,A){var n=Ht({},t.options||{});return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(n,A),null===n.log&&(n.log=new _t),$t(n,Wt()),$t(n,e),n}function $t(t,e){for(var A in e)if(A in e){var n=e[A];rt(n)&&rt(t[A])?t[A]=Ht(Ht({},t[A]),e[A]):t[A]=e[A]}}function te(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"2.3.0";ct(t,"no loader provided");var A=t.version;e&&A&&(e=ee(e),A=ee(A))}function ee(t){var e=t.split(".").map(Number);return{major:e[0],minor:e[1]}}var Ae=A(110),ne=A(388);function re(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return ie(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return ie(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function oe(t){if(ne.toArrayBuffer&&(t=ne.toArrayBuffer(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.buffer;if("string"===typeof t){var e=t;return(new TextEncoder).encode(e).buffer}return t&&"object"===Object(D.a)(t)&&t._toArrayBuffer?t._toArrayBuffer():ct(!1)}function ae(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];var n,r=e.map((function(t){return t instanceof ArrayBuffer?new Uint8Array(t):t})),i=r.reduce((function(t,e){return t+e.byteLength}),0),o=new Uint8Array(i),a=0,s=re(r);try{for(s.s();!(n=s.n()).done;){var g=n.value;o.set(g,a),a+=g.byteLength}}catch(c){s.e(c)}finally{s.f()}return o.buffer}function se(t){return ge.apply(this,arguments)}function ge(){return(ge=Object(p.a)(E.a.mark((function t(e){var A,n,r,i,o,a,s,g,c;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=[],n=[],r=!0,i=!1,t.prev=4,a=Object(Ae.a)(e);case 6:return t.next=8,a.next();case 8:return s=t.sent,r=s.done,t.next=12,s.value;case 12:if(g=t.sent,r){t.next=19;break}"string"===typeof(c=g)?n.push(c):A.push(c);case 16:r=!0,t.next=6;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(4),i=!0,o=t.t0;case 25:if(t.prev=25,t.prev=26,r||null==a.return){t.next=30;break}return t.next=30,a.return();case 30:if(t.prev=30,!i){t.next=33;break}throw o;case 33:return t.finish(30);case 34:return t.finish(25);case 35:if(!(n.length>0)){t.next=38;break}return ct(0===A.length),t.abrupt("return",n.join(""));case 38:return t.abrupt("return",ae.apply(void 0,A));case 39:case"end":return t.stop()}}),t,null,[[4,21,25,35],[26,,30,34]])})))).apply(this,arguments)}var ce=E.a.mark(Ie);function Ie(t){var e,A,n,r,i,o,a,s=arguments;return E.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:e=s.length>1&&void 0!==s[1]?s[1]:{},A=e.chunkSize,n=void 0===A?262144:A,r=0,i=new TextEncoder;case 4:if(!(r<t.length)){g.next=12;break}return o=Math.min(t.length-r,n),a=t.slice(r,r+o),r+=o,g.next=10,i.encode(a);case 10:g.next=4;break;case 12:case"end":return g.stop()}}),ce)}var ue=E.a.mark(le);function le(t){var e,A,n,r,i,o,a,s=arguments;return E.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:e=s.length>1&&void 0!==s[1]?s[1]:{},A=e.chunkSize,n=void 0===A?262144:A,r=0;case 3:if(!(r<t.byteLength)){g.next=14;break}return i=Math.min(t.byteLength-r,n),o=new ArrayBuffer(i),a=new Uint8Array(t,r,i),new Uint8Array(o).set(a),r+=i,g.next=12,o;case 12:g.next=3;break;case 14:case"end":return g.stop()}}),ue)}var Ce=A(69),he=A(95);function Be(t){return fe.apply(this,arguments)}function fe(){return(fe=Object(he.a)(E.a.mark((function t(e){var A,n,r,i,o,a=arguments;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=a.length>1&&void 0!==a[1]?a[1]:{},n=A.chunkSize||1048576,r=0;case 3:if(!(r<e.size)){t.next=13;break}return i=r+n,t.next=7,Object(Ce.a)(de(e,r,i));case 7:return o=t.sent,r=i,t.next=11,o;case 11:t.next=3;break;case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function de(t,e,A){return Qe.apply(this,arguments)}function Qe(){return(Qe=Object(p.a)(E.a.mark((function t(e,A,n){return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,r){var i=e.slice(A,n),o=new FileReader;o.onload=function(e){return t(e.target&&e.target.result)},o.onerror=function(t){return r(t)},o.readAsArrayBuffer(i)}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ee(t){if(ht.b||ht.c>=10){if("function"===typeof t[Symbol.asyncIterator])return function(t){return pe.apply(this,arguments)}(t);if("function"===typeof t.getIterator)return t.getIterator()}return ht.b?function(t){return ye.apply(this,arguments)}(t):function(t){return ve.apply(this,arguments)}(t)}function pe(){return(pe=Object(he.a)(E.a.mark((function t(e){var A,n,r,i,o,a,s;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=!0,n=!1,t.prev=2,i=Object(Ae.a)(e);case 4:return t.next=6,Object(Ce.a)(i.next());case 6:return o=t.sent,A=o.done,t.next=10,Object(Ce.a)(o.value);case 10:if(a=t.sent,A){t.next=18;break}return s=a,t.next=15,oe(s);case 15:A=!0,t.next=4;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(2),n=!0,r=t.t0;case 24:if(t.prev=24,t.prev=25,A||null==i.return){t.next=29;break}return t.next=29,Object(Ce.a)(i.return());case 29:if(t.prev=29,!n){t.next=32;break}throw r;case 32:return t.finish(29);case 33:return t.finish(24);case 34:case"end":return t.stop()}}),t,null,[[2,20,24,34],[25,,29,33]])})))).apply(this,arguments)}function ye(){return(ye=Object(he.a)(E.a.mark((function t(e){var A,n,r,i;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=e.getReader(),t.prev=1;case 2:return t.next=5,Object(Ce.a)(A.read());case 5:if(n=t.sent,r=n.done,i=n.value,!r){t.next=10;break}return t.abrupt("return");case 10:return t.next=12,oe(i);case 12:t.next=2;break;case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(1),A.releaseLock();case 19:case"end":return t.stop()}}),t,null,[[1,16]])})))).apply(this,arguments)}function ve(){return(ve=Object(he.a)(E.a.mark((function t(e){var A;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Ce.a)(e);case 2:e=t.sent;case 3:if(null===(A=e.read())){t.next=9;break}return t.next=8,oe(A);case 8:return t.abrupt("continue",3);case 9:if(!e._readableState.ended){t.next=11;break}return t.abrupt("return");case 11:return t.next=13,Object(Ce.a)(me(e));case 13:t.next=3;break;case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function me(t){return be.apply(this,arguments)}function be(){return(be=Object(p.a)(E.a.mark((function t(e){return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){e.once("readable",t)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Fe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof t?Ie(t,e):t instanceof ArrayBuffer?le(t,e):st(t)?Be(t,e):gt(t)?Ee(t):at(t)?Ee(t.body):ct(!1)}var we="Cannot convert supplied data type";function Se(t,e){if(e.text&&"string"===typeof t)return t;if(t instanceof ArrayBuffer){var A=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(A):A}if(ArrayBuffer.isView(t)||(i=t)&&"object"===Object(D.a)(i)&&i.isBuffer){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);var n=t.buffer,r=t.byteLength||t.length;return 0===t.byteOffset&&r===n.byteLength||(n=n.slice(t.byteOffset,t.byteOffset+r)),n}var i;throw new Error(we)}function De(t,e){return Re.apply(this,arguments)}function Re(){return(Re=Object(p.a)(E.a.mark((function t(e,A){var n,r;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!==typeof e&&!n){t.next=3;break}return t.abrupt("return",Se(e,A));case 3:if(!st(e)){t.next=7;break}return t.next=6,Ft(e);case 6:e=t.sent;case 7:if(!at(e)){t.next=21;break}return r=e,t.next=11,St(r);case 11:if(!A.binary){t.next=17;break}return t.next=14,r.arrayBuffer();case 14:t.t0=t.sent,t.next=20;break;case 17:return t.next=19,r.text();case 19:t.t0=t.sent;case 20:return t.abrupt("return",t.t0);case 21:if(gt(e)&&(e=Fe(e)),!it(e)&&!ot(e)){t.next=24;break}return t.abrupt("return",se(e));case 24:throw new Error(we);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ue=A(29);function Ge(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Ne(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Ge(Object(A),!0).forEach((function(e){Object(h.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Ge(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function ke(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return A||(t=Ne({fetch:Pt(e||{},t)},t),Array.isArray(t.loaders)||(t.loaders=null),t)}function xe(t,e){if(!e&&t&&!Array.isArray(t))return t;var A;if(t&&(A=Array.isArray(t)?t:[t]),e&&e.loaders){var n=Array.isArray(e.loaders)?e.loaders:[e.loaders];A=A?[].concat(Object(Ue.a)(A),Object(Ue.a)(n)):n}return A&&A.length?A:null}var Oe=new Map;function Me(t){return"try {\n  importScripts('".concat(t,"');\n} catch (error) {\n  console.error(error);\n}")}function Le(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],A=arguments.length>2?arguments[2]:void 0,n=A||new Set;if(t){if(_e(t))n.add(t);else if(_e(t.buffer))n.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"===Object(D.a)(t))for(var r in t)Le(t[r],e,n)}else;return void 0===A?Array.from(n):[]}function _e(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!==typeof MessagePort&&t instanceof MessagePort||("undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var Je=0;function Te(t){var e=t.data;(0,t.resolve)(e)}var je=function(){function t(e){var A=e.source,r=e.name,i=void 0===r?"web-worker-".concat(Je++):r,o=e.onMessage;Object(n.a)(this,t);var a=function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1],ct("string"===typeof t,"worker source"),t.startsWith("url(")&&t.endsWith(")")){var e=t.match(/^url\((.*)\)$/)[1];if(e&&!e.startsWith("http"))return e;t=Me(e)}var A=Oe.get(t);if(!A){var n=new Blob([t],{type:"application/javascript"});A=URL.createObjectURL(n),Oe.set(t,A)}return A}(A,i);this.worker=new Worker(a,{name:i}),this.name=i,this.onMessage=o||Te}return Object(r.a)(t,[{key:"process",value:function(){var t=Object(p.a)(E.a.mark((function t(e){var A=this;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){A.worker.onmessage=function(e){A.onMessage({worker:A.worker,data:e.data,resolve:t,reject:n})},A.worker.onerror=function(t){var e="".concat(A.name,": WorkerThread.process() failed");t.message&&(e+=" ".concat(t.message," ").concat(t.filename,":").concat(t.lineno,":").concat(t.colno));var r=new Error(e);console.error(t),n(r)};var r=Le(e);A.worker.postMessage(e,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"destroy",value:function(){this.worker.terminate(),this.worker=null}}]),t}(),He=function(){function t(e){var A=e.source,r=e.name,i=void 0===r?"unnamed":r,o=e.maxConcurrency,a=void 0===o?1:o,s=e.onMessage,g=e.onDebug,c=void 0===g?function(){}:g;Object(n.a)(this,t),this.source=A,this.name=i,this.maxConcurrency=a,this.onMessage=s,this.onDebug=c,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1}return Object(r.a)(t,[{key:"destroy",value:function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0}},{key:"process",value:function(t,e){var A=this;return new Promise((function(n,r){A.jobQueue.push({data:t,jobName:e,resolve:n,reject:r}),A._startQueuedJob()}))}},{key:"_startQueuedJob",value:function(){var t=Object(p.a)(E.a.mark((function t(){var e,A;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jobQueue.length){t.next=2;break}return t.abrupt("return");case 2:if(e=this._getAvailableWorker()){t.next=5;break}return t.abrupt("return");case 5:return A=this.jobQueue.shift(),this.onDebug({message:"processing",worker:e.name,job:A.jobName,backlog:this.jobQueue.length}),t.prev=7,t.t0=A,t.next=11,e.process(A.data);case 11:t.t1=t.sent,t.t0.resolve.call(t.t0,t.t1),t.next=18;break;case 15:t.prev=15,t.t2=t.catch(7),A.reject(t.t2);case 18:return t.prev=18,this._onWorkerDone(e),t.finish(18);case 21:case"end":return t.stop()}}),t,this,[[7,15,18,21]])})));return function(){return t.apply(this,arguments)}}()},{key:"_onWorkerDone",value:function(t){this.isDestroyed?t.destroy():(this.idleQueue.push(t),this._startQueuedJob())}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;var t="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new je({source:this.source,onMessage:this.onMessage,name:t})}return null}}]),t}(),Ye=function(){function t(e){var A=e.maxConcurrency,r=void 0===A?5:A,i=e.onMessage,o=void 0===i?null:i,a=e.onDebug,s=void 0===a?function(){}:a;Object(n.a)(this,t),this.maxConcurrency=r,this.onMessage=o,this.onDebug=s,this.workerPools=new Map}return Object(r.a)(t,null,[{key:"isSupported",value:function(){return"undefined"!==typeof Worker}}]),Object(r.a)(t,[{key:"setProps",value:function(t){"maxConcurrency"in t&&(this.maxConcurrency=t.maxConcurrency),"onDebug"in t&&(this.onDebug=t.onDebug)}},{key:"destroy",value:function(){this.workerPools.forEach((function(t){return t.destroy()}))}},{key:"process",value:function(){var t=Object(p.a)(E.a.mark((function t(e,A,n){var r;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this._getWorkerPool(e,A),t.abrupt("return",r.process(n));case 2:case"end":return t.stop()}}),t,this)})));return function(e,A,n){return t.apply(this,arguments)}}()},{key:"_getWorkerPool",value:function(t,e){var A=this.workerPools.get(e);return A||(A=new He({source:t,name:e,onMessage:Ve.bind(null,this.onMessage),maxConcurrency:this.maxConcurrency,onDebug:this.onDebug}),this.workerPools.set(e,A)),A}}]),t}();function Ve(t,e){var A=e.worker,n=e.data,r=e.resolve,i=e.reject;if(t)t({worker:A,data:n,resolve:r,reject:i});else switch(n.type){case"done":r(n.result);break;case"error":i(n.message)}}function Ze(t,e,A,n){if(!Ye.isSupported())return!1;var r=A&&A[t.id];return!!("local"===A.worker&&r&&r.localWorkerUrl||A.worker&&r&&r.workerUrl)&&(!t.useWorker||t.useWorker(A))}function We(t,e,A,n){var r=(A||{}).worker,i=A&&A[t.id]||{},o="local"===r?i.localWorkerUrl:i.workerUrl,a="url(".concat(o,")"),s=t.name,g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={};t.maxConcurrency&&(e.maxConcurrency=t.maxConcurrency);t.onDebug&&(e.onDebug=t.onDebug);Ke||(Ke=new Ye({onMessage:Pe}));return Ke.setProps(e),Ke}(A);A=JSON.parse(JSON.stringify(A));var c="2.3.0"!==t.version?"(core version ".concat("2.3.0",")"):"";return g.process(a,"".concat(s,"-worker@").concat(t.version).concat(c),{arraybuffer:oe(e),options:A,source:"loaders.gl@".concat("2.3.0"),type:"parse"})}var Ke=null;function Pe(t){return qe.apply(this,arguments)}function qe(){return(qe=Object(p.a)(E.a.mark((function t(e){var A,n,r,i,o;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=e.worker,n=e.data,r=e.resolve,i=e.reject,t.t0=n.type,t.next="done"===t.t0?4:"parse"===t.t0?6:"error"===t.t0?17:19;break;case 4:return r(n.result),t.abrupt("break",19);case 6:return t.prev=6,t.next=9,hA(n.arraybuffer,n.options,n.url);case 9:o=t.sent,A.postMessage({type:"parse-done",id:n.id,result:o},Le(o)),t.next=16;break;case 13:t.prev=13,t.t1=t.catch(6),A.postMessage({type:"parse-error",id:n.id,message:t.t1.message});case 16:return t.abrupt("break",19);case 17:return i(n.message),t.abrupt("break",19);case 19:case"end":return t.stop()}}),t,null,[[6,13]])})))).apply(this,arguments)}var Xe=function(){var t=Zt();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function ze(){return Xe()}function $e(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function tA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?$e(Object(A),!0).forEach((function(e){Object(h.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):$e(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function eA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return AA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return AA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function AA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var nA=/\.([^.]+)$/;function rA(t){return iA.apply(this,arguments)}function iA(){return(iA=Object(p.a)(E.a.mark((function t(e){var A,n,r,i,o=arguments;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=o.length>1&&void 0!==o[1]?o[1]:[],n=o.length>2&&void 0!==o[2]?o[2]:{},r=o.length>3&&void 0!==o[3]?o[3]:{},!(i=oA(e,A,tA(tA({},n),{},{nothrow:!0}),r))){t.next=6;break}return t.abrupt("return",i);case 6:if(!st(e)){t.next=11;break}return t.next=9,de(e,0,10);case 9:e=t.sent,i=oA(e,A,n,r);case 11:if(i||n.nothrow){t.next=13;break}throw new Error(aA(e));case 13:return t.abrupt("return",i);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function oA(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&!Array.isArray(e))return Ct(e);sA(e=[].concat(Object(Ue.a)(e||[]),Object(Ue.a)(ze())));var r=vt(t),i=r.url,o=r.type,a=gA(e,i||n.url);if(!(a=(a=a||cA(e,o))||IA(e,t))&&!A.nothrow)throw new Error(aA(t));return a}function aA(t){var e=vt(t),A=e.url,n=e.type,r="No valid loader found";return t&&(r+=' data: "'.concat(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return CA(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var A=0;return CA(t,A,e)}return""}(t),'", contentType: "').concat(n,'"')),A&&(r+=" url: ".concat(A)),r}function sA(t){var e,A=eA(t);try{for(A.s();!(e=A.n()).done;){Ct(e.value)}}catch(n){A.e(n)}finally{A.f()}}function gA(t,e){var A=e&&e.match(nA),n=A&&A[1];return n&&function(t,e){e=e.toLowerCase();var A,n=eA(t);try{for(n.s();!(A=n.n()).done;){var r,i=A.value,o=eA(i.extensions);try{for(o.s();!(r=o.n()).done;){if(r.value.toLowerCase()===e)return i}}catch(a){o.e(a)}finally{o.f()}}}catch(a){n.e(a)}finally{n.f()}return null}(t,n)}function cA(t,e){var A,n=eA(t);try{for(n.s();!(A=n.n()).done;){var r=A.value;if(r.mimeTypes&&r.mimeTypes.includes(e))return r;if(e==="application/x.".concat(r.id))return r}}catch(i){n.e(i)}finally{n.f()}return null}function IA(t,e){if(!e)return null;var A,n=eA(t);try{for(n.s();!(A=n.n()).done;){var r=A.value;if("string"===typeof e){if(uA(e,r))return r}else if(ArrayBuffer.isView(e)){if(lA(e.buffer,e.byteOffset,r))return r}else if(e instanceof ArrayBuffer){if(lA(e,0,r))return r}}}catch(i){n.e(i)}finally{n.f()}return null}function uA(t,e){return e.testText&&e.testText(t)}function lA(t,e,A){return(Array.isArray(A.tests)?A.tests:[A.tests]).some((function(n){return function(t,e,A,n){if(n instanceof ArrayBuffer)return function(t,e,A){if(A=A||t.byteLength,t.byteLength<A||e.byteLength<A)return!1;for(var n=new Uint8Array(t),r=new Uint8Array(e),i=0;i<n.length;++i)if(n[i]!==r[i])return!1;return!0}(n,t,n.byteLength);switch(Object(D.a)(n)){case"function":return n(t,A);case"string":var r=CA(t,e,n.length);return n===r;default:return!1}}(t,e,A,n)}))}function CA(t,e,A){if(t.byteLength<e+A)return"";for(var n=new DataView(t),r="",i=0;i<A;i++)r+=String.fromCharCode(n.getUint8(e+i));return r}function hA(t,e,A,n){return BA.apply(this,arguments)}function BA(){return(BA=Object(p.a)(E.a.mark((function t(e,A,n,r){var i,o,a,s;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return ct(!r||"string"!==typeof r,"parse no longer accepts final url"),!A||Array.isArray(A)||lt(A)||(r=n,n=A,A=null),t.next=4,e;case 4:return e=t.sent,n=n||{},i=vt(e),o=i.url,a=xe(A,r),t.next=10,rA(e,a,n);case 10:if(s=t.sent){t.next=13;break}return t.abrupt("return",null);case 13:return n=Kt(n,s,a,o),r=ke({url:o,parse:hA,loaders:a},n,r),t.next=17,fA(s,e,n,r);case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function fA(t,e,A,n){return dA.apply(this,arguments)}function dA(){return(dA=Object(p.a)(E.a.mark((function t(e,A,n,r){return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return te(e),t.next=3,De(A,e);case 3:if(A=t.sent,!e.parseTextSync||"string"!==typeof A){t.next=7;break}return n.dataType="text",t.abrupt("return",e.parseTextSync(A,n,r,e));case 7:if(!Ze(e,0,n)){t.next=11;break}return t.next=10,We(e,A,n);case 10:return t.abrupt("return",t.sent);case 11:if(!e.parseText||"string"!==typeof A){t.next=15;break}return t.next=14,e.parseText(A,n,r,e);case 14:return t.abrupt("return",t.sent);case 15:if(!e.parse){t.next=19;break}return t.next=18,e.parse(A,n,r,e);case 18:return t.abrupt("return",t.sent);case 19:return ct(!e.parseSync),t.abrupt("return",ct(!1));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function QA(){return(QA=Object(p.a)(E.a.mark((function t(e,A,n){var r,i;return E.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(A)||lt(A)||(n=A,A=null),r=Pt(n||{}),i=e,"string"!==typeof e){t.next=9;break}return t.next=6,r(e);case 6:i=t.sent,t.next=10;break;case 9:e=null;case 10:if(!st(e)){t.next=15;break}return t.next=13,r(e);case 13:i=t.sent,e=null;case 15:return t.next=17,hA(i,A,n);case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var EA,pA=A(124);function yA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function vA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?yA(Object(A),!0).forEach((function(e){Object(h.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):yA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function mA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return bA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return bA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function bA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var FA=function(){},wA=(EA={},Object(h.a)(EA,10241,9987),Object(h.a)(EA,10240,9729),Object(h.a)(EA,10242,33071),Object(h.a)(EA,10243,33071),EA);function SA(t){return t&&(t.id||t.url)}function DA(t,e,A){for(var n=0;n<e.length;n++){var r=e[n],i=r.icon,o=r.xOffset;t[SA(i)]=Object.assign({},i,{x:o,y:A})}}var RA=function(){function t(e,A){var r=A.onUpdate,i=void 0===r?FA:r,o=A.onError,a=void 0===o?FA:o;Object(n.a)(this,t),this.gl=e,this.onUpdate=i,this.onError=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(r.a)(t,[{key:"finalize",value:function(){this._texture&&this._texture.delete()}},{key:"getTexture",value:function(){return this._texture||this._externalTexture}},{key:"getIconMapping",value:function(t){var e=this._autoPacking?SA(t):t;return this._mapping[e]||{}}},{key:"setProps",value:function(t){var e=t.loadOptions,A=t.autoPacking,n=t.iconAtlas,r=t.iconMapping,i=t.data,o=t.getIcon;e&&(this._loadOptions=e),void 0!==A&&(this._autoPacking=A),o&&(this._getIcon=o),r&&(this._mapping=r),n&&this._updateIconAtlas(n),this._autoPacking&&(i||o)&&"undefined"!==typeof document&&(this._canvas=this._canvas||document.createElement("canvas"),this._updateAutoPacking(i))}},{key:"_updateIconAtlas",value:function(t){this._texture&&(this._texture.delete(),this._texture=null),this._externalTexture=t,this.onUpdate()}},{key:"_updateAutoPacking",value:function(t){var e=Object.values(function(t,e,A){if(!t||!e)return null;A=A||{};var n,r={},i=Object(pA.a)(t),o=i.iterable,a=i.objectInfo,s=mA(o);try{for(s.s();!(n=s.n()).done;){var g=n.value;a.index++;var c=e(g,a),I=SA(c);if(!c)throw new Error("Icon is missing.");if(!c.url)throw new Error("Icon url is missing.");r[I]||A[I]&&c.url===A[I].url||(r[I]=vA(vA({},c),{},{source:g,sourceIndex:a.index}))}}catch(u){s.e(u)}finally{s.f()}return r}(t,this._getIcon,this._mapping)||{});if(e.length>0){var A=function(t){for(var e,A=t.icons,n=t.buffer,r=t.mapping,i=void 0===r?{}:r,o=t.xOffset,a=void 0===o?0:o,s=t.yOffset,g=void 0===s?0:s,c=t.rowHeight,I=void 0===c?0:c,u=t.canvasWidth,l=[],C=0;C<A.length;C++){var h=A[C];if(!i[SA(h)]){var B=h.height,f=h.width;a+f+n>u&&(DA(i,l,g),a=0,g=I+g+n,I=0,l=[]),l.push({icon:h,xOffset:a}),a=a+f+n,I=Math.max(I,B)}}return l.length>0&&DA(i,l,g),{mapping:i,rowHeight:I,xOffset:a,yOffset:g,canvasWidth:u,canvasHeight:(e=I+g+n,Math.pow(2,Math.ceil(Math.log2(e))))}}({icons:e,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset}),n=A.mapping,r=A.xOffset,i=A.yOffset,o=A.rowHeight,a=A.canvasHeight;this._rowHeight=o,this._mapping=n,this._xOffset=r,this._yOffset=i,this._canvasHeight=a,this._texture||(this._texture=new d.a(this.gl,{width:this._canvasWidth,height:this._canvasHeight,parameters:wA})),this._texture.height!==this._canvasHeight&&(this._texture=function(t,e,A,n){var r=e.width,i=e.height,o=Object(B.a)(e,{width:A,height:n});return Object(f.b)(e,o,{targetY:0,width:r,height:i}),e.delete(),o}(this.gl,this._texture,this._canvasWidth,this._canvasHeight)),this.onUpdate(),this._loadIcons(e)}}},{key:"_loadIcons",value:function(t){var e,A=this,n=this._canvas.getContext("2d"),r=mA(t);try{var i=function(){var t=e.value;A._pendingCount++,function(t,e,A){return QA.apply(this,arguments)}(t.url,tt,A._loadOptions).then((function(e){var r=SA(t),i=A._mapping[r],o=i.x,a=i.y,s=i.width,g=i.height,c=function(t,e,A,n){return A===e.width&&n===e.height?e:(t.canvas.height=n,t.canvas.width=A,t.clearRect(0,0,t.canvas.width,t.canvas.height),t.drawImage(e,0,0,e.width,e.height,0,0,A,n),t.canvas)}(n,e,s,g);A._texture.setSubImageData({data:c,x:o,y:a,width:s,height:g}),A._texture.generateMipmap(),A.onUpdate()})).catch((function(e){A.onError({url:t.url,source:t.source,sourceIndex:t.sourceIndex,loadOptions:A._loadOptions,error:e})})).finally((function(){A._pendingCount--}))};for(r.s();!(e=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}}},{key:"isLoaded",get:function(){return 0===this._pendingCount}}]),t}();function UA(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return kA}));var GA=[0,0,0,255],NA={iconAtlas:{type:"image",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(t){return t.position}},getIcon:{type:"accessor",value:function(t){return t.icon}},getColor:{type:"accessor",value:GA},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},onIconError:{type:"function",value:null,compare:!1,optional:!0}},kA=function(t){Object(o.a)(A,t);var e=UA(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){return Object(i.a)(Object(s.a)(A.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:[g.a,c.a]})}},{key:"initializeState",value:function(){this.state={iconManager:new RA(this.context.gl,{onUpdate:this._onUpdate.bind(this),onError:this._onError.bind(this)})},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:GA},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instancePixelOffset:{size:2,transition:!0,accessor:"getPixelOffset"}})}},{key:"updateState",value:function(t){var e=t.oldProps,n=t.props,r=t.changeFlags;Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,{props:n,oldProps:e,changeFlags:r});var o=this.getAttributeManager(),a=n.iconAtlas,g=n.iconMapping,c=n.data,I=n.getIcon,u=this.state.iconManager;u.setProps({loadOptions:n.loadOptions});var l=!1;if(a||this.internalState.isAsyncPropLoading("iconAtlas")?(e.iconAtlas!==n.iconAtlas&&u.setProps({iconAtlas:a,autoPacking:!1}),e.iconMapping!==n.iconMapping&&(u.setProps({iconMapping:g}),l=!0)):u.setProps({autoPacking:!0}),(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getIcon))&&u.setProps({data:c,getIcon:I}),l&&(o.invalidate("instanceOffsets"),o.invalidate("instanceIconFrames"),o.invalidate("instanceColorModes")),r.extensionsChanged){var C=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(C)}),o.invalidateAll()}}},{key:"finalizeState",value:function(){Object(i.a)(Object(s.a)(A.prototype),"finalizeState",this).call(this),this.state.iconManager.finalize()}},{key:"draw",value:function(t){var e=t.uniforms,A=this.props,n=A.sizeScale,r=A.sizeMinPixels,i=A.sizeMaxPixels,o=A.sizeUnits,a=A.billboard,s=A.alphaCutoff,g=this.state.iconManager,c=this.context.viewport,I=g.getTexture();I&&this.state.model.setUniforms(Object.assign({},e,{iconsTexture:I,iconsTextureDim:[I.width,I.height],sizeScale:n*("pixels"===o?c.metersPerPixel:1),sizeMinPixels:r,sizeMaxPixels:i,billboard:a,alphaCutoff:s})).draw()}},{key:"_getModel",value:function(t){return new l.a(t,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new C.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:"_onError",value:function(t){var e=this.getCurrentLayer().props.onIconError;e?e(t):I.a.error(t.error)()}},{key:"getInstanceOffset",value:function(t){var e=this.state.iconManager.getIconMapping(t);return[e.width/2-e.anchorX||0,e.height/2-e.anchorY||0]}},{key:"getInstanceColorMode",value:function(t){return this.state.iconManager.getIconMapping(t).mask?1:0}},{key:"getInstanceIconFrame",value:function(t){var e=this.state.iconManager.getIconMapping(t);return[e.x||0,e.y||0,e.width||0,e.height||0]}},{key:"isLoaded",get:function(){return Object(i.a)(Object(s.a)(A.prototype),"isLoaded",this)&&this.state.iconManager.isLoaded}}]),A}(u.a);kA.layerName="IconLayer",kA.defaultProps=NA},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(1),o=A(22),a=A(35),s=A(14),g=A(16),c=A(7),I=A(737),u=A(385),l=A(83);function C(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function h(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?C(Object(A),!0).forEach((function(e){Object(i.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):C(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var B=function(){function t(e,A){Object(n.a)(this,t),this.opts=A,this.source=e}return Object(r.a)(t,[{key:"getValue",value:function(){var t=this.source.getBuffer(),e=this.getAccessor();if(t)return[t,e];var A=this.source.value,n=e.size,r=A;if(A&&A.length!==n){r=new Float32Array(n);for(var i=e.elementOffset||0,o=0;o<n;++o)r[o]=A[i+o]}return r}},{key:"getAccessor",value:function(){return h(h({},this.source.getAccessor()),this.opts)}},{key:"value",get:function(){return this.source.value}}]),t}();var f=A(139),d=A(99),Q=A(43);function E(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function p(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?E(Object(A),!0).forEach((function(e){Object(i.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):E(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function y(t){return t.stride||t.size*t.bytesPerElement}function v(t,e){e.offset&&Q.a.removed("shaderAttribute.offset","vertexOffset, elementOffset")();var A=y(t),n=("vertexOffset"in e?e.vertexOffset:t.vertexOffset||0)*A+(e.elementOffset||0)*t.bytesPerElement+(t.offset||0);return p(p({},e),{},{offset:n,stride:A})}var m=function(){function t(e,A){Object(n.a)(this,t),this.gl=e,this.id=A.id,this.size=A.size;var r=A.logicalType||A.type,i=5130===r,o=A.defaultValue;o=Number.isFinite(o)?[o]:o||new Array(this.size).fill(0),A.defaultValue=o;var a=r;i?a=5126:!a&&A.isIndexed?a=e&&Object(I.b)(e,u.a.ELEMENT_INDEX_UINT32)?5125:5123:a||(a=5126),A.logicalType=r,A.type=a;var s=function(t){switch(t){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")}}(r||a||5126);this.shaderAttributes={},this.doublePrecision=i,i&&!1===A.fp64&&(s=Float32Array),A.bytesPerElement=s.BYTES_PER_ELEMENT,this.defaultType=s,this.value=null,this.settings=A,this.state={externalBuffer:null,bufferAccessor:A,allocatedValue:null,constant:!1},this._buffer=null,this.setData(A)}return Object(r.a)(t,[{key:"delete",value:function(){this._buffer&&(this._buffer.delete(),this._buffer=null),f.a.release(this.state.allocatedValue)}},{key:"getShaderAttributes",value:function(t,e){if(this.doublePrecision){var A={},n=this.value instanceof Float64Array,r=function(t,e){var A=v(t,e);return{high:A,low:p(p({},A),{},{offset:A.offset+4*t.size})}}(this.getAccessor(),e||{});return A[t]=new B(this,r.high),A["".concat(t,"64Low")]=n?new B(this,r.low):new Float32Array(this.size),A}if(e){var o=v(this.getAccessor(),e);return Object(i.a)({},t,new B(this,o))}return Object(i.a)({},t,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(t){var e=this.state;ArrayBuffer.isView(t)?t={value:t}:t instanceof l.a&&(t={buffer:t});var A=p(p({},this.settings),t);if(e.bufferAccessor=A,t.constant){var n=t.value;if(n=this._normalizeValue(n,[],0),this.settings.normalized&&(n=this._normalizeConstant(n)),!(!e.constant||!this._areValuesEqual(n,this.value)))return!1;e.externalBuffer=null,e.constant=!0,this.value=n}else if(t.buffer){var r=t.buffer;e.externalBuffer=r,e.constant=!1,this.value=t.value;var i=t.value instanceof Float64Array;A.type=t.type||r.accessor.type,A.bytesPerElement=r.accessor.BYTES_PER_ELEMENT*(i?2:1),A.stride=y(A)}else if(t.value){this._checkExternalBuffer(t);var o=t.value;e.externalBuffer=null,e.constant=!1,this.value=o,A.bytesPerElement=o.BYTES_PER_ELEMENT,A.stride=y(A);var a=this.buffer,s=this.byteOffset;this.doublePrecision&&o instanceof Float64Array&&(o=Object(d.f)(o,A));var g=o.byteLength+s+2*A.stride;a.byteLength<g&&a.reallocate(g),a.setAccessor(null),a.subData({data:o,offset:s}),A.type=t.type||a.accessor.type}return!0}},{key:"updateSubBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.value,A=t.startOffset,n=void 0===A?0:A,r=t.endOffset;this.buffer.subData({data:this.doublePrecision&&e instanceof Float64Array?Object(d.f)(e,{size:this.size,startIndex:n,endIndex:r}):e.subarray(n,r),offset:n*e.BYTES_PER_ELEMENT+this.byteOffset})}},{key:"allocate",value:function(t){var e=t.numInstances,A=t.copy,n=void 0!==A&&A,r=this.state,i=r.allocatedValue,o=f.a.allocate(i,e+1,{size:this.size,type:this.defaultType,copy:n});this.value=o;var a=this.buffer,s=this.byteOffset;return a.byteLength<o.byteLength+s&&(a.reallocate(o.byteLength+s),n&&i&&a.subData({data:i instanceof Float64Array?Object(d.f)(i,this):i,offset:s})),r.allocatedValue=o,r.constant=!1,r.externalBuffer=null,r.bufferAccessor=this.settings,!0}},{key:"_checkExternalBuffer",value:function(t){var e=t.value;if(!t.constant&&e){var A=this.defaultType,n=!1;if(this.doublePrecision&&(n=e.BYTES_PER_ELEMENT<4),n)throw new Error("Attribute ".concat(this.id," does not support ").concat(e.constructor.name));e instanceof A||!this.settings.normalized||"normalized"in t||Q.a.warn("Attribute ".concat(this.id," is normalized"))()}}},{key:"_normalizeConstant",value:function(t){switch(this.settings.type){case 5120:return new Float32Array(t).map((function(t){return(t+128)/255*2-1}));case 5122:return new Float32Array(t).map((function(t){return(t+32768)/65535*2-1}));case 5121:return new Float32Array(t).map((function(t){return t/255}));case 5123:return new Float32Array(t).map((function(t){return t/65535}));default:return t}}},{key:"_normalizeValue",value:function(t,e,A){var n=this.settings,r=n.defaultValue,i=n.size;if(Number.isFinite(t))return e[A]=t,e;if(!t)return e[A]=r[0],e;switch(i){case 4:e[A+3]=Number.isFinite(t[3])?t[3]:r[3];case 3:e[A+2]=Number.isFinite(t[2])?t[2]:r[2];case 2:e[A+1]=Number.isFinite(t[1])?t[1]:r[1];case 1:e[A+0]=Number.isFinite(t[0])?t[0]:r[0];break;default:for(var o=i;--o>=0;)e[A+o]=Number.isFinite(t[o])?t[o]:r[o]}return e}},{key:"_areValuesEqual",value:function(t,e){if(!t||!e)return!1;for(var A=this.size,n=0;n<A;n++)if(t[n]!==e[n])return!1;return!0}},{key:"buffer",get:function(){if(!this._buffer){var t=this.settings,e=t.isIndexed,A=t.type;this._buffer=new l.a(this.gl,{id:this.id,target:e?34963:34962,accessor:{type:A}})}return this._buffer}},{key:"byteOffset",get:function(){var t=this.getAccessor();return t.vertexOffset?t.vertexOffset*y(t):0}}]),t}(),b=A(55),F=A(124),w=A(157),S=[],D=[[0,1/0]];function R(t,e){if(t===D)return t;if(e[0]<0&&(e[0]=0),e[0]>=e[1])return t;for(var A=[],n=t.length,r=0,i=0;i<n;i++){var o=t[i];o[1]<e[0]?(A.push(o),r=i+1):o[0]>e[1]?A.push(o):e=[Math.min(o[0],e[0]),Math.max(o[1],e[1])]}return A.splice(r,0,e),A}var U=A(103);function G(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return N(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return N(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function k(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var x=function(t){Object(s.a)(A,t);var e=k(A);function A(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,A),r=e.call(this,t,i);var o=i.transition,a=void 0!==o&&o,s=i.noAlloc,g=void 0!==s&&s,c=i.update,I=void 0===c?null:c,u=i.accessor,l=void 0===u?null:u,C=i.transform,h=void 0===C?null:C,B=i.startIndices,f=void 0===B?null:B;return Object.assign(r.settings,{transition:a,noAlloc:g,update:I||l&&r._autoUpdater,accessor:l,transform:h}),Object.assign(r.state,{lastExternalBuffer:null,binaryValue:null,binaryAccessor:null,needsUpdate:!0,needsRedraw:!1,updateRanges:D,startIndices:f}),Object.seal(r.settings),Object.seal(r.state),r._validateAttributeUpdaters(),r}return Object(r.a)(A,[{key:"needsUpdate",value:function(){return this.state.needsUpdate}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.clearChangedFlags,A=void 0!==e&&e,n=this.state.needsRedraw;return this.state.needsRedraw=n&&!A,n}},{key:"getUpdateTriggers",value:function(){var t=this.settings.accessor;return[this.id].concat("function"!==typeof t&&t||[])}},{key:"supportsTransition",value:function(){return Boolean(this.settings.transition)}},{key:"getTransitionSetting",value:function(t){if(!t||!this.supportsTransition())return null;var e=this.settings.accessor,A=this.settings.transition,n=Array.isArray(e)?t[e.find((function(e){return t[e]}))]:t[e];return Object(U.e)(n,A)}},{key:"setNeedsUpdate",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id,e=arguments.length>1?arguments[1]:void 0;if(this.state.needsUpdate=this.state.needsUpdate||t,this.setNeedsRedraw(t),e){var A=e.startRow,n=void 0===A?0:A,r=e.endRow,i=void 0===r?1/0:r;this.state.updateRanges=R(this.state.updateRanges,[n,i])}else this.state.updateRanges=D}},{key:"clearNeedsUpdate",value:function(){this.state.needsUpdate=!1,this.state.updateRanges=S}},{key:"setNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.id;this.state.needsRedraw=this.state.needsRedraw||t}},{key:"update",value:function(t){this.setData(t)}},{key:"allocate",value:function(t){var e=this.state,n=this.settings;return!n.noAlloc&&(!!n.update&&(Object(b.a)(Number.isFinite(t)),Object(a.a)(Object(c.a)(A.prototype),"allocate",this).call(this,{numInstances:t,copy:e.updateRanges!==D}),!0))}},{key:"updateBuffer",value:function(t){var e=t.numInstances,n=t.data,r=t.props,i=t.context;if(!this.needsUpdate())return!1;var s=this.state.updateRanges,g=this.settings,I=g.update,u=g.noAlloc,l=!0;if(I){var C,h=G(s);try{for(h.s();!(C=h.n()).done;){var B=Object(o.a)(C.value,2),f=B[0],d=B[1];I.call(i,this,{data:n,startRow:f,endRow:d,props:r,numInstances:e})}}catch(F){h.e(F)}finally{h.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 Q,E=G(s);try{for(E.s();!(Q=E.n()).done;){var p=Object(o.a)(Q.value,2),y=p[0],v=p[1],m=Number.isFinite(y)?this.getVertexOffset(y):0,b=Number.isFinite(v)?this.getVertexOffset(v):u||!Number.isFinite(e)?this.value.length:e*this.size;Object(a.a)(Object(c.a)(A.prototype),"updateSubBuffer",this).call(this,{startOffset:m,endOffset:b})}}catch(F){E.e(F)}finally{E.f()}}else;this._checkAttributeArray()}else l=!1;return this.clearNeedsUpdate(),this.setNeedsRedraw(),l}},{key:"setConstantValue",value:function(t){return void 0!==t&&"function"!==typeof t&&(this.setData({constant:!0,value:t})&&this.setNeedsRedraw(),this.clearNeedsUpdate(),!0)}},{key:"setExternalBuffer",value:function(t){var e=this.state;return t?(this.clearNeedsUpdate(),e.lastExternalBuffer===t||(e.lastExternalBuffer=t,this.setNeedsRedraw(),this.setData(t)),!0):(e.lastExternalBuffer=null,!1)}},{key:"setBinaryValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.state,n=this.settings;if(!t)return A.binaryValue=null,A.binaryAccessor=null,!1;if(n.noAlloc)return!1;if(A.binaryValue===t)return this.clearNeedsUpdate(),!0;A.binaryValue=t,this.setNeedsRedraw(),ArrayBuffer.isView(t)&&(t={value:t});var r=n.transform||e!==this.startIndices;if(r){Object(b.a)(ArrayBuffer.isView(t.value),"invalid ".concat(n.accessor));var i=t.size&&t.size!==this.size;return A.binaryAccessor=Object(F.b)(t.value,{size:t.size||this.size,stride:t.stride,offset:t.offset,startIndices:e,nested:i}),!1}return this.clearNeedsUpdate(),this.setData(t),!0}},{key:"getVertexOffset",value:function(t){var e=this.startIndices;return(e?e[t]:t)*this.size}},{key:"getShaderAttributes",value:function(){var t=this.settings.shaderAttributes||Object(i.a)({},this.id,null),e={};for(var n in t)Object.assign(e,Object(a.a)(Object(c.a)(A.prototype),"getShaderAttributes",this).call(this,n,t[n]));return e}},{key:"_autoUpdater",value:function(t,e){var A=e.data,n=e.startRow,r=e.endRow,i=e.props,o=e.numInstances;if(!t.constant){var a=t.settings,s=t.state,g=t.value,c=t.size,I=t.startIndices,u=a.accessor,l=a.transform,C=s.binaryAccessor||("function"===typeof u?u:i[u]);Object(b.a)("function"===typeof C,'accessor "'.concat(u,'" is not a function'));var h,B=t.getVertexOffset(n),f=Object(F.a)(A,n,r),d=f.iterable,Q=f.objectInfo,E=G(d);try{for(E.s();!(h=E.n()).done;){var p=h.value;Q.index++;var y=C(p,Q);if(l&&(y=l.call(this,y)),I){var v=(Q.index<I.length-1?I[Q.index+1]:o)-I[Q.index];if(y&&Array.isArray(y[0])){var m,S=B,D=G(y);try{for(D.s();!(m=D.n()).done;){var R=m.value;t._normalizeValue(R,g,S),S+=c}}catch(U){D.e(U)}finally{D.f()}}else y&&y.length>c?g.set(y,B):(t._normalizeValue(y,Q.target,0),Object(w.a)({target:g,source:Q.target,start:B,count:v}));B+=v*c}else t._normalizeValue(y,g,B),B+=c}}catch(U){E.e(U)}finally{E.f()}}}},{key:"_validateAttributeUpdaters",value:function(){var t=this.settings;if(!(t.noAlloc||"function"===typeof t.update))throw new Error("Attribute ".concat(this.id," missing update or accessor"))}},{key:"_checkAttributeArray",value:function(){var t=this.value,e=Math.min(4,this.size);if(t&&t.length>=e){var A=!0;switch(e){case 4:A=A&&Number.isFinite(t[3]);case 3:A=A&&Number.isFinite(t[2]);case 2:A=A&&Number.isFinite(t[1]);case 1:A=A&&Number.isFinite(t[0]);break;default:A=!1}if(!A)throw new Error("Illegal attribute generated for ".concat(this.id))}}},{key:"startIndices",get:function(){return this.state.startIndices},set:function(t){this.state.startIndices=t}}]),A}(m),O=A(79),M=A(971),L=A(148);function _(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function J(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?_(Object(A),!0).forEach((function(e){Object(i.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):_(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function T(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return j(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return j(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var H=function(){function t(e){var A=e.gl,r=e.attribute,i=e.timeline;Object(n.a)(this,t),this.gl=A,this.type="interpolation",this.transition=new L.a(i),this.attribute=r,this.attributeInTransition=new x(A,r.settings),this.currentStartIndices=r.startIndices,this.currentLength=0,this.transform=function(t,e){var A=Object(U.c)(e.size);return new M.a(t,{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:A},varyings:["vCurrent"]})}(A,r);var o={byteLength:0,usage:35050};this.buffers=[new l.a(A,o),new l.a(A,o)]}return Object(r.a)(t,[{key:"start",value:function(t,e){if(t.duration<=0)this.transition.cancel();else{var A=this.gl,n=this.buffers,r=this.attribute;Object(U.a)(n);var i,o={numInstances:e,attribute:r,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter},a=T(n);try{for(a.s();!(i=a.n()).done;){var s=i.value;Object(U.f)(J({buffer:s},o))}}catch(g){a.e(g)}finally{a.f()}this.currentStartIndices=r.startIndices,this.currentLength=Object(U.b)(r,e),this.attributeInTransition.update({buffer:n[1],value:r.value}),this.transition.start(t),this.transform.update({elementCount:Math.floor(this.currentLength/r.size),sourceBuffers:{aFrom:n[0],aTo:Object(U.d)(A,r)},feedbackBuffers:{vCurrent:n[1]}})}}},{key:"update",value:function(){var t=this.transition.update();if(t){var e=this.transition,A=e.time,n=e.settings,r=n.duration,i=(0,n.easing)(A/r);this.transform.run({uniforms:{time:i}})}return t}},{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}}]),t}();var Y=A(390),V=A(233),Z=A(147);function W(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function K(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?W(Object(A),!0).forEach((function(e){Object(i.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):W(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function P(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return q(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return q(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var X={interpolation:H,spring:function(){function t(e){var A=e.gl,r=e.attribute,o=e.timeline;Object(n.a)(this,t),this.gl=A,this.type="spring",this.transition=new L.a(o),this.attribute=r,this.attributeInTransition=new x(A,Object.assign({},r.settings,{normalized:!1})),this.currentStartIndices=r.startIndices,this.currentLength=0,this.texture=function(t){return new V.a(t,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(A),this.framebuffer=function(t,e){return new Z.a(t,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:Object(i.a)({},36064,e)})}(A,this.texture),this.transform=function(t,e,A){var n=Object(U.c)(e.size);return new M.a(t,{framebuffer:A,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:n},varyings:["vNext"]})}(A,r,this.framebuffer);var a={byteLength:0,usage:35050};this.buffers=[new l.a(A,a),new l.a(A,a),new l.a(A,a)]}return Object(r.a)(t,[{key:"start",value:function(t,e){var A,n=this.gl,r=this.buffers,i=this.attribute,o={numInstances:e,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter},a=P(r);try{for(a.s();!(A=a.n()).done;){var s=A.value;Object(U.f)(K({buffer:s},o))}}catch(g){a.e(g)}finally{a.f()}this.currentStartIndices=i.startIndices,this.currentLength=Object(U.b)(i,e),this.attributeInTransition.update({buffer:r[1],value:i.value}),this.transition.start(t),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aTo:Object(U.d)(n,i)}})}},{key:"update",value:function(){var t=this.buffers,e=this.transform,A=this.framebuffer,n=this.transition;return!!n.update()&&(e.update({sourceBuffers:{aPrev:t[0],aCur:t[1]},feedbackBuffers:{vNext:t[2]}}),e.run({framebuffer:A,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:n.settings.stiffness,damping:n.settings.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),Object(U.a)(t),this.attributeInTransition.update({buffer:t[1],value:this.attribute.value}),Object(Y.c)(A)[0]>0||n.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}}]),t}()},z=function(){function t(e,A){var r=A.id,i=A.timeline;Object(n.a)(this,t),this.id=r,this.gl=e,this.timeline=i,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=M.a.isSupported(e)}return Object(r.a)(t,[{key:"finalize",value:function(){for(var t in this.transitions)this._removeTransition(t)}},{key:"update",value:function(t){var e=t.attributes,A=t.transitions,n=t.numInstances;for(var r in this.numInstances=n||1,e){var i=e[r],o=i.getTransitionSetting(A);o&&this._updateAttribute(r,i,o)}for(var a in this.transitions){var s=e[a];s&&s.getTransitionSetting(A)||this._removeTransition(a)}}},{key:"hasAttribute",value:function(t){var e=this.transitions[t];return e&&e.inProgress}},{key:"getAttributes",value:function(){var t={};for(var e in this.transitions){var A=this.transitions[e];A.inProgress&&(t[e]=A.attributeInTransition)}return t}},{key:"run",value:function(){if(!this.isSupported||0===this.numInstances)return!1;for(var t in this.transitions){this.transitions[t].update()&&(this.needsRedraw=!0)}var e=this.needsRedraw;return this.needsRedraw=!1,e}},{key:"_removeTransition",value:function(t){this.transitions[t].cancel(),delete this.transitions[t]}},{key:"_updateAttribute",value:function(t,e,A){var n=this.transitions[t],r=!n||n.type!==A.type;if(r){if(!this.isSupported)return void Q.a.warn("WebGL2 not supported by this browser. Transition for ".concat(t," is disabled."))();n&&this._removeTransition(t);var i=X[A.type];i?this.transitions[t]=new i({attribute:e,timeline:this.timeline,gl:this.gl}):(Q.a.error("unsupported transition type '".concat(A.type,"'"))(),r=!1)}(r||e.needsRedraw())&&(this.needsRedraw=!0,this.transitions[t].start(A,this.numInstances))}}]),t}();A.d(e,"a",(function(){return $}));var $=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=A.id,i=void 0===r?"attribute-manager":r,o=A.stats,a=A.timeline;Object(n.a)(this,t),this.id=i,this.gl=e,this.attributes={},this.updateTriggers={},this.accessors={},this.needsRedraw=!0,this.userData={},this.stats=o,this.attributeTransitionManager=new z(e,{id:"".concat(i,"-transitions"),timeline:a}),Object.seal(this)}return Object(r.a)(t,[{key:"finalize",value:function(){for(var t in this.attributes)this.attributes[t].delete();this.attributeTransitionManager.finalize()}},{key:"getNeedsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!t.clearRedrawFlags,e&&this.id}},{key:"setNeedsRedraw",value:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.needsRedraw=!0,this}},{key:"add",value:function(t,e){this._add(t,e)}},{key:"addInstanced",value:function(t,e){this._add(t,e,{instanced:1})}},{key:"remove",value:function(t){for(var e=0;e<t.length;e++){var A=t[e];void 0!==this.attributes[A]&&(this.attributes[A].delete(),delete this.attributes[A])}}},{key:"invalidate",value:function(t,e){var A=this._invalidateTrigger(t,e);Object(O.a)("attributeManager.invalidate",this,t,A)}},{key:"invalidateAll",value:function(t){for(var e in this.attributes)this.attributes[e].setNeedsUpdate(e,t);Object(O.a)("attributeManager.invalidate",this,"all")}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.data,A=t.numInstances,n=t.startIndices,r=void 0===n?null:n,i=t.transitions,o=t.props,a=void 0===o?{}:o,s=t.buffers,g=void 0===s?{}:s,c=t.context,I=void 0===c?{}:c,u=!1;for(var l in Object(O.a)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart(),this.attributes){var C=this.attributes[l],h=C.settings.accessor;C.startIndices=r,a[l]&&Q.a.removed("props.".concat(l),"data.attributes.".concat(l))(),C.setExternalBuffer(g[l])||C.setBinaryValue(g[h],e.startIndices)||!g[h]&&C.setConstantValue(a[h])||C.needsUpdate()&&(u=!0,this._updateAttribute({attribute:C,numInstances:A,data:e,props:a,context:I})),this.needsRedraw|=C.needsRedraw()}u&&Object(O.a)("attributeManager.updateEnd",this,A),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:A,transitions:i})}},{key:"updateTransition",value:function(){var t=this.attributeTransitionManager.run();return this.needsRedraw=this.needsRedraw||t,t}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getChangedAttributes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearChangedFlags:!1},e=this.attributes,A=this.attributeTransitionManager,n=Object.assign({},A.getAttributes());for(var r in e){var i=e[r];i.needsRedraw(t)&&!A.hasAttribute(r)&&(n[r]=i)}return n}},{key:"getShaderAttributes",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t||(t=this.getAttributes());var A={};for(var n in t)e[n]||Object.assign(A,t[n].getShaderAttributes());return A}},{key:"getAccessors",value:function(){return this.updateTriggers}},{key:"_add",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e&&Q.a.warn("AttributeManager.add({updaters}) - updater map no longer supported")();var n={};for(var r in t){var i=t[r],o=this._createAttribute(r,i,A);n[r]=o}Object.assign(this.attributes,n),this._mapUpdateTriggersToAttributes()}},{key:"_createAttribute",value:function(t,e,A){var n={id:t,constant:e.constant||!1,isIndexed:e.isIndexed||e.elements,size:e.elements?1:e.size,value:e.value||null,divisor:e.instanced||A.instanced?1:e.divisor};return new x(this.gl,Object.assign({},e,n))}},{key:"_mapUpdateTriggersToAttributes",value:function(){var t=this,e={},A=function(A){t.attributes[A].getUpdateTriggers().forEach((function(t){e[t]||(e[t]=[]),e[t].push(A)}))};for(var n in this.attributes)A(n);this.updateTriggers=e}},{key:"_invalidateTrigger",value:function(t,e){var A=this.attributes,n=this.updateTriggers[t];return n&&n.forEach((function(t){var n=A[t];n&&n.setNeedsUpdate(n.id,e)})),n}},{key:"_updateAttribute",value:function(t){var e=t.attribute,A=t.numInstances;Object(O.a)("attribute.updateStart",e),e.allocate(A)&&Object(O.a)("attribute.allocate",e,A),e.updateBuffer(t)&&(this.needsRedraw=!0,Object(O.a)("attribute.updateEnd",e,A))}}]),t}()},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(966),o=A(279),a=A(80),s=A(43),g=A(79),c=A(157),I=A(741),u=A(969);function l(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return C(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return C(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var h=function(){function t(e,A,r){Object(n.a)(this,t),this.id=e,this.context=r,this._loadCount=0,this._subscribers=new Set,this.setData(A)}return Object(r.a)(t,[{key:"subscribe",value:function(t){this._subscribers.add(t)}},{key:"unsubscribe",value:function(t){this._subscribers.delete(t)}},{key:"inUse",value:function(){return this._subscribers.size>0}},{key:"delete",value:function(){}},{key:"getData",value:function(){var t=this;return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then((function(){return t.getData()}))}},{key:"setData",value:function(t,e){var A=this;if(t!==this._data||e){this._data=t;var n=++this._loadCount,r=t;"string"===typeof t&&(r=Object(u.a)(t)),r instanceof Promise?(this.isLoaded=!1,this._loader=r.then((function(t){A._loadCount===n&&(A.isLoaded=!0,A._error=null,A._content=t)})).catch((function(t){A._loadCount===n&&(A.isLoaded=!0,A._error=t||!0)}))):(this.isLoaded=!0,this._error=null,this._content=t);var i,o=l(this._subscribers);try{for(o.s();!(i=o.n()).done;){i.value.onChange(this.getData())}}catch(a){o.e(a)}finally{o.f()}}}}]),t}(),B=function(){function t(e){var A=e.gl,r=e.protocol;Object(n.a)(this,t),this.protocol=r||"resource://",this._context={gl:A,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}return Object(r.a)(t,[{key:"contains",value:function(t){return!!t.startsWith(this.protocol)||t in this._resources}},{key:"add",value:function(t){var e=t.resourceId,A=t.data,n=t.forceUpdate,r=void 0!==n&&n,i=t.persistent,o=void 0===i||i,a=this._resources[e];a?a.setData(A,r):(a=new h(e,A,this._context),this._resources[e]=a),a.persistent=o}},{key:"remove",value:function(t){var e=this._resources[t];e&&(e.delete(),delete this._resources[t])}},{key:"unsubscribe",value:function(t){var e=t.consumerId,A=this._consumers[e];if(A){for(var n in A){var r=A[n];r.resource&&r.resource.unsubscribe(r)}delete this._consumers[e],this.prune()}}},{key:"subscribe",value:function(t){var e=t.resourceId,A=t.onChange,n=t.consumerId,r=t.requestId,i=void 0===r?"default":r,o=this._resources,a=this.protocol;e.startsWith(a)&&(o[e=e.replace(a,"")]||this.add({resourceId:e,data:null,persistent:!1}));var s=o[e];if(this._track(n,i,s,A),s)return s.getData()}},{key:"prune",value:function(){var t=this;this._pruneRequest||(this._pruneRequest=setTimeout((function(){return t._prune()}),0))}},{key:"finalize",value:function(){for(var t in this._resources)this._resources[t].delete()}},{key:"_track",value:function(t,e,A,n){var r=this._consumers,i=r[t]=r[t]||{},o=i[e]||{};o.resource&&(o.resource.unsubscribe(o),o.resource=null,this.prune()),A&&(i[e]=o,o.onChange=n,o.resource=A,A.subscribe(o))}},{key:"_prune",value:function(){this._pruneRequest=null;for(var t=0,e=Object.keys(this._resources);t<e.length;t++){var A=e[t],n=this._resources[A];n.persistent||n.inUse()||(n.delete(),delete this._resources[A])}}}]),t}(),f=A(115),d=A(406);function Q(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return E(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return E(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return v}));var p=Object.seal({layerManager:null,resourceManager:null,deck:null,gl:null,stats:null,shaderCache:null,pickingFBO:null,mousePosition:null,userData:{}}),y=function(t){return t instanceof o.a?"".concat(t):t?"invalid":"null"},v=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=A.deck,o=A.stats,a=A.viewport,s=A.timeline;Object(n.a)(this,t),this.lastRenderedLayers=[],this.layers=[],this.resourceManager=new B({gl:e,protocol:"deck://"}),this.context=Object.assign({},p,{layerManager:this,gl:e,deck:r,programManager:e&&Object(d.a)(e),stats:o||new I.a({id:"deck.gl"}),viewport:a||new f.a({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:s||new i.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(r.a)(t,[{key:"finalize",value:function(){this.resourceManager.finalize();var t,e=Q(this.layers);try{for(e.s();!(t=e.n()).done;){var A=t.value;this._finalizeLayer(A)}}catch(n){e.e(n)}finally{e.f()}}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);var A,n=Q(this.layers);try{for(n.s();!(A=n.n()).done;){var r=A.value,i=r.getNeedsRedraw(t);e=e||i}}catch(o){n.e(o)}finally{n.f()}return e}},{key:"needsUpdate",value:function(){return this._needsUpdate}},{key:"setNeedsRedraw",value:function(t){this._needsRedraw=this._needsRedraw||t}},{key:"setNeedsUpdate",value:function(t){this._needsUpdate=this._needsUpdate||t}},{key:"getLayers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.layerIds,A=void 0===e?null:e;return A?this.layers.filter((function(t){return A.find((function(e){return 0===t.id.indexOf(e)}))})):this.layers}},{key:"setProps",value:function(t){"debug"in t&&(this._debug=t.debug),"userData"in t&&(this.context.userData=t.userData),"layers"in t&&this.setLayers(t.layers),"onError"in t&&(this._onError=t.onError)}},{key:"setLayers",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=e||t!==this.lastRenderedLayers;if(Object(g.a)("layerManager.setLayers",this,A,t),!A)return this;this.lastRenderedLayers=t;var n,r=Q(t=Object(c.b)(t,Boolean));try{for(r.s();!(n=r.n()).done;){var i=n.value;i.context=this.context}}catch(o){r.e(o)}finally{r.f()}return this._updateLayers(this.layers,t),this}},{key:"updateLayers",value:function(){var t=this.needsUpdate();if(t){this.setNeedsRedraw("updating layers: ".concat(t));this.setLayers(this.lastRenderedLayers,!0)}}},{key:"activateViewport",value:function(t){return Object(g.a)("layerManager.activateViewport",this,t),t&&(this.context.viewport=t),this}},{key:"_handleError",value:function(t,e,A){this._onError?this._onError(e,A):s.a.error("error during ".concat(t," of ").concat(y(A)),e)()}},{key:"_updateLayers",value:function(t,e){var A,n={},r=Q(t);try{for(r.s();!(A=r.n()).done;){var i=A.value;n[i.id]?s.a.warn("Multiple old layers with same id ".concat(y(i)))():n[i.id]=i}}catch(I){r.e(I)}finally{r.f()}var o=[];this._updateSublayersRecursively(e,n,o),this._finalizeOldLayers(n);for(var a=!1,g=0,c=o;g<c.length;g++){if(c[g].hasUniformTransition()){a=!0;break}}this._needsUpdate=a,this.layers=o}},{key:"_updateSublayersRecursively",value:function(t,e,A){var n,r=Q(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;i.context=this.context;var o=e[i.id];null===o&&s.a.warn("Multiple new layers with same id ".concat(y(i)))(),e[i.id]=null;var a=null;try{this._debug&&o!==i&&i.validateProps(),o?(this._transferLayerState(o,i),this._updateLayer(i)):this._initializeLayer(i),A.push(i),a=i.isComposite&&i.getSubLayers()}catch(g){this._handleError("matching",g,i)}a&&this._updateSublayersRecursively(a,e,A)}}catch(g){r.e(g)}finally{r.f()}}},{key:"_finalizeOldLayers",value:function(t){for(var e in t){var A=t[e];A&&this._finalizeLayer(A)}}},{key:"_initializeLayer",value:function(t){try{t._initialize(),t.lifecycle=a.a.INITIALIZED}catch(e){this._handleError("initialization",e,t)}}},{key:"_transferLayerState",value:function(t,e){e._transferState(t),e.lifecycle=a.a.MATCHED,e!==t&&(t.lifecycle=a.a.AWAITING_GC)}},{key:"_updateLayer",value:function(t){try{t._update()}catch(e){this._handleError("update",e,t)}}},{key:"_finalizeLayer",value:function(t){this._needsRedraw=this._needsRedraw||"finalized ".concat(y(t)),t.lifecycle=a.a.AWAITING_FINALIZATION;try{t._finalize(),t.lifecycle=a.a.FINALIZED}catch(e){this._handleError("finalization",e,t)}}}]),t}()},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(402);function c(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return u}));var I=[],u=function(t){Object(o.a)(A,t);var e=c(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){return Object.assign({},Object(i.a)(Object(s.a)(A.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 t=this;Object(i.a)(Object(s.a)(A.prototype),"initializeState",this).call(this),this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:5121,size:3,accessor:function(e,A){var n=A.index,r=A.target;return t.encodePickingColor(n,r)}}})}},{key:"updateState",value:function(t){Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,t);var e=t.oldProps,n=t.props;if(n.backgroundColor!==e.backgroundColor){var r=Array.isArray(n.backgroundColor)?n.backgroundColor.map((function(t){return t/255})).slice(0,3):null;this.setState({backgroundColor:r})}}},{key:"draw",value:function(t){var e=t.uniforms,n=this.props.sdf,r=this.state.backgroundColor,o=Array.isArray(r);Object(i.a)(Object(s.a)(A.prototype),"draw",this).call(this,{uniforms:Object.assign({},e,{buffer:.75,gamma:.2,sdf:Boolean(n),backgroundColor:r||[0,0,0],shouldDrawBackground:o})})}},{key:"getInstanceOffset",value:function(t){var e=this;return t?Array.from(t).map((function(t){return Object(i.a)(Object(s.a)(A.prototype),"getInstanceOffset",e).call(e,t)})):I}},{key:"getInstanceColorMode",value:function(t){return 1}},{key:"getInstanceIconFrame",value:function(t){var e=this;return t?Array.from(t).map((function(t){return Object(i.a)(Object(s.a)(A.prototype),"getInstanceIconFrame",e).call(e,t)})):I}}]),A}(g.a);u.layerName="MultiIconLayer",u.defaultProps={backgroundColor:{type:"color",value:null,optional:!0},getIconOffsets:{type:"accessor",value:function(t){return t.offsets}},alphaCutoff:.001}},function(t,e,A){"use strict";var n=A(525),r={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"},i=A(194);function o(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return c}));var s=[r,i.a],g=["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(t){var e,A=n.a.getDefaultProgramManager(t),r=o(s);try{for(r.s();!(e=r.n()).done;){var i=e.value;A.addDefaultModule(i)}}catch(u){r.e(u)}finally{r.f()}var a,c=o(g);try{for(c.s();!(a=c.n()).done;){var I=a.value;A.addShaderHook(I)}}catch(u){c.e(u)}finally{c.f()}return A}},function(t,e,A){"use strict";var n=A(1),r=A(5),i=A(4),o=A(79),a=A(14),s=A(16),g=A(7);function c(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}var I=function(t){Object(a.a)(A,t);var e=c(A);function A(){return Object(r.a)(this,A),e.apply(this,arguments)}return A}(A(204).a),u=A(325),l=A(147);function C(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return h(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return h(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function B(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function f(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?B(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):B(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}A.d(e,"a",(function(){return d}));var d=function(){function t(e){Object(r.a)(this,t),this.gl=e,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new I(e),this.pickLayersPass=new u.a(e),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null,this._onError=null}return Object(i.a)(t,[{key:"setProps",value:function(t){"layerFilter"in t&&this.layerFilter!==t.layerFilter&&(this.layerFilter=t.layerFilter,this._needsRedraw="layerFilter changed"),"drawPickingColors"in t&&this.drawPickingColors!==t.drawPickingColors&&(this.drawPickingColors=t.drawPickingColors,this._needsRedraw="drawPickingColors changed"),"onError"in t&&(this._onError=t.onError)}},{key:"renderLayers",value:function(t){var e=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass;t.layerFilter=this.layerFilter,t.onError=this._onError,t.effects=t.effects||[],t.target=t.target||l.a.getDefaultFramebuffer(this.gl),this._preRender(t.effects,t);var A=this.lastPostProcessEffect?this.renderBuffers[0]:t.target,n=e.render(f(f({},t),{},{target:A}));this._postRender(t.effects,t),this.renderCount++,Object(o.a)("deckRenderer.renderLayers",this,n,t)}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"finalize",value:function(){var t,e=this.renderBuffers,A=C(e);try{for(A.s();!(t=A.n()).done;){t.value.delete()}}catch(n){A.e(n)}finally{A.f()}e.length=0}},{key:"_preRender",value:function(t,e){var A,n=null,r=C(t);try{for(r.s();!(A=r.n()).done;){var i=A.value;i.preRender(this.gl,e),i.postRender&&(n=i)}}catch(o){r.e(o)}finally{r.f()}n&&this._resizeRenderBuffers(),this.lastPostProcessEffect=n}},{key:"_resizeRenderBuffers",value:function(){var t=this.renderBuffers;0===t.length&&t.push(new l.a(this.gl),new l.a(this.gl));var e,A=C(t);try{for(A.s();!(e=A.n()).done;){e.value.resize()}}catch(n){A.e(n)}finally{A.f()}}},{key:"_postRender",value:function(t,e){var A,n=this.renderBuffers,r={inputBuffer:n[0],swapBuffer:n[1],target:null},i=C(t);try{for(i.s();!(A=i.n()).done;){var o=A.value;if(o.postRender){if(o===this.lastPostProcessEffect){r.target=e.target,o.postRender(this.gl,r);break}var a=o.postRender(this.gl,r);r.inputBuffer=a,r.swapBuffer=a===n[0]?n[1]:n[0]}}}catch(s){i.e(s)}finally{i.f()}}}]),t}()},function(t,e,A){"use strict";var n=A(6),r=A.n(n),i=A(11),o=A(5),a=A(4),s=A(154),g=new Map;function c(t){return"try {\n  importScripts('".concat(t,"');\n} catch (error) {\n  console.error(error);\n}")}var I=A(398);A.d(e,"a",(function(){return C}));var u=0;function l(t){var e=t.data;(0,t.resolve)(e)}var C=function(){function t(e){var A=e.source,n=e.name,r=void 0===n?"web-worker-".concat(u++):n,i=e.onMessage;Object(o.a)(this,t);var a=function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1],Object(s.a)("string"===typeof t,"worker source"),t.startsWith("url(")&&t.endsWith(")")){var e=t.match(/^url\((.*)\)$/)[1];if(e&&!e.startsWith("http"))return e;t=c(e)}var A=g.get(t);if(!A){var n=new Blob([t],{type:"application/javascript"});A=URL.createObjectURL(n),g.set(t,A)}return A}(A,r);this.worker=new Worker(a,{name:r}),this.name=r,this.onMessage=i||l}return Object(a.a)(t,[{key:"process",value:function(){var t=Object(i.a)(r.a.mark((function t(e){var A=this;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){A.worker.onmessage=function(e){A.onMessage({worker:A.worker,data:e.data,resolve:t,reject:n})},A.worker.onerror=function(t){var e="".concat(A.name,": WorkerThread.process() failed");t.message&&(e+=" ".concat(t.message," ").concat(t.filename,":").concat(t.lineno,":").concat(t.colno));var r=new Error(e);console.error(t),n(r)};var r=Object(I.a)(e);A.worker.postMessage(e,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"destroy",value:function(){this.worker.terminate(),this.worker=null}}]),t}()},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"GeoJsonEditMode",{enumerable:!0,get:function(){return i.GeoJsonEditMode}}),Object.defineProperty(e,"ModifyMode",{enumerable:!0,get:function(){return o.ModifyMode}}),Object.defineProperty(e,"TranslateMode",{enumerable:!0,get:function(){return a.TranslateMode}}),Object.defineProperty(e,"ScaleMode",{enumerable:!0,get:function(){return s.ScaleMode}}),Object.defineProperty(e,"RotateMode",{enumerable:!0,get:function(){return g.RotateMode}}),Object.defineProperty(e,"DuplicateMode",{enumerable:!0,get:function(){return c.DuplicateMode}}),Object.defineProperty(e,"ExtendLineStringMode",{enumerable:!0,get:function(){return I.ExtendLineStringMode}}),Object.defineProperty(e,"SplitPolygonMode",{enumerable:!0,get:function(){return u.SplitPolygonMode}}),Object.defineProperty(e,"ExtrudeMode",{enumerable:!0,get:function(){return l.ExtrudeMode}}),Object.defineProperty(e,"ElevationMode",{enumerable:!0,get:function(){return C.ElevationMode}}),Object.defineProperty(e,"TransformMode",{enumerable:!0,get:function(){return h.TransformMode}}),Object.defineProperty(e,"DrawPointMode",{enumerable:!0,get:function(){return B.DrawPointMode}}),Object.defineProperty(e,"DrawLineStringMode",{enumerable:!0,get:function(){return f.DrawLineStringMode}}),Object.defineProperty(e,"DrawPolygonMode",{enumerable:!0,get:function(){return d.DrawPolygonMode}}),Object.defineProperty(e,"DrawRectangleMode",{enumerable:!0,get:function(){return Q.DrawRectangleMode}}),Object.defineProperty(e,"DrawCircleByDiameterMode",{enumerable:!0,get:function(){return E.DrawCircleByDiameterMode}}),Object.defineProperty(e,"DrawCircleFromCenterMode",{enumerable:!0,get:function(){return p.DrawCircleFromCenterMode}}),Object.defineProperty(e,"DrawEllipseByBoundingBoxMode",{enumerable:!0,get:function(){return y.DrawEllipseByBoundingBoxMode}}),Object.defineProperty(e,"DrawEllipseUsingThreePointsMode",{enumerable:!0,get:function(){return v.DrawEllipseUsingThreePointsMode}}),Object.defineProperty(e,"DrawRectangleUsingThreePointsMode",{enumerable:!0,get:function(){return m.DrawRectangleUsingThreePointsMode}}),Object.defineProperty(e,"Draw90DegreePolygonMode",{enumerable:!0,get:function(){return b.Draw90DegreePolygonMode}}),Object.defineProperty(e,"DrawPolygonByDraggingMode",{enumerable:!0,get:function(){return F.DrawPolygonByDraggingMode}}),Object.defineProperty(e,"ImmutableFeatureCollection",{enumerable:!0,get:function(){return w.ImmutableFeatureCollection}}),Object.defineProperty(e,"ViewMode",{enumerable:!0,get:function(){return S.ViewMode}}),Object.defineProperty(e,"MeasureDistanceMode",{enumerable:!0,get:function(){return D.MeasureDistanceMode}}),Object.defineProperty(e,"MeasureAreaMode",{enumerable:!0,get:function(){return R.MeasureAreaMode}}),Object.defineProperty(e,"MeasureAngleMode",{enumerable:!0,get:function(){return U.MeasureAngleMode}}),Object.defineProperty(e,"CompositeMode",{enumerable:!0,get:function(){return G.CompositeMode}}),Object.defineProperty(e,"SnappableMode",{enumerable:!0,get:function(){return N.SnappableMode}}),Object.defineProperty(e,"_memoize",{enumerable:!0,get:function(){return k.default}}),e.utils=void 0;var r,i=A(172),o=A(781),a=A(782),s=A(851),g=A(852),c=A(1013),I=A(1014),u=A(1015),l=A(1016),C=A(1017),h=A(1018),B=A(1019),f=A(1020),d=A(784),Q=A(1021),E=A(1022),p=A(1023),y=A(1024),v=A(1025),m=A(1026),b=A(1027),F=A(1028),w=A(359),S=A(1030),D=A(1031),R=A(1032),U=A(1033),G=A(853),N=A(1035),k=(r=A(785))&&r.__esModule?r:{default:r},x=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=O();if(e&&e.has(t))return e.get(t);var A={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var o=r?Object.getOwnPropertyDescriptor(t,i):null;o&&(o.get||o.set)?Object.defineProperty(A,i,o):A[i]=t[i]}A.default=t,e&&e.set(t,A);return A}(A(245));function O(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return O=function(){return t},t}e.utils=x},function(t,e,A){"use strict";A.d(e,"a",(function(){return u}));var n=A(105),r=A(97),i=A(106),o=A(107),a=A(74),s=A(232),g=A(47),c=A(114);function I(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var u=function(t){Object(i.a)(A,t);var e=I(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"copy",value:function(t){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 t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A){var n=this[A]-t[A];e+=n*n}return Object(g.a)(e)}},{key:"dot",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A)e+=this[A]*t[A];return Object(g.a)(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return Object(c.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),Object(g.a)(this[t])}},{key:"setComponent",value:function(t,e){return Object(c.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=Object(g.a)(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=Object(g.a)(t)}}]),A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(5),r=A(4),i=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,t);var r=A.id,i=void 0===r?"pass":r;this.id=i,this.gl=e,this.props={},Object.assign(this.props,A)}return Object(r.a)(t,[{key:"setProps",value:function(t){Object.assign(this.props,t)}},{key:"render",value:function(){}},{key:"cleanup",value:function(){}}]),t}()},function(t,e,A){"use strict";var n=A(1),r=A(5),i=A(4),o=A(19),a=A(525),s=A(211),g=A(49),c=A(333),I=A(970),u=A(130),l=A(83),C=A(56),h=A(35),B=A(14),f=A(16),d=A(7),Q=A(94),E=null;function p(t,e){var A;return new t((A=t.BYTES_PER_ELEMENT*e,(!E||E.byteLength<A)&&(E=new ArrayBuffer(A)),E),0,e)}var y=A(127),v=A(312),m=A(313);function b(t){if(!t&&!Object(v.a)())return"Node";if(Object(m.a)(t))return"Electron";var e="undefined"!==typeof navigator?navigator:{},A=t||e.userAgent||"";if(A.indexOf("Edge")>-1)return"Edge";var n=-1!==A.indexOf("MSIE "),r=-1!==A.indexOf("Trident/");return n||r?"IE":y.b.chrome?"Chrome":y.b.safari?"Safari":y.b.mozInnerScreenX?"Firefox":"Unknown"}function F(t){var e=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(t){return!1}}();return function(){var A,n=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(f.a)(this,A)}}var w="elements must be GL.ELEMENT_ARRAY_BUFFER",S=function(t){Object(B.a)(A,t);var e=F(A);function A(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,A);var o=i.id||i.program&&i.program.id;return(n=e.call(this,t,Object.assign({},i,{id:o}))).buffer=null,n.bufferValue=null,n.isDefaultArray=i.isDefaultArray||!1,n.gl2=t,n.initialize(i),Object.seal(Object(C.a)(n)),n}return Object(i.a)(A,null,[{key:"isSupported",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!e.constantAttributeZero||(Object(o.j)(t)||"Chrome"===b())}},{key:"getDefaultArray",value:function(t){return t.luma=t.luma||{},t.luma.defaultVertexArray||(t.luma.defaultVertexArray=new A(t,{handle:null,isDefaultArray:!0})),t.luma.defaultVertexArray}},{key:"getMaxAttributes",value:function(t){return A.MAX_ATTRIBUTES=A.MAX_ATTRIBUTES||t.getParameter(34921),A.MAX_ATTRIBUTES}},{key:"setConstant",value:function(t,e,n){switch(n.constructor){case Float32Array:A._setConstantFloatArray(t,e,n);break;case Int32Array:A._setConstantIntArray(t,e,n);break;case Uint32Array:A._setConstantUintArray(t,e,n);break;default:Object(g.a)(!1)}}}]),Object(i.a)(A,[{key:"delete",value:function(){return Object(h.a)(Object(d.a)(A.prototype),"delete",this).call(this),this.buffer&&this.buffer.delete(),this}},{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.setProps(t)}},{key:"setProps",value:function(t){return this}},{key:"setElementBuffer",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Object(g.a)(!e||34963===e.target,w),this.bind((function(){t.gl.bindBuffer(34963,e?e.handle:null)})),this}},{key:"setBuffer",value:function(t,e,A){if(34963===e.target)return this.setElementBuffer(e,A);var n=A.size,r=A.type,i=A.stride,a=A.offset,s=A.normalized,c=A.integer,I=A.divisor,u=this.gl,l=this.gl2;return t=Number(t),this.bind((function(){u.bindBuffer(34962,e.handle),c?(Object(g.a)(Object(o.j)(u)),l.vertexAttribIPointer(t,n,r,i,a)):u.vertexAttribPointer(t,n,r,s,i,a),u.enableVertexAttribArray(t),l.vertexAttribDivisor(t,I||0)})),this}},{key:"enable",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!n&&0===t&&!A.isSupported(this.gl,{constantAttributeZero:!0});return r||(t=Number(t),this.bind((function(){return n?e.gl.enableVertexAttribArray(t):e.gl.disableVertexAttribArray(t)}))),this}},{key:"getConstantBuffer",value:function(t,e){var A=this._normalizeConstantArrayValue(e),n=A.byteLength*t,r=A.length*t,i=!this.buffer;if(this.buffer=this.buffer||new l.a(this.gl,n),i=(i=i||this.buffer.reallocate(n))||!this._compareConstantArrayValues(A,this.bufferValue)){var o=p(e.constructor,r);!function(t){for(var e=t.target,A=t.source,n=t.start,r=void 0===n?0:n,i=t.count,o=void 0===i?1:i,a=A.length,s=o*a,g=0,c=r;g<a;g++)e[c++]=A[g];for(;g<s;)g<s-g?(e.copyWithin(r+g,r,r+g),g*=2):(e.copyWithin(r+g,r,r+s-g),g=s)}({target:o,source:A,start:0,count:r}),this.buffer.subData(o),this.bufferValue=e}return this.buffer}},{key:"_normalizeConstantArrayValue",value:function(t){return Array.isArray(t)?new Float32Array(t):t}},{key:"_compareConstantArrayValues",value:function(t,e){if(!t||!e||t.length!==e.length||t.constructor!==e.constructor)return!1;for(var A=0;A<t.length;++A)if(t[A]!==e[A])return!1;return!0}},{key:"_createHandle",value:function(){return this.gl.createVertexArray()}},{key:"_deleteHandle",value:function(t){return this.gl2.deleteVertexArray(t),[this.elements]}},{key:"_bindHandle",value:function(t){this.gl2.bindVertexArray(t)}},{key:"_getParameter",value:function(t,e){var A=this,n=e.location;return Object(g.a)(Number.isFinite(n)),this.bind((function(){switch(t){case 34373:return A.gl.getVertexAttribOffset(n,t);default:return A.gl.getVertexAttrib(n,t)}}))}},{key:"MAX_ATTRIBUTES",get:function(){return A.getMaxAttributes(this.gl)}}],[{key:"_setConstantFloatArray",value:function(t,e,A){switch(A.length){case 1:t.vertexAttrib1fv(e,A);break;case 2:t.vertexAttrib2fv(e,A);break;case 3:t.vertexAttrib3fv(e,A);break;case 4:t.vertexAttrib4fv(e,A);break;default:Object(g.a)(!1)}}},{key:"_setConstantIntArray",value:function(t,e,A){switch(Object(g.a)(Object(o.j)(t)),A.length){case 1:t.vertexAttribI1iv(e,A);break;case 2:t.vertexAttribI2iv(e,A);break;case 3:t.vertexAttribI3iv(e,A);break;case 4:t.vertexAttribI4iv(e,A);break;default:Object(g.a)(!1)}}},{key:"_setConstantUintArray",value:function(t,e,A){switch(Object(g.a)(Object(o.j)(t)),A.length){case 1:t.vertexAttribI1uiv(e,A);break;case 2:t.vertexAttribI2uiv(e,A);break;case 3:t.vertexAttribI3uiv(e,A);break;case 4:t.vertexAttribI4uiv(e,A);break;default:Object(g.a)(!1)}}}]),A}(Q.a),D=A(738),R=/^(.+)__LOCATION_([0-9]+)$/,U=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"],G=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,t);var n=A.id||A.program&&A.program.id;this.id=n,this.gl=e,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 S(e),Object(D.a)(this,"VertexArray","v6.0",U),this.initialize(A),Object.seal(this)}return Object(i.a)(t,[{key:"delete",value:function(){this.buffer&&this.buffer.delete(),this.vertexArrayObject.delete()}},{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.reset(),this.configuration=null,this.bindOnUse=!1,this.setProps(t)}},{key:"reset",value:function(){this.elements=null,this.elementsAccessor=null;var t=this.vertexArrayObject.MAX_ATTRIBUTES;return this.values=new Array(t).fill(null),this.accessors=new Array(t).fill(null),this.unused={},this.drawParams=null,this}},{key:"setProps",value:function(t){return"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"attributes"in t&&this.setAttributes(t.attributes),"elements"in t&&this.setElementBuffer(t.elements),"bindOnUse"in t&&(t=t.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(t){var e=this;return Object.assign(this.attributes,t),this.vertexArrayObject.bind((function(){for(var A in t){var n=t[A];e._setAttribute(A,n)}e.gl.bindBuffer(34962,null)})),this}},{key:"setElementBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.elements=t,this.elementsAccessor=e,this.clearDrawParams(),this.vertexArrayObject.setElementBuffer(t,e),this}},{key:"setBuffer",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(34963===e.target)return this.setElementBuffer(e,A);var n=this._resolveLocationAndAccessor(t,e,e.accessor,A),r=n.location,i=n.accessor;return r>=0&&(this.values[r]=e,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.setBuffer(r,e,i)),this}},{key:"setConstant",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this._resolveLocationAndAccessor(t,e,Object.assign({size:e.length},A)),r=n.location,i=n.accessor;return r>=0&&(e=this.vertexArrayObject._normalizeConstantArrayValue(e),this.values[r]=e,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.enable(r,!1)),this}},{key:"unbindBuffers",value:function(){var t=this;return this.vertexArrayObject.bind((function(){t.elements&&t.vertexArrayObject.setElementBuffer(null),t.buffer=t.buffer||new l.a(t.gl,{accessor:{size:4}});for(var e=0;e<t.vertexArrayObject.MAX_ATTRIBUTES;e++)t.values[e]instanceof l.a&&(t.gl.disableVertexAttribArray(e),t.gl.bindBuffer(34962,t.buffer.handle),t.gl.vertexAttribPointer(e,1,5126,!1,0,0))})),this}},{key:"bindBuffers",value:function(){var t=this;return this.vertexArrayObject.bind((function(){t.elements&&t.setElementBuffer(t.elements);for(var e=0;e<t.vertexArrayObject.MAX_ATTRIBUTES;e++){var A=t.values[e];A instanceof l.a&&t.setBuffer(e,A)}})),this}},{key:"bindForDraw",value:function(t,e,A){var n,r=this;return this.vertexArrayObject.bind((function(){r._setConstantAttributes(t,e),n=A()})),n}},{key:"_resolveLocationAndAccessor",value:function(t,e,A,n){var r=this,i={location:-1,accessor:null},a=this._getAttributeIndex(t),s=a.location,c=a.name;if(!Number.isFinite(s)||s<0)return this.unused[t]=e,o.k.once(3,(function(){return"unused value ".concat(t," in ").concat(r.id)}))(),i;var I=this._getAttributeInfo(c||s);if(!I)return i;var l=this.accessors[s]||{},C=u.a.resolve(I.accessor,l,A,n),h=C.size,B=C.type;return Object(g.a)(Number.isFinite(h)&&Number.isFinite(B)),{location:s,accessor:C}}},{key:"_getAttributeInfo",value:function(t){return this.configuration&&this.configuration.getAttributeInfo(t)}},{key:"_getAttributeIndex",value:function(t){var e=Number(t);if(Number.isFinite(e))return{location:e};var A=R.exec(t),n=A?A[1]:t,r=A?Number(A[2]):0;return this.configuration?{location:this.configuration.getAttributeLocation(n)+r,name:n}:{location:-1}}},{key:"_setAttribute",value:function(t,e){if(e instanceof l.a)this.setBuffer(t,e);else if(Array.isArray(e)&&e.length&&e[0]instanceof l.a){var A=e[0],n=e[1];this.setBuffer(t,A,n)}else if(ArrayBuffer.isView(e)||Array.isArray(e)){var r=e;this.setConstant(t,r)}else{if(!(e.buffer instanceof l.a))throw new Error("VertexArray: attributes must be Buffers or constants (i.e. typed array)");var i=e;this.setBuffer(t,i.buffer,i)}}},{key:"_setConstantAttributes",value:function(t,e){var A=Math.max(0|t,0|e),n=this.values[0];ArrayBuffer.isView(n)&&this._setConstantAttributeZero(n,A);for(var r=1;r<this.vertexArrayObject.MAX_ATTRIBUTES;r++)n=this.values[r],ArrayBuffer.isView(n)&&this._setConstantAttribute(r,n)}},{key:"_setConstantAttributeZero",value:function(t,e){if(S.isSupported(this.gl,{constantAttributeZero:!0}))this._setConstantAttribute(0,t);else{var A=this.vertexArrayObject.getConstantBuffer(e,t);this.vertexArrayObject.setBuffer(0,A,this.accessors[0])}}},{key:"_setConstantAttribute",value:function(t,e){S.setConstant(this.gl,t,e)}},{key:"_updateDrawParams",value:function(){for(var t={isIndexed:!1,isInstanced:!1,indexCount:1/0,vertexCount:1/0,instanceCount:1/0},e=0;e<this.vertexArrayObject.MAX_ATTRIBUTES;e++)this._updateDrawParamsForLocation(t,e);return this.elements&&(t.elementCount=this.elements.getElementCount(this.elements.accessor),t.isIndexed=!0,t.indexType=this.elementsAccessor.type||this.elements.accessor.type,t.indexOffset=this.elementsAccessor.offset||0),t.indexCount===1/0&&(t.indexCount=0),t.vertexCount===1/0&&(t.vertexCount=0),t.instanceCount===1/0&&(t.instanceCount=0),t}},{key:"_updateDrawParamsForLocation",value:function(t,e){var A=this.values[e],n=this.accessors[e];if(A){var r=n.divisor>0;if(t.isInstanced=t.isInstanced||r,A instanceof l.a){var i=A;if(r){var o=i.getVertexCount(n);t.instanceCount=Math.min(t.instanceCount,o)}else{var a=i.getVertexCount(n);t.vertexCount=Math.min(t.vertexCount,a)}}}}},{key:"setElements",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.k.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(t,e)}}]),t}(),N=A(963),k=A(185),x=A(162);function O(t,e){for(var A=e.maxElts,n=void 0===A?16:A,r=e.size,i=void 0===r?1:r,o="[",a=0;a<t.length&&a<n;++a)a>0&&(o+=",".concat(a%i===0?" ":"")),o+=M(t[a],e);var s=t.length>n?"...":"]";return"".concat(o).concat(s)}function M(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=1e-16,n=e.isInteger,r=void 0!==n&&n;if(Array.isArray(t)||ArrayBuffer.isView(t))return O(t,e);if(!Number.isFinite(t))return String(t);if(Math.abs(t)<A)return r?"0":"0.";if(r)return t.toFixed(0);if(Math.abs(t)>100&&Math.abs(t)<1e4)return t.toFixed(0);var i=t.toPrecision(2),o=i.indexOf(".0");return o===i.length-2?i.slice(0,-1):i}function L(t,e,A,r){var i,o,a=t.gl;if(!e)return o={},Object(n.a)(o,r,"null"),Object(n.a)(o,"Format ","N/A"),o;var s,g,c,I="NOT PROVIDED",u=1,C=0,h=0;if(A&&(I=A.type,u=A.size,s=-1!==(I=String(I).replace("Array","")).indexOf("nt")),e instanceof l.a){var B,f,d=e,Q=d.getDebugData(),E=Q.data;if(g=Q.changed?"*":"",c=E,C=(h=d.byteLength)/E.BYTES_PER_ELEMENT/u,A){var p=A.divisor>0;f="".concat(p?"I ":"P "," ").concat(C," (x").concat(u,"=").concat(h," bytes ").concat(Object(k.a)(a,I),")")}else s=!0,f="".concat(h," bytes");return B={},Object(n.a)(B,r,"".concat(g).concat(M(c,{size:u,isInteger:s}))),Object(n.a)(B,"Format ",f),B}return c=e,u=e.length,s=-1!==(I=String(e.constructor.name).replace("Array","")).indexOf("nt"),i={},Object(n.a)(i,r,"".concat(M(c,{size:u,isInteger:s})," (constant)")),Object(n.a)(i,"Format ","".concat(u,"x").concat(I," (constant)")),i}function _(t,e){var A=e.type,n=e.size,r=Object(x.b)(A,n);return r?"".concat(t," (").concat(r.name,")"):t}function J(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return T(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return T(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function j(t){var e=t.header,A=void 0===e?"Uniforms":e,r=t.program,i=t.uniforms,o=t.undefinedOnly,a=void 0!==o&&o;Object(g.a)(r);var s,c=r._uniformSetters,I={},u=Object.keys(c).sort(),l=0,C=J(u);try{for(C.s();!(s=C.n()).done;){var h=s.value;h.match(".*_.*")||h.match(".*Matrix")||H({table:I,header:A,uniforms:i,uniformName:h,undefinedOnly:a})&&l++}}catch(F){C.e(F)}finally{C.f()}var B,f=J(u);try{for(f.s();!(B=f.n()).done;){var d=B.value;d.match(".*Matrix")&&H({table:I,header:A,uniforms:i,uniformName:d,undefinedOnly:a})&&l++}}catch(F){f.e(F)}finally{f.f()}var Q,E=J(u);try{for(E.s();!(Q=E.n()).done;){var p=Q.value;I[p]||H({table:I,header:A,uniforms:i,uniformName:p,undefinedOnly:a})&&l++}}catch(F){E.e(F)}finally{E.f()}var y=0,v={};if(!a)for(var m in i){var b=i[m];I[m]||(y++,v[m]=Object(n.a)({Type:"NOT USED: ".concat(b)},A,M(b)))}return{table:I,count:l,unusedTable:v,unusedCount:y}}function H(t){var e,A=t.table,r=t.header,i=t.uniforms,o=t.uniformName,a=t.undefinedOnly,s=i[o],g=function(t){return void 0!==t&&null!==t}(s);return(!a||!g)&&(A[o]=(e={},Object(n.a)(e,r,g?M(s):"N/A"),Object(n.a)(e,"Uniform Type",g?s:"NOT PROVIDED"),e),!0)}function Y(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return V(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return V(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Z(t){var e=t.accessor,A=e.type,n=e.size,r=Object(x.b)(A,n);return r?"".concat(r.name," ").concat(t.name):t.name}function W(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function K(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?W(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):W(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var P={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function q(t,e){var A=(e||{}).attributeMap,n=void 0===A?P:A;return n&&n[t]||t}function X(t,e){var A;switch(t){case"texCoords":case"texCoord1":case"texCoord2":case"texCoord3":A="uvs";break;case"vertices":case"positions":case"normals":case"pickingColors":A="vectors"}switch(A){case"vectors":e.size=e.size||3;break;case"uvs":e.size=e.size||2}Object(g.a)(Number.isFinite(e.size),"attribute ".concat(t," needs size"))}A.d(e,"a",(function(){return tt}));var z=function(){},$={},tt=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,t);var n=A.id,i=void 0===n?Object(s.c)("model"):n;Object(g.a)(Object(o.i)(e)),this.id=i,this.gl=e,this.id=A.id||Object(s.c)("Model"),this.lastLogTime=0,this.animated=!1,this.initialize(A)}return Object(i.a)(t,[{key:"initialize",value:function(t){this.props={},this.programManager=t.programManager||a.a.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;var e=t.program,A=void 0===e?null:e,n=t.vs,r=t.fs,i=t.modules,o=t.defines,s=t.inject,c=t.varyings,I=t.bufferMode,u=t.transpileToGLSL100;this.programProps={program:A,vs:n,fs:r,modules:i,defines:o,inject:s,varyings:c,bufferMode:I,transpileToGLSL100:u},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(t.moduleSettings))),this.drawMode=void 0!==t.drawMode?t.drawMode:4,this.vertexCount=t.vertexCount||0,this.geometryBuffers={},this.isInstanced=t.isInstanced||t.instanced||t.instanceCount>0,this._setModelProps(t),this.geometry={},Object(g.a)(void 0!==this.drawMode&&Number.isFinite(this.vertexCount),"Model needs drawMode and vertexCount")}},{key:"setProps",value:function(t){this._setModelProps(t)}},{key:"delete",value:function(){for(var t in this._attributes)this._attributes[t]!==this.attributes[t]&&this._attributes[t].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(t){var e=t.program,A=t.vs,n=t.fs,r=t.modules,i=t.defines,o=t.inject,a=t.varyings,s=t.bufferMode,g=t.transpileToGLSL100;this.programProps={program:e,vs:A,fs:n,modules:r,defines:i,inject:o,varyings:a,bufferMode:s,transpileToGLSL100:g},this._programDirty=!0}},{key:"getUniforms",value:function(){return this.uniforms}},{key:"setDrawMode",value:function(t){return this.drawMode=t,this}},{key:"setVertexCount",value:function(t){return Object(g.a)(Number.isFinite(t)),this.vertexCount=t,this}},{key:"setInstanceCount",value:function(t){return Object(g.a)(Number.isFinite(t)),this.instanceCount=t,this}},{key:"setGeometry",value:function(t){return this.drawMode=t.drawMode,this.vertexCount=t.getVertexCount(),this._deleteGeometryBuffers(),this.geometryBuffers=function(t,e,A){var n={},r=e.indices;for(var i in e.attributes){var o=e.attributes[i],a=q(i,A);if("indices"===i)r=o;else if(o.constant)n[a]=o.value;else{var s=o.value,c=K({},o);delete c.value,n[a]=[new l.a(t,s),c],X(i,c)}}if(r){var I=r.value||r;Object(g.a)(I instanceof Uint16Array||I instanceof Uint32Array,'attribute array for "indices" must be of integer type');var u={size:1,isIndexed:void 0===r.isIndexed||r.isIndexed};n.indices=[new l.a(t,{data:I,target:34963}),u]}return n}(this.gl,t),this.vertexArray.setAttributes(this.geometryBuffers),this}},{key:"setAttributes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(s.a)(t))return this;var e={};for(var A in t){var n=t[A];e[A]=n.getValue?n.getValue():n}return this.vertexArray.setAttributes(e),this}},{key:"setUniforms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(this.uniforms,t),this}},{key:"getModuleUniforms",value:function(t){this._checkProgram();var e=this.programManager.getUniforms(this.program);return e?e(t):{}}},{key:"updateModuleSettings",value:function(t){var e=this.getModuleUniforms(t||{});return this.setUniforms(e)}},{key:"clear",value:function(t){return Object(c.a)(this.program.gl,t),this}},{key:"draw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._checkProgram();var e,A=t.moduleSettings,n=void 0===A?null:A,r=t.framebuffer,i=t.uniforms,a=void 0===i?{}:i,s=t.attributes,g=void 0===s?{}:s,c=t.transformFeedback,I=void 0===c?this.transformFeedback:c,u=t.parameters,l=void 0===u?{}:u,C=t.vertexArray,h=void 0===C?this.vertexArray:C;this.setAttributes(g),this.updateModuleSettings(n),this.setUniforms(a),o.k.priority>=2&&(e=this._logDrawCallStart(2));var B=this.vertexArray.getDrawParams(),f=this.props,d=f.isIndexed,Q=void 0===d?B.isIndexed:d,E=f.indexType,p=void 0===E?B.indexType:E,y=f.indexOffset,v=void 0===y?B.indexOffset:y,m=f.vertexArrayInstanced,b=void 0===m?B.isInstanced:m;b&&!this.isInstanced&&o.k.warn("Found instanced attributes on non-instanced model",this.id)();var F=this.isInstanced,w=this.instanceCount,S=this.props,D=S.onBeforeRender,R=void 0===D?z:D,U=S.onAfterRender,G=void 0===U?z:U;R(),this.program.setUniforms(this.uniforms);var N=this.program.draw(Object.assign($,t,{logPriority:e,uniforms:null,framebuffer:r,parameters:l,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:h,transformFeedback:I,isIndexed:Q,indexType:p,isInstanced:F,instanceCount:w,offset:Q?v:0}));return G(),o.k.priority>=2&&this._logDrawCallEnd(e,h,r),N}},{key:"transform",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.discard,A=void 0===e||e,r=t.feedbackBuffers,i=t.unbindModels,o=void 0===i?[]:i,a=t.parameters;r&&this._setFeedbackBuffers(r),A&&(a=Object.assign({},a,Object(n.a)({},35977,A))),o.forEach((function(t){return t.vertexArray.unbindBuffers()}));try{this.draw(Object.assign({},t,{parameters:a}))}finally{o.forEach((function(t){return t.vertexArray.bindBuffers()}))}return this}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o.k.warn("Model.render() is deprecated. Use Model.setUniforms() and Model.draw()")(),this.setUniforms(t).draw()}},{key:"_setModelProps",value:function(t){Object.assign(this.props,t),"uniforms"in t&&this.setUniforms(t.uniforms),"pickable"in t&&(this.pickable=t.pickable),"instanceCount"in t&&(this.instanceCount=t.instanceCount),"geometry"in t&&this.setGeometry(t.geometry),"attributes"in t&&this.setAttributes(t.attributes),"_feedbackBuffers"in t&&this._setFeedbackBuffers(t._feedbackBuffers)}},{key:"_checkProgram",value:function(){if(this._programDirty||this.programManager.stateHash!==this._programManagerState){var t=this.programProps.program;if(t)this._managedProgram=!1;else{var e=this.programProps,A=e.vs,n=e.fs,r=e.modules,i=e.inject,o=e.defines,a=e.varyings,s=e.bufferMode,c=e.transpileToGLSL100;t=this.programManager.get({vs:A,fs:n,modules:r,inject:i,defines:o,varyings:a,bufferMode:s,transpileToGLSL100:c}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}Object(g.a)(t instanceof I.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 G(this.gl,{program:this.program}),this.setUniforms(Object.assign({},this.getModuleUniforms())))}}},{key:"_deleteGeometryBuffers",value:function(){for(var t in this.geometryBuffers){var e=this.geometryBuffers[t][0]||this.geometryBuffers[t];e instanceof l.a&&e.delete()}}},{key:"_setAnimationProps",value:function(t){this.animated&&Object(g.a)(t,"Model.draw(): animated uniforms but no animationProps")}},{key:"_setFeedbackBuffers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(s.a)(t))return this;var e=this.program.gl;return this.transformFeedback=this.transformFeedback||new N.a(e,{program:this.program}),this.transformFeedback.setBuffers(t),this}},{key:"_logDrawCallStart",value:function(t){var e=t>3?0:1e4;if(!(Date.now()-this.lastLogTime<e))return this.lastLogTime=Date.now(),o.k.group(2,">>> DRAWING MODEL ".concat(this.id),{collapsed:o.k.level<=2})(),t}},{key:"_logDrawCallEnd",value:function(t,e,A,r){if(void 0!==t){var i=function(t){var e=t.vertexArray,A=t.header,n=void 0===A?"Attributes":A;if(!e.configuration)return{};var r={};e.elements&&(r.ELEMENT_ARRAY_BUFFER=L(e,e.elements,null,n));var i=e.values;for(var o in i){var a=e._getAttributeInfo(o);if(a){var s="".concat(o,": ").concat(a.name),g=e.accessors[a.location];g&&(s="".concat(o,": ").concat(_(a.name,g))),r[s]=L(e,i[o],g,n)}}return r}({vertexArray:e,header:"".concat(this.id," attributes"),attributes:this._attributes}),a=j({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,A)}),s=a.table,g=a.unusedTable,c=a.unusedCount,I=j({header:"".concat(this.id," uniforms"),program:this.program,uniforms:Object.assign({},this.program.uniforms,A),undefinedOnly:!0}),u=I.table;I.count>0&&o.k.log("MISSING UNIFORMS",Object.keys(u))(),c>0&&o.k.log("UNUSED UNIFORMS",Object.keys(g))();var l=function(t){var e,A={},r="Accessors for ".concat(t.id),i=Y(t.attributeInfos);try{for(i.s();!(e=i.n()).done;){var o=e.value;if(o){var a=Z(o);A["in ".concat(a)]=Object(n.a)({},r,JSON.stringify(o.accessor))}}}catch(u){i.e(u)}finally{i.f()}var s,g=Y(t.varyingInfos);try{for(g.s();!(s=g.n()).done;){var c=s.value;if(c){var I=Z(c);A["out ".concat(I)]=Object(n.a)({},r,JSON.stringify(c.accessor))}}}catch(u){g.e(u)}finally{g.f()}return A}(this.vertexArray.configuration);o.k.table(t,i)(),o.k.table(t,s)(),o.k.table(t+1,l)(),r&&r.log({logLevel:2,message:"Rendered to ".concat(r.id)}),o.k.groupEnd(2,">>> DRAWING MODEL ".concat(this.id))()}}}]),t}()},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(262),o=function(){function t(e,A){Object(n.a)(this,t),this.name=e,this.type=A,this.sampleSize=1,this.reset()}return Object(r.a)(t,[{key:"setSampleSize",value:function(t){return this.sampleSize=t,this}},{key:"incrementCount",value:function(){return this.addCount(1),this}},{key:"decrementCount",value:function(){return this.subtractCount(1),this}},{key:"addCount",value:function(t){return this._count+=t,this._samples++,this._checkSampling(),this}},{key:"subtractCount",value:function(t){return this._count-=t,this._samples++,this._checkSampling(),this}},{key:"addTime",value:function(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}},{key:"timeStart",value:function(){return this._startTime=Object(i.a)(),this._timerPending=!0,this}},{key:"timeEnd",value:function(){return this._timerPending?(this.addTime(Object(i.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)}}]),t}(),a=function(){function t(e){var A=e.id,r=e.stats;Object(n.a)(this,t),this.id=A,this.stats={},this._initializeStats(r),Object.seal(this)}return Object(r.a)(t,[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:t,type:e})}},{key:"reset",value:function(){for(var t in this.stats)this.stats[t].reset();return this}},{key:"forEach",value:function(t){for(var e in this.stats)t(this.stats[e])}},{key:"getTable",value:function(){var t={};return this.forEach((function(e){t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}})),t}},{key:"_initializeStats",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){return t._getOrCreate(e)}))}},{key:"_getOrCreate",value:function(t){if(!t||!t.name)return null;var e=t.name,A=t.type;return this.stats[e]||(this.stats[e]=t instanceof o?t:new o(e,A)),this.stats[e]}},{key:"size",get:function(){return Object.keys(this.stats).length}}]),t}();A.d(e,"a",(function(){return a}))},function(t,e,A){"use strict";var n=A(7),r=A(224);var i=A(205);function o(t){var e="function"===typeof Map?new Map:void 0;return(o=function(t){if(null===t||(A=t,-1===Function.toString.call(A).indexOf("[native code]")))return t;var A;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,o)}function o(){return Object(i.a)(t,arguments,Object(n.a)(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(r.a)(o,t)})(t)}A.d(e,"a",(function(){return o}))},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a})),A.d(e,"c",(function(){return s}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window,a="object"!==("undefined"===typeof n?"undefined":Object(r.a)(n))||"[object process]"!==String(n)||n.browser,s="function"===typeof importScripts,g="undefined"!==typeof n&&n.version&&n.version.match(/v([0-9]*)/);g&&parseFloat(g[1])}).call(this,A(58),A(62))},,function(t,e,A){"use strict";var n=A(0),r=A.n(n).a.createContext(null);e.a=r},function(t,e,A){"use strict";var n="function"===typeof Symbol&&Symbol.for;e.a=n?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(t){t.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(t,e,A){"use strict";function n(t){return null!=t&&!(Array.isArray(t)&&0===t.length)}function r(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t&&(n(t.value)&&""!==t.value||e&&n(t.defaultValue)&&""!==t.defaultValue)}function i(t){return t.startAdornment}A.d(e,"b",(function(){return r})),A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";A.d(e,"b",(function(){return n})),A.d(e,"a",(function(){return r}));var n=function(t){return t.scrollTop};function r(t,e){var A=t.timeout,n=t.style,r=void 0===n?{}:n;return{duration:r.transitionDuration||"number"===typeof A?A:A[e.mode]||0,delay:r.transitionDelay}}},function(t,e,A){"use strict";A.d(e,"f",(function(){return h})),A.d(e,"d",(function(){return B})),A.d(e,"e",(function(){return f})),A.d(e,"b",(function(){return d})),A.d(e,"c",(function(){return Q})),A.d(e,"a",(function(){return E}));var n=A(13),r=A(20),i=A(610),o=A.n(i),a=A(528),s=A.n(a),g=A(1393),c=A(1123),I=A(131),u=A(137),l=A(87),C=A(101);function h(t,e){var A=(new o.a).compile(C.c[e].schema);if(!A(t)){var n=JSON.stringify(A.errors,null,2);throw new Error("Tree validation failed: ".concat(n))}if(t.datatype!==e)throw new Error("The data type does not match the expected data type of '".concat(e,"'."));return"0.1.2"===t.version?Object(r.a)({},t,{version:C.c[e].latestVersion,tree:t.tree.map((function(t){return Object(u.i)(t,(function(t){return!t.children&&Array.isArray(t.set)}),(function(t){return Object(r.a)({},t,{set:t.set.map((function(t){return[t,null]}))})}),[])}))}):t}function B(t,e){var A=JSON.parse(t);return A=h(A,e)}function f(t,e){var A=Object(g.a)(C.g).parse(t,(function(t){return{groupName:t.groupName,setName:t.setName,setColor:t.setColor?Object(I.d)(t.setColor):l.b,obsId:t.obsId,predictionScore:s()(t.predictionScore)||t.predictionScore===C.f?null:+t.predictionScore}})),n=(new o.a).compile(C.i[e].schema);if(n(A)){var r={version:C.c[e].latestVersion,datatype:e,tree:[]};return Array.from(new Set(A.map((function(t){return t.groupName})))).forEach((function(t){var e={name:t,children:[]},n=A.filter((function(e){return e.groupName===t}));Array.from(new Set(n.map((function(t){return t.setName})))).forEach((function(t){var A=n.filter((function(e){return e.setName===t})),r=A[0].setColor,i={name:t,color:r,set:A.map((function(t){return[t.obsId,t.predictionScore]}))};e.children.push(i)})),r.tree.push(e)})),r}var i=JSON.stringify(n.errors,null,2);throw new Error("Import validation failed: ".concat(i))}function d(t){var e=JSON.stringify(t);return"data:".concat(C.d,";charset=utf-8,").concat(encodeURIComponent(e))}function Q(t){var e=[];t.tree.forEach((function(t){t.children.forEach((function(A){A.set&&A.set.forEach((function(r){var i=Object(n.a)(r,2),o=i[0],a=i[1];e.push({groupName:t.name,setName:A.name,setColor:Object(I.c)(A.color),obsId:o,predictionScore:s()(a)?C.f:a})}))}))}));var A=Object(c.parse)(e,{fields:["groupName","setName","setColor","obsId","predictionScore"],delimiter:C.g});return"data:".concat(C.e,";charset=utf-8,").concat(encodeURIComponent(A))}function E(t,e){var A=document.createElement("a");A.setAttribute("href",t),A.setAttribute("download",e),document.body.appendChild(A),A.click(),A.remove()}},,function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n="",r={};function i(t){for(var e in r)if(t.startsWith(e)){var A=r[e];t=t.replace(e,A)}return t.startsWith("http://")||t.startsWith("https://")||(t="".concat(n).concat(t)),t}},function(t,e,A){(function(t){var n=A(144),r=A(714),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;t.exports=s}).call(this,A(220)(t))},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(222),r=A(314);function i(t,e,A){return(i=Object(r.a)()?Reflect.construct:function(t,e,A){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return A&&Object(n.a)(i,A.prototype),i}).apply(null,arguments)}},function(t,e,A){"use strict";var n=A(2),r=A.n(n),i=A(13),o=A(21),a=A(8),s=A(12),g=A(20),c=A(877),I=A.n(c),u=A(89),l=A.n(u),C=A(123),h=A(1166),B=A(136),f={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function d(t){return"number"===typeof t}function Q(t){return t&&!0===t.constructor.prototype.isBigNumber||!1}function E(t){return t&&"object"===typeof t&&!0===Object.getPrototypeOf(t).isComplex||!1}function p(t){return t&&"object"===typeof t&&!0===Object.getPrototypeOf(t).isFraction||!1}function y(t){return t&&!0===t.constructor.prototype.isUnit||!1}function v(t){return"string"===typeof t}var m=Array.isArray;function b(t){return t&&!0===t.constructor.prototype.isMatrix||!1}function F(t){return Array.isArray(t)||b(t)}function w(t){return t&&t.isDenseMatrix&&!0===t.constructor.prototype.isMatrix||!1}function S(t){return t&&t.isSparseMatrix&&!0===t.constructor.prototype.isMatrix||!1}function D(t){return t&&!0===t.constructor.prototype.isRange||!1}function R(t){return t&&!0===t.constructor.prototype.isIndex||!1}function U(t){return"boolean"===typeof t}function G(t){return t&&!0===t.constructor.prototype.isResultSet||!1}function N(t){return t&&!0===t.constructor.prototype.isHelp||!1}function k(t){return"function"===typeof t}function x(t){return t instanceof Date}function O(t){return t instanceof RegExp}function M(t){return!(!t||"object"!==typeof t||t.constructor!==Object||E(t)||p(t))}function L(t){return null===t}function _(t){return void 0===t}function J(t){return t&&!0===t.isAccessorNode&&!0===t.constructor.prototype.isNode||!1}function T(t){return t&&!0===t.isArrayNode&&!0===t.constructor.prototype.isNode||!1}function j(t){return t&&!0===t.isAssignmentNode&&!0===t.constructor.prototype.isNode||!1}function H(t){return t&&!0===t.isBlockNode&&!0===t.constructor.prototype.isNode||!1}function Y(t){return t&&!0===t.isConditionalNode&&!0===t.constructor.prototype.isNode||!1}function V(t){return t&&!0===t.isConstantNode&&!0===t.constructor.prototype.isNode||!1}function Z(t){return t&&!0===t.isFunctionAssignmentNode&&!0===t.constructor.prototype.isNode||!1}function W(t){return t&&!0===t.isFunctionNode&&!0===t.constructor.prototype.isNode||!1}function K(t){return t&&!0===t.isIndexNode&&!0===t.constructor.prototype.isNode||!1}function P(t){return t&&!0===t.isNode&&!0===t.constructor.prototype.isNode||!1}function q(t){return t&&!0===t.isObjectNode&&!0===t.constructor.prototype.isNode||!1}function X(t){return t&&!0===t.isOperatorNode&&!0===t.constructor.prototype.isNode||!1}function z(t){return t&&!0===t.isParenthesisNode&&!0===t.constructor.prototype.isNode||!1}function $(t){return t&&!0===t.isRangeNode&&!0===t.constructor.prototype.isNode||!1}function tt(t){return t&&!0===t.isSymbolNode&&!0===t.constructor.prototype.isNode||!1}function et(t){return t&&!0===t.constructor.prototype.isChain||!1}function At(t){var e=typeof t;return"object"===e?null===t?"null":Array.isArray(t)?"Array":t instanceof Date?"Date":t instanceof RegExp?"RegExp":Q(t)?"BigNumber":E(t)?"Complex":p(t)?"Fraction":b(t)?"Matrix":y(t)?"Unit":R(t)?"Index":D(t)?"Range":G(t)?"ResultSet":P(t)?t.type:et(t)?"Chain":N(t)?"Help":"Object":"function"===e?"Function":e}function nt(t){var e=typeof t;if("number"===e||"string"===e||"boolean"===e||null===t||void 0===t)return t;if("function"===typeof t.clone)return t.clone();if(Array.isArray(t))return t.map((function(t){return nt(t)}));if(t instanceof Date)return new Date(t.valueOf());if(Q(t))return t;if(t instanceof RegExp)throw new TypeError("Cannot clone "+t);return rt(t,nt)}function rt(t,e){var A={};for(var n in t)at(t,n)&&(A[n]=e(t[n]));return A}function it(t,e){for(var A in e)at(e,A)&&(t[A]=e[A]);return t}function ot(t,e){var A,n,r;if(Array.isArray(t)){if(!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(n=0,r=t.length;n<r;n++)if(!ot(t[n],e[n]))return!1;return!0}if("function"===typeof t)return t===e;if(t instanceof Object){if(Array.isArray(e)||!(e instanceof Object))return!1;for(A in t)if(!(A in e)||!ot(t[A],e[A]))return!1;for(A in e)if(!(A in t)||!ot(t[A],e[A]))return!1;return!0}return t===e}function at(t,e){return t&&Object.hasOwnProperty.call(t,e)}var st=["Matrix","Array"],gt=["number","BigNumber","Fraction"];function ct(){return(ct=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}var It=function(t){if(t)throw new Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n  import { create, all } from 'mathjs';\n  const mathjs = create(all);\n  mathjs.config({ number: 'BigNumber' });\n");return Object.freeze(f)};function ut(t){return"boolean"===typeof t||!!isFinite(t)&&t===Math.round(t)}ct(It,f,{MATRIX_OPTIONS:st,NUMBER_OPTIONS:gt});var lt=Math.sign||function(t){return t>0?1:t<0?-1:0},Ct=Math.log2||function(t){return Math.log(t)/Math.LN2},ht=Math.log10||function(t){return Math.log(t)/Math.LN10},Bt=(Math.log1p,Math.cbrt||function(t){if(0===t)return t;var e,A=t<0;return A&&(t=-t),e=isFinite(t)?(t/((e=Math.exp(Math.log(t)/3))*e)+2*e)/3:t,A?-e:e}),ft=Math.expm1||function(t){return t>=2e-4||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function dt(t,e,A){var n={2:"0b",8:"0o",16:"0x"}[e],r="";if(A){if(A<1)throw new Error("size must be in greater than 0");if(!ut(A))throw new Error("size must be an integer");if(t>Math.pow(2,A-1)-1||t<-Math.pow(2,A-1))throw new Error("Value must be in range [-2^".concat(A-1,", 2^").concat(A-1,"-1]"));if(!ut(t))throw new Error("Value must be an integer");t<0&&(t+=Math.pow(2,A)),r="i".concat(A)}var i="";return t<0&&(t=-t,i="-"),"".concat(i).concat(n).concat(t.toString(e)).concat(r)}function Qt(t,e){if("function"===typeof e)return e(t);if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(isNaN(t))return"NaN";var A,n,r="auto";if(e&&(e.notation&&(r=e.notation),d(e)?A=e:d(e.precision)&&(A=e.precision),e.wordSize&&"number"!==typeof(n=e.wordSize)))throw new Error('Option "wordSize" must be a number');switch(r){case"fixed":return pt(t,A);case"exponential":return yt(t,A);case"engineering":return function(t,e){if(isNaN(t)||!isFinite(t))return String(t);var A=vt(Et(t),e),n=A.exponent,r=A.coefficients,i=n%3===0?n:n<0?n-3-n%3:n-n%3;if(d(e))for(;e>r.length||n-i+1>r.length;)r.push(0);else for(var o=Math.abs(n-i)-(r.length-1),a=0;a<o;a++)r.push(0);var s=Math.abs(n-i),g=1;for(;s>0;)g++,s--;var c=r.slice(g).join(""),I=d(e)&&c.length||c.match(/[1-9]/)?"."+c:"",u=r.slice(0,g).join("")+I+"e"+(n>=0?"+":"")+i.toString();return A.sign+u}(t,A);case"bin":return dt(t,2,n);case"oct":return dt(t,8,n);case"hex":return dt(t,16,n);case"auto":return function(t,e,A){if(isNaN(t)||!isFinite(t))return String(t);var n=A&&void 0!==A.lowerExp?A.lowerExp:-3,r=A&&void 0!==A.upperExp?A.upperExp:5,i=Et(t),o=e?vt(i,e):i;if(o.exponent<n||o.exponent>=r)return yt(t,e);var a=o.coefficients,s=o.exponent;a.length<e&&(a=a.concat(mt(e-a.length))),a=a.concat(mt(s-a.length+1+(a.length<e?e-a.length:0))),a=mt(-s).concat(a);var g=s>0?s:0;return g<a.length-1&&a.splice(g+1,0,"."),o.sign+a.join("")}(t,A,e&&e).replace(/((\.\d*?)(0+))($|e)/,(function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e}));default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Et(t){var e=String(t).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw new SyntaxError("Invalid number "+t);var A=e[1],n=e[2],r=parseFloat(e[4]||"0"),i=n.indexOf(".");r+=-1!==i?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,(function(t){return r-=t.length,""})).replace(/0*$/,"").split("").map((function(t){return parseInt(t)}));return 0===o.length&&(o.push(0),r++),{sign:A,coefficients:o,exponent:r}}function pt(t,e){if(isNaN(t)||!isFinite(t))return String(t);var A=Et(t),n="number"===typeof e?vt(A,A.exponent+1+e):A,r=n.coefficients,i=n.exponent+1,o=i+(e||0);return r.length<o&&(r=r.concat(mt(o-r.length))),i<0&&(r=mt(1-i).concat(r),i=1),i<r.length&&r.splice(i,0,0===i?"0.":"."),n.sign+r.join("")}function yt(t,e){if(isNaN(t)||!isFinite(t))return String(t);var A=Et(t),n=e?vt(A,e):A,r=n.coefficients,i=n.exponent;r.length<e&&(r=r.concat(mt(e-r.length)));var o=r.shift();return n.sign+o+(r.length>0?"."+r.join(""):"")+"e"+(i>=0?"+":"")+i}function vt(t,e){for(var A={sign:t.sign,coefficients:t.coefficients,exponent:t.exponent},n=A.coefficients;e<=0;)n.unshift(0),A.exponent++,e++;if(n.length>e&&n.splice(e,n.length-e)[0]>=5){var r=e-1;for(n[r]++;10===n[r];)n.pop(),0===r&&(n.unshift(0),A.exponent++,r++),n[--r]++}return A}function mt(t){for(var e=[],A=0;A<t;A++)e.push(0);return e}var bt=Number.EPSILON||2220446049250313e-31;function Ft(t,e,A){if(null===A||void 0===A)return t===e;if(t===e)return!0;if(isNaN(t)||isNaN(e))return!1;if(isFinite(t)&&isFinite(e)){var n=Math.abs(t-e);return n<bt||n<=Math.max(Math.abs(t),Math.abs(e))*A}return!1}var wt=Math.acosh||function(t){return Math.log(Math.sqrt(t*t-1)+t)},St=Math.asinh||function(t){return Math.log(Math.sqrt(t*t+1)+t)},Dt=Math.atanh||function(t){return Math.log((1+t)/(1-t))/2},Rt=(Math.cosh,Math.sinh||function(t){return(Math.exp(t)-Math.exp(-t))/2});Math.tanh;function Ut(t,e,A){var n=new(0,t.constructor)(2),r="";if(A){if(A<1)throw new Error("size must be in greater than 0");if(!ut(A))throw new Error("size must be an integer");if(t.greaterThan(n.pow(A-1).sub(1))||t.lessThan(n.pow(A-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(A-1,", 2^").concat(A-1,"-1]"));if(!t.isInteger())throw new Error("Value must be an integer");t.lessThan(0)&&(t=t.add(n.pow(A))),r="i".concat(A)}switch(e){case 2:return"".concat(t.toBinary()).concat(r);case 8:return"".concat(t.toOctal()).concat(r);case 16:return"".concat(t.toHexadecimal()).concat(r);default:throw new Error("Base ".concat(e," not supported "))}}function Gt(t,e){if("function"===typeof e)return e(t);if(!t.isFinite())return t.isNaN()?"NaN":t.gt(0)?"Infinity":"-Infinity";var A,n,r="auto";if(void 0!==e&&(e.notation&&(r=e.notation),"number"===typeof e?A=e:e.precision&&(A=e.precision),e.wordSize&&"number"!==typeof(n=e.wordSize)))throw new Error('Option "wordSize" must be a number');switch(r){case"fixed":return function(t,e){return t.toFixed(e)}(t,A);case"exponential":return Nt(t,A);case"engineering":return function(t,e){var A=t.e,n=A%3===0?A:A<0?A-3-A%3:A-A%3,r=t.mul(Math.pow(10,-n)),i=r.toPrecision(e);-1!==i.indexOf("e")&&(i=r.toString());return i+"e"+(A>=0?"+":"")+n.toString()}(t,A);case"bin":return Ut(t,2,n);case"oct":return Ut(t,8,n);case"hex":return Ut(t,16,n);case"auto":var i=e&&void 0!==e.lowerExp?e.lowerExp:-3,o=e&&void 0!==e.upperExp?e.upperExp:5;if(t.isZero())return"0";var a=t.toSignificantDigits(A),s=a.e;return(s>=i&&s<o?a.toFixed():Nt(t,A)).replace(/((\.\d*?)(0+))($|e)/,(function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e}));default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Nt(t,e){return void 0!==e?t.toExponential(e-1):t.toExponential()}function kt(t,e){var A=t.length-e.length,n=t.length;return t.substring(A,n)===e}function xt(t,e){return"number"===typeof t?Qt(t,e):Q(t)?Gt(t,e):function(t){return t&&"object"===typeof t&&"number"===typeof t.s&&"number"===typeof t.n&&"number"===typeof t.d||!1}(t)?e&&"decimal"===e.fraction?t.toString():t.s*t.n+"/"+t.d:Array.isArray(t)?function t(e,A){if(Array.isArray(e)){for(var n="[",r=e.length,i=0;i<r;i++)0!==i&&(n+=", "),n+=t(e[i],A);return n+="]"}return xt(e,A)}(t,e):v(t)?'"'+t+'"':"function"===typeof t?t.syntax?String(t.syntax):"function":t&&"object"===typeof t?"function"===typeof t.format?t.format(e):t&&t.toString(e)!=={}.toString()?t.toString(e):"{"+Object.keys(t).map((function(A){return'"'+A+'": '+xt(t[A],e)})).join(", ")+"}":String(t)}function Ot(t,e,A){if(!(this instanceof Ot))throw new SyntaxError("Constructor must be called with the new operator");this.actual=t,this.expected=e,this.relation=A,this.message="Dimension mismatch ("+(Array.isArray(t)?"["+t.join(", ")+"]":t)+" "+(this.relation||"!=")+" "+(Array.isArray(e)?"["+e.join(", ")+"]":e)+")",this.stack=(new Error).stack}function Mt(t,e,A){if(!(this instanceof Mt))throw new SyntaxError("Constructor must be called with the new operator");this.index=t,arguments.length<3?(this.min=0,this.max=e):(this.min=e,this.max=A),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function Lt(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e}function _t(t,e){if(0===e.length){if(Array.isArray(t))throw new Ot(t.length,0)}else!function t(e,A,n){var r,i=e.length;if(i!==A[n])throw new Ot(i,A[n]);if(n<A.length-1){var o=n+1;for(r=0;r<i;r++){var a=e[r];if(!Array.isArray(a))throw new Ot(A.length-1,A.length,"<");t(e[r],A,o)}}else for(r=0;r<i;r++)if(Array.isArray(e[r]))throw new Ot(A.length+1,A.length,">")}(t,e,0)}function Jt(t,e){if(!d(t)||!ut(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||"number"===typeof e&&t>=e)throw new Mt(t,e)}function Tt(t,e,A){if(!Array.isArray(t)||!Array.isArray(e))throw new TypeError("Array expected");if(0===e.length)throw new Error("Resizing to scalar is not supported");return e.forEach((function(t){if(!d(t)||!ut(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+xt(e)+")")})),function t(e,A,n,r){var i,o,a=e.length,s=A[n],g=Math.min(a,s);if(e.length=s,n<A.length-1){var c=n+1;for(i=0;i<g;i++)o=e[i],Array.isArray(o)||(o=[o],e[i]=o),t(o,A,c,r);for(i=g;i<s;i++)o=[],e[i]=o,t(o,A,c,r)}else{for(i=0;i<g;i++)for(;Array.isArray(e[i]);)e[i]=e[i][0];for(i=g;i<s;i++)e[i]=r}}(t,e,0,void 0!==A?A:0),t}function jt(t,e){var A=Zt(t),n=A.length;if(!Array.isArray(t)||!Array.isArray(e))throw new TypeError("Array expected");if(0===e.length)throw new Ot(0,n,"!=");var r=Yt(e=Ht(e,n));if(n!==r)throw new Ot(r,n,"!=");try{return function(t,e){for(var A,n=t,r=e.length-1;r>0;r--){var i=e[r];A=[];for(var o=n.length/i,a=0;a<o;a++)A.push(n.slice(a*i,(a+1)*i));n=A}return n}(A,e)}catch(i){if(i instanceof Ot)throw new Ot(r,n,"!=");throw i}}function Ht(t,e){var A=Yt(t),n=t.slice(),r=t.indexOf(-1);if(t.indexOf(-1,r+1)>=0)throw new Error("More than one wildcard in sizes");if(r>=0){if(!(e%A===0))throw new Error("Could not replace wildcard, since "+e+" is no multiple of "+-A);n[r]=-e/A}return n}function Yt(t){return t.reduce((function(t,e){return t*e}),1)}function Vt(t,e,A,n){var r=n||Lt(t);if(A)for(var i=0;i<A;i++)t=[t],r.unshift(1);for(t=function t(e,A,n){var r,i;if(Array.isArray(e)){var o=n+1;for(r=0,i=e.length;r<i;r++)e[r]=t(e[r],A,o)}else for(var a=n;a<A;a++)e=[e];return e}(t,e,0);r.length<e;)r.push(1);return t}function Zt(t){if(!Array.isArray(t))return t;var e=[];return t.forEach((function t(A){Array.isArray(A)?A.forEach(t):e.push(A)})),e}function Wt(t,e){for(var A,n=0,r=0;r<t.length;r++){var i=t[r],o=Array.isArray(i);if(0===r&&o&&(n=i.length),o&&i.length!==n)return;var a=o?Wt(i,e):e(i);if(void 0===A)A=a;else if(A!==a)return"mixed"}return A}function Kt(t,e,A,n){function r(n){var r=function(t,e){for(var A={},n=0;n<e.length;n++){var r=e[n],i=t[r];void 0!==i&&(A[r]=i)}return A}(n,e.map(Pt));return function(t,e,A){if(!e.filter((function(t){return!function(t){return t&&"?"===t[0]}(t)})).every((function(t){return void 0!==A[t]}))){var n=e.filter((function(t){return void 0===A[t]}));throw new Error('Cannot create function "'.concat(t,'", ')+"some dependencies are missing: ".concat(n.map((function(t){return'"'.concat(t,'"')})).join(", "),"."))}}(t,e,n),A(r)}return r.isFactory=!0,r.fn=t,r.dependencies=e.slice().sort(),n&&(r.meta=n),r}function Pt(t){return t&&"?"===t[0]?t.slice(1):t}Ot.prototype=new RangeError,Ot.prototype.constructor=RangeError,Ot.prototype.name="DimensionError",Ot.prototype.isDimensionError=!0,Mt.prototype=new RangeError,Mt.prototype.constructor=RangeError,Mt.prototype.name="IndexError",Mt.prototype.isIndexError=!0;var qt=A(242),Xt=A.n(qt),zt=Kt("Complex",[],(function(){return Xt.a.prototype.type="Complex",Xt.a.prototype.isComplex=!0,Xt.a.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},Xt.a.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},Xt.a.prototype.format=function(t){var e=this.im,A=this.re,n=Qt(this.re,t),r=Qt(this.im,t),i=d(t)?t:t?t.precision:null;if(null!==i){var o=Math.pow(10,-i);Math.abs(A/e)<o&&(A=0),Math.abs(e/A)<o&&(e=0)}return 0===e?n:0===A?1===e?"i":-1===e?"-i":r+"i":e<0?-1===e?n+" - i":n+" - "+r.substring(1)+"i":1===e?n+" + i":n+" + "+r+"i"},Xt.a.fromPolar=function(t){switch(arguments.length){case 1:var e=arguments[0];if("object"===typeof e)return Xt()(e);throw new TypeError("Input has to be an object with r and phi keys.");case 2:var A=arguments[0],n=arguments[1];if(d(A)){if(y(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),d(n))return new Xt.a({r:A,phi:n});throw new TypeError("Phi is not a number nor an angle unit.")}throw new TypeError("Radius r is not a number.");default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},Xt.a.prototype.valueOf=Xt.a.prototype.toString,Xt.a.fromJSON=function(t){return new Xt.a(t)},Xt.a.compare=function(t,e){return t.re>e.re?1:t.re<e.re?-1:t.im>e.im?1:t.im<e.im?-1:0},Xt.a}),{isClass:!0});function $t(t){var e=0,A=1,n=Object.create(null),r=Object.create(null),i=0,o=function(t){var o=r[t];if(o&&(delete n[o],delete r[t],--e,A===o)){if(!e)return i=0,void(A=1);for(;!hasOwnProperty.call(n,++A););}};return t=Math.abs(t),{hit:function(a){var s=r[a],g=++i;if(n[g]=a,r[a]=g,!s){if(++e<=t)return;return a=n[A],o(a),a}if(delete n[s],A===s)for(;!hasOwnProperty.call(n,++A););},delete:o,clear:function(){e=i=0,A=1,n=Object.create(null),r=Object.create(null)}}}function te(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.hasher,n=e.limit;return n=null==n?Number.POSITIVE_INFINITY:n,A=null==A?JSON.stringify:A,function e(){"object"!==typeof e.cache&&(e.cache={values:new Map,lru:$t(n||Number.POSITIVE_INFINITY)});for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=A(r);if(e.cache.values.has(o))return e.cache.lru.hit(o),e.cache.values.get(o);var a=t.apply(t,r);return e.cache.values.set(o,a),e.cache.values.delete(e.cache.lru.hit(o)),a}}te((function(t){return new t(1).exp()}),{hasher:Ae}),te((function(t){return new t(1).plus(new t(5).sqrt()).div(2)}),{hasher:Ae});var ee=te((function(t){return t.acos(-1)}),{hasher:Ae});te((function(t){return ee(t).times(2)}),{hasher:Ae});function Ae(t){return t[0].precision}Math.PI,Math.PI,Math.E;var ne=A(529),re=A.n(ne),ie=Kt("BigNumber",["?on","config"],(function(t){var e=t.on,A=t.config,n=re.a.clone({precision:A.precision,modulo:9});return n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(t){return new n(t.value)},e&&e("config",(function(t,e){t.precision!==e.precision&&n.config({precision:t.precision})})),n}),{isClass:!0}),oe=Kt("Matrix",[],(function(){function t(){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator")}return t.prototype.type="Matrix",t.prototype.isMatrix=!0,t.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},t.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},t.prototype.create=function(t,e){throw new Error("Cannot invoke create on a Matrix interface")},t.prototype.subset=function(t,e,A){throw new Error("Cannot invoke subset on a Matrix interface")},t.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},t.prototype.set=function(t,e,A){throw new Error("Cannot invoke set on a Matrix interface")},t.prototype.resize=function(t,e){throw new Error("Cannot invoke resize on a Matrix interface")},t.prototype.reshape=function(t,e){throw new Error("Cannot invoke reshape on a Matrix interface")},t.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},t.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},t.prototype.map=function(t,e){throw new Error("Cannot invoke map on a Matrix interface")},t.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},t.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},t.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},t.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},t.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},t}),{isClass:!0});ae("fineStructure",.0072973525693),ae("weakMixingAngle",.2229),ae("efimovFactor",22.7),ae("sackurTetrode",-1.16487052358);function ae(t,e){return Kt(t,["config","BigNumber"],(function(t){var A=t.config,n=t.BigNumber;return"BigNumber"===A.number?new n(e):e}))}var se=A(441),ge=A.n(se),ce=Kt("Fraction",[],(function(){return ge.a.prototype.type="Fraction",ge.a.prototype.isFraction=!0,ge.a.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ge.a.fromJSON=function(t){return new ge.a(t)},ge.a}),{isClass:!0}),Ie=Kt("DenseMatrix",["Matrix"],(function(t){var e=t.Matrix;function A(t,e){if(!(this instanceof A))throw new SyntaxError("Constructor must be called with the new operator");if(e&&!v(e))throw new Error("Invalid datatype: "+e);if(b(t))"DenseMatrix"===t.type?(this._data=nt(t._data),this._size=nt(t._size),this._datatype=e||t._datatype):(this._data=t.toArray(),this._size=t.size(),this._datatype=e||t._datatype);else if(t&&m(t.data)&&m(t.size))this._data=t.data,this._size=t.size,_t(this._data,this._size),this._datatype=e||t.datatype;else if(m(t))this._data=function t(e){for(var A=0,n=e.length;A<n;A++){var r=e[A];m(r)?e[A]=t(r):r&&!0===r.isMatrix&&(e[A]=t(r.valueOf()))}return e}(t),this._size=Lt(this._data),_t(this._data,this._size),this._datatype=e;else{if(t)throw new TypeError("Unsupported type of data ("+At(t)+")");this._data=[],this._size=[0],this._datatype=e}}function n(t,e){if(!R(e))throw new TypeError("Invalid index");if(e.isScalar())return t.get(e.min());var n=e.size();if(n.length!==t._size.length)throw new Ot(n.length,t._size.length);for(var r=e.min(),i=e.max(),o=0,a=t._size.length;o<a;o++)Jt(r[o],t._size[o]),Jt(i[o],t._size[o]);return new A(function t(e,A,n,r){var i=r===n-1,o=A.dimension(r);return i?o.map((function(t){return Jt(t,e.length),e[t]})).valueOf():o.map((function(i){Jt(i,e.length);var o=e[i];return t(o,A,n,r+1)})).valueOf()}(t._data,e,n.length,0),t._datatype)}function r(t,e,A,n){if(!e||!0!==e.isIndex)throw new TypeError("Invalid index");var r,i=e.size(),a=e.isScalar();if(b(A)?(r=A.size(),A=A.valueOf()):r=Lt(A),a){if(0!==r.length)throw new TypeError("Scalar expected");t.set(e.min(),A,n)}else{if(i.length<t._size.length)throw new Ot(i.length,t._size.length,"<");if(r.length<i.length){for(var s=0,g=0;1===i[s]&&1===r[s];)s++;for(;1===i[s];)g++,s++;A=Vt(A,i.length,g,r)}if(!ot(i,r))throw new Ot(i,r,">");o(t,e.max().map((function(t){return t+1})),n);var c=i.length;!function t(e,A,n,r,i){var o=i===r-1,a=A.dimension(i);o?a.forEach((function(t,A){Jt(t),e[t]=n[A[0]]})):a.forEach((function(o,a){Jt(o),t(e[o],A,n[a[0]],r,i+1)}))}(t._data,e,A,c,0)}return t}function i(t,e,A){if(0===e.length){for(var n=t._data;m(n);)n=n[0];return n}return t._size=e.slice(0),t._data=Tt(t._data,t._size,A),t}function o(t,e,A){for(var n=t._size.slice(0),r=!1;n.length<e.length;)n.push(0),r=!0;for(var o=0,a=e.length;o<a;o++)e[o]>n[o]&&(n[o]=e[o],r=!0);r&&i(t,n,A)}return A.prototype=new e,A.prototype.createDenseMatrix=function(t,e){return new A(t,e)},A.prototype.type="DenseMatrix",A.prototype.isDenseMatrix=!0,A.prototype.getDataType=function(){return Wt(this._data,At)},A.prototype.storage=function(){return"dense"},A.prototype.datatype=function(){return this._datatype},A.prototype.create=function(t,e){return new A(t,e)},A.prototype.subset=function(t,e,A){switch(arguments.length){case 1:return n(this,t);case 2:case 3:return r(this,t,e,A);default:throw new SyntaxError("Wrong number of arguments")}},A.prototype.get=function(t){if(!m(t))throw new TypeError("Array expected");if(t.length!==this._size.length)throw new Ot(t.length,this._size.length);for(var e=0;e<t.length;e++)Jt(t[e],this._size[e]);for(var A=this._data,n=0,r=t.length;n<r;n++){var i=t[n];Jt(i,A.length),A=A[i]}return A},A.prototype.set=function(t,e,A){if(!m(t))throw new TypeError("Array expected");if(t.length<this._size.length)throw new Ot(t.length,this._size.length,"<");var n,r,i;o(this,t.map((function(t){return t+1})),A);var a=this._data;for(n=0,r=t.length-1;n<r;n++)Jt(i=t[n],a.length),a=a[i];return Jt(i=t[t.length-1],a.length),a[i]=e,this},A.prototype.resize=function(t,e,A){if(!F(t))throw new TypeError("Array or Matrix expected");var n=t.valueOf().map((function(t){return Array.isArray(t)&&1===t.length?t[0]:t}));return i(A?this.clone():this,n,e)},A.prototype.reshape=function(t,e){var A=e?this.clone():this;A._data=jt(A._data,t);var n=A._size.reduce((function(t,e){return t*e}));return A._size=Ht(t,n),A},A.prototype.clone=function(){return new A({data:nt(this._data),size:nt(this._size),datatype:this._datatype})},A.prototype.size=function(){return this._size.slice(0)},A.prototype.map=function(t){var e=this,n=function A(n,r){return m(n)?n.map((function(t,e){return A(t,r.concat(e))})):t(n,r,e)}(this._data,[]);return new A(n,void 0!==this._datatype?Wt(n,At):void 0)},A.prototype.forEach=function(t){var e=this;!function A(n,r){m(n)?n.forEach((function(t,e){A(t,r.concat(e))})):t(n,r,e)}(this._data,[])},A.prototype.toArray=function(){return nt(this._data)},A.prototype.valueOf=function(){return this._data},A.prototype.format=function(t){return xt(this._data,t)},A.prototype.toString=function(){return xt(this._data)},A.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},A.prototype.diagonal=function(t){if(t){if(Q(t)&&(t=t.toNumber()),!d(t)||!ut(t))throw new TypeError("The parameter k must be an integer number")}else t=0;for(var e=t>0?t:0,n=t<0?-t:0,r=this._size[0],i=this._size[1],o=Math.min(r-n,i-e),a=[],s=0;s<o;s++)a[s]=this._data[s+n][s+e];return new A({data:a,size:[o],datatype:this._datatype})},A.diagonal=function(t,e,n,r){if(!m(t))throw new TypeError("Array expected, size parameter");if(2!==t.length)throw new Error("Only two dimensions matrix are supported");if(t=t.map((function(t){if(Q(t)&&(t=t.toNumber()),!d(t)||!ut(t)||t<1)throw new Error("Size values must be positive integers");return t})),n){if(Q(n)&&(n=n.toNumber()),!d(n)||!ut(n))throw new TypeError("The parameter k must be an integer number")}else n=0;var i,o=n>0?n:0,a=n<0?-n:0,s=t[0],g=t[1],c=Math.min(s-a,g-o);if(m(e)){if(e.length!==c)throw new Error("Invalid value array length");i=function(t){return e[t]}}else if(b(e)){var I=e.size();if(1!==I.length||I[0]!==c)throw new Error("Invalid matrix length");i=function(t){return e.get([t])}}else i=function(){return e};r||(r=Q(i(0))?i(0).mul(0):0);var u=[];if(t.length>0){u=Tt(u,t,r);for(var l=0;l<c;l++)u[l+a][l+o]=i(l)}return new A({data:u,size:[s,g]})},A.fromJSON=function(t){return new A(t)},A.prototype.swapRows=function(t,e){if(!d(t)||!ut(t)||!d(e)||!ut(e))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return Jt(t,this._size[0]),Jt(e,this._size[0]),A._swapRows(t,e,this._data),this},A._swapRows=function(t,e,A){var n=A[t];A[t]=A[e],A[e]=n},A}),{isClass:!0}),ue=A(796),le=A.n(ue),Ce=function(){return Ce=le.a.create,le.a},he=Kt("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],(function(t){var e=t.BigNumber,A=t.Complex,n=t.DenseMatrix,r=t.Fraction,i=Ce();return i.types=[{name:"number",test:d},{name:"Complex",test:E},{name:"BigNumber",test:Q},{name:"Fraction",test:p},{name:"Unit",test:y},{name:"string",test:v},{name:"Chain",test:et},{name:"Array",test:m},{name:"Matrix",test:b},{name:"DenseMatrix",test:w},{name:"SparseMatrix",test:S},{name:"Range",test:D},{name:"Index",test:R},{name:"boolean",test:U},{name:"ResultSet",test:G},{name:"Help",test:N},{name:"function",test:k},{name:"Date",test:x},{name:"RegExp",test:O},{name:"null",test:L},{name:"undefined",test:_},{name:"AccessorNode",test:J},{name:"ArrayNode",test:T},{name:"AssignmentNode",test:j},{name:"BlockNode",test:H},{name:"ConditionalNode",test:Y},{name:"ConstantNode",test:V},{name:"FunctionNode",test:W},{name:"FunctionAssignmentNode",test:Z},{name:"IndexNode",test:K},{name:"Node",test:P},{name:"ObjectNode",test:q},{name:"OperatorNode",test:X},{name:"ParenthesisNode",test:z},{name:"RangeNode",test:$},{name:"SymbolNode",test:tt},{name:"Object",test:M}],i.conversions=[{from:"number",to:"BigNumber",convert:function(t){if(e||Be(t),t.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+t+"). Use function bignumber(x) to convert to BigNumber.");return new e(t)}},{from:"number",to:"Complex",convert:function(t){return A||fe(t),new A(t,0)}},{from:"number",to:"string",convert:function(t){return t+""}},{from:"BigNumber",to:"Complex",convert:function(t){return A||fe(t),new A(t.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(t){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(t){return A||fe(t),new A(t.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(t){r||de(t);var e=new r(t);if(e.valueOf()!==t)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+t+"). Use function fraction(x) to convert to Fraction.");return e}},{from:"string",to:"number",convert:function(t){var e=Number(t);if(isNaN(e))throw new Error('Cannot convert "'+t+'" to a number');return e}},{from:"string",to:"BigNumber",convert:function(t){e||Be(t);try{return new e(t)}catch(A){throw new Error('Cannot convert "'+t+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){r||de(t);try{return new r(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){A||fe(t);try{return new A(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(t){return+t}},{from:"boolean",to:"BigNumber",convert:function(t){return e||Be(t),new e(+t)}},{from:"boolean",to:"Fraction",convert:function(t){return r||de(t),new r(+t)}},{from:"boolean",to:"string",convert:function(t){return String(t)}},{from:"Array",to:"Matrix",convert:function(t){return n||function(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new n(t)}},{from:"Matrix",to:"Array",convert:function(t){return t.valueOf()}}],i}));function Be(t){throw new Error("Cannot convert value ".concat(t," into a BigNumber: no class 'BigNumber' provided"))}function fe(t){throw new Error("Cannot convert value ".concat(t," into a Complex number: no class 'Complex' provided"))}function de(t){throw new Error("Cannot convert value ".concat(t," into a Fraction, no class 'Fraction' provided."))}function Qe(t,e,A){return t&&"function"===typeof t.map?t.map((function(t){return Qe(t,e,A)})):e(t)}var Ee=Kt("isNumeric",["typed"],(function(t){return(0,t.typed)("isNumeric",{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string | null | undefined | Node":function(){return!1},"Array | Matrix":function(t){return Qe(t,this)}})})),pe="number";function ye(t){return t<0}function ve(t){return t>0}function me(t){return 0===t}function be(t){return Number.isNaN(t)}ye.signature=pe,ve.signature=pe,me.signature=pe,be.signature=pe;function Fe(t,e,A){if(null===A||void 0===A)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var n=t.minus(e).abs();if(n.isZero())return!0;var r=t.constructor.max(t.abs(),e.abs());return n.lte(r.times(A))}return!1}var we=Kt("equalScalar",["typed","config"],(function(t){var e=t.typed,A=t.config;return e("equalScalar",{"boolean, boolean":function(t,e){return t===e},"number, number":function(t,e){return Ft(t,e,A.epsilon)},"BigNumber, BigNumber":function(t,e){return t.eq(e)||Fe(t,e,A.epsilon)},"Fraction, Fraction":function(t,e){return t.equals(e)},"Complex, Complex":function(t,e){return function(t,e,A){return Ft(t.re,e.re,A)&&Ft(t.im,e.im,A)}(t,e,A.epsilon)},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)}})})),Se=(Kt("equalScalar",["typed","config"],(function(t){var e=t.typed,A=t.config;return e("equalScalar",{"number, number":function(t,e){return Ft(t,e,A.epsilon)}})})),Kt("number",["typed"],(function(t){var e=(0,t.typed)("number",{"":function(){return 0},number:function(t){return t},string:function(t){if("NaN"===t)return NaN;var e=0,A=t.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);A&&(e=Number(A[2]),t=A[1]);var n=Number(t);if(isNaN(n))throw new SyntaxError('String "'+t+'" is no valid number');if(A){if(n>Math.pow(2,e)-1)throw new SyntaxError('String "'.concat(t,'" is out of range'));n>=Math.pow(2,e-1)&&(n-=Math.pow(2,e))}return n},BigNumber:function(t){return t.toNumber()},Fraction:function(t){return t.valueOf()},Unit:function(t){throw new Error("Second argument with valueless unit expected")},null:function(t){return 0},"Unit, string | Unit":function(t,e){return t.toNumber(e)},"Array | Matrix":function(t){return Qe(t,this)}});return e.fromJSON=function(t){return parseFloat(t.value)},e}))),De="number, number";function Re(t){return Math.abs(t)}function Ue(t,e){return t+e}function Ge(t,e){return t*e}function Ne(t){return-t}function ke(t){return t}function xe(t){return Bt(t)}function Oe(t){return Math.ceil(t)}function Me(t){return t*t*t}function Le(t){return Math.exp(t)}function _e(t){return ft(t)}function Je(t,e){if(!ut(t)||!ut(e))throw new Error("Parameters in function gcd must be integer numbers");for(var A;0!==e;)A=t%e,t=e,e=A;return t<0?-t:t}function Te(t,e){if(!ut(t)||!ut(e))throw new Error("Parameters in function lcm must be integer numbers");if(0===t||0===e)return 0;for(var A,n=t*e;0!==e;)e=t%(A=e),t=A;return Math.abs(n/t)}function je(t){return Math.log(t)}function He(t){return ht(t)}function Ye(t){return Ct(t)}function Ve(t,e){if(e>0)return t-e*Math.floor(t/e);if(0===e)return t;throw new Error("Cannot calculate mod for a negative divisor")}function Ze(t,e){var A=e<0;if(A&&(e=-e),0===e)throw new Error("Root must be non-zero");if(t<0&&Math.abs(e)%2!==1)throw new Error("Root must be odd when a is negative.");if(0===t)return A?1/0:0;if(!isFinite(t))return A?0:t;var n=Math.pow(Math.abs(t),1/e);return n=t<0?-n:n,A?1/n:n}function We(t){return lt(t)}function Ke(t){return t*t}function Pe(t,e){var A,n,r,i=0,o=1,a=1,s=0;if(!ut(t)||!ut(e))throw new Error("Parameters in function xgcd must be integer numbers");for(;e;)r=t-(n=Math.floor(t/e))*e,A=i,i=o-n*i,o=A,A=a,a=s-n*a,s=A,t=e,e=r;return t<0?[-t,-o,-s]:[t,t?o:0,s]}function qe(t,e){return t*t<1&&e===1/0||t*t>1&&e===-1/0?0:Math.pow(t,e)}function Xe(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(pt(t,e))}Re.signature="number",Ue.signature=De,Ge.signature=De,Ne.signature="number",ke.signature="number",xe.signature="number",Oe.signature="number",Me.signature="number",Le.signature="number",_e.signature="number",Je.signature=De,Te.signature=De,je.signature="number",He.signature="number",Ye.signature="number",Ve.signature=De,Ze.signature=De,We.signature="number",Ke.signature="number",Pe.signature=De,qe.signature=De,Xe.signature=De;var ze=Kt("multiplyScalar",["typed"],(function(t){return(0,t.typed)("multiplyScalar",{"number, number":Ge,"Complex, Complex":function(t,e){return t.mul(e)},"BigNumber, BigNumber":function(t,e){return t.times(e)},"Fraction, Fraction":function(t,e){return t.mul(e)},"number | Fraction | BigNumber | Complex, Unit":function(t,e){var A=e.clone();return A.value=null===A.value?A._normalize(t):this(A.value,t),A},"Unit, number | Fraction | BigNumber | Complex":function(t,e){var A=t.clone();return A.value=null===A.value?A._normalize(e):this(A.value,e),A},"Unit, Unit":function(t,e){return t.multiply(e)}})}));var $e="number, number";function tA(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function bitAnd");return t&e}function eA(t){if(!ut(t))throw new Error("Integer expected in function bitNot");return~t}function AA(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function bitOr");return t|e}function nA(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function bitXor");return t^e}function rA(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function leftShift");return t<<e}function iA(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function rightArithShift");return t>>e}function oA(t,e){if(!ut(t)||!ut(e))throw new Error("Integers expected in function rightLogShift");return t>>>e}tA.signature=$e,eA.signature="number",AA.signature=$e,nA.signature=$e,rA.signature=$e,iA.signature=$e,oA.signature=$e;function aA(t){return!t}function sA(t,e){return!(!t&&!e)}function gA(t,e){return!!t!==!!e}function cA(t,e){return!(!t||!e)}aA.signature="number",sA.signature="number, number",gA.signature="number, number",cA.signature="number, number";Math.pow(2,53);var IA=Kt("format",["typed"],(function(t){return(0,t.typed)("format",{any:xt,"any, Object | function | number":xt})}));Kt("oct",["typed","format"],(function(t){var e=t.typed,A=t.format;return e("oct",{"number | BigNumber":function(t){return A(t,{notation:"oct"})},"number | BigNumber, number":function(t,e){return A(t,{notation:"oct",wordSize:e})}})}));function uA(t){return wt(t)}function lA(t){return Math.atan(1/t)}function CA(t){return isFinite(t)?(Math.log((t+1)/t)+Math.log(t/(t-1)))/2:0}function hA(t){return Math.asin(1/t)}function BA(t){var e=1/t;return Math.log(e+Math.sqrt(e*e+1))}function fA(t){return Math.acos(1/t)}function dA(t){var e=1/t,A=Math.sqrt(e*e-1);return Math.log(A+e)}function QA(t){return St(t)}function EA(t){return Dt(t)}function pA(t){return 1/Math.tan(t)}function yA(t){var e=Math.exp(2*t);return(e+1)/(e-1)}function vA(t){return 1/Math.sin(t)}function mA(t){return 0===t?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(t)-Math.exp(-t)))*lt(t)}function bA(t){return 1/Math.cos(t)}function FA(t){return 2/(Math.exp(t)+Math.exp(-t))}function wA(t){return Rt(t)}uA.signature="number",lA.signature="number",CA.signature="number",hA.signature="number",BA.signature="number",fA.signature="number",dA.signature="number",QA.signature="number",EA.signature="number",pA.signature="number",yA.signature="number",vA.signature="number",mA.signature="number",bA.signature="number",FA.signature="number",wA.signature="number";function SA(t,e){if(e<t)return 1;if(e===t)return e;var A=e+t>>1;return SA(t,A)*SA(A+1,e)}function DA(t,e){if(!ut(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(!ut(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(e>t)throw new TypeError("k must be less than or equal to n");var A=t-e;return e<A?SA(A+1,t)/SA(1,e):SA(e+1,t)/SA(1,A)}DA.signature="number, number";var RA=A(797),UA=A.n(RA);Date.now();var GA=Kt("fraction",["typed","Fraction"],(function(t){var e=t.typed,A=t.Fraction;return e("fraction",{number:function(t){if(!isFinite(t)||isNaN(t))throw new Error(t+" cannot be represented as a fraction");return new A(t)},string:function(t){return new A(t)},"number, number":function(t,e){return new A(t,e)},null:function(t){return new A(0)},BigNumber:function(t){return new A(t.toString())},Fraction:function(t){return t},Object:function(t){return new A(t)},"Array | Matrix":function(t){return Qe(t,this)}})})),NA=Kt("unaryMinus",["typed"],(function(t){return(0,t.typed)("unaryMinus",{number:Ne,Complex:function(t){return t.neg()},BigNumber:function(t){return t.neg()},Fraction:function(t){return t.neg()},Unit:function(t){var e=t.clone();return e.value=this(t.value),e},"Array | Matrix":function(t){return Qe(t,this,!0)}})})),kA=Kt("addScalar",["typed"],(function(t){return(0,t.typed)("addScalar",{"number, number":Ue,"Complex, Complex":function(t,e){return t.add(e)},"BigNumber, BigNumber":function(t,e){return t.plus(e)},"Fraction, Fraction":function(t,e){return t.add(e)},"Unit, Unit":function(t,e){if(null===t.value||void 0===t.value)throw new Error("Parameter x contains a unit with undefined value");if(null===e.value||void 0===e.value)throw new Error("Parameter y contains a unit with undefined value");if(!t.equalBase(e))throw new Error("Units do not match");var A=t.clone();return A.value=this(A.value,e.value),A.fixPrefix=!1,A}})})),xA=Kt("conj",["typed"],(function(t){return(0,t.typed)("conj",{number:function(t){return t},BigNumber:function(t){return t},Complex:function(t){return t.conjugate()},"Array | Matrix":function(t){return Qe(t,this)}})}));Kt("bin",["typed","format"],(function(t){var e=t.typed,A=t.format;return e("bin",{"number | BigNumber":function(t){return A(t,{notation:"bin"})},"number | BigNumber, number":function(t,e){return A(t,{notation:"bin",wordSize:e})}})}));var OA=Kt("SparseMatrix",["typed","equalScalar","Matrix"],(function(t){var e=t.typed,A=t.equalScalar,n=t.Matrix;function r(t,e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(e&&!v(e))throw new Error("Invalid datatype: "+e);if(b(t))!function(t,e,A){"SparseMatrix"===e.type?(t._values=e._values?nt(e._values):void 0,t._index=nt(e._index),t._ptr=nt(e._ptr),t._size=nt(e._size),t._datatype=A||e._datatype):i(t,e.valueOf(),A||e._datatype)}(this,t,e);else if(t&&m(t.index)&&m(t.ptr)&&m(t.size))this._values=t.values,this._index=t.index,this._ptr=t.ptr,this._size=t.size,this._datatype=e||t.datatype;else if(m(t))i(this,t,e);else{if(t)throw new TypeError("Unsupported type of data ("+At(t)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=e}}function i(t,n,r){t._values=[],t._index=[],t._ptr=[],t._datatype=r;var i=n.length,o=0,a=A,s=0;if(v(r)&&(a=e.find(A,[r,r])||A,s=e.convert(0,r)),i>0){var g=0;do{t._ptr.push(t._index.length);for(var c=0;c<i;c++){var I=n[c];if(m(I)){if(0===g&&o<I.length&&(o=I.length),g<I.length){var u=I[g];a(u,s)||(t._values.push(u),t._index.push(c))}}else 0===g&&o<1&&(o=1),a(I,s)||(t._values.push(I),t._index.push(c))}g++}while(g<o)}t._ptr.push(t._index.length),t._size=[i,o]}function o(t,e){if(!R(e))throw new TypeError("Invalid index");if(e.isScalar())return t.get(e.min());var A,n,i,o,a=e.size();if(a.length!==t._size.length)throw new Ot(a.length,t._size.length);var s=e.min(),g=e.max();for(A=0,n=t._size.length;A<n;A++)Jt(s[A],t._size[A]),Jt(g[A],t._size[A]);var c=t._values,I=t._index,u=t._ptr,l=e.dimension(0),C=e.dimension(1),h=[],B=[];l.forEach((function(t,e){B[t]=e[0],h[t]=!0}));var f=c?[]:void 0,d=[],Q=[];return C.forEach((function(t){for(Q.push(d.length),i=u[t],o=u[t+1];i<o;i++)A=I[i],!0===h[A]&&(d.push(B[A]),f&&f.push(c[i]))})),Q.push(d.length),new r({values:f,index:d,ptr:Q,size:a,datatype:t._datatype})}function a(t,e,A,n){if(!e||!0!==e.isIndex)throw new TypeError("Invalid index");var r,i=e.size(),o=e.isScalar();if(b(A)?(r=A.size(),A=A.toArray()):r=Lt(A),o){if(0!==r.length)throw new TypeError("Scalar expected");t.set(e.min(),A,n)}else{if(1!==i.length&&2!==i.length)throw new Ot(i.length,t._size.length,"<");if(r.length<i.length){for(var a=0,s=0;1===i[a]&&1===r[a];)a++;for(;1===i[a];)s++,a++;A=Vt(A,i.length,s,r)}if(!ot(i,r))throw new Ot(i,r,">");for(var g=e.min()[0],c=e.min()[1],I=r[0],u=r[1],l=0;l<I;l++)for(var C=0;C<u;C++){var h=A[l][C];t.set([l+g,C+c],h,n)}}return t}function s(t,e,A,n){if(A-e===0)return A;for(var r=e;r<A;r++)if(n[r]===t)return r;return e}function g(t,e,A,n,r,i,o){r.splice(t,0,n),i.splice(t,0,e);for(var a=A+1;a<o.length;a++)o[a]++}function c(t,n,r,i){var o=i||0,a=A,s=0;v(t._datatype)&&(a=e.find(A,[t._datatype,t._datatype])||A,s=e.convert(0,t._datatype),o=e.convert(o,t._datatype));var g,c,I,u=!a(o,s),l=t._size[0],C=t._size[1];if(r>C){for(c=C;c<r;c++)if(t._ptr[c]=t._values.length,u)for(g=0;g<l;g++)t._values.push(o),t._index.push(g);t._ptr[r]=t._values.length}else r<C&&(t._ptr.splice(r+1,C-r),t._values.splice(t._ptr[r],t._values.length),t._index.splice(t._ptr[r],t._index.length));if(C=r,n>l){if(u){var h=0;for(c=0;c<C;c++){t._ptr[c]=t._ptr[c]+h,I=t._ptr[c+1]+h;var B=0;for(g=l;g<n;g++,B++)t._values.splice(I+B,0,o),t._index.splice(I+B,0,g),h++}t._ptr[C]=t._values.length}}else if(n<l){var f=0;for(c=0;c<C;c++){t._ptr[c]=t._ptr[c]-f;var d=t._ptr[c],Q=t._ptr[c+1]-f;for(I=d;I<Q;I++)(g=t._index[I])>n-1&&(t._values.splice(I,1),t._index.splice(I,1),f++)}t._ptr[c]=t._values.length}return t._size[0]=n,t._size[1]=r,t}function I(t,e,A,n,r){var i,o,a=n[0],s=n[1],g=[];for(i=0;i<a;i++)for(g[i]=[],o=0;o<s;o++)g[i][o]=0;for(o=0;o<s;o++)for(var c=A[o],I=A[o+1],u=c;u<I;u++)g[i=e[u]][o]=t?r?nt(t[u]):t[u]:1;return g}return r.prototype=new n,r.prototype.createSparseMatrix=function(t,e){return new r(t,e)},r.prototype.type="SparseMatrix",r.prototype.isSparseMatrix=!0,r.prototype.getDataType=function(){return Wt(this._values,At)},r.prototype.storage=function(){return"sparse"},r.prototype.datatype=function(){return this._datatype},r.prototype.create=function(t,e){return new r(t,e)},r.prototype.density=function(){var t=this._size[0],e=this._size[1];return 0!==t&&0!==e?this._index.length/(t*e):0},r.prototype.subset=function(t,e,A){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return o(this,t);case 2:case 3:return a(this,t,e,A);default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.get=function(t){if(!m(t))throw new TypeError("Array expected");if(t.length!==this._size.length)throw new Ot(t.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var e=t[0],A=t[1];Jt(e,this._size[0]),Jt(A,this._size[1]);var n=s(e,this._ptr[A],this._ptr[A+1],this._index);return n<this._ptr[A+1]&&this._index[n]===e?this._values[n]:0},r.prototype.set=function(t,n,r){if(!m(t))throw new TypeError("Array expected");if(t.length!==this._size.length)throw new Ot(t.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var i=t[0],o=t[1],a=this._size[0],I=this._size[1],u=A,l=0;v(this._datatype)&&(u=e.find(A,[this._datatype,this._datatype])||A,l=e.convert(0,this._datatype)),(i>a-1||o>I-1)&&(c(this,Math.max(i+1,a),Math.max(o+1,I),r),a=this._size[0],I=this._size[1]),Jt(i,a),Jt(o,I);var C=s(i,this._ptr[o],this._ptr[o+1],this._index);return C<this._ptr[o+1]&&this._index[C]===i?u(n,l)?function(t,e,A,n,r){A.splice(t,1),n.splice(t,1);for(var i=e+1;i<r.length;i++)r[i]--}(C,o,this._values,this._index,this._ptr):this._values[C]=n:g(C,i,o,n,this._values,this._index,this._ptr),this},r.prototype.resize=function(t,e,A){if(!F(t))throw new TypeError("Array or Matrix expected");var n=t.valueOf().map((function(t){return Array.isArray(t)&&1===t.length?t[0]:t}));if(2!==n.length)throw new Error("Only two dimensions matrix are supported");return n.forEach((function(t){if(!d(t)||!ut(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+xt(n)+")")})),c(A?this.clone():this,n[0],n[1],e)},r.prototype.reshape=function(t,e){if(!m(t))throw new TypeError("Array expected");if(2!==t.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");t.forEach((function(e){if(!d(e)||!ut(e)||e<=-2||0===e)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+xt(t)+")")}));var A=this._size[0]*this._size[1];if(A!==(t=Ht(t,A))[0]*t[1])throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var n=e?this.clone():this;if(this._size[0]===t[0]&&this._size[1]===t[1])return n;for(var r=[],i=0;i<n._ptr.length;i++)for(var o=0;o<n._ptr[i+1]-n._ptr[i];o++)r.push(i);for(var a=n._values.slice(),c=n._index.slice(),I=0;I<n._index.length;I++){var u=c[I],l=r[I],C=u*n._size[1]+l;r[I]=C%t[1],c[I]=Math.floor(C/t[1])}n._values.length=0,n._index.length=0,n._ptr.length=t[1]+1,n._size=t.slice();for(var h=0;h<n._ptr.length;h++)n._ptr[h]=0;for(var B=0;B<a.length;B++){var f=c[B],Q=r[B],E=a[B];g(s(f,n._ptr[Q],n._ptr[Q+1],n._index),f,Q,E,n._values,n._index,n._ptr)}return n},r.prototype.clone=function(){return new r({values:this._values?nt(this._values):void 0,index:nt(this._index),ptr:nt(this._ptr),size:nt(this._size),datatype:this._datatype})},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(t,n){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var i=this;return function(t,n,i,o,a,s,g){var c=[],I=[],u=[],l=A,C=0;v(t._datatype)&&(l=e.find(A,[t._datatype,t._datatype])||A,C=e.convert(0,t._datatype));for(var h=function(t,e,A){t=s(t,e,A),l(t,C)||(c.push(t),I.push(e))},B=o;B<=a;B++){u.push(c.length);var f=t._ptr[B],d=t._ptr[B+1];if(g)for(var Q=f;Q<d;Q++){var E=t._index[Q];E>=n&&E<=i&&h(t._values[Q],E-n,B-o)}else{for(var p={},y=f;y<d;y++){var m=t._index[y];p[m]=t._values[y]}for(var b=n;b<=i;b++){var F=b in p?p[b]:0;h(F,b-n,B-o)}}}return u.push(c.length),new r({values:c,index:I,ptr:u,size:[i-n+1,a-o+1]})}(this,0,this._size[0]-1,0,this._size[1]-1,(function(e,A,n){return t(e,[A,n],i)}),n)},r.prototype.forEach=function(t,e){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var A=this._size[0],n=this._size[1],r=0;r<n;r++){var i=this._ptr[r],o=this._ptr[r+1];if(e)for(var a=i;a<o;a++){var s=this._index[a];t(this._values[a],[s,r],this)}else{for(var g={},c=i;c<o;c++){g[this._index[c]]=this._values[c]}for(var I=0;I<A;I++){t(I in g?g[I]:0,[I,r],this)}}}},r.prototype.toArray=function(){return I(this._values,this._index,this._ptr,this._size,!0)},r.prototype.valueOf=function(){return I(this._values,this._index,this._ptr,this._size,!1)},r.prototype.format=function(t){for(var e=this._size[0],A=this._size[1],n=this.density(),r="Sparse Matrix ["+xt(e,t)+" x "+xt(A,t)+"] density: "+xt(n,t)+"\n",i=0;i<A;i++)for(var o=this._ptr[i],a=this._ptr[i+1],s=o;s<a;s++){r+="\n    ("+xt(this._index[s],t)+", "+xt(i,t)+") ==> "+(this._values?xt(this._values[s],t):"X")}return r},r.prototype.toString=function(){return xt(this.toArray())},r.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},r.prototype.diagonal=function(t){if(t){if(Q(t)&&(t=t.toNumber()),!d(t)||!ut(t))throw new TypeError("The parameter k must be an integer number")}else t=0;var e=t>0?t:0,A=t<0?-t:0,n=this._size[0],i=this._size[1],o=Math.min(n-A,i-e),a=[],s=[],g=[];g[0]=0;for(var c=e;c<i&&a.length<o;c++)for(var I=this._ptr[c],u=this._ptr[c+1],l=I;l<u;l++){var C=this._index[l];if(C===c-e+A){a.push(this._values[l]),s[a.length-1]=C-A;break}}return g.push(a.length),new r({values:a,index:s,ptr:g,size:[o,1]})},r.fromJSON=function(t){return new r(t)},r.diagonal=function(t,n,i,o,a){if(!m(t))throw new TypeError("Array expected, size parameter");if(2!==t.length)throw new Error("Only two dimensions matrix are supported");if(t=t.map((function(t){if(Q(t)&&(t=t.toNumber()),!d(t)||!ut(t)||t<1)throw new Error("Size values must be positive integers");return t})),i){if(Q(i)&&(i=i.toNumber()),!d(i)||!ut(i))throw new TypeError("The parameter k must be an integer number")}else i=0;var s=A,g=0;v(a)&&(s=e.find(A,[a,a])||A,g=e.convert(0,a));var c,I=i>0?i:0,u=i<0?-i:0,l=t[0],C=t[1],h=Math.min(l-u,C-I);if(m(n)){if(n.length!==h)throw new Error("Invalid value array length");c=function(t){return n[t]}}else if(b(n)){var B=n.size();if(1!==B.length||B[0]!==h)throw new Error("Invalid matrix length");c=function(t){return n.get([t])}}else c=function(){return n};for(var f=[],E=[],p=[],y=0;y<C;y++){p.push(f.length);var F=y-I;if(F>=0&&F<h){var w=c(F);s(w,g)||(E.push(F+u),f.push(w))}}return p.push(f.length),new r({values:f,index:E,ptr:p,size:[l,C]})},r.prototype.swapRows=function(t,e){if(!d(t)||!ut(t)||!d(e)||!ut(e))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return Jt(t,this._size[0]),Jt(e,this._size[0]),r._swapRows(t,e,this._size[1],this._values,this._index,this._ptr),this},r._forEachRow=function(t,e,A,n,r){for(var i=n[t],o=n[t+1],a=i;a<o;a++)r(A[a],e[a])},r._swapRows=function(t,e,A,n,r,i){for(var o=0;o<A;o++){var a=i[o],g=i[o+1],c=s(t,a,g,r),I=s(e,a,g,r);if(c<g&&I<g&&r[c]===t&&r[I]===e){if(n){var u=n[c];n[c]=n[I],n[I]=u}}else if(c<g&&r[c]===t&&(I>=g||r[I]!==e)){var l=n?n[c]:void 0;r.splice(I,0,e),n&&n.splice(I,0,l),r.splice(I<=c?c+1:c,1),n&&n.splice(I<=c?c+1:c,1)}else if(I<g&&r[I]===e&&(c>=g||r[c]!==t)){var C=n?n[I]:void 0;r.splice(c,0,t),n&&n.splice(c,0,C),r.splice(c<=I?I+1:I,1),n&&n.splice(c<=I?I+1:I,1)}}},r}),{isClass:!0}),MA=Kt("matrix",["typed","Matrix","DenseMatrix","SparseMatrix"],(function(t){var e=t.typed,A=(t.Matrix,t.DenseMatrix),n=t.SparseMatrix;return e("matrix",{"":function(){return r([])},string:function(t){return r([],t)},"string, string":function(t,e){return r([],t,e)},Array:function(t){return r(t)},Matrix:function(t){return r(t,t.storage())},"Array | Matrix, string":r,"Array | Matrix, string, string":r});function r(t,e,r){if("dense"===e||"default"===e||void 0===e)return new A(t,r);if("sparse"===e)return new n(t,r);throw new TypeError("Unknown matrix type "+JSON.stringify(e)+".")}})),LA=Kt("algorithm01",["typed"],(function(t){var e=t.typed;return function(t,A,n,r){var i=t._data,o=t._size,a=t._datatype,s=A._values,g=A._index,c=A._ptr,I=A._size,u=A._datatype;if(o.length!==I.length)throw new Ot(o.length,I.length);if(o[0]!==I[0]||o[1]!==I[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+I+")");if(!s)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var l,C,h=o[0],B=o[1],f="string"===typeof a&&a===u?a:void 0,d=f?e.find(n,[f,f]):n,Q=[];for(l=0;l<h;l++)Q[l]=[];var E=[],p=[];for(C=0;C<B;C++){for(var y=C+1,v=c[C],m=c[C+1],b=v;b<m;b++)E[l=g[b]]=r?d(s[b],i[l][C]):d(i[l][C],s[b]),p[l]=y;for(l=0;l<h;l++)p[l]===y?Q[l][C]=E[l]:Q[l][C]=i[l][C]}return t.createDenseMatrix({data:Q,size:[h,B],datatype:f})}})),_A=Kt("algorithm10",["typed","DenseMatrix"],(function(t){var e=t.typed,A=t.DenseMatrix;return function(t,n,r,i){var o=t._values,a=t._index,s=t._ptr,g=t._size,c=t._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var I,u=g[0],l=g[1],C=r;"string"===typeof c&&(I=c,n=e.convert(n,I),C=e.find(r,[I,I]));for(var h=[],B=[],f=[],d=0;d<l;d++){for(var Q=d+1,E=s[d],p=s[d+1],y=E;y<p;y++){var v=a[y];B[v]=o[y],f[v]=Q}for(var m=0;m<u;m++)0===d&&(h[m]=[]),f[m]===Q?h[m][d]=i?C(n,B[m]):C(B[m],n):h[m][d]=n}return new A({data:h,size:[u,l],datatype:I})}})),JA=Kt("algorithm13",["typed"],(function(t){var e=t.typed;return function(t,A,n){var r,i=t._data,o=t._size,a=t._datatype,s=A._data,g=A._size,c=A._datatype,I=[];if(o.length!==g.length)throw new Ot(o.length,g.length);for(var u=0;u<o.length;u++){if(o[u]!==g[u])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+g+")");I[u]=o[u]}var l=n;"string"===typeof a&&a===c&&(r=a,l=e.find(n,[r,r]));var C=I.length>0?function t(e,A,n,r,i,o){var a=[];if(A===n.length-1)for(var s=0;s<r;s++)a[s]=e(i[s],o[s]);else for(var g=0;g<r;g++)a[g]=t(e,A+1,n,n[A+1],i[g],o[g]);return a}(l,0,I,I[0],i,s):[];return t.createDenseMatrix({data:C,size:I,datatype:r})}})),TA=Kt("algorithm14",["typed"],(function(t){var e=t.typed;return function(t,A,n,r){var i,o=t._data,a=t._size,s=t._datatype,g=n;"string"===typeof s&&(i=s,A=e.convert(A,i),g=e.find(n,[i,i]));var c=a.length>0?function t(e,A,n,r,i,o,a){var s=[];if(A===n.length-1)for(var g=0;g<r;g++)s[g]=a?e(o,i[g]):e(i[g],o);else for(var c=0;c<r;c++)s[c]=t(e,A+1,n,n[A+1],i[c],o,a);return s}(g,0,a,a[0],o,A,r):[];return t.createDenseMatrix({data:c,size:nt(a),datatype:i})}})),jA=Kt("algorithm03",["typed"],(function(t){var e=t.typed;return function(t,A,n,r){var i=t._data,o=t._size,a=t._datatype,s=A._values,g=A._index,c=A._ptr,I=A._size,u=A._datatype;if(o.length!==I.length)throw new Ot(o.length,I.length);if(o[0]!==I[0]||o[1]!==I[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+I+")");if(!s)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var l,C=o[0],h=o[1],B=0,f=n;"string"===typeof a&&a===u&&(l=a,B=e.convert(0,l),f=e.find(n,[l,l]));for(var d=[],Q=0;Q<C;Q++)d[Q]=[];for(var E=[],p=[],y=0;y<h;y++){for(var v=y+1,m=c[y],b=c[y+1],F=m;F<b;F++){var w=g[F];E[w]=r?f(s[F],i[w][y]):f(i[w][y],s[F]),p[w]=v}for(var S=0;S<C;S++)p[S]===v?d[S][y]=E[S]:d[S][y]=r?f(B,i[S][y]):f(i[S][y],B)}return t.createDenseMatrix({data:d,size:[C,h],datatype:l})}})),HA=Kt("algorithm05",["typed","equalScalar"],(function(t){var e=t.typed,A=t.equalScalar;return function(t,n,r){var i=t._values,o=t._index,a=t._ptr,s=t._size,g=t._datatype,c=n._values,I=n._index,u=n._ptr,l=n._size,C=n._datatype;if(s.length!==l.length)throw new Ot(s.length,l.length);if(s[0]!==l[0]||s[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+l+")");var h,B=s[0],f=s[1],d=A,Q=0,E=r;"string"===typeof g&&g===C&&(h=g,d=e.find(A,[h,h]),Q=e.convert(0,h),E=e.find(r,[h,h]));var p,y,v,m,b=i&&c?[]:void 0,F=[],w=[],S=b?[]:void 0,D=b?[]:void 0,R=[],U=[];for(y=0;y<f;y++){w[y]=F.length;var G=y+1;for(v=a[y],m=a[y+1];v<m;v++)p=o[v],F.push(p),R[p]=G,S&&(S[p]=i[v]);for(v=u[y],m=u[y+1];v<m;v++)R[p=I[v]]!==G&&F.push(p),U[p]=G,D&&(D[p]=c[v]);if(b)for(v=w[y];v<F.length;){var N=R[p=F[v]],k=U[p];if(N===G||k===G){var x=E(N===G?S[p]:Q,k===G?D[p]:Q);d(x,Q)?F.splice(v,1):(b.push(x),v++)}}}return w[f]=F.length,t.createSparseMatrix({values:b,index:F,ptr:w,size:[B,f],datatype:h})}})),YA=Kt("algorithm11",["typed","equalScalar"],(function(t){var e=t.typed,A=t.equalScalar;return function(t,n,r,i){var o=t._values,a=t._index,s=t._ptr,g=t._size,c=t._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var I,u=g[0],l=g[1],C=A,h=0,B=r;"string"===typeof c&&(I=c,C=e.find(A,[I,I]),h=e.convert(0,I),n=e.convert(n,I),B=e.find(r,[I,I]));for(var f=[],d=[],Q=[],E=0;E<l;E++){Q[E]=d.length;for(var p=s[E],y=s[E+1],v=p;v<y;v++){var m=a[v],b=i?B(n,o[v]):B(o[v],n);C(b,h)||(d.push(m),f.push(b))}}return Q[l]=d.length,t.createSparseMatrix({values:f,index:d,ptr:Q,size:[u,l],datatype:I})}})),VA=Kt("algorithm12",["typed","DenseMatrix"],(function(t){var e=t.typed,A=t.DenseMatrix;return function(t,n,r,i){var o=t._values,a=t._index,s=t._ptr,g=t._size,c=t._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var I,u=g[0],l=g[1],C=r;"string"===typeof c&&(I=c,n=e.convert(n,I),C=e.find(r,[I,I]));for(var h=[],B=[],f=[],d=0;d<l;d++){for(var Q=d+1,E=s[d],p=s[d+1],y=E;y<p;y++){var v=a[y];B[v]=o[y],f[v]=Q}for(var m=0;m<u;m++)0===d&&(h[m]=[]),f[m]===Q?h[m][d]=i?C(n,B[m]):C(B[m],n):h[m][d]=i?C(n,0):C(0,n)}return new A({data:h,size:[u,l],datatype:I})}})),ZA=Kt("algorithm07",["typed","DenseMatrix"],(function(t){var e=t.typed,A=t.DenseMatrix;return function(t,r,i){var o=t._size,a=t._datatype,s=r._size,g=r._datatype;if(o.length!==s.length)throw new Ot(o.length,s.length);if(o[0]!==s[0]||o[1]!==s[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+s+")");var c,I,u,l=o[0],C=o[1],h=0,B=i;"string"===typeof a&&a===g&&(c=a,h=e.convert(0,c),B=e.find(i,[c,c]));var f=[];for(I=0;I<l;I++)f[I]=[];var d=[],Q=[],E=[],p=[];for(u=0;u<C;u++){var y=u+1;for(n(t,u,E,d,y),n(r,u,p,Q,y),I=0;I<l;I++){var v=E[I]===y?d[I]:h,m=p[I]===y?Q[I]:h;f[I][u]=B(v,m)}}return new A({data:f,size:[l,C],datatype:c})};function n(t,e,A,n,r){for(var i=t._values,o=t._index,a=t._ptr,s=a[e],g=a[e+1];s<g;s++){var c=o[s];A[c]=r,n[c]=i[s]}}}));var WA=Kt("identity",["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],(function(t){var e=t.typed,A=t.config,n=t.matrix,r=t.BigNumber,i=t.DenseMatrix,o=t.SparseMatrix;return e("identity",{"":function(){return"Matrix"===A.matrix?n([]):[]},string:function(t){return n(t)},"number | BigNumber":function(t){return s(t,t,"Matrix"===A.matrix?"dense":void 0)},"number | BigNumber, string":function(t,e){return s(t,t,e)},"number | BigNumber, number | BigNumber":function(t,e){return s(t,e,"Matrix"===A.matrix?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(t,e,A){return s(t,e,A)},Array:function(t){return a(t)},"Array, string":function(t,e){return a(t,e)},Matrix:function(t){return a(t.valueOf(),t.storage())},"Matrix, string":function(t,e){return a(t.valueOf(),e)}});function a(t,e){switch(t.length){case 0:return e?n(e):[];case 1:return s(t[0],t[0],e);case 2:return s(t[0],t[1],e);default:throw new Error("Vector containing two values expected")}}function s(t,e,A){var n=Q(t)||Q(e)?r:null;if(Q(t)&&(t=t.toNumber()),Q(e)&&(e=e.toNumber()),!ut(t)||t<1)throw new Error("Parameters in function identity must be positive integers");if(!ut(e)||e<1)throw new Error("Parameters in function identity must be positive integers");var a=n?new r(1):1,s=n?new n(0):0,g=[t,e];if(A){if("sparse"===A)return o.diagonal(g,a,0,s);if("dense"===A)return i.diagonal(g,a,0,s);throw new TypeError('Unknown matrix type "'.concat(A,'"'))}for(var c=Tt([],g,s),I=t<e?t:e,u=0;u<I;u++)c[u][u]=a;return c}}));function KA(){throw new Error('No "bignumber" implementation available')}function PA(){throw new Error('No "fraction" implementation available')}function qA(){throw new Error('No "matrix" implementation available')}var XA=Kt("size",["typed","config","?matrix"],(function(t){var e=t.typed,A=t.config,n=t.matrix;return e("size",{Matrix:function(t){return t.create(t.size())},Array:Lt,string:function(t){return"Array"===A.matrix?[t.length]:n([t.length])},"number | Complex | BigNumber | Unit | boolean | null":function(t){return"Array"===A.matrix?[]:n?n([]):qA()}})}));var zA=Kt("zeros",["typed","config","matrix","BigNumber"],(function(t){var e=t.typed,A=t.config,n=t.matrix,r=t.BigNumber;return e("zeros",{"":function(){return"Array"===A.matrix?i([]):i([],"default")},"...number | BigNumber | string":function(t){if("string"===typeof t[t.length-1]){var e=t.pop();return i(t,e)}return"Array"===A.matrix?i(t):i(t,"default")},Array:i,Matrix:function(t){var e=t.storage();return i(t.valueOf(),e)},"Array | Matrix, string":function(t,e){return i(t.valueOf(),e)}});function i(t,e){var A=function(t){var e=!1;return t.forEach((function(t,A,n){Q(t)&&(e=!0,n[A]=t.toNumber())})),e}(t)?new r(0):0;if(function(t){t.forEach((function(t){if("number"!==typeof t||!ut(t)||t<0)throw new Error("Parameters in function zeros must be positive integers")}))}(t),e){var i=n(e);return t.length>0?i.resize(t,A):i}var o=[];return t.length>0?Tt(o,t,A):o}}));Kt("hex",["typed","format"],(function(t){var e=t.typed,A=t.format;return e("hex",{"number | BigNumber":function(t){return A(t,{notation:"hex"})},"number | BigNumber, number":function(t,e){return A(t,{notation:"hex",wordSize:e})}})}));function $A(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function tn(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?$A(Object(A),!0).forEach((function(e){en(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):$A(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function en(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var An="Number of decimals in function round must be an integer",nn=Kt("round",["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],(function(t){var e=t.typed,A=t.matrix,n=t.equalScalar,r=t.zeros,i=t.BigNumber,o=t.DenseMatrix,a=YA({typed:e,equalScalar:n}),s=VA({typed:e,DenseMatrix:o}),g=TA({typed:e});return e("round",tn(tn({},rn),{},{Complex:function(t){return t.round()},"Complex, number":function(t,e){if(e%1)throw new TypeError(An);return t.round(e)},"Complex, BigNumber":function(t,e){if(!e.isInteger())throw new TypeError(An);var A=e.toNumber();return t.round(A)},"number, BigNumber":function(t,e){if(!e.isInteger())throw new TypeError(An);return new i(t).toDecimalPlaces(e.toNumber())},BigNumber:function(t){return t.toDecimalPlaces(0)},"BigNumber, BigNumber":function(t,e){if(!e.isInteger())throw new TypeError(An);return t.toDecimalPlaces(e.toNumber())},Fraction:function(t){return t.round()},"Fraction, number":function(t,e){if(e%1)throw new TypeError(An);return t.round(e)},"Array | Matrix":function(t){return Qe(t,this,!0)},"SparseMatrix, number | BigNumber":function(t,e){return a(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return g(t,e,this,!1)},"number | Complex | BigNumber, SparseMatrix":function(t,e){return n(t,0)?r(e.size(),e.storage()):s(e,t,this,!0)},"number | Complex | BigNumber, DenseMatrix":function(t,e){return n(t,0)?r(e.size(),e.storage()):g(e,t,this,!0)},"Array, number | BigNumber":function(t,e){return g(A(t),e,this,!1).valueOf()},"number | Complex | BigNumber, Array":function(t,e){return g(A(e),t,this,!0).valueOf()}}))})),rn={number:Xe,"number, number":function(t,e){if(!ut(e))throw new TypeError(An);if(e<0||e>15)throw new Error("Number of decimals in function round must be in te range of 0-15");return Xe(t,e)}},on=Kt("compare",["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix"],(function(t){var e=t.typed,A=t.config,n=t.equalScalar,r=t.matrix,i=t.BigNumber,o=t.Fraction,a=t.DenseMatrix,s=jA({typed:e}),g=HA({typed:e,equalScalar:n}),c=VA({typed:e,DenseMatrix:a}),I=JA({typed:e}),u=TA({typed:e});return e("compare",{"boolean, boolean":function(t,e){return t===e?0:t>e?1:-1},"number, number":function(t,e){return Ft(t,e,A.epsilon)?0:t>e?1:-1},"BigNumber, BigNumber":function(t,e){return Fe(t,e,A.epsilon)?new i(0):new i(t.cmp(e))},"Fraction, Fraction":function(t,e){return new o(t.compare(e))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)},"SparseMatrix, SparseMatrix":function(t,e){return g(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return s(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return s(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return I(t,e,this)},"Array, Array":function(t,e){return this(r(t),r(e)).valueOf()},"Array, Matrix":function(t,e){return this(r(t),e)},"Matrix, Array":function(t,e){return this(t,r(e))},"SparseMatrix, any":function(t,e){return c(t,e,this,!1)},"DenseMatrix, any":function(t,e){return u(t,e,this,!1)},"any, SparseMatrix":function(t,e){return c(e,t,this,!0)},"any, DenseMatrix":function(t,e){return u(e,t,this,!0)},"Array, any":function(t,e){return u(r(t),e,this,!1).valueOf()},"any, Array":function(t,e){return u(r(e),t,this,!0).valueOf()}})})),an=Kt("smaller",["typed","config","matrix","DenseMatrix"],(function(t){var e=t.typed,A=t.config,n=t.matrix,r=t.DenseMatrix,i=jA({typed:e}),o=ZA({typed:e,DenseMatrix:r}),a=VA({typed:e,DenseMatrix:r}),s=JA({typed:e}),g=TA({typed:e});return e("smaller",{"boolean, boolean":function(t,e){return t<e},"number, number":function(t,e){return t<e&&!Ft(t,e,A.epsilon)},"BigNumber, BigNumber":function(t,e){return t.lt(e)&&!Fe(t,e,A.epsilon)},"Fraction, Fraction":function(t,e){return-1===t.compare(e)},"Complex, Complex":function(t,e){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)},"SparseMatrix, SparseMatrix":function(t,e){return o(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return i(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return i(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return s(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return a(t,e,this,!1)},"DenseMatrix, any":function(t,e){return g(t,e,this,!1)},"any, SparseMatrix":function(t,e){return a(e,t,this,!0)},"any, DenseMatrix":function(t,e){return g(e,t,this,!0)},"Array, any":function(t,e){return g(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return g(n(e),t,this,!0).valueOf()}})})),sn=Kt("larger",["typed","config","matrix","DenseMatrix"],(function(t){var e=t.typed,A=t.config,n=t.matrix,r=t.DenseMatrix,i=jA({typed:e}),o=ZA({typed:e,DenseMatrix:r}),a=VA({typed:e,DenseMatrix:r}),s=JA({typed:e}),g=TA({typed:e});return e("larger",{"boolean, boolean":function(t,e){return t>e},"number, number":function(t,e){return t>e&&!Ft(t,e,A.epsilon)},"BigNumber, BigNumber":function(t,e){return t.gt(e)&&!Fe(t,e,A.epsilon)},"Fraction, Fraction":function(t,e){return 1===t.compare(e)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return this(t.value,e.value)},"SparseMatrix, SparseMatrix":function(t,e){return o(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return i(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return i(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return s(t,e,this)},"Array, Array":function(t,e){return this(n(t),n(e)).valueOf()},"Array, Matrix":function(t,e){return this(n(t),e)},"Matrix, Array":function(t,e){return this(t,n(e))},"SparseMatrix, any":function(t,e){return a(t,e,this,!1)},"DenseMatrix, any":function(t,e){return g(t,e,this,!1)},"any, SparseMatrix":function(t,e){return a(e,t,this,!0)},"any, DenseMatrix":function(t,e){return g(e,t,this,!0)},"Array, any":function(t,e){return g(n(t),e,this,!1).valueOf()},"any, Array":function(t,e){return g(n(e),t,this,!0).valueOf()}})})),gn=(Kt("unequal",["typed","equalScalar"],(function(t){var e=t.typed,A=t.equalScalar;return e("unequal",{"any, any":function(t,e){return null===t?null!==e:null===e?null!==t:void 0===t?void 0!==e:void 0===e?void 0!==t:!A(t,e)}})})),Kt("FibonacciHeap",["smaller","larger"],(function(t){var e=t.smaller,A=t.larger,n=1/Math.log((1+Math.sqrt(5))/2);function r(){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}function i(t,e,A){e.left.right=e.right,e.right.left=e.left,A.degree--,A.child===e&&(A.child=e.right),0===A.degree&&(A.child=null),e.left=t,e.right=t.right,t.right=e,e.right.left=e,e.parent=null,e.mark=!1}r.prototype.type="FibonacciHeap",r.prototype.isFibonacciHeap=!0,r.prototype.insert=function(t,A){var n={key:t,value:A,degree:0};if(this._minimum){var r=this._minimum;n.left=r,n.right=r.right,r.right=n,n.right.left=n,e(t,r.key)&&(this._minimum=n)}else n.left=n,n.right=n,this._minimum=n;return this._size++,n},r.prototype.size=function(){return this._size},r.prototype.clear=function(){this._minimum=null,this._size=0},r.prototype.isEmpty=function(){return 0===this._size},r.prototype.extractMinimum=function(){var t=this._minimum;if(null===t)return t;for(var r=this._minimum,i=t.degree,a=t.child;i>0;){var s=a.right;a.left.right=a.right,a.right.left=a.left,a.left=r,a.right=r.right,r.right=a,a.right.left=a,a.parent=null,a=s,i--}return t.left.right=t.right,t.right.left=t.left,r=t===t.right?null:function(t,r){var i,a=Math.floor(Math.log(r)*n)+1,s=new Array(a),g=0,c=t;if(c)for(g++,c=c.right;c!==t;)g++,c=c.right;for(;g>0;){for(var I=c.degree,u=c.right;i=s[I];){if(A(c.key,i.key)){var l=i;i=c,c=l}o(i,c),s[I]=null,I++}s[I]=c,c=u,g--}t=null;for(var C=0;C<a;C++)(i=s[C])&&(t?(i.left.right=i.right,i.right.left=i.left,i.left=t,i.right=t.right,t.right=i,i.right.left=i,e(i.key,t.key)&&(t=i)):t=i);return t}(r=t.right,this._size),this._size--,this._minimum=r,t},r.prototype.remove=function(t){this._minimum=function(t,A,n){A.key=n;var r=A.parent;r&&e(A.key,r.key)&&(i(t,A,r),function t(e,A){var n=A.parent;if(!n)return;A.mark?(i(e,A,n),t(n)):A.mark=!0}(t,r));e(A.key,t.key)&&(t=A);return t}(this._minimum,t,-1),this.extractMinimum()};var o=function(t,e){t.left.right=t.right,t.right.left=t.left,t.parent=e,e.child?(t.left=e.child,t.right=e.child.right,e.child.right=t,t.right.left=t):(e.child=t,t.right=t,t.left=t),e.degree++,t.mark=!1};return r}),{isClass:!0})),cn=Kt("dot",["typed","addScalar","multiplyScalar","conj","size"],(function(t){var e=t.typed,A=t.addScalar,n=t.multiplyScalar,r=t.conj,i=t.size;return e("dot",{"Array | DenseMatrix, Array | DenseMatrix":function(t,i){var s=o(t,i),g=b(t)?t._data:t,c=b(t)?t._datatype:void 0,I=b(i)?i._data:i,u=b(i)?i._datatype:void 0,l=2===a(t).length,C=2===a(i).length,h=A,B=n;if(c&&u&&c===u&&"string"===typeof c){var f=c;h=e.find(A,[f,f]),B=e.find(n,[f,f])}if(!l&&!C){for(var d=B(r(g[0]),I[0]),Q=1;Q<s;Q++)d=h(d,B(r(g[Q]),I[Q]));return d}if(!l&&C){for(var E=B(r(g[0]),I[0][0]),p=1;p<s;p++)E=h(E,B(r(g[p]),I[p][0]));return E}if(l&&!C){for(var y=B(r(g[0][0]),I[0]),v=1;v<s;v++)y=h(y,B(r(g[v][0]),I[v]));return y}if(l&&C){for(var m=B(r(g[0][0]),I[0][0]),F=1;F<s;F++)m=h(m,B(r(g[F][0]),I[F][0]));return m}},"SparseMatrix, SparseMatrix":function(t,e){o(t,e);var r=t._index,i=t._values,a=e._index,s=e._values,g=0,c=A,I=n,u=0,l=0;for(;u<r.length&&l<a.length;){var C=r[u],h=a[l];C<h?u++:C>h?l++:C===h&&(g=c(g,I(i[u],s[l])),u++,l++)}return g}});function o(t,e){var A,n,r=a(t),i=a(e);if(1===r.length)A=r[0];else{if(2!==r.length||1!==r[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+r.join(", ")+")");A=r[0]}if(1===i.length)n=i[0];else{if(2!==i.length||1!==i[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+i.join(", ")+")");n=i[0]}if(A!==n)throw new RangeError("Vectors must have equal length ("+A+" != "+n+")");if(0===A)throw new RangeError("Cannot calculate the dot product of empty vectors");return A}function a(t){return b(t)?t.size():i(t)}})),In=Kt("abs",["typed"],(function(t){return(0,t.typed)("abs",{number:Re,Complex:function(t){return t.abs()},BigNumber:function(t){return t.abs()},Fraction:function(t){return t.abs()},"Array | Matrix":function(t){return Qe(t,this,!0)},Unit:function(t){return t.abs()}})})),un=Kt("floor",["typed","config","round","matrix","equalScalar"],(function(t){var e=t.typed,A=t.config,n=t.round,r=t.matrix,o=t.equalScalar,a=YA({typed:e,equalScalar:o}),s=TA({typed:e});return e("floor",{number:function(t){return Ft(t,n(t),A.epsilon)?n(t):Math.floor(t)},"number, number":function(t,e){if(Ft(t,n(t,e),A.epsilon))return n(t,e);var r="".concat(t,"e").split("e"),o=Object(i.a)(r,2),a=o[0],s=o[1],g=Math.floor(Number("".concat(a,"e").concat(Number(s)+e))),c="".concat(g,"e").split("e"),I=Object(i.a)(c,2);return a=I[0],s=I[1],Number("".concat(a,"e").concat(Number(s)-e))},Complex:function(t){return t.floor()},"Complex, number":function(t,e){return t.floor(e)},BigNumber:function(t){return Fe(t,n(t),A.epsilon)?n(t):t.floor()},"BigNumber, BigNumber":function(t,e){return Fe(t,n(t,e),A.epsilon)?n(t,e):t.toDecimalPlaces(e.toNumber(),re.a.ROUND_FLOOR)},Fraction:function(t){return t.floor()},"Fraction, number":function(t,e){return t.floor(e)},"Array | Matrix":function(t){return Qe(t,this,!0)},"Array | Matrix, number":function(t,e){var A=this;return Qe(t,(function(t){return A(t,e)}),!0)},"SparseMatrix, number | BigNumber":function(t,e){return a(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return s(t,e,this,!1)},"number | Complex | BigNumber, Array":function(t,e){return s(r(e),t,this,!0).valueOf()}})})),ln=Kt("multiply",["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],(function(t){var e=t.typed,A=t.matrix,n=t.addScalar,r=t.multiplyScalar,i=t.equalScalar,o=t.dot,a=YA({typed:e,equalScalar:i}),s=TA({typed:e});function g(t,e){switch(t.length){case 1:switch(e.length){case 1:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+t[0]+") must match Matrix rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;case 2:switch(e.length){case 1:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+t[1]+") must match Vector length ("+e[0]+")");break;case 2:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+t[1]+") must match Matrix B rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+t.length+" dimensions)")}}function c(t,A){if("dense"!==A.storage())throw new Error("Support for SparseMatrix not implemented");return function(t,A){var i,o=t._data,a=t._size,s=t._datatype,g=A._data,c=A._size,I=A._datatype,u=a[0],l=c[1],C=n,h=r;s&&I&&s===I&&"string"===typeof s&&(i=s,C=e.find(n,[i,i]),h=e.find(r,[i,i]));for(var B=[],f=0;f<l;f++){for(var d=h(o[0],g[0][f]),Q=1;Q<u;Q++)d=C(d,h(o[Q],g[Q][f]));B[f]=d}return t.createDenseMatrix({data:B,size:[l],datatype:i})}(t,A)}var I=e("_multiplyMatrixVector",{"DenseMatrix, any":function(t,A){var i,o=t._data,a=t._size,s=t._datatype,g=A._data,c=A._datatype,I=a[0],u=a[1],l=n,C=r;s&&c&&s===c&&"string"===typeof s&&(i=s,l=e.find(n,[i,i]),C=e.find(r,[i,i]));for(var h=[],B=0;B<I;B++){for(var f=o[B],d=C(f[0],g[0]),Q=1;Q<u;Q++)d=l(d,C(f[Q],g[Q]));h[B]=d}return t.createDenseMatrix({data:h,size:[I],datatype:i})},"SparseMatrix, any":function(t,A){var o=t._values,a=t._index,s=t._ptr,g=t._datatype;if(!o)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var c,I=A._data,u=A._datatype,l=t._size[0],C=A._size[0],h=[],B=[],f=[],d=n,Q=r,E=i,p=0;g&&u&&g===u&&"string"===typeof g&&(c=g,d=e.find(n,[c,c]),Q=e.find(r,[c,c]),E=e.find(i,[c,c]),p=e.convert(0,c));var y=[],v=[];f[0]=0;for(var m=0;m<C;m++){var b=I[m];if(!E(b,p))for(var F=s[m],w=s[m+1],S=F;S<w;S++){var D=a[S];v[D]?y[D]=d(y[D],Q(b,o[S])):(v[D]=!0,B.push(D),y[D]=Q(b,o[S]))}}for(var R=B.length,U=0;U<R;U++){var G=B[U];h[U]=y[G]}return f[1]=B.length,t.createSparseMatrix({values:h,index:B,ptr:f,size:[l,1],datatype:c})}}),u=e("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":function(t,A){var i,o=t._data,a=t._size,s=t._datatype,g=A._data,c=A._size,I=A._datatype,u=a[0],l=a[1],C=c[1],h=n,B=r;s&&I&&s===I&&"string"===typeof s&&(i=s,h=e.find(n,[i,i]),B=e.find(r,[i,i]));for(var f=[],d=0;d<u;d++){var Q=o[d];f[d]=[];for(var E=0;E<C;E++){for(var p=B(Q[0],g[0][E]),y=1;y<l;y++)p=h(p,B(Q[y],g[y][E]));f[d][E]=p}}return t.createDenseMatrix({data:f,size:[u,C],datatype:i})},"DenseMatrix, SparseMatrix":function(t,A){var o=t._data,a=t._size,s=t._datatype,g=A._values,c=A._index,I=A._ptr,u=A._size,l=A._datatype;if(!g)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var C,h=a[0],B=u[1],f=n,d=r,Q=i,E=0;s&&l&&s===l&&"string"===typeof s&&(C=s,f=e.find(n,[C,C]),d=e.find(r,[C,C]),Q=e.find(i,[C,C]),E=e.convert(0,C));for(var p=[],y=[],v=[],m=A.createSparseMatrix({values:p,index:y,ptr:v,size:[h,B],datatype:C}),b=0;b<B;b++){v[b]=y.length;var F=I[b],w=I[b+1];if(w>F)for(var S=0,D=0;D<h;D++){for(var R=D+1,U=void 0,G=F;G<w;G++){var N=c[G];S!==R?(U=d(o[D][N],g[G]),S=R):U=f(U,d(o[D][N],g[G]))}S!==R||Q(U,E)||(y.push(D),p.push(U))}}return v[B]=y.length,m},"SparseMatrix, DenseMatrix":function(t,A){var o=t._values,a=t._index,s=t._ptr,g=t._datatype;if(!o)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var c,I=A._data,u=A._datatype,l=t._size[0],C=A._size[0],h=A._size[1],B=n,f=r,d=i,Q=0;g&&u&&g===u&&"string"===typeof g&&(c=g,B=e.find(n,[c,c]),f=e.find(r,[c,c]),d=e.find(i,[c,c]),Q=e.convert(0,c));for(var E=[],p=[],y=[],v=t.createSparseMatrix({values:E,index:p,ptr:y,size:[l,h],datatype:c}),m=[],b=[],F=0;F<h;F++){y[F]=p.length;for(var w=F+1,S=0;S<C;S++){var D=I[S][F];if(!d(D,Q))for(var R=s[S],U=s[S+1],G=R;G<U;G++){var N=a[G];b[N]!==w?(b[N]=w,p.push(N),m[N]=f(D,o[G])):m[N]=B(m[N],f(D,o[G]))}}for(var k=y[F],x=p.length,O=k;O<x;O++){var M=p[O];E[O]=m[M]}}return y[h]=p.length,v},"SparseMatrix, SparseMatrix":function(t,A){var i,o=t._values,a=t._index,s=t._ptr,g=t._datatype,c=A._values,I=A._index,u=A._ptr,l=A._datatype,C=t._size[0],h=A._size[1],B=o&&c,f=n,d=r;g&&l&&g===l&&"string"===typeof g&&(i=g,f=e.find(n,[i,i]),d=e.find(r,[i,i]));for(var Q,E,p,y,v,m,b,F,w=B?[]:void 0,S=[],D=[],R=t.createSparseMatrix({values:w,index:S,ptr:D,size:[C,h],datatype:i}),U=B?[]:void 0,G=[],N=0;N<h;N++){D[N]=S.length;var k=N+1;for(v=u[N],m=u[N+1],y=v;y<m;y++)if(F=I[y],B)for(E=s[F],p=s[F+1],Q=E;Q<p;Q++)b=a[Q],G[b]!==k?(G[b]=k,S.push(b),U[b]=d(c[y],o[Q])):U[b]=f(U[b],d(c[y],o[Q]));else for(E=s[F],p=s[F+1],Q=E;Q<p;Q++)b=a[Q],G[b]!==k&&(G[b]=k,S.push(b));if(B)for(var x=D[N],O=S.length,M=x;M<O;M++){var L=S[M];w[M]=U[L]}}return D[h]=S.length,R}});return e("multiply",it({"Array, Array":function(t,e){g(Lt(t),Lt(e));var n=this(A(t),A(e));return b(n)?n.valueOf():n},"Matrix, Matrix":function(t,e){var A=t.size(),n=e.size();return g(A,n),1===A.length?1===n.length?function(t,e,A){if(0===A)throw new Error("Cannot multiply two empty vectors");return o(t,e)}(t,e,A[0]):c(t,e):1===n.length?I(t,e):u(t,e)},"Matrix, Array":function(t,e){return this(t,A(e))},"Array, Matrix":function(t,e){return this(A(t,e.storage()),e)},"SparseMatrix, any":function(t,e){return a(t,e,r,!1)},"DenseMatrix, any":function(t,e){return s(t,e,r,!1)},"any, SparseMatrix":function(t,e){return a(e,t,r,!0)},"any, DenseMatrix":function(t,e){return s(e,t,r,!0)},"Array, any":function(t,e){return s(A(t),e,r,!1).valueOf()},"any, Array":function(t,e){return s(A(e),t,r,!0).valueOf()},"any, any":r,"any, any, ...any":function(t,e,A){for(var n=this(t,e),r=0;r<A.length;r++)n=this(n,A[r]);return n}},r.signatures))}));function Cn(t,e,A,n){if(!(this instanceof Cn))throw new SyntaxError("Constructor must be called with the new operator");this.fn=t,this.count=e,this.min=A,this.max=n,this.message="Wrong number of arguments in function "+t+" ("+e+" provided, "+A+(void 0!==n&&null!==n?"-"+n:"")+" expected)",this.stack=(new Error).stack}Cn.prototype=new Error,Cn.prototype.constructor=Error,Cn.prototype.name="ArgumentsError",Cn.prototype.isArgumentsError=!0;var hn=Kt("pow",["typed","config","identity","multiply","matrix","fraction","number","Complex"],(function(t){var e=t.typed,A=t.config,n=t.identity,r=t.multiply,i=t.matrix,o=t.number,a=t.fraction,s=t.Complex;return e("pow",{"number, number":g,"Complex, Complex":function(t,e){return t.pow(e)},"BigNumber, BigNumber":function(t,e){return e.isInteger()||t>=0||A.predictable?t.pow(e):new s(t.toNumber(),0).pow(e.toNumber(),0)},"Fraction, Fraction":function(t,e){if(1!==e.d){if(A.predictable)throw new Error("Function pow does not support non-integer exponents for fractions.");return g(t.valueOf(),e.valueOf())}return t.pow(e)},"Array, number":c,"Array, BigNumber":function(t,e){return c(t,e.toNumber())},"Matrix, number":I,"Matrix, BigNumber":function(t,e){return I(t,e.toNumber())},"Unit, number | BigNumber":function(t,e){return t.pow(e)}});function g(t,e){if(A.predictable&&!ut(e)&&t<0)try{var n=a(e),r=o(n);if((e===r||Math.abs((e-r)/e)<1e-14)&&n.d%2===1)return(n.n%2===0?1:-1)*Math.pow(-t,e)}catch(i){}return A.predictable&&(t<-1&&e===1/0||t>-1&&t<0&&e===-1/0)?NaN:ut(e)||t>=0||A.predictable?qe(t,e):t*t<1&&e===1/0||t*t>1&&e===-1/0?0:new s(t,0).pow(e,0)}function c(t,e){if(!ut(e)||e<0)throw new TypeError("For A^b, b must be a positive integer (value is "+e+")");var A=Lt(t);if(2!==A.length)throw new Error("For A^b, A must be 2 dimensional (A has "+A.length+" dimensions)");if(A[0]!==A[1])throw new Error("For A^b, A must be square (size is "+A[0]+"x"+A[1]+")");for(var i=n(A[0]).valueOf(),o=t;e>=1;)1===(1&e)&&(i=r(o,i)),e>>=1,o=r(o,o);return i}function I(t,e){return i(c(t.valueOf(),e))}}));A(442);function Bn(t){var e;if(ut(t))return t<=0?isFinite(t)?1/0:NaN:t>171?1/0:SA(1,t-1);if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*Bn(1-t));if(t>=171.35)return 1/0;if(t>85){var A=t*t,n=A*t,r=n*t,i=r*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*A)-139/(51840*n)-571/(2488320*r)+163879/(209018880*i)+5246819/(75246796800*i*t))}--t,e=dn[0];for(var o=1;o<dn.length;++o)e+=dn[o]/(t+o);var a=t+fn+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,t+.5)*Math.exp(-a)*e}Bn.signature="number";var fn=4.7421875,dn=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],Qn=Kt("bignumber",["typed","BigNumber"],(function(t){var e=t.typed,A=t.BigNumber;return e("bignumber",{"":function(){return new A(0)},number:function(t){return new A(t+"")},string:function(t){var e=t.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(e){var n=e[2],r=A(e[1]),i=new A(2).pow(Number(n));if(r.gt(i.sub(1)))throw new SyntaxError('String "'.concat(t,'" is out of range'));var o=new A(2).pow(Number(n)-1);return r.gte(o)?r.sub(i):r}return new A(t)},BigNumber:function(t){return t},Fraction:function(t){return new A(t.n).div(t.d).times(t.s)},null:function(t){return new A(0)},"Array | Matrix":function(t){return Qe(t,this)}})})),En=Kt("numeric",["number","?bignumber","?fraction"],(function(t){var e=t.number,A=t.bignumber,n=t.fraction,r={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:function(t){return e(t)},BigNumber:A?function(t){return A(t)}:KA,Fraction:n?function(t){return n(t)}:PA};return function(t,e){var A=At(t);if(!(A in r))throw new TypeError("Cannot convert "+t+' of type "'+A+'"; valid input types are '+Object.keys(r).join(", "));if(!(e in i))throw new TypeError("Cannot convert "+t+' to type "'+e+'"; valid output types are '+Object.keys(i).join(", "));return e===A?t:i[e](t)}}));var pn=Kt("ceil",["typed","config","round","matrix","equalScalar"],(function(t){var e=t.typed,A=t.config,n=t.round,r=t.matrix,o=t.equalScalar,a=YA({typed:e,equalScalar:o}),s=TA({typed:e});return e("ceil",{number:function(t){return Ft(t,n(t),A.epsilon)?n(t):Oe(t)},"number, number":function(t,e){if(Ft(t,n(t,e),A.epsilon))return n(t,e);var r="".concat(t,"e").split("e"),o=Object(i.a)(r,2),a=o[0],s=o[1],g=Math.ceil(Number("".concat(a,"e").concat(Number(s)+e))),c="".concat(g,"e").split("e"),I=Object(i.a)(c,2);return a=I[0],s=I[1],Number("".concat(a,"e").concat(Number(s)-e))},Complex:function(t){return t.ceil()},"Complex, number":function(t,e){return t.ceil(e)},BigNumber:function(t){return Fe(t,n(t),A.epsilon)?n(t):t.ceil()},"BigNumber, BigNumber":function(t,e){return Fe(t,n(t,e),A.epsilon)?n(t,e):t.toDecimalPlaces(e.toNumber(),re.a.ROUND_CEIL)},Fraction:function(t){return t.ceil()},"Fraction, number":function(t,e){return t.ceil(e)},"Array | Matrix":function(t){return Qe(t,this,!0)},"Array | Matrix, number":function(t,e){var A=this;return Qe(t,(function(t){return A(t,e)}),!0)},"SparseMatrix, number | BigNumber":function(t,e){return a(t,e,this,!1)},"DenseMatrix, number | BigNumber":function(t,e){return s(t,e,this,!1)},"number | Complex | BigNumber, Array":function(t,e){return s(r(e),t,this,!0).valueOf()}})})),yn=Kt("subtract",["typed","matrix","equalScalar","addScalar","unaryMinus","DenseMatrix"],(function(t){var e=t.typed,A=t.matrix,n=t.equalScalar,r=t.addScalar,i=t.unaryMinus,o=t.DenseMatrix,a=LA({typed:e}),s=jA({typed:e}),g=HA({typed:e,equalScalar:n}),c=_A({typed:e,DenseMatrix:o}),I=JA({typed:e}),u=TA({typed:e});return e("subtract",{"number, number":function(t,e){return t-e},"Complex, Complex":function(t,e){return t.sub(e)},"BigNumber, BigNumber":function(t,e){return t.minus(e)},"Fraction, Fraction":function(t,e){return t.sub(e)},"Unit, Unit":function(t,e){if(null===t.value)throw new Error("Parameter x contains a unit with undefined value");if(null===e.value)throw new Error("Parameter y contains a unit with undefined value");if(!t.equalBase(e))throw new Error("Units do not match");var A=t.clone();return A.value=this(A.value,e.value),A.fixPrefix=!1,A},"SparseMatrix, SparseMatrix":function(t,e){return vn(t,e),g(t,e,this)},"SparseMatrix, DenseMatrix":function(t,e){return vn(t,e),s(e,t,this,!0)},"DenseMatrix, SparseMatrix":function(t,e){return vn(t,e),a(t,e,this,!1)},"DenseMatrix, DenseMatrix":function(t,e){return vn(t,e),I(t,e,this)},"Array, Array":function(t,e){return this(A(t),A(e)).valueOf()},"Array, Matrix":function(t,e){return this(A(t),e)},"Matrix, Array":function(t,e){return this(t,A(e))},"SparseMatrix, any":function(t,e){return c(t,i(e),r)},"DenseMatrix, any":function(t,e){return u(t,e,this)},"any, SparseMatrix":function(t,e){return c(e,t,this,!0)},"any, DenseMatrix":function(t,e){return u(e,t,this,!0)},"Array, any":function(t,e){return u(A(t),e,this,!1).valueOf()},"any, Array":function(t,e){return u(A(e),t,this,!0).valueOf()}})}));function vn(t,e){var A=t.size(),n=e.size();if(A.length!==n.length)throw new Ot(A.length,n.length)}var mn=Kt("equal",["typed","matrix","equalScalar","DenseMatrix"],(function(t){var e=t.typed,A=t.matrix,n=t.equalScalar,r=t.DenseMatrix,i=jA({typed:e}),o=ZA({typed:e,DenseMatrix:r}),a=VA({typed:e,DenseMatrix:r}),s=JA({typed:e}),g=TA({typed:e});return e("equal",{"any, any":function(t,e){return null===t?null===e:null===e?null===t:void 0===t?void 0===e:void 0===e?void 0===t:n(t,e)},"SparseMatrix, SparseMatrix":function(t,e){return o(t,e,n)},"SparseMatrix, DenseMatrix":function(t,e){return i(e,t,n,!0)},"DenseMatrix, SparseMatrix":function(t,e){return i(t,e,n,!1)},"DenseMatrix, DenseMatrix":function(t,e){return s(t,e,n)},"Array, Array":function(t,e){return this(A(t),A(e)).valueOf()},"Array, Matrix":function(t,e){return this(A(t),e)},"Matrix, Array":function(t,e){return this(t,A(e))},"SparseMatrix, any":function(t,e){return a(t,e,n,!1)},"DenseMatrix, any":function(t,e){return g(t,e,n,!1)},"any, SparseMatrix":function(t,e){return a(e,t,n,!0)},"any, DenseMatrix":function(t,e){return g(e,t,n,!0)},"Array, any":function(t,e){return g(A(t),e,n,!1).valueOf()},"any, Array":function(t,e){return g(A(e),t,n,!0).valueOf()}})})),bn=(Kt("equal",["typed","equalScalar"],(function(t){var e=t.typed,A=t.equalScalar;return e("equal",{"any, any":function(t,e){return null===t?null===e:null===e?null===t:void 0===t?void 0===e:void 0===e?void 0===t:A(t,e)}})})),Kt("fix",["typed","Complex","matrix","ceil","floor"],(function(t){var e=t.typed,A=t.Complex,n=t.matrix,r=t.ceil,i=t.floor,o=TA({typed:e});return e("fix",{number:function(t){return t>0?i(t):r(t)},"number, number | BigNumber":function(t,e){return t>0?i(t,e):r(t,e)},Complex:function(t){return new A(t.re>0?Math.floor(t.re):Math.ceil(t.re),t.im>0?Math.floor(t.im):Math.ceil(t.im))},"Complex, number | BigNumber":function(t,e){return new A(t.re>0?i(t.re,e):r(t.re,e),t.im>0?i(t.im,e):r(t.im,e))},BigNumber:function(t){return t.isNegative()?r(t):i(t)},"BigNumber, number | BigNumber":function(t,e){return t.isNegative()?r(t,e):i(t,e)},Fraction:function(t){return t.s<0?t.ceil():t.floor()},"Fraction, number | BigNumber":function(t,e){return t.s<0?t.ceil(e):t.floor(e)},"Array | Matrix":function(t){return Qe(t,this,!0)},"Array | Matrix, number | BigNumber":function(t,e){var A=this;return Qe(t,(function(t){return A(t,e)}),!0)},"number | Complex | BigNumber, Array":function(t,e){return o(n(e),t,this,!0).valueOf()}})}))),Fn=Kt("divideScalar",["typed","numeric"],(function(t){var e=t.typed,A=t.numeric;return e("divideScalar",{"number, number":function(t,e){return t/e},"Complex, Complex":function(t,e){return t.div(e)},"BigNumber, BigNumber":function(t,e){return t.div(e)},"Fraction, Fraction":function(t,e){return t.div(e)},"Unit, number | Fraction | BigNumber":function(t,e){var n=t.clone(),r=A(1,At(e));return n.value=this(null===n.value?n._normalize(r):n.value,e),n},"number | Fraction | BigNumber, Unit":function(t,e){var n=e.clone();n=n.pow(-1);var r=A(1,At(t));return n.value=this(t,null===e.value?e._normalize(r):e.value),n},"Unit, Unit":function(t,e){return t.divide(e)}})}));var wn=Kt("Spa",["addScalar","equalScalar","FibonacciHeap"],(function(t){var e=t.addScalar,A=t.equalScalar,n=t.FibonacciHeap;function r(){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return r.prototype.type="Spa",r.prototype.isSpa=!0,r.prototype.set=function(t,e){if(this._values[t])this._values[t].value=e;else{var A=this._heap.insert(t,e);this._values[t]=A}},r.prototype.get=function(t){var e=this._values[t];return e?e.value:0},r.prototype.accumulate=function(t,A){var n=this._values[t];n?n.value=e(n.value,A):(n=this._heap.insert(t,A),this._values[t]=n)},r.prototype.forEach=function(t,e,n){var r=this._heap,i=this._values,o=[],a=r.extractMinimum();for(a&&o.push(a);a&&a.key<=e;)a.key>=t&&(A(a.value,0)||n(a.key,a.value,this)),(a=r.extractMinimum())&&o.push(a);for(var s=0;s<o.length;s++){var g=o[s];i[(a=r.insert(g.key,g.value)).key]=a}},r.prototype.swap=function(t,e){var A=this._values[t],n=this._values[e];if(!A&&n)A=this._heap.insert(t,n.value),this._heap.remove(n),this._values[t]=A,this._values[e]=void 0;else if(A&&!n)n=this._heap.insert(e,A.value),this._heap.remove(A),this._values[e]=n,this._values[t]=void 0;else if(A&&n){var r=A.value;A.value=n.value,n.value=r}},r}),{isClass:!0}),Sn=Kt("lup",["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtract","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],(function(t){var e=t.typed,A=t.matrix,n=t.abs,r=t.addScalar,i=t.divideScalar,o=t.multiplyScalar,a=t.subtract,s=t.larger,g=t.equalScalar,c=t.unaryMinus,I=t.DenseMatrix,u=t.SparseMatrix,l=t.Spa;return e("lup",{DenseMatrix:function(t){return C(t)},SparseMatrix:function(t){return h(t)},Array:function(t){var e=C(A(t));return{L:e.L.valueOf(),U:e.U.valueOf(),p:e.p}}});function C(t){var e,A,c,u=t._size[0],l=t._size[1],C=Math.min(u,l),h=nt(t._data),B=[],f=[u,C],d=[],Q=[C,l],E=[];for(e=0;e<u;e++)E[e]=e;for(A=0;A<l;A++){if(A>0)for(e=0;e<u;e++){var p=Math.min(e,A),y=0;for(c=0;c<p;c++)y=r(y,o(h[e][c],h[c][A]));h[e][A]=a(h[e][A],y)}var v=A,m=0,b=0;for(e=A;e<u;e++){var F=h[e][A],w=n(F);s(w,m)&&(v=e,m=w,b=F)}if(A!==v&&(E[A]=[E[v],E[v]=E[A]][0],I._swapRows(A,v,h)),A<u)for(e=A+1;e<u;e++){var S=h[e][A];g(S,0)||(h[e][A]=i(h[e][A],b))}}for(A=0;A<l;A++)for(e=0;e<u;e++)0===A&&(e<l&&(d[e]=[]),B[e]=[]),e<A?(e<l&&(d[e][A]=h[e][A]),A<u&&(B[e][A]=0)):e!==A?(e<l&&(d[e][A]=0),A<u&&(B[e][A]=h[e][A])):(e<l&&(d[e][A]=h[e][A]),A<u&&(B[e][A]=1));var D=new I({data:B,size:f}),R=new I({data:d,size:Q}),U=[];for(e=0,C=E.length;e<C;e++)U[E[e]]=e;return{L:D,U:R,p:U,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}function h(t){var e,A,r,a=t._size[0],I=t._size[1],C=Math.min(a,I),h=t._values,B=t._index,f=t._ptr,d=[],Q=[],E=[],p=[a,C],y=[],v=[],m=[],b=[C,I],F=[],w=[];for(e=0;e<a;e++)F[e]=e,w[e]=e;var S=function(){var t=new l;A<a&&(E.push(d.length),d.push(1),Q.push(A)),m.push(y.length);var I=f[A],C=f[A+1];for(r=I;r<C;r++)e=B[r],t.set(F[e],h[r]);A>0&&t.forEach(0,A-1,(function(e,A){u._forEachRow(e,d,Q,E,(function(n,r){n>e&&t.accumulate(n,c(o(r,A)))}))}));var S=A,D=t.get(A),R=n(D);t.forEach(A+1,a-1,(function(t,e){var A=n(e);s(A,R)&&(S=t,R=A,D=e)})),A!==S&&(u._swapRows(A,S,p[1],d,Q,E),u._swapRows(A,S,b[1],y,v,m),t.swap(A,S),function(t,e){var A=w[t],n=w[e];F[A]=e,F[n]=t,w[t]=n,w[e]=A}(A,S)),t.forEach(0,a-1,(function(t,e){t<=A?(y.push(e),v.push(t)):(e=i(e,D),g(e,0)||(d.push(e),Q.push(t)))}))};for(A=0;A<I;A++)S();return m.push(y.length),E.push(d.length),{L:new u({values:d,index:Q,ptr:E,size:p}),U:new u({values:y,index:v,ptr:m,size:b}),p:F,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}}));var Dn=Kt("det",["typed","matrix","subtract","multiply","unaryMinus","lup"],(function(t){var e=t.typed,A=t.matrix,n=t.subtract,r=t.multiply,i=t.unaryMinus,o=t.lup;return e("det",{any:function(t){return nt(t)},"Array | Matrix":function(t){var e;switch((e=b(t)?t.size():Array.isArray(t)?(t=A(t)).size():[]).length){case 0:return nt(t);case 1:if(1===e[0])return nt(t.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+xt(e)+")");case 2:var a=e[0],s=e[1];if(a===s)return function(t,e,A){if(1===e)return nt(t[0][0]);if(2===e)return n(r(t[0][0],t[1][1]),r(t[1][0],t[0][1]));for(var a=o(t),s=a.U[0][0],g=1;g<e;g++)s=r(s,a.U[g][g]);for(var c=0,I=0,u=[];;){for(;u[I];)I++;if(I>=e)break;for(var l=I,C=0;!u[a.p[l]];)u[a.p[l]]=!0,l=a.p[l],C++;C%2===0&&c++}return c%2===0?s:i(s)}(t.clone().valueOf(),a);throw new RangeError("Matrix must be square (size: "+xt(e)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+xt(e)+")")}}})}));var Rn=Kt("inv",["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],(function(t){var e=t.typed,A=t.matrix,n=t.divideScalar,r=t.addScalar,i=t.multiply,o=t.unaryMinus,a=t.det,s=t.identity,g=t.abs;return e("inv",{"Array | Matrix":function(t){var e=b(t)?t.size():Lt(t);switch(e.length){case 1:if(1===e[0])return b(t)?A([n(1,t.valueOf()[0])]):[n(1,t[0])];throw new RangeError("Matrix must be square (size: "+xt(e)+")");case 2:var r=e[0],i=e[1];if(r===i)return b(t)?A(c(t.valueOf(),r,i),t.storage()):c(t,r,i);throw new RangeError("Matrix must be square (size: "+xt(e)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+xt(e)+")")}},any:function(t){return n(1,t)}});function c(t,e,A){var c,I,u,l,C;if(1===e){if(0===(l=t[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,l)]]}if(2===e){var h=a(t);if(0===h)throw Error("Cannot calculate inverse, determinant is zero");return[[n(t[1][1],h),n(o(t[0][1]),h)],[n(o(t[1][0]),h),n(t[0][0],h)]]}var B=t.concat();for(c=0;c<e;c++)B[c]=B[c].concat();for(var f=s(e).valueOf(),d=0;d<A;d++){var Q=g(B[d][d]),E=d;for(c=d+1;c<e;)g(B[c][d])>Q&&(Q=g(B[c][d]),E=c),c++;if(0===Q)throw Error("Cannot calculate inverse, determinant is zero");(c=E)!==d&&(C=B[d],B[d]=B[c],B[c]=C,C=f[d],f[d]=f[c],f[c]=C);var p=B[d],y=f[d];for(c=0;c<e;c++){var v=B[c],m=f[c];if(c!==d){if(0!==v[d]){for(u=n(o(v[d]),p[d]),I=d;I<A;I++)v[I]=r(v[I],i(u,p[I]));for(I=0;I<A;I++)m[I]=r(m[I],i(u,y[I]))}}else{for(u=p[d],I=d;I<A;I++)v[I]=n(v[I],u);for(I=0;I<A;I++)m[I]=n(m[I],u)}}}return f}})),Un=Kt("divide",["typed","matrix","multiply","equalScalar","divideScalar","inv"],(function(t){var e=t.typed,A=t.matrix,n=t.multiply,r=t.equalScalar,i=t.divideScalar,o=t.inv,a=YA({typed:e,equalScalar:r}),s=TA({typed:e});return e("divide",it({"Array | Matrix, Array | Matrix":function(t,e){return n(t,o(e))},"DenseMatrix, any":function(t,e){return s(t,e,i,!1)},"SparseMatrix, any":function(t,e){return a(t,e,i,!1)},"Array, any":function(t,e){return s(A(t),e,i,!1).valueOf()},"any, Array | Matrix":function(t,e){return n(t,o(e))}},i.signatures))}));function Gn(){return(Gn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function Nn(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function kn(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Nn(Object(A),!0).forEach((function(e){xn(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Nn(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function xn(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var On=Kt("Unit",["?on","config","addScalar","subtract","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],(function(t){var e,A,n,r=t.on,i=t.config,o=t.addScalar,a=t.subtract,s=t.multiplyScalar,g=t.divideScalar,c=t.pow,I=t.abs,u=t.fix,l=t.round,C=t.equal,h=t.isNumeric,B=t.format,f=t.number,d=t.Complex,Q=t.BigNumber,p=t.Fraction,v=f;function m(t,e){if(!(this instanceof m))throw new Error("Constructor must be called with the new operator");if(null!==t&&void 0!==t&&!h(t)&&!E(t))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(void 0!==e&&("string"!==typeof e||""===e))throw new TypeError("Second parameter in Unit constructor must be a string");if(void 0!==e){var A=m.parse(e);this.units=A.units,this.dimensions=A.dimensions}else{this.units=[{unit:L,prefix:k.NONE,power:0}],this.dimensions=[];for(var n=0;n<x.length;n++)this.dimensions[n]=0}this.value=void 0!==t&&null!==t?this._normalize(t):null,this.fixPrefix=!1,this.skipAutomaticSimplification=!0}function b(){for(;" "===n||"\t"===n;)w()}function F(t){return t>="0"&&t<="9"}function w(){A++,n=e.charAt(A)}function S(t){A=t,n=e.charAt(A)}function D(){var t="",e=A;if("+"===n?w():"-"===n&&(t+=n,w()),!function(t){return t>="0"&&t<="9"||"."===t}(n))return S(e),null;if("."===n){if(t+=n,w(),!F(n))return S(e),null}else{for(;F(n);)t+=n,w();"."===n&&(t+=n,w())}for(;F(n);)t+=n,w();if("E"===n||"e"===n){var r="",i=A;if(r+=n,w(),"+"!==n&&"-"!==n||(r+=n,w()),!F(n))return S(i),t;for(t+=r;F(n);)t+=n,w()}return t}function R(){for(var t="";F(n)||m.isValidAlpha(n);)t+=n,w();var e=t.charAt(0);return m.isValidAlpha(e)?t:null}function U(t){return n===t?(w(),t):null}m.prototype.type="Unit",m.prototype.isUnit=!0,m.parse=function(t,r){if(r=r||{},A=-1,n="","string"!==typeof(e=t))throw new TypeError("Invalid argument in Unit.parse, string expected");var o=new m;o.units=[];var a=1,s=!1;w(),b();var g=D(),c=null;if(g){if("BigNumber"===i.number)c=new Q(g);else if("Fraction"===i.number)try{c=new p(g)}catch(y){c=parseFloat(g)}else c=parseFloat(g);b(),U("*")?(a=1,s=!0):U("/")&&(a=-1,s=!0)}for(var I=[],u=1;;){for(b();"("===n;)I.push(a),u*=a,a=1,w(),b();var l=void 0;if(!n)break;var C=n;if(null===(l=R()))throw new SyntaxError('Unexpected "'+C+'" in "'+e+'" at index '+A.toString());var h=G(l);if(null===h)throw new SyntaxError('Unit "'+l+'" not found.');var B=a*u;if(b(),U("^")){b();var f=D();if(null===f)throw new SyntaxError('In "'+t+'", "^" must be followed by a floating-point number');B*=f}o.units.push({unit:h.unit,prefix:h.prefix,power:B});for(var d=0;d<x.length;d++)o.dimensions[d]+=(h.unit.dimensions[d]||0)*B;for(b();")"===n;){if(0===I.length)throw new SyntaxError('Unmatched ")" in "'+e+'" at index '+A.toString());u/=I.pop(),w(),b()}if(s=!1,U("*")?(a=1,s=!0):U("/")?(a=-1,s=!0):a=1,h.unit.base){var E=h.unit.base.key;j.auto[E]={unit:h.unit,prefix:h.prefix}}}if(b(),n)throw new SyntaxError('Could not parse: "'+t+'"');if(s)throw new SyntaxError('Trailing characters: "'+t+'"');if(0!==I.length)throw new SyntaxError('Unmatched "(" in "'+e+'"');if(0===o.units.length&&!r.allowNoUnits)throw new SyntaxError('"'+t+'" contains no units');return o.value=void 0!==c?o._normalize(c):null,o},m.prototype.clone=function(){var t=new m;t.fixPrefix=this.fixPrefix,t.skipAutomaticSimplification=this.skipAutomaticSimplification,t.value=nt(this.value),t.dimensions=this.dimensions.slice(0),t.units=[];for(var e=0;e<this.units.length;e++)for(var A in t.units[e]={},this.units[e])at(this.units[e],A)&&(t.units[e][A]=this.units[e][A]);return t},m.prototype._isDerived=function(){return 0!==this.units.length&&(this.units.length>1||Math.abs(this.units[0].power-1)>1e-15)},m.prototype._normalize=function(t){var e,A,n,r,i;if(null===t||void 0===t||0===this.units.length)return t;if(this._isDerived()){var a=t;i=m._getNumberConverter(At(t));for(var g=0;g<this.units.length;g++)e=i(this.units[g].unit.value),r=i(this.units[g].prefix.value),n=i(this.units[g].power),a=s(a,c(s(e,r),n));return a}return e=(i=m._getNumberConverter(At(t)))(this.units[0].unit.value),A=i(this.units[0].unit.offset),r=i(this.units[0].prefix.value),s(o(t,A),s(e,r))},m.prototype._denormalize=function(t,e){var A,n,r,i,o;if(null===t||void 0===t||0===this.units.length)return t;if(this._isDerived()){var I=t;o=m._getNumberConverter(At(t));for(var u=0;u<this.units.length;u++)A=o(this.units[u].unit.value),i=o(this.units[u].prefix.value),r=o(this.units[u].power),I=g(I,c(s(A,i),r));return I}return A=(o=m._getNumberConverter(At(t)))(this.units[0].unit.value),i=o(this.units[0].prefix.value),n=o(this.units[0].unit.offset),a(g(g(t,A),void 0===e||null===e?i:e),n)};var G=te((function(t){if(at(_,t)){var e=_[t];return{unit:e,prefix:e.prefixes[""]}}for(var A in _)if(at(_,A)&&kt(t,A)){var n=_[A],r=t.length-A.length,i=t.substring(0,r),o=at(n.prefixes,i)?n.prefixes[i]:void 0;if(void 0!==o)return{unit:n,prefix:o}}return null}),{hasher:function(t){return t[0]},limit:100});function N(t){return t.equalBase(O.NONE)&&null!==t.value&&!i.predictable?t.value:t}m.isValuelessUnit=function(t){return null!==G(t)},m.prototype.hasBase=function(t){if("string"===typeof t&&(t=O[t]),!t)return!1;for(var e=0;e<x.length;e++)if(Math.abs((this.dimensions[e]||0)-(t.dimensions[e]||0))>1e-12)return!1;return!0},m.prototype.equalBase=function(t){for(var e=0;e<x.length;e++)if(Math.abs((this.dimensions[e]||0)-(t.dimensions[e]||0))>1e-12)return!1;return!0},m.prototype.equals=function(t){return this.equalBase(t)&&C(this.value,t.value)},m.prototype.multiply=function(t){for(var e=this.clone(),A=0;A<x.length;A++)e.dimensions[A]=(this.dimensions[A]||0)+(t.dimensions[A]||0);for(var n=0;n<t.units.length;n++){var r=kn({},t.units[n]);e.units.push(r)}if(null!==this.value||null!==t.value){var i=null===this.value?this._normalize(1):this.value,o=null===t.value?t._normalize(1):t.value;e.value=s(i,o)}else e.value=null;return e.skipAutomaticSimplification=!1,N(e)},m.prototype.divide=function(t){for(var e=this.clone(),A=0;A<x.length;A++)e.dimensions[A]=(this.dimensions[A]||0)-(t.dimensions[A]||0);for(var n=0;n<t.units.length;n++){var r=kn(kn({},t.units[n]),{},{power:-t.units[n].power});e.units.push(r)}if(null!==this.value||null!==t.value){var i=null===this.value?this._normalize(1):this.value,o=null===t.value?t._normalize(1):t.value;e.value=g(i,o)}else e.value=null;return e.skipAutomaticSimplification=!1,N(e)},m.prototype.pow=function(t){for(var e=this.clone(),A=0;A<x.length;A++)e.dimensions[A]=(this.dimensions[A]||0)*t;for(var n=0;n<e.units.length;n++)e.units[n].power*=t;return null!==e.value?e.value=c(e.value,t):e.value=null,e.skipAutomaticSimplification=!1,N(e)},m.prototype.abs=function(){var t=this.clone();for(var e in t.value=null!==t.value?I(t.value):null,t.units)"VA"!==t.units[e].unit.name&&"VAR"!==t.units[e].unit.name||(t.units[e].unit=_.W);return t},m.prototype.to=function(t){var e,A=null===this.value?this._normalize(1):this.value;if("string"===typeof t){if(e=m.parse(t),!this.equalBase(e))throw new Error("Units do not match ('".concat(e.toString(),"' != '").concat(this.toString(),"')"));if(null!==e.value)throw new Error("Cannot convert to a unit with a value");return e.value=nt(A),e.fixPrefix=!0,e.skipAutomaticSimplification=!0,e}if(y(t)){if(!this.equalBase(t))throw new Error("Units do not match ('".concat(t.toString(),"' != '").concat(this.toString(),"')"));if(null!==t.value)throw new Error("Cannot convert to a unit with a value");return(e=t.clone()).value=nt(A),e.fixPrefix=!0,e.skipAutomaticSimplification=!0,e}throw new Error("String or Unit expected as parameter")},m.prototype.toNumber=function(t){return v(this.toNumeric(t))},m.prototype.toNumeric=function(t){var e;return(e=t?this.to(t):this.clone())._isDerived()||0===e.units.length?e._denormalize(e.value):e._denormalize(e.value,e.units[0].prefix.value)},m.prototype.toString=function(){return this.format()},m.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.formatUnits(),fixPrefix:this.fixPrefix}},m.fromJSON=function(t){var e=new m(t.value,t.unit);return e.fixPrefix=t.fixPrefix||!1,e},m.prototype.valueOf=m.prototype.toString,m.prototype.simplify=function(){var t,e,A=this.clone(),n=[];for(var r in H)if(at(H,r)&&A.hasBase(O[r])){t=r;break}if("NONE"===t)A.units=[];else if(t&&at(H,t)&&(e=H[t]),e)A.units=[{unit:e.unit,prefix:e.prefix,power:1}];else{for(var i=!1,o=0;o<x.length;o++){var a=x[o];Math.abs(A.dimensions[o]||0)>1e-12&&(at(H,a)?n.push({unit:H[a].unit,prefix:H[a].prefix,power:A.dimensions[o]||0}):i=!0)}n.length<A.units.length&&!i&&(A.units=n)}return A},m.prototype.toSI=function(){for(var t=this.clone(),e=[],A=0;A<x.length;A++){var n=x[A];if(Math.abs(t.dimensions[A]||0)>1e-12){if(!at(j.si,n))throw new Error("Cannot express custom unit "+n+" in SI units");e.push({unit:j.si[n].unit,prefix:j.si[n].prefix,power:t.dimensions[A]||0})}}return t.units=e,t.fixPrefix=!0,t.skipAutomaticSimplification=!0,t},m.prototype.formatUnits=function(){for(var t="",e="",A=0,n=0,r=0;r<this.units.length;r++)this.units[r].power>0?(A++,t+=" "+this.units[r].prefix.name+this.units[r].unit.name,Math.abs(this.units[r].power-1)>1e-15&&(t+="^"+this.units[r].power)):this.units[r].power<0&&n++;if(n>0)for(var i=0;i<this.units.length;i++)this.units[i].power<0&&(A>0?(e+=" "+this.units[i].prefix.name+this.units[i].unit.name,Math.abs(this.units[i].power+1)>1e-15&&(e+="^"+-this.units[i].power)):(e+=" "+this.units[i].prefix.name+this.units[i].unit.name,e+="^"+this.units[i].power));t=t.substr(1),e=e.substr(1),A>1&&n>0&&(t="("+t+")"),n>1&&A>0&&(e="("+e+")");var o=t;return A>0&&n>0&&(o+=" / "),o+=e},m.prototype.format=function(t){var e=this.skipAutomaticSimplification||null===this.value?this.clone():this.simplify(),A=!1;for(var n in"undefined"!==typeof e.value&&null!==e.value&&E(e.value)&&(A=Math.abs(e.value.re)<1e-14),e.units)at(e.units,n)&&e.units[n].unit&&("VA"===e.units[n].unit.name&&A?e.units[n].unit=_.VAR:"VAR"!==e.units[n].unit.name||A||(e.units[n].unit=_.VA));1!==e.units.length||e.fixPrefix||Math.abs(e.units[0].power-Math.round(e.units[0].power))<1e-14&&(e.units[0].prefix=e._bestPrefix());var r=e._denormalize(e.value),i=null!==e.value?B(r,t||{}):"",o=e.formatUnits();return e.value&&E(e.value)&&(i="("+i+")"),o.length>0&&i.length>0&&(i+=" "),i+=o},m.prototype._bestPrefix=function(){if(1!==this.units.length)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var t=null!==this.value?I(this.value):0,e=I(this.units[0].unit.value),A=this.units[0].prefix;if(0===t)return A;var n=this.units[0].power,r=Math.log(t/Math.pow(A.value*e,n))/Math.LN10-1.2;if(r>-2.200001&&r<1.800001)return A;r=Math.abs(r);var i=this.units[0].unit.prefixes;for(var o in i)if(at(i,o)){var a=i[o];if(a.scientific){var s=Math.abs(Math.log(t/Math.pow(a.value*e,n))/Math.LN10-1.2);(s<r||s===r&&a.name.length<A.name.length)&&(A=a,r=s)}}return A},m.prototype.splitUnit=function(t){for(var e=this.clone(),A=[],n=0;n<t.length&&(e=e.to(t[n]),n!==t.length-1);n++){var r=e.toNumeric(),i=l(r),s=new m(C(i,r)?i:u(e.toNumeric()),t[n].toString());A.push(s),e=a(e,s)}for(var g=0,c=0;c<A.length;c++)g=o(g,A[c].value);return C(g,this.value)&&(e.value=0),A.push(e),A};var k={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};k.SHORTLONG=Gn({},k.SHORT,k.LONG),k.BINARY_SHORT=Gn({},k.BINARY_SHORT_SI,k.BINARY_SHORT_IEC),k.BINARY_LONG=Gn({},k.BINARY_LONG_SI,k.BINARY_LONG_IEC);var x=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],O={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var M in O)at(O,M)&&(O[M].key=M);var L={name:"",base:{},value:1,offset:0,dimensions:x.map((function(t){return 0}))},_={meter:{name:"meter",base:O.LENGTH,prefixes:k.LONG,value:1,offset:0},inch:{name:"inch",base:O.LENGTH,prefixes:k.NONE,value:.0254,offset:0},foot:{name:"foot",base:O.LENGTH,prefixes:k.NONE,value:.3048,offset:0},yard:{name:"yard",base:O.LENGTH,prefixes:k.NONE,value:.9144,offset:0},mile:{name:"mile",base:O.LENGTH,prefixes:k.NONE,value:1609.344,offset:0},link:{name:"link",base:O.LENGTH,prefixes:k.NONE,value:.201168,offset:0},rod:{name:"rod",base:O.LENGTH,prefixes:k.NONE,value:5.0292,offset:0},chain:{name:"chain",base:O.LENGTH,prefixes:k.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:O.LENGTH,prefixes:k.NONE,value:1e-10,offset:0},m:{name:"m",base:O.LENGTH,prefixes:k.SHORT,value:1,offset:0},in:{name:"in",base:O.LENGTH,prefixes:k.NONE,value:.0254,offset:0},ft:{name:"ft",base:O.LENGTH,prefixes:k.NONE,value:.3048,offset:0},yd:{name:"yd",base:O.LENGTH,prefixes:k.NONE,value:.9144,offset:0},mi:{name:"mi",base:O.LENGTH,prefixes:k.NONE,value:1609.344,offset:0},li:{name:"li",base:O.LENGTH,prefixes:k.NONE,value:.201168,offset:0},rd:{name:"rd",base:O.LENGTH,prefixes:k.NONE,value:5.02921,offset:0},ch:{name:"ch",base:O.LENGTH,prefixes:k.NONE,value:20.1168,offset:0},mil:{name:"mil",base:O.LENGTH,prefixes:k.NONE,value:254e-7,offset:0},m2:{name:"m2",base:O.SURFACE,prefixes:k.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:O.SURFACE,prefixes:k.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:O.SURFACE,prefixes:k.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:O.SURFACE,prefixes:k.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:O.SURFACE,prefixes:k.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:O.SURFACE,prefixes:k.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:O.SURFACE,prefixes:k.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:O.SURFACE,prefixes:k.NONE,value:6.4516e-10,offset:0},acre:{name:"acre",base:O.SURFACE,prefixes:k.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:O.SURFACE,prefixes:k.NONE,value:1e4,offset:0},m3:{name:"m3",base:O.VOLUME,prefixes:k.CUBIC,value:1,offset:0},L:{name:"L",base:O.VOLUME,prefixes:k.SHORT,value:.001,offset:0},l:{name:"l",base:O.VOLUME,prefixes:k.SHORT,value:.001,offset:0},litre:{name:"litre",base:O.VOLUME,prefixes:k.LONG,value:.001,offset:0},cuin:{name:"cuin",base:O.VOLUME,prefixes:k.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:O.VOLUME,prefixes:k.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:O.VOLUME,prefixes:k.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:O.VOLUME,prefixes:k.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:O.VOLUME,prefixes:k.NONE,value:15e-6,offset:0},drop:{name:"drop",base:O.VOLUME,prefixes:k.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:O.VOLUME,prefixes:k.NONE,value:5e-8,offset:0},minim:{name:"minim",base:O.VOLUME,prefixes:k.NONE,value:6.161152e-8,offset:0},fluiddram:{name:"fluiddram",base:O.VOLUME,prefixes:k.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:O.VOLUME,prefixes:k.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:O.VOLUME,prefixes:k.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:O.VOLUME,prefixes:k.NONE,value:1e-6,offset:0},cup:{name:"cup",base:O.VOLUME,prefixes:k.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:O.VOLUME,prefixes:k.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:O.VOLUME,prefixes:k.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:O.VOLUME,prefixes:k.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:O.VOLUME,prefixes:k.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:O.VOLUME,prefixes:k.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:O.VOLUME,prefixes:k.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:O.VOLUME,prefixes:k.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:O.VOLUME,prefixes:k.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:O.VOLUME,prefixes:k.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:O.VOLUME,prefixes:k.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:O.VOLUME,prefixes:k.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:O.VOLUME,prefixes:k.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:O.VOLUME,prefixes:k.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:O.VOLUME,prefixes:k.NONE,value:.1173478,offset:0},obl:{name:"obl",base:O.VOLUME,prefixes:k.NONE,value:.1589873,offset:0},g:{name:"g",base:O.MASS,prefixes:k.SHORT,value:.001,offset:0},gram:{name:"gram",base:O.MASS,prefixes:k.LONG,value:.001,offset:0},ton:{name:"ton",base:O.MASS,prefixes:k.SHORT,value:907.18474,offset:0},t:{name:"t",base:O.MASS,prefixes:k.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:O.MASS,prefixes:k.LONG,value:1e3,offset:0},grain:{name:"grain",base:O.MASS,prefixes:k.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:O.MASS,prefixes:k.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:O.MASS,prefixes:k.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:O.MASS,prefixes:k.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:O.MASS,prefixes:k.NONE,value:45.359237,offset:0},stick:{name:"stick",base:O.MASS,prefixes:k.NONE,value:.115,offset:0},stone:{name:"stone",base:O.MASS,prefixes:k.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:O.MASS,prefixes:k.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:O.MASS,prefixes:k.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:O.MASS,prefixes:k.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:O.MASS,prefixes:k.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:O.MASS,prefixes:k.NONE,value:45.359237,offset:0},s:{name:"s",base:O.TIME,prefixes:k.SHORT,value:1,offset:0},min:{name:"min",base:O.TIME,prefixes:k.NONE,value:60,offset:0},h:{name:"h",base:O.TIME,prefixes:k.NONE,value:3600,offset:0},second:{name:"second",base:O.TIME,prefixes:k.LONG,value:1,offset:0},sec:{name:"sec",base:O.TIME,prefixes:k.LONG,value:1,offset:0},minute:{name:"minute",base:O.TIME,prefixes:k.NONE,value:60,offset:0},hour:{name:"hour",base:O.TIME,prefixes:k.NONE,value:3600,offset:0},day:{name:"day",base:O.TIME,prefixes:k.NONE,value:86400,offset:0},week:{name:"week",base:O.TIME,prefixes:k.NONE,value:604800,offset:0},month:{name:"month",base:O.TIME,prefixes:k.NONE,value:2629800,offset:0},year:{name:"year",base:O.TIME,prefixes:k.NONE,value:31557600,offset:0},decade:{name:"decade",base:O.TIME,prefixes:k.NONE,value:315576e3,offset:0},century:{name:"century",base:O.TIME,prefixes:k.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:O.TIME,prefixes:k.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:O.FREQUENCY,prefixes:k.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:O.FREQUENCY,prefixes:k.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:O.ANGLE,prefixes:k.SHORT,value:1,offset:0},radian:{name:"radian",base:O.ANGLE,prefixes:k.LONG,value:1,offset:0},deg:{name:"deg",base:O.ANGLE,prefixes:k.SHORT,value:null,offset:0},degree:{name:"degree",base:O.ANGLE,prefixes:k.LONG,value:null,offset:0},grad:{name:"grad",base:O.ANGLE,prefixes:k.SHORT,value:null,offset:0},gradian:{name:"gradian",base:O.ANGLE,prefixes:k.LONG,value:null,offset:0},cycle:{name:"cycle",base:O.ANGLE,prefixes:k.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:O.ANGLE,prefixes:k.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:O.ANGLE,prefixes:k.NONE,value:null,offset:0},A:{name:"A",base:O.CURRENT,prefixes:k.SHORT,value:1,offset:0},ampere:{name:"ampere",base:O.CURRENT,prefixes:k.LONG,value:1,offset:0},K:{name:"K",base:O.TEMPERATURE,prefixes:k.NONE,value:1,offset:0},degC:{name:"degC",base:O.TEMPERATURE,prefixes:k.NONE,value:1,offset:273.15},degF:{name:"degF",base:O.TEMPERATURE,prefixes:k.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:O.TEMPERATURE,prefixes:k.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:O.TEMPERATURE,prefixes:k.NONE,value:1,offset:0},celsius:{name:"celsius",base:O.TEMPERATURE,prefixes:k.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:O.TEMPERATURE,prefixes:k.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:O.TEMPERATURE,prefixes:k.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:O.AMOUNT_OF_SUBSTANCE,prefixes:k.SHORT,value:1,offset:0},mole:{name:"mole",base:O.AMOUNT_OF_SUBSTANCE,prefixes:k.LONG,value:1,offset:0},cd:{name:"cd",base:O.LUMINOUS_INTENSITY,prefixes:k.SHORT,value:1,offset:0},candela:{name:"candela",base:O.LUMINOUS_INTENSITY,prefixes:k.LONG,value:1,offset:0},N:{name:"N",base:O.FORCE,prefixes:k.SHORT,value:1,offset:0},newton:{name:"newton",base:O.FORCE,prefixes:k.LONG,value:1,offset:0},dyn:{name:"dyn",base:O.FORCE,prefixes:k.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:O.FORCE,prefixes:k.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:O.FORCE,prefixes:k.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:O.FORCE,prefixes:k.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:O.FORCE,prefixes:k.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:O.FORCE,prefixes:k.NONE,value:9.80665,offset:0},J:{name:"J",base:O.ENERGY,prefixes:k.SHORT,value:1,offset:0},joule:{name:"joule",base:O.ENERGY,prefixes:k.SHORT,value:1,offset:0},erg:{name:"erg",base:O.ENERGY,prefixes:k.NONE,value:1e-7,offset:0},Wh:{name:"Wh",base:O.ENERGY,prefixes:k.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:O.ENERGY,prefixes:k.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:O.ENERGY,prefixes:k.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:O.ENERGY,prefixes:k.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:O.POWER,prefixes:k.SHORT,value:1,offset:0},watt:{name:"watt",base:O.POWER,prefixes:k.LONG,value:1,offset:0},hp:{name:"hp",base:O.POWER,prefixes:k.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:O.POWER,prefixes:k.SHORT,value:d.I,offset:0},VA:{name:"VA",base:O.POWER,prefixes:k.SHORT,value:1,offset:0},Pa:{name:"Pa",base:O.PRESSURE,prefixes:k.SHORT,value:1,offset:0},psi:{name:"psi",base:O.PRESSURE,prefixes:k.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:O.PRESSURE,prefixes:k.NONE,value:101325,offset:0},bar:{name:"bar",base:O.PRESSURE,prefixes:k.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:O.PRESSURE,prefixes:k.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:O.PRESSURE,prefixes:k.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:O.PRESSURE,prefixes:k.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:O.PRESSURE,prefixes:k.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:O.ELECTRIC_CHARGE,prefixes:k.LONG,value:1,offset:0},C:{name:"C",base:O.ELECTRIC_CHARGE,prefixes:k.SHORT,value:1,offset:0},farad:{name:"farad",base:O.ELECTRIC_CAPACITANCE,prefixes:k.LONG,value:1,offset:0},F:{name:"F",base:O.ELECTRIC_CAPACITANCE,prefixes:k.SHORT,value:1,offset:0},volt:{name:"volt",base:O.ELECTRIC_POTENTIAL,prefixes:k.LONG,value:1,offset:0},V:{name:"V",base:O.ELECTRIC_POTENTIAL,prefixes:k.SHORT,value:1,offset:0},ohm:{name:"ohm",base:O.ELECTRIC_RESISTANCE,prefixes:k.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:O.ELECTRIC_INDUCTANCE,prefixes:k.LONG,value:1,offset:0},H:{name:"H",base:O.ELECTRIC_INDUCTANCE,prefixes:k.SHORT,value:1,offset:0},siemens:{name:"siemens",base:O.ELECTRIC_CONDUCTANCE,prefixes:k.LONG,value:1,offset:0},S:{name:"S",base:O.ELECTRIC_CONDUCTANCE,prefixes:k.SHORT,value:1,offset:0},weber:{name:"weber",base:O.MAGNETIC_FLUX,prefixes:k.LONG,value:1,offset:0},Wb:{name:"Wb",base:O.MAGNETIC_FLUX,prefixes:k.SHORT,value:1,offset:0},tesla:{name:"tesla",base:O.MAGNETIC_FLUX_DENSITY,prefixes:k.LONG,value:1,offset:0},T:{name:"T",base:O.MAGNETIC_FLUX_DENSITY,prefixes:k.SHORT,value:1,offset:0},b:{name:"b",base:O.BIT,prefixes:k.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:O.BIT,prefixes:k.BINARY_LONG,value:1,offset:0},B:{name:"B",base:O.BIT,prefixes:k.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:O.BIT,prefixes:k.BINARY_LONG,value:8,offset:0}},J={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function T(t){if("BigNumber"===t.number){var e=ee(Q);_.rad.value=new Q(1),_.deg.value=e.div(180),_.grad.value=e.div(200),_.cycle.value=e.times(2),_.arcsec.value=e.div(648e3),_.arcmin.value=e.div(10800)}else _.rad.value=1,_.deg.value=Math.PI/180,_.grad.value=Math.PI/200,_.cycle.value=2*Math.PI,_.arcsec.value=Math.PI/648e3,_.arcmin.value=Math.PI/10800;_.radian.value=_.rad.value,_.degree.value=_.deg.value,_.gradian.value=_.grad.value}T(i),r&&r("config",(function(t,e){t.number!==e.number&&T(t)}));var j={si:{NONE:{unit:L,prefix:k.NONE[""]},LENGTH:{unit:_.m,prefix:k.SHORT[""]},MASS:{unit:_.g,prefix:k.SHORT.k},TIME:{unit:_.s,prefix:k.SHORT[""]},CURRENT:{unit:_.A,prefix:k.SHORT[""]},TEMPERATURE:{unit:_.K,prefix:k.SHORT[""]},LUMINOUS_INTENSITY:{unit:_.cd,prefix:k.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:_.mol,prefix:k.SHORT[""]},ANGLE:{unit:_.rad,prefix:k.SHORT[""]},BIT:{unit:_.bits,prefix:k.SHORT[""]},FORCE:{unit:_.N,prefix:k.SHORT[""]},ENERGY:{unit:_.J,prefix:k.SHORT[""]},POWER:{unit:_.W,prefix:k.SHORT[""]},PRESSURE:{unit:_.Pa,prefix:k.SHORT[""]},ELECTRIC_CHARGE:{unit:_.C,prefix:k.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:_.F,prefix:k.SHORT[""]},ELECTRIC_POTENTIAL:{unit:_.V,prefix:k.SHORT[""]},ELECTRIC_RESISTANCE:{unit:_.ohm,prefix:k.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:_.H,prefix:k.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:_.S,prefix:k.SHORT[""]},MAGNETIC_FLUX:{unit:_.Wb,prefix:k.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:_.T,prefix:k.SHORT[""]},FREQUENCY:{unit:_.Hz,prefix:k.SHORT[""]}}};j.cgs=JSON.parse(JSON.stringify(j.si)),j.cgs.LENGTH={unit:_.m,prefix:k.SHORT.c},j.cgs.MASS={unit:_.g,prefix:k.SHORT[""]},j.cgs.FORCE={unit:_.dyn,prefix:k.SHORT[""]},j.cgs.ENERGY={unit:_.erg,prefix:k.NONE[""]},j.us=JSON.parse(JSON.stringify(j.si)),j.us.LENGTH={unit:_.ft,prefix:k.NONE[""]},j.us.MASS={unit:_.lbm,prefix:k.NONE[""]},j.us.TEMPERATURE={unit:_.degF,prefix:k.NONE[""]},j.us.FORCE={unit:_.lbf,prefix:k.NONE[""]},j.us.ENERGY={unit:_.BTU,prefix:k.BTU[""]},j.us.POWER={unit:_.hp,prefix:k.NONE[""]},j.us.PRESSURE={unit:_.psi,prefix:k.NONE[""]},j.auto=JSON.parse(JSON.stringify(j.si));var H=j.auto;for(var Y in m.setUnitSystem=function(t){if(!at(j,t))throw new Error("Unit system "+t+" does not exist. Choices are: "+Object.keys(j).join(", "));H=j[t]},m.getUnitSystem=function(){for(var t in j)if(at(j,t)&&j[t]===H)return t},m.typeConverters={BigNumber:function(t){return new Q(t+"")},Fraction:function(t){return new p(t)},Complex:function(t){return t},number:function(t){return t}},m._getNumberConverter=function(t){if(!m.typeConverters[t])throw new TypeError('Unsupported type "'+t+'"');return m.typeConverters[t]},_)if(at(_,Y)){var V=_[Y];V.dimensions=V.base.dimensions}for(var Z in J)if(at(J,Z)){var W=_[J[Z]],K={};for(var P in W)at(W,P)&&(K[P]=W[P]);K.name=Z,_[Z]=K}return m.isValidAlpha=function(t){return/^[a-zA-Z]$/.test(t)},m.createUnit=function(t,e){if("object"!==typeof t)throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(e&&e.override)for(var A in t)if(at(t,A)&&m.deleteUnit(A),t[A].aliases)for(var n=0;n<t[A].aliases.length;n++)m.deleteUnit(t[A].aliases[n]);var r;for(var i in t)at(t,i)&&(r=m.createUnitSingle(i,t[i]));return r},m.createUnitSingle=function(t,e,A){if("undefined"!==typeof e&&null!==e||(e={}),"string"!==typeof t)throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(at(_,t))throw new Error('Cannot create unit "'+t+'": a unit with that name already exists');!function(t){for(var e=0;e<t.length;e++){if(n=t.charAt(e),0===e&&!m.isValidAlpha(n))throw new Error('Invalid unit name (must begin with alpha character): "'+t+'"');if(e>0&&!m.isValidAlpha(n)&&!F(n))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+t+'"')}}(t);var r,i,o,a=null,s=[],g=0;if(e&&"Unit"===e.type)a=e.clone();else if("string"===typeof e)""!==e&&(r=e);else{if("object"!==typeof e)throw new TypeError('Cannot create unit "'+t+'" from "'+e.toString()+'": expecting "string" or "Unit" or "Object"');r=e.definition,i=e.prefixes,g=e.offset,o=e.baseName,e.aliases&&(s=e.aliases.valueOf())}if(s)for(var c=0;c<s.length;c++)if(at(_,s[c]))throw new Error('Cannot create alias "'+s[c]+'": a unit with that name already exists');if(r&&"string"===typeof r&&!a)try{a=m.parse(r,{allowNoUnits:!0})}catch(b){throw b.message='Could not create unit "'+t+'" from "'+r+'": '+b.message,b}else r&&"Unit"===r.type&&(a=r.clone());s=s||[],g=g||0,i=i&&i.toUpperCase&&k[i.toUpperCase()]||k.NONE;var I={};if(a){I={name:t,value:a.value,dimensions:a.dimensions.slice(0),prefixes:i,offset:g};var u=!1;for(var l in O)if(at(O,l)){for(var C=!0,h=0;h<x.length;h++)if(Math.abs((I.dimensions[h]||0)-(O[l].dimensions[h]||0))>1e-12){C=!1;break}if(C){u=!0,I.base=O[l];break}}if(!u){o=o||t+"_STUFF";var B={dimensions:a.dimensions.slice(0)};B.key=o,O[o]=B,H[o]={unit:I,prefix:k.NONE[""]},I.base=O[o]}}else{if(o=o||t+"_STUFF",x.indexOf(o)>=0)throw new Error('Cannot create new base unit "'+t+'": a base unit with that name already exists (and cannot be overridden)');for(var f in x.push(o),O)at(O,f)&&(O[f].dimensions[x.length-1]=0);for(var d={dimensions:[]},Q=0;Q<x.length;Q++)d.dimensions[Q]=0;d.dimensions[x.length-1]=1,d.key=o,O[o]=d,I={name:t,value:1,dimensions:O[o].dimensions.slice(0),prefixes:i,offset:g,base:O[o]},H[o]={unit:I,prefix:k.NONE[""]}}m.UNITS[t]=I;for(var E=0;E<s.length;E++){var p=s[E],y={};for(var v in I)at(I,v)&&(y[v]=I[v]);y.name=p,m.UNITS[p]=y}return delete G.cache,new m(null,t)},m.deleteUnit=function(t){delete m.UNITS[t]},m.PREFIXES=k,m.BASE_DIMENSIONS=x,m.BASE_UNITS=O,m.UNIT_SYSTEMS=j,m.UNITS=_,m}),{isClass:!0});var Mn=["typed","Unit"],Ln=Kt("unit",Mn,(function(t){var e=t.typed,A=t.Unit;return e("unit",{Unit:function(t){return t.clone()},string:function(t){return A.isValuelessUnit(t)?new A(null,t):A.parse(t,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string":function(t,e){return new A(t,e)},"Array | Matrix":function(t){return Qe(t,this)}})})),_n=zt({}),Jn=ie({config:It}),Tn=oe({}),jn=ce({}),Hn=Ie({Matrix:Tn}),Yn=he({BigNumber:Jn,Complex:_n,DenseMatrix:Hn,Fraction:jn}),Vn=Ee({typed:Yn}),Zn=we({config:It,typed:Yn}),Wn=Se({typed:Yn}),Kn=ze({typed:Yn}),Pn=IA({typed:Yn}),qn=GA({Fraction:jn,typed:Yn}),Xn=NA({typed:Yn}),zn=kA({typed:Yn}),$n=xA({typed:Yn}),tr=OA({Matrix:Tn,equalScalar:Zn,typed:Yn}),er=MA({DenseMatrix:Hn,Matrix:Tn,SparseMatrix:tr,typed:Yn}),Ar=WA({BigNumber:Jn,DenseMatrix:Hn,SparseMatrix:tr,config:It,matrix:er,typed:Yn}),nr=XA({matrix:er,config:It,typed:Yn}),rr=zA({BigNumber:Jn,config:It,matrix:er,typed:Yn}),ir=nn({BigNumber:Jn,DenseMatrix:Hn,equalScalar:Zn,matrix:er,typed:Yn,zeros:rr}),or=on({BigNumber:Jn,DenseMatrix:Hn,Fraction:jn,config:It,equalScalar:Zn,matrix:er,typed:Yn}),ar=an({DenseMatrix:Hn,config:It,matrix:er,typed:Yn}),sr=sn({DenseMatrix:Hn,config:It,matrix:er,typed:Yn}),gr=gn({larger:sr,smaller:ar}),cr=cn({addScalar:zn,conj:$n,multiplyScalar:Kn,size:nr,typed:Yn}),Ir=In({typed:Yn}),ur=un({config:It,equalScalar:Zn,matrix:er,round:ir,typed:Yn}),lr=ln({addScalar:zn,dot:cr,equalScalar:Zn,matrix:er,multiplyScalar:Kn,typed:Yn}),Cr=hn({Complex:_n,config:It,fraction:qn,identity:Ar,matrix:er,multiply:lr,number:Wn,typed:Yn}),hr=Qn({BigNumber:Jn,typed:Yn}),Br=En({bignumber:hr,fraction:qn,number:Wn}),fr=pn({config:It,equalScalar:Zn,matrix:er,round:ir,typed:Yn}),dr=yn({DenseMatrix:Hn,addScalar:zn,equalScalar:Zn,matrix:er,typed:Yn,unaryMinus:Xn}),Qr=mn({DenseMatrix:Hn,equalScalar:Zn,matrix:er,typed:Yn}),Er=bn({Complex:_n,ceil:fr,floor:ur,matrix:er,typed:Yn}),pr=Fn({numeric:Br,typed:Yn}),yr=wn({FibonacciHeap:gr,addScalar:zn,equalScalar:Zn}),vr=Sn({DenseMatrix:Hn,Spa:yr,SparseMatrix:tr,abs:Ir,addScalar:zn,divideScalar:pr,equalScalar:Zn,larger:sr,matrix:er,multiplyScalar:Kn,subtract:dr,typed:Yn,unaryMinus:Xn}),mr=Dn({lup:vr,matrix:er,multiply:lr,subtract:dr,typed:Yn,unaryMinus:Xn}),br=Rn({abs:Ir,addScalar:zn,det:mr,divideScalar:pr,identity:Ar,matrix:er,multiply:lr,typed:Yn,unaryMinus:Xn}),Fr=Un({divideScalar:pr,equalScalar:Zn,inv:br,matrix:er,multiply:lr,typed:Yn}),wr=On({BigNumber:Jn,Complex:_n,Fraction:jn,abs:Ir,addScalar:zn,config:It,divideScalar:pr,equal:Qr,fix:Er,format:Pn,isNumeric:Vn,multiplyScalar:Kn,number:Wn,pow:Cr,round:ir,subtract:dr}),Sr=Ln({Unit:wr,typed:Yn}),Dr=A(73),Rr=A(87),Ur=A(158),Gr=A(9),Nr=A(15),kr=A(71),xr=A(92),Or=A(23),Mr=A(24),Lr=A(28),_r=A(479),Jr=A(480),Tr=A(233),jr=A(19);function Hr(t,e,A){for(var n=Object(o.a)(t),r=0;r<A;r+=1)n.push(e);return n}var Yr=function(t){Object(Or.a)(A,t);var e=Object(Mr.a)(A);function A(){return Object(Gr.a)(this,A),e.apply(this,arguments)}return Object(Nr.a)(A,[{key:"getShaders",value:function(){return{fs:"\n#define SHADER_NAME bitmask-layer-fragment-shader\nprecision highp float;\n\n// Data (mask) texture\nuniform sampler2D channel0;\nuniform sampler2D channel1;\nuniform sampler2D channel2;\nuniform sampler2D channel3;\nuniform sampler2D channel4;\nuniform sampler2D channel5;\n\n// Color texture\nuniform sampler2D colorTex;\nuniform float colorTexHeight;\nuniform float colorTexWidth;\nuniform float hovered;\n// range\nuniform bool channelIsOn[6];\n\n// opacity\nuniform float opacity;\n\nvarying vec2 vTexCoord;\n\nvec4 sampleAndGetColor(sampler2D dataTex, vec2 coord, bool isOn){\n  float sampledData = texture(dataTex, coord).r;\n  vec4 hoveredColor = float(sampledData == hovered && sampledData > 0. && hovered > 0.) * vec4(0., 0., 1., 1.);\n  // Colors are laid out corresponding to ids in row-major order in the texture.  So if width of the texture is 10, and you want ID 25,\n  // you need coordinate (1, 4) (i.e 2 rows down, and 5 columns over indexed from 0 for a total of 25 units covered in row major order).\n  vec2 colorTexCoord = vec2(mod(sampledData, colorTexWidth) / colorTexWidth, floor(sampledData / colorTexWidth) / (colorTexHeight - 1.));\n  vec4 sampledColor = vec4(texture(colorTex, colorTexCoord).rgb, 1.);\n  // Only return a color if the data is non-zero.\n  return max(0., min(sampledData, 1.)) * float(isOn) * (sampledColor + hoveredColor);\n}\n\nvoid main() {\n\n  gl_FragColor = sampleAndGetColor(channel0, vTexCoord, channelIsOn[0]);\n\n  // If the sampled color and the currently stored color (gl_FragColor) are identical, don't blend and use the sampled color,\n  // otherwise just use the currently stored color.  Repeat this for all channels.\n  vec4 sampledColor = sampleAndGetColor(channel1, vTexCoord, channelIsOn[1]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  sampledColor = sampleAndGetColor(channel2, vTexCoord, channelIsOn[2]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  sampledColor = sampleAndGetColor(channel3, vTexCoord, channelIsOn[3]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  sampledColor = sampleAndGetColor(channel4, vTexCoord, channelIsOn[4]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  sampledColor = sampleAndGetColor(channel5, vTexCoord, channelIsOn[5]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  // Apply the opacity if there is pixel data, and if the pixel data is empty i.e no segmentation, use 0 opacity.\n  gl_FragColor = vec4(gl_FragColor.rgb, (gl_FragColor.rgb == vec3(0., 0., 0.)) ? 0.0 : opacity);\n\n  geometry.uv = vTexCoord;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",vs:"\n#define SHADER_NAME bitmask-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",modules:[_r.a,Jr.a]}}},{key:"updateState",value:function(t){var e,n,r=t.props,i=t.oldProps,o=t.changeFlags;Object(xr.a)(Object(kr.a)(A.prototype),"updateState",this).call(this,{props:r,oldProps:i,changeFlags:o}),(null===(e=r.cellColor)||void 0===e?void 0:e.data)!==(null===(n=i.cellColor)||void 0===n?void 0:n.data)&&this.setColorTexture()}},{key:"setColorTexture",value:function(){var t,e=this.props.cellColor,A=e.height,n=e.width,r=e.data,i=new Tr.a(this.context.gl,{width:n,height:A,data:r,mipmaps:!1,parameters:(t={},Object(s.a)(t,Lr.default.TEXTURE_MIN_FILTER,Lr.default.NEAREST),Object(s.a)(t,Lr.default.TEXTURE_MAG_FILTER,Lr.default.NEAREST),Object(s.a)(t,Lr.default.TEXTURE_WRAP_S,Lr.default.CLAMP_TO_EDGE),Object(s.a)(t,Lr.default.TEXTURE_WRAP_T,Lr.default.CLAMP_TO_EDGE),t),format:Lr.default.RGB,dataFormat:Lr.default.RGB,type:Lr.default.UNSIGNED_BYTE});this.setState({colorTex:i})}},{key:"draw",value:function(t){var e=t.uniforms,A=this.props,n=A.channelIsOn,r=A.hoveredCell,i=this.state,o=i.textures,a=i.model,s=i.colorTex;o&&a&&s&&a.setUniforms(Object.assign({},e,Object(g.a)({hovered:r||0,colorTex:s,colorTexHeight:s.height,colorTexWidth:s.width,channelIsOn:Hr(n,!1,6-n.length)},o))).draw()}},{key:"dataToTexture",value:function(t,e,A){var n,r=Object(jr.j)(this.context.gl);return new Tr.a(this.context.gl,{width:e,height:A,data:new Float32Array(t),mipmaps:!1,parameters:(n={},Object(s.a)(n,Lr.default.TEXTURE_MIN_FILTER,Lr.default.NEAREST),Object(s.a)(n,Lr.default.TEXTURE_MAG_FILTER,Lr.default.NEAREST),Object(s.a)(n,Lr.default.TEXTURE_WRAP_S,Lr.default.CLAMP_TO_EDGE),Object(s.a)(n,Lr.default.TEXTURE_WRAP_T,Lr.default.CLAMP_TO_EDGE),n),format:r?Lr.default.R32F:Lr.default.LUMINANCE,dataFormat:r?Lr.default.RED:Lr.default.LUMINANCE,type:Lr.default.FLOAT})}}]),A}(C.h);Yr.layerName="BitmaskLayer",Yr.defaultProps={hoveredCell:{type:"number",value:null,compare:!0},cellColor:{type:"object",value:null,compare:!0}};var Vr=A(358);function Zr(t,e,A){return[[t,e+A],[t+A,e],[t,e-A],[t-A,e]]}function Wr(t){for(var e=[],A=function(t){var e=t.labels.filter((function(t){return Ur.g.includes(t)})),A={};return e.forEach((function(e){A[e]=Math.floor((t.shape[t.labels.indexOf(e)]||0)/2)})),A}(t),n=t.labels.filter((function(e){return!Ur.g.includes(e)&&t.shape[t.labels.indexOf(e)]}))[0],r=0;r<Math.min(4,t.shape[t.labels.indexOf(n)]);r+=1)e.push(Object(g.a)(Object(s.a)({},n,r),A));return e}function Kr(t){var e=t[t.length-1];return 3===e||4===e}function Pr(t,e){return qr.apply(this,arguments)}function qr(){return(qr=Object(a.a)(r.a.mark((function t(e,A){var n,i,o,a,s,c,I;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=[],i=Object(Dr.d)(e),o=Wr(i),o=Kr(i.shape)?[Object(g.a)({},o[0],{c:0})]:o,t.next=6,Object(Vr.c)({loader:e.data,selections:o,use3d:A});case 6:return a=t.sent,s=Object(Dr.e)(e)?[[0,255],[0,255],[0,255]]:a.domains,c=Object(Dr.e)(e)?[[255,0,0],[0,255,0],[0,0,255]]:null,I=Object(Dr.e)(e)?[[0,255],[0,255],[0,255]]:a.sliders,o.forEach((function(t,e){var A=s[e],r=I[e],i={selection:t,color:c?c[e]:1!==o.length?Rr.e[e]:[255,255,255],visible:!0,slider:r||A};n.push(i)})),t.abrupt("return",n);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Xr(t,e){var A=e.map((function(t){return Object(Dr.d)(t)}));if(t.map((function(t){var e,A,n,r,i,o;return(null===t||void 0===t||null===(e=t.metadata)||void 0===e||null===(A=e.transform)||void 0===A?void 0:A.matrix)||(null===t||void 0===t||null===(n=t.metadata)||void 0===n||null===(r=n.transform)||void 0===r?void 0:r.scale)||(null===t||void 0===t||null===(i=t.metadata)||void 0===i||null===(o=i.transform)||void 0===o?void 0:o.translate)})).some(Boolean)||A.every((function(t){var e,A,n,r;return!(null===(e=t.meta)||void 0===e||null===(A=e.physicalSizes)||void 0===A?void 0:A.x)||!(null===(n=t.meta)||void 0===n||null===(r=n.physicalSizes)||void 0===r?void 0:r.y)})))return t;var n=A.reduce((function(t,e){var A,n,r,i,o,a,s,g,c,I=null===(A=e.meta)||void 0===A||null===(n=A.physicalSizes)||void 0===n||null===(r=n.z)||void 0===r?void 0:r.size,u=[Sr("".concat(null===(i=e.meta)||void 0===i?void 0:i.physicalSizes.x.size," ").concat(null===(o=e.meta)||void 0===o?void 0:o.physicalSizes.x.unit).replace("\xb5","u")),Sr("".concat(null===(a=e.meta)||void 0===a?void 0:a.physicalSizes.y.size," ").concat(null===(s=e.meta)||void 0===s?void 0:s.physicalSizes.y.unit).replace("\xb5","u"))];I&&u.push(Sr("".concat(null===(g=e.meta)||void 0===g?void 0:g.physicalSizes.z.size," ").concat(null===(c=e.meta)||void 0===c?void 0:c.physicalSizes.z.unit).replace("\xb5","u")));return t[0]=void 0===t[0]||-1===or(u[0],t[0])?u[0]:t[0],t[1]=void 0===t[1]||-1===or(u[1],t[1])?u[1]:t[1],t[2]=void 0===t[2]||-1===or(u[2],t[2])?u[2]:t[2],t}),[]);return t.map((function(t,e){var r,i,a,s,c,I,u,C,h,f=A[e],d=null===(r=f.meta)||void 0===r||null===(i=r.physicalSizes)||void 0===i||null===(a=i.z)||void 0===a?void 0:a.size,Q=[Sr("".concat(null===(s=f.meta)||void 0===s?void 0:s.physicalSizes.x.size," ").concat(null===(c=f.meta)||void 0===c?void 0:c.physicalSizes.x.unit).replace("\xb5","u")),Sr("".concat(null===(I=f.meta)||void 0===I?void 0:I.physicalSizes.y.size," ").concat(null===(u=f.meta)||void 0===u?void 0:u.physicalSizes.y.unit).replace("\xb5","u"))];d&&Q.push(Sr("".concat(null===(C=f.meta)||void 0===C?void 0:C.physicalSizes.z.size," ").concat(null===(h=f.meta)||void 0===h?void 0:h.physicalSizes.z.unit).replace("\xb5","u")));var E=Q.map((function(t,e){return Fr(t,n[e])}));if(E[2]||(E[2]=1),l()(E,[1,1,1]))return t;var p=(new B.Matrix4).scale(Object(o.a)(E)),y=Object(g.a)({},t);return y.metadata=Object(g.a)({},y.metadata,{transform:{matrix:p.toArray()}}),y}))}function zr(t,e,A){return $r.apply(this,arguments)}function $r(){return($r=Object(a.a)(r.a.mark((function t(e,A,n){var i,o,a,s,c,I,u,l,C,h,B,f,d,Q;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=[],o=[],a=[],t.next=5,Promise.all(e.map((function(t){return t.loaderCreator()})));case 5:for(s=t.sent,c=0;c<e.length;c++)I=e[c],u=s[c],i[c]=u,o[c]=I;if(n&&(o=Xr(o,i)),A)for(B=A.map((function(t){return e.findIndex((function(e){return e.name===t}))})),f=function(t){var e=B[t],A=Pr(i[e]).then((function(A){var n,r,i,a,s;return Promise.resolve(Object(g.a)({type:(null===(n=o[e])||void 0===n||null===(r=n.metadata)||void 0===r?void 0:r.isBitmask)?"bitmask":"raster",index:e},Ur.f,{channels:A.map((function(t,A){return Object(g.a)({},t,{},o[e].channels?o[e].channels[A]:[])})),domainType:"Min/Max",modelMatrix:null===(i=o[e])||void 0===i||null===(a=i.metadata)||void 0===a||null===(s=a.transform)||void 0===s?void 0:s.matrix,transparentColor:t>0?[0,0,0]:null}))}));a.push(A)},d=0;d<B.length;d++)f(d);else l=Math.floor(e.length/2),C=i[l],h=Pr(C).then((function(t){var e,A,n,r,i;return Promise.resolve(Object(g.a)({type:(null===(e=o[l])||void 0===e||null===(A=e.metadata)||void 0===A?void 0:A.isBitmask)?"bitmask":"raster",index:l},Ur.f,{channels:t.map((function(t,e){return Object(g.a)({},t,{},o[l].channels?o[l].channels[e]:[])})),modelMatrix:null===(n=o[l])||void 0===n||null===(r=n.metadata)||void 0===r||null===(i=r.transform)||void 0===i?void 0:i.matrix,transparentColor:l>0?[0,0,0]:null}))})),a.push(h);return t.next=11,Promise.all(a);case 11:return Q=t.sent,t.abrupt("return",[Q,i,o]);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ti(t){var e=t.observationsCount,A=t.observationsLabel,n=t.observationsPluralLabel,r=t.subobservationsCount,i=t.subobservationsLabel,o=t.subobservationsPluralLabel,a=t.locationsCount,s=[];if(r>0){var g="".concat(r," ").concat(Object(Dr.f)(i,o,r));a>0&&(g+=" at ".concat(I()(a)," locations")),s.push(g)}return e>0&&s.push("".concat(e," ").concat(Object(Dr.f)(A,n,e))),s.join(", ")}function ei(t){var e=t.width,A=t.height,n=t.cells,r=t.imageLayerLoaders,i=t.useRaster,a=t.use3d,s=-1/0,g=-1/0,c=-1/0,I=-1/0,u=a?1.5:.1,l=Object.values(n);if(r.length>0&&i)for(var B=0;B<r.length;B+=1){var f={height:A,width:e},d=Object(C.k)(r[B].data,f,u,a),Q=d.target,E=d.zoom;Q[0]>s&&(s=Q[0],I=E),Q[1]>g&&(g=Q[1],I=E),Q[2]>c?(c=Q[2],I=E):c=null}else{if(!(l.length>0&&l[0].xy)||i)return{initialTargetX:null,initialTargetY:null,initialTargetZ:null,initialZoom:null};var p=l.map((function(t){return t.xy})),y=Object(h.a)(p,(function(t){return t[0]})),v=Object(h.a)(p,(function(t){return t[1]})),m=y[1]-y[0],b=v[1]-v[0],F=function(t){return[Math.min.apply(Math,Object(o.a)(t.map((function(t){return t[0]})))),Math.max.apply(Math,Object(o.a)(t.map((function(t){return t[1]}))))]};0===m&&(m=(y=F(l.map((function(t){return Object(h.a)(t.poly,(function(t){return t[0]}))}))))[1]-y[0]);0===b&&(b=(v=F(l.map((function(t){return Object(h.a)(t.poly,(function(t){return t[1]}))}))))[1]-v[0]);s=y[0]+m/2,g=v[0]+b/2,c=null,I=Math.log2(Math.min(e/m,A/b))-u}return{initialTargetX:s,initialTargetY:g,initialZoom:I,initialTargetZ:c}}function Ai(t,e){var A=Array.isArray(t)&&t.length>1||!Array.isArray(t)?t:t[0];return e?[C.g,Array.isArray(A)?A:[A]]:[Array.isArray(t)&&t.length>1?C.d:C.b,A]}function ni(t){var e=t.tile,A=e.bbox,n=A.left,r=A.top,o=A.right,a=A.bottom,s=e.x,g=e.y,c=e.z,I=t.data,u=t.id,l=t.loader;if([n,a,o,r].some((function(t){return t<0}))||!I)return null;var C=l[0],h=l[0].shape.slice(-2),B=Object(i.a)(h,2),f=B[0],d=B[1],Q=[n,I.height<C.tileSize?f:a,I.width<C.tileSize?d:o,r];return new Yr(t,{channelData:I,cellColor:{data:t.cellColorData,height:t.cellColorHeight,width:t.cellColorWidth},bounds:Q,id:"sub-layer-".concat(Q,"-").concat(u),tileId:{x:s,y:g,z:c}})}A.d(e,"g",(function(){return Zr})),A.d(e,"c",(function(){return Pr})),A.d(e,"d",(function(){return zr})),A.d(e,"e",(function(){return ti})),A.d(e,"a",(function(){return ei})),A.d(e,"b",(function(){return Ai})),A.d(e,"f",(function(){return ni}))},,,function(t,e,A){var n=A(201),r=A(537),i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,g=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(n(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=n(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var A=a.test(t);return A||s.test(t)?g(t.slice(2),A?2:8):o.test(t)?NaN:+t}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(202);e.default=function(t){var e=[1/0,1/0,-1/0,-1/0];return n.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.red=e.getContrastingColor=e.isValidHex=e.toState=e.simpleCheckForValidColor=void 0;var n=i(A(1319)),r=i(A(451));function i(t){return t&&t.__esModule?t:{default:t}}e.simpleCheckForValidColor=function(t){var e=0,A=0;return(0,n.default)(["r","g","b","a","h","s","l","v"],(function(n){if(t[n]&&(e+=1,isNaN(t[n])||(A+=1),"s"===n||"l"===n)){/^\d+%$/.test(t[n])&&(A+=1)}})),e===A&&t};var o=e.toState=function(t,e){var A=t.hex?(0,r.default)(t.hex):(0,r.default)(t),n=A.toHsl(),i=A.toHsv(),o=A.toRgb(),a=A.toHex();return 0===n.s&&(n.h=e||0,i.h=e||0),{hsl:n,hex:"000000"===a&&0===o.a?"transparent":"#"+a,rgb:o,hsv:i,oldHue:t.h||e||n.h,source:t.source}};e.isValidHex=function(t){var e="#"===String(t).charAt(0)?1:0;return t.length!==4+e&&t.length<7+e&&(0,r.default)(t).isValid()},e.getContrastingColor=function(t){if(!t)return"#fff";var e=o(t);return"transparent"===e.hex?"rgba(0,0,0,0.4)":(299*e.rgb.r+587*e.rgb.g+114*e.rgb.b)/1e3>=128?"#000":"#fff"},e.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}};e.default=e},function(t,e,A){var n=A(347);t.exports=function(t,e,A){return new n(t,A).compare(new n(e,A))}},function(t,e,A){var n=A(931),r=A(932),i=function(){"use strict";function t(e,A){var r=this;if(n(this,t),A&&"object"===typeof A||(A={loose:!!A,includePrerelease:!1}),e instanceof t)return e.loose===!!A.loose&&e.includePrerelease===!!A.includePrerelease?e:new t(e.raw,A);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=A,this.loose=!!A.loose,this.includePrerelease=!!A.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(t){return r.parseRange(t.trim())})).filter((function(t){return t.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: ".concat(e));this.format()}return r(t,[{key:"format",value:function(){return this.range=this.set.map((function(t){return t.join(" ").trim()})).join("||").trim(),this.range}},{key:"toString",value:function(){return this.range}},{key:"parseRange",value:function(t){var e=this,A=this.options.loose;t=t.trim();var n=A?c[I.HYPHENRANGELOOSE]:c[I.HYPHENRANGE];t=t.replace(n,F(this.options.includePrerelease)),a("hyphen replace",t),t=t.replace(c[I.COMPARATORTRIM],u),a("comparator trim",t,c[I.COMPARATORTRIM]),t=(t=(t=t.replace(c[I.TILDETRIM],l)).replace(c[I.CARETTRIM],C)).split(/\s+/).join(" ");var r=A?c[I.COMPARATORLOOSE]:c[I.COMPARATOR];return t.split(" ").map((function(t){return B(t,e.options)})).join(" ").split(/\s+/).map((function(t){return b(t,e.options)})).filter(this.options.loose?function(t){return!!t.match(r)}:function(){return!0}).map((function(t){return new o(t,e.options)}))}},{key:"intersects",value:function(e,A){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((function(t){return h(t,A)&&e.set.some((function(e){return h(e,A)&&t.every((function(t){return e.every((function(e){return t.intersects(e,A)}))}))}))}))}},{key:"test",value:function(t){if(!t)return!1;if("string"===typeof t)try{t=new s(t,this.options)}catch(A){return!1}for(var e=0;e<this.set.length;e++)if(w(this.set[e],t,this.options))return!0;return!1}}]),t}();t.exports=i;var o=A(819),a=A(817),s=A(347),g=A(728),c=g.re,I=g.t,u=g.comparatorTrimReplace,l=g.tildeTrimReplace,C=g.caretTrimReplace,h=function(t,e){for(var A=!0,n=t.slice(),r=n.pop();A&&n.length;)A=n.every((function(t){return r.intersects(t,e)})),r=n.pop();return A},B=function(t,e){return a("comp",t,e),t=E(t,e),a("caret",t),t=d(t,e),a("tildes",t),t=y(t,e),a("xrange",t),t=m(t,e),a("stars",t),t},f=function(t){return!t||"x"===t.toLowerCase()||"*"===t},d=function(t,e){return t.trim().split(/\s+/).map((function(t){return Q(t,e)})).join(" ")},Q=function(t,e){var A=e.loose?c[I.TILDELOOSE]:c[I.TILDE];return t.replace(A,(function(e,A,n,r,i){var o;return a("tilde",t,e,A,n,r,i),f(A)?o="":f(n)?o=">=".concat(A,".0.0 <").concat(+A+1,".0.0-0"):f(r)?o=">=".concat(A,".").concat(n,".0 <").concat(A,".").concat(+n+1,".0-0"):i?(a("replaceTilde pr",i),o=">=".concat(A,".").concat(n,".").concat(r,"-").concat(i," <").concat(A,".").concat(+n+1,".0-0")):o=">=".concat(A,".").concat(n,".").concat(r," <").concat(A,".").concat(+n+1,".0-0"),a("tilde return",o),o}))},E=function(t,e){return t.trim().split(/\s+/).map((function(t){return p(t,e)})).join(" ")},p=function(t,e){a("caret",t,e);var A=e.loose?c[I.CARETLOOSE]:c[I.CARET],n=e.includePrerelease?"-0":"";return t.replace(A,(function(e,A,r,i,o){var s;return a("caret",t,e,A,r,i,o),f(A)?s="":f(r)?s=">=".concat(A,".0.0").concat(n," <").concat(+A+1,".0.0-0"):f(i)?s="0"===A?">=".concat(A,".").concat(r,".0").concat(n," <").concat(A,".").concat(+r+1,".0-0"):">=".concat(A,".").concat(r,".0").concat(n," <").concat(+A+1,".0.0-0"):o?(a("replaceCaret pr",o),s="0"===A?"0"===r?">=".concat(A,".").concat(r,".").concat(i,"-").concat(o," <").concat(A,".").concat(r,".").concat(+i+1,"-0"):">=".concat(A,".").concat(r,".").concat(i,"-").concat(o," <").concat(A,".").concat(+r+1,".0-0"):">=".concat(A,".").concat(r,".").concat(i,"-").concat(o," <").concat(+A+1,".0.0-0")):(a("no pr"),s="0"===A?"0"===r?">=".concat(A,".").concat(r,".").concat(i).concat(n," <").concat(A,".").concat(r,".").concat(+i+1,"-0"):">=".concat(A,".").concat(r,".").concat(i).concat(n," <").concat(A,".").concat(+r+1,".0-0"):">=".concat(A,".").concat(r,".").concat(i," <").concat(+A+1,".0.0-0")),a("caret return",s),s}))},y=function(t,e){return a("replaceXRanges",t,e),t.split(/\s+/).map((function(t){return v(t,e)})).join(" ")},v=function(t,e){t=t.trim();var A=e.loose?c[I.XRANGELOOSE]:c[I.XRANGE];return t.replace(A,(function(A,n,r,i,o,s){a("xRange",t,A,n,r,i,o,s);var g=f(r),c=g||f(i),I=c||f(o),u=I;return"="===n&&u&&(n=""),s=e.includePrerelease?"-0":"",g?A=">"===n||"<"===n?"<0.0.0-0":"*":n&&u?(c&&(i=0),o=0,">"===n?(n=">=",c?(r=+r+1,i=0,o=0):(i=+i+1,o=0)):"<="===n&&(n="<",c?r=+r+1:i=+i+1),"<"===n&&(s="-0"),A="".concat(n+r,".").concat(i,".").concat(o).concat(s)):c?A=">=".concat(r,".0.0").concat(s," <").concat(+r+1,".0.0-0"):I&&(A=">=".concat(r,".").concat(i,".0").concat(s," <").concat(r,".").concat(+i+1,".0-0")),a("xRange return",A),A}))},m=function(t,e){return a("replaceStars",t,e),t.trim().replace(c[I.STAR],"")},b=function(t,e){return a("replaceGTE0",t,e),t.trim().replace(c[e.includePrerelease?I.GTE0PRE:I.GTE0],"")},F=function(t){return function(e,A,n,r,i,o,a,s,g,c,I,u,l){return A=f(n)?"":f(r)?">=".concat(n,".0.0").concat(t?"-0":""):f(i)?">=".concat(n,".").concat(r,".0").concat(t?"-0":""):o?">=".concat(A):">=".concat(A).concat(t?"-0":""),s=f(g)?"":f(c)?"<".concat(+g+1,".0.0-0"):f(I)?"<".concat(g,".").concat(+c+1,".0-0"):u?"<=".concat(g,".").concat(c,".").concat(I,"-").concat(u):t?"<".concat(g,".").concat(c,".").concat(+I+1,"-0"):"<=".concat(s),"".concat(A," ").concat(s).trim()}},w=function(t,e,A){for(var n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!A.includePrerelease){for(var r=0;r<t.length;r++)if(a(t[r].semver),t[r].semver!==o.ANY&&t[r].semver.prerelease.length>0){var i=t[r].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(202),r=A(85);e.default=function(t,e){void 0===e&&(e={});var A=0,i=0,o=0;return n.coordEach(t,(function(t){A+=t[0],i+=t[1],o++})),r.point([A/o,i/o],e.properties)}},function(t,e,A){"use strict";var n=A(518),r=A(6),i=A.n(r),o=A(11);function a(t,e){if(!t)throw new Error(e)}var s=A(270),g=s.a._parseImageNode,c="undefined"!==typeof Image,I="undefined"!==typeof ImageBitmap,u=Boolean(g),l=!!s.b||u;var C=A(26);function h(t){var e=f(t);if(!e)throw new Error("Not an image");return e}function B(t){switch(h(t)){case"data":return t;case"image":case"imagebitmap":var e=document.createElement("canvas"),A=e.getContext("2d");if(A)return e.width=t.width,e.height=t.height,A.drawImage(t,0,0),A.getImageData(0,0,t.width,t.height);default:return a(!1)}}function f(t){return"undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&t instanceof Image?"image":t&&"object"===Object(C.a)(t)&&t.data&&t.width&&t.height?"data":null}var d=/^data:image\/svg\+xml/,Q=/\.svg((\?|#).*)?$/;function E(t){return t&&(d.test(t)||Q.test(t))}function p(t,e){if(E(e)){var A=(new TextDecoder).decode(t);return"data:image/svg+xml;base64,".concat(btoa(A))}return y(t,e)}function y(t,e){if(E(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}function v(t,e,A){return m.apply(this,arguments)}function m(){return(m=Object(o.a)(i.a.mark((function t(e,A,n){var r,o,a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p(e,n),o=self.URL||self.webkitURL,a="string"!==typeof r&&o.createObjectURL(r),t.prev=3,t.next=6,b(a||r,A);case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,a&&o.revokeObjectURL(a),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[3,,7,10]])})))).apply(this,arguments)}function b(t,e){return F.apply(this,arguments)}function F(){return(F=Object(o.a)(i.a.mark((function t(e,A){var n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=new Image).src=e,!(A.image&&A.image.decode&&n.decode)){t.next=6;break}return t.next=5,n.decode();case 5:return t.abrupt("return",n);case 6:return t.next=8,new Promise((function(t,A){try{n.onload=function(){return t(n)},n.onerror=function(t){return A(new Error("Could not load image ".concat(e,": ").concat(t)))}}catch(r){A(r)}}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var w={},S=!0;function D(t,e,A){return R.apply(this,arguments)}function R(){return(R=Object(o.a)(i.a.mark((function t(e,A,n){var r,o,a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!E(n)){t.next=7;break}return t.next=3,v(e,A,n);case 3:o=t.sent,r=o,t.next=8;break;case 7:r=y(e,n);case 8:return a=A&&A.imagebitmap,t.next=11,U(r,a);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function U(t){return G.apply(this,arguments)}function G(){return(G=Object(o.a)(i.a.mark((function t(e){var A,n=arguments;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!N(A=n.length>1&&void 0!==n[1]?n[1]:null)&&S||(A=null),!A){t.next=13;break}return t.prev=3,t.next=6,createImageBitmap(e,A);case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(3),console.warn(t.t0),S=!1;case 13:return t.next=15,createImageBitmap(e);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function N(t){for(var e in t||w)return!1;return!0}function k(t){var e=x(t);return function(t){var e=x(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){var e=x(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;var A=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var A=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:A}}(),n=A.tableMarkers,r=A.sofMarkers,i=2;for(;i+9<e.byteLength;){var o=e.getUint16(i,!1);if(r.has(o))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!n.has(o))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){var e=x(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){var e=x(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function x(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}function O(t,e){var A=(k(t)||{}).mimeType,n=s.a._parseImageNode;return a(n),n(t,A,e)}function M(){return(M=Object(o.a)(i.a.mark((function t(e,A,n){var r,o,s,g,c;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(A=A||{}).image||{},o=r.type||"auto",s=(n||{}).url,g=L(o),t.t0=g,t.next="imagebitmap"===t.t0?8:"image"===t.t0?12:"data"===t.t0?16:20;break;case 8:return t.next=10,D(e,A,s);case 10:return c=t.sent,t.abrupt("break",21);case 12:return t.next=14,v(e,A,s);case 14:return c=t.sent,t.abrupt("break",21);case 16:return t.next=18,O(e,A);case 18:return c=t.sent,t.abrupt("break",21);case 20:a(!1);case 21:return"data"===o&&(c=B(c)),t.abrupt("return",c);case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(t){switch(t){case"auto":case"data":return function(){if(I)return"imagebitmap";if(c)return"image";if(l)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return I||c||l;case"imagebitmap":return I;case"image":return c;case"data":return l;case"html":return c;case"ndarray":return l;default:throw new Error("@loaders.gl/images: image ".concat(t," not supported in this environment"))}}(t),t}}var _={id:"image",name:"Images",version:"2.3.13",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(t,e,A){return M.apply(this,arguments)},tests:[function(t){return Boolean(k(new DataView(t)))}],options:{image:{type:"auto",decode:!0}}},J=A(60),T=A(43),j=A(79);var H={name:"JSON",extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:function(t){var e=t[0],A=t[t.length-1];return"{"===e&&"}"===A||"["===e&&"]"===A},parseTextSync:JSON.parse},Y=J.global.deck&&J.global.deck.VERSION;if(Y&&"8.4.10"!==Y)throw new Error("deck.gl - multiple versions detected: ".concat(Y," vs ").concat("8.4.10"));Y||(J.global.deck=Object.assign(J.global.deck||{},{VERSION:"8.4.10",version:"8.4.10",log:T.a,_registerLoggers:j.b}),Object(n.b)([H,[_,{imagebitmap:{premultiplyAlpha:"none"}}]]));e.a=J.global.deck},function(t,e,A){"use strict";(function(t){var A="undefined"!==typeof window&&"undefined"!==typeof document&&"undefined"!==typeof navigator,n=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(A&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();var r=A&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),n))}};function i(t){return t&&"[object Function]"==={}.toString.call(t)}function o(t,e){if(1!==t.nodeType)return[];var A=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?A[e]:A}function a(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function s(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=o(t),A=e.overflow,n=e.overflowX,r=e.overflowY;return/(auto|scroll|overlay)/.test(A+r+n)?t:s(a(t))}function g(t){return t&&t.referenceNode?t.referenceNode:t}var c=A&&!(!window.MSInputMethodContext||!document.documentMode),I=A&&/MSIE 10/.test(navigator.userAgent);function u(t){return 11===t?c:10===t?I:c||I}function l(t){if(!t)return document.documentElement;for(var e=u(10)?document.body:null,A=t.offsetParent||null;A===e&&t.nextElementSibling;)A=(t=t.nextElementSibling).offsetParent;var n=A&&A.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(A.nodeName)&&"static"===o(A,"position")?l(A):A:t?t.ownerDocument.documentElement:document.documentElement}function C(t){return null!==t.parentNode?C(t.parentNode):t}function h(t,e){if(!t||!t.nodeType||!e||!e.nodeType)return document.documentElement;var A=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=A?t:e,r=A?e:t,i=document.createRange();i.setStart(n,0),i.setEnd(r,0);var o=i.commonAncestorContainer;if(t!==o&&e!==o||n.contains(r))return function(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||l(t.firstElementChild)===t)}(o)?o:l(o);var a=C(t);return a.host?h(a.host,e):h(t,C(e).host)}function B(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",A="top"===e?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var r=t.ownerDocument.documentElement,i=t.ownerDocument.scrollingElement||r;return i[A]}return t[A]}function f(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=B(e,"top"),r=B(e,"left"),i=A?-1:1;return t.top+=n*i,t.bottom+=n*i,t.left+=r*i,t.right+=r*i,t}function d(t,e){var A="x"===e?"Left":"Top",n="Left"===A?"Right":"Bottom";return parseFloat(t["border"+A+"Width"])+parseFloat(t["border"+n+"Width"])}function Q(t,e,A,n){return Math.max(e["offset"+t],e["scroll"+t],A["client"+t],A["offset"+t],A["scroll"+t],u(10)?parseInt(A["offset"+t])+parseInt(n["margin"+("Height"===t?"Top":"Left")])+parseInt(n["margin"+("Height"===t?"Bottom":"Right")]):0)}function E(t){var e=t.body,A=t.documentElement,n=u(10)&&getComputedStyle(A);return{height:Q("Height",e,A,n),width:Q("Width",e,A,n)}}var p=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},y=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),v=function(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t},m=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t};function b(t){return m({},t,{right:t.left+t.width,bottom:t.top+t.height})}function F(t){var e={};try{if(u(10)){e=t.getBoundingClientRect();var A=B(t,"top"),n=B(t,"left");e.top+=A,e.left+=n,e.bottom+=A,e.right+=n}else e=t.getBoundingClientRect()}catch(l){}var r={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},i="HTML"===t.nodeName?E(t.ownerDocument):{},a=i.width||t.clientWidth||r.width,s=i.height||t.clientHeight||r.height,g=t.offsetWidth-a,c=t.offsetHeight-s;if(g||c){var I=o(t);g-=d(I,"x"),c-=d(I,"y"),r.width-=g,r.height-=c}return b(r)}function w(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=u(10),r="HTML"===e.nodeName,i=F(t),a=F(e),g=s(t),c=o(e),I=parseFloat(c.borderTopWidth),l=parseFloat(c.borderLeftWidth);A&&r&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var C=b({top:i.top-a.top-I,left:i.left-a.left-l,width:i.width,height:i.height});if(C.marginTop=0,C.marginLeft=0,!n&&r){var h=parseFloat(c.marginTop),B=parseFloat(c.marginLeft);C.top-=I-h,C.bottom-=I-h,C.left-=l-B,C.right-=l-B,C.marginTop=h,C.marginLeft=B}return(n&&!A?e.contains(g):e===g&&"BODY"!==g.nodeName)&&(C=f(C,e)),C}function S(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=t.ownerDocument.documentElement,n=w(t,A),r=Math.max(A.clientWidth,window.innerWidth||0),i=Math.max(A.clientHeight,window.innerHeight||0),o=e?0:B(A),a=e?0:B(A,"left"),s={top:o-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:r,height:i};return b(s)}function D(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===o(t,"position"))return!0;var A=a(t);return!!A&&D(A)}function R(t){if(!t||!t.parentElement||u())return document.documentElement;for(var e=t.parentElement;e&&"none"===o(e,"transform");)e=e.parentElement;return e||document.documentElement}function U(t,e,A,n){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},o=r?R(t):h(t,g(e));if("viewport"===n)i=S(o,r);else{var c=void 0;"scrollParent"===n?"BODY"===(c=s(a(e))).nodeName&&(c=t.ownerDocument.documentElement):c="window"===n?t.ownerDocument.documentElement:n;var I=w(c,o,r);if("HTML"!==c.nodeName||D(o))i=I;else{var u=E(t.ownerDocument),l=u.height,C=u.width;i.top+=I.top-I.marginTop,i.bottom=l+I.top,i.left+=I.left-I.marginLeft,i.right=C+I.left}}var B="number"===typeof(A=A||0);return i.left+=B?A:A.left||0,i.top+=B?A:A.top||0,i.right-=B?A:A.right||0,i.bottom-=B?A:A.bottom||0,i}function G(t){return t.width*t.height}function N(t,e,A,n,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var o=U(A,n,i,r),a={top:{width:o.width,height:e.top-o.top},right:{width:o.right-e.right,height:o.height},bottom:{width:o.width,height:o.bottom-e.bottom},left:{width:e.left-o.left,height:o.height}},s=Object.keys(a).map((function(t){return m({key:t},a[t],{area:G(a[t])})})).sort((function(t,e){return e.area-t.area})),g=s.filter((function(t){var e=t.width,n=t.height;return e>=A.clientWidth&&n>=A.clientHeight})),c=g.length>0?g[0].key:s[0].key,I=t.split("-")[1];return c+(I?"-"+I:"")}function k(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=n?R(e):h(e,g(A));return w(A,r,n)}function x(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),A=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),n=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+n,height:t.offsetHeight+A}}function O(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function M(t,e,A){A=A.split("-")[0];var n=x(t),r={width:n.width,height:n.height},i=-1!==["right","left"].indexOf(A),o=i?"top":"left",a=i?"left":"top",s=i?"height":"width",g=i?"width":"height";return r[o]=e[o]+e[s]/2-n[s]/2,r[a]=A===a?e[a]-n[g]:e[O(a)],r}function L(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function _(t,e,A){return(void 0===A?t:t.slice(0,function(t,e,A){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===A}));var n=L(t,(function(t){return t[e]===A}));return t.indexOf(n)}(t,"name",A))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var A=t.function||t.fn;t.enabled&&i(A)&&(e.offsets.popper=b(e.offsets.popper),e.offsets.reference=b(e.offsets.reference),e=A(e,t))})),e}function J(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=k(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=N(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=M(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=_(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function T(t,e){return t.some((function(t){var A=t.name;return t.enabled&&A===e}))}function j(t){for(var e=[!1,"ms","Webkit","Moz","O"],A=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length;n++){var r=e[n],i=r?""+r+A:t;if("undefined"!==typeof document.body.style[i])return i}return null}function H(){return this.state.isDestroyed=!0,T(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[j("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Y(t){var e=t.ownerDocument;return e?e.defaultView:window}function V(t,e,A,n){A.updateBound=n,Y(t).addEventListener("resize",A.updateBound,{passive:!0});var r=s(t);return function t(e,A,n,r){var i="BODY"===e.nodeName,o=i?e.ownerDocument.defaultView:e;o.addEventListener(A,n,{passive:!0}),i||t(s(o.parentNode),A,n,r),r.push(o)}(r,"scroll",A.updateBound,A.scrollParents),A.scrollElement=r,A.eventsEnabled=!0,A}function Z(){this.state.eventsEnabled||(this.state=V(this.reference,this.options,this.state,this.scheduleUpdate))}function W(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,Y(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach((function(t){t.removeEventListener("scroll",e.updateBound)})),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function K(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function P(t,e){Object.keys(e).forEach((function(A){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(A)&&K(e[A])&&(n="px"),t.style[A]=e[A]+n}))}var q=A&&/Firefox/i.test(navigator.userAgent);function X(t,e,A){var n=L(t,(function(t){return t.name===e})),r=!!n&&t.some((function(t){return t.name===A&&t.enabled&&t.order<n.order}));if(!r){var i="`"+e+"`",o="`"+A+"`";console.warn(o+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return r}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 tt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=$.indexOf(t),n=$.slice(A+1).concat($.slice(0,A));return e?n.reverse():n}var et="flip",At="clockwise",nt="counterclockwise";function rt(t,e,A,n){var r=[0,0],i=-1!==["right","left"].indexOf(n),o=t.split(/(\+|\-)/).map((function(t){return t.trim()})),a=o.indexOf(L(o,(function(t){return-1!==t.search(/,|\s/)})));o[a]&&-1===o[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,g=-1!==a?[o.slice(0,a).concat([o[a].split(s)[0]]),[o[a].split(s)[1]].concat(o.slice(a+1))]:[o];return(g=g.map((function(t,n){var r=(1===n?!i:i)?"height":"width",o=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,o=!0,t):o?(t[t.length-1]+=e,o=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,A,n){var r=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],o=r[2];if(!i)return t;if(0===o.indexOf("%")){var a=void 0;switch(o){case"%p":a=A;break;case"%":case"%r":default:a=n}return b(a)[e]/100*i}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*i}return i}(t,r,e,A)}))}))).forEach((function(t,e){t.forEach((function(A,n){K(A)&&(r[e]+=A*("-"===t[n-1]?-1:1))}))})),r}var it={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,A=e.split("-")[0],n=e.split("-")[1];if(n){var r=t.offsets,i=r.reference,o=r.popper,a=-1!==["bottom","top"].indexOf(A),s=a?"left":"top",g=a?"width":"height",c={start:v({},s,i[s]),end:v({},s,i[s]+i[g]-o[g])};t.offsets.popper=m({},o,c[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var A=e.offset,n=t.placement,r=t.offsets,i=r.popper,o=r.reference,a=n.split("-")[0],s=void 0;return s=K(+A)?[+A,0]:rt(A,i,o,a),"left"===a?(i.top+=s[0],i.left-=s[1]):"right"===a?(i.top+=s[0],i.left+=s[1]):"top"===a?(i.left+=s[0],i.top-=s[1]):"bottom"===a&&(i.left+=s[0],i.top+=s[1]),t.popper=i,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var A=e.boundariesElement||l(t.instance.popper);t.instance.reference===A&&(A=l(A));var n=j("transform"),r=t.instance.popper.style,i=r.top,o=r.left,a=r[n];r.top="",r.left="",r[n]="";var s=U(t.instance.popper,t.instance.reference,e.padding,A,t.positionFixed);r.top=i,r.left=o,r[n]=a,e.boundaries=s;var g=e.priority,c=t.offsets.popper,I={primary:function(t){var A=c[t];return c[t]<s[t]&&!e.escapeWithReference&&(A=Math.max(c[t],s[t])),v({},t,A)},secondary:function(t){var A="right"===t?"left":"top",n=c[A];return c[t]>s[t]&&!e.escapeWithReference&&(n=Math.min(c[A],s[t]-("right"===t?c.width:c.height))),v({},A,n)}};return g.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=m({},c,I[e](t))})),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,A=e.popper,n=e.reference,r=t.placement.split("-")[0],i=Math.floor,o=-1!==["top","bottom"].indexOf(r),a=o?"right":"bottom",s=o?"left":"top",g=o?"width":"height";return A[a]<i(n[s])&&(t.offsets.popper[s]=i(n[s])-A[g]),A[s]>i(n[a])&&(t.offsets.popper[s]=i(n[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var A;if(!X(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"===typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],i=t.offsets,a=i.popper,s=i.reference,g=-1!==["left","right"].indexOf(r),c=g?"height":"width",I=g?"Top":"Left",u=I.toLowerCase(),l=g?"left":"top",C=g?"bottom":"right",h=x(n)[c];s[C]-h<a[u]&&(t.offsets.popper[u]-=a[u]-(s[C]-h)),s[u]+h>a[C]&&(t.offsets.popper[u]+=s[u]+h-a[C]),t.offsets.popper=b(t.offsets.popper);var B=s[u]+s[c]/2-h/2,f=o(t.instance.popper),d=parseFloat(f["margin"+I]),Q=parseFloat(f["border"+I+"Width"]),E=B-t.offsets.popper[u]-d-Q;return E=Math.max(Math.min(a[c]-h,E),0),t.arrowElement=n,t.offsets.arrow=(v(A={},u,Math.round(E)),v(A,l,""),A),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(T(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var A=U(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],r=O(n),i=t.placement.split("-")[1]||"",o=[];switch(e.behavior){case et:o=[n,r];break;case At:o=tt(n);break;case nt:o=tt(n,!0);break;default:o=e.behavior}return o.forEach((function(a,s){if(n!==a||o.length===s+1)return t;n=t.placement.split("-")[0],r=O(n);var g=t.offsets.popper,c=t.offsets.reference,I=Math.floor,u="left"===n&&I(g.right)>I(c.left)||"right"===n&&I(g.left)<I(c.right)||"top"===n&&I(g.bottom)>I(c.top)||"bottom"===n&&I(g.top)<I(c.bottom),l=I(g.left)<I(A.left),C=I(g.right)>I(A.right),h=I(g.top)<I(A.top),B=I(g.bottom)>I(A.bottom),f="left"===n&&l||"right"===n&&C||"top"===n&&h||"bottom"===n&&B,d=-1!==["top","bottom"].indexOf(n),Q=!!e.flipVariations&&(d&&"start"===i&&l||d&&"end"===i&&C||!d&&"start"===i&&h||!d&&"end"===i&&B),E=!!e.flipVariationsByContent&&(d&&"start"===i&&C||d&&"end"===i&&l||!d&&"start"===i&&B||!d&&"end"===i&&h),p=Q||E;(u||f||p)&&(t.flipped=!0,(u||f)&&(n=o[s+1]),p&&(i=function(t){return"end"===t?"start":"start"===t?"end":t}(i)),t.placement=n+(i?"-"+i:""),t.offsets.popper=m({},t.offsets.popper,M(t.instance.popper,t.offsets.reference,t.placement)),t=_(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,A=e.split("-")[0],n=t.offsets,r=n.popper,i=n.reference,o=-1!==["left","right"].indexOf(A),a=-1===["top","left"].indexOf(A);return r[o?"left":"top"]=i[A]-(a?r[o?"width":"height"]:0),t.placement=O(e),t.offsets.popper=b(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!X(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,A=L(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottom<A.top||e.left>A.right||e.top>A.bottom||e.right<A.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var A=e.x,n=e.y,r=t.offsets.popper,i=L(t.instance.modifiers,(function(t){return"applyStyle"===t.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var o=void 0!==i?i:e.gpuAcceleration,a=l(t.instance.popper),s=F(a),g={position:r.position},c=function(t,e){var A=t.offsets,n=A.popper,r=A.reference,i=Math.round,o=Math.floor,a=function(t){return t},s=i(r.width),g=i(n.width),c=-1!==["left","right"].indexOf(t.placement),I=-1!==t.placement.indexOf("-"),u=e?c||I||s%2===g%2?i:o:a,l=e?i:a;return{left:u(s%2===1&&g%2===1&&!I&&e?n.left-1:n.left),top:l(n.top),bottom:l(n.bottom),right:u(n.right)}}(t,window.devicePixelRatio<2||!q),I="bottom"===A?"top":"bottom",u="right"===n?"left":"right",C=j("transform"),h=void 0,B=void 0;if(B="bottom"===I?"HTML"===a.nodeName?-a.clientHeight+c.bottom:-s.height+c.bottom:c.top,h="right"===u?"HTML"===a.nodeName?-a.clientWidth+c.right:-s.width+c.right:c.left,o&&C)g[C]="translate3d("+h+"px, "+B+"px, 0)",g[I]=0,g[u]=0,g.willChange="transform";else{var f="bottom"===I?-1:1,d="right"===u?-1:1;g[I]=B*f,g[u]=h*d,g.willChange=I+", "+u}var Q={"x-placement":t.placement};return t.attributes=m({},Q,t.attributes),t.styles=m({},g,t.styles),t.arrowStyles=m({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,A;return P(t.instance.popper,t.styles),e=t.instance.popper,A=t.attributes,Object.keys(A).forEach((function(t){!1!==A[t]?e.setAttribute(t,A[t]):e.removeAttribute(t)})),t.arrowElement&&Object.keys(t.arrowStyles).length&&P(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,A,n,r){var i=k(r,e,t,A.positionFixed),o=N(A.placement,i,e,t,A.modifiers.flip.boundariesElement,A.modifiers.flip.padding);return e.setAttribute("x-placement",o),P(e,{position:A.positionFixed?"fixed":"absolute"}),A},gpuAcceleration:void 0}}},ot=function(){function t(e,A){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};p(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=r(this.update.bind(this)),this.options=m({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=A&&A.jquery?A[0]:A,this.options.modifiers={},Object.keys(m({},t.Defaults.modifiers,o.modifiers)).forEach((function(e){n.options.modifiers[e]=m({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return m({name:t},n.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&i(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)})),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return y(t,[{key:"update",value:function(){return J.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return Z.call(this)}},{key:"disableEventListeners",value:function(){return W.call(this)}}]),t}();ot.Utils=("undefined"!==typeof window?window:t).PopperUtils,ot.placements=z,ot.Defaults=it,e.a=ot}).call(this,A(58))},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.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");e.default=i},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.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");e.default=i},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.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");e.default=i},function(t,e,A){var n;!function(A){"use strict";var r={s:1,n:0,d:1};function i(t){function e(){var e=Error.apply(this,arguments);e.name=this.name=t,this.stack=e.stack,this.message=e.message}function A(){}return A.prototype=Error.prototype,e.prototype=new A,e}var o=u.DivisionByZero=i("DivisionByZero"),a=u.InvalidParameter=i("InvalidParameter");function s(t,e){return isNaN(t=parseInt(t,10))&&g(),t*e}function g(){throw new a}var c=function(t,e){var A,n=0,i=1,a=1,c=0,I=0,u=0,l=1,C=1,h=0,B=1,f=1,d=1,Q=1e7;if(void 0===t||null===t);else if(void 0!==e)a=(n=t)*(i=e);else switch(typeof t){case"object":"d"in t&&"n"in t?(n=t.n,i=t.d,"s"in t&&(n*=t.s)):0 in t?(n=t[0],1 in t&&(i=t[1])):g(),a=n*i;break;case"number":if(t<0&&(a=t,t=-t),t%1===0)n=t;else if(t>0){for(t>=1&&(t/=C=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)));B<=Q&&d<=Q;){if(t===(A=(h+f)/(B+d))){B+d<=Q?(n=h+f,i=B+d):d>B?(n=f,i=d):(n=h,i=B);break}t>A?(h+=f,B+=d):(f+=h,d+=B),B>Q?(n=f,i=d):(n=h,i=B)}n*=C}else(isNaN(t)||isNaN(e))&&(i=n=NaN);break;case"string":if(null===(B=t.match(/\d+|./g))&&g(),"-"===B[h]?(a=-1,h++):"+"===B[h]&&h++,B.length===h+1?I=s(B[h++],a):"."===B[h+1]||"."===B[h]?("."!==B[h]&&(c=s(B[h++],a)),(++h+1===B.length||"("===B[h+1]&&")"===B[h+3]||"'"===B[h+1]&&"'"===B[h+3])&&(I=s(B[h],a),l=Math.pow(10,B[h].length),h++),("("===B[h]&&")"===B[h+2]||"'"===B[h]&&"'"===B[h+2])&&(u=s(B[h+1],a),C=Math.pow(10,B[h+1].length)-1,h+=3)):"/"===B[h+1]||":"===B[h+1]?(I=s(B[h],a),l=s(B[h+2],1),h+=3):"/"===B[h+3]&&" "===B[h+1]&&(c=s(B[h],a),I=s(B[h+2],a),l=s(B[h+4],1),h+=5),B.length<=h){a=n=u+(i=l*C)*c+C*I;break}default:g()}if(0===i)throw new o;r.s=a<0?-1:1,r.n=Math.abs(n),r.d=Math.abs(i)};function I(t,e){if(!t)return e;if(!e)return t;for(;;){if(!(t%=e))return e;if(!(e%=t))return t}}function u(t,e){if(!(this instanceof u))return new u(t,e);c(t,e),t=u.REDUCE?I(r.d,r.n):1,this.s=r.s,this.n=r.n/t,this.d=r.d/t}u.REDUCE=1,u.prototype={s:1,n:0,d:1,abs:function(){return new u(this.n,this.d)},neg:function(){return new u(-this.s*this.n,this.d)},add:function(t,e){return c(t,e),new u(this.s*this.n*r.d+r.s*this.d*r.n,this.d*r.d)},sub:function(t,e){return c(t,e),new u(this.s*this.n*r.d-r.s*this.d*r.n,this.d*r.d)},mul:function(t,e){return c(t,e),new u(this.s*r.s*this.n*r.n,this.d*r.d)},div:function(t,e){return c(t,e),new u(this.s*r.s*this.n*r.d,this.d*r.n)},clone:function(){return new u(this)},mod:function(t,e){return isNaN(this.n)||isNaN(this.d)?new u(NaN):void 0===t?new u(this.s*this.n%this.d,1):(c(t,e),0===r.n&&0===this.d&&u(0,0),new u(this.s*(r.d*this.n)%(r.n*this.d),r.d*this.d))},gcd:function(t,e){return c(t,e),new u(I(r.n,this.n)*I(r.d,this.d),r.d*this.d)},lcm:function(t,e){return c(t,e),0===r.n&&0===this.n?new u:new u(r.n*this.n,I(r.n,this.n)*I(r.d,this.d))},ceil:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):new u(Math.ceil(t*this.s*this.n/this.d),t)},floor:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):new u(Math.floor(t*this.s*this.n/this.d),t)},round:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new u(NaN):new u(Math.round(t*this.s*this.n/this.d),t)},inverse:function(){return new u(this.s*this.d,this.n)},pow:function(t){return t<0?new u(Math.pow(this.s*this.d,-t),Math.pow(this.n,-t)):new u(Math.pow(this.s*this.n,t),Math.pow(this.d,t))},equals:function(t,e){return c(t,e),this.s*this.n*r.d===r.s*r.n*this.d},compare:function(t,e){c(t,e);var A=this.s*this.n*r.d-r.s*r.n*this.d;return(0<A)-(A<0)},simplify:function(t){if(isNaN(this.n)||isNaN(this.d))return this;var e=this.abs().toContinued();function A(t){return 1===t.length?new u(t[0]):A(t.slice(1)).inverse().add(t[0])}t=t||.001;for(var n=0;n<e.length;n++){var r=A(e.slice(0,n+1));if(r.sub(this.abs()).abs().valueOf()<t)return r.mul(this.s)}return this},divisible:function(t,e){return c(t,e),!(!(r.n*this.d)||this.n*r.d%(r.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(t){var e,A="",n=this.n,r=this.d;return this.s<0&&(A+="-"),1===r?A+=n:(t&&(e=Math.floor(n/r))>0&&(A+=e,A+=" ",n%=r),A+=n,A+="/",A+=r),A},toLatex:function(t){var e,A="",n=this.n,r=this.d;return this.s<0&&(A+="-"),1===r?A+=n:(t&&(e=Math.floor(n/r))>0&&(A+=e,n%=r),A+="\\frac{",A+=n,A+="}{",A+=r,A+="}"),A},toContinued:function(){var t,e=this.n,A=this.d,n=[];if(isNaN(e)||isNaN(A))return n;do{n.push(Math.floor(e/A)),t=e%A,e=A,A=t}while(1!==e);return n},toString:function(t){var e,A=this.n,n=this.d;if(isNaN(A)||isNaN(n))return"NaN";u.REDUCE||(A/=e=I(A,n),n/=e),t=t||15;var r=function(t,e){for(;e%2===0;e/=2);for(;e%5===0;e/=5);if(1===e)return 0;for(var A=10%e,n=1;1!==A;n++)if(A=10*A%e,n>2e3)return 0;return n}(0,n),i=function(t,e,A){for(var n=1,r=function(t,e,A){for(var n=1;e>0;t=t*t%A,e>>=1)1&e&&(n=n*t%A);return n}(10,A,e),i=0;i<300;i++){if(n===r)return i;n=10*n%e,r=10*r%e}return 0}(0,n,r),o=-1===this.s?"-":"";if(o+=A/n|0,A%=n,(A*=10)&&(o+="."),r){for(var a=i;a--;)o+=A/n|0,A%=n,A*=10;o+="(";for(a=r;a--;)o+=A/n|0,A%=n,A*=10;o+=")"}else for(a=t;A&&a--;)o+=A/n|0,A%=n,A*=10;return o}},void 0===(n=function(){return u}.apply(e,[]))||(t.exports=n)}()},function(t,e){t.exports=function t(e,A){"use strict";var n,r,i=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,o=/(^[ ]*|[ ]*$)/g,a=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,s=/^0x[0-9a-f]+$/i,g=/^0/,c=function(e){return t.insensitive&&(""+e).toLowerCase()||""+e},I=c(e).replace(o,"")||"",u=c(A).replace(o,"")||"",l=I.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),C=u.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=parseInt(I.match(s),16)||1!==l.length&&I.match(a)&&Date.parse(I),B=parseInt(u.match(s),16)||h&&u.match(a)&&Date.parse(u)||null;if(B){if(h<B)return-1;if(h>B)return 1}for(var f=0,d=Math.max(l.length,C.length);f<d;f++){if(n=!(l[f]||"").match(g)&&parseFloat(l[f])||l[f]||0,r=!(C[f]||"").match(g)&&parseFloat(C[f])||C[f]||0,isNaN(n)!==isNaN(r))return isNaN(n)?1:-1;if(typeof n!==typeof r&&(n+="",r+=""),n<r)return-1;if(n>r)return 1}return 0}},function(t,e,A){var n=function(t){"use strict";var e=Object.prototype,A=e.hasOwnProperty,n="function"===typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function a(t,e,A,n){var r=e&&e.prototype instanceof c?e:c,i=Object.create(r.prototype),o=new y(n||[]);return i._invoke=function(t,e,A){var n="suspendedStart";return function(r,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw i;return m()}for(A.method=r,A.arg=i;;){var o=A.delegate;if(o){var a=Q(o,A);if(a){if(a===g)continue;return a}}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if("suspendedStart"===n)throw n="completed",A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);n="executing";var c=s(t,e,A);if("normal"===c.type){if(n=A.done?"completed":"suspendedYield",c.arg===g)continue;return{value:c.arg,done:A.done}}"throw"===c.type&&(n="completed",A.method="throw",A.arg=c.arg)}}}(t,A,o),i}function s(t,e,A){try{return{type:"normal",arg:t.call(e,A)}}catch(n){return{type:"throw",arg:n}}}t.wrap=a;var g={};function c(){}function I(){}function u(){}var l={};l[r]=function(){return this};var C=Object.getPrototypeOf,h=C&&C(C(v([])));h&&h!==e&&A.call(h,r)&&(l=h);var B=u.prototype=c.prototype=Object.create(l);function f(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function d(t,e){var n;this._invoke=function(r,i){function o(){return new e((function(n,o){!function n(r,i,o,a){var g=s(t[r],t,i);if("throw"!==g.type){var c=g.arg,I=c.value;return I&&"object"===typeof I&&A.call(I,"__await")?e.resolve(I.__await).then((function(t){n("next",t,o,a)}),(function(t){n("throw",t,o,a)})):e.resolve(I).then((function(t){c.value=t,o(c)}),(function(t){return n("throw",t,o,a)}))}a(g.arg)}(r,i,n,o)}))}return n=n?n.then(o,o):o()}}function Q(t,e){var A=t.iterator[e.method];if(void 0===A){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,Q(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var n=s(A,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,g;var r=n.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,g):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function p(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function y(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function v(t){if(t){var e=t[r];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(A.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:m}}function m(){return{value:void 0,done:!0}}return I.prototype=B.constructor=u,u.constructor=I,u[o]=I.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===I||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,o in t||(t[o]="GeneratorFunction")),t.prototype=Object.create(B),t},t.awrap=function(t){return{__await:t}},f(d.prototype),d.prototype[i]=function(){return this},t.AsyncIterator=d,t.async=function(e,A,n,r,i){void 0===i&&(i=Promise);var o=new d(a(e,A,n,r),i);return t.isGeneratorFunction(A)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},f(B),B[o]="Generator",B[r]=function(){return this},B.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var A in t)e.push(A);return e.reverse(),function A(){for(;e.length;){var n=e.pop();if(n in t)return A.value=n,A.done=!1,A}return A.done=!0,A}},t.values=v,y.prototype={constructor:y,reset:function(t){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(p),!t)for(var e in this)"t"===e.charAt(0)&&A.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(A,n){return o.type="throw",o.arg=t,e.next=A,n&&(e.method="next",e.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=A.call(i,"catchLoc"),s=A.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&A.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var A=this.tryEntries[e];if(A.finallyLoc===t)return this.complete(A.completion,A.afterLoc),p(A),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var A=this.tryEntries[e];if(A.tryLoc===t){var n=A.completion;if("throw"===n.type){var r=n.arg;p(A)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,A){return this.delegate={iterator:v(t),resultName:e,nextLoc:A},"next"===this.method&&(this.arg=void 0),g}},t}(t.exports);try{regeneratorRuntime=n}catch(r){Function("r","regeneratorRuntime = r")(n)}},function(t,e,A){var n=A(244),r=A(201);t.exports=function(t){if(!r(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,A){var n=A(693),r=A(700),i=A(702),o=A(703),a=A(704);function s(t){var e=-1,A=null==t?0:t.length;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s},function(t,e,A){var n=A(715),r=A(540),i=A(555),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},,function(t,e,A){var n=A(587),r=A(716),i=A(363);t.exports=function(t){return i(t)?n(t):r(t)}},function(t,e){var A=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&A.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,A){var n;!function(r){var i=/^\s+/,o=/\s+$/,a=0,s=r.round,g=r.min,c=r.max,I=r.random;function u(t,e){if(e=e||{},(t=t||"")instanceof u)return t;if(!(this instanceof u))return new u(t,e);var A=function(t){var e={r:0,g:0,b:0},A=1,n=null,a=null,s=null,I=!1,u=!1;"string"==typeof t&&(t=function(t){t=t.replace(i,"").replace(o,"").toLowerCase();var e,A=!1;if(R[t])t=R[t],A=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=J.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=J.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=J.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=J.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=J.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=J.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=J.hex8.exec(t))return{r:x(e[1]),g:x(e[2]),b:x(e[3]),a:_(e[4]),format:A?"name":"hex8"};if(e=J.hex6.exec(t))return{r:x(e[1]),g:x(e[2]),b:x(e[3]),format:A?"name":"hex"};if(e=J.hex4.exec(t))return{r:x(e[1]+""+e[1]),g:x(e[2]+""+e[2]),b:x(e[3]+""+e[3]),a:_(e[4]+""+e[4]),format:A?"name":"hex8"};if(e=J.hex3.exec(t))return{r:x(e[1]+""+e[1]),g:x(e[2]+""+e[2]),b:x(e[3]+""+e[3]),format:A?"name":"hex"};return!1}(t));"object"==typeof t&&(T(t.r)&&T(t.g)&&T(t.b)?(l=t.r,C=t.g,h=t.b,e={r:255*N(l,255),g:255*N(C,255),b:255*N(h,255)},I=!0,u="%"===String(t.r).substr(-1)?"prgb":"rgb"):T(t.h)&&T(t.s)&&T(t.v)?(n=M(t.s),a=M(t.v),e=function(t,e,A){t=6*N(t,360),e=N(e,100),A=N(A,100);var n=r.floor(t),i=t-n,o=A*(1-e),a=A*(1-i*e),s=A*(1-(1-i)*e),g=n%6;return{r:255*[A,a,o,o,s,A][g],g:255*[s,A,A,a,o,o][g],b:255*[o,o,s,A,A,a][g]}}(t.h,n,a),I=!0,u="hsv"):T(t.h)&&T(t.s)&&T(t.l)&&(n=M(t.s),s=M(t.l),e=function(t,e,A){var n,r,i;function o(t,e,A){return A<0&&(A+=1),A>1&&(A-=1),A<1/6?t+6*(e-t)*A:A<.5?e:A<2/3?t+(e-t)*(2/3-A)*6:t}if(t=N(t,360),e=N(e,100),A=N(A,100),0===e)n=r=i=A;else{var a=A<.5?A*(1+e):A+e-A*e,s=2*A-a;n=o(s,a,t+1/3),r=o(s,a,t),i=o(s,a,t-1/3)}return{r:255*n,g:255*r,b:255*i}}(t.h,n,s),I=!0,u="hsl"),t.hasOwnProperty("a")&&(A=t.a));var l,C,h;return A=G(A),{ok:I,format:t.format||u,r:g(255,c(e.r,0)),g:g(255,c(e.g,0)),b:g(255,c(e.b,0)),a:A}}(t);this._originalInput=t,this._r=A.r,this._g=A.g,this._b=A.b,this._a=A.a,this._roundA=s(100*this._a)/100,this._format=e.format||A.format,this._gradientType=e.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=A.ok,this._tc_id=a++}function l(t,e,A){t=N(t,255),e=N(e,255),A=N(A,255);var n,r,i=c(t,e,A),o=g(t,e,A),a=(i+o)/2;if(i==o)n=r=0;else{var s=i-o;switch(r=a>.5?s/(2-i-o):s/(i+o),i){case t:n=(e-A)/s+(e<A?6:0);break;case e:n=(A-t)/s+2;break;case A:n=(t-e)/s+4}n/=6}return{h:n,s:r,l:a}}function C(t,e,A){t=N(t,255),e=N(e,255),A=N(A,255);var n,r,i=c(t,e,A),o=g(t,e,A),a=i,s=i-o;if(r=0===i?0:s/i,i==o)n=0;else{switch(i){case t:n=(e-A)/s+(e<A?6:0);break;case e:n=(A-t)/s+2;break;case A:n=(t-e)/s+4}n/=6}return{h:n,s:r,v:a}}function h(t,e,A,n){var r=[O(s(t).toString(16)),O(s(e).toString(16)),O(s(A).toString(16))];return n&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function B(t,e,A,n){return[O(L(n)),O(s(t).toString(16)),O(s(e).toString(16)),O(s(A).toString(16))].join("")}function f(t,e){e=0===e?0:e||10;var A=u(t).toHsl();return A.s-=e/100,A.s=k(A.s),u(A)}function d(t,e){e=0===e?0:e||10;var A=u(t).toHsl();return A.s+=e/100,A.s=k(A.s),u(A)}function Q(t){return u(t).desaturate(100)}function E(t,e){e=0===e?0:e||10;var A=u(t).toHsl();return A.l+=e/100,A.l=k(A.l),u(A)}function p(t,e){e=0===e?0:e||10;var A=u(t).toRgb();return A.r=c(0,g(255,A.r-s(-e/100*255))),A.g=c(0,g(255,A.g-s(-e/100*255))),A.b=c(0,g(255,A.b-s(-e/100*255))),u(A)}function y(t,e){e=0===e?0:e||10;var A=u(t).toHsl();return A.l-=e/100,A.l=k(A.l),u(A)}function v(t,e){var A=u(t).toHsl(),n=(A.h+e)%360;return A.h=n<0?360+n:n,u(A)}function m(t){var e=u(t).toHsl();return e.h=(e.h+180)%360,u(e)}function b(t){var e=u(t).toHsl(),A=e.h;return[u(t),u({h:(A+120)%360,s:e.s,l:e.l}),u({h:(A+240)%360,s:e.s,l:e.l})]}function F(t){var e=u(t).toHsl(),A=e.h;return[u(t),u({h:(A+90)%360,s:e.s,l:e.l}),u({h:(A+180)%360,s:e.s,l:e.l}),u({h:(A+270)%360,s:e.s,l:e.l})]}function w(t){var e=u(t).toHsl(),A=e.h;return[u(t),u({h:(A+72)%360,s:e.s,l:e.l}),u({h:(A+216)%360,s:e.s,l:e.l})]}function S(t,e,A){e=e||6,A=A||30;var n=u(t).toHsl(),r=360/A,i=[u(t)];for(n.h=(n.h-(r*e>>1)+720)%360;--e;)n.h=(n.h+r)%360,i.push(u(n));return i}function D(t,e){e=e||6;for(var A=u(t).toHsv(),n=A.h,r=A.s,i=A.v,o=[],a=1/e;e--;)o.push(u({h:n,s:r,v:i})),i=(i+a)%1;return o}u.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 t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,A,n=this.toRgb();return t=n.r/255,e=n.g/255,A=n.b/255,.2126*(t<=.03928?t/12.92:r.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:r.pow((e+.055)/1.055,2.4))+.0722*(A<=.03928?A/12.92:r.pow((A+.055)/1.055,2.4))},setAlpha:function(t){return this._a=G(t),this._roundA=s(100*this._a)/100,this},toHsv:function(){var t=C(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=C(this._r,this._g,this._b),e=s(360*t.h),A=s(100*t.s),n=s(100*t.v);return 1==this._a?"hsv("+e+", "+A+"%, "+n+"%)":"hsva("+e+", "+A+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=l(this._r,this._g,this._b),e=s(360*t.h),A=s(100*t.s),n=s(100*t.l);return 1==this._a?"hsl("+e+", "+A+"%, "+n+"%)":"hsla("+e+", "+A+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,A,n,r){var i=[O(s(t).toString(16)),O(s(e).toString(16)),O(s(A).toString(16)),O(L(n))];if(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[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*N(this._r,255))+"%",g:s(100*N(this._g,255))+"%",b:s(100*N(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*N(this._r,255))+"%, "+s(100*N(this._g,255))+"%, "+s(100*N(this._b,255))+"%)":"rgba("+s(100*N(this._r,255))+"%, "+s(100*N(this._g,255))+"%, "+s(100*N(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(U[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+B(this._r,this._g,this._b,this._a),A=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var r=u(t);A="#"+B(r._r,r._g,r._b,r._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+A+")"},toString:function(t){var e=!!t;t=t||this._format;var A=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(A=this.toRgbString()),"prgb"===t&&(A=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(A=this.toHexString()),"hex3"===t&&(A=this.toHexString(!0)),"hex4"===t&&(A=this.toHex8String(!0)),"hex8"===t&&(A=this.toHex8String()),"name"===t&&(A=this.toName()),"hsl"===t&&(A=this.toHslString()),"hsv"===t&&(A=this.toHsvString()),A||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(t,e){var A=t.apply(null,[this].concat([].slice.call(e)));return this._r=A._r,this._g=A._g,this._b=A._b,this.setAlpha(A._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(p,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(d,arguments)},greyscale:function(){return this._applyModification(Q,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(D,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(b,arguments)},tetrad:function(){return this._applyCombination(F,arguments)}},u.fromRatio=function(t,e){if("object"==typeof t){var A={};for(var n in t)t.hasOwnProperty(n)&&(A[n]="a"===n?t[n]:M(t[n]));t=A}return u(t,e)},u.equals=function(t,e){return!(!t||!e)&&u(t).toRgbString()==u(e).toRgbString()},u.random=function(){return u.fromRatio({r:I(),g:I(),b:I()})},u.mix=function(t,e,A){A=0===A?0:A||50;var n=u(t).toRgb(),r=u(e).toRgb(),i=A/100;return u({r:(r.r-n.r)*i+n.r,g:(r.g-n.g)*i+n.g,b:(r.b-n.b)*i+n.b,a:(r.a-n.a)*i+n.a})},u.readability=function(t,e){var A=u(t),n=u(e);return(r.max(A.getLuminance(),n.getLuminance())+.05)/(r.min(A.getLuminance(),n.getLuminance())+.05)},u.isReadable=function(t,e,A){var n,r,i=u.readability(t,e);switch(r=!1,(n=function(t){var e,A;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),A=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==A&&"large"!==A&&(A="small");return{level:e,size:A}}(A)).level+n.size){case"AAsmall":case"AAAlarge":r=i>=4.5;break;case"AAlarge":r=i>=3;break;case"AAAsmall":r=i>=7}return r},u.mostReadable=function(t,e,A){var n,r,i,o,a=null,s=0;r=(A=A||{}).includeFallbackColors,i=A.level,o=A.size;for(var g=0;g<e.length;g++)(n=u.readability(t,e[g]))>s&&(s=n,a=u(e[g]));return u.isReadable(t,a,{level:i,size:o})||!r?a:(A.includeFallbackColors=!1,u.mostReadable(t,["#fff","#000"],A))};var R=u.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"},U=u.hexNames=function(t){var e={};for(var A in t)t.hasOwnProperty(A)&&(e[t[A]]=A);return e}(R);function G(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function N(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var A=function(t){return"string"===typeof t&&-1!=t.indexOf("%")}(t);return t=g(e,c(0,parseFloat(t))),A&&(t=parseInt(t*e,10)/100),r.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function k(t){return g(1,c(0,t))}function x(t){return parseInt(t,16)}function O(t){return 1==t.length?"0"+t:""+t}function M(t){return t<=1&&(t=100*t+"%"),t}function L(t){return r.round(255*parseFloat(t)).toString(16)}function _(t){return x(t)/255}var J=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",A="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+A),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+A),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+A),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 T(t){return!!J.CSS_UNIT.exec(t)}t.exports?t.exports=u:void 0===(n=function(){return u}.call(e,A,e,t))||(t.exports=n)}(Math)},function(t,e,A){"use strict";var n=A(20),r=A(41),i=A(546),o=A(10),a=A(30),s=A(0),g=(A(25),A(32)),c=A(594),I=A(907),u=A(829),l=s.forwardRef((function(t,e){var A=t.children,n=t.classes,r=t.className,i=t.expandIcon,l=t.IconButtonProps,C=t.onBlur,h=t.onClick,B=t.onFocusVisible,f=Object(a.a)(t,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),d=s.useState(!1),Q=d[0],E=d[1],p=s.useContext(u.a),y=p.disabled,v=void 0!==y&&y,m=p.expanded,b=p.toggle;return s.createElement(c.a,Object(o.a)({focusRipple:!1,disableRipple:!0,disabled:v,component:"div","aria-expanded":m,className:Object(g.a)(n.root,r,v&&n.disabled,m&&n.expanded,Q&&n.focused),onFocusVisible:function(t){E(!0),B&&B(t)},onBlur:function(t){E(!1),C&&C(t)},onClick:function(t){b&&b(t),h&&h(t)},ref:e},f),s.createElement("div",{className:Object(g.a)(n.content,m&&n.expanded)},A),i&&s.createElement(I.a,Object(o.a)({className:Object(g.a)(n.expandIcon,m&&n.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},l),i))})),C=Object(r.a)((function(t){var e={duration:t.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:t.transitions.create(["min-height","background-color"],e),padding:"0 24px 0 24px","&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:t.palette.grey[300]},"&$disabled":{opacity:.38}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:t.transitions.create(["margin"],e),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:t.transitions.create("transform",e),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiExpansionPanelSummary"})(l),h=s.forwardRef((function(t,e){var A=t.classes,n=t.className,r=Object(a.a)(t,["classes","className"]);return s.createElement("div",Object(o.a)({className:Object(g.a)(A.root,n),ref:e},r))})),B=Object(r.a)({root:{display:"flex",padding:"8px 24px 24px"}},{name:"MuiExpansionPanelDetails"})(h),f=A(1478),d=A(1142),Q=A(833);A.d(e,"f",(function(){return p})),A.d(e,"b",(function(){return y})),A.d(e,"c",(function(){return v})),A.d(e,"d",(function(){return m})),A.d(e,"a",(function(){return b})),A.d(e,"e",(function(){return F}));Object(r.a)((function(t){return{paper:{backgroundColor:t.palette.background.paper},span:{width:"70px",textAlign:"center",paddingLeft:"2px",paddingRight:"2px"},colors:{"&:hover":{backgroundColor:"transparent"},paddingLeft:"2px",paddingRight:"2px"},popper:{zIndex:4}}}));var E={width:"100%",flexDirection:"column"},p=Object(i.a)((function(){return{root:Object(n.a)({},E,{padding:"0px 8px"})}})),y=Object(r.a)((function(){return{root:Object(n.a)({},E,{padding:"8px 8px 24px 8px"})}}))(B),v=Object(r.a)((function(t){return{root:{padding:"0px 8px"},content:{margin:"4px 0px",minWidth:"0px"},expanded:{marginBottom:t.spacing(-3),top:t.spacing(-1)},expandIcon:{"&$expanded":{top:t.spacing(-1.3)}}}}))(C),m=Object(r.a)((function(){return{root:{fontSize:"14px"}}}))(f.a),b=Object(r.a)((function(){return{item:{width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}}))(Q.a),F=Object(r.a)((function(){return{root:{marginTop:"7px"},markActive:{backgroundColor:"rgba(128, 128, 128, 0.7)"}}}))(d.a)},,function(t,e,A){(function(e){var A="object"==typeof e&&e&&e.Object===Object&&e;t.exports=A}).call(this,A(58))},function(t,e,A){"use strict";A.d(e,"a",(function(){return Q}));var n=A(67),r=A(59),i=A(109),o=A(112),a=A(78),s=A(316),g=A(51),c=A(179),I=A(53),u=A(38),l=A(27);function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var h=Object.freeze([1,0,0,0,1,0,0,0,1]),B=Object.freeze([0,0,0,0,0,0,0,0,0]),f=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),d={},Q=function(t){Object(i.a)(A,t);var e=C(A);function A(t){var r;return Object(n.a)(this,A),r=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?r.copy(t):r.identity(),r}return Object(r.a)(A,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return f}}],[{key:"IDENTITY",get:function(){return d.IDENTITY=d.IDENTITY||Object.freeze(new A(h)),d.IDENTITY}},{key:"ZERO",get:function(){return d.ZERO=d.ZERO||Object.freeze(new A(B)),d.ZERO}}]),Object(r.a)(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s){return this[0]=t,this[1]=n,this[2]=o,this[3]=e,this[4]=r,this[5]=a,this[6]=A,this[7]=i,this[8]=s,this.check()}},{key:"determinant",value:function(){return I.b(this)}},{key:"identity",value:function(){return this.copy(h)}},{key:"fromQuaternion",value:function(t){return I.c(this,t),this.check()}},{key:"transpose",value:function(){return I.i(this,this),this.check()}},{key:"invert",value:function(){return I.d(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return I.e(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return I.e(this,this,t),this.check()}},{key:"rotate",value:function(t){return I.f(this,this,t),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?I.g(this,this,t):I.g(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return I.h(this,this,t),this.check()}},{key:"transform",value:function(t,e){switch(t.length){case 2:e=u.i(e||[-0,-0],t,this);break;case 3:e=l.p(e||[-0,-0,-0],t,this);break;case 4:e=Object(c.d)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(g.b)(e,t.length),e}},{key:"transformVector",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}},{key:"transformVector2",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}},{key:"transformVector3",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}}]),A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return h}));var n=A(67),r=A(59),i=A(109),o=A(112),a=A(78),s=A(231),g=A(51),c=A(113),I=A(34),u=A(45);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var C=[0,0,0,1],h=function(t){Object(i.a)(A,t);var e=l(A);function A(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(n.a)(this,A),t=e.call(this,-0,-0,-0,-0),Array.isArray(r)&&1===arguments.length?t.copy(r):t.set(r,i,o,a),t}return Object(r.a)(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}},{key:"set",value:function(t,e,A,n){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this.check()}},{key:"fromMatrix3",value:function(t){return I.e(this,t),this.check()}},{key:"identity",value:function(){return I.f(this),this.check()}},{key:"fromAxisRotation",value:function(t,e){return I.p(this,t,e),this.check()}},{key:"setAxisAngle",value:function(t,e){return this.fromAxisRotation(t,e)}},{key:"len",value:function(){return I.h(this)}},{key:"lengthSquared",value:function(){return I.r(this)}},{key:"dot",value:function(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return I.d(this,t)}},{key:"rotationTo",value:function(t,e){return I.n(this,t,e),this.check()}},{key:"add",value:function(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return I.a(this,this,t),this.check()}},{key:"calculateW",value:function(){return I.b(this,this),this.check()}},{key:"conjugate",value:function(){return I.c(this,this),this.check()}},{key:"invert",value:function(){return I.g(this,this),this.check()}},{key:"lerp",value:function(t,e,A){return I.i(this,t,e,A),this.check()}},{key:"multiplyRight",value:function(t,e){return Object(c.a)(!e),I.j(this,this,t),this.check()}},{key:"multiplyLeft",value:function(t,e){return Object(c.a)(!e),I.j(this,t,this),this.check()}},{key:"normalize",value:function(){var t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}},{key:"rotateX",value:function(t){return I.k(this,this,t),this.check()}},{key:"rotateY",value:function(t){return I.l(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return I.m(this,this,t),this.check()}},{key:"scale",value:function(t){return I.o(this,this,t),this.check()}},{key:"slerp",value:function(t,e,A){switch(arguments.length){case 1:var n=arguments[0],r=n.start;t=void 0===r?C:r,e=n.target,A=n.ratio;break;case 2:var i=Array.prototype.slice.call(arguments);e=i[0],A=i[1],t=this}return I.q(this,t,e,A),this.check()}},{key:"transformVector4",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return u.o(e,t,this),Object(g.b)(e,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(t,e){return this.setAxisAngle(t,e)}},{key:"premultiply",value:function(t,e){return this.multiplyLeft(t,e)}},{key:"multiply",value:function(t,e){return this.multiplyRight(t,e)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=Object(g.a)(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=Object(g.a)(t)}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=Object(g.a)(t)}},{key:"w",get:function(){return this[3]},set:function(t){this[3]=Object(g.a)(t)}}]),A}(s.a)},function(t,e,A){"use strict";e.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(t,e,A){"use strict";(function(e,n){var r;t.exports=b,b.ReadableState=m;A(276).EventEmitter;var i=function(t,e){return t.listeners(e).length},o=A(459),a=A(104).Buffer,s=e.Uint8Array||function(){};var g,c=A(630);g=c&&c.debuglog?c.debuglog("stream"):function(){};var I,u,l,C=A(631),h=A(461),B=A(462).getHighWaterMark,f=A(217).codes,d=f.ERR_INVALID_ARG_TYPE,Q=f.ERR_STREAM_PUSH_AFTER_EOF,E=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;A(117)(b,o);var y=h.errorOrDestroy,v=["error","close","destroy","pause","resume"];function m(t,e,n){r=r||A(218),t=t||{},"boolean"!==typeof n&&(n=e instanceof r),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=B(this,t,"readableHighWaterMark",n),this.buffer=new C,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!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(I||(I=A(301).StringDecoder),this.decoder=new I(t.encoding),this.encoding=t.encoding)}function b(t){if(r=r||A(218),!(this instanceof b))return new b(t);var e=this instanceof r;this._readableState=new m(t,this,e),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),o.call(this)}function F(t,e,A,n,r){g("readableAddChunk",e);var i,o=t._readableState;if(null===e)o.reading=!1,function(t,e){if(g("onEofChunk"),e.ended)return;if(e.decoder){var A=e.decoder.end();A&&A.length&&(e.buffer.push(A),e.length+=e.objectMode?1:A.length)}e.ended=!0,e.sync?D(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}(t,o);else if(r||(i=function(t,e){var A;n=e,a.isBuffer(n)||n instanceof s||"string"===typeof e||void 0===e||t.objectMode||(A=new d("chunk",["string","Buffer","Uint8Array"],e));var n;return A}(o,e)),i)y(t,i);else if(o.objectMode||e&&e.length>0)if("string"===typeof e||o.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)o.endEmitted?y(t,new p):w(t,o,e,!0);else if(o.ended)y(t,new Q);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!A?(e=o.decoder.write(e),o.objectMode||0!==e.length?w(t,o,e,!1):U(t,o)):w(t,o,e,!1)}else n||(o.reading=!1,U(t,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function w(t,e,A,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",A)):(e.length+=e.objectMode?1:A.length,n?e.buffer.unshift(A):e.buffer.push(A),e.needReadable&&D(t)),U(t,e)}Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=h.destroy,b.prototype._undestroy=h.undestroy,b.prototype._destroy=function(t,e){e(t)},b.prototype.push=function(t,e){var A,n=this._readableState;return n.objectMode?A=!0:"string"===typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),A=!0),F(this,t,e,!1,A)},b.prototype.unshift=function(t){return F(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){I||(I=A(301).StringDecoder);var e=new I(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function D(t){var e=t._readableState;g("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(g("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(R,t))}function R(t){var e=t._readableState;g("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,O(t)}function U(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(G,t,e))}function G(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var A=e.length;if(g("maybeReadMore read 0"),t.read(0),A===e.length)break}e.readingMore=!1}function N(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function k(t){g("readable nexttick read 0"),t.read(0)}function x(t,e){g("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),O(t),e.flowing&&!e.reading&&t.read(0)}function O(t){var e=t._readableState;for(g("flow",e.flowing);e.flowing&&null!==t.read(););}function M(t,e){return 0===e.length?null:(e.objectMode?A=e.buffer.shift():!t||t>=e.length?(A=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):A=e.buffer.consume(t,e.decoder),A);var A}function L(t){var e=t._readableState;g("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(_,e,t))}function _(t,e){if(g("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var A=e._writableState;(!A||A.autoDestroy&&A.finished)&&e.destroy()}}function J(t,e){for(var A=0,n=t.length;A<n;A++)if(t[A]===e)return A;return-1}b.prototype.read=function(t){g("read",t),t=parseInt(t,10);var e=this._readableState,A=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return g("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):D(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&L(this),null;var n,r=e.needReadable;return g("need readable",r),(0===e.length||e.length-t<e.highWaterMark)&&g("length less than watermark",r=!0),e.ended||e.reading?g("reading or ended",r=!1):r&&(g("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(A,e))),null===(n=t>0?M(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),A!==t&&e.ended&&L(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(t){y(this,new E("_read()"))},b.prototype.pipe=function(t,e){var A=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,g("pipe count=%d opts=%j",r.pipesCount,e);var o=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?s:B;function a(e,n){g("onunpipe"),e===A&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,g("cleanup"),t.removeListener("close",C),t.removeListener("finish",h),t.removeListener("drain",c),t.removeListener("error",l),t.removeListener("unpipe",a),A.removeListener("end",s),A.removeListener("end",B),A.removeListener("data",u),I=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function s(){g("onend"),t.end()}r.endEmitted?n.nextTick(o):A.once("end",o),t.on("unpipe",a);var c=function(t){return function(){var e=t._readableState;g("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(t,"data")&&(e.flowing=!0,O(t))}}(A);t.on("drain",c);var I=!1;function u(e){g("ondata");var n=t.write(e);g("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==J(r.pipes,t))&&!I&&(g("false write response, pause",r.awaitDrain),r.awaitDrain++),A.pause())}function l(e){g("onerror",e),B(),t.removeListener("error",l),0===i(t,"error")&&y(t,e)}function C(){t.removeListener("finish",h),B()}function h(){g("onfinish"),t.removeListener("close",C),B()}function B(){g("unpipe"),A.unpipe(t)}return A.on("data",u),function(t,e,A){if("function"===typeof t.prependListener)return t.prependListener(e,A);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(A):t._events[e]=[A,t._events[e]]:t.on(e,A)}(t,"error",l),t.once("close",C),t.once("finish",h),t.emit("pipe",A),r.flowing||(g("pipe resume"),A.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,A={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,A)),this;if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this,{hasUnpiped:!1});return this}var o=J(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,A)),this},b.prototype.on=function(t,e){var A=o.prototype.on.call(this,t,e),r=this._readableState;return"data"===t?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===t&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,g("on readable",r.length,r.reading),r.length?D(this):r.reading||n.nextTick(k,this))),A},b.prototype.addListener=b.prototype.on,b.prototype.removeListener=function(t,e){var A=o.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(N,this),A},b.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(N,this),e},b.prototype.resume=function(){var t=this._readableState;return t.flowing||(g("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(x,t,e))}(this,t)),t.paused=!1,this},b.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},b.prototype.wrap=function(t){var e=this,A=this._readableState,n=!1;for(var r in t.on("end",(function(){if(g("wrapped end"),A.decoder&&!A.ended){var t=A.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(r){(g("wrapped data"),A.decoder&&(r=A.decoder.write(r)),!A.objectMode||null!==r&&void 0!==r)&&((A.objectMode||r&&r.length)&&(e.push(r)||(n=!0,t.pause())))})),t)void 0===this[r]&&"function"===typeof t[r]&&(this[r]=function(e){return function(){return t[e].apply(t,arguments)}}(r));for(var i=0;i<v.length;i++)t.on(v[i],this.emit.bind(this,v[i]));return this._read=function(e){g("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"===typeof Symbol&&(b.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=A(634)),u(this)}),Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(b.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(b.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),b._fromList=M,Object.defineProperty(b.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(b.from=function(t,e){return void 0===l&&(l=A(635)),l(b,t,e)})}).call(this,A(58),A(62))},function(t,e,A){t.exports=A(276).EventEmitter},function(t,e){var A={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==A.call(t)}},function(t,e,A){"use strict";(function(e){function A(t,e){r(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function r(t,e){t.emit("error",e)}t.exports={destroy:function(t,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(r,this,t)):e.nextTick(r,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!i&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(A,o,t)):e.nextTick(A,o,t):i?(e.nextTick(n,o),i(t)):e.nextTick(n,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(t,e){var A=t._readableState,n=t._writableState;A&&A.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,A(62))},function(t,e,A){"use strict";var n=A(217).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,A,r){var i=function(t,e,A){return null!=t.highWaterMark?t.highWaterMark:e?t[A]:null}(e,r,A);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(r?A:"highWaterMark",i);return Math.floor(i)}return t.objectMode?16:16384}}},function(t,e,A){"use strict";(function(e,n){function r(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,A){var n=t.entry;t.entry=null;for(;n;){var r=n.callback;e.pendingcb--,r(A),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var i;t.exports=b,b.WritableState=m;var o={deprecate:A(464)},a=A(459),s=A(104).Buffer,g=e.Uint8Array||function(){};var c,I=A(461),u=A(462).getHighWaterMark,l=A(217).codes,C=l.ERR_INVALID_ARG_TYPE,h=l.ERR_METHOD_NOT_IMPLEMENTED,B=l.ERR_MULTIPLE_CALLBACK,f=l.ERR_STREAM_CANNOT_PIPE,d=l.ERR_STREAM_DESTROYED,Q=l.ERR_STREAM_NULL_VALUES,E=l.ERR_STREAM_WRITE_AFTER_END,p=l.ERR_UNKNOWN_ENCODING,y=I.errorOrDestroy;function v(){}function m(t,e,o){i=i||A(218),t=t||{},"boolean"!==typeof o&&(o=e instanceof i),this.objectMode=!!t.objectMode,o&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=u(this,t,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var A=t._writableState,r=A.sync,i=A.writecb;if("function"!==typeof i)throw new B;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(A),e)!function(t,e,A,r,i){--e.pendingcb,A?(n.nextTick(i,r),n.nextTick(U,t,e),t._writableState.errorEmitted=!0,y(t,r)):(i(r),t._writableState.errorEmitted=!0,y(t,r),U(t,e))}(t,A,r,e,i);else{var o=D(A)||t.destroyed;o||A.corked||A.bufferProcessing||!A.bufferedRequest||S(t,A),r?n.nextTick(w,t,A,o,i):w(t,A,o,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function b(t){var e=this instanceof(i=i||A(218));if(!e&&!c.call(b,this))return new b(t);this._writableState=new m(t,this,e),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),a.call(this)}function F(t,e,A,n,r,i,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new d("write")):A?t._writev(r,e.onwrite):t._write(r,i,e.onwrite),e.sync=!1}function w(t,e,A,n){A||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),U(t,e)}function S(t,e){e.bufferProcessing=!0;var A=e.bufferedRequest;if(t._writev&&A&&A.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=A;for(var a=0,s=!0;A;)i[a]=A,A.isBuf||(s=!1),A=A.next,a+=1;i.allBuffers=s,F(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new r(e),e.bufferedRequestCount=0}else{for(;A;){var g=A.chunk,c=A.encoding,I=A.callback;if(F(t,e,!1,e.objectMode?1:g.length,g,c,I),A=A.next,e.bufferedRequestCount--,e.writing)break}null===A&&(e.lastBufferedRequest=null)}e.bufferedRequest=A,e.bufferProcessing=!1}function D(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function R(t,e){t._final((function(A){e.pendingcb--,A&&y(t,A),e.prefinished=!0,t.emit("prefinish"),U(t,e)}))}function U(t,e){var A=D(e);if(A&&(function(t,e){e.prefinished||e.finalCalled||("function"!==typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(R,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return A}A(117)(b,a),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===b&&(t&&t._writableState instanceof m)}})):c=function(t){return t instanceof this},b.prototype.pipe=function(){y(this,new f)},b.prototype.write=function(t,e,A){var r,i=this._writableState,o=!1,a=!i.objectMode&&(r=t,s.isBuffer(r)||r instanceof g);return a&&!s.isBuffer(t)&&(t=function(t){return s.from(t)}(t)),"function"===typeof e&&(A=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!==typeof A&&(A=v),i.ending?function(t,e){var A=new E;y(t,A),n.nextTick(e,A)}(this,A):(a||function(t,e,A,r){var i;return null===A?i=new Q:"string"===typeof A||e.objectMode||(i=new C("chunk",["string","Buffer"],A)),!i||(y(t,i),n.nextTick(r,i),!1)}(this,i,t,A))&&(i.pendingcb++,o=function(t,e,A,n,r,i){if(!A){var o=function(t,e,A){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=s.from(e,A));return e}(e,n,r);n!==o&&(A=!0,r="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var g=e.length<e.highWaterMark;g||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:r,isBuf:A,callback:i,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else F(t,e,!1,a,n,r,i);return g}(this,i,a,t,e,A)),o},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||S(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new p(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,A){A(new h("_write()"))},b.prototype._writev=null,b.prototype.end=function(t,e,A){var r=this._writableState;return"function"===typeof t?(A=t,t=null,e=null):"function"===typeof e&&(A=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,A){e.ending=!0,U(t,e),A&&(e.finished?n.nextTick(A):t.once("finish",A));e.ended=!0,t.writable=!1}(this,r,A),this},Object.defineProperty(b.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=I.destroy,b.prototype._undestroy=I.undestroy,b.prototype._destroy=function(t,e){e(t)}}).call(this,A(58),A(62))},function(t,e,A){(function(e){function A(t){try{if(!e.localStorage)return!1}catch(n){return!1}var A=e.localStorage[t];return null!=A&&"true"===String(A).toLowerCase()}t.exports=function(t,e){if(A("noDeprecation"))return t;var n=!1;return function(){if(!n){if(A("throwDeprecation"))throw new Error(e);A("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,A(58))},function(t,e,A){"use strict";t.exports=c;var n=A(217).codes,r=n.ERR_METHOD_NOT_IMPLEMENTED,i=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,s=A(218);function g(t,e){var A=this._transformState;A.transforming=!1;var n=A.writecb;if(null===n)return this.emit("error",new i);A.writechunk=null,A.writecb=null,null!=e&&this.push(e),n(t);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);s.call(this,t),this._transformState={afterTransform:g.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",I)}function I(){var t=this;"function"!==typeof this._flush||this._readableState.destroyed?u(this,null,null):this._flush((function(e,A){u(t,e,A)}))}function u(t,e,A){if(e)return t.emit("error",e);if(null!=A&&t.push(A),t._writableState.length)throw new a;if(t._transformState.transforming)throw new o;return t.push(null)}A(117)(c,s),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,A){A(new r("_transform()"))},c.prototype._write=function(t,e,A){var n=this._transformState;if(n.writecb=A,n.writechunk=t,n.writeencoding=e,!n.transforming){var r=this._readableState;(n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},c.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},c.prototype._destroy=function(t,e){s.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}},function(t,e,A){"use strict";(function(t){A.d(e,"a",(function(){return b}));var n=A(12),r=A(13),i=A(2),o=A.n(i),a=A(180),s=A.n(a),g=A(272),c=A(184),I=A(510),u=A(120),l=A(273),C=A(392),h=function(t,e,A,n){return new(A||(A=Promise))((function(r,i){function o(t){try{s(n.next(t))}catch(e){i(e)}}function a(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof A?e:new A((function(t){t(e)}))).then(o,a)}s((n=n.apply(t,e||[])).next())}))},B=s()("threads:master:messages"),f=s()("threads:master:spawn"),d=s()("threads:master:thread-utils"),Q="undefined"!==typeof t&&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 E(t,e,A){return h(this,void 0,void 0,o.a.mark((function n(){var r,i,a;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=new Promise((function(t,n){r=setTimeout((function(){return n(Error(A))}),e)})),n.next=3,Promise.race([t,i]);case 3:return a=n.sent,clearTimeout(r),n.abrupt("return",a);case 6:case"end":return n.stop()}}),n)})))}function p(t){return new Promise((function(e,A){t.addEventListener("message",(function n(r){var i;B("Message from worker before finishing initialization:",r.data),(i=r.data)&&"init"===i.type?(t.removeEventListener("message",n),e(r.data)):function(t){return t&&"uncaughtError"===t.type}(r.data)&&(t.removeEventListener("message",n),A(Object(c.a)(r.data.error)))}))}))}function y(t,e){return new g.a((function(A){var n=function(t){var e={type:l.a.message,data:t.data};A.next(e)},r=function(t){d("Unhandled promise rejection event in thread:",t);var e={type:l.a.internalError,error:Error(t.reason)};A.next(e)};t.addEventListener("message",n),t.addEventListener("unhandledrejection",r),e.then((function(){var e={type:l.a.termination};t.removeEventListener("message",n),t.removeEventListener("unhandledrejection",r),A.next(e),A.complete()}))}))}function v(t){var e=this,A=Object(I.a)(),n=Object(r.a)(A,2),i=n[0],a=n[1];return{terminate:function(){return h(e,void 0,void 0,o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d("Terminating worker"),e.next=3,t.terminate();case 3:a();case 4:case"end":return e.stop()}}),e)})))},termination:i}}function m(t,e,A,r){var i,o=A.filter((function(t){return t.type===l.a.internalError})).map((function(t){return t.error}));return Object.assign(t,(i={},Object(n.a)(i,u.a,o),Object(n.a)(i,u.b,A),Object(n.a)(i,u.c,r),Object(n.a)(i,u.e,e),i))}function b(t,e){return h(this,void 0,void 0,o.a.mark((function A(){var n,r,i,a,s,g,c,I,u,l;return o.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return f("Initializing new thread"),n=e&&e.timeout?e.timeout:Q,A.next=4,E(p(t),n,"Timeout: Did not receive an init message from worker after ".concat(n,"ms. Make sure the worker calls expose()."));case 4:if(r=A.sent,i=r.exposed,a=v(t),s=a.termination,g=a.terminate,c=y(t,s),"function"!==i.type){A.next=13;break}return I=Object(C.a)(t),A.abrupt("return",m(I,t,c,g));case 13:if("module"!==i.type){A.next=18;break}return u=Object(C.b)(t,i.methods),A.abrupt("return",m(u,t,c,g));case 18:throw l=i.type,Error("Worker init message states unexpected type of expose(): ".concat(l));case 20:case"end":return A.stop()}}),A)})))}}).call(this,A(62))},function(t,e,A){(function(t){e.fetch=a(t.fetch)&&a(t.ReadableStream),e.writableStream=a(t.WritableStream),e.abortController=a(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(s){}var A;function n(){if(void 0!==A)return A;if(t.XMLHttpRequest){A=new t.XMLHttpRequest;try{A.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(s){A=null}}else A=null;return A}function r(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(s){}return!1}var i="undefined"!==typeof t.ArrayBuffer,o=i&&a(t.ArrayBuffer.prototype.slice);function a(t){return"function"===typeof t}e.arraybuffer=e.fetch||i&&r("arraybuffer"),e.msstream=!e.fetch&&o&&r("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&i&&r("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!n()&&a(n().overrideMimeType),e.vbArray=a(t.VBArray),A=null}).call(this,A(58))},function(t,e,A){(function(t,n,r){var i=A(468),o=A(117),a=A(470),s=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},g=e.IncomingMessage=function(e,A,o,s){var g=this;if(a.Readable.call(g),g._mode=o,g.headers={},g.rawHeaders=[],g.trailers={},g.rawTrailers=[],g.on("end",(function(){t.nextTick((function(){g.emit("close")}))})),"fetch"===o){if(g._fetchResponse=A,g.url=A.url,g.statusCode=A.status,g.statusMessage=A.statusText,A.headers.forEach((function(t,e){g.headers[e.toLowerCase()]=t,g.rawHeaders.push(e,t)})),i.writableStream){var c=new WritableStream({write:function(t){return new Promise((function(e,A){g._destroyed?A():g.push(new n(t))?e():g._resumeFetch=e}))},close:function(){r.clearTimeout(s),g._destroyed||g.push(null)},abort:function(t){g._destroyed||g.emit("error",t)}});try{return void A.body.pipeTo(c).catch((function(t){r.clearTimeout(s),g._destroyed||g.emit("error",t)}))}catch(C){}}var I=A.body.getReader();!function t(){I.read().then((function(e){if(!g._destroyed){if(e.done)return r.clearTimeout(s),void g.push(null);g.push(new n(e.value)),t()}})).catch((function(t){r.clearTimeout(s),g._destroyed||g.emit("error",t)}))}()}else{if(g._xhr=e,g._pos=0,g.url=e.responseURL,g.statusCode=e.status,g.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var A=e[1].toLowerCase();"set-cookie"===A?(void 0===g.headers[A]&&(g.headers[A]=[]),g.headers[A].push(e[2])):void 0!==g.headers[A]?g.headers[A]+=", "+e[2]:g.headers[A]=e[2],g.rawHeaders.push(e[1],e[2])}})),g._charset="x-user-defined",!i.overrideMimeType){var u=g.rawHeaders["mime-type"];if(u){var l=u.match(/;\s*charset=([^;])(;|$)/);l&&(g._charset=l[1].toLowerCase())}g._charset||(g._charset="utf-8")}}};o(g,a.Readable),g.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},g.prototype._onXHRProgress=function(){var t=this,e=t._xhr,A=null;switch(t._mode){case"text:vbarray":if(e.readyState!==s.DONE)break;try{A=new r.VBArray(e.responseBody).toArray()}catch(c){}if(null!==A){t.push(new n(A));break}case"text":try{A=e.responseText}catch(c){t._mode="text:vbarray";break}if(A.length>t._pos){var i=A.substr(t._pos);if("x-user-defined"===t._charset){for(var o=new n(i.length),a=0;a<i.length;a++)o[a]=255&i.charCodeAt(a);t.push(o)}else t.push(i,t._charset);t._pos=A.length}break;case"arraybuffer":if(e.readyState!==s.DONE||!e.response)break;A=e.response,t.push(new n(new Uint8Array(A)));break;case"moz-chunked-arraybuffer":if(A=e.response,e.readyState!==s.LOADING||!A)break;t.push(new n(new Uint8Array(A)));break;case"ms-stream":if(A=e.response,e.readyState!==s.LOADING)break;var g=new r.MSStreamReader;g.onprogress=function(){g.result.byteLength>t._pos&&(t.push(new n(new Uint8Array(g.result.slice(t._pos)))),t._pos=g.result.byteLength)},g.onload=function(){t.push(null)},g.readAsArrayBuffer(A)}t._xhr.readyState===s.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,A(62),A(104).Buffer,A(58))},function(t,e,A){(e=t.exports=A(471)).Stream=e,e.Readable=e,e.Writable=A(474),e.Duplex=A(219),e.Transform=A(475),e.PassThrough=A(660)},function(t,e,A){"use strict";(function(e,n){var r=A(303);t.exports=Q;var i,o=A(460);Q.ReadableState=d;A(276).EventEmitter;var a=function(t,e){return t.listeners(e).length},s=A(472),g=A(376).Buffer,c=e.Uint8Array||function(){};var I=Object.create(A(257));I.inherits=A(117);var u=A(655),l=void 0;l=u&&u.debuglog?u.debuglog("stream"):function(){};var C,h=A(656),B=A(473);I.inherits(Q,s);var f=["error","close","destroy","pause","resume"];function d(t,e){t=t||{};var n=e instanceof(i=i||A(219));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,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.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(C||(C=A(301).StringDecoder),this.decoder=new C(t.encoding),this.encoding=t.encoding)}function Q(t){if(i=i||A(219),!(this instanceof Q))return new Q(t);this._readableState=new d(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function E(t,e,A,n,r){var i,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var A=e.decoder.end();A&&A.length&&(e.buffer.push(A),e.length+=e.objectMode?1:A.length)}e.ended=!0,v(t)}(t,o)):(r||(i=function(t,e){var A;n=e,g.isBuffer(n)||n instanceof c||"string"===typeof e||void 0===e||t.objectMode||(A=new TypeError("Invalid non-string/buffer chunk"));var n;return A}(o,e)),i?t.emit("error",i):o.objectMode||e&&e.length>0?("string"===typeof e||o.objectMode||Object.getPrototypeOf(e)===g.prototype||(e=function(t){return g.from(t)}(e)),n?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):p(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!A?(e=o.decoder.write(e),o.objectMode||0!==e.length?p(t,o,e,!1):b(t,o)):p(t,o,e,!1))):n||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function p(t,e,A,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",A),t.read(0)):(e.length+=e.objectMode?1:A.length,n?e.buffer.unshift(A):e.buffer.push(A),e.needReadable&&v(t)),b(t,e)}Object.defineProperty(Q.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),Q.prototype.destroy=B.destroy,Q.prototype._undestroy=B.undestroy,Q.prototype._destroy=function(t,e){this.push(null),e(t)},Q.prototype.push=function(t,e){var A,n=this._readableState;return n.objectMode?A=!0:"string"===typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=g.from(t,e),e=""),A=!0),E(this,t,e,!1,A)},Q.prototype.unshift=function(t){return E(this,t,null,!0,!1)},Q.prototype.isPaused=function(){return!1===this._readableState.flowing},Q.prototype.setEncoding=function(t){return C||(C=A(301).StringDecoder),this._readableState.decoder=new C(t),this._readableState.encoding=t,this};function y(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function v(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?r.nextTick(m,t):m(t))}function m(t){l("emit readable"),t.emit("readable"),D(t)}function b(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(F,t,e))}function F(t,e){for(var A=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(l("maybeReadMore read 0"),t.read(0),A!==e.length);)A=e.length;e.readingMore=!1}function w(t){l("readable nexttick read 0"),t.read(0)}function S(t,e){e.reading||(l("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),D(t),e.flowing&&!e.reading&&t.read(0)}function D(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?A=e.buffer.shift():!t||t>=e.length?(A=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):A=function(t,e,A){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():A?function(t,e){var A=e.head,n=1,r=A.data;t-=r.length;for(;A=A.next;){var i=A.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0===(t-=o)){o===i.length?(++n,A.next?e.head=A.next:e.head=e.tail=null):(e.head=A,A.data=i.slice(o));break}++n}return e.length-=n,r}(t,e):function(t,e){var A=g.allocUnsafe(t),n=e.head,r=1;n.data.copy(A),t-=n.data.length;for(;n=n.next;){var i=n.data,o=t>i.length?i.length:t;if(i.copy(A,A.length-t,0,o),0===(t-=o)){o===i.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=i.slice(o));break}++r}return e.length-=r,A}(t,e);return n}(t,e.buffer,e.decoder),A);var A}function U(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,r.nextTick(G,e,t))}function G(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function N(t,e){for(var A=0,n=t.length;A<n;A++)if(t[A]===e)return A;return-1}Q.prototype.read=function(t){l("read",t),t=parseInt(t,10);var e=this._readableState,A=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?U(this):v(this),null;if(0===(t=y(t,e))&&e.ended)return 0===e.length&&U(this),null;var n,r=e.needReadable;return l("need readable",r),(0===e.length||e.length-t<e.highWaterMark)&&l("length less than watermark",r=!0),e.ended||e.reading?l("reading or ended",r=!1):r&&(l("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=y(A,e))),null===(n=t>0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),A!==t&&e.ended&&U(this)),null!==n&&this.emit("data",n),n},Q.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},Q.prototype.pipe=function(t,e){var A=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:Q;function g(e,n){l("onunpipe"),e===A&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),t.removeListener("close",f),t.removeListener("finish",d),t.removeListener("drain",I),t.removeListener("error",B),t.removeListener("unpipe",g),A.removeListener("end",c),A.removeListener("end",Q),A.removeListener("data",h),u=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||I())}function c(){l("onend"),t.end()}i.endEmitted?r.nextTick(s):A.once("end",s),t.on("unpipe",g);var I=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,D(t))}}(A);t.on("drain",I);var u=!1;var C=!1;function h(e){l("ondata"),C=!1,!1!==t.write(e)||C||((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==N(i.pipes,t))&&!u&&(l("false write response, pause",A._readableState.awaitDrain),A._readableState.awaitDrain++,C=!0),A.pause())}function B(e){l("onerror",e),Q(),t.removeListener("error",B),0===a(t,"error")&&t.emit("error",e)}function f(){t.removeListener("finish",d),Q()}function d(){l("onfinish"),t.removeListener("close",f),Q()}function Q(){l("unpipe"),A.unpipe(t)}return A.on("data",h),function(t,e,A){if("function"===typeof t.prependListener)return t.prependListener(e,A);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(A):t._events[e]=[A,t._events[e]]:t.on(e,A)}(t,"error",B),t.once("close",f),t.once("finish",d),t.emit("pipe",A),i.flowing||(l("pipe resume"),A.resume()),t},Q.prototype.unpipe=function(t){var e=this._readableState,A={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,A)),this;if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this,A);return this}var o=N(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,A)),this},Q.prototype.on=function(t,e){var A=s.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&v(this):r.nextTick(w,this))}return A},Q.prototype.addListener=Q.prototype.on,Q.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(S,t,e))}(this,t)),this},Q.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Q.prototype.wrap=function(t){var e=this,A=this._readableState,n=!1;for(var r in t.on("end",(function(){if(l("wrapped end"),A.decoder&&!A.ended){var t=A.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(r){(l("wrapped data"),A.decoder&&(r=A.decoder.write(r)),!A.objectMode||null!==r&&void 0!==r)&&((A.objectMode||r&&r.length)&&(e.push(r)||(n=!0,t.pause())))})),t)void 0===this[r]&&"function"===typeof t[r]&&(this[r]=function(e){return function(){return t[e].apply(t,arguments)}}(r));for(var i=0;i<f.length;i++)t.on(f[i],this.emit.bind(this,f[i]));return this._read=function(e){l("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(Q.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Q._fromList=R}).call(this,A(58),A(62))},function(t,e,A){t.exports=A(276).EventEmitter},function(t,e,A){"use strict";var n=A(303);function r(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var A=this,i=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return i||o?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(r,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(r,A,t),A._writableState&&(A._writableState.errorEmitted=!0)):e&&e(t)})),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.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,A){"use strict";(function(e,n,r){var i=A(303);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,A){var n=t.entry;t.entry=null;for(;n;){var r=n.callback;e.pendingcb--,r(A),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=d;var a,s=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:i.nextTick;d.WritableState=f;var g=Object.create(A(257));g.inherits=A(117);var c={deprecate:A(464)},I=A(472),u=A(376).Buffer,l=r.Uint8Array||function(){};var C,h=A(473);function B(){}function f(t,e){a=a||A(219),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,g=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(g||0===g)?g:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=!1===t.decodeStrings;this.decodeStrings=!I,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var A=t._writableState,n=A.sync,r=A.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(A),e)!function(t,e,A,n,r){--e.pendingcb,A?(i.nextTick(r,n),i.nextTick(m,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(r(n),t._writableState.errorEmitted=!0,t.emit("error",n),m(t,e))}(t,A,n,e,r);else{var o=y(A);o||A.corked||A.bufferProcessing||!A.bufferedRequest||p(t,A),n?s(E,t,A,o,r):E(t,A,o,r)}}(e,t)},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 o(this)}function d(t){if(a=a||A(219),!C.call(d,this)&&!(this instanceof a))return new d(t);this._writableState=new f(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),I.call(this)}function Q(t,e,A,n,r,i,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,A?t._writev(r,e.onwrite):t._write(r,i,e.onwrite),e.sync=!1}function E(t,e,A,n){A||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),m(t,e)}function p(t,e){e.bufferProcessing=!0;var A=e.bufferedRequest;if(t._writev&&A&&A.next){var n=e.bufferedRequestCount,r=new Array(n),i=e.corkedRequestsFree;i.entry=A;for(var a=0,s=!0;A;)r[a]=A,A.isBuf||(s=!1),A=A.next,a+=1;r.allBuffers=s,Q(t,e,!0,e.length,r,"",i.finish),e.pendingcb++,e.lastBufferedRequest=null,i.next?(e.corkedRequestsFree=i.next,i.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;A;){var g=A.chunk,c=A.encoding,I=A.callback;if(Q(t,e,!1,e.objectMode?1:g.length,g,c,I),A=A.next,e.bufferedRequestCount--,e.writing)break}null===A&&(e.lastBufferedRequest=null)}e.bufferedRequest=A,e.bufferProcessing=!1}function y(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function v(t,e){t._final((function(A){e.pendingcb--,A&&t.emit("error",A),e.prefinished=!0,t.emit("prefinish"),m(t,e)}))}function m(t,e){var A=y(e);return A&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,i.nextTick(v,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),A}g.inherits(d,I),f.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(f.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(C=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(t){return!!C.call(this,t)||this===d&&(t&&t._writableState instanceof f)}})):C=function(t){return t instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,e,A){var n,r=this._writableState,o=!1,a=!r.objectMode&&(n=t,u.isBuffer(n)||n instanceof l);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"===typeof e&&(A=e,e=null),a?e="buffer":e||(e=r.defaultEncoding),"function"!==typeof A&&(A=B),r.ended?function(t,e){var A=new Error("write after end");t.emit("error",A),i.nextTick(e,A)}(this,A):(a||function(t,e,A,n){var r=!0,o=!1;return null===A?o=new TypeError("May not write null values to stream"):"string"===typeof A||void 0===A||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),i.nextTick(n,o),r=!1),r}(this,r,t,A))&&(r.pendingcb++,o=function(t,e,A,n,r,i){if(!A){var o=function(t,e,A){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=u.from(e,A));return e}(e,n,r);n!==o&&(A=!0,r="buffer",n=o)}var a=e.objectMode?1:n.length;e.length+=a;var s=e.length<e.highWaterMark;s||(e.needDrain=!0);if(e.writing||e.corked){var g=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:r,isBuf:A,callback:i,next:null},g?g.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Q(t,e,!1,a,n,r,i);return s}(this,r,a,t,e,A)),o},d.prototype.cork=function(){this._writableState.corked++},d.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||p(this,t))},d.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(t,e,A){A(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,e,A){var n=this._writableState;"function"===typeof t?(A=t,t=null,e=null):"function"===typeof e&&(A=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,A){e.ending=!0,m(t,e),A&&(e.finished?i.nextTick(A):t.once("finish",A));e.ended=!0,t.writable=!1}(this,n,A)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),d.prototype.destroy=h.destroy,d.prototype._undestroy=h.undestroy,d.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,A(62),A(658).setImmediate,A(58))},function(t,e,A){"use strict";t.exports=o;var n=A(219),r=Object.create(A(257));function i(t,e){var A=this._transformState;A.transforming=!1;var n=A.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));A.writechunk=null,A.writecb=null,null!=e&&this.push(e),n(t);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"===typeof this._flush?this._flush((function(e,A){s(t,e,A)})):s(this,null,null)}function s(t,e,A){if(e)return t.emit("error",e);if(null!=A&&t.push(A),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}r.inherits=A(117),r.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,A){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,A){var n=this._transformState;if(n.writecb=A,n.writechunk=t,n.writeencoding=e,!n.transforming){var r=this._readableState;(n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var A=this;n.prototype._destroy.call(this,t,(function(t){e(t),A.emit("close")}))}},function(t,e,A){"use strict";(function(t){var e=A(514),n=A(84),r=A(236);function i(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return o(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==A.return||A.return()}finally{if(s)throw i}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function a(t,e){var A=e.extension,i=e.target,o=e.target2,a=r.b[A];Object(n.a)(a);for(var s=a.meta,g=(void 0===s?{}:s).suffix,c=void 0===g?"":g,I=t.getExtension(A),u=function(){var e=C[l],A="".concat(e).concat(c),n=null;"meta"===e||"function"===typeof t[e]||(I&&"function"===typeof I[A]?n=function(){return I[A].apply(I,arguments)}:"function"===typeof a[e]&&(n=a[e].bind(i))),n&&(i[e]=n,o[e]=n)},l=0,C=Object.keys(a);l<C.length;l++)u()}("undefined"!==typeof t?t:window).polyfillContext=function(t){t.luma=t.luma||{};var A=t.luma;return A.polyfilled||(Object(e.a)(t),function(t){t.luma.extensions={};var e,A=i(t.getSupportedExtensions()||[]);try{for(A.s();!(e=A.n()).done;){var n=e.value;t.luma[n]=t.getExtension(n)}}catch(r){A.e(r)}finally{A.f()}}(t),function(t,e){var A,n=i(Object.getOwnPropertyNames(e));try{for(n.s();!(A=n.n()).done;){var r=A.value;"overrides"!==r&&a(t,{extension:r,target:t.luma,target2:t})}}catch(o){n.e(o)}finally{n.f()}}(t,r.b),function(t,e){var A=e.target,n=e.target2;Object.keys(r.a).forEach((function(e){if("function"===typeof r.a[e]){var i=t[e]?t[e].bind(t):function(){},o=r.a[e].bind(null,t,i);A[e]=o,n[e]=o}}))}(t,{target:A,target2:t}),A.polyfilled=!0),t}}).call(this,A(58))},function(t,e,A){"use strict";(function(t,n){var r=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.console=e.process=e.document=e.global=e.window=e.self=void 0;var i=r(A(293)),o={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document,process:"object"===("undefined"===typeof n?"undefined":(0,i.default)(n))&&n},a=o.self||o.window||o.global;e.self=a;var s=o.window||o.self||o.global;e.window=s;var g=o.global||o.self||o.window;e.global=g;var c=o.document||{};e.document=c;var I=o.process||{};e.process=I;var u=console;e.console=u}).call(this,A(58),A(62))},function(t,e,A){"use strict";(function(t){var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=o,e.isBrowserMainThread=function(){return o()&&"undefined"!==typeof document};var r=n(A(293)),i=n(A(377));function o(){return!("object"===("undefined"===typeof t?"undefined":(0,r.default)(t))&&"[object process]"===String(t)&&!t.browser)||(0,i.default)()}}).call(this,A(62))},function(t,e,A){"use strict";var n=A(194);e.a={name:"project32",dependencies:[n.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(t,e,A){"use strict";var n=A(739);e.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      "}}},n.a)},function(t,e,A){"use strict";(function(t){var n=A(37),r=A(482);A.d(e,"b",(function(){return r.a}));var i=A(311);A.d(e,"c",(function(){return i.a}));var o=A(503);A.d(e,"a",(function(){return o.a})),A.d(e,"f",(function(){return n.d})),A.d(e,"e",(function(){return n.a})),A.d(e,"g",(function(){return n.g}));var a=A(305);A.d(e,"d",(function(){return a.a}));var s={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t};(s.global||s.self||s.window).mathgl={config:n.b}}).call(this,A(58))},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(111),r=A(102),i=A(128),o=A(129),a=A(88),s=A(320),g=A(37),c=A(65),I=A(38),u=A(181);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var C=function(t){Object(i.a)(A,t);var e=l(A);function A(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(n.a)(this,A),t=e.call(this,2),Object(g.f)(r)&&1===arguments.length?t.copy(r):(g.b.debug&&(Object(c.a)(r),Object(c.a)(i)),t[0]=r,t[1]=i),t}return Object(r.a)(A,[{key:"set",value:function(t,e){return this[0]=t,this[1]=e,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this.check()}},{key:"fromObject",value:function(t){return g.b.debug&&(Object(c.a)(t.x),Object(c.a)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t}},{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(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return I.j(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return Object(u.a)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return I.i(this,this,t),this.check()}},{key:"transformByMatrix2x3",value:function(t){return I.h(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return I.g(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 2}}]),A}(s.a)},function(t,e,A){"use strict";(function(t){var n=A(136),r=A(484);A.d(e,"d",(function(){return r.a}));var i=A(193);A.d(e,"e",(function(){return i.a}));var o=A(485);A.d(e,"f",(function(){return o.a}));var a=A(486);A.d(e,"a",(function(){return a.a}));var s=A(227);A.d(e,"b",(function(){return s.a}));var g=A(261);A.d(e,"c",(function(){return g.a}));var c=A(33);A.d(e,"t",(function(){return c.f})),A.d(e,"u",(function(){return c.g})),A.d(e,"z",(function(){return c.l})),A.d(e,"A",(function(){return c.m})),A.d(e,"s",(function(){return c.e})),A.d(e,"x",(function(){return c.j})),A.d(e,"y",(function(){return c.k})),A.d(e,"G",(function(){return c.s})),A.d(e,"F",(function(){return c.r})),A.d(e,"C",(function(){return c.o})),A.d(e,"w",(function(){return c.i})),A.d(e,"D",(function(){return c.p})),A.d(e,"v",(function(){return c.h})),A.d(e,"E",(function(){return c.q})),A.d(e,"n",(function(){return c.b})),A.d(e,"m",(function(){return c.a})),A.d(e,"p",(function(){return c.c})),A.d(e,"r",(function(){return c.d})),A.d(e,"B",(function(){return c.n})),A.d(e,"l",(function(){return c.t}));var I=A(36);A.d(e,"q",(function(){return I.a}));var u=A(487);A.d(e,"h",(function(){return u.a}));var l=A(488);A.d(e,"k",(function(){return l.a}));var C=A(489);A.d(e,"j",(function(){return C.a}));var h=A(228);A.d(e,"g",(function(){return h.a}));var B=A(490);A.d(e,"i",(function(){return B.a}));var f=A(149);A.d(e,"o",(function(){return f.a}));var d={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t};(d.global||d.self||d.window).mathgl={config:n.config}}).call(this,A(58))},function(t,e,A){"use strict";A.d(e,"a",(function(){return l}));var n=A(5),r=A(4),i=A(16),o=A(7),a=A(14),s=A(226),g=A(33),c=A(36),I=A(38),u=A(119),l=function(t){function e(){var t,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(n.a)(this,e),t=Object(i.a)(this,Object(o.a)(e).call(this,2)),Object(g.m)(A)&&1===arguments.length?t.copy(A):(g.f.debug&&(Object(c.a)(A),Object(c.a)(r)),t[0]=A,t[1]=r),t}return Object(a.a)(e,t),Object(r.a)(e,[{key:"set",value:function(t,e,A){return this[0]=t,this[1]=e,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this.check()}},{key:"fromObject",value:function(t){return g.f.debug&&(Object(c.a)(t.x),Object(c.a)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t}},{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(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return I.j(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return Object(u.a)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return I.i(this,this,t),this.check()}},{key:"transformByMatrix2x3",value:function(t){return I.h(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return I.g(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 2}}]),e}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return l}));var n=A(5),r=A(4),i=A(16),o=A(7),a=A(14),s=A(226),g=A(33),c=A(36),I=A(27),u=A(119),l=function(t){function e(){var t,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return Object(n.a)(this,e),t=Object(i.a)(this,Object(o.a)(e).call(this,-0,-0,-0,-0)),Object(g.m)(A)&&1===arguments.length?t.copy(A):(g.f.debug&&(Object(c.a)(A),Object(c.a)(r),Object(c.a)(a),Object(c.a)(s)),t[0]=A,t[1]=r,t[2]=a,t[3]=s),t}return Object(a.a)(e,t),Object(r.a)(e,[{key:"set",value:function(t,e,A,n){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}},{key:"fromObject",value:function(t){return g.f.debug&&(Object(c.a)(t.x),Object(c.a)(t.y),Object(c.a)(t.z),Object(c.a)(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}},{key:"transform",value:function(t){return I.q(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return Object(u.e)(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return Object(u.d)(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return I.r(this,this,t),this.check()}},{key:"applyMatrix4",value:function(t){return t.transform(this,this),this}},{key:"ELEMENTS",get:function(){return 4}},{key:"z",get:function(){return this[2]},set:function(t){return this[2]=Object(c.a)(t)}},{key:"w",get:function(){return this[3]},set:function(t){return this[3]=Object(c.a)(t)}}]),e}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return d}));var n=A(5),r=A(16),i=A(7),o=A(4),a=A(14),s=A(321),g=A(36),c=A(119),I=A(53),u=A(38),l=A(27),C=Object.freeze([1,0,0,0,1,0,0,0,1]),h=Object.freeze([0,0,0,0,0,0,0,0,0]),B=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),f={},d=function(t){function e(t){var A;return Object(n.a)(this,e),A=Object(r.a)(this,Object(i.a)(e).call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0)),1===arguments.length&&Array.isArray(t)?A.copy(t):A.identity(),A}return Object(a.a)(e,t),Object(o.a)(e,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return B}}],[{key:"IDENTITY",get:function(){return f.IDENTITY=f.IDENTITY||Object.freeze(new e(C)),f.IDENTITY}},{key:"ZERO",get:function(){return f.ZERO=f.ZERO||Object.freeze(new e(h)),f.ZERO}}]),Object(o.a)(e,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s){return this[0]=t,this[1]=n,this[2]=o,this[3]=e,this[4]=r,this[5]=a,this[6]=A,this[7]=i,this[8]=s,this.check()}},{key:"determinant",value:function(){return I.b(this)}},{key:"identity",value:function(){return this.copy(C)}},{key:"fromQuaternion",value:function(t){return I.c(this,t),this.check()}},{key:"transpose",value:function(){return I.i(this,this),this.check()}},{key:"invert",value:function(){return I.d(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return I.e(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return I.e(this,this,t),this.check()}},{key:"rotate",value:function(t){return I.f(this,this,t),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?I.g(this,this,t):I.g(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return I.h(this,this,t),this.check()}},{key:"transform",value:function(t,e){switch(t.length){case 2:e=u.i(e||[-0,-0],t,this);break;case 3:e=l.p(e||[-0,-0,-0],t,this);break;case 4:e=Object(c.e)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(g.b)(e,t.length),e}},{key:"transformVector",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}},{key:"transformVector2",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}},{key:"transformVector3",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}}]),e}(s.a)},function(t,e,A){"use strict";e.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(t,e,A){"use strict";A.d(e,"a",(function(){return g}));var n=A(22),r=A(5),i=A(4),o=A(33),a=A(193),s=A(27),g=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.phi,n=e.theta,i=e.radius,o=e.bearing,a=e.pitch,s=(e.altitude,e.radiusScale),g=void 0===s?6371e3:s;Object(r.a)(this,t),0===arguments.length?(this.phi=0,this.theta=0,this.radius=1):Number.isFinite(A)||Number.isFinite(n)?(this.phi=A||0,this.theta=n||0):(Number.isFinite(o)||Number.isFinite(a))&&(this.bearing=o||0,this.pitch=a||0),this.radius=i||1,this.radiusScale=g||1,this.check()}return Object(i.a)(t,[{key:"toString",value:function(){return this.formatString(o.f)}},{key:"formatString",value:function(t){var e=t.printTypes,A=(t.printDegrees,o.l);return"".concat(e?"Spherical":"","[rho:").concat(A(this.radius),",theta:").concat(A(this.theta),",phi:").concat(A(this.phi),"]")}},{key:"equals",value:function(t){return Object(o.j)(this.radius,t.radius)&&Object(o.j)(this.theta,t.theta)&&Object(o.j)(this.phi,t.phi)}},{key:"exactEquals",value:function(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}},{key:"set",value:function(t,e,A){return this.radius=t,this.phi=e,this.theta=A,this.check()}},{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"copy",value:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}},{key:"fromLngLatZ",value:function(t){var e=Object(n.a)(t,3),A=e[0],r=e[1],i=e[2];this.radius=1+i/this.radiusScale,this.phi=Object(o.o)(r),this.theta=Object(o.o)(A)}},{key:"fromVector3",value:function(t){return this.radius=s.g(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos(Object(o.d)(t[2]/this.radius,-1,1))),this.check()}},{key:"toVector3",value:function(){return new a.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(t){this.phi=Math.PI-Object(o.o)(t)}},{key:"pitch",get:function(){return Object(o.i)(this.theta)},set:function(t){this.theta=Object(o.o)(t)}},{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}}]),t}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return s}));var n=A(5),r=A(4),i=A(227),o=A(193),a=A(228),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.x,r=void 0===A?0:A,i=e.y,s=void 0===i?0:i,g=e.z,c=void 0===g?0:g,I=e.roll,u=void 0===I?0:I,l=e.pitch,C=void 0===l?0:l,h=e.yaw,B=void 0===h?0:h,f=e.position,d=e.orientation;Object(n.a)(this,t),Array.isArray(f)&&3===f.length?this.position=new o.a(f):this.position=new o.a(r,s,c),Array.isArray(d)&&4===d.length?this.orientation=new a.a(d,d[3]):this.orientation=new a.a(u,C,B,a.a.RollPitchYaw)}return Object(r.a)(t,[{key:"getPosition",value:function(){return this.position}},{key:"getOrientation",value:function(){return this.orientation}},{key:"equals",value:function(t){return!!t&&(this.position.equals(t.position)&&this.orientation.equals(t.orientation))}},{key:"exactEquals",value:function(t){return!!t&&(this.position.exactEquals(t.position)&&this.orientation.exactEquals(t.orientation))}},{key:"getTransformationMatrix",value:function(){var t=Math.sin(this.roll),e=Math.sin(this.pitch),A=Math.sin(this.yaw),n=Math.cos(this.roll),r=Math.cos(this.pitch),o=Math.cos(this.yaw);return(new i.a).setRowMajor(o*r,-A*n+o*e*t,A*t+o*e*n,this.x,A*r,o*n+A*e*t,-o*t+A*e*n,this.y,-e,r*t,r*n,this.z,0,0,0,1)}},{key:"getTransformationMatrixFromPose",value:function(t){return(new i.a).multiplyRight(this.getTransformationMatrix()).multiplyRight(t.getTransformationMatrix().invert())}},{key:"getTransformationMatrixToPose",value:function(t){return(new i.a).multiplyRight(t.getTransformationMatrix()).multiplyRight(this.getTransformationMatrix().invert())}},{key:"x",get:function(){return this.position.x},set:function(t){return this.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){return this.position.y=t}},{key:"z",get:function(){return this.position.z},set:function(t){return this.position.z=t}},{key:"roll",get:function(){return this.orientation.roll},set:function(t){return this.orientation.roll=t}},{key:"pitch",get:function(){return this.orientation.pitch},set:function(t){return this.orientation.pitch=t}},{key:"yaw",get:function(){return this.orientation.yaw},set:function(t){return this.orientation.yaw=t}}]),t}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(5),r=A(4),i=A(33),o=function(){function t(e){Object(n.a)(this,t),this.points=e,this.isClosed=Object(i.j)(this.points[this.points.length-1],this.points[0]),Object.freeze(this)}return Object(r.a)(t,[{key:"getSignedArea",value:function(){var t=0;return this.forEachSegment((function(e,A){t+=(e[0]+A[0])*(e[1]-A[1])})),t/2}},{key:"getArea",value:function(){return Math.abs(this.getSignedArea())}},{key:"getWindingDirection",value:function(){return Math.sign(this.getSignedArea())}},{key:"forEachSegment",value:function(t){for(var e=this.points.length,A=0;A<e-1;A++)t(this.points[A],this.points[A+1],A,A+1);this.isClosed||t(this.points[e-1],this.points[0],e-1,0)}}]),t}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return B}));var n=A(105),r=A(97),i=A(106),o=A(107),a=A(74),s=A(410),g=A(46),c=A(47),I=A(27),u=A(169);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var C=[0,0,0],h={},B=function(t){Object(i.a)(A,t);var e=l(A);function A(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(n.a)(this,A),t=e.call(this,-0,-0,-0),1===arguments.length&&Object(g.f)(r)?t.copy(r):(g.b.debug&&(Object(c.a)(r),Object(c.a)(i),Object(c.a)(o)),t[0]=r,t[1]=i,t[2]=o),t}return Object(r.a)(A,null,[{key:"ZERO",get:function(){return h.ZERO=h.ZERO||Object.freeze(new A(0,0,0,0))}}]),Object(r.a)(A,[{key:"set",value:function(t,e,A){return this[0]=t,this[1]=e,this[2]=A,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return g.b.debug&&(Object(c.a)(t.x),Object(c.a)(t.y),Object(c.a)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"angle",value:function(t){return I.a(this,t)}},{key:"cross",value:function(t){return I.c(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?C:A;return I.k(this,this,n,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?C:A;return I.l(this,this,n,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?C:A;return I.m(this,this,n,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return I.q(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return Object(u.c)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return I.p(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return Object(u.b)(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return I.r(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=Object(c.a)(t)}}]),A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return Q}));var n=A(105),r=A(97),i=A(106),o=A(107),a=A(74),s=A(323),g=A(47),c=A(169),I=A(53),u=A(38),l=A(27);function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var h=Object.freeze([1,0,0,0,1,0,0,0,1]),B=Object.freeze([0,0,0,0,0,0,0,0,0]),f=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),d={},Q=function(t){Object(i.a)(A,t);var e=C(A);function A(t){var r;return Object(n.a)(this,A),r=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?r.copy(t):r.identity(),r}return Object(r.a)(A,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return f}}],[{key:"IDENTITY",get:function(){return d.IDENTITY=d.IDENTITY||Object.freeze(new A(h)),d.IDENTITY}},{key:"ZERO",get:function(){return d.ZERO=d.ZERO||Object.freeze(new A(B)),d.ZERO}}]),Object(r.a)(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s){return this[0]=t,this[1]=n,this[2]=o,this[3]=e,this[4]=r,this[5]=a,this[6]=A,this[7]=i,this[8]=s,this.check()}},{key:"determinant",value:function(){return I.b(this)}},{key:"identity",value:function(){return this.copy(h)}},{key:"fromQuaternion",value:function(t){return I.c(this,t),this.check()}},{key:"transpose",value:function(){return I.i(this,this),this.check()}},{key:"invert",value:function(){return I.d(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return I.e(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return I.e(this,this,t),this.check()}},{key:"rotate",value:function(t){return I.f(this,this,t),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?I.g(this,this,t):I.g(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return I.h(this,this,t),this.check()}},{key:"transform",value:function(t,e){switch(t.length){case 2:e=u.i(e||[-0,-0],t,this);break;case 3:e=l.p(e||[-0,-0,-0],t,this);break;case 4:e=Object(c.d)(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(g.b)(e,t.length),e}},{key:"transformVector",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}},{key:"transformVector2",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}},{key:"transformVector3",value:function(t,e){return Object(g.c)("Matrix3.transformVector"),this.transform(t,e)}}]),A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return h}));var n=A(105),r=A(97),i=A(106),o=A(107),a=A(74),s=A(232),g=A(47),c=A(114),I=A(34),u=A(45);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var C=[0,0,0,1],h=function(t){Object(i.a)(A,t);var e=l(A);function A(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return Object(n.a)(this,A),t=e.call(this,-0,-0,-0,-0),Array.isArray(r)&&1===arguments.length?t.copy(r):t.set(r,i,o,a),t}return Object(r.a)(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}},{key:"set",value:function(t,e,A,n){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this.check()}},{key:"fromMatrix3",value:function(t){return I.e(this,t),this.check()}},{key:"identity",value:function(){return I.f(this),this.check()}},{key:"fromAxisRotation",value:function(t,e){return I.p(this,t,e),this.check()}},{key:"setAxisAngle",value:function(t,e){return this.fromAxisRotation(t,e)}},{key:"len",value:function(){return I.h(this)}},{key:"lengthSquared",value:function(){return I.r(this)}},{key:"dot",value:function(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return I.d(this,t)}},{key:"rotationTo",value:function(t,e){return I.n(this,t,e),this.check()}},{key:"add",value:function(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return I.a(this,this,t),this.check()}},{key:"calculateW",value:function(){return I.b(this,this),this.check()}},{key:"conjugate",value:function(){return I.c(this,this),this.check()}},{key:"invert",value:function(){return I.g(this,this),this.check()}},{key:"lerp",value:function(t,e,A){return I.i(this,t,e,A),this.check()}},{key:"multiplyRight",value:function(t,e){return Object(c.a)(!e),I.j(this,this,t),this.check()}},{key:"multiplyLeft",value:function(t,e){return Object(c.a)(!e),I.j(this,t,this),this.check()}},{key:"normalize",value:function(){var t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}},{key:"rotateX",value:function(t){return I.k(this,this,t),this.check()}},{key:"rotateY",value:function(t){return I.l(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return I.m(this,this,t),this.check()}},{key:"scale",value:function(t){return I.o(this,this,t),this.check()}},{key:"slerp",value:function(t,e,A){switch(arguments.length){case 1:var n=arguments[0],r=n.start;t=void 0===r?C:r,e=n.target,A=n.ratio;break;case 2:var i=Array.prototype.slice.call(arguments);e=i[0],A=i[1],t=this}return I.q(this,t,e,A),this.check()}},{key:"transformVector4",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return u.o(e,t,this),Object(g.b)(e,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(t,e){return this.setAxisAngle(t,e)}},{key:"premultiply",value:function(t,e){return this.multiplyLeft(t,e)}},{key:"multiply",value:function(t,e){return this.multiplyRight(t,e)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=Object(g.a)(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=Object(g.a)(t)}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=Object(g.a)(t)}},{key:"w",get:function(){return this[3]},set:function(t){this[3]=Object(g.a)(t)}}]),A}(s.a)},function(t,e,A){"use strict";e.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(t,e){var A=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return A.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},function(t,e,A){var n=A(550),r=A(707),i=A(551);t.exports=function(t,e,A,o,a,s){var g=1&A,c=t.length,I=e.length;if(c!=I&&!(g&&I>c))return!1;var u=s.get(t);if(u&&s.get(e))return u==e;var l=-1,C=!0,h=2&A?new n:void 0;for(s.set(t,e),s.set(e,t);++l<c;){var B=t[l],f=e[l];if(o)var d=g?o(f,B,l,e,t,s):o(B,f,l,t,e,s);if(void 0!==d){if(d)continue;C=!1;break}if(h){if(!r(e,(function(t,e){if(!i(h,e)&&(B===t||a(B,t,A,o,s)))return h.push(e)}))){C=!1;break}}else if(B!==f&&!a(B,f,A,o,s)){C=!1;break}}return s.delete(t),s.delete(e),C}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(85),r=A(153);e.default=function(t,e,A,i){void 0===i&&(i={});var o=r.getCoord(t),a=n.degreesToRadians(o[0]),s=n.degreesToRadians(o[1]),g=n.degreesToRadians(A),c=n.lengthToRadians(e,i.units),I=Math.asin(Math.sin(s)*Math.cos(c)+Math.cos(s)*Math.sin(c)*Math.cos(g)),u=a+Math.atan2(Math.sin(g)*Math.sin(c)*Math.cos(s),Math.cos(c)-Math.sin(s)*Math.sin(I)),l=n.radiansToDegrees(u),C=n.radiansToDegrees(I);return n.point([l,C],i.properties)}},function(t,e,A){"use strict";A.d(e,"c",(function(){return r})),A.d(e,"b",(function(){return i})),A.d(e,"a",(function(){return o}));var n=A(259);function r(t){return t+3&-4}function i(t,e,A){return Object(n.c)(t,e,A)}function o(t,e,A){var n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{var i=t.byteOffset,o=t.byteLength;n=new Uint8Array(t.buffer,i,o)}return e.set(n,A),A+r(n.byteLength)}},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,A){"use strict";var n=A(315);function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var A=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=A){var n,r,i=[],o=!0,a=!1;try{for(A=A.call(t);!(o=(n=A.next()).done)&&(i.push(n.value),!e||i.length!==e);o=!0);}catch(s){a=!0,r=s}finally{try{o||null==A.return||A.return()}finally{if(a)throw r}}return i}}(t,e)||Object(n.a)(t,e)||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.")}()}var i=A(67),o=A(59),a=A(109),s=A(112),g=A(78),c=A(51),I=A(316),u=A(179),l=A(18),C=A(38),h=A(27),B=A(45);function f(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}A.d(e,"a",(function(){return y}));var d=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),Q=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}),p={},y=function(t){Object(a.a)(A,t);var e=f(A);function A(t){var n;return Object(i.a)(this,A),n=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return Object(o.a)(A,[{key:"INDICES",get:function(){return E}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return p.IDENTITY=p.IDENTITY||Object.freeze(new A(d)),p.IDENTITY}},{key:"ZERO",get:function(){return p.ZERO=p.ZERO||Object.freeze(new A(Q)),p.ZERO}}]),Object(o.a)(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this[9]=g,this[10]=c,this[11]=I,this[12]=u,this[13]=l,this[14]=C,this[15]=h,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=r,this[2]=s,this[3]=u,this[4]=e,this[5]=i,this[6]=g,this[7]=l,this[8]=A,this[9]=o,this[10]=c,this[11]=C,this[12]=n,this[13]=a,this[14]=I,this[15]=h,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(d)}},{key:"fromQuaternion",value:function(t){return l.c(this,t),this.check()}},{key:"frustum",value:function(t){var e=t.left,n=t.right,r=t.bottom,i=t.top,o=t.near,a=t.far;return a===1/0?A._computeInfinitePerspectiveOffCenter(this,e,n,r,i,o):l.d(this,e,n,r,i,o,a),this.check()}},{key:"lookAt",value:function(t,e,A){if(1===arguments.length){var n=t;t=n.eye,e=n.center,A=n.up}return e=e||[0,0,0],A=A||[0,1,0],l.g(this,t,e,A),this.check()}},{key:"ortho",value:function(t){var e=t.left,A=t.right,n=t.bottom,r=t.top,i=t.near,o=void 0===i?.1:i,a=t.far,s=void 0===a?500:a;return l.i(this,e,A,n,r,o,s),this.check()}},{key:"orthographic",value:function(t){var e=t.fovy,n=void 0===e?45*Math.PI/180:e,r=t.aspect,i=void 0===r?1:r,o=t.focalDistance,a=void 0===o?1:o,s=t.near,g=void 0===s?.1:s,c=t.far,I=void 0===c?500:c;if(n>2*Math.PI)throw Error("radians");var u=n/2,l=a*Math.tan(u),C=l*i;return(new A).ortho({left:-C,right:C,bottom:-l,top:l,near:g,far:I})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,A=void 0===e?void 0:e,n=t.fov,r=void 0===n?45*Math.PI/180:n,i=t.aspect,o=void 0===i?1:i,a=t.near,s=void 0===a?.1:a,g=t.far,c=void 0===g?500:g;if((A=A||r)>2*Math.PI)throw Error("radians");return l.j(this,A,o,s,c),this.check()}},{key:"determinant",value:function(){return l.a(this)}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=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],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*r,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*r,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*r,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*r,t[8]=this[10]*i,t}},{key:"transpose",value:function(){return l.q(this,this),this.check()}},{key:"invert",value:function(){return l.f(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return l.h(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return l.h(this,this,t),this.check()}},{key:"rotateX",value:function(t){return l.l(this,this,t),this.check()}},{key:"rotateY",value:function(t){return l.m(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return l.n(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=r(t,3),A=e[0],n=e[1],i=e[2];return this.rotateX(A).rotateY(n).rotateZ(i)}},{key:"rotateAxis",value:function(t,e){return l.k(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?l.o(this,this,t):l.o(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return l.p(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(e=B.n(e||[-0,-0,-0,-0],t,this),Object(c.b)(e,4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=C.j(e||[-0,-0],t,this);break;case 3:e=h.q(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(c.b)(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=Object(u.a)(e||[-0,-0],t,this);break;case 3:e=Object(u.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(c.b)(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,A){return this.identity().translate([t,e,A])}},{key:"transformPoint",value:function(t,e){return Object(c.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return Object(c.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return Object(c.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,A,n,r,i){var o=2*i/(A-e),a=2*i/(r-n),s=(A+e)/(A-e),g=(r+n)/(r-n),c=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=g,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0,t}}]),A}(I.a)},function(t,e,A){"use strict";var n=A(322);function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}(t,e)||Object(n.a)(t,e)||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.")}()}var i=A(105),o=A(97),a=A(106),s=A(107),g=A(74),c=A(47),I=A(323),u=A(169),l=A(18),C=A(38),h=A(27),B=A(45);function f(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}A.d(e,"a",(function(){return y}));var d=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),Q=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}),p={},y=function(t){Object(a.a)(A,t);var e=f(A);function A(t){var n;return Object(i.a)(this,A),n=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return Object(o.a)(A,[{key:"INDICES",get:function(){return E}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return p.IDENTITY=p.IDENTITY||Object.freeze(new A(d)),p.IDENTITY}},{key:"ZERO",get:function(){return p.ZERO=p.ZERO||Object.freeze(new A(Q)),p.ZERO}}]),Object(o.a)(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this[9]=g,this[10]=c,this[11]=I,this[12]=u,this[13]=l,this[14]=C,this[15]=h,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=r,this[2]=s,this[3]=u,this[4]=e,this[5]=i,this[6]=g,this[7]=l,this[8]=A,this[9]=o,this[10]=c,this[11]=C,this[12]=n,this[13]=a,this[14]=I,this[15]=h,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(d)}},{key:"fromQuaternion",value:function(t){return l.c(this,t),this.check()}},{key:"frustum",value:function(t){var e=t.left,n=t.right,r=t.bottom,i=t.top,o=t.near,a=t.far;return a===1/0?A._computeInfinitePerspectiveOffCenter(this,e,n,r,i,o):l.d(this,e,n,r,i,o,a),this.check()}},{key:"lookAt",value:function(t,e,A){if(1===arguments.length){var n=t;t=n.eye,e=n.center,A=n.up}return e=e||[0,0,0],A=A||[0,1,0],l.g(this,t,e,A),this.check()}},{key:"ortho",value:function(t){var e=t.left,A=t.right,n=t.bottom,r=t.top,i=t.near,o=void 0===i?.1:i,a=t.far,s=void 0===a?500:a;return l.i(this,e,A,n,r,o,s),this.check()}},{key:"orthographic",value:function(t){var e=t.fovy,n=void 0===e?45*Math.PI/180:e,r=t.aspect,i=void 0===r?1:r,o=t.focalDistance,a=void 0===o?1:o,s=t.near,g=void 0===s?.1:s,c=t.far,I=void 0===c?500:c;if(n>2*Math.PI)throw Error("radians");var u=n/2,l=a*Math.tan(u),C=l*i;return(new A).ortho({left:-C,right:C,bottom:-l,top:l,near:g,far:I})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,A=void 0===e?void 0:e,n=t.fov,r=void 0===n?45*Math.PI/180:n,i=t.aspect,o=void 0===i?1:i,a=t.near,s=void 0===a?.1:a,g=t.far,c=void 0===g?500:g;if((A=A||r)>2*Math.PI)throw Error("radians");return l.j(this,A,o,s,c),this.check()}},{key:"determinant",value:function(){return l.a(this)}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=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],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*r,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*r,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*r,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*r,t[8]=this[10]*i,t}},{key:"transpose",value:function(){return l.q(this,this),this.check()}},{key:"invert",value:function(){return l.f(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return l.h(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return l.h(this,this,t),this.check()}},{key:"rotateX",value:function(t){return l.l(this,this,t),this.check()}},{key:"rotateY",value:function(t){return l.m(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return l.n(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=r(t,3),A=e[0],n=e[1],i=e[2];return this.rotateX(A).rotateY(n).rotateZ(i)}},{key:"rotateAxis",value:function(t,e){return l.k(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?l.o(this,this,t):l.o(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return l.p(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(e=B.n(e||[-0,-0,-0,-0],t,this),Object(c.b)(e,4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=C.j(e||[-0,-0],t,this);break;case 3:e=h.q(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(c.b)(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=Object(u.a)(e||[-0,-0],t,this);break;case 3:e=Object(u.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(c.b)(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,A){return this.identity().translate([t,e,A])}},{key:"transformPoint",value:function(t,e){return Object(c.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return Object(c.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return Object(c.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,A,n,r,i){var o=2*i/(A-e),a=2*i/(r-n),s=(A+e)/(A-e),g=(r+n)/(r-n),c=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=g,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0,t}}]),A}(I.a)},function(t,e,A){"use strict";var n=A(67),r=A(59),i=A(109),o=A(112),a=A(78),s=A(231),g=A(51),c=A(113);function I(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var u=function(t){Object(i.a)(A,t);var e=I(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"copy",value:function(t){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 t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A){var n=this[A]-t[A];e+=n*n}return Object(g.a)(e)}},{key:"dot",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A)e+=this[A]*t[A];return Object(g.a)(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return Object(c.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),Object(g.a)(this[t])}},{key:"setComponent",value:function(t,e){return Object(c.a)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=Object(g.a)(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=Object(g.a)(t)}}]),A}(s.a),l=A(48),C=A(27),h=A(179);function B(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}A.d(e,"a",(function(){return Q}));var f=[0,0,0],d={},Q=function(t){Object(i.a)(A,t);var e=B(A);function A(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(n.a)(this,A),t=e.call(this,-0,-0,-0),1===arguments.length&&Object(l.d)(r)?t.copy(r):(l.a.debug&&(Object(g.a)(r),Object(g.a)(i),Object(g.a)(o)),t[0]=r,t[1]=i,t[2]=o),t}return Object(r.a)(A,null,[{key:"ZERO",get:function(){return d.ZERO=d.ZERO||Object.freeze(new A(0,0,0,0))}}]),Object(r.a)(A,[{key:"set",value:function(t,e,A){return this[0]=t,this[1]=e,this[2]=A,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return l.a.debug&&(Object(g.a)(t.x),Object(g.a)(t.y),Object(g.a)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"angle",value:function(t){return C.a(this,t)}},{key:"cross",value:function(t){return C.c(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?f:A;return C.k(this,this,n,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?f:A;return C.l(this,this,n,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?f:A;return C.m(this,this,n,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return C.q(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return Object(h.c)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return C.p(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return Object(h.b)(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return C.r(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=Object(g.a)(t)}}]),A}(u)},function(t,e,A){"use strict";var n=A(326),r=A(111),i=A(102),o=A(128),a=A(129),s=A(88),g=A(65),c=A(327),I=A(37);function u(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var l=function(t){Object(o.a)(A,t);var e=u(A);function A(){return Object(r.a)(this,A),e.apply(this,arguments)}return Object(i.a)(A,[{key:"toString",value:function(){var t="[";if(I.b.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var A=0;A<this.RANK;++A)t+=" ".concat(this[A*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,A){return this[e*this.RANK+t]=Object(g.a)(A),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),A=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[A+n];return e}},{key:"setColumn",value:function(t,e){for(var A=t*this.RANK,n=0;n<this.RANK;++n)this[A+n]=e[n];return this}}]),A}(c.a),C=A(181),h=A(18),B=A(38),f=A(27),d=A(45);function Q(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return m}));var E=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=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}),v={},m=function(t){Object(o.a)(A,t);var e=Q(A);function A(t){var n;return Object(r.a)(this,A),n=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return Object(i.a)(A,[{key:"INDICES",get:function(){return y}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return v.IDENTITY=v.IDENTITY||Object.freeze(new A(E)),v.IDENTITY}},{key:"ZERO",get:function(){return v.ZERO=v.ZERO||Object.freeze(new A(p)),v.ZERO}}]),Object(i.a)(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this[9]=g,this[10]=c,this[11]=I,this[12]=u,this[13]=l,this[14]=C,this[15]=h,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=r,this[2]=s,this[3]=u,this[4]=e,this[5]=i,this[6]=g,this[7]=l,this[8]=A,this[9]=o,this[10]=c,this[11]=C,this[12]=n,this[13]=a,this[14]=I,this[15]=h,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(E)}},{key:"fromQuaternion",value:function(t){return h.c(this,t),this.check()}},{key:"frustum",value:function(t){var e=t.left,n=t.right,r=t.bottom,i=t.top,o=t.near,a=t.far;return a===1/0?A._computeInfinitePerspectiveOffCenter(this,e,n,r,i,o):h.d(this,e,n,r,i,o,a),this.check()}},{key:"lookAt",value:function(t,e,A){if(1===arguments.length){var n=t;t=n.eye,e=n.center,A=n.up}return e=e||[0,0,0],A=A||[0,1,0],h.g(this,t,e,A),this.check()}},{key:"ortho",value:function(t){var e=t.left,A=t.right,n=t.bottom,r=t.top,i=t.near,o=void 0===i?.1:i,a=t.far,s=void 0===a?500:a;return h.i(this,e,A,n,r,o,s),this.check()}},{key:"orthographic",value:function(t){var e=t.fovy,n=void 0===e?45*Math.PI/180:e,r=t.aspect,i=void 0===r?1:r,o=t.focalDistance,a=void 0===o?1:o,s=t.near,g=void 0===s?.1:s,c=t.far,I=void 0===c?500:c;if(n>2*Math.PI)throw Error("radians");var u=n/2,l=a*Math.tan(u),C=l*i;return(new A).ortho({left:-C,right:C,bottom:-l,top:l,near:g,far:I})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,A=void 0===e?void 0:e,n=t.fov,r=void 0===n?45*Math.PI/180:n,i=t.aspect,o=void 0===i?1:i,a=t.near,s=void 0===a?.1:a,g=t.far,c=void 0===g?500:g;if((A=A||r)>2*Math.PI)throw Error("radians");return h.j(this,A,o,s,c),this.check()}},{key:"determinant",value:function(){return h.a(this)}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=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],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*r,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*r,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*r,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*r,t[8]=this[10]*i,t}},{key:"transpose",value:function(){return h.q(this,this),this.check()}},{key:"invert",value:function(){return h.f(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return h.h(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return h.h(this,this,t),this.check()}},{key:"rotateX",value:function(t){return h.l(this,this,t),this.check()}},{key:"rotateY",value:function(t){return h.m(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return h.n(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=Object(n.a)(t,3),A=e[0],r=e[1],i=e[2];return this.rotateX(A).rotateY(r).rotateZ(i)}},{key:"rotateAxis",value:function(t,e){return h.k(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?h.o(this,this,t):h.o(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return h.p(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(e=d.n(e||[-0,-0,-0,-0],t,this),Object(g.b)(e,4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=B.j(e||[-0,-0],t,this);break;case 3:e=f.q(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(g.b)(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=Object(C.a)(e||[-0,-0],t,this);break;case 3:e=Object(C.c)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Object(g.b)(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,A){return this.identity().translate([t,e,A])}},{key:"transformPoint",value:function(t,e){return Object(g.c)("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return Object(g.c)("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return Object(g.c)("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,A,n,r,i){var o=2*i/(A-e),a=2*i/(r-n),s=(A+e)/(A-e),g=(r+n)/(r-n),c=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=g,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0,t}}]),A}(l)},function(t,e,A){!function(t){"use strict";function e(t,e){return t>e?1:t<e?-1:0}var A=function(t,A){void 0===t&&(t=e),void 0===A&&(A=!1),this._compare=t,this._root=null,this._size=0,this._noDuplicates=!!A},n={size:{configurable:!0}};function r(t,e,A){null===e?(t.inOut=!1,t.otherInOut=!0):(t.isSubject===e.isSubject?(t.inOut=!e.inOut,t.otherInOut=e.otherInOut):(t.inOut=!e.otherInOut,t.otherInOut=e.isVertical()?!e.inOut:e.inOut),e&&(t.prevInResult=!i(e,A)||e.isVertical()?e.prevInResult:e)),t.inResult=i(t,A)}function i(t,e){switch(t.type){case 0:switch(e){case 0:return!t.otherInOut;case 1:return t.otherInOut;case 2:return t.isSubject&&t.otherInOut||!t.isSubject&&!t.otherInOut;case 3:return!0}break;case 2:return 0===e||1===e;case 3:return 2===e;case 1:return!1}return!1}A.prototype.rotateLeft=function(t){var e=t.right;e&&(t.right=e.left,e.left&&(e.left.parent=t),e.parent=t.parent),t.parent?t===t.parent.left?t.parent.left=e:t.parent.right=e:this._root=e,e&&(e.left=t),t.parent=e},A.prototype.rotateRight=function(t){var e=t.left;e&&(t.left=e.right,e.right&&(e.right.parent=t),e.parent=t.parent),t.parent?t===t.parent.left?t.parent.left=e:t.parent.right=e:this._root=e,e&&(e.right=t),t.parent=e},A.prototype._splay=function(t){for(;t.parent;){var e=t.parent;e.parent?e.left===t&&e.parent.left===e?(this.rotateRight(e.parent),this.rotateRight(e)):e.right===t&&e.parent.right===e?(this.rotateLeft(e.parent),this.rotateLeft(e)):e.left===t&&e.parent.right===e?(this.rotateRight(e),this.rotateLeft(e)):(this.rotateLeft(e),this.rotateRight(e)):e.left===t?this.rotateRight(e):this.rotateLeft(e)}},A.prototype.splay=function(t){for(var e,A,n,r,i;t.parent;)(A=(e=t.parent).parent)&&A.parent?((n=A.parent).left===A?n.left=t:n.right=t,t.parent=n):(t.parent=null,this._root=t),r=t.left,i=t.right,t===e.left?(A&&(A.left===e?(e.right?(A.left=e.right,A.left.parent=A):A.left=null,e.right=A,A.parent=e):(r?(A.right=r,r.parent=A):A.right=null,t.left=A,A.parent=t)),i?(e.left=i,i.parent=e):e.left=null,t.right=e,e.parent=t):(A&&(A.right===e?(e.left?(A.right=e.left,A.right.parent=A):A.right=null,e.left=A,A.parent=e):(i?(A.left=i,i.parent=A):A.left=null,t.right=A,A.parent=t)),r?(e.right=r,r.parent=e):e.right=null,t.left=e,e.parent=t)},A.prototype.replace=function(t,e){t.parent?t===t.parent.left?t.parent.left=e:t.parent.right=e:this._root=e,e&&(e.parent=t.parent)},A.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},A.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},A.prototype.insert=function(t,e){var A=this._root,n=null,r=this._compare;if(this._noDuplicates)for(;A;){if(n=A,0===r(A.key,t))return;A=r(A.key,t)<0?A.right:A.left}else for(;A;)n=A,A=r(A.key,t)<0?A.right:A.left;return A={key:t,data:e,left:null,right:null,parent:n},n?r(n.key,A.key)<0?n.right=A:n.left=A:this._root=A,this.splay(A),this._size++,A},A.prototype.find=function(t){for(var e=this._root,A=this._compare;e;){var n=A(e.key,t);if(n<0)e=e.right;else{if(!(n>0))return e;e=e.left}}return null},A.prototype.contains=function(t){for(var e=this._root,A=this._compare;e;){var n=A(t,e.key);if(0===n)return!0;e=n<0?e.left:e.right}return!1},A.prototype.remove=function(t){var e=this.find(t);if(!e)return!1;if(this.splay(e),e.left)if(e.right){var A=this.minNode(e.right);A.parent!==e&&(this.replace(A,A.right),A.right=e.right,A.right.parent=A),this.replace(e,A),A.left=e.left,A.left.parent=A}else this.replace(e,e.left);else this.replace(e,e.right);return this._size--,!0},A.prototype.removeNode=function(t){if(!t)return!1;if(this.splay(t),t.left)if(t.right){var e=this.minNode(t.right);e.parent!==t&&(this.replace(e,e.right),e.right=t.right,e.right.parent=e),this.replace(t,e),e.left=t.left,e.left.parent=e}else this.replace(t,t.left);else this.replace(t,t.right);return this._size--,!0},A.prototype.erase=function(t){var e=this.find(t);if(e){this.splay(e);var A=e.left,n=e.right,r=null;A&&(A.parent=null,r=this.maxNode(A),this.splay(r),this._root=r),n&&(A?r.right=n:this._root=n,n.parent=r),this._size--}},A.prototype.pop=function(){var t=this._root,e=null;if(t){for(;t.left;)t=t.left;e={key:t.key,data:t.data},this.remove(t.key)}return e},A.prototype.next=function(t){var e=t;if(e)if(e.right)for(e=e.right;e&&e.left;)e=e.left;else for(e=t.parent;e&&e.right===t;)t=e,e=e.parent;return e},A.prototype.prev=function(t){var e=t;if(e)if(e.left)for(e=e.left;e&&e.right;)e=e.right;else for(e=t.parent;e&&e.left===t;)t=e,e=e.parent;return e},A.prototype.forEach=function(t){for(var e=this._root,A=[],n=!1,r=0;!n;)e?(A.push(e),e=e.left):A.length>0?(t(e=A.pop(),r++),e=e.right):n=!0;return this},A.prototype.range=function(t,e,A,n){for(var r=[],i=this._compare,o=this._root;0!==r.length||o;)if(o)r.push(o),o=o.left;else{if(i((o=r.pop()).key,e)>0)break;if(i(o.key,t)>=0&&A.call(n,o))return this;o=o.right}return this},A.prototype.keys=function(){for(var t=this._root,e=[],A=[],n=!1;!n;)t?(e.push(t),t=t.left):e.length>0?(t=e.pop(),A.push(t.key),t=t.right):n=!0;return A},A.prototype.values=function(){for(var t=this._root,e=[],A=[],n=!1;!n;)t?(e.push(t),t=t.left):e.length>0?(t=e.pop(),A.push(t.data),t=t.right):n=!0;return A},A.prototype.at=function(t){for(var e=this._root,A=[],n=!1,r=0;!n;)if(e)A.push(e),e=e.left;else if(A.length>0){if(e=A.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},A.prototype.load=function(t,e,A){if(void 0===t&&(t=[]),void 0===e&&(e=[]),void 0===A&&(A=!1),0!==this._size)throw new Error("bulk-load: tree is not empty");var n=t.length;return A&&function t(e,A,n,r,i){if(!(n>=r)){for(var o=e[n+r>>1],a=n-1,s=r+1;;){do{a++}while(i(e[a],o)<0);do{s--}while(i(e[s],o)>0);if(a>=s)break;var g=e[a];e[a]=e[s],e[s]=g,g=A[a],A[a]=A[s],A[s]=g}t(e,A,n,s,i),t(e,A,s+1,r,i)}}(t,e,0,n-1,this._compare),this._root=function t(e,A,n,r,i){var o=i-r;if(o>0){var a=r+Math.floor(o/2),s={key:A[a],data:n[a],parent:e};return s.left=t(s,A,n,r,a),s.right=t(s,A,n,a+1,i),s}return null}(null,t,e,0,n),this._size=n,this},A.prototype.min=function(){var t=this.minNode(this._root);return t?t.key:null},A.prototype.max=function(){var t=this.maxNode(this._root);return t?t.key:null},A.prototype.isEmpty=function(){return null===this._root},n.size.get=function(){return this._size},A.createTree=function(t,e,n,r,i){return new A(n,i).load(t,e,r)},Object.defineProperties(A.prototype,n);var o=function(t,e,A,n,r){this.left=e,this.point=t,this.otherEvent=A,this.isSubject=n,this.type=r||0,this.inOut=!1,this.otherInOut=!1,this.prevInResult=null,this.inResult=!1,this.resultInOut=!1,this.isExteriorRing=!0};function a(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(t,e,A){return(t[0]-A[0])*(e[1]-A[1])-(e[0]-A[0])*(t[1]-A[1])}function g(t,e){var A=t.point,n=e.point;return A[0]>n[0]?1:A[0]<n[0]?-1:A[1]!==n[1]?A[1]>n[1]?1:-1:function(t,e,A,n){return t.left!==e.left?t.left?1:-1:0!==s(A,t.otherEvent.point,e.otherEvent.point)?t.isBelow(e.otherEvent.point)?-1:1:!t.isSubject&&e.isSubject?1:-1}(t,e,A)}function c(t,e,A){var n=new o(e,!1,t,t.isSubject),r=new o(e,!0,t.otherEvent,t.isSubject);return a(t.point,t.otherEvent.point)&&console.warn("what is that, a collapsed segment?",t),n.contourId=r.contourId=t.contourId,g(r,t.otherEvent)>0&&(t.otherEvent.left=!0,r.left=!1),t.otherEvent.otherEvent=r,t.otherEvent=n,A.push(r),A.push(n),A}function I(t,e){return t[0]*e[1]-t[1]*e[0]}function u(t,e){return t[0]*e[0]+t[1]*e[1]}function l(t,e,A){var n=function(t,e,A,n,r){var i=[e[0]-t[0],e[1]-t[1]],o=[n[0]-A[0],n[1]-A[1]];function a(t,e,A){return[t[0]+e*A[0],t[1]+e*A[1]]}var s=[A[0]-t[0],A[1]-t[1]],g=I(i,o),c=g*g,l=u(i,i);if(c>0){var C=I(s,o)/g;if(C<0||C>1)return null;var h=I(s,i)/g;return h<0||h>1?null:0===C||1===C?r?null:[a(t,C,i)]:0===h||1===h?r?null:[a(A,h,o)]:[a(t,C,i)]}if((c=(g=I(s,i))*g)>0)return null;var B=u(i,s)/l,f=B+u(i,o)/l,d=Math.min(B,f),Q=Math.max(B,f);return d<=1&&Q>=0?1===d?r?null:[a(t,d>0?d:0,i)]:0===Q?r?null:[a(t,Q<1?Q:1,i)]:r&&0===d&&1===Q?null:[a(t,d>0?d:0,i),a(t,Q<1?Q:1,i)]:null}(t.point,t.otherEvent.point,e.point,e.otherEvent.point),r=n?n.length:0;if(0===r)return 0;if(1===r&&(a(t.point,e.point)||a(t.otherEvent.point,e.otherEvent.point)))return 0;if(2===r&&t.isSubject===e.isSubject)return 0;if(1===r)return a(t.point,n[0])||a(t.otherEvent.point,n[0])||c(t,n[0],A),a(e.point,n[0])||a(e.otherEvent.point,n[0])||c(e,n[0],A),1;var i=[],o=!1,s=!1;return a(t.point,e.point)?o=!0:1===g(t,e)?i.push(e,t):i.push(t,e),a(t.otherEvent.point,e.otherEvent.point)?s=!0:1===g(t.otherEvent,e.otherEvent)?i.push(e.otherEvent,t.otherEvent):i.push(t.otherEvent,e.otherEvent),o&&s||o?(e.type=1,t.type=e.inOut===t.inOut?2:3,o&&!s&&c(i[1].otherEvent,i[0].point,A),2):s?(c(i[0],i[1].point,A),3):i[0]!==i[3].otherEvent?(c(i[0],i[1].point,A),c(i[1],i[2].point,A),3):(c(i[0],i[1].point,A),c(i[3].otherEvent,i[2].point,A),3)}function C(t,e){if(t===e)return 0;if(0!==s(t.point,t.otherEvent.point,e.point)||0!==s(t.point,t.otherEvent.point,e.otherEvent.point))return a(t.point,e.point)?t.isBelow(e.otherEvent.point)?-1:1:t.point[0]===e.point[0]?t.point[1]<e.point[1]?-1:1:1===g(t,e)?e.isAbove(t.point)?-1:1:t.isBelow(e.point)?-1:1;if(t.isSubject!==e.isSubject)return t.isSubject?-1:1;var A=t.point,n=e.point;return A[0]===n[0]&&A[1]===n[1]?(A=t.otherEvent.point,n=e.otherEvent.point,A[0]===n[0]&&A[1]===n[1]?0:t.contourId>e.contourId?1:-1):1===g(t,e)?1:-1}function h(t,e,A,n){var r=t+1,i=e.length;if(r>i-1)return t-1;for(var o=e[t].point,a=e[r].point;r<i&&a[0]===o[0]&&a[1]===o[1];){if(!A[r])return r;a=e[++r].point}for(r=t-1;A[r]&&r>=n;)r--;return r}function B(t,e){var A,n,r,i=function(t){var e,A,n,r,i=[];for(A=0,n=t.length;A<n;A++)((e=t[A]).left&&e.inResult||!e.left&&e.otherEvent.inResult)&&i.push(e);for(var o=!1;!o;)for(o=!0,A=0,n=i.length;A<n;A++)A+1<n&&1===g(i[A],i[A+1])&&(r=i[A],i[A]=i[A+1],i[A+1]=r,o=!1);for(A=0,n=i.length;A<n;A++)(e=i[A]).pos=A;for(A=0,n=i.length;A<n;A++)(e=i[A]).left||(r=e.pos,e.pos=e.otherEvent.pos,e.otherEvent.pos=r);return i}(t),o={},a=[];for(A=0,n=i.length;A<n;A++)if(!o[A]){var s=[[]];i[A].isExteriorRing?2===e&&!i[A].isSubject&&a.length>1?a[a.length-1].push(s[0]):a.push(s):2!==e||i[A].isSubject||0!==a.length?0===a.length?a.push([[s]]):a[a.length-1].push(s[0]):a.push(s);var c=a.length-1,I=A,u=i[A].point;for(s[0].push(u);I>=A;)r=i[I],o[I]=!0,r.left?(r.resultInOut=!1,r.contourId=c):(r.otherEvent.resultInOut=!0,r.otherEvent.contourId=c),o[I=r.pos]=!0,s[0].push(i[I].point),I=h(I,i,o,A);r=i[I=-1===I?A:I],o[I]=o[r.pos]=!0,r.otherEvent.resultInOut=!0,r.otherEvent.contourId=c}return a}o.prototype.isBelow=function(t){var e=this.point,A=this.otherEvent.point;return this.left?(e[0]-t[0])*(A[1]-t[1])-(A[0]-t[0])*(e[1]-t[1])>0:(A[0]-t[0])*(e[1]-t[1])-(e[0]-t[0])*(A[1]-t[1])>0},o.prototype.isAbove=function(t){return!this.isBelow(t)},o.prototype.isVertical=function(){return this.point[0]===this.otherEvent.point[0]},o.prototype.clone=function(){var t=new o(this.point,this.left,this.otherEvent,this.isSubject,this.type);return t.inResult=this.inResult,t.prevInResult=this.prevInResult,t.isExteriorRing=this.isExteriorRing,t.inOut=this.inOut,t.otherInOut=this.otherInOut,t};var f=Q,d=Q;function Q(t,e){if(!(this instanceof Q))return new Q(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||E,this.length>0)for(var A=(this.length>>1)-1;A>=0;A--)this._down(A)}function E(t,e){return t<e?-1:t>e?1:0}Q.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,A=this.compare,n=e[t];t>0;){var r=t-1>>1,i=e[r];if(A(n,i)>=0)break;e[t]=i,t=r}e[t]=n},_down:function(t){for(var e=this.data,A=this.compare,n=this.length>>1,r=e[t];t<n;){var i=1+(t<<1),o=i+1,a=e[i];if(o<this.length&&A(e[o],a)<0&&(i=o,a=e[o]),A(a,r)>=0)break;e[t]=a,t=i}e[t]=r}},f.default=d;var p=Math.max,y=Math.min,v=0;function m(t,e,A,n,r,i){var a,s,c,I,u,l;for(a=0,s=t.length-1;a<s;a++)if(c=t[a],I=t[a+1],u=new o(c,!1,void 0,e),l=new o(I,!1,u,e),u.otherEvent=l,c[0]!==I[0]||c[1]!==I[1]){u.contourId=l.contourId=A,i||(u.isExteriorRing=!1,l.isExteriorRing=!1),g(u,l)>0?l.left=!0:u.left=!0;var C=c[0],h=c[1];r[0]=y(r[0],C),r[1]=y(r[1],h),r[2]=p(r[2],C),r[3]=p(r[3],h),n.push(u),n.push(l)}}var b=[];function F(t,e,n){"number"===typeof t[0][0][0]&&(t=[t]),"number"===typeof e[0][0][0]&&(e=[e]);var i=function(t,e,A){var n=null;return t.length*e.length===0&&(0===A?n=b:2===A?n=t:1!==A&&3!==A||(n=0===t.length?e:t)),n}(t,e,n);if(i)return i===b?null:i;var o=[1/0,1/0,-1/0,-1/0],a=[1/0,1/0,-1/0,-1/0],s=function(t,e,A,n,r){var i,o,a,s,c,I,u=new f(null,g);for(a=0,s=t.length;a<s;a++)for(c=0,I=(i=t[a]).length;c<I;c++)(o=0===c)&&v++,m(i[c],!0,v,u,A,o);for(a=0,s=e.length;a<s;a++)for(c=0,I=(i=e[a]).length;c<I;c++)o=0===c,2===r&&(o=!1),o&&v++,m(i[c],!1,v,u,n,o);return u}(t,e,o,a,n);return(i=function(t,e,A,n,r){var i=null;return(A[0]>n[2]||n[0]>A[2]||A[1]>n[3]||n[1]>A[3])&&(0===r?i=b:2===r?i=t:1!==r&&3!==r||(i=t.concat(e))),i}(t,e,o,a,n))?i===b?null:i:B(function(t,e,n,i,o,a){for(var s,g,c,I=new A(C),u=[],h=Math.min(i[2],o[2]);0!==t.length;){var B=t.pop();if(u.push(B),0===a&&B.point[0]>h||2===a&&B.point[0]>i[2])break;if(B.left){g=s=I.insert(B),s=s!==(c=I.minNode())?I.prev(s):null,g=I.next(g);var f=s?s.key:null;if(r(B,f,a),g&&2===l(B,g.key,t)&&(r(B,f,a),r(B,g.key,a)),s&&2===l(s.key,B,t)){var d=s;r(f,(d=d!==c?I.prev(d):null)?d.key:null,a),r(B,f,a)}}else B=B.otherEvent,g=s=I.find(B),s&&g&&(s=s!==c?I.prev(s):null,g=I.next(g),I.remove(B),g&&s&&l(s.key,g.key,t))}return u}(s,0,0,o,a,n),n)}var w={UNION:1,DIFFERENCE:2,INTERSECTION:0,XOR:3};t.union=function(t,e){return F(t,e,1)},t.diff=function(t,e){return F(t,e,2)},t.xor=function(t,e){return F(t,e,3)},t.intersection=function(t,e){return F(t,e,0)},t.operations=w,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(202);function r(t){var e=0;if(t&&t.length>0){e+=Math.abs(i(t[0]));for(var A=1;A<t.length;A++)e-=Math.abs(i(t[A]))}return e}function i(t){var e,A,n,r,i,a,s=0,g=t.length;if(g>2){for(a=0;a<g;a++)a===g-2?(n=g-2,r=g-1,i=0):a===g-1?(n=g-1,r=0,i=1):(n=a,r=a+1,i=a+2),e=t[n],A=t[r],s+=(o(t[i][0])-o(e[0]))*Math.sin(o(A[1]));s=6378137*s*6378137/2}return s}function o(t){return t*Math.PI/180}e.default=function(t){return n.geomReduce(t,(function(t,e){return t+function(t){var e,A=0;switch(t.type){case"Polygon":return r(t.coordinates);case"MultiPolygon":for(e=0;e<t.coordinates.length;e++)A+=r(t.coordinates[e]);return A;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(e)}),0)}},function(t,e){function A(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=A=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=A=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),A(e)}t.exports=A,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,A){function n(t,e){"use strict";var A=(e=e||{}).pos||0,r="<".charCodeAt(0),i=">".charCodeAt(0),o="-".charCodeAt(0),a="/".charCodeAt(0),s="!".charCodeAt(0),g="'".charCodeAt(0),c='"'.charCodeAt(0),I="[".charCodeAt(0);"]".charCodeAt(0);function u(){for(var e=[];t[A];)if(t.charCodeAt(A)==r){if(t.charCodeAt(A+1)===a)return(A=t.indexOf(">",A))+1&&(A+=1),e;if(t.charCodeAt(A+1)===s){if(t.charCodeAt(A+2)==o){for(;-1!==A&&(t.charCodeAt(A)!==i||t.charCodeAt(A-1)!=o||t.charCodeAt(A-2)!=o||-1==A);)A=t.indexOf(">",A+1);-1===A&&(A=t.length)}else{if(t.charCodeAt(A+2)===I&&t.charCodeAt(A+8)===I&&"cdata"===t.substr(A+3,5).toLowerCase()){var n=t.indexOf("]]>",A);-1==n?(e.push(t.substr(A+8)),A=t.length):(e.push(t.substring(A+9,n)),A=n+3);continue}for(A+=2;t.charCodeAt(A)!==i&&t[A];)A++}A++;continue}var g=B();e.push(g)}else{var c=l();c.trim().length>0&&e.push(c),A++}return e}function l(){var e=A;return-2===(A=t.indexOf("<",A)-1)&&(A=t.length),t.slice(e,A+1)}function C(){for(var e=A;-1==="\r\n\t>/= ".indexOf(t[A])&&t[A];)A++;return t.slice(e,A)}var h=e.noChildNodes||["img","br","input","meta","link"];function B(){A++;for(var e=C(),n={},r=[];t.charCodeAt(A)!==i&&t[A];){var o=t.charCodeAt(A);if(o>64&&o<91||o>96&&o<123){for(var s=C(),I=t.charCodeAt(A);I&&I!==g&&I!==c&&!(I>64&&I<91||I>96&&I<123)&&I!==i;)A++,I=t.charCodeAt(A);if(I===g||I===c){var l=f();if(-1===A)return{tagName:e,attributes:n,children:r}}else l=null,A--;n[s]=l}A++}if(t.charCodeAt(A-1)!==a)if("script"==e){var B=A+1;A=t.indexOf("<\/script>",A),r=[t.slice(B,A)],A+=9}else if("style"==e){B=A+1;A=t.indexOf("</style>",A),r=[t.slice(B,A)],A+=8}else-1==h.indexOf(e)&&(A++,r=u());else A++;return{tagName:e,attributes:n,children:r}}function f(){var e=t[A],n=A+1;return A=t.indexOf(e,n),t.slice(n,A)}function d(){var A=new RegExp("\\s"+e.attrName+"\\s*=['\"]"+e.attrValue+"['\"]").exec(t);return A?A.index:-1}var Q=null;if(void 0!==e.attrValue){e.attrName=e.attrName||"id";for(Q=[];-1!==(A=d());)-1!==(A=t.lastIndexOf("<",A))&&Q.push(B()),t=t.substr(A),A=0}else Q=e.parseNode?B():u();return e.filter&&(Q=n.filter(Q,e.filter)),e.setPos&&(Q.pos=A),Q}n.simplify=function(t){var e={};if(!t.length)return"";if(1===t.length&&"string"==typeof t[0])return t[0];for(var A in t.forEach((function(t){if("object"===typeof t){e[t.tagName]||(e[t.tagName]=[]);var A=n.simplify(t.children);e[t.tagName].push(A),Object.keys(t.attributes).length&&(A._attributes=t.attributes)}})),e)1==e[A].length&&(e[A]=e[A][0]);return e},n.simplifyLostLess=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A={};return t.length?1===t.length&&"string"==typeof t[0]?Object.keys(e).length?{_attributes:e,value:t[0]}:t[0]:(t.forEach((function(t){if("object"===typeof t){A[t.tagName]||(A[t.tagName]=[]);var e=n.simplifyLostLess(t.children||[],t.attributes);A[t.tagName].push(e),Object.keys(t.attributes).length&&(e._attributes=t.attributes)}})),A):""},n.filter=function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=[];return t.forEach((function(t,o){if("object"===typeof t&&e(t,o,A,r)&&i.push(t),t.children){var a=n.filter(t.children,e,A+1,(r?r+".":"")+o+"."+t.tagName);i=i.concat(a)}})),i},n.stringify=function(t){var e="";function A(t){if(t)for(var A=0;A<t.length;A++)"string"==typeof t[A]?e+=t[A].trim():n(t[A])}function n(t){for(var n in e+="<"+t.tagName,t.attributes)null===t.attributes[n]?e+=" "+n:-1===t.attributes[n].indexOf('"')?e+=" "+n+'="'+t.attributes[n].trim()+'"':e+=" "+n+"='"+t.attributes[n].trim()+"'";e+=">",A(t.children),e+="</"+t.tagName+">"}return A(t),e},n.toContentString=function(t){if(Array.isArray(t)){var e="";return t.forEach((function(t){e=(e+=" "+n.toContentString(t)).trim()})),e}return"object"===typeof t?n.toContentString(t.children):" "+t},n.getElementById=function(t,e,A){var r=n(t,{attrValue:e});return A?n.simplify(r):r[0]},n.getElementsByClassName=function(t,e,A){var r=n(t,{attrName:"class",attrValue:"[a-zA-Z0-9- ]*"+e+"[a-zA-Z0-9- ]*"});return A?n.simplify(r):r},n.parseStream=function(t,e){if("string"===typeof e&&(e=e.length+2),"string"===typeof t){var r=A(626);t=r.createReadStream(t,{start:e}),e=0}var i=e,o="";return t.on("data",(function(e){o+=e;for(var A=0;;){if(!(i=o.indexOf("<",i)+1))return void(i=A);if("/"!==o[i+1]){var r=n(o,{pos:i-1,parseNode:!0,setPos:!0});if((i=r.pos)>o.length-1||i<A)return o=o.slice(A),i=0,void(A=0);t.emit("xml",r),A=i}else i+=1,A=pos}})),t},n.transformStream=function(t){var e=A(627);"string"===typeof t&&(t=t.length+2);var r=t||0,i="";return e({readableObjectMode:!0},(function(t,e,A){i+=t;for(var o=0;;){if(!(r=i.indexOf("<",r)+1))return r=o,A();if("/"!==i[r+1]){var a=n(i,{pos:r-1,parseNode:!0,setPos:!0});if((r=a.pos)>i.length-1||r<o)return i=i.slice(o),r=0,A();this.push(a),o=r}else r+=1,o=pos}A()}))},t.exports=n,n.xml=n},function(t,e,A){"use strict";var n=A(638),r=A(302),i=A(643),o=A(644),a=A(645),s=A(646),g=A(647),c=Object.prototype.toString;function I(t){if(!(this instanceof I))return new I(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var A=n.inflateInit2(this.strm,e.windowBits);if(A!==o.Z_OK)throw new Error(a[A]);if(this.header=new g,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"===typeof e.dictionary?e.dictionary=i.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(A=n.inflateSetDictionary(this.strm,e.dictionary))!==o.Z_OK))throw new Error(a[A])}function u(t,e){var A=new I(e);if(A.push(t,!0),A.err)throw A.msg||a[A.err];return A.result}I.prototype.push=function(t,e){var A,a,s,g,I,u=this.strm,l=this.options.chunkSize,C=this.options.dictionary,h=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?o.Z_FINISH:o.Z_NO_FLUSH,"string"===typeof t?u.input=i.binstring2buf(t):"[object ArrayBuffer]"===c.call(t)?u.input=new Uint8Array(t):u.input=t,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new r.Buf8(l),u.next_out=0,u.avail_out=l),(A=n.inflate(u,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&C&&(A=n.inflateSetDictionary(this.strm,C)),A===o.Z_BUF_ERROR&&!0===h&&(A=o.Z_OK,h=!1),A!==o.Z_STREAM_END&&A!==o.Z_OK)return this.onEnd(A),this.ended=!0,!1;u.next_out&&(0!==u.avail_out&&A!==o.Z_STREAM_END&&(0!==u.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(s=i.utf8border(u.output,u.next_out),g=u.next_out-s,I=i.buf2string(u.output,s),u.next_out=g,u.avail_out=l-g,g&&r.arraySet(u.output,u.output,s,g,0),this.onData(I)):this.onData(r.shrinkBuf(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(h=!0)}while((u.avail_in>0||0===u.avail_out)&&A!==o.Z_STREAM_END);return A===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(A=n.inflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),u.avail_out=0,!0)},I.prototype.onData=function(t){this.chunks.push(t)},I.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=I,e.inflate=u,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,u(t,e)},e.ungzip=u},function(t,e,A){"use strict";var n=A(17),r=A(9),i=A(15),o=A(23),a=A(24),s=function(t){Object(o.a)(A,t);var e=Object(a.a)(A);function A(){var t;return Object(r.a)(this,A),(t=e.call(this,(function(e){return t._observers.add(e),function(){return t._observers.delete(e)}})))._observers=new Set,t}return Object(i.a)(A,[{key:"next",value:function(t){var e,A=Object(n.a)(this._observers);try{for(A.s();!(e=A.n()).done;){e.value.next(t)}}catch(r){A.e(r)}finally{A.f()}}},{key:"error",value:function(t){var e,A=Object(n.a)(this._observers);try{for(A.s();!(e=A.n()).done;){e.value.error(t)}}catch(r){A.e(r)}finally{A.f()}}},{key:"complete",value:function(){var t,e=Object(n.a)(this._observers);try{for(e.s();!(t=e.n()).done;){t.value.complete()}}catch(A){e.e(A)}finally{e.f()}}}]),A}(A(272).a);e.a=s},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=function(){};function r(){var t,e=!1,A=n;return[new Promise((function(n){e?n(t):A=n})),function(n){e=!0,A(t=n)}]}},function(t,e,A){"use strict";A.d(e,"b",(function(){return i})),A.d(e,"a",(function(){return o}));var n=A(12),r=A(120);function i(t){return t&&"object"===typeof t&&t[r.d]}function o(t,e){var A,i;if(!e){if(!(i=t)||"object"!==typeof i)throw Error();e=[t]}return A={},Object(n.a)(A,r.d,!0),Object(n.a)(A,"send",t),Object(n.a)(A,"transferables",e),A}},function(t,e,A){var n=A(317),r=A(310),i=t.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);function a(t){if("string"===typeof t&&(t=r.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}i.request=function(t,e){return t=a(t),n.request.call(this,t,e)},i.get=function(t,e){return t=a(t),n.get.call(this,t,e)}},function(t,e,A){"use strict";var n=A(669),r=A(304),i=A(304),o=A(161).buildOptions,a=A(671);e.parse=function(t,e,A){if(A){!0===A&&(A={});var s=a.validate(t,A);if(!0!==s)throw Error(s.err.msg)}e=o(e,i.defaultOptions,i.props);var g=r.getTraversalObj(t,e);return n.convertToJson(g,e)},e.convertTonimn=A(672).convert2nimn,e.getTraversalObj=r.getTraversalObj,e.convertToJson=n.convertToJson,e.convertToJsonString=A(673).convertToJsonString,e.validate=a.validate,e.j2xParser=A(674),e.parseToNimn=function(t,A,n){return e.convertTonimn(e.getTraversalObj(t,n),A,n)}},function(t,e,A){"use strict";A.d(e,"a",(function(){return s}));var n=A(60),r={};function i(t,e){var A;r[t]=!0,void 0!==e&&(A=e,n.global.console&&n.global.console.error&&n.global.console.error(A))}var o=function t(e){var A=e.gl;this.ext=e,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(e.maxVertexAttribs);for(var n=0;n<this.attribs.length;n++){var r=new t.VertexAttrib(A);this.attribs[n]=r}this.maxAttrib=0};(o.VertexAttrib=function(t){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 a=function(t){var e=this;this.gl=t,function(t){var e=t.getError;t.getError=function(){var A;do{0!==(A=e.apply(t))&&(r[A]=!0)}while(0!==A);for(A in r)if(r[A])return delete r[A],parseInt(A,10);return 0}}(t);var A=this.original={getParameter:t.getParameter,enableVertexAttribArray:t.enableVertexAttribArray,disableVertexAttribArray:t.disableVertexAttribArray,bindBuffer:t.bindBuffer,getVertexAttrib:t.getVertexAttrib,vertexAttribPointer:t.vertexAttribPointer};t.getParameter=function(t){return t===e.VERTEX_ARRAY_BINDING_OES?e.currentVertexArrayObject===e.defaultVertexArrayObject?null:e.currentVertexArrayObject:A.getParameter.apply(this,arguments)},t.enableVertexAttribArray=function(t){var n=e.currentVertexArrayObject;n.maxAttrib=Math.max(n.maxAttrib,t);var r=n.attribs[t];return r.enabled=!0,A.enableVertexAttribArray.apply(this,arguments)},t.disableVertexAttribArray=function(t){var n=e.currentVertexArrayObject;n.maxAttrib=Math.max(n.maxAttrib,t);var r=n.attribs[t];return r.enabled=!1,A.disableVertexAttribArray.apply(this,arguments)},t.bindBuffer=function(t,n){switch(t){case 34962:e.currentArrayBuffer=n;break;case 34963:e.currentVertexArrayObject.elementArrayBuffer=n}return A.bindBuffer.apply(this,arguments)},t.getVertexAttrib=function(t,n){var r=e.currentVertexArrayObject,i=r.attribs[t];switch(n){case 34975:return i.buffer;case 34338:return i.enabled;case 34339:return i.size;case 34340:return i.stride;case 34341:return i.type;case 34922:return i.normalized;default:return A.getVertexAttrib.apply(this,arguments)}},t.vertexAttribPointer=function(t,n,r,i,o,a){var s=e.currentVertexArrayObject;s.maxAttrib=Math.max(s.maxAttrib,t);var g=s.attribs[t];return g.buffer=e.currentArrayBuffer,g.size=n,g.type=r,g.normalized=i,g.stride=o,g.offset=a,g.recache(),A.vertexAttribPointer.apply(this,arguments)},t.instrumentExtension&&t.instrumentExtension(this,"OES_vertex_array_object"),t.canvas&&t.canvas.addEventListener("webglcontextrestored",(function(){var t;t="OESVertexArrayObject emulation library context restored",n.global.console&&n.global.console.log&&n.global.console.log(t),e.reset_()}),!0),this.reset_()};function s(t){if("function"!==typeof t.createVertexArray){var e=t.getSupportedExtensions;t.getSupportedExtensions=function(){var t=e.call(this)||[];return t.indexOf("OES_vertex_array_object")<0&&t.push("OES_vertex_array_object"),t};var A=t.getExtension;t.getExtension=function(e){var n=A.call(this,e);return n||("OES_vertex_array_object"!==e?null:(t.__OESVertexArrayObject||(this.__OESVertexArrayObject=new a(this)),this.__OESVertexArrayObject))}}}a.prototype.VERTEX_ARRAY_BINDING_OES=34229,a.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(var t=0;t<this.vertexArrayObjects.length;++t)this.vertexArrayObjects.isAlive=!1;var e=this.gl;this.maxVertexAttribs=e.getParameter(34921),this.defaultVertexArrayObject=new o(this),this.currentVertexArrayObject=null,this.currentArrayBuffer=null,this.vertexArrayObjects=[this.defaultVertexArrayObject],this.bindVertexArrayOES(null)},a.prototype.createVertexArrayOES=function(){var t=new o(this);return this.vertexArrayObjects.push(t),t},a.prototype.deleteVertexArrayOES=function(t){t.isAlive=!1,this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(t),1),this.currentVertexArrayObject===t&&this.bindVertexArrayOES(null)},a.prototype.isVertexArrayOES=function(t){return!!(t&&t instanceof o&&t.hasBeenBound&&t.ext===this)},a.prototype.bindVertexArrayOES=function(t){var e=this.gl;if(!t||t.isAlive){var A=this.original,n=this.currentVertexArrayObject;this.currentVertexArrayObject=t||this.defaultVertexArrayObject,this.currentVertexArrayObject.hasBeenBound=!0;var r=this.currentVertexArrayObject;if(n!==r){n&&r.elementArrayBuffer===n.elementArrayBuffer||A.bindBuffer.call(e,34963,r.elementArrayBuffer);for(var o=this.currentArrayBuffer,a=Math.max(n?n.maxAttrib:0,r.maxAttrib),s=0;s<=a;s++){var g=r.attribs[s],c=n?n.attribs[s]:null;if(n&&g.enabled===c.enabled||(g.enabled?A.enableVertexAttribArray.call(e,s):A.disableVertexAttribArray.call(e,s)),g.enabled){var I=!1;n&&g.buffer===c.buffer||(o!==g.buffer&&(A.bindBuffer.call(e,34962,g.buffer),o=g.buffer),I=!0),(I||g.cached!==c.cached)&&A.vertexAttribPointer.call(e,s,g.size,g.type,g.normalized,g.stride,g.offset)}}this.currentArrayBuffer!==o&&A.bindBuffer.call(e,34962,this.currentArrayBuffer)}}else i(1282,"bindVertexArrayOES: attempt to bind deleted arrayObject")}},function(t,e,A){"use strict";A.d(e,"a",(function(){return g})),A.d(e,"b",(function(){return c}));var n=A(1),r=A(233),i=A(516),o=A(517),a=A(147),s=A(49);function g(t,e){Object(s.a)(t instanceof r.a||t instanceof i.a||t instanceof o.a);var A=t.constructor,n=t.gl,a=t.width,g=t.height,c=t.format,I=t.type,u=t.dataFormat,l=t.border,C=t.mipmaps;return new A(n,Object.assign({width:a,height:g,format:c,type:I,dataFormat:u,border:l,mipmaps:C},e))}function c(t,e){var A=t.gl,r=t.width,i=t.height,o=t.id;return new a.a(A,Object.assign({},e,{id:"framebuffer-for-".concat(o),width:r,height:i,attachments:Object(n.a)({},36064,t)}))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return B}));var n=A(6),r=A.n(n),i=A(11),o=A(5),a=A(4),s=A(56),g=A(14),c=A(16),I=A(7),u=A(19),l=A(118);function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(I.a)(t);if(e){var r=Object(I.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(c.a)(this,A)}}var h=[34069,34070,34071,34072,34073,34074],B=function(t){Object(g.a)(A,t);var e=C(A);function A(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(o.a)(this,A),Object(u.b)(t),(n=e.call(this,t,Object.assign({},r,{target:34067}))).initialize(r),Object.seal(Object(s.a)(n)),n}return Object(a.a)(A,[{key:"initialize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.mipmaps,n=void 0===A||A,r=e.parameters,i=void 0===r?{}:r;return this.opts=e,this.setCubeMapImageData(e).then((function(){t.loaded=!0,n&&t.generateMipmap(e),t.setParameters(i)})),this}},{key:"subImage",value:function(t){var e=t.face,A=t.data,n=t.x,r=void 0===n?0:n,i=t.y,o=void 0===i?0:i,a=t.mipmapLevel,s=void 0===a?0:a;return this._subImage({target:e,data:A,x:r,y:o,mipmapLevel:s})}},{key:"setCubeMapImageData",value:function(){var t=Object(i.a)(r.a.mark((function t(e){var A,n,i,o,a,s,g,c,I,l,C,B,f,d=this;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.width,n=e.height,i=e.pixels,o=e.data,a=e.border,s=void 0===a?0:a,g=e.format,c=void 0===g?6408:g,I=e.type,l=void 0===I?5121:I,C=this.gl,B=i||o,t.next=5,Promise.all(h.map((function(t){var e=B[t];return Promise.all(Array.isArray(e)?e:[e])})));case 5:f=t.sent,this.bind(),h.forEach((function(t,e){f[e].length>1&&!1!==d.opts.mipmaps&&u.k.warn("".concat(d.id," has mipmap and multiple LODs."))(),f[e].forEach((function(e,r){A&&n?C.texImage2D(t,r,c,A,n,s,c,l,e):C.texImage2D(t,r,c,c,l,e)}))})),this.unbind();case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"setImageDataForFace",value:function(t){var e=this,A=t.face,n=t.width,r=t.height,i=t.pixels,o=t.data,a=t.border,s=void 0===a?0:a,g=t.format,c=void 0===g?6408:g,I=t.type,u=void 0===I?5121:I,l=this.gl,C=i||o;return this.bind(),C instanceof Promise?C.then((function(n){return e.setImageDataForFace(Object.assign({},t,{face:A,data:n,pixels:n}))})):this.width||this.height?l.texImage2D(A,0,c,n,r,s,c,u,C):l.texImage2D(A,0,c,c,u,C),this}}]),A}(l.a);B.FACES=h},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(5),r=A(56),i=A(4),o=A(14),a=A(16),s=A(7),g=A(19),c=A(118),I=A(165),u=A(83);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var C=function(t){Object(o.a)(A,t);var e=l(A);function A(t){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n.a)(this,A),Object(g.a)(t),o=Object.assign({depth:1},o,{target:32879,unpackFlipY:!1}),(i=e.call(this,t,o)).initialize(o),Object.seal(Object(r.a)(i)),i}return Object(i.a)(A,null,[{key:"isSupported",value:function(t){return Object(g.j)(t)}}]),Object(i.a)(A,[{key:"setImageData",value:function(t){var e=this,A=t.level,n=void 0===A?0:A,r=t.dataFormat,i=void 0===r?6408:r,o=t.width,a=t.height,s=t.depth,c=void 0===s?1:s,l=t.border,C=void 0===l?0:l,h=t.format,B=t.type,f=void 0===B?5121:B,d=t.offset,Q=void 0===d?0:d,E=t.data,p=t.parameters,y=void 0===p?{}:p;if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),Object(g.o)(this.gl,y,(function(){ArrayBuffer.isView(E)&&e.gl.texImage3D(e.target,n,i,o,a,c,C,h,f,E),E instanceof u.a&&(e.gl.bindBuffer(35052,E.handle),e.gl.texImage3D(e.target,n,i,o,a,c,C,h,f,Q))})),E&&E.byteLength)this._trackAllocatedMemory(E.byteLength,"Texture");else{var v=I.a[this.dataFormat]||4,m=I.c[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*v*m,"Texture")}return this.loaded=!0,this}}]),A}(c.a)},function(t,e,A){"use strict";A.d(e,"b",(function(){return s})),A.d(e,"a",(function(){return g}));var n=A(163),r=A(164);function i(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return o(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==A.return||A.return()}finally{if(s)throw i}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var a=function(){var t=Object(r.b)();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function s(t){var e,A=a(),r=i(t=Array.isArray(t)?t:[t]);try{var o=function(){var t=e.value,r=Object(n.b)(t);A.find((function(t){return r===t}))||A.unshift(r)};for(r.s();!(e=r.n()).done;)o()}catch(s){r.e(s)}finally{r.f()}}function g(){return a()}},function(t,e){function A(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=A=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=A=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),A(e)}t.exports=A,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function A(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=A=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=A=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),A(e)}t.exports=A,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,A){"use strict";function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(267);function r(t,e){if(t){if("string"===typeof t)return Object(n.a)(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Object(n.a)(t,e):void 0}}},function(t,e,A){"use strict";function n(t,e,A){A=A||2;var n,a,s,g,c,l,C,B=e&&e.length,f=B?e[0]*A:t.length,d=r(t,0,f,A,!0),Q=[];if(!d||d.next===d.prev)return Q;if(B&&(d=function(t,e,A,n){var o,a,s,g,c,l=[];for(o=0,a=e.length;o<a;o++)s=e[o]*n,g=o<a-1?e[o+1]*n:t.length,(c=r(t,s,g,n,!1))===c.next&&(c.steiner=!0),l.push(h(c));for(l.sort(I),o=0;o<l.length;o++)u(l[o],A),A=i(A,A.next);return A}(t,e,d,A)),t.length>80*A){n=s=t[0],a=g=t[1];for(var E=A;E<f;E+=A)(c=t[E])<n&&(n=c),(l=t[E+1])<a&&(a=l),c>s&&(s=c),l>g&&(g=l);C=0!==(C=Math.max(s-n,g-a))?1/C:0}return o(d,Q,A,n,a,C),Q}function r(t,e,A,n,r){var i,o;if(r===S(t,e,A,n)>0)for(i=e;i<A;i+=n)o=b(i,t[i],t[i+1],o);else for(i=A-n;i>=e;i-=n)o=b(i,t[i],t[i+1],o);return o&&Q(o,o.next)&&(F(o),o=o.next),o}function i(t,e){if(!t)return t;e||(e=t);var A,n=t;do{if(A=!1,n.steiner||!Q(n,n.next)&&0!==d(n.prev,n,n.next))n=n.next;else{if(F(n),(n=e=n.prev)===n.next)break;A=!0}}while(A||n!==e);return e}function o(t,e,A,n,r,I,u){if(t){!u&&I&&function(t,e,A,n){var r=t;do{null===r.z&&(r.z=C(r.x,r.y,e,A,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,A,n,r,i,o,a,s,g=1;do{for(A=t,t=null,i=null,o=0;A;){for(o++,n=A,a=0,e=0;e<g&&(a++,n=n.nextZ);e++);for(s=g;a>0||s>0&&n;)0!==a&&(0===s||!n||A.z<=n.z)?(r=A,A=A.nextZ,a--):(r=n,n=n.nextZ,s--),i?i.nextZ=r:t=r,r.prevZ=i,i=r;A=n}i.nextZ=null,g*=2}while(o>1)}(r)}(t,n,r,I);for(var l,h,B=t;t.prev!==t.next;)if(l=t.prev,h=t.next,I?s(t,n,r,I):a(t))e.push(l.i/A),e.push(t.i/A),e.push(h.i/A),F(t),t=h.next,B=h.next;else if((t=h)===B){u?1===u?o(t=g(i(t),e,A),e,A,n,r,I,2):2===u&&c(t,e,A,n,r,I):o(i(t),e,A,n,r,I,1);break}}}function a(t){var e=t.prev,A=t,n=t.next;if(d(e,A,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(B(e.x,e.y,A.x,A.y,n.x,n.y,r.x,r.y)&&d(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function s(t,e,A,n){var r=t.prev,i=t,o=t.next;if(d(r,i,o)>=0)return!1;for(var a=r.x<i.x?r.x<o.x?r.x:o.x:i.x<o.x?i.x:o.x,s=r.y<i.y?r.y<o.y?r.y:o.y:i.y<o.y?i.y:o.y,g=r.x>i.x?r.x>o.x?r.x:o.x:i.x>o.x?i.x:o.x,c=r.y>i.y?r.y>o.y?r.y:o.y:i.y>o.y?i.y:o.y,I=C(a,s,e,A,n),u=C(g,c,e,A,n),l=t.prevZ,h=t.nextZ;l&&l.z>=I&&h&&h.z<=u;){if(l!==t.prev&&l!==t.next&&B(r.x,r.y,i.x,i.y,o.x,o.y,l.x,l.y)&&d(l.prev,l,l.next)>=0)return!1;if(l=l.prevZ,h!==t.prev&&h!==t.next&&B(r.x,r.y,i.x,i.y,o.x,o.y,h.x,h.y)&&d(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;l&&l.z>=I;){if(l!==t.prev&&l!==t.next&&B(r.x,r.y,i.x,i.y,o.x,o.y,l.x,l.y)&&d(l.prev,l,l.next)>=0)return!1;l=l.prevZ}for(;h&&h.z<=u;){if(h!==t.prev&&h!==t.next&&B(r.x,r.y,i.x,i.y,o.x,o.y,h.x,h.y)&&d(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function g(t,e,A){var n=t;do{var r=n.prev,o=n.next.next;!Q(r,o)&&E(r,n,n.next,o)&&v(r,o)&&v(o,r)&&(e.push(r.i/A),e.push(n.i/A),e.push(o.i/A),F(n),F(n.next),n=t=o),n=n.next}while(n!==t);return i(n)}function c(t,e,A,n,r,a){var s=t;do{for(var g=s.next.next;g!==s.prev;){if(s.i!==g.i&&f(s,g)){var c=m(s,g);return s=i(s,s.next),c=i(c,c.next),o(s,e,A,n,r,a),void o(c,e,A,n,r,a)}g=g.next}s=s.next}while(s!==t)}function I(t,e){return t.x-e.x}function u(t,e){if(e=function(t,e){var A,n=e,r=t.x,i=t.y,o=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var a=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=r&&a>o){if(o=a,a===r){if(i===n.y)return n;if(i===n.next.y)return n.next}A=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!A)return null;if(r===o)return A;var s,g=A,c=A.x,I=A.y,u=1/0;n=A;do{r>=n.x&&n.x>=c&&r!==n.x&&B(i<I?r:o,i,c,I,i<I?o:r,i,n.x,n.y)&&(s=Math.abs(i-n.y)/(r-n.x),v(n,t)&&(s<u||s===u&&(n.x>A.x||n.x===A.x&&l(A,n)))&&(A=n,u=s)),n=n.next}while(n!==g);return A}(t,e)){var A=m(e,t);i(e,e.next),i(A,A.next)}}function l(t,e){return d(t.prev,t,e.prev)<0&&d(e.next,t,t.next)<0}function C(t,e,A,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-A)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function h(t){var e=t,A=t;do{(e.x<A.x||e.x===A.x&&e.y<A.y)&&(A=e),e=e.next}while(e!==t);return A}function B(t,e,A,n,r,i,o,a){return(r-o)*(e-a)-(t-o)*(i-a)>=0&&(t-o)*(n-a)-(A-o)*(e-a)>=0&&(A-o)*(i-a)-(r-o)*(n-a)>=0}function f(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var A=t;do{if(A.i!==t.i&&A.next.i!==t.i&&A.i!==e.i&&A.next.i!==e.i&&E(A,A.next,t,e))return!0;A=A.next}while(A!==t);return!1}(t,e)&&(v(t,e)&&v(e,t)&&function(t,e){var A=t,n=!1,r=(t.x+e.x)/2,i=(t.y+e.y)/2;do{A.y>i!==A.next.y>i&&A.next.y!==A.y&&r<(A.next.x-A.x)*(i-A.y)/(A.next.y-A.y)+A.x&&(n=!n),A=A.next}while(A!==t);return n}(t,e)&&(d(t.prev,t,e.prev)||d(t,e.prev,e))||Q(t,e)&&d(t.prev,t,t.next)>0&&d(e.prev,e,e.next)>0)}function d(t,e,A){return(e.y-t.y)*(A.x-e.x)-(e.x-t.x)*(A.y-e.y)}function Q(t,e){return t.x===e.x&&t.y===e.y}function E(t,e,A,n){var r=y(d(t,e,A)),i=y(d(t,e,n)),o=y(d(A,n,t)),a=y(d(A,n,e));return r!==i&&o!==a||(!(0!==r||!p(t,A,e))||(!(0!==i||!p(t,n,e))||(!(0!==o||!p(A,t,n))||!(0!==a||!p(A,e,n)))))}function p(t,e,A){return e.x<=Math.max(t.x,A.x)&&e.x>=Math.min(t.x,A.x)&&e.y<=Math.max(t.y,A.y)&&e.y>=Math.min(t.y,A.y)}function y(t){return t>0?1:t<0?-1:0}function v(t,e){return d(t.prev,t,t.next)<0?d(t,e,t.next)>=0&&d(t,t.prev,e)>=0:d(t,e,t.prev)<0||d(t,t.next,e)<0}function m(t,e){var A=new w(t.i,t.x,t.y),n=new w(e.i,e.x,e.y),r=t.next,i=e.prev;return t.next=e,e.prev=t,A.next=r,r.prev=A,n.next=A,A.prev=n,i.next=n,n.prev=i,n}function b(t,e,A,n){var r=new w(t,e,A);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function F(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function w(t,e,A){this.i=t,this.x=e,this.y=A,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function S(t,e,A,n){for(var r=0,i=e,o=A-n;i<A;i+=n)r+=(t[o]-t[i])*(t[i+1]+t[o+1]),o=i;return r}t.exports=n,t.exports.default=n,n.deviation=function(t,e,A,n){var r=e&&e.length,i=r?e[0]*A:t.length,o=Math.abs(S(t,0,i,A));if(r)for(var a=0,s=e.length;a<s;a++){var g=e[a]*A,c=a<s-1?e[a+1]*A:t.length;o-=Math.abs(S(t,g,c,A))}var I=0;for(a=0;a<n.length;a+=3){var u=n[a]*A,l=n[a+1]*A,C=n[a+2]*A;I+=Math.abs((t[u]-t[C])*(t[l+1]-t[u+1])-(t[u]-t[l])*(t[C+1]-t[u+1]))}return 0===o&&0===I?0:Math.abs((I-o)/o)},n.flatten=function(t){for(var e=t[0][0].length,A={vertices:[],holes:[],dimensions:e},n=0,r=0;r<t.length;r++){for(var i=0;i<t[r].length;i++)for(var o=0;o<e;o++)A.vertices.push(t[r][i][o]);r>0&&(n+=t[r-1].length,A.holes.push(n))}return A}},function(t,e,A){"use strict";t.exports=r,t.exports.default=r;var n=1e20;function r(t,e,A,n,r,i){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=n||.25,this.fontFamily=r||"sans-serif",this.fontWeight=i||"normal",this.radius=A||8;var o=this.size=this.fontSize+2*this.buffer,a=o+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.textAlign="left",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Uint16Array(a),this.useMetrics=void 0!==this.ctx.measureText("A").actualBoundingBoxLeft,this.middle=Math.round(o/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function i(t,e,A,n,r,i){for(var a=0;a<e;a++)o(t,a,e,A,n,r,i);for(var s=0;s<A;s++)o(t,s*e,1,e,n,r,i)}function o(t,e,A,r,i,o,a){var s,g,c,I;for(o[0]=0,a[0]=-n,a[1]=n,s=0;s<r;s++)i[s]=t[e+s*A];for(s=1,g=0,c=0;s<r;s++){do{I=o[g],c=(i[s]-i[I]+s*s-I*I)/(s-I)/2}while(c<=a[g]&&--g>-1);o[++g]=s,a[g]=c,a[g+1]=n}for(s=0,g=0;s<r;s++){for(;a[g+1]<s;)g++;I=o[g],t[e+s*A]=i[I]+(s-I)*(s-I)}}r.prototype._draw=function(t,e){var A,r,o,a,s,g,c,I,u,l=this.ctx.measureText(t),C=l.width,h=2*this.buffer;e&&this.useMetrics?(s=Math.floor(l.actualBoundingBoxAscent),I=this.buffer+Math.ceil(l.actualBoundingBoxAscent),g=this.buffer,c=this.buffer,A=(r=Math.min(this.size,Math.ceil(l.actualBoundingBoxRight-l.actualBoundingBoxLeft)))+h,o=(a=Math.min(this.size-g,Math.ceil(l.actualBoundingBoxAscent+l.actualBoundingBoxDescent)))+h,this.ctx.textBaseline="alphabetic"):(A=r=this.size,o=a=this.size,s=19*this.fontSize/24,g=c=0,I=this.middle,this.ctx.textBaseline="middle"),r&&a&&(this.ctx.clearRect(c,g,r,a),this.ctx.fillText(t,this.buffer,I),u=this.ctx.getImageData(c,g,r,a));var B=new Uint8ClampedArray(A*o);return function(t,e,A,r,i,o,a){o.fill(n,0,e*A),a.fill(0,0,e*A);for(var s=(e-r)/2,g=0;g<i;g++)for(var c=0;c<r;c++){var I=(g+s)*e+c+s,u=t.data[4*(g*r+c)+3]/255;if(1===u)o[I]=0,a[I]=n;else if(0===u)o[I]=n,a[I]=0;else{var l=Math.max(0,.5-u),C=Math.max(0,u-.5);o[I]=l*l,a[I]=C*C}}}(u,A,o,r,a,this.gridOuter,this.gridInner),i(this.gridOuter,A,o,this.f,this.v,this.z),i(this.gridInner,A,o,this.f,this.v,this.z),function(t,e,A,n,r,i,o){for(var a=0;a<e*A;a++){var s=Math.sqrt(n[a])-Math.sqrt(r[a]);t[a]=Math.round(255-255*(s/i+o))}}(B,A,o,this.gridOuter,this.gridInner,this.radius,this.cutoff),{data:B,metrics:{width:r,height:a,sdfWidth:A,sdfHeight:o,top:s,left:0,advance:C}}},r.prototype.draw=function(t){return this._draw(t,!1).data},r.prototype.drawWithMetrics=function(t){return this._draw(t,!0)}},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(22),o=A(1),a=A(151),s=A(391),g=A(334);function c(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return I(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return I(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function u(t){return l(function t(e,A){return e.map((function(e){return e instanceof s.a||(Object(g.a)("string"!==typeof e,"Shader module use by name is deprecated. Import shader module '".concat(e,"' and use it directly.")),Object(g.a)(e.name,"shader module has no name"),(e=new s.a(e)).dependencies=t(e.dependencies)),e}))}(t))}function l(t){var e={},A={};return C({modules:t,level:0,moduleMap:e,moduleDepth:A}),Object.keys(A).sort((function(t,e){return A[e]-A[t]})).map((function(t){return e[t]}))}function C(t){var e=t.modules,A=t.level,n=t.moduleMap,r=t.moduleDepth;if(A>=5)throw new Error("Possible loop in shader dependency graph");var i,o=c(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;n[a.name]=a,(void 0===r[a.name]||r[a.name]<A)&&(r[a.name]=A)}}catch(u){o.e(u)}finally{o.f()}var s,g=c(e);try{for(g.s();!(s=g.n()).done;){var I=s.value;I.dependencies&&C({modules:I.dependencies,level:A+1,moduleMap:n,moduleDepth:r})}}catch(u){g.e(u)}finally{g.f()}}function h(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="undefined"!==typeof window&&window.navigator||{},A=t.userAgent||e.userAgent||"",n=-1!==A.indexOf("MSIE "),r=-1!==A.indexOf("Trident/");return n||r}var B={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]},f={};Object.keys(B).forEach((function(t){f[t]=t}));var d={};function Q(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=B[e];if(Object(g.a)(n,e),!h(A))return!0;if(e in d)return d[e];var r=n[0],i=A.behavior||"enable",o="#extension GL_".concat(r," : ").concat(i,"\nvoid main(void) {}"),a=t.createShader(35633);t.shaderSource(a,o),t.compileShader(a);var s=t.getShaderParameter(a,35713);return t.deleteShader(a),d[e]=s,s}function E(t,e){var A=B[e];Object(g.a)(A,e);var n=function(t){return"undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&2===t._version)}(t)&&A[1]||A[0],r="string"===typeof n?Boolean(t.getExtension(n)):n;return Object(g.a)(!1===r||!0===r),r}function p(t,e){return(e=Array.isArray(e)?e:[e]).every((function(e){return E(t,e)}))}var y=A(335);function v(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return m(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return m(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var b,F=[[/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,"#version 300 es\n"],[/\btexture(2D|2DProj|Cube)Lod(EXT)?\(/g,"textureLod("],[/\btexture(2D|2DProj|Cube)(EXT)?\(/g,"texture("]],w=[].concat(F,[[/^[ \t]*attribute[ \t]+(.+;)/gm,"in $1"],[/^[ \t]*varying[ \t]+(.+;)/gm,"out $1"]]),S=[].concat(F,[[/^[ \t]*varying[ \t]+(.+;)/gm,"in $1"]]),D=[[/^#version[ \t]+300[ \t]+es/,"#version 100"],[/\btexture(2D|2DProj|Cube)Lod\(/g,"texture$1LodEXT("],[/\btexture\(/g,"texture2D("],[/\btextureLod\(/g,"texture2DLodEXT("]],R=[].concat(D,[[/^[ \t]*in[ \t]+(.+;)/gm,"attribute $1"],[/^[ \t]*out[ \t]+(.+;)/gm,"varying $1"]]),U=[].concat(D,[[/^[ \t]*in[ \t]+/gm,"varying "]]),G=/^[ \t]*out[ \t]+vec4[ \t]+(\w+)[ \t]*;\s+/m;function N(t,e,A){switch(e){case 300:return k(t,A?w:S);case 100:return A?k(t,R):function(t){var e=(t=k(t,U)).match(G);if(e){var A=e[1];t=t.replace(G,"").replace(new RegExp("\\b".concat(A,"\\b"),"g"),"gl_FragColor")}return t}(t);default:throw new Error("unknown GLSL version ".concat(e))}}function k(t,e){var A,n=v(e);try{for(n.s();!(A=n.n()).done;){var r=Object(i.a)(A.value,2),o=r[0],a=r[1];t=t.replace(o,a)}}catch(s){n.e(s)}finally{n.f()}return t}function x(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return O(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return O(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var M="\n\n".concat(y.a,"\n\n"),L=(b={},Object(o.a)(b,a.b,"vertex"),Object(o.a)(b,a.a,"fragment"),b);function _(t,e){var A=e.vs,n=e.fs,r=u(e.modules||[]);return{gl:t,vs:J(t,Object.assign({},e,{source:A,type:a.b,modules:r})),fs:J(t,Object.assign({},e,{source:n,type:a.a,modules:r})),getUniforms:T(r)}}function J(t,e){var A=e.id,n=e.source,r=e.type,o=e.modules,s=e.defines,c=void 0===s?{}:s,I=e.hookFunctions,u=void 0===I?[]:I,l=e.inject,C=void 0===l?{}:l,h=e.transpileToGLSL100,B=void 0!==h&&h,d=e.prologue,E=void 0===d||d,v=e.log;Object(g.a)("string"===typeof n,"shader source must be a string");var m=r===a.b,b=n.split("\n"),F=100,w="",S=n;0===b[0].indexOf("#version ")?(F=300,w=b[0],S=b.slice(1).join("\n")):w="#version ".concat(F);var D={};o.forEach((function(t){Object.assign(D,t.getDefines())})),Object.assign(D,c);var R=E?"".concat(w,"\n").concat(function(t){var e=t.id,A=t.source,n=t.type;return e&&"string"===typeof e&&-1===A.indexOf("SHADER_NAME")?"\n#define SHADER_NAME ".concat(e,"_").concat(L[n],"\n\n"):""}({id:A,source:n,type:r}),"\n").concat(function(t){var e=t.type;return"\n#define SHADER_TYPE_".concat(L[e].toUpperCase(),"\n")}({type:r}),"\n").concat(function(t){switch(function(t){var e=t.getExtension("WEBGL_debug_renderer_info"),A=t.getParameter(e&&e.UNMASKED_VENDOR_WEBGL||7936),n=t.getParameter(e&&e.UNMASKED_RENDERER_WEBGL||7937);return{gpuVendor:function(t,e){if(t.match(/NVIDIA/i)||e.match(/NVIDIA/i))return"NVIDIA";if(t.match(/INTEL/i)||e.match(/INTEL/i))return"INTEL";if(t.match(/AMD/i)||e.match(/AMD/i)||t.match(/ATI/i)||e.match(/ATI/i))return"AMD";return"UNKNOWN GPU"}(A,n),vendor:A,renderer:n,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t).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"}}(t),"\n").concat(function(t,e,A){var n="#if (__VERSION__ > 120)\n\n# define FEATURE_GLSL_DERIVATIVES\n# define FEATURE_GLSL_DRAW_BUFFERS\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FEATURE_GLSL_TEXTURE_LOD\n\n// DEPRECATED FLAGS, remove in v9\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n";return p(t,f.GLSL_FRAG_DEPTH)&&(n+="\n// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n"),p(t,f.GLSL_DERIVATIVES)&&Q(t,f.GLSL_DERIVATIVES)&&(n+="\n// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define FEATURE_GLSL_DERIVATIVES\n# define DERIVATIVES\n#endif\n"),p(t,f.GLSL_FRAG_DATA)&&Q(t,f.GLSL_FRAG_DATA,{behavior:"require"})&&(n+="\n// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define FEATURE_GLSL_DRAW_BUFFERS\n#define DRAW_BUFFERS\n#endif\n"),p(t,f.GLSL_TEXTURE_LOD)&&(n+="// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n\n# define FEATURE_GLSL_TEXTURE_LOD\n# define TEXTURE_LOD\n\n#endif\n"),n}(t),"\n").concat(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=0,A="";for(var n in t){0===e&&(A+="\n// APPLICATION DEFINES\n"),e++;var r=t[n];(r||Number.isFinite(r))&&(A+="#define ".concat(n.toUpperCase()," ").concat(t[n],"\n"))}0===e&&(A+="\n");return A}(D),"\n").concat(m?"":"precision highp float;\n\n","\n"):"".concat(w,"\n"),U=function(t){var e={vs:{},fs:{}};return t.forEach((function(t){var A;"string"!==typeof t?t=(A=t).hook:A={};var n=(t=t.trim()).split(":"),r=Object(i.a)(n,2),o=r[0],a=r[1],s=t.replace(/\(.+/,"");e[o][s]=Object.assign(A,{signature:a})})),e}(u),G={},k={},O={};for(var _ in C){var J="string"===typeof C[_]?{injection:C[_],order:0}:C[_],T=_.match(/^(v|f)s:(#)?([\w-]+)$/);if(T){var j=T[2],H=T[3];j?"decl"===H?k[_]=[J]:O[_]=[J]:G[_]=[J]}else O[_]=[J]}var Y,V=x(o);try{for(V.s();!(Y=V.n()).done;){var Z=Y.value;v&&Z.checkDeprecations(S,v),R+=Z.getModuleSource(r,F);var W=Z.injections[r];for(var K in W){var P=K.match(/^(v|f)s:#([\w-]+)$/);if(P){var q="decl"===P[2]?k:O;q[K]=q[K]||[],q[K].push(W[K])}else G[K]=G[K]||[],G[K].push(W[K])}}}catch(X){V.e(X)}finally{V.f()}return R+=M,R=Object(y.c)(R,r,k),R+=function(t,e){var A="";for(var n in t){var r=t[n];if(A+="void ".concat(r.signature," {\n"),r.header&&(A+="  ".concat(r.header)),e[n]){var i=e[n];i.sort((function(t,e){return t.order-e.order}));var o,a=x(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;A+="  ".concat(s.injection,"\n")}}catch(X){a.e(X)}finally{a.f()}}r.footer&&(A+="  ".concat(r.footer)),A+="}\n"}return A}(U[r],G),R+=S,R=N(R=Object(y.c)(R,r,O),B?100:F,m)}function T(t){return function(e){var A,n={},r=x(t);try{for(r.s();!(A=r.n()).done;){var i=A.value.getUniforms(e,n);Object.assign(n,i)}}catch(o){r.e(o)}finally{r.f()}return n}}var j=A(970);function H(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Y(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Y(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Y(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return V}));var V=function(){function t(e){Object(n.a)(this,t),this.gl=e,this._programCache={},this._getUniforms={},this._registeredModules={},this._hookFunctions=[],this._defaultModules=[],this._hashes={},this._hashCounter=0,this.stateHash=0,this._useCounts={}}return Object(r.a)(t,null,[{key:"getDefaultProgramManager",value:function(e){return e.luma=e.luma||{},e.luma.defaultProgramManager=e.luma.defaultProgramManager||new t(e),e.luma.defaultProgramManager}}]),Object(r.a)(t,[{key:"addDefaultModule",value:function(t){this._defaultModules.find((function(e){return e.name===t.name}))||this._defaultModules.push(t),this.stateHash++}},{key:"removeDefaultModule",value:function(t){var e="string"===typeof t?t:t.name;this._defaultModules=this._defaultModules.filter((function(t){return t.name!==e})),this.stateHash++}},{key:"addShaderHook",value:function(t,e){e&&(t=Object.assign(e,{hook:t})),this._hookFunctions.push(t),this.stateHash++}},{key:"get",value:function(){var t,e=this,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=A.vs,r=void 0===n?"":n,i=A.fs,o=void 0===i?"":i,a=A.defines,s=void 0===a?{}:a,g=A.inject,c=void 0===g?{}:g,I=A.varyings,u=void 0===I?[]:I,l=A.bufferMode,C=void 0===l?35981:l,h=A.transpileToGLSL100,B=void 0!==h&&h,f=this._getModuleList(A.modules),d=this._getHash(r),Q=this._getHash(o),E=f.map((function(t){return e._getHash(t.name)})).sort(),p=u.map((function(t){return e._getHash(t)})),y=Object.keys(s).sort(),v=Object.keys(c).sort(),m=[],b=[],F=H(y);try{for(F.s();!(t=F.n()).done;){var w=t.value;m.push(this._getHash(w)),m.push(this._getHash(s[w]))}}catch(N){F.e(N)}finally{F.f()}var S,D=H(v);try{for(D.s();!(S=D.n()).done;){var R=S.value;b.push(this._getHash(R)),b.push(this._getHash(c[R]))}}catch(N){D.e(N)}finally{D.f()}var U="".concat(d,"/").concat(Q,"D").concat(m.join("/"),"M").concat(E.join("/"),"I").concat(b.join("/"),"V").concat(p.join("/"),"H").concat(this.stateHash,"B").concat(C).concat(B?"T":"");if(!this._programCache[U]){var G=_(this.gl,{vs:r,fs:o,modules:f,inject:c,defines:s,hookFunctions:this._hookFunctions,transpileToGLSL100:B});this._programCache[U]=new j.a(this.gl,{hash:U,vs:G.vs,fs:G.fs,varyings:u,bufferMode:C}),this._getUniforms[U]=G.getUniforms||function(t){},this._useCounts[U]=0}return this._useCounts[U]++,this._programCache[U]}},{key:"getUniforms",value:function(t){return this._getUniforms[t.hash]||null}},{key:"release",value:function(t){var e=t.hash;this._useCounts[e]--,0===this._useCounts[e]&&(this._programCache[e].delete(),delete this._programCache[e],delete this._getUniforms[e],delete this._useCounts[e])}},{key:"_getHash",value:function(t){return void 0===this._hashes[t]&&(this._hashes[t]=this._hashCounter++),this._hashes[t]}},{key:"_getModuleList",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new Array(this._defaultModules.length+t.length),A={},n=0,r=0,i=this._defaultModules.length;r<i;++r){var o=this._defaultModules[r],a=o.name;e[n++]=o,A[a]=!0}for(var s=0,g=t.length;s<g;++s){var c=t[s],I=c.name;A[I]||(e[n++]=c,A[I]=!0)}return e.length=n,e}}]),t}()},function(t,e,A){"use strict";var n=A(521);function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,e,A){return(i=r()?Reflect.construct:function(t,e,A){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return A&&Object(n.a)(i,A.prototype),i}).apply(null,arguments)}A.d(e,"a",(function(){return i}))},function(t,e,A){"use strict";var n=A(22),r=A(1),i=A(5),o=A(4),a=A(35),s=A(14),g=A(16),c=A(7),I=A(40),u=A(479),l=A(480),C=A(279),h=A(412),B=A(255),f=A(286),d=A(136),Q=new Uint16Array([0,2,1,0,3,2]),E=new Float32Array([0,1,0,0,1,0,1,1]);function p(t,e){if(!e)return function(t){for(var e=new Float64Array(12),A=0;A<t.length;A++)e[3*A+0]=t[A][0],e[3*A+1]=t[A][1],e[3*A+2]=t[A][2]||0;return{vertexCount:6,positions:e,indices:Q,texCoords:E}}(t);for(var A=Math.max(Math.abs(t[0][0]-t[3][0]),Math.abs(t[1][0]-t[2][0])),n=Math.max(Math.abs(t[1][1]-t[0][1]),Math.abs(t[2][1]-t[3][1])),r=Math.ceil(A/e)+1,i=Math.ceil(n/e)+1,o=(r-1)*(i-1)*6,a=new Uint32Array(o),s=new Float32Array(r*i*2),g=new Float64Array(r*i*3),c=0,I=0,u=0;u<r;u++)for(var l=u/(r-1),C=0;C<i;C++){var h=C/(i-1),B=y(t,l,h);g[3*c+0]=B[0],g[3*c+1]=B[1],g[3*c+2]=B[2]||0,s[2*c+0]=l,s[2*c+1]=1-h,u>0&&C>0&&(a[I++]=c-i,a[I++]=c-i-1,a[I++]=c-1,a[I++]=c-i,a[I++]=c-1,a[I++]=c),c++}return{vertexCount:o,positions:g,indices:a,texCoords:s}}function y(t,e,A){return Object(d.lerp)(Object(d.lerp)(t[0],t[1],A),Object(d.lerp)(t[3],t[2],A),e)}var v="\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;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n  float x = lnglat.x;\n  float y = clamp(lnglat.y, -89.9, 89.9);\n  return vec2(\n    radians(x) + PI,\n    PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n  ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n  xy /= WORLD_SCALE;\n  return degrees(vec2(\n    xy.x - PI,\n    atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n  ));\n}\n/* End projection utils */\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\nvec2 getUV(vec2 pos) {\n  return vec2(\n    (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n    (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n  );\n}\n\n".concat("\nvec3 packUVsIntoRGB(vec2 uv) {\n  // Extract the top 8 bits. We want values to be truncated down so we can add a fraction\n  vec2 uv8bit = floor(uv * 256.);\n\n  // Calculate the normalized remainders of u and v parts that do not fit into 8 bits\n  // Scale and clamp to 0-1 range\n  vec2 uvFraction = fract(uv * 256.);\n  vec2 uvFraction4bit = floor(uvFraction * 16.);\n\n  // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates\n  float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;\n\n  return vec3(uv8bit, fractions) / 255.;\n}\n","\n\nvoid main(void) {\n  vec2 uv = vTexCoord;\n  if (coordinateConversion < -0.5) {\n    vec2 lnglat = mercator_to_lnglat(vTexPos);\n    uv = getUV(lnglat);\n  } else if (coordinateConversion > 0.5) {\n    vec2 commonPos = lnglat_to_mercator(vTexPos);\n    uv = getUV(commonPos);\n  }\n  vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n  gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n  geometry.uv = uv;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n  if (picking_uActive) {\n    // Since instance information is not used, we can use picking color for pixel index\n    gl_FragColor.rgb = packUVsIntoRGB(uv);\n  }\n}\n");function m(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function b(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}A.d(e,"a",(function(){return w}));var F={image:{type:"image",value:null,async:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},_imageCoordinateSystem:I.a.DEFAULT,desaturate:{type:"number",min:0,max:1,value:0},transparentColor:{type:"color",value:[0,0,0,0]},tintColor:{type:"color",value:[255,255,255]}},w=function(t){Object(s.a)(A,t);var e=b(A);function A(){return Object(i.a)(this,A),e.apply(this,arguments)}return Object(o.a)(A,[{key:"getShaders",value:function(){return Object(a.a)(Object(c.a)(A.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;\nvarying vec2 vTexPos;\n\nuniform float coordinateConversion;\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  if (coordinateConversion < -0.5) {\n    vTexPos = geometry.position.xy;\n  } else if (coordinateConversion > 0.5) {\n    vTexPos = geometry.worldPosition.xy;\n  }\n\n  vec4 color = vec4(0.0);\n  DECKGL_FILTER_COLOR(color, geometry);\n}\n",fs:v,modules:[u.a,l.a]})}},{key:"initializeState",value:function(){var t=this,e=this.getAttributeManager();e.remove(["instancePickingColors"]);e.add({indices:{size:1,isIndexed:!0,update:function(e){return e.value=t.state.mesh.indices},noAlloc:!0},positions:{size:3,type:5130,fp64:this.use64bitPositions(),update:function(e){return e.value=t.state.mesh.positions},noAlloc:!0},texCoords:{size:2,update:function(e){return e.value=t.state.mesh.texCoords},noAlloc:!0}})}},{key:"updateState",value:function(t){var e=t.props,A=t.oldProps;if(t.changeFlags.extensionsChanged){var n=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(n)}),this.getAttributeManager().invalidateAll()}var i=this.getAttributeManager();if(e.bounds!==A.bounds){var o=this.state.mesh,a=this._createMesh();for(var s in this.state.model.setVertexCount(a.vertexCount),a)o&&o[s]!==a[s]&&i.invalidate(s);this.setState(function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?m(Object(A),!0).forEach((function(e){Object(r.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):m(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({mesh:a},this._getCoordinateUniforms()))}else e._imageCoordinateSystem!==A._imageCoordinateSystem&&this.setState(this._getCoordinateUniforms())}},{key:"getPickingInfo",value:function(t){var e=t.info,A=this.props.image;if(!e.color||!A)return e.bitmap=null,e;var r=A.width,i=A.height;e.index=0;var o=function(t){var e=Object(n.a)(t,3),A=e[0],r=e[1],i=e[2];return[(A+(15&i)/16)/256,(r+(240&i)/256)/256]}(e.color),a=[Math.floor(o[0]*r),Math.floor(o[1]*i)];return e.bitmap={size:{width:r,height:i},uv:o,pixel:a},e}},{key:"_createMesh",value:function(){var t=this.props.bounds,e=t;return Number.isFinite(t[0])&&(e=[[t[0],t[1]],[t[0],t[3]],[t[2],t[3]],[t[2],t[1]]]),p(e,this.context.viewport.resolution)}},{key:"_getModel",value:function(t){return t?new h.a(t,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new B.a({drawMode:4,vertexCount:6}),isInstanced:!1})):null}},{key:"draw",value:function(t){var e=t.uniforms,A=this.state,n=A.model,r=A.coordinateConversion,i=A.bounds,o=this.props,a=o.image,s=o.desaturate,g=o.transparentColor,c=o.tintColor;a&&n&&n.setUniforms(e).setUniforms({bitmapTexture:a,desaturate:s,transparentColor:g.map((function(t){return t/255})),tintColor:c.slice(0,3).map((function(t){return t/255})),coordinateConversion:r,bounds:i}).draw()}},{key:"_getCoordinateUniforms",value:function(){var t=I.a.LNGLAT,e=I.a.CARTESIAN,A=I.a.DEFAULT,n=this.props._imageCoordinateSystem;if(n!==A){var r=this.props.bounds;if(!Number.isFinite(r[0]))throw new Error("_imageCoordinateSystem only supports rectangular bounds");var i=this.context.viewport.resolution?t:e;if((n=n===t?t:e)===t&&i===e)return{coordinateConversion:-1,bounds:r};if(n===e&&i===t){var o=Object(f.l)([r[0],r[1]]),a=Object(f.l)([r[2],r[3]]);return{coordinateConversion:1,bounds:[o[0],o[1],a[0],a[1]]}}}return{coordinateConversion:0,bounds:[0,0,0,0]}}}]),A}(C.a);w.layerName="BitmapLayer",w.defaultProps=F},function(t,e){t.exports=function(t){return null==t}},function(t,e,A){var n;!function(r){"use strict";var i,o,a,s=9e15,g="0123456789abcdef",c="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",I="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",u={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-s,maxE:s,crypto:!1},l=!0,C="[DecimalError] Invalid argument: ",h=Math.floor,B=Math.pow,f=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,d=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Q=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,E=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,p=1e7,y=c.length-1,v=I.length-1,m={name:"[object Decimal]"};function b(t){var e,A,n,r=t.length-1,i="",o=t[0];if(r>0){for(i+=o,e=1;e<r;e++)(A=7-(n=t[e]+"").length)&&(i+=O(A)),i+=n;(A=7-(n=(o=t[e])+"").length)&&(i+=O(A))}else if(0===o)return"0";for(;o%10===0;)o/=10;return i+o}function F(t,e,A){if(t!==~~t||t<e||t>A)throw Error(C+t)}function w(t,e,A,n){var r,i,o,a;for(i=t[0];i>=10;i/=10)--e;return--e<0?(e+=7,r=0):(r=Math.ceil((e+1)/7),e%=7),i=B(10,7-e),a=t[r]%i|0,null==n?e<3?(0==e?a=a/100|0:1==e&&(a=a/10|0),o=A<4&&99999==a||A>3&&49999==a||5e4==a||0==a):o=(A<4&&a+1==i||A>3&&a+1==i/2)&&(t[r+1]/i/100|0)==B(10,e-2)-1||(a==i/2||0==a)&&0==(t[r+1]/i/100|0):e<4?(0==e?a=a/1e3|0:1==e?a=a/100|0:2==e&&(a=a/10|0),o=(n||A<4)&&9999==a||!n&&A>3&&4999==a):o=((n||A<4)&&a+1==i||!n&&A>3&&a+1==i/2)&&(t[r+1]/i/1e3|0)==B(10,e-3)-1,o}function S(t,e,A){for(var n,r,i=[0],o=0,a=t.length;o<a;){for(r=i.length;r--;)i[r]*=e;for(i[0]+=g.indexOf(t.charAt(o++)),n=0;n<i.length;n++)i[n]>A-1&&(void 0===i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/A|0,i[n]%=A)}return i.reverse()}m.absoluteValue=m.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),R(t)},m.ceil=function(){return R(new this.constructor(this),this.e+1,2)},m.comparedTo=m.cmp=function(t){var e,A,n,r,i=this,o=i.d,a=(t=new i.constructor(t)).d,s=i.s,g=t.s;if(!o||!a)return s&&g?s!==g?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-g:0;if(s!==g)return s;if(i.e!==t.e)return i.e>t.e^s<0?1:-1;for(e=0,A=(n=o.length)<(r=a.length)?n:r;e<A;++e)if(o[e]!==a[e])return o[e]>a[e]^s<0?1:-1;return n===r?0:n>r^s<0?1:-1},m.cosine=m.cos=function(){var t,e,A=this,n=A.constructor;return A.d?A.d[0]?(t=n.precision,e=n.rounding,n.precision=t+Math.max(A.e,A.sd())+7,n.rounding=1,A=function(t,e){var A,n,r=e.d.length;r<32?(A=Math.ceil(r/3),n=(1/Z(4,A)).toString()):(A=16,n="2.3283064365386962890625e-10");t.precision+=A,e=V(t,1,e.times(n),new t(1));for(var i=A;i--;){var o=e.times(e);e=o.times(o).minus(o).times(8).plus(1)}return t.precision-=A,e}(n,W(n,A)),n.precision=t,n.rounding=e,R(2==a||3==a?A.neg():A,t,e,!0)):new n(1):new n(NaN)},m.cubeRoot=m.cbrt=function(){var t,e,A,n,r,i,o,a,s,g,c=this,I=c.constructor;if(!c.isFinite()||c.isZero())return new I(c);for(l=!1,(i=c.s*B(c.s*c,1/3))&&Math.abs(i)!=1/0?n=new I(i.toString()):(A=b(c.d),(i=((t=c.e)-A.length+1)%3)&&(A+=1==i||-2==i?"0":"00"),i=B(A,1/3),t=h((t+1)/3)-(t%3==(t<0?-1:2)),(n=new I(A=i==1/0?"5e"+t:(A=i.toExponential()).slice(0,A.indexOf("e")+1)+t)).s=c.s),o=(t=I.precision)+3;;)if(g=(s=(a=n).times(a).times(a)).plus(c),n=D(g.plus(c).times(a),g.plus(s),o+2,1),b(a.d).slice(0,o)===(A=b(n.d)).slice(0,o)){if("9999"!=(A=A.slice(o-3,o+1))&&(r||"4999"!=A)){+A&&(+A.slice(1)||"5"!=A.charAt(0))||(R(n,t+1,1),e=!n.times(n).times(n).eq(c));break}if(!r&&(R(a,t+1,0),a.times(a).times(a).eq(c))){n=a;break}o+=4,r=1}return l=!0,R(n,t,I.rounding,e)},m.decimalPlaces=m.dp=function(){var t,e=this.d,A=NaN;if(e){if(A=7*((t=e.length-1)-h(this.e/7)),t=e[t])for(;t%10==0;t/=10)A--;A<0&&(A=0)}return A},m.dividedBy=m.div=function(t){return D(this,new this.constructor(t))},m.dividedToIntegerBy=m.divToInt=function(t){var e=this.constructor;return R(D(this,new e(t),0,1,1),e.precision,e.rounding)},m.equals=m.eq=function(t){return 0===this.cmp(t)},m.floor=function(){return R(new this.constructor(this),this.e+1,3)},m.greaterThan=m.gt=function(t){return this.cmp(t)>0},m.greaterThanOrEqualTo=m.gte=function(t){var e=this.cmp(t);return 1==e||0===e},m.hyperbolicCosine=m.cosh=function(){var t,e,A,n,r,i=this,o=i.constructor,a=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return a;A=o.precision,n=o.rounding,o.precision=A+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<32?e=(1/Z(4,t=Math.ceil(r/3))).toString():(t=16,e="2.3283064365386962890625e-10"),i=V(o,1,i.times(e),new o(1),!0);for(var s,g=t,c=new o(8);g--;)s=i.times(i),i=a.minus(s.times(c.minus(s.times(c))));return R(i,o.precision=A,o.rounding=n,!0)},m.hyperbolicSine=m.sinh=function(){var t,e,A,n,r=this,i=r.constructor;if(!r.isFinite()||r.isZero())return new i(r);if(e=i.precision,A=i.rounding,i.precision=e+Math.max(r.e,r.sd())+4,i.rounding=1,(n=r.d.length)<3)r=V(i,2,r,r,!0);else{t=(t=1.4*Math.sqrt(n))>16?16:0|t,r=V(i,2,r=r.times(1/Z(5,t)),r,!0);for(var o,a=new i(5),s=new i(16),g=new i(20);t--;)o=r.times(r),r=r.times(a.plus(o.times(s.times(o).plus(g))))}return i.precision=e,i.rounding=A,R(r,e,A,!0)},m.hyperbolicTangent=m.tanh=function(){var t,e,A=this,n=A.constructor;return A.isFinite()?A.isZero()?new n(A):(t=n.precision,e=n.rounding,n.precision=t+7,n.rounding=1,D(A.sinh(),A.cosh(),n.precision=t,n.rounding=e)):new n(A.s)},m.inverseCosine=m.acos=function(){var t,e=this,A=e.constructor,n=e.abs().cmp(1),r=A.precision,i=A.rounding;return-1!==n?0===n?e.isNeg()?k(A,r,i):new A(0):new A(NaN):e.isZero()?k(A,r+4,i).times(.5):(A.precision=r+6,A.rounding=1,e=e.asin(),t=k(A,r+4,i).times(.5),A.precision=r,A.rounding=i,t.minus(e))},m.inverseHyperbolicCosine=m.acosh=function(){var t,e,A=this,n=A.constructor;return A.lte(1)?new n(A.eq(1)?0:NaN):A.isFinite()?(t=n.precision,e=n.rounding,n.precision=t+Math.max(Math.abs(A.e),A.sd())+4,n.rounding=1,l=!1,A=A.times(A).minus(1).sqrt().plus(A),l=!0,n.precision=t,n.rounding=e,A.ln()):new n(A)},m.inverseHyperbolicSine=m.asinh=function(){var t,e,A=this,n=A.constructor;return!A.isFinite()||A.isZero()?new n(A):(t=n.precision,e=n.rounding,n.precision=t+2*Math.max(Math.abs(A.e),A.sd())+6,n.rounding=1,l=!1,A=A.times(A).plus(1).sqrt().plus(A),l=!0,n.precision=t,n.rounding=e,A.ln())},m.inverseHyperbolicTangent=m.atanh=function(){var t,e,A,n,r=this,i=r.constructor;return r.isFinite()?r.e>=0?new i(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(t=i.precision,e=i.rounding,n=r.sd(),Math.max(n,t)<2*-r.e-1?R(new i(r),t,e,!0):(i.precision=A=n-r.e,r=D(r.plus(1),new i(1).minus(r),A+t,1),i.precision=t+4,i.rounding=1,r=r.ln(),i.precision=t,i.rounding=e,r.times(.5))):new i(NaN)},m.inverseSine=m.asin=function(){var t,e,A,n,r=this,i=r.constructor;return r.isZero()?new i(r):(e=r.abs().cmp(1),A=i.precision,n=i.rounding,-1!==e?0===e?((t=k(i,A+4,n).times(.5)).s=r.s,t):new i(NaN):(i.precision=A+6,i.rounding=1,r=r.div(new i(1).minus(r.times(r)).sqrt().plus(1)).atan(),i.precision=A,i.rounding=n,r.times(2)))},m.inverseTangent=m.atan=function(){var t,e,A,n,r,i,o,a,s,g=this,c=g.constructor,I=c.precision,u=c.rounding;if(g.isFinite()){if(g.isZero())return new c(g);if(g.abs().eq(1)&&I+4<=v)return(o=k(c,I+4,u).times(.25)).s=g.s,o}else{if(!g.s)return new c(NaN);if(I+4<=v)return(o=k(c,I+4,u).times(.5)).s=g.s,o}for(c.precision=a=I+10,c.rounding=1,t=A=Math.min(28,a/7+2|0);t;--t)g=g.div(g.times(g).plus(1).sqrt().plus(1));for(l=!1,e=Math.ceil(a/7),n=1,s=g.times(g),o=new c(g),r=g;-1!==t;)if(r=r.times(s),i=o.minus(r.div(n+=2)),r=r.times(s),void 0!==(o=i.plus(r.div(n+=2))).d[e])for(t=e;o.d[t]===i.d[t]&&t--;);return A&&(o=o.times(2<<A-1)),l=!0,R(o,c.precision=I,c.rounding=u,!0)},m.isFinite=function(){return!!this.d},m.isInteger=m.isInt=function(){return!!this.d&&h(this.e/7)>this.d.length-2},m.isNaN=function(){return!this.s},m.isNegative=m.isNeg=function(){return this.s<0},m.isPositive=m.isPos=function(){return this.s>0},m.isZero=function(){return!!this.d&&0===this.d[0]},m.lessThan=m.lt=function(t){return this.cmp(t)<0},m.lessThanOrEqualTo=m.lte=function(t){return this.cmp(t)<1},m.logarithm=m.log=function(t){var e,A,n,r,i,o,a,s,g=this.constructor,c=g.precision,I=g.rounding;if(null==t)t=new g(10),e=!0;else{if(A=(t=new g(t)).d,t.s<0||!A||!A[0]||t.eq(1))return new g(NaN);e=t.eq(10)}if(A=this.d,this.s<0||!A||!A[0]||this.eq(1))return new g(A&&!A[0]?-1/0:1!=this.s?NaN:A?0:1/0);if(e)if(A.length>1)i=!0;else{for(r=A[0];r%10===0;)r/=10;i=1!==r}if(l=!1,o=T(this,a=c+5),n=e?N(g,a+10):T(t,a),w((s=D(o,n,a,1)).d,r=c,I))do{if(o=T(this,a+=10),n=e?N(g,a+10):T(t,a),s=D(o,n,a,1),!i){+b(s.d).slice(r+1,r+15)+1==1e14&&(s=R(s,c+1,0));break}}while(w(s.d,r+=10,I));return l=!0,R(s,c,I)},m.minus=m.sub=function(t){var e,A,n,r,i,o,a,s,g,c,I,u,C=this,B=C.constructor;if(t=new B(t),!C.d||!t.d)return C.s&&t.s?C.d?t.s=-t.s:t=new B(t.d||C.s!==t.s?C:NaN):t=new B(NaN),t;if(C.s!=t.s)return t.s=-t.s,C.plus(t);if(g=C.d,u=t.d,a=B.precision,s=B.rounding,!g[0]||!u[0]){if(u[0])t.s=-t.s;else{if(!g[0])return new B(3===s?-0:0);t=new B(C)}return l?R(t,a,s):t}if(A=h(t.e/7),c=h(C.e/7),g=g.slice(),i=c-A){for((I=i<0)?(e=g,i=-i,o=u.length):(e=u,A=c,o=g.length),i>(n=Math.max(Math.ceil(a/7),o)+2)&&(i=n,e.length=1),e.reverse(),n=i;n--;)e.push(0);e.reverse()}else{for((I=(n=g.length)<(o=u.length))&&(o=n),n=0;n<o;n++)if(g[n]!=u[n]){I=g[n]<u[n];break}i=0}for(I&&(e=g,g=u,u=e,t.s=-t.s),o=g.length,n=u.length-o;n>0;--n)g[o++]=0;for(n=u.length;n>i;){if(g[--n]<u[n]){for(r=n;r&&0===g[--r];)g[r]=p-1;--g[r],g[n]+=p}g[n]-=u[n]}for(;0===g[--o];)g.pop();for(;0===g[0];g.shift())--A;return g[0]?(t.d=g,t.e=G(g,A),l?R(t,a,s):t):new B(3===s?-0:0)},m.modulo=m.mod=function(t){var e,A=this,n=A.constructor;return t=new n(t),!A.d||!t.s||t.d&&!t.d[0]?new n(NaN):!t.d||A.d&&!A.d[0]?R(new n(A),n.precision,n.rounding):(l=!1,9==n.modulo?(e=D(A,t.abs(),0,3,1)).s*=t.s:e=D(A,t,0,n.modulo,1),e=e.times(t),l=!0,A.minus(e))},m.naturalExponential=m.exp=function(){return J(this)},m.naturalLogarithm=m.ln=function(){return T(this)},m.negated=m.neg=function(){var t=new this.constructor(this);return t.s=-t.s,R(t)},m.plus=m.add=function(t){var e,A,n,r,i,o,a,s,g,c,I=this,u=I.constructor;if(t=new u(t),!I.d||!t.d)return I.s&&t.s?I.d||(t=new u(t.d||I.s===t.s?I:NaN)):t=new u(NaN),t;if(I.s!=t.s)return t.s=-t.s,I.minus(t);if(g=I.d,c=t.d,a=u.precision,s=u.rounding,!g[0]||!c[0])return c[0]||(t=new u(I)),l?R(t,a,s):t;if(i=h(I.e/7),n=h(t.e/7),g=g.slice(),r=i-n){for(r<0?(A=g,r=-r,o=c.length):(A=c,n=i,o=g.length),r>(o=(i=Math.ceil(a/7))>o?i+1:o+1)&&(r=o,A.length=1),A.reverse();r--;)A.push(0);A.reverse()}for((o=g.length)-(r=c.length)<0&&(r=o,A=c,c=g,g=A),e=0;r;)e=(g[--r]=g[r]+c[r]+e)/p|0,g[r]%=p;for(e&&(g.unshift(e),++n),o=g.length;0==g[--o];)g.pop();return t.d=g,t.e=G(g,n),l?R(t,a,s):t},m.precision=m.sd=function(t){var e,A=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(C+t);return A.d?(e=x(A.d),t&&A.e+1>e&&(e=A.e+1)):e=NaN,e},m.round=function(){var t=this,e=t.constructor;return R(new e(t),t.e+1,e.rounding)},m.sine=m.sin=function(){var t,e,A=this,n=A.constructor;return A.isFinite()?A.isZero()?new n(A):(t=n.precision,e=n.rounding,n.precision=t+Math.max(A.e,A.sd())+7,n.rounding=1,A=function(t,e){var A,n=e.d.length;if(n<3)return V(t,2,e,e);A=(A=1.4*Math.sqrt(n))>16?16:0|A,e=e.times(1/Z(5,A)),e=V(t,2,e,e);for(var r,i=new t(5),o=new t(16),a=new t(20);A--;)r=e.times(e),e=e.times(i.plus(r.times(o.times(r).minus(a))));return e}(n,W(n,A)),n.precision=t,n.rounding=e,R(a>2?A.neg():A,t,e,!0)):new n(NaN)},m.squareRoot=m.sqrt=function(){var t,e,A,n,r,i,o=this,a=o.d,s=o.e,g=o.s,c=o.constructor;if(1!==g||!a||!a[0])return new c(!g||g<0&&(!a||a[0])?NaN:a?o:1/0);for(l=!1,0==(g=Math.sqrt(+o))||g==1/0?(((e=b(a)).length+s)%2==0&&(e+="0"),g=Math.sqrt(e),s=h((s+1)/2)-(s<0||s%2),n=new c(e=g==1/0?"5e"+s:(e=g.toExponential()).slice(0,e.indexOf("e")+1)+s)):n=new c(g.toString()),A=(s=c.precision)+3;;)if(n=(i=n).plus(D(o,i,A+2,1)).times(.5),b(i.d).slice(0,A)===(e=b(n.d)).slice(0,A)){if("9999"!=(e=e.slice(A-3,A+1))&&(r||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(R(n,s+1,1),t=!n.times(n).eq(o));break}if(!r&&(R(i,s+1,0),i.times(i).eq(o))){n=i;break}A+=4,r=1}return l=!0,R(n,s,c.rounding,t)},m.tangent=m.tan=function(){var t,e,A=this,n=A.constructor;return A.isFinite()?A.isZero()?new n(A):(t=n.precision,e=n.rounding,n.precision=t+10,n.rounding=1,(A=A.sin()).s=1,A=D(A,new n(1).minus(A.times(A)).sqrt(),t+10,0),n.precision=t,n.rounding=e,R(2==a||4==a?A.neg():A,t,e,!0)):new n(NaN)},m.times=m.mul=function(t){var e,A,n,r,i,o,a,s,g,c=this,I=c.constructor,u=c.d,C=(t=new I(t)).d;if(t.s*=c.s,!u||!u[0]||!C||!C[0])return new I(!t.s||u&&!u[0]&&!C||C&&!C[0]&&!u?NaN:u&&C?0*t.s:t.s/0);for(A=h(c.e/7)+h(t.e/7),(s=u.length)<(g=C.length)&&(i=u,u=C,C=i,o=s,s=g,g=o),i=[],n=o=s+g;n--;)i.push(0);for(n=g;--n>=0;){for(e=0,r=s+n;r>n;)a=i[r]+C[n]*u[r-n-1]+e,i[r--]=a%p|0,e=a/p|0;i[r]=(i[r]+e)%p|0}for(;!i[--o];)i.pop();return e?++A:i.shift(),t.d=i,t.e=G(i,A),l?R(t,I.precision,I.rounding):t},m.toBinary=function(t,e){return K(this,2,t,e)},m.toDecimalPlaces=m.toDP=function(t,e){var A=this,n=A.constructor;return A=new n(A),void 0===t?A:(F(t,0,1e9),void 0===e?e=n.rounding:F(e,0,8),R(A,t+A.e+1,e))},m.toExponential=function(t,e){var A,n=this,r=n.constructor;return void 0===t?A=U(n,!0):(F(t,0,1e9),void 0===e?e=r.rounding:F(e,0,8),A=U(n=R(new r(n),t+1,e),!0,t+1)),n.isNeg()&&!n.isZero()?"-"+A:A},m.toFixed=function(t,e){var A,n,r=this,i=r.constructor;return void 0===t?A=U(r):(F(t,0,1e9),void 0===e?e=i.rounding:F(e,0,8),A=U(n=R(new i(r),t+r.e+1,e),!1,t+n.e+1)),r.isNeg()&&!r.isZero()?"-"+A:A},m.toFraction=function(t){var e,A,n,r,i,o,a,s,g,c,I,u,h=this,f=h.d,d=h.constructor;if(!f)return new d(h);if(g=A=new d(1),n=s=new d(0),o=(i=(e=new d(n)).e=x(f)-h.e-1)%7,e.d[0]=B(10,o<0?7+o:o),null==t)t=i>0?e:g;else{if(!(a=new d(t)).isInt()||a.lt(g))throw Error(C+a);t=a.gt(e)?i>0?e:g:a}for(l=!1,a=new d(b(f)),c=d.precision,d.precision=i=7*f.length*2;I=D(a,e,0,1,1),1!=(r=A.plus(I.times(n))).cmp(t);)A=n,n=r,r=g,g=s.plus(I.times(r)),s=r,r=e,e=a.minus(I.times(r)),a=r;return r=D(t.minus(A),n,0,1,1),s=s.plus(r.times(g)),A=A.plus(r.times(n)),s.s=g.s=h.s,u=D(g,n,i,1).minus(h).abs().cmp(D(s,A,i,1).minus(h).abs())<1?[g,n]:[s,A],d.precision=c,l=!0,u},m.toHexadecimal=m.toHex=function(t,e){return K(this,16,t,e)},m.toNearest=function(t,e){var A=this,n=A.constructor;if(A=new n(A),null==t){if(!A.d)return A;t=new n(1),e=n.rounding}else{if(t=new n(t),void 0===e?e=n.rounding:F(e,0,8),!A.d)return t.s?A:t;if(!t.d)return t.s&&(t.s=A.s),t}return t.d[0]?(l=!1,A=D(A,t,0,e,1).times(t),l=!0,R(A)):(t.s=A.s,A=t),A},m.toNumber=function(){return+this},m.toOctal=function(t,e){return K(this,8,t,e)},m.toPower=m.pow=function(t){var e,A,n,r,i,o,a=this,s=a.constructor,g=+(t=new s(t));if(!a.d||!t.d||!a.d[0]||!t.d[0])return new s(B(+a,g));if((a=new s(a)).eq(1))return a;if(n=s.precision,i=s.rounding,t.eq(1))return R(a,n,i);if((e=h(t.e/7))>=t.d.length-1&&(A=g<0?-g:g)<=9007199254740991)return r=M(s,a,A,n),t.s<0?new s(1).div(r):R(r,n,i);if((o=a.s)<0){if(e<t.d.length-1)return new s(NaN);if(0==(1&t.d[e])&&(o=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=o,a}return(e=0!=(A=B(+a,g))&&isFinite(A)?new s(A+"").e:h(g*(Math.log("0."+b(a.d))/Math.LN10+a.e+1)))>s.maxE+1||e<s.minE-1?new s(e>0?o/0:0):(l=!1,s.rounding=a.s=1,A=Math.min(12,(e+"").length),(r=J(t.times(T(a,n+A)),n)).d&&w((r=R(r,n+5,1)).d,n,i)&&(e=n+10,+b((r=R(J(t.times(T(a,e+A)),e),e+5,1)).d).slice(n+1,n+15)+1==1e14&&(r=R(r,n+1,0))),r.s=o,l=!0,s.rounding=i,R(r,n,i))},m.toPrecision=function(t,e){var A,n=this,r=n.constructor;return void 0===t?A=U(n,n.e<=r.toExpNeg||n.e>=r.toExpPos):(F(t,1,1e9),void 0===e?e=r.rounding:F(e,0,8),A=U(n=R(new r(n),t,e),t<=n.e||n.e<=r.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+A:A},m.toSignificantDigits=m.toSD=function(t,e){var A=this.constructor;return void 0===t?(t=A.precision,e=A.rounding):(F(t,1,1e9),void 0===e?e=A.rounding:F(e,0,8)),R(new A(this),t,e)},m.toString=function(){var t=this,e=t.constructor,A=U(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+A:A},m.truncated=m.trunc=function(){return R(new this.constructor(this),this.e+1,1)},m.valueOf=m.toJSON=function(){var t=this,e=t.constructor,A=U(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+A:A};var D=function(){function t(t,e,A){var n,r=0,i=t.length;for(t=t.slice();i--;)n=t[i]*e+r,t[i]=n%A|0,r=n/A|0;return r&&t.unshift(r),t}function e(t,e,A,n){var r,i;if(A!=n)i=A>n?1:-1;else for(r=i=0;r<A;r++)if(t[r]!=e[r]){i=t[r]>e[r]?1:-1;break}return i}function A(t,e,A,n){for(var r=0;A--;)t[A]-=r,r=t[A]<e[A]?1:0,t[A]=r*n+t[A]-e[A];for(;!t[0]&&t.length>1;)t.shift()}return function(n,r,i,a,s,g){var c,I,u,l,C,B,f,d,Q,E,y,v,m,b,F,w,S,D,U,G,N=n.constructor,k=n.s==r.s?1:-1,x=n.d,O=r.d;if(!x||!x[0]||!O||!O[0])return new N(n.s&&r.s&&(x?!O||x[0]!=O[0]:O)?x&&0==x[0]||!O?0*k:k/0:NaN);for(g?(C=1,I=n.e-r.e):(g=p,C=7,I=h(n.e/C)-h(r.e/C)),U=O.length,S=x.length,E=(Q=new N(k)).d=[],u=0;O[u]==(x[u]||0);u++);if(O[u]>(x[u]||0)&&I--,null==i?(b=i=N.precision,a=N.rounding):b=s?i+(n.e-r.e)+1:i,b<0)E.push(1),B=!0;else{if(b=b/C+2|0,u=0,1==U){for(l=0,O=O[0],b++;(u<S||l)&&b--;u++)F=l*g+(x[u]||0),E[u]=F/O|0,l=F%O|0;B=l||u<S}else{for((l=g/(O[0]+1)|0)>1&&(O=t(O,l,g),x=t(x,l,g),U=O.length,S=x.length),w=U,v=(y=x.slice(0,U)).length;v<U;)y[v++]=0;(G=O.slice()).unshift(0),D=O[0],O[1]>=g/2&&++D;do{l=0,(c=e(O,y,U,v))<0?(m=y[0],U!=v&&(m=m*g+(y[1]||0)),(l=m/D|0)>1?(l>=g&&(l=g-1),1==(c=e(f=t(O,l,g),y,d=f.length,v=y.length))&&(l--,A(f,U<d?G:O,d,g))):(0==l&&(c=l=1),f=O.slice()),(d=f.length)<v&&f.unshift(0),A(y,f,v,g),-1==c&&(c=e(O,y,U,v=y.length))<1&&(l++,A(y,U<v?G:O,v,g)),v=y.length):0===c&&(l++,y=[0]),E[u++]=l,c&&y[0]?y[v++]=x[w]||0:(y=[x[w]],v=1)}while((w++<S||void 0!==y[0])&&b--);B=void 0!==y[0]}E[0]||E.shift()}if(1==C)Q.e=I,o=B;else{for(u=1,l=E[0];l>=10;l/=10)u++;Q.e=u+I*C-1,R(Q,s?i+Q.e+1:i,a,B)}return Q}}();function R(t,e,A,n){var r,i,o,a,s,g,c,I,u,C=t.constructor;t:if(null!=e){if(!(I=t.d))return t;for(r=1,a=I[0];a>=10;a/=10)r++;if((i=e-r)<0)i+=7,o=e,s=(c=I[u=0])/B(10,r-o-1)%10|0;else if((u=Math.ceil((i+1)/7))>=(a=I.length)){if(!n)break t;for(;a++<=u;)I.push(0);c=s=0,r=1,o=(i%=7)-7+1}else{for(c=a=I[u],r=1;a>=10;a/=10)r++;s=(o=(i%=7)-7+r)<0?0:c/B(10,r-o-1)%10|0}if(n=n||e<0||void 0!==I[u+1]||(o<0?c:c%B(10,r-o-1)),g=A<4?(s||n)&&(0==A||A==(t.s<0?3:2)):s>5||5==s&&(4==A||n||6==A&&(i>0?o>0?c/B(10,r-o):0:I[u-1])%10&1||A==(t.s<0?8:7)),e<1||!I[0])return I.length=0,g?(e-=t.e+1,I[0]=B(10,(7-e%7)%7),t.e=-e||0):I[0]=t.e=0,t;if(0==i?(I.length=u,a=1,u--):(I.length=u+1,a=B(10,7-i),I[u]=o>0?(c/B(10,r-o)%B(10,o)|0)*a:0),g)for(;;){if(0==u){for(i=1,o=I[0];o>=10;o/=10)i++;for(o=I[0]+=a,a=1;o>=10;o/=10)a++;i!=a&&(t.e++,I[0]==p&&(I[0]=1));break}if(I[u]+=a,I[u]!=p)break;I[u--]=0,a=1}for(i=I.length;0===I[--i];)I.pop()}return l&&(t.e>C.maxE?(t.d=null,t.e=NaN):t.e<C.minE&&(t.e=0,t.d=[0])),t}function U(t,e,A){if(!t.isFinite())return j(t);var n,r=t.e,i=b(t.d),o=i.length;return e?(A&&(n=A-o)>0?i=i.charAt(0)+"."+i.slice(1)+O(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(t.e<0?"e":"e+")+t.e):r<0?(i="0."+O(-r-1)+i,A&&(n=A-o)>0&&(i+=O(n))):r>=o?(i+=O(r+1-o),A&&(n=A-r-1)>0&&(i=i+"."+O(n))):((n=r+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),A&&(n=A-o)>0&&(r+1===o&&(i+="."),i+=O(n))),i}function G(t,e){var A=t[0];for(e*=7;A>=10;A/=10)e++;return e}function N(t,e,A){if(e>y)throw l=!0,A&&(t.precision=A),Error("[DecimalError] Precision limit exceeded");return R(new t(c),e,1,!0)}function k(t,e,A){if(e>v)throw Error("[DecimalError] Precision limit exceeded");return R(new t(I),e,A,!0)}function x(t){var e=t.length-1,A=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)A--;for(e=t[0];e>=10;e/=10)A++}return A}function O(t){for(var e="";t--;)e+="0";return e}function M(t,e,A,n){var r,i=new t(1),o=Math.ceil(n/7+4);for(l=!1;;){if(A%2&&P((i=i.times(e)).d,o)&&(r=!0),0===(A=h(A/2))){A=i.d.length-1,r&&0===i.d[A]&&++i.d[A];break}P((e=e.times(e)).d,o)}return l=!0,i}function L(t){return 1&t.d[t.d.length-1]}function _(t,e,A){for(var n,r=new t(e[0]),i=0;++i<e.length;){if(!(n=new t(e[i])).s){r=n;break}r[A](n)&&(r=n)}return r}function J(t,e){var A,n,r,i,o,a,s,g=0,c=0,I=0,u=t.constructor,C=u.rounding,h=u.precision;if(!t.d||!t.d[0]||t.e>17)return new u(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(l=!1,s=h):s=e,a=new u(.03125);t.e>-2;)t=t.times(a),I+=5;for(s+=n=Math.log(B(2,I))/Math.LN10*2+5|0,A=i=o=new u(1),u.precision=s;;){if(i=R(i.times(t),s,1),A=A.times(++c),b((a=o.plus(D(i,A,s,1))).d).slice(0,s)===b(o.d).slice(0,s)){for(r=I;r--;)o=R(o.times(o),s,1);if(null!=e)return u.precision=h,o;if(!(g<3&&w(o.d,s-n,C,g)))return R(o,u.precision=h,C,l=!0);u.precision=s+=10,A=i=a=new u(1),c=0,g++}o=a}}function T(t,e){var A,n,r,i,o,a,s,g,c,I,u,C=1,h=t,B=h.d,f=h.constructor,d=f.rounding,Q=f.precision;if(h.s<0||!B||!B[0]||!h.e&&1==B[0]&&1==B.length)return new f(B&&!B[0]?-1/0:1!=h.s?NaN:B?0:h);if(null==e?(l=!1,c=Q):c=e,f.precision=c+=10,n=(A=b(B)).charAt(0),!(Math.abs(i=h.e)<15e14))return g=N(f,c+2,Q).times(i+""),h=T(new f(n+"."+A.slice(1)),c-10).plus(g),f.precision=Q,null==e?R(h,Q,d,l=!0):h;for(;n<7&&1!=n||1==n&&A.charAt(1)>3;)n=(A=b((h=h.times(t)).d)).charAt(0),C++;for(i=h.e,n>1?(h=new f("0."+A),i++):h=new f(n+"."+A.slice(1)),I=h,s=o=h=D(h.minus(1),h.plus(1),c,1),u=R(h.times(h),c,1),r=3;;){if(o=R(o.times(u),c,1),b((g=s.plus(D(o,new f(r),c,1))).d).slice(0,c)===b(s.d).slice(0,c)){if(s=s.times(2),0!==i&&(s=s.plus(N(f,c+2,Q).times(i+""))),s=D(s,new f(C),c,1),null!=e)return f.precision=Q,s;if(!w(s.d,c-10,d,a))return R(s,f.precision=Q,d,l=!0);f.precision=c+=10,g=o=h=D(I.minus(1),I.plus(1),c,1),u=R(h.times(h),c,1),r=a=1}s=g,r+=2}}function j(t){return String(t.s*t.s/0)}function H(t,e){var A,n,r;for((A=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(A<0&&(A=n),A+=+e.slice(n+1),e=e.substring(0,n)):A<0&&(A=e.length),n=0;48===e.charCodeAt(n);n++);for(r=e.length;48===e.charCodeAt(r-1);--r);if(e=e.slice(n,r)){if(r-=n,t.e=A=A-n-1,t.d=[],n=(A+1)%7,A<0&&(n+=7),n<r){for(n&&t.d.push(+e.slice(0,n)),r-=7;n<r;)t.d.push(+e.slice(n,n+=7));n=7-(e=e.slice(n)).length}else n-=r;for(;n--;)e+="0";t.d.push(+e),l&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function Y(t,e){var A,n,r,o,a,s,g,c,I;if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(d.test(e))A=16,e=e.toLowerCase();else if(f.test(e))A=2;else{if(!Q.test(e))throw Error(C+e);A=8}for((o=e.search(/p/i))>0?(g=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,n=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,r=M(n,new n(A),o,2*o)),o=I=(c=S(e,A,p)).length-1;0===c[o];--o)c.pop();return o<0?new n(0*t.s):(t.e=G(c,I),t.d=c,l=!1,a&&(t=D(t,r,4*s)),g&&(t=t.times(Math.abs(g)<54?B(2,g):i.pow(2,g))),l=!0,t)}function V(t,e,A,n,r){var i,o,a,s,g=t.precision,c=Math.ceil(g/7);for(l=!1,s=A.times(A),a=new t(n);;){if(o=D(a.times(s),new t(e++*e++),g,1),a=r?n.plus(o):n.minus(o),n=D(o.times(s),new t(e++*e++),g,1),void 0!==(o=a.plus(n)).d[c]){for(i=c;o.d[i]===a.d[i]&&i--;);if(-1==i)break}i=a,a=n,n=o,o=i}return l=!0,o.d.length=c+1,o}function Z(t,e){for(var A=t;--e;)A*=t;return A}function W(t,e){var A,n=e.s<0,r=k(t,t.precision,1),i=r.times(.5);if((e=e.abs()).lte(i))return a=n?4:1,e;if((A=e.divToInt(r)).isZero())a=n?3:2;else{if((e=e.minus(A.times(r))).lte(i))return a=L(A)?n?2:3:n?4:1,e;a=L(A)?n?1:4:n?3:2}return e.minus(r).abs()}function K(t,e,A,n){var r,i,a,s,c,I,u,l,C,h=t.constructor,B=void 0!==A;if(B?(F(A,1,1e9),void 0===n?n=h.rounding:F(n,0,8)):(A=h.precision,n=h.rounding),t.isFinite()){for(B?(r=2,16==e?A=4*A-3:8==e&&(A=3*A-2)):r=e,(a=(u=U(t)).indexOf("."))>=0&&(u=u.replace(".",""),(C=new h(1)).e=u.length-a,C.d=S(U(C),10,r),C.e=C.d.length),i=c=(l=S(u,10,r)).length;0==l[--c];)l.pop();if(l[0]){if(a<0?i--:((t=new h(t)).d=l,t.e=i,l=(t=D(t,C,A,n,0,r)).d,i=t.e,I=o),a=l[A],s=r/2,I=I||void 0!==l[A+1],I=n<4?(void 0!==a||I)&&(0===n||n===(t.s<0?3:2)):a>s||a===s&&(4===n||I||6===n&&1&l[A-1]||n===(t.s<0?8:7)),l.length=A,I)for(;++l[--A]>r-1;)l[A]=0,A||(++i,l.unshift(1));for(c=l.length;!l[c-1];--c);for(a=0,u="";a<c;a++)u+=g.charAt(l[a]);if(B){if(c>1)if(16==e||8==e){for(a=16==e?4:3,--c;c%a;c++)u+="0";for(c=(l=S(u,r,e)).length;!l[c-1];--c);for(a=1,u="1.";a<c;a++)u+=g.charAt(l[a])}else u=u.charAt(0)+"."+u.slice(1);u=u+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)u="0"+u;u="0."+u}else if(++i>c)for(i-=c;i--;)u+="0";else i<c&&(u=u.slice(0,i)+"."+u.slice(i))}else u=B?"0p+0":"0";u=(16==e?"0x":2==e?"0b":8==e?"0o":"")+u}else u=j(t);return t.s<0?"-"+u:u}function P(t,e){if(t.length>e)return t.length=e,!0}function q(t){return new this(t).abs()}function X(t){return new this(t).acos()}function z(t){return new this(t).acosh()}function $(t,e){return new this(t).plus(e)}function tt(t){return new this(t).asin()}function et(t){return new this(t).asinh()}function At(t){return new this(t).atan()}function nt(t){return new this(t).atanh()}function rt(t,e){t=new this(t),e=new this(e);var A,n=this.precision,r=this.rounding,i=n+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(A=e.s<0?k(this,n,r):new this(0)).s=t.s:!t.d||e.isZero()?(A=k(this,i,1).times(.5)).s=t.s:e.s<0?(this.precision=i,this.rounding=1,A=this.atan(D(t,e,i,1)),e=k(this,i,1),this.precision=n,this.rounding=r,A=t.s<0?A.minus(e):A.plus(e)):A=this.atan(D(t,e,i,1)):(A=k(this,i,1).times(e.s>0?.25:.75)).s=t.s:A=new this(NaN),A}function it(t){return new this(t).cbrt()}function ot(t){return R(t=new this(t),t.e+1,2)}function at(t){if(!t||"object"!==typeof t)throw Error("[DecimalError] Object expected");var e,A,n,r=!0===t.defaults,i=["precision",1,1e9,"rounding",0,8,"toExpNeg",-s,0,"toExpPos",0,s,"maxE",0,s,"minE",-s,0,"modulo",0,9];for(e=0;e<i.length;e+=3)if(A=i[e],r&&(this[A]=u[A]),void 0!==(n=t[A])){if(!(h(n)===n&&n>=i[e+1]&&n<=i[e+2]))throw Error(C+A+": "+n);this[A]=n}if(A="crypto",r&&(this[A]=u[A]),void 0!==(n=t[A])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(C+A+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");this[A]=!0}else this[A]=!1}return this}function st(t){return new this(t).cos()}function gt(t){return new this(t).cosh()}function ct(t,e){return new this(t).div(e)}function It(t){return new this(t).exp()}function ut(t){return R(t=new this(t),t.e+1,3)}function lt(){var t,e,A=new this(0);for(l=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)A.d&&(A=A.plus(e.times(e)));else{if(e.s)return l=!0,new this(1/0);A=e}return l=!0,A.sqrt()}function Ct(t){return t instanceof i||t&&"[object Decimal]"===t.name||!1}function ht(t){return new this(t).ln()}function Bt(t,e){return new this(t).log(e)}function ft(t){return new this(t).log(2)}function dt(t){return new this(t).log(10)}function Qt(){return _(this,arguments,"lt")}function Et(){return _(this,arguments,"gt")}function pt(t,e){return new this(t).mod(e)}function yt(t,e){return new this(t).mul(e)}function vt(t,e){return new this(t).pow(e)}function mt(t){var e,A,n,r,i=0,o=new this(1),a=[];if(void 0===t?t=this.precision:F(t,1,1e9),n=Math.ceil(t/7),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));i<n;)(r=e[i])>=429e7?e[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=r%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(e=crypto.randomBytes(n*=4);i<n;)(r=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+((127&e[i+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,i):(a.push(r%1e7),i+=4);i=n/4}else for(;i<n;)a[i++]=1e7*Math.random()|0;for(t%=7,(n=a[--i])&&t&&(r=B(10,7-t),a[i]=(n/r|0)*r);0===a[i];i--)a.pop();if(i<0)A=0,a=[0];else{for(A=-1;0===a[0];A-=7)a.shift();for(n=1,r=a[0];r>=10;r/=10)n++;n<7&&(A-=7-n)}return o.e=A,o.d=a,o}function bt(t){return R(t=new this(t),t.e+1,this.rounding)}function Ft(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function wt(t){return new this(t).sin()}function St(t){return new this(t).sinh()}function Dt(t){return new this(t).sqrt()}function Rt(t,e){return new this(t).sub(e)}function Ut(t){return new this(t).tan()}function Gt(t){return new this(t).tanh()}function Nt(t){return R(t=new this(t),t.e+1,1)}(i=function t(e){var A,n,r;function i(t){var e,A,n,r=this;if(!(r instanceof i))return new i(t);if(r.constructor=i,t instanceof i)return r.s=t.s,void(l?!t.d||t.e>i.maxE?(r.e=NaN,r.d=null):t.e<i.minE?(r.e=0,r.d=[0]):(r.e=t.e,r.d=t.d.slice()):(r.e=t.e,r.d=t.d?t.d.slice():t.d));if("number"===(n=typeof t)){if(0===t)return r.s=1/t<0?-1:1,r.e=0,void(r.d=[0]);if(t<0?(t=-t,r.s=-1):r.s=1,t===~~t&&t<1e7){for(e=0,A=t;A>=10;A/=10)e++;return void(l?e>i.maxE?(r.e=NaN,r.d=null):e<i.minE?(r.e=0,r.d=[0]):(r.e=e,r.d=[t]):(r.e=e,r.d=[t]))}return 0*t!==0?(t||(r.s=NaN),r.e=NaN,void(r.d=null)):H(r,t.toString())}if("string"!==n)throw Error(C+t);return 45===(A=t.charCodeAt(0))?(t=t.slice(1),r.s=-1):(43===A&&(t=t.slice(1)),r.s=1),E.test(t)?H(r,t):Y(r,t)}if(i.prototype=m,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=at,i.clone=t,i.isDecimal=Ct,i.abs=q,i.acos=X,i.acosh=z,i.add=$,i.asin=tt,i.asinh=et,i.atan=At,i.atanh=nt,i.atan2=rt,i.cbrt=it,i.ceil=ot,i.cos=st,i.cosh=gt,i.div=ct,i.exp=It,i.floor=ut,i.hypot=lt,i.ln=ht,i.log=Bt,i.log10=dt,i.log2=ft,i.max=Qt,i.min=Et,i.mod=pt,i.mul=yt,i.pow=vt,i.random=mt,i.round=bt,i.sign=Ft,i.sin=wt,i.sinh=St,i.sqrt=Dt,i.sub=Rt,i.tan=Ut,i.tanh=Gt,i.trunc=Nt,void 0===e&&(e={}),e&&!0!==e.defaults)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],A=0;A<r.length;)e.hasOwnProperty(n=r[A++])||(e[n]=this[n]);return i.config(e),i}(u)).default=i.Decimal=i,c=new i(c),I=new i(I),void 0===(n=function(){return i}.call(e,A,e,t))||(t.exports=n)}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(546),r=Object(n.a)((function(t){return{box:{boxSizing:"border-box"},checkbox:{padding:"3px",color:t.palette.primaryForeground,"&:checked":{color:t.palette.primaryForeground},"& input":{height:"100%"}},slider:{color:t.palette.primaryForeground,minWidth:"60px",padding:"10px 0 6px 0"},sliderValueLabel:{"& span":{"& span":{color:t.palette.primaryBackground}}},tableContainer:{overflow:"hidden"},labelCell:{padding:"2px 8px 2px 16px"},inputCell:{padding:"2px 16px 2px 8px",overflow:"visible"},select:{"& select":{fontSize:".875rem"}}}}))},function(t,e,A){"use strict";var n=A(0),r=n.createContext();e.a=r},function(t,e,A){var n,r,i;r=[],void 0===(i="function"===typeof(n=function(){"use strict";function t(t,e,A){this.low=0|t,this.high=0|e,this.unsigned=!!A}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var A={},n={};function r(t,e){var r,i,a;return e?(a=0<=(t>>>=0)&&t<256)&&(i=n[t])?i:(r=o(t,(0|t)<0?-1:0,!0),a&&(n[t]=r),r):(a=-128<=(t|=0)&&t<128)&&(i=A[t])?i:(r=o(t,t<0?-1:0,!1),a&&(A[t]=r),r)}function i(t,e){if(isNaN(t)||!isFinite(t))return e?h:C;if(e){if(t<0)return h;if(t>=I)return E}else{if(t<=-u)return p;if(t+1>=u)return Q}return t<0?i(-t,e).neg():o(t%c|0,t/c|0,e)}function o(e,A,n){return new t(e,A,n)}t.fromInt=r,t.fromNumber=i,t.fromBits=o;var a=Math.pow;function s(t,e,A){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return C;if("number"===typeof e?(A=e,e=!1):e=!!e,(A=A||10)<2||36<A)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return s(t.substring(1),e,A).neg();for(var r=i(a(A,8)),o=C,g=0;g<t.length;g+=8){var c=Math.min(8,t.length-g),I=parseInt(t.substring(g,g+c),A);if(c<8){var u=i(a(A,c));o=o.mul(u).add(i(I))}else o=(o=o.mul(r)).add(i(I))}return o.unsigned=e,o}function g(e){return e instanceof t?e:"number"===typeof e?i(e):"string"===typeof e?s(e):o(e.low,e.high,e.unsigned)}t.fromString=s,t.fromValue=g;var c=4294967296,I=c*c,u=I/2,l=r(1<<24),C=r(0);t.ZERO=C;var h=r(0,!0);t.UZERO=h;var B=r(1);t.ONE=B;var f=r(1,!0);t.UONE=f;var d=r(-1);t.NEG_ONE=d;var Q=o(-1,2147483647,!1);t.MAX_VALUE=Q;var E=o(-1,-1,!0);t.MAX_UNSIGNED_VALUE=E;var p=o(0,-2147483648,!1);t.MIN_VALUE=p;var y=t.prototype;return y.toInt=function(){return this.unsigned?this.low>>>0:this.low},y.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},y.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(p)){var e=i(t),A=this.div(e),n=A.mul(e).sub(this);return A.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=i(a(t,6),this.unsigned),o=this,s="";;){var g=o.div(r),c=(o.sub(g.mul(r)).toInt()>>>0).toString(t);if((o=g).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},y.getHighBits=function(){return this.high},y.getHighBitsUnsigned=function(){return this.high>>>0},y.getLowBits=function(){return this.low},y.getLowBitsUnsigned=function(){return this.low>>>0},y.getNumBitsAbs=function(){if(this.isNegative())return this.eq(p)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},y.isZero=function(){return 0===this.high&&0===this.low},y.isNegative=function(){return!this.unsigned&&this.high<0},y.isPositive=function(){return this.unsigned||this.high>=0},y.isOdd=function(){return 1===(1&this.low)},y.isEven=function(){return 0===(1&this.low)},y.equals=function(t){return e(t)||(t=g(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&this.high===t.high&&this.low===t.low},y.eq=y.equals,y.notEquals=function(t){return!this.eq(t)},y.neq=y.notEquals,y.lessThan=function(t){return this.comp(t)<0},y.lt=y.lessThan,y.lessThanOrEqual=function(t){return this.comp(t)<=0},y.lte=y.lessThanOrEqual,y.greaterThan=function(t){return this.comp(t)>0},y.gt=y.greaterThan,y.greaterThanOrEqual=function(t){return this.comp(t)>=0},y.gte=y.greaterThanOrEqual,y.compare=function(t){if(e(t)||(t=g(t)),this.eq(t))return 0;var A=this.isNegative(),n=t.isNegative();return A&&!n?-1:!A&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},y.comp=y.compare,y.negate=function(){return!this.unsigned&&this.eq(p)?p:this.not().add(B)},y.neg=y.negate,y.add=function(t){e(t)||(t=g(t));var A=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,a=t.high>>>16,s=65535&t.high,c=t.low>>>16,I=0,u=0,l=0,C=0;return l+=(C+=i+(65535&t.low))>>>16,u+=(l+=r+c)>>>16,I+=(u+=n+s)>>>16,I+=A+a,o((l&=65535)<<16|(C&=65535),(I&=65535)<<16|(u&=65535),this.unsigned)},y.subtract=function(t){return e(t)||(t=g(t)),this.add(t.neg())},y.sub=y.subtract,y.multiply=function(t){if(this.isZero())return C;if(e(t)||(t=g(t)),t.isZero())return C;if(this.eq(p))return t.isOdd()?p:C;if(t.eq(p))return this.isOdd()?p:C;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(l)&&t.lt(l))return i(this.toNumber()*t.toNumber(),this.unsigned);var A=this.high>>>16,n=65535&this.high,r=this.low>>>16,a=65535&this.low,s=t.high>>>16,c=65535&t.high,I=t.low>>>16,u=65535&t.low,h=0,B=0,f=0,d=0;return f+=(d+=a*u)>>>16,B+=(f+=r*u)>>>16,f&=65535,B+=(f+=a*I)>>>16,h+=(B+=n*u)>>>16,B&=65535,h+=(B+=r*I)>>>16,B&=65535,h+=(B+=a*c)>>>16,h+=A*u+n*I+r*c+a*s,o((f&=65535)<<16|(d&=65535),(h&=65535)<<16|(B&=65535),this.unsigned)},y.mul=y.multiply,y.divide=function(t){if(e(t)||(t=g(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?h:C;var A,n,r;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return h;if(t.gt(this.shru(1)))return f;r=h}else{if(this.eq(p))return t.eq(B)||t.eq(d)?p:t.eq(p)?B:(A=this.shr(1).div(t).shl(1)).eq(C)?t.isNegative()?B:d:(n=this.sub(t.mul(A)),r=A.add(n.div(t)));if(t.eq(p))return this.unsigned?h:C;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=C}for(n=this;n.gte(t);){A=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(A)/Math.LN2),s=o<=48?1:a(2,o-48),c=i(A),I=c.mul(t);I.isNegative()||I.gt(n);)I=(c=i(A-=s,this.unsigned)).mul(t);c.isZero()&&(c=B),r=r.add(c),n=n.sub(I)}return r},y.div=y.divide,y.modulo=function(t){return e(t)||(t=g(t)),this.sub(this.div(t).mul(t))},y.mod=y.modulo,y.not=function(){return o(~this.low,~this.high,this.unsigned)},y.and=function(t){return e(t)||(t=g(t)),o(this.low&t.low,this.high&t.high,this.unsigned)},y.or=function(t){return e(t)||(t=g(t)),o(this.low|t.low,this.high|t.high,this.unsigned)},y.xor=function(t){return e(t)||(t=g(t)),o(this.low^t.low,this.high^t.high,this.unsigned)},y.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?o(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):o(0,this.low<<t-32,this.unsigned)},y.shl=y.shiftLeft,y.shiftRight=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?o(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):o(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},y.shr=y.shiftRight,y.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0===(t&=63))return this;var A=this.high;return t<32?o(this.low>>>t|A<<32-t,A>>>t,this.unsigned):o(32===t?A:A>>>t-32,0,this.unsigned)},y.shru=y.shiftRightUnsigned,y.toSigned=function(){return this.unsigned?o(this.low,this.high,!1):this},y.toUnsigned=function(){return this.unsigned?this:o(this.low,this.high,!0)},y.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},y.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},y.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})?n.apply(e,r):n)||(t.exports=i)},function(t,e,A){"use strict";A.d(e,"a",(function(){return u})),A.d(e,"b",(function(){return l}));var n=A(124),r=A(40);function i(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return o(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==A.return||A.return()}finally{if(s)throw i}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var a=Math.PI/180,s=new Float32Array(16),g=new Float32Array(12);function c(t,e,A){var n=e[0]*a,r=e[1]*a,i=e[2]*a,o=Math.sin(i),s=Math.sin(n),g=Math.sin(r),c=Math.cos(i),I=Math.cos(n),u=Math.cos(r),l=A[0],C=A[1],h=A[2];t[0]=l*u*I,t[1]=l*g*I,t[2]=l*-s,t[3]=C*(-g*c+u*s*o),t[4]=C*(u*c+g*s*o),t[5]=C*I*o,t[6]=h*(g*o+u*s*c),t[7]=h*(-u*o+g*s*c),t[8]=h*I*c}function I(t){return t[0]=t[0],t[1]=t[1],t[2]=t[2],t[3]=t[4],t[4]=t[5],t[5]=t[6],t[6]=t[8],t[7]=t[9],t[8]=t[10],t[9]=t[12],t[10]=t[13],t[11]=t[14],t.subarray(0,12)}var u={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(t,e){var A=e.startRow,r=e.endRow,o=this.props,a=o.data,u=o.getOrientation,l=o.getScale,C=o.getTranslation,h=o.getTransformMatrix,B=Array.isArray(h),f=B&&16===h.length,d=Array.isArray(l),Q=Array.isArray(u),E=Array.isArray(C),p=f||!B&&Boolean(h(a[0]));t.constant=p?f:Q&&d&&E;var y=t.value;if(t.constant){var v;if(p)s.set(h),v=I(s);else c(v=g,u,l),v.set(C,9);t.value=new Float32Array(v)}else{var m,b=A*t.size,F=Object(n.a)(a,A,r),w=F.iterable,S=F.objectInfo,D=i(w);try{for(D.s();!(m=D.n()).done;){var R=m.value;S.index++;var U=void 0;if(p)s.set(f?h:h(R,S)),U=I(s);else c(U=g,Q?u:u(R,S),d?l:l(R,S)),U.set(E?C:C(R,S),9);y[b++]=U[0],y[b++]=U[1],y[b++]=U[2],y[b++]=U[3],y[b++]=U[4],y[b++]=U[5],y[b++]=U[6],y[b++]=U[7],y[b++]=U[8],y[b++]=U[9],y[b++]=U[10],y[b++]=U[11]}}catch(G){D.e(G)}finally{D.f()}}}};function l(t,e){return e===r.a.CARTESIAN||e===r.a.METER_OFFSETS||e===r.a.DEFAULT&&!t.isGeospatial}},function(t,e,A){"use strict";(function(t,n){var r=A(21),i=A(2),o=A.n(i),a=A(8),s=A(9),g=A(15),c=A(250);A.d(e,"a",(function(){return c.a})),A.d(e,"b",(function(){return c.b})),A.d(e,"c",(function(){return c.d})),A.d(e,"d",(function(){return c.e}));function I(t){for(var e=t.length;--e>=0;)t[e]=0}var u=new Uint8Array([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]),l=new Uint8Array([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]),C=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),B=new Array(576);I(B);var f=new Array(60);I(f);var d=new Array(512);I(d);var Q=new Array(256);I(Q);var E=new Array(29);I(E);var p,y,v,m=new Array(30);function b(t,e,A,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=A,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function F(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}I(m);var w=function(t){return t<256?d[t]:d[256+(t>>>7)]},S=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},D=function(t,e,A){t.bi_valid>16-A?(t.bi_buf|=e<<t.bi_valid&65535,S(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=A-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=A)},R=function(t,e,A){D(t,A[2*e],A[2*e+1])},U=function(t,e){var A=0;do{A|=1&t,t>>>=1,A<<=1}while(--e>0);return A>>>1},G=function(t,e,A){var n,r,i=new Array(16),o=0;for(n=1;n<=15;n++)i[n]=o=o+A[n-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=U(i[a]++,a))}},N=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},k=function(t){t.bi_valid>8?S(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},x=function(t,e,A,n){var r=2*e,i=2*A;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[A]},O=function(t,e,A){for(var n=t.heap[A],r=A<<1;r<=t.heap_len&&(r<t.heap_len&&x(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!x(e,n,t.heap[r],t.depth));)t.heap[A]=t.heap[r],A=r,r<<=1;t.heap[A]=n},M=function(t,e,A){var n,r,i,o,a=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],r=t.pending_buf[t.l_buf+a],a++,0===n?R(t,r,e):(i=Q[r],R(t,i+256+1,e),0!==(o=u[i])&&(r-=E[i],D(t,r,o)),n--,i=w(n),R(t,i,A),0!==(o=l[i])&&(n-=m[i],D(t,n,o)))}while(a<t.last_lit);R(t,256,e)},L=function(t,e){var A,n,r,i=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.elems,g=-1;for(t.heap_len=0,t.heap_max=573,A=0;A<s;A++)0!==i[2*A]?(t.heap[++t.heap_len]=g=A,t.depth[A]=0):i[2*A+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=g<2?++g:0)]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=o[2*r+1]);for(e.max_code=g,A=t.heap_len>>1;A>=1;A--)O(t,i,A);r=s;do{A=t.heap[1],t.heap[1]=t.heap[t.heap_len--],O(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=A,t.heap[--t.heap_max]=n,i[2*r]=i[2*A]+i[2*n],t.depth[r]=(t.depth[A]>=t.depth[n]?t.depth[A]:t.depth[n])+1,i[2*A+1]=i[2*n+1]=r,t.heap[1]=r++,O(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var A,n,r,i,o,a,s=e.dyn_tree,g=e.max_code,c=e.stat_desc.static_tree,I=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,C=e.stat_desc.max_length,h=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(s[2*t.heap[t.heap_max]+1]=0,A=t.heap_max+1;A<573;A++)(i=s[2*s[2*(n=t.heap[A])+1]+1]+1)>C&&(i=C,h++),s[2*n+1]=i,n>g||(t.bl_count[i]++,o=0,n>=l&&(o=u[n-l]),a=s[2*n],t.opt_len+=a*(i+o),I&&(t.static_len+=a*(c[2*n+1]+o)));if(0!==h){do{for(i=C-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[C]--,h-=2}while(h>0);for(i=C;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--A])>g||(s[2*r+1]!==i&&(t.opt_len+=(i-s[2*r+1])*s[2*r],s[2*r+1]=i),n--)}}(t,e),G(i,g,t.bl_count)},_=function(t,e,A){var n,r,i=-1,o=e[1],a=0,s=7,g=4;for(0===o&&(s=138,g=3),e[2*(A+1)+1]=65535,n=0;n<=A;n++)r=o,o=e[2*(n+1)+1],++a<s&&r===o||(a<g?t.bl_tree[2*r]+=a:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,i=r,0===o?(s=138,g=3):r===o?(s=6,g=3):(s=7,g=4))},J=function(t,e,A){var n,r,i=-1,o=e[1],a=0,s=7,g=4;for(0===o&&(s=138,g=3),n=0;n<=A;n++)if(r=o,o=e[2*(n+1)+1],!(++a<s&&r===o)){if(a<g)do{R(t,r,t.bl_tree)}while(0!==--a);else 0!==r?(r!==i&&(R(t,r,t.bl_tree),a--),R(t,16,t.bl_tree),D(t,a-3,2)):a<=10?(R(t,17,t.bl_tree),D(t,a-3,3)):(R(t,18,t.bl_tree),D(t,a-11,7));a=0,i=r,0===o?(s=138,g=3):r===o?(s=6,g=3):(s=7,g=4)}},T=!1,j=function(t,e,A,n){D(t,0+(n?1:0),3),function(t,e,A,n){k(t),n&&(S(t,A),S(t,~A)),t.pending_buf.set(t.window.subarray(e,e+A),t.pending),t.pending+=A}(t,e,A,!0)},H={_tr_init:function(t){T||(!function(){var t,e,A,n,r,i=new Array(16);for(A=0,n=0;n<28;n++)for(E[n]=A,t=0;t<1<<u[n];t++)Q[A++]=n;for(Q[A-1]=n,r=0,n=0;n<16;n++)for(m[n]=r,t=0;t<1<<l[n];t++)d[r++]=n;for(r>>=7;n<30;n++)for(m[n]=r<<7,t=0;t<1<<l[n]-7;t++)d[256+r++]=n;for(e=0;e<=15;e++)i[e]=0;for(t=0;t<=143;)B[2*t+1]=8,t++,i[8]++;for(;t<=255;)B[2*t+1]=9,t++,i[9]++;for(;t<=279;)B[2*t+1]=7,t++,i[7]++;for(;t<=287;)B[2*t+1]=8,t++,i[8]++;for(G(B,287,i),t=0;t<30;t++)f[2*t+1]=5,f[2*t]=U(t,5);p=new b(B,u,257,286,15),y=new b(f,l,0,30,15),v=new b(new Array(0),C,0,19,7)}(),T=!0),t.l_desc=new F(t.dyn_ltree,p),t.d_desc=new F(t.dyn_dtree,y),t.bl_desc=new F(t.bl_tree,v),t.bi_buf=0,t.bi_valid=0,N(t)},_tr_stored_block:j,_tr_flush_block:function(t,e,A,n){var r,i,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,A=4093624447;for(e=0;e<=31;e++,A>>>=1)if(1&A&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),L(t,t.l_desc),L(t,t.d_desc),o=function(t){var e;for(_(t,t.dyn_ltree,t.l_desc.max_code),_(t,t.dyn_dtree,t.d_desc.max_code),L(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=A+5,A+4<=r&&-1!==e?j(t,e,A,n):4===t.strategy||i===r?(D(t,2+(n?1:0),3),M(t,B,f)):(D(t,4+(n?1:0),3),function(t,e,A,n){var r;for(D(t,e-257,5),D(t,A-1,5),D(t,n-4,4),r=0;r<n;r++)D(t,t.bl_tree[2*h[r]+1],3);J(t,t.dyn_ltree,e-1),J(t,t.dyn_dtree,A-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),M(t,t.dyn_ltree,t.dyn_dtree)),N(t),n&&k(t)},_tr_tally:function(t,e,A){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&A,t.last_lit++,0===e?t.dyn_ltree[2*A]++:(t.matches++,e--,t.dyn_ltree[2*(Q[A]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){D(t,2,3),R(t,256,B),function(t){16===t.bi_valid?(S(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},Y=function(t,e,A,n){for(var r=65535&t|0,i=t>>>16&65535|0,o=0;0!==A;){A-=o=A>2e3?2e3:A;do{i=i+(r=r+e[n++]|0)|0}while(--o);r%=65521,i%=65521}return r|i<<16|0},V=new Uint32Array(function(){for(var t,e=[],A=0;A<256;A++){t=A;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[A]=t}return e}()),Z=function(t,e,A,n){var r=V,i=n+A;t^=-1;for(var o=n;o<i;o++)t=t>>>8^r[255&(t^e[o])];return-1^t},W={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"},K={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_MEM_ERROR:-4,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},P=H._tr_init,q=H._tr_stored_block,X=H._tr_flush_block,z=H._tr_tally,$=H._tr_align,tt=K.Z_NO_FLUSH,et=K.Z_PARTIAL_FLUSH,At=K.Z_FULL_FLUSH,nt=K.Z_FINISH,rt=K.Z_BLOCK,it=K.Z_OK,ot=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,st=K.Z_DATA_ERROR,gt=K.Z_BUF_ERROR,ct=K.Z_DEFAULT_COMPRESSION,It=K.Z_FILTERED,ut=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,Ct=K.Z_FIXED,ht=K.Z_DEFAULT_STRATEGY,Bt=K.Z_UNKNOWN,ft=K.Z_DEFLATED,dt=function(t,e){return t.msg=W[e],e},Qt=function(t){return(t<<1)-(t>4?9:0)},Et=function(t){for(var e=t.length;--e>=0;)t[e]=0},pt=function(t,e,A){return(e<<t.hash_shift^A)&t.hash_mask},yt=function(t){var e=t.state,A=e.pending;A>t.avail_out&&(A=t.avail_out),0!==A&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+A),t.next_out),t.next_out+=A,e.pending_out+=A,t.total_out+=A,t.avail_out-=A,e.pending-=A,0===e.pending&&(e.pending_out=0))},vt=function(t,e){X(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,yt(t.strm)},mt=function(t,e){t.pending_buf[t.pending++]=e},bt=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Ft=function(t,e,A,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),A),1===t.state.wrap?t.adler=Y(t.adler,e,r,A):2===t.state.wrap&&(t.adler=Z(t.adler,e,r,A)),t.next_in+=r,t.total_in+=r,r)},wt=function(t,e){var A,n,r=t.max_chain_length,i=t.strstart,o=t.prev_length,a=t.nice_match,s=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,g=t.window,c=t.w_mask,I=t.prev,u=t.strstart+258,l=g[i+o-1],C=g[i+o];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(g[(A=e)+o]===C&&g[A+o-1]===l&&g[A]===g[i]&&g[++A]===g[i+1]){i+=2,A++;do{}while(g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&i<u);if(n=258-(u-i),i=u-258,n>o){if(t.match_start=e,o=n,n>=a)break;l=g[i+o-1],C=g[i+o]}}}while((e=I[e&c])>s&&0!==--r);return o<=t.lookahead?o:t.lookahead},St=function(t){var e,A,n,r,i,o=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=o+(o-262)){t.window.set(t.window.subarray(o,o+o),0),t.match_start-=o,t.strstart-=o,t.block_start-=o,e=A=t.hash_size;do{n=t.head[--e],t.head[e]=n>=o?n-o:0}while(--A);e=A=o;do{n=t.prev[--e],t.prev[e]=n>=o?n-o:0}while(--A);r+=o}if(0===t.strm.avail_in)break;if(A=Ft(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=A,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=pt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=pt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},Dt=function(t,e){for(var A,n;;){if(t.lookahead<262){if(St(t),t.lookahead<262&&e===tt)return 1;if(0===t.lookahead)break}if(A=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==A&&t.strstart-A<=t.w_size-262&&(t.match_length=wt(t,A)),t.match_length>=3)if(n=z(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=pt(t,t.ins_h,t.window[t.strstart+1]);else n=z(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(vt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(vt(t,!1),0===t.strm.avail_out)?1:2},Rt=function(t,e){for(var A,n,r;;){if(t.lookahead<262){if(St(t),t.lookahead<262&&e===tt)return 1;if(0===t.lookahead)break}if(A=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==A&&t.prev_length<t.max_lazy_match&&t.strstart-A<=t.w_size-262&&(t.match_length=wt(t,A),t.match_length<=5&&(t.strategy===It||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=z(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(vt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=z(t,0,t.window[t.strstart-1]))&&vt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=z(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(vt(t,!1),0===t.strm.avail_out)?1:2};function Ut(t,e,A,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=A,this.max_chain=n,this.func=r}var Gt=[new Ut(0,0,0,0,(function(t,e){var A=65535;for(A>t.pending_buf_size-5&&(A=t.pending_buf_size-5);;){if(t.lookahead<=1){if(St(t),0===t.lookahead&&e===tt)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+A;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,vt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(vt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(vt(t,!1),t.strm.avail_out),1)})),new Ut(4,4,8,4,Dt),new Ut(4,5,16,8,Dt),new Ut(4,6,32,32,Dt),new Ut(4,4,16,16,Rt),new Ut(8,16,32,32,Rt),new Ut(8,16,128,128,Rt),new Ut(8,32,128,256,Rt),new Ut(32,128,258,1024,Rt),new Ut(32,258,258,4096,Rt)];function Nt(){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=ft,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 Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Et(this.dyn_ltree),Et(this.dyn_dtree),Et(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Et(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Et(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}var kt=function(t){if(!t||!t.state)return dt(t,at);t.total_in=t.total_out=0,t.data_type=Bt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=tt,P(e),it},xt=function(t){var e,A=kt(t);return A===it&&((e=t.state).window_size=2*e.w_size,Et(e.head),e.max_lazy_match=Gt[e.level].max_lazy,e.good_match=Gt[e.level].good_length,e.nice_match=Gt[e.level].nice_length,e.max_chain_length=Gt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),A},Ot=function(t,e,A,n,r,i){if(!t)return at;var o=1;if(e===ct&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>9||A!==ft||n<8||n>15||e<0||e>9||i<0||i>Ct)return dt(t,at);8===n&&(n=9);var a=new Nt;return t.state=a,a.strm=t,a.wrap=o,a.gzhead=null,a.w_bits=n,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=r+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<r+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=e,a.strategy=i,a.method=A,xt(t)},Mt={deflateInit:function(t,e){return Ot(t,e,ft,15,8,ht)},deflateInit2:Ot,deflateReset:xt,deflateResetKeep:kt,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?at:(t.state.gzhead=e,it):at},deflate:function(t,e){var A,n;if(!t||!t.state||e>rt||e<0)return t?dt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||666===r.status&&e!==nt)return dt(t,0===t.avail_out?gt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.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>=ut||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&&(t.adler=Z(t.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>=ut||r.level<2?4:0),mt(r,3),r.status=113);else{var o=ft+(r.w_bits-8<<4)<<8;o|=(r.strategy>=ut||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,bt(r,o),0!==r.strstart&&(bt(r,t.adler>>>16),bt(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(A=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),yt(t),A=r.pending,r.pending!==r.pending_buf_size));)mt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){A=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),yt(t),A=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,mt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){A=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),yt(t),A=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,mt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>A&&(t.adler=Z(t.adler,r.pending_buf,r.pending-A,A)),0===n&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&yt(t),r.pending+2<=r.pending_buf_size&&(mt(r,255&t.adler),mt(r,t.adler>>8&255),t.adler=0,r.status=113)):r.status=113),0!==r.pending){if(yt(t),0===t.avail_out)return r.last_flush=-1,it}else if(0===t.avail_in&&Qt(e)<=Qt(i)&&e!==nt)return dt(t,gt);if(666===r.status&&0!==t.avail_in)return dt(t,gt);if(0!==t.avail_in||0!==r.lookahead||e!==tt&&666!==r.status){var a=r.strategy===ut?function(t,e){for(var A;;){if(0===t.lookahead&&(St(t),0===t.lookahead)){if(e===tt)return 1;break}if(t.match_length=0,A=z(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,A&&(vt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(vt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===lt?function(t,e){for(var A,n,r,i,o=t.window;;){if(t.lookahead<=258){if(St(t),t.lookahead<=258&&e===tt)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=o[r=t.strstart-1])===o[++r]&&n===o[++r]&&n===o[++r]){i=t.strstart+258;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<i);t.match_length=258-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(A=z(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(A=z(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),A&&(vt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===nt?(vt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(vt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Gt[r.level].func(r,e);if(3!==a&&4!==a||(r.status=666),1===a||3===a)return 0===t.avail_out&&(r.last_flush=-1),it;if(2===a&&(e===et?$(r):e!==rt&&(q(r,0,0,!1),e===At&&(Et(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),yt(t),0===t.avail_out))return r.last_flush=-1,it}return e!==nt?it:r.wrap<=0?ot:(2===r.wrap?(mt(r,255&t.adler),mt(r,t.adler>>8&255),mt(r,t.adler>>16&255),mt(r,t.adler>>24&255),mt(r,255&t.total_in),mt(r,t.total_in>>8&255),mt(r,t.total_in>>16&255),mt(r,t.total_in>>24&255)):(bt(r,t.adler>>>16),bt(r,65535&t.adler)),yt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?it:ot)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?dt(t,at):(t.state=null,113===e?dt(t,st):it)},deflateSetDictionary:function(t,e){var A=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=Y(t.adler,e,A,0)),n.wrap=0,A>=n.w_size){0===r&&(Et(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(A-n.w_size,A),0),e=i,A=n.w_size}var o=t.avail_in,a=t.next_in,s=t.input;for(t.avail_in=A,t.next_in=0,t.input=e,St(n);n.lookahead>=3;){var g=n.strstart,c=n.lookahead-2;do{n.ins_h=pt(n,n.ins_h,n.window[g+3-1]),n.prev[g&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=g,g++}while(--c);n.strstart=g,n.lookahead=2,St(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,t.next_in=a,t.input=s,t.avail_in=o,n.wrap=r,it},deflateInfo:"pako deflate (from Nodeca project)"},Lt=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},_t=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var A=e.shift();if(A){if("object"!==typeof A)throw new TypeError(A+"must be non-object");for(var n in A)Lt(A,n)&&(t[n]=A[n])}}return t},Jt=function(t){for(var e=0,A=0,n=t.length;A<n;A++)e+=t[A].length;for(var r=new Uint8Array(e),i=0,o=0,a=t.length;i<a;i++){var s=t[i];r.set(s,o),o+=s.length}return r},Tt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(oA){Tt=!1}for(var jt=new Uint8Array(256),Ht=0;Ht<256;Ht++)jt[Ht]=Ht>=252?6:Ht>=248?5:Ht>=240?4:Ht>=224?3:Ht>=192?2:1;jt[254]=jt[254]=1;var Yt=function(t){var e,A,n,r,i,o=t.length,a=0;for(r=0;r<o;r++)55296===(64512&(A=t.charCodeAt(r)))&&r+1<o&&56320===(64512&(n=t.charCodeAt(r+1)))&&(A=65536+(A-55296<<10)+(n-56320),r++),a+=A<128?1:A<2048?2:A<65536?3:4;for(e=new Uint8Array(a),i=0,r=0;i<a;r++)55296===(64512&(A=t.charCodeAt(r)))&&r+1<o&&56320===(64512&(n=t.charCodeAt(r+1)))&&(A=65536+(A-55296<<10)+(n-56320),r++),A<128?e[i++]=A:A<2048?(e[i++]=192|A>>>6,e[i++]=128|63&A):A<65536?(e[i++]=224|A>>>12,e[i++]=128|A>>>6&63,e[i++]=128|63&A):(e[i++]=240|A>>>18,e[i++]=128|A>>>12&63,e[i++]=128|A>>>6&63,e[i++]=128|63&A);return e},Vt=function(t,e){var A,n,r=e||t.length,i=new Array(2*r);for(n=0,A=0;A<r;){var o=t[A++];if(o<128)i[n++]=o;else{var a=jt[o];if(a>4)i[n++]=65533,A+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&A<r;)o=o<<6|63&t[A++],a--;a>1?i[n++]=65533:o<65536?i[n++]=o:(o-=65536,i[n++]=55296|o>>10&1023,i[n++]=56320|1023&o)}}}return function(t,e){if(e<65534&&t.subarray&&Tt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));for(var A="",n=0;n<e;n++)A+=String.fromCharCode(t[n]);return A}(i,n)},Zt=function(t,e){(e=e||t.length)>t.length&&(e=t.length);for(var A=e-1;A>=0&&128===(192&t[A]);)A--;return A<0||0===A?e:A+jt[t[A]]>e?A:e};var Wt=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},Kt=Object.prototype.toString,Pt=K.Z_NO_FLUSH,qt=K.Z_SYNC_FLUSH,Xt=K.Z_FULL_FLUSH,zt=K.Z_FINISH,$t=K.Z_OK,te=K.Z_STREAM_END,ee=K.Z_DEFAULT_COMPRESSION,Ae=K.Z_DEFAULT_STRATEGY,ne=K.Z_DEFLATED;function re(t){this.options=_t({level:ee,method:ne,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ae},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Wt,this.strm.avail_out=0;var A=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(A!==$t)throw new Error(W[A]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"===typeof e.dictionary?Yt(e.dictionary):"[object ArrayBuffer]"===Kt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(A=Mt.deflateSetDictionary(this.strm,n))!==$t)throw new Error(W[A]);this._dict_set=!0}}function ie(t,e){var A=new re(e);if(A.push(t,!0),A.err)throw A.msg||W[A.err];return A.result}re.prototype.push=function(t,e){var A,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?zt:Pt,"string"===typeof t?r.input=Yt(t):"[object ArrayBuffer]"===Kt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===qt||n===Xt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((A=Mt.deflate(r,n))===te)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),A=Mt.deflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===$t;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},re.prototype.onData=function(t){this.chunks.push(t)},re.prototype.onEnd=function(t){t===$t&&(this.result=Jt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var oe={Deflate:re,deflate:ie,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ie(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ie(t,e)},constants:K},ae=function(t,e){var A,n,r,i,o,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F=t.state;A=t.next_in,m=t.input,n=A+(t.avail_in-5),r=t.next_out,b=t.output,i=r-(e-t.avail_out),o=r+(t.avail_out-257),a=F.dmax,s=F.wsize,g=F.whave,c=F.wnext,I=F.window,u=F.hold,l=F.bits,C=F.lencode,h=F.distcode,B=(1<<F.lenbits)-1,f=(1<<F.distbits)-1;t:do{l<15&&(u+=m[A++]<<l,l+=8,u+=m[A++]<<l,l+=8),d=C[u&B];e:for(;;){if(u>>>=Q=d>>>24,l-=Q,0===(Q=d>>>16&255))b[r++]=65535&d;else{if(!(16&Q)){if(0===(64&Q)){d=C[(65535&d)+(u&(1<<Q)-1)];continue e}if(32&Q){F.mode=12;break t}t.msg="invalid literal/length code",F.mode=30;break t}E=65535&d,(Q&=15)&&(l<Q&&(u+=m[A++]<<l,l+=8),E+=u&(1<<Q)-1,u>>>=Q,l-=Q),l<15&&(u+=m[A++]<<l,l+=8,u+=m[A++]<<l,l+=8),d=h[u&f];A:for(;;){if(u>>>=Q=d>>>24,l-=Q,!(16&(Q=d>>>16&255))){if(0===(64&Q)){d=h[(65535&d)+(u&(1<<Q)-1)];continue A}t.msg="invalid distance code",F.mode=30;break t}if(p=65535&d,l<(Q&=15)&&(u+=m[A++]<<l,(l+=8)<Q&&(u+=m[A++]<<l,l+=8)),(p+=u&(1<<Q)-1)>a){t.msg="invalid distance too far back",F.mode=30;break t}if(u>>>=Q,l-=Q,p>(Q=r-i)){if((Q=p-Q)>g&&F.sane){t.msg="invalid distance too far back",F.mode=30;break t}if(y=0,v=I,0===c){if(y+=s-Q,Q<E){E-=Q;do{b[r++]=I[y++]}while(--Q);y=r-p,v=b}}else if(c<Q){if(y+=s+c-Q,(Q-=c)<E){E-=Q;do{b[r++]=I[y++]}while(--Q);if(y=0,c<E){E-=Q=c;do{b[r++]=I[y++]}while(--Q);y=r-p,v=b}}}else if(y+=c-Q,Q<E){E-=Q;do{b[r++]=I[y++]}while(--Q);y=r-p,v=b}for(;E>2;)b[r++]=v[y++],b[r++]=v[y++],b[r++]=v[y++],E-=3;E&&(b[r++]=v[y++],E>1&&(b[r++]=v[y++]))}else{y=r-p;do{b[r++]=b[y++],b[r++]=b[y++],b[r++]=b[y++],E-=3}while(E>2);E&&(b[r++]=b[y++],E>1&&(b[r++]=b[y++]))}break}}break}}while(A<n&&r<o);A-=E=l>>3,u&=(1<<(l-=E<<3))-1,t.next_in=A,t.next_out=r,t.avail_in=A<n?n-A+5:5-(A-n),t.avail_out=r<o?o-r+257:257-(r-o),F.hold=u,F.bits=l},se=new Uint16Array([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]),ge=new Uint8Array([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]),ce=new Uint16Array([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]),Ie=new Uint8Array([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]),ue=function(t,e,A,n,r,i,o,a){var s,g,c,I,u,l,C,h,B,f=a.bits,d=0,Q=0,E=0,p=0,y=0,v=0,m=0,b=0,F=0,w=0,S=null,D=0,R=new Uint16Array(16),U=new Uint16Array(16),G=null,N=0;for(d=0;d<=15;d++)R[d]=0;for(Q=0;Q<n;Q++)R[e[A+Q]]++;for(y=f,p=15;p>=1&&0===R[p];p--);if(y>p&&(y=p),0===p)return r[i++]=20971520,r[i++]=20971520,a.bits=1,0;for(E=1;E<p&&0===R[E];E++);for(y<E&&(y=E),b=1,d=1;d<=15;d++)if(b<<=1,(b-=R[d])<0)return-1;if(b>0&&(0===t||1!==p))return-1;for(U[1]=0,d=1;d<15;d++)U[d+1]=U[d]+R[d];for(Q=0;Q<n;Q++)0!==e[A+Q]&&(o[U[e[A+Q]]++]=Q);if(0===t?(S=G=o,l=19):1===t?(S=se,D-=257,G=ge,N-=257,l=256):(S=ce,G=Ie,l=-1),w=0,Q=0,d=E,u=i,v=y,m=0,c=-1,I=(F=1<<y)-1,1===t&&F>852||2===t&&F>592)return 1;for(;;){C=d-m,o[Q]<l?(h=0,B=o[Q]):o[Q]>l?(h=G[N+o[Q]],B=S[D+o[Q]]):(h=96,B=0),s=1<<d-m,E=g=1<<v;do{r[u+(w>>m)+(g-=s)]=C<<24|h<<16|B|0}while(0!==g);for(s=1<<d-1;w&s;)s>>=1;if(0!==s?(w&=s-1,w+=s):w=0,Q++,0===--R[d]){if(d===p)break;d=e[A+o[Q]]}if(d>y&&(w&I)!==c){for(0===m&&(m=y),u+=E,b=1<<(v=d-m);v+m<p&&!((b-=R[v+m])<=0);)v++,b<<=1;if(F+=1<<v,1===t&&F>852||2===t&&F>592)return 1;r[c=w&I]=y<<24|v<<16|u-i|0}}return 0!==w&&(r[u+w]=d-m<<24|64<<16|0),a.bits=y,0},le=K.Z_FINISH,Ce=K.Z_BLOCK,he=K.Z_TREES,Be=K.Z_OK,fe=K.Z_STREAM_END,de=K.Z_NEED_DICT,Qe=K.Z_STREAM_ERROR,Ee=K.Z_DATA_ERROR,pe=K.Z_MEM_ERROR,ye=K.Z_BUF_ERROR,ve=K.Z_DEFLATED,me=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function be(){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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Fe,we,Se=function(t){if(!t||!t.state)return Qe;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,Be},De=function(t){if(!t||!t.state)return Qe;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Se(t)},Re=function(t,e){var A;if(!t||!t.state)return Qe;var n=t.state;return e<0?(A=0,e=-e):(A=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Qe:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=A,n.wbits=e,De(t))},Ue=function(t,e){if(!t)return Qe;var A=new be;t.state=A,A.window=null;var n=Re(t,e);return n!==Be&&(t.state=null),n},Ge=!0,Ne=function(t){if(Ge){Fe=new Int32Array(512),we=new Int32Array(32);for(var e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ue(1,t.lens,0,288,Fe,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ue(2,t.lens,0,32,we,0,t.work,{bits:5}),Ge=!1}t.lencode=Fe,t.lenbits=9,t.distcode=we,t.distbits=5},ke=function(t,e,A,n){var r,i=t.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),n>=i.wsize?(i.window.set(e.subarray(A-i.wsize,A),0),i.wnext=0,i.whave=i.wsize):((r=i.wsize-i.wnext)>n&&(r=n),i.window.set(e.subarray(A-n,A-n+r),i.wnext),(n-=r)?(i.window.set(e.subarray(A-n,A),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=r,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=r))),0},xe={inflateReset:De,inflateReset2:Re,inflateResetKeep:Se,inflateInit:function(t){return Ue(t,15)},inflateInit2:Ue,inflate:function(t,e){var A,n,r,i,o,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F=0,w=new Uint8Array(4),S=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return Qe;12===(A=t.state).mode&&(A.mode=13),o=t.next_out,r=t.output,s=t.avail_out,i=t.next_in,n=t.input,a=t.avail_in,g=A.hold,c=A.bits,I=a,u=s,v=Be;t:for(;;)switch(A.mode){case 1:if(0===A.wrap){A.mode=13;break}for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(2&A.wrap&&35615===g){A.check=0,w[0]=255&g,w[1]=g>>>8&255,A.check=Z(A.check,w,2,0),g=0,c=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",A.mode=30;break}if((15&g)!==ve){t.msg="unknown compression method",A.mode=30;break}if(c-=4,y=8+(15&(g>>>=4)),0===A.wbits)A.wbits=y;else if(y>A.wbits){t.msg="invalid window size",A.mode=30;break}A.dmax=1<<A.wbits,t.adler=A.check=1,A.mode=512&g?10:12,g=0,c=0;break;case 2:for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(A.flags=g,(255&A.flags)!==ve){t.msg="unknown compression method",A.mode=30;break}if(57344&A.flags){t.msg="unknown header flags set",A.mode=30;break}A.head&&(A.head.text=g>>8&1),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=Z(A.check,w,2,0)),g=0,c=0,A.mode=3;case 3:for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.head&&(A.head.time=g),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,w[2]=g>>>16&255,w[3]=g>>>24&255,A.check=Z(A.check,w,4,0)),g=0,c=0,A.mode=4;case 4:for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.head&&(A.head.xflags=255&g,A.head.os=g>>8),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=Z(A.check,w,2,0)),g=0,c=0,A.mode=5;case 5:if(1024&A.flags){for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.length=g,A.head&&(A.head.extra_len=g),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=Z(A.check,w,2,0)),g=0,c=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&((l=A.length)>a&&(l=a),l&&(A.head&&(y=A.head.extra_len-A.length,A.head.extra||(A.head.extra=new Uint8Array(A.head.extra_len)),A.head.extra.set(n.subarray(i,i+l),y)),512&A.flags&&(A.check=Z(A.check,n,l,i)),a-=l,i+=l,A.length-=l),A.length))break t;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(0===a)break t;l=0;do{y=n[i+l++],A.head&&y&&A.length<65536&&(A.head.name+=String.fromCharCode(y))}while(y&&l<a);if(512&A.flags&&(A.check=Z(A.check,n,l,i)),a-=l,i+=l,y)break t}else A.head&&(A.head.name=null);A.length=0,A.mode=8;case 8:if(4096&A.flags){if(0===a)break t;l=0;do{y=n[i+l++],A.head&&y&&A.length<65536&&(A.head.comment+=String.fromCharCode(y))}while(y&&l<a);if(512&A.flags&&(A.check=Z(A.check,n,l,i)),a-=l,i+=l,y)break t}else A.head&&(A.head.comment=null);A.mode=9;case 9:if(512&A.flags){for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g!==(65535&A.check)){t.msg="header crc mismatch",A.mode=30;break}g=0,c=0}A.head&&(A.head.hcrc=A.flags>>9&1,A.head.done=!0),t.adler=A.check=0,A.mode=12;break;case 10:for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}t.adler=A.check=me(g),g=0,c=0,A.mode=11;case 11:if(0===A.havedict)return t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,de;t.adler=A.check=1,A.mode=12;case 12:if(e===Ce||e===he)break t;case 13:if(A.last){g>>>=7&c,c-=7&c,A.mode=27;break}for(;c<3;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}switch(A.last=1&g,c-=1,3&(g>>>=1)){case 0:A.mode=14;break;case 1:if(Ne(A),A.mode=20,e===he){g>>>=2,c-=2;break t}break;case 2:A.mode=17;break;case 3:t.msg="invalid block type",A.mode=30}g>>>=2,c-=2;break;case 14:for(g>>>=7&c,c-=7&c;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if((65535&g)!==(g>>>16^65535)){t.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&g,g=0,c=0,A.mode=15,e===he)break t;case 15:A.mode=16;case 16:if(l=A.length){if(l>a&&(l=a),l>s&&(l=s),0===l)break t;r.set(n.subarray(i,i+l),o),a-=l,i+=l,s-=l,o+=l,A.length-=l;break}A.mode=12;break;case 17:for(;c<14;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(A.nlen=257+(31&g),g>>>=5,c-=5,A.ndist=1+(31&g),g>>>=5,c-=5,A.ncode=4+(15&g),g>>>=4,c-=4,A.nlen>286||A.ndist>30){t.msg="too many length or distance symbols",A.mode=30;break}A.have=0,A.mode=18;case 18:for(;A.have<A.ncode;){for(;c<3;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.lens[S[A.have++]]=7&g,g>>>=3,c-=3}for(;A.have<19;)A.lens[S[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,m={bits:A.lenbits},v=ue(0,A.lens,0,19,A.lencode,0,A.work,m),A.lenbits=m.bits,v){t.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have<A.nlen+A.ndist;){for(;f=(F=A.lencode[g&(1<<A.lenbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(d<16)g>>>=B,c-=B,A.lens[A.have++]=d;else{if(16===d){for(b=B+2;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g>>>=B,c-=B,0===A.have){t.msg="invalid bit length repeat",A.mode=30;break}y=A.lens[A.have-1],l=3+(3&g),g>>>=2,c-=2}else if(17===d){for(b=B+3;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}c-=B,y=0,l=3+(7&(g>>>=B)),g>>>=3,c-=3}else{for(b=B+7;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}c-=B,y=0,l=11+(127&(g>>>=B)),g>>>=7,c-=7}if(A.have+l>A.nlen+A.ndist){t.msg="invalid bit length repeat",A.mode=30;break}for(;l--;)A.lens[A.have++]=y}}if(30===A.mode)break;if(0===A.lens[256]){t.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,m={bits:A.lenbits},v=ue(1,A.lens,0,A.nlen,A.lencode,0,A.work,m),A.lenbits=m.bits,v){t.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,m={bits:A.distbits},v=ue(2,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,m),A.distbits=m.bits,v){t.msg="invalid distances set",A.mode=30;break}if(A.mode=20,e===he)break t;case 20:A.mode=21;case 21:if(a>=6&&s>=258){t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,ae(t,u),o=t.next_out,r=t.output,s=t.avail_out,i=t.next_in,n=t.input,a=t.avail_in,g=A.hold,c=A.bits,12===A.mode&&(A.back=-1);break}for(A.back=0;f=(F=A.lencode[g&(1<<A.lenbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(f&&0===(240&f)){for(Q=B,E=f,p=d;f=(F=A.lencode[p+((g&(1<<Q+E)-1)>>Q)])>>>16&255,d=65535&F,!(Q+(B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}g>>>=Q,c-=Q,A.back+=Q}if(g>>>=B,c-=B,A.back+=B,A.length=d,0===f){A.mode=26;break}if(32&f){A.back=-1,A.mode=12;break}if(64&f){t.msg="invalid literal/length code",A.mode=30;break}A.extra=15&f,A.mode=22;case 22:if(A.extra){for(b=A.extra;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.length+=g&(1<<A.extra)-1,g>>>=A.extra,c-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;f=(F=A.distcode[g&(1<<A.distbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(0===(240&f)){for(Q=B,E=f,p=d;f=(F=A.distcode[p+((g&(1<<Q+E)-1)>>Q)])>>>16&255,d=65535&F,!(Q+(B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}g>>>=Q,c-=Q,A.back+=Q}if(g>>>=B,c-=B,A.back+=B,64&f){t.msg="invalid distance code",A.mode=30;break}A.offset=d,A.extra=15&f,A.mode=24;case 24:if(A.extra){for(b=A.extra;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.offset+=g&(1<<A.extra)-1,g>>>=A.extra,c-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){t.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(0===s)break t;if(l=u-s,A.offset>l){if((l=A.offset-l)>A.whave&&A.sane){t.msg="invalid distance too far back",A.mode=30;break}l>A.wnext?(l-=A.wnext,C=A.wsize-l):C=A.wnext-l,l>A.length&&(l=A.length),h=A.window}else h=r,C=o-A.offset,l=A.length;l>s&&(l=s),s-=l,A.length-=l;do{r[o++]=h[C++]}while(--l);0===A.length&&(A.mode=21);break;case 26:if(0===s)break t;r[o++]=A.length,s--,A.mode=21;break;case 27:if(A.wrap){for(;c<32;){if(0===a)break t;a--,g|=n[i++]<<c,c+=8}if(u-=s,t.total_out+=u,A.total+=u,u&&(t.adler=A.check=A.flags?Z(A.check,r,u,o-u):Y(A.check,r,u,o-u)),u=s,(A.flags?g:me(g))!==A.check){t.msg="incorrect data check",A.mode=30;break}g=0,c=0}A.mode=28;case 28:if(A.wrap&&A.flags){for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g!==(4294967295&A.total)){t.msg="incorrect length check",A.mode=30;break}g=0,c=0}A.mode=29;case 29:v=fe;break t;case 30:v=Ee;break t;case 31:return pe;case 32:default:return Qe}return t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,(A.wsize||u!==t.avail_out&&A.mode<30&&(A.mode<27||e!==le))&&ke(t,t.output,t.next_out,u-t.avail_out),I-=t.avail_in,u-=t.avail_out,t.total_in+=I,t.total_out+=u,A.total+=u,A.wrap&&u&&(t.adler=A.check=A.flags?Z(A.check,r,u,t.next_out-u):Y(A.check,r,u,t.next_out-u)),t.data_type=A.bits+(A.last?64:0)+(12===A.mode?128:0)+(20===A.mode||15===A.mode?256:0),(0===I&&0===u||e===le)&&v===Be&&(v=ye),v},inflateEnd:function(t){if(!t||!t.state)return Qe;var e=t.state;return e.window&&(e.window=null),t.state=null,Be},inflateGetHeader:function(t,e){if(!t||!t.state)return Qe;var A=t.state;return 0===(2&A.wrap)?Qe:(A.head=e,e.done=!1,Be)},inflateSetDictionary:function(t,e){var A,n=e.length;return t&&t.state?0!==(A=t.state).wrap&&11!==A.mode?Qe:11===A.mode&&Y(1,e,n,0)!==A.check?Ee:ke(t,e,n,n)?(A.mode=31,pe):(A.havedict=1,Be):Qe},inflateInfo:"pako inflate (from Nodeca project)"};var Oe=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},Me=Object.prototype.toString,Le=K.Z_NO_FLUSH,_e=K.Z_FINISH,Je=K.Z_OK,Te=K.Z_STREAM_END,je=K.Z_NEED_DICT,He=K.Z_STREAM_ERROR,Ye=K.Z_DATA_ERROR,Ve=K.Z_MEM_ERROR;function Ze(t){this.options=_t({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Wt,this.strm.avail_out=0;var A=xe.inflateInit2(this.strm,e.windowBits);if(A!==Je)throw new Error(W[A]);if(this.header=new Oe,xe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"===typeof e.dictionary?e.dictionary=Yt(e.dictionary):"[object ArrayBuffer]"===Me.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(A=xe.inflateSetDictionary(this.strm,e.dictionary))!==Je))throw new Error(W[A])}function We(t,e){var A=new Ze(e);if(A.push(t),A.err)throw A.msg||W[A.err];return A.result}Ze.prototype.push=function(t,e){var A,n,r,i=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(n=e===~~e?e:!0===e?_e:Le,"[object ArrayBuffer]"===Me.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(A=xe.inflate(i,n))===je&&a&&((A=xe.inflateSetDictionary(i,a))===Je?A=xe.inflate(i,n):A===Ye&&(A=je));i.avail_in>0&&A===Te&&i.state.wrap>0&&0!==t[i.next_in];)xe.inflateReset(i),A=xe.inflate(i,n);switch(A){case He:case Ye:case je:case Ve:return this.onEnd(A),this.ended=!0,!1}if(r=i.avail_out,i.next_out&&(0===i.avail_out||A===Te))if("string"===this.options.to){var s=Zt(i.output,i.next_out),g=i.next_out-s,c=Vt(i.output,s);i.next_out=g,i.avail_out=o-g,g&&i.output.set(i.output.subarray(s,s+g),0),this.onData(c)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(A!==Je||0!==r){if(A===Te)return A=xe.inflateEnd(this.strm),this.onEnd(A),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},Ze.prototype.onData=function(t){this.chunks.push(t)},Ze.prototype.onEnd=function(t){t===Je&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Jt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ke={Inflate:Ze,inflate:We,inflateRaw:function(t,e){return(e=e||{}).raw=!0,We(t,e)},ungzip:We,constants:K},Pe={Deflate:oe.Deflate,deflate:oe.deflate,deflateRaw:oe.deflateRaw,gzip:oe.gzip,Inflate:Ke.Inflate,inflate:Ke.inflate,inflateRaw:Ke.inflateRaw,ungzip:Ke.ungzip,constants:K},qe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(Object(s.a)(this,t),e<0||e>9)throw new Error("Invalid gzip compression level, it should be between 0 and 9");this.level=e}return Object(g.a)(t,[{key:"encode",value:function(t){return Pe.gzip(t,{level:this.level})}},{key:"decode",value:function(t,e){var A=Pe.ungzip(t);return void 0!==e?(e.set(A),e):A}}],[{key:"fromConfig",value:function(e){return new t(e.level)}}]),t}();qe.codecId="gzip";var Xe=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(Object(s.a)(this,t),e<-1||e>9)throw new Error("Invalid zlib compression level, it should be between -1 and 9");this.level=e}return Object(g.a)(t,[{key:"encode",value:function(t){return Pe.deflate(t,{level:this.level})}},{key:"decode",value:function(t,e){var A=Pe.inflate(t);return void 0!==e?(e.set(A),e):A}}],[{key:"fromConfig",value:function(e){return new t(e.level)}}]),t}();Xe.codecId="zlib";var ze="undefined"!==typeof t&&null!=t.versions&&null!=t.versions.node?function(t){return new Uint8Array(n.from(t,"base64"))}:function(){for(var t=new Uint8Array(128),e=0;e<64;e++)t[e<26?e+65:e<52?e+71:e<62?e-4:4*e-205]=e;return function(e){for(var A=e.length,n=new Uint8Array(3*(A-("="==e[A-1])-("="==e[A-2]))/4|0),r=0,i=0;r<A;){var o=t[e.charCodeAt(r++)],a=t[e.charCodeAt(r++)],s=t[e.charCodeAt(r++)],g=t[e.charCodeAt(r++)];n[i++]=o<<2|a>>4,n[i++]=a<<4|s>>2,n[i++]=s<<6|g}return n}}();function $e(t,e){return t({noInitialRun:!0,wasmBinary:ze(e)})}var tA,eA=function(){"undefined"!==typeof document&&document.currentScript&&document.currentScript.src;return function(t){var e,A,n;t=t||{},e||(e="undefined"!==typeof t?t:{}),e.ready=new Promise((function(t,e){A=t,n=e}));var r,i={};for(r in e)e.hasOwnProperty(r)&&(i[r]=e[r]);var o,a="./this.program",s=e.print||console.log.bind(console),g=e.printErr||console.warn.bind(console);for(r in i)i.hasOwnProperty(r)&&(e[r]=i[r]);i=null,e.thisProgram&&(a=e.thisProgram),e.wasmBinary&&(o=e.wasmBinary),e.noExitRuntime&&e.noExitRuntime,"object"!==typeof WebAssembly&&J("no native wasm support detected");var c,I=!1,u="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function l(t,e,A){var n=e+A;for(A=e;t[A]&&!(A>=n);)++A;if(16<A-e&&t.subarray&&u)return u.decode(t.subarray(e,A));for(n="";e<A;){var r=t[e++];if(128&r){var i=63&t[e++];if(192==(224&r))n+=String.fromCharCode((31&r)<<6|i);else{var o=63&t[e++];65536>(r=224==(240&r)?(15&r)<<12|i<<6|o:(7&r)<<18|i<<12|o<<6|63&t[e++])?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r))}}else n+=String.fromCharCode(r)}return n}var C,h,B,f,d,Q,E,p,y,v="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function m(t,e){for(var A=t>>1,n=A+e/2;!(A>=n)&&d[A];)++A;if(32<(A<<=1)-t&&v)return v.decode(B.subarray(t,A));for(A=0,n="";;){var r=f[t+2*A>>1];if(0==r||A==e/2)return n;++A,n+=String.fromCharCode(r)}}function b(t,e,A){if(void 0===A&&(A=2147483647),2>A)return 0;var n=e;A=(A-=2)<2*t.length?A/2:t.length;for(var r=0;r<A;++r)f[e>>1]=t.charCodeAt(r),e+=2;return f[e>>1]=0,e-n}function F(t){return 2*t.length}function w(t,e){for(var A=0,n="";!(A>=e/4);){var r=Q[t+4*A>>2];if(0==r)break;++A,65536<=r?(r-=65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r)):n+=String.fromCharCode(r)}return n}function S(t,e,A){if(void 0===A&&(A=2147483647),4>A)return 0;var n=e;A=n+A-4;for(var r=0;r<t.length;++r){var i=t.charCodeAt(r);if(55296<=i&&57343>=i)i=65536+((1023&i)<<10)|1023&t.charCodeAt(++r);if(Q[e>>2]=i,(e+=4)+4>A)break}return Q[e>>2]=0,e-n}function D(t){for(var e=0,A=0;A<t.length;++A){var n=t.charCodeAt(A);55296<=n&&57343>=n&&++A,e+=4}return e}function R(t){C=t,e.HEAP8=h=new Int8Array(t),e.HEAP16=f=new Int16Array(t),e.HEAP32=Q=new Int32Array(t),e.HEAPU8=B=new Uint8Array(t),e.HEAPU16=d=new Uint16Array(t),e.HEAPU32=E=new Uint32Array(t),e.HEAPF32=p=new Float32Array(t),e.HEAPF64=y=new Float64Array(t)}var U=e.INITIAL_MEMORY||16777216;(c=e.wasmMemory?e.wasmMemory:new WebAssembly.Memory({initial:U/65536,maximum:32768}))&&(C=c.buffer),U=C.byteLength,R(C);var G,N=[],k=[],x=[],O=[];function M(){var t=e.preRun.shift();N.unshift(t)}var L=0,_=null;function J(t){throw e.onAbort&&e.onAbort(t),g(t),I=!0,t=new WebAssembly.RuntimeError("abort("+t+"). Build with -s ASSERTIONS=1 for more info."),n(t),t}function T(t){var e=H;return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}function j(){return T("data:application/octet-stream;base64,")}e.preloadedImages={},e.preloadedAudios={};var H="blosc_codec.wasm";if(!j()){var Y=H;H=e.locateFile?e.locateFile(Y,""):""+Y}function V(){try{if(o)return new Uint8Array(o);throw"both async and sync fetching of the wasm failed"}catch(t){J(t)}}function Z(t){for(;0<t.length;){var A=t.shift();if("function"==typeof A)A(e);else{var n=A.T;"number"===typeof n?void 0===A.O?G.get(n)():G.get(n)(A.O):n(void 0===A.O?null:A.O)}}}function W(t){this.N=t-16,this.$=function(t){Q[this.N+8>>2]=t},this.X=function(t){Q[this.N+0>>2]=t},this.Y=function(){Q[this.N+4>>2]=0},this.W=function(){h[this.N+12>>0]=0},this.Z=function(){h[this.N+13>>0]=0},this.V=function(t,e){this.$(t),this.X(e),this.Y(),this.W(),this.Z()}}function K(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var P=void 0;function q(t){for(var e="";B[t];)e+=P[B[t++]];return e}var X={},z={},$={};function tt(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?"_"+t:t}function et(t,e){return t=tt(t),new Function("body","return function "+t+'() {\n    "use strict";    return body.apply(this, arguments);\n};\n')(e)}function At(t){var e=Error,A=et(t,(function(e){this.name=t,this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return A.prototype=Object.create(e.prototype),A.prototype.constructor=A,A.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},A}var nt=void 0;function rt(t){throw new nt(t)}var it=void 0;function ot(t,e,A){if(A=A||{},!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||rt('type "'+n+'" must have a positive integer typeid pointer'),z.hasOwnProperty(t)){if(A.U)return;rt("Cannot register type '"+n+"' twice")}z[t]=e,delete $[t],X.hasOwnProperty(t)&&(e=X[t],delete X[t],e.forEach((function(t){t()})))}var at=[],st=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function gt(t){4<t&&0===--st[t].P&&(st[t]=void 0,at.push(t))}function ct(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=at.length?at.pop():st.length;return st[e]={P:1,value:t},e}}function It(t){return this.fromWireType(E[t>>2])}function ut(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function lt(t,e){switch(e){case 2:return function(t){return this.fromWireType(p[t>>2])};case 3:return function(t){return this.fromWireType(y[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Ct(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function ht(t,A,n){e.hasOwnProperty(t)?((void 0===n||void 0!==e[t].L&&void 0!==e[t].L[n])&&rt("Cannot register public name '"+t+"' twice"),function(t,A){var n=e;if(void 0===n[t].L){var r=n[t];n[t]=function(){return n[t].L.hasOwnProperty(arguments.length)||rt("Function '"+A+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+n[t].L+")!"),n[t].L[arguments.length].apply(this,arguments)},n[t].L=[],n[t].L[r.S]=r}}(t,t),e.hasOwnProperty(n)&&rt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),e[t].L[n]=A):(e[t]=A,void 0!==n&&(e[t].ba=n))}function Bt(t,A){var n=-1!=(t=q(t)).indexOf("j")?function(t,A){0<=t.indexOf("j")||J("Assertion failed: getDynCaller should only be called with i64 sigs");var n=[];return function(){n.length=arguments.length;for(var r=0;r<arguments.length;r++)n[r]=arguments[r];return-1!=t.indexOf("j")?n&&n.length?e["dynCall_"+t].apply(null,[A].concat(n)):e["dynCall_"+t].call(null,A):G.get(A).apply(null,n)}}(t,A):G.get(A);return"function"!==typeof n&&rt("unknown function pointer with signature "+t+": "+A),n}var ft=void 0;function dt(t){var e=q(t=Ut(t));return Rt(t),e}function Qt(t,e,A){switch(e){case 0:return A?function(t){return h[t]}:function(t){return B[t]};case 1:return A?function(t){return f[t>>1]}:function(t){return d[t>>1]};case 2:return A?function(t){return Q[t>>2]}:function(t){return E[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var Et={};function pt(){if(!yt){var t,e={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(t in Et)e[t]=Et[t];var A=[];for(t in e)A.push(t+"="+e[t]);yt=A}return yt}for(var yt,vt=[null,[],[]],mt=Array(256),bt=0;256>bt;++bt)mt[bt]=String.fromCharCode(bt);P=mt,nt=e.BindingError=At("BindingError"),it=e.InternalError=At("InternalError"),e.count_emval_handles=function(){for(var t=0,e=5;e<st.length;++e)void 0!==st[e]&&++t;return t},e.get_first_emval=function(){for(var t=5;t<st.length;++t)if(void 0!==st[t])return st[t];return null},ft=e.UnboundTypeError=At("UnboundTypeError"),k.push({T:function(){St()}});var Ft={p:function(t){return Dt(t+16)+16},o:function(t,e,A){throw new W(t).V(e,A),t},z:function(t,e,A,n,r){var i=K(A);ot(t,{name:e=q(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:r},argPackAdvance:8,readValueFromPointer:function(t){if(1===A)var n=h;else if(2===A)n=f;else{if(4!==A)throw new TypeError("Unknown boolean type size: "+e);n=Q}return this.fromWireType(n[t>>i])},M:null})},y:function(t,e){ot(t,{name:e=q(e),fromWireType:function(t){var e=st[t].value;return gt(t),e},toWireType:function(t,e){return ct(e)},argPackAdvance:8,readValueFromPointer:It,M:null})},h:function(t,e,A){A=K(A),ot(t,{name:e=q(e),fromWireType:function(t){return t},toWireType:function(t,e){if("number"!==typeof e&&"boolean"!==typeof e)throw new TypeError('Cannot convert "'+ut(e)+'" to '+this.name);return e},argPackAdvance:8,readValueFromPointer:lt(e,A),M:null})},e:function(t,A,n,r,i,o){var a=function(t,e){for(var A=[],n=0;n<t;n++)A.push(Q[(e>>2)+n]);return A}(A,n);t=q(t),i=Bt(r,i),ht(t,(function(){!function(t,e){var A=[],n={};throw e.forEach((function t(e){n[e]||z[e]||($[e]?$[e].forEach(t):(A.push(e),n[e]=!0))})),new ft(t+": "+A.map(dt).join([", "]))}("Cannot call "+t+" due to unbound types",a)}),A-1),function(t,e){function A(t){if((t=e(t)).length!==n.length)throw new it("Mismatched type converter count");for(var A=0;A<n.length;++A)ot(n[A],t[A])}var n=[];n.forEach((function(e){$[e]=t}));var r=Array(t.length),i=[],o=0;t.forEach((function(t,e){z.hasOwnProperty(t)?r[e]=z[t]:(i.push(t),X.hasOwnProperty(t)||(X[t]=[]),X[t].push((function(){r[e]=z[t],++o===i.length&&A(r)})))})),0===i.length&&A(r)}(a,(function(n){var r=t,a=t;n=[n[0],null].concat(n.slice(1));var s=i,g=n.length;2>g&&rt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=null!==n[1]&&!1,I=!1,u=1;u<n.length;++u)if(null!==n[u]&&void 0===n[u].M){I=!0;break}var l="void"!==n[0].name,C="",h="";for(u=0;u<g-2;++u)C+=(0!==u?", ":"")+"arg"+u,h+=(0!==u?", ":"")+"arg"+u+"Wired";a="return function "+tt(a)+"("+C+") {\nif (arguments.length !== "+(g-2)+") {\nthrowBindingError('function "+a+" called with ' + arguments.length + ' arguments, expected "+(g-2)+" args!');\n}\n",I&&(a+="var destructors = [];\n");var B=I?"destructors":"null";for(C="throwBindingError invoker fn runDestructors retType classParam".split(" "),s=[rt,s,o,Ct,n[0],n[1]],c&&(a+="var thisWired = classParam.toWireType("+B+", this);\n"),u=0;u<g-2;++u)a+="var arg"+u+"Wired = argType"+u+".toWireType("+B+", arg"+u+"); // "+n[u+2].name+"\n",C.push("argType"+u),s.push(n[u+2]);if(c&&(h="thisWired"+(0<h.length?", ":"")+h),a+=(l?"var rv = ":"")+"invoker(fn"+(0<h.length?", ":"")+h+");\n",I)a+="runDestructors(destructors);\n";else for(u=c?1:2;u<n.length;++u)g=1===u?"thisWired":"arg"+(u-2)+"Wired",null!==n[u].M&&(a+=g+"_dtor("+g+"); // "+n[u].name+"\n",C.push(g+"_dtor"),s.push(n[u].M));if(l&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),C.push(a+"}\n"),n=function(t){var e=Function;if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var A=et(e.name||"unknownFunctionName",(function(){}));return A.prototype=e.prototype,A=new A,(t=e.apply(A,t))instanceof Object?t:A}(C).apply(null,s),u=A-1,!e.hasOwnProperty(r))throw new it("Replacing nonexistant public symbol");return void 0!==e[r].L&&void 0!==u?e[r].L[u]=n:(e[r]=n,e[r].S=u),[]}))},c:function(t,e,A,n,r){function i(t){return t}e=q(e),-1===r&&(r=4294967295);var o=K(A);if(0===n){var a=32-8*A;i=function(t){return t<<a>>>a}}var s=-1!=e.indexOf("unsigned");ot(t,{name:e,fromWireType:i,toWireType:function(t,A){if("number"!==typeof A&&"boolean"!==typeof A)throw new TypeError('Cannot convert "'+ut(A)+'" to '+this.name);if(A<n||A>r)throw new TypeError('Passing a number "'+ut(A)+'" from JS side to C/C++ side to an argument of type "'+e+'", which is outside the valid range ['+n+", "+r+"]!");return s?A>>>0:0|A},argPackAdvance:8,readValueFromPointer:Qt(e,o,0!==n),M:null})},b:function(t,e,A){function n(t){var e=E;return new r(C,e[(t>>=2)+1],e[t])}var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];ot(t,{name:A=q(A),fromWireType:n,argPackAdvance:8,readValueFromPointer:n},{U:!0})},i:function(t,e){var A="std::string"===(e=q(e));ot(t,{name:e,fromWireType:function(t){var e=E[t>>2];if(A)for(var n=t+4,r=0;r<=e;++r){var i=t+4+r;if(r==e||0==B[i]){if(n=n?l(B,n,i-n):"",void 0===o)var o=n;else o+=String.fromCharCode(0),o+=n;n=i+1}}else{for(o=Array(e),r=0;r<e;++r)o[r]=String.fromCharCode(B[t+4+r]);o=o.join("")}return Rt(t),o},toWireType:function(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"===typeof e;n||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||rt("Cannot pass non-string to std::string");var r=(A&&n?function(){for(var t=0,A=0;A<e.length;++A){var n=e.charCodeAt(A);55296<=n&&57343>=n&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++A)),127>=n?++t:t=2047>=n?t+2:65535>=n?t+3:t+4}return t}:function(){return e.length})(),i=Dt(4+r+1);if(E[i>>2]=r,A&&n)!function(t,e,A){var n=B;if(0<A){A=e+A-1;for(var r=0;r<t.length;++r){var i=t.charCodeAt(r);if(55296<=i&&57343>=i)i=65536+((1023&i)<<10)|1023&t.charCodeAt(++r);if(127>=i){if(e>=A)break;n[e++]=i}else{if(2047>=i){if(e+1>=A)break;n[e++]=192|i>>6}else{if(65535>=i){if(e+2>=A)break;n[e++]=224|i>>12}else{if(e+3>=A)break;n[e++]=240|i>>18,n[e++]=128|i>>12&63}n[e++]=128|i>>6&63}n[e++]=128|63&i}}n[e]=0}}(e,i+4,r+1);else if(n)for(n=0;n<r;++n){var o=e.charCodeAt(n);255<o&&(Rt(i),rt("String has UTF-16 code units that do not fit in 8 bits")),B[i+4+n]=o}else for(n=0;n<r;++n)B[i+4+n]=e[n];return null!==t&&t.push(Rt,i),i},argPackAdvance:8,readValueFromPointer:It,M:function(t){Rt(t)}})},d:function(t,e,A){if(A=q(A),2===e)var n=m,r=b,i=F,o=function(){return d},a=1;else 4===e&&(n=w,r=S,i=D,o=function(){return E},a=2);ot(t,{name:A,fromWireType:function(t){for(var A,r=E[t>>2],i=o(),s=t+4,g=0;g<=r;++g){var c=t+4+g*e;g!=r&&0!=i[c>>a]||(s=n(s,c-s),void 0===A?A=s:(A+=String.fromCharCode(0),A+=s),s=c+e)}return Rt(t),A},toWireType:function(t,n){"string"!==typeof n&&rt("Cannot pass non-string to C++ string type "+A);var o=i(n),s=Dt(4+o+e);return E[s>>2]=o>>a,r(n,s+4,o+e),null!==t&&t.push(Rt,s),s},argPackAdvance:8,readValueFromPointer:It,M:function(t){Rt(t)}})},A:function(t,e){ot(t,{aa:!0,name:e=q(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},n:gt,x:function(t){4<t&&(st[t].P+=1)},C:function(t,e){var A=z[t];return void 0===A&&rt("_emval_take_value has unknown type "+dt(t)),ct(t=A.readValueFromPointer(e))},t:function(){J()},r:function(t,e,A){B.copyWithin(t,e,e+A)},s:function(t){t>>>=0;var e=B.length;if(2147483648<t)return!1;for(var A=1;4>=A;A*=2){var n=e*(1+.2/A);n=Math.min(n,t+100663296),0<(n=Math.max(16777216,t,n))%65536&&(n+=65536-n%65536);t:{try{c.grow(Math.min(2147483648,n)-C.byteLength+65535>>>16),R(c.buffer);var r=1;break t}catch(i){}r=void 0}if(r)return!0}return!1},u:function(t,e){var A=0;return pt().forEach((function(n,r){var i=e+A;for(r=Q[t+4*r>>2]=i,i=0;i<n.length;++i)h[r++>>0]=n.charCodeAt(i);h[r>>0]=0,A+=n.length+1})),0},v:function(t,e){var A=pt();Q[t>>2]=A.length;var n=0;return A.forEach((function(t){n+=t.length+1})),Q[e>>2]=n,0},w:function(){return 0},q:function(){},g:function(t,e,A,n){for(var r=0,i=0;i<A;i++){for(var o=Q[e+8*i>>2],a=Q[e+(8*i+4)>>2],c=0;c<a;c++){var I=B[o+c],u=vt[t];0===I||10===I?((1===t?s:g)(l(u,0)),u.length=0):u.push(I)}r+=a}return Q[n>>2]=r,0},a:c,l:function(){return 0},k:function(){return 0},j:function(){},B:function(){return 6},m:function(){},f:function(){}};!function(){function t(t){e.asm=t.exports,G=e.asm.D,L--,e.monitorRunDependencies&&e.monitorRunDependencies(L),0==L&&_&&(t=_,_=null,t())}function A(e){t(e.instance)}function r(t){return Promise.resolve().then(V).then((function(t){return WebAssembly.instantiate(t,i)})).then(t,(function(t){g("failed to asynchronously prepare wasm: "+t),J(t)}))}var i={a:Ft};if(L++,e.monitorRunDependencies&&e.monitorRunDependencies(L),e.instantiateWasm)try{return e.instantiateWasm(i,t)}catch(a){return g("Module.instantiateWasm callback failed with error: "+a),!1}(o||"function"!==typeof WebAssembly.instantiateStreaming||j()||T("file://")||"function"!==typeof fetch?r(A):fetch(H,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(A,(function(t){return g("wasm streaming compile failed: "+t),g("falling back to ArrayBuffer instantiation"),r(A)}))}))).catch(n)}();var wt,St=e.___wasm_call_ctors=function(){return(St=e.___wasm_call_ctors=e.asm.E).apply(null,arguments)},Dt=e._malloc=function(){return(Dt=e._malloc=e.asm.F).apply(null,arguments)},Rt=e._free=function(){return(Rt=e._free=e.asm.G).apply(null,arguments)},Ut=e.___getTypeName=function(){return(Ut=e.___getTypeName=e.asm.H).apply(null,arguments)};function Gt(){function t(){if(!wt&&(wt=!0,e.calledRun=!0,!I)){if(Z(k),Z(x),A(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var t=e.postRun.shift();O.unshift(t)}Z(O)}}if(!(0<L)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)M();Z(N),0<L||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),t()}),1)):t())}}if(e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.I).apply(null,arguments)},e.dynCall_jiiiii=function(){return(e.dynCall_jiiiii=e.asm.J).apply(null,arguments)},e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.K).apply(null,arguments)},_=function t(){wt||Gt(),wt||(_=t)},e.run=Gt,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return!0,Gt(),t.ready}}(),AA=" ";!function(t){t[t.NOSHUFFLE=0]="NOSHUFFLE",t[t.SHUFFLE=1]="SHUFFLE",t[t.BITSHUFFLE=2]="BITSHUFFLE",t[t.AUTOSHUFFLE=-1]="AUTOSHUFFLE"}(tA||(tA={}));var nA,rA=new Set(["blosclz","lz4","lz4hc","snappy","zlib","zstd"]),iA=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lz4",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tA.SHUFFLE,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(Object(s.a)(this,t),e<0||e>9)throw new Error("Invalid compression level: '".concat(e,"'. It should be between 0 and 9"));if(!rA.has(A))throw new Error("Invalid compressor '".concat(A,"'. Valid compressors include\n        'blosclz', 'lz4', 'lz4hc','snappy', 'zlib', 'zstd'."));if(n<-1||n>2)throw new Error("Invalid shuffle ".concat(n,". Must be one of 0 (NOSHUFFLE),\n        1 (SHUFFLE), 2 (BITSHUFFLE), -1 (AUTOSHUFFLE)."));this.blocksize=r,this.clevel=e,this.cname=A,this.shuffle=n}return Object(g.a)(t,[{key:"encode",value:function(){var t=Object(a.a)(o.a.mark((function t(e){var A,n,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return nA||(nA=$e(eA,AA)),t.next=3,nA;case 3:return A=t.sent,n=A.compress(e,this.cname,this.clevel,this.shuffle,this.blocksize),r=new Uint8Array(n),A.free_result(),t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"decode",value:function(){var t=Object(a.a)(o.a.mark((function t(e,A){var n,r,i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return nA||(nA=$e(eA,AA)),t.next=3,nA;case 3:if(n=t.sent,r=n.decompress(e),i=new Uint8Array(r),n.free_result(),void 0===A){t.next=10;break}return A.set(i),t.abrupt("return",A);case 10:return t.abrupt("return",i);case 11:case"end":return t.stop()}}),t)})));return function(e,A){return t.apply(this,arguments)}}()}],[{key:"fromConfig",value:function(e){var A=e.blocksize;return new t(e.clevel,e.cname,e.shuffle,A)}}]),t}();iA.codecId="blosc",iA.COMPRESSORS=Object(r.a)(rA),iA.NOSHUFFLE=tA.NOSHUFFLE,iA.SHUFFLE=tA.SHUFFLE,iA.BITSHUFFLE=tA.BITSHUFFLE,iA.AUTOSHUFFLE=tA.AUTOSHUFFLE,Object(c.c)(Xe.codecId,(function(){return Xe})),Object(c.c)(qe.codecId,(function(){return qe})),Object(c.c)(iA.codecId,(function(){return iA}))}).call(this,A(62),A(104).Buffer)},,function(t,e,A){"use strict";A.r(e);var n=A(348);A.d(e,"default",(function(){return n.a}))},function(t,e,A){var n=A(244),r=A(207);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==n(t)}},function(t,e,A){var n=A(306),r=A(684),i=A(685),o=A(686),a=A(687),s=A(688);function g(t){var e=this.__data__=new n(t);this.size=e.size}g.prototype.clear=r,g.prototype.delete=i,g.prototype.get=o,g.prototype.has=a,g.prototype.set=s,t.exports=g},function(t,e,A){var n=A(713),r=A(207),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(t){return r(t)&&o.call(t,"callee")&&!a.call(t,"callee")};t.exports=s},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,A){var n=A(718),r=A(378),i=A(719),o=A(589),a=A(720),s=A(244),g=A(495),c=g(n),I=g(r),u=g(i),l=g(o),C=g(a),h=s;(n&&"[object DataView]"!=h(new n(new ArrayBuffer(1)))||r&&"[object Map]"!=h(new r)||i&&"[object Promise]"!=h(i.resolve())||o&&"[object Set]"!=h(new o)||a&&"[object WeakMap]"!=h(new a))&&(h=function(t){var e=s(t),A="[object Object]"==e?t.constructor:void 0,n=A?g(A):"";if(n)switch(n){case c:return"[object DataView]";case I:return"[object Map]";case u:return"[object Promise]";case l:return"[object Set]";case C:return"[object WeakMap]"}return e}),t.exports=h},function(t,e,A){"use strict";t.exports=function(t,e){e||(e={}),"function"===typeof e&&(e={cmp:e});var A,n="boolean"===typeof e.cycles&&e.cycles,r=e.cmp&&(A=e.cmp,function(t){return function(e,n){var r={key:e,value:t[e]},i={key:n,value:t[n]};return A(r,i)}}),i=[];return function t(e){if(e&&e.toJSON&&"function"===typeof e.toJSON&&(e=e.toJSON()),void 0!==e){if("number"==typeof e)return isFinite(e)?""+e:"null";if("object"!==typeof e)return JSON.stringify(e);var A,o;if(Array.isArray(e)){for(o="[",A=0;A<e.length;A++)A&&(o+=","),o+=t(e[A])||"null";return o+"]"}if(null===e)return"null";if(-1!==i.indexOf(e)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var a=i.push(e)-1,s=Object.keys(e).sort(r&&r(e));for(o="",A=0;A<s.length;A++){var g=s[A],c=t(e[g]);c&&(o&&(o+=","),o+=JSON.stringify(g)+":"+c)}return i.splice(a,1),"{"+o+"}"}}(t)}},function(t,e,A){(function(e){for(var n=A(1276),r="undefined"===typeof window?e:window,i=["moz","webkit"],o="AnimationFrame",a=r["request"+o],s=r["cancel"+o]||r["cancelRequest"+o],g=0;!a&&g<i.length;g++)a=r[i[g]+"Request"+o],s=r[i[g]+"Cancel"+o]||r[i[g]+"CancelRequest"+o];if(!a||!s){var c=0,I=0,u=[];a=function(t){if(0===u.length){var e=n(),A=Math.max(0,1e3/60-(e-c));c=A+e,setTimeout((function(){var t=u.slice(0);u.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(c)}catch(A){setTimeout((function(){throw A}),0)}}),Math.round(A))}return u.push({handle:++I,callback:t,cancelled:!1}),I},s=function(t){for(var e=0;e<u.length;e++)u[e].handle===t&&(u[e].cancelled=!0)}}t.exports=function(t){return a.call(r,t)},t.exports.cancel=function(){s.apply(r,arguments)},t.exports.polyfill=function(t){t||(t=r),t.requestAnimationFrame=a,t.cancelAnimationFrame=s}}).call(this,A(58))},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(0),r=A.n(n),i=A(574);function o(t){var e=t.parentUuid,A=t.sourceUuid,n=t.x,o=t.y,a=t.parentWidth,s=t.parentHeight,g=t.children;if(n<0||n>a||o<0||o>s)return null;var c=e===A;return r.a.createElement(r.a.Fragment,null,c?r.a.createElement(i.a,{x:n,y:o,parentWidth:a,parentHeight:s},g):r.a.createElement(r.a.Fragment,null,null!==n?r.a.createElement("div",{className:"cell-emphasis-crosshair",style:{left:"".concat(n-.5,"px"),top:0,width:"".concat(1,"px"),height:"".concat(s,"px")}}):null,null!==o?r.a.createElement("div",{className:"cell-emphasis-crosshair",style:{left:0,top:"".concat(o-.5,"px"),width:"".concat(a,"px"),height:"".concat(1,"px")}}):null))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(13),r=A(0),i=A.n(r);function o(t){var e=t.info;return i.a.createElement("table",null,i.a.createElement("tbody",null,Object.entries(e).map((function(t){var e=Object(n.a)(t,2),A=e[0],r=e[1];return i.a.createElement("tr",{key:A},i.a.createElement("th",null,A),i.a.createElement("td",null,r))}))))}},function(t,e,A){"use strict";var n=A(10),r=A(595),i=A(192);e.a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(t,Object(n.a)({defaultTheme:i.a},e))}},,function(t,e,A){var n=A(466);t.exports=function(t,e){if(t){if("string"===typeof t)return n(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?n(t,e):void 0}}},function(t,e,A){var n=A(678),r=A(207);t.exports=function t(e,A,i,o,a){return e===A||(null==e||null==A||!r(e)&&!r(A)?e!==e&&A!==A:n(e,A,i,o,t,a))}},function(t,e,A){var n=A(445),r=A(705),i=A(706);function o(t){var e=-1,A=null==t?0:t.length;for(this.__data__=new n;++e<A;)this.add(t[e])}o.prototype.add=o.prototype.push=r,o.prototype.has=i,t.exports=o},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e){t.exports=function(t){var e=-1,A=Array(t.size);return t.forEach((function(t){A[++e]=t})),A}},function(t,e){t.exports=function(t,e){for(var A=-1,n=e.length,r=t.length;++A<n;)t[r+A]=e[A];return t}},function(t,e,A){var n=A(711),r=A(586),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(t){return null==t?[]:(t=Object(t),n(o(t),(function(e){return i.call(t,e)})))}:r;t.exports=a},function(t,e,A){(function(t){var n=A(454),r=e&&!e.nodeType&&e,i=r&&"object"==typeof t&&t&&!t.nodeType&&t,o=i&&i.exports===r&&n.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=a}).call(this,A(220)(t))},function(t,e){var A=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||A)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(85);e.default=function(t,e){void 0===e&&(e={});var A=Number(t[0]),r=Number(t[1]),i=Number(t[2]),o=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[A,r],s=[A,o],g=[i,o],c=[i,r];return n.polygon([[a,c,g,s,a]],e.properties,{bbox:t,id:e.id})}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(A(276)),r=i(A(1112));function i(t){return t&&t.__esModule?t:{default:t}}function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?g(t):e}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var C=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(C,t);var e,A,n,i,o=(e=C,function(){var t,A=I(e);if(c()){var n=I(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return s(this,t)});function C(t){var e,A=t.getData,n=t.on,i=t.toNebulaFeature;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,C),l(g(e=o.call(this)),"getData",void 0),l(g(e),"toNebulaFeature",void 0),l(g(e),"id",void 0),l(g(e),"helperLayers",void 0),l(g(e),"usesMapEvents",!1),l(g(e),"enablePicking",!1),l(g(e),"enableSelection",!1),e.id=r.default.v4(),e.getData=A,e.toNebulaFeature=i,e.helperLayers=[],n&&Object.keys(n).forEach((function(t){return e.on(t,n[t])})),e}return A=C,(n=[{key:"render",value:function(t){return null}}])&&a(A.prototype,n),i&&a(A,i),C}(n.default.EventEmitter);e.default=C},function(t,e){var A=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=A)},function(t,e){var A=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=A)},function(t,e,A){t.exports=!A(792)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,A){var n=A(862),r=A(1281),i=A(1298),o=A(212);t.exports=function(t,e){return(o(t)?n:i)(t,r(e,3))}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(153);function r(t,e,A){var n=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var r=0,i=e.length-1;r<e.length;i=r++){var o=e[r][0],a=e[r][1],s=e[i][0],g=e[i][1];if(t[1]*(o-s)+a*(s-t[0])+g*(t[0]-o)===0&&(o-t[0])*(s-t[0])<=0&&(a-t[1])*(g-t[1])<=0)return!A;a>t[1]!==g>t[1]&&t[0]<(s-o)*(t[1]-a)/(g-a)+o&&(n=!n)}return n}e.default=function(t,e,A){if(void 0===A&&(A={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=n.getCoord(t),o=n.getGeom(e),a=o.type,s=e.bbox,g=o.coordinates;if(s&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(i,s))return!1;"Polygon"===a&&(g=[g]);for(var c=!1,I=0;I<g.length&&!c;I++)if(r(i,g[I][0],A.ignoreBoundary)){for(var u=!1,l=1;l<g[I].length&&!u;)r(i,g[I][l],!A.ignoreBoundary)&&(u=!0),l++;u||(c=!0)}return c}},function(t,e,A){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return r(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var A=0;return r(t,A,e)}return""}function r(t,e,A){if(t.byteLength<=e+A)return"";for(var n=new DataView(t),r="",i=0;i<A;i++)r+=String.fromCharCode(n.getUint8(e+i));return r}A.d(e,"a",(function(){return n}))},function(t){t.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":["groupName","setName","obsId"],"properties":{"groupName":{"type":"string"},"setName":{"type":"string"},"setColor":{"$ref":"#/definitions/colorArray"},"obsId":{"type":"string"},"predictionScore":{"oneOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}}}}')},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window,a="object"!==("undefined"===typeof n?"undefined":Object(r.a)(n))||"[object process]"!==String(n)||n.browser,s="undefined"!==typeof n&&n.version&&n.version.match(/v([0-9]*)/);s&&parseFloat(s[1])}).call(this,A(58),A(62))},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window,a="object"!==("undefined"===typeof n?"undefined":Object(r.a)(n))||"[object process]"!==String(n)||n.browser,s="undefined"!==typeof n&&n.version&&n.version.match(/v([0-9]*)/);s&&parseFloat(s[1])}).call(this,A(58),A(62))},function(t,e,A){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return n}))},function(t,e){},function(t,e){},,function(t,e){e.read=function(t,e,A,n,r){var i,o,a=8*r-n-1,s=(1<<a)-1,g=s>>1,c=-7,I=A?r-1:0,u=A?-1:1,l=t[e+I];for(I+=u,i=l&(1<<-c)-1,l>>=-c,c+=a;c>0;i=256*i+t[e+I],I+=u,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=256*o+t[e+I],I+=u,c-=8);if(0===i)i=1-g;else{if(i===s)return o?NaN:1/0*(l?-1:1);o+=Math.pow(2,n),i-=g}return(l?-1:1)*o*Math.pow(2,i-n)},e.write=function(t,e,A,n,r,i){var o,a,s,g=8*i-r-1,c=(1<<g)-1,I=c>>1,u=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,C=n?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-o))<1&&(o--,s*=2),(e+=o+I>=1?u/s:u*Math.pow(2,1-I))*s>=2&&(o++,s/=2),o+I>=c?(a=0,o=c):o+I>=1?(a=(e*s-1)*Math.pow(2,r),o+=I):(a=e*Math.pow(2,I-1)*Math.pow(2,r),o=0));r>=8;t[A+l]=255&a,l+=C,a/=256,r-=8);for(o=o<<r|a,g+=r;g>0;t[A+l]=255&o,l+=C,o/=256,g-=8);t[A+l-C]|=128*h}},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(105),r=A(97),i=A(106),o=A(107),a=A(74),s=A(410),g=A(46),c=A(47),I=A(38),u=A(169);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var C=function(t){Object(i.a)(A,t);var e=l(A);function A(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(n.a)(this,A),t=e.call(this,2),Object(g.f)(r)&&1===arguments.length?t.copy(r):(g.b.debug&&(Object(c.a)(r),Object(c.a)(i)),t[0]=r,t[1]=i),t}return Object(r.a)(A,[{key:"set",value:function(t,e){return this[0]=t,this[1]=e,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this.check()}},{key:"fromObject",value:function(t){return g.b.debug&&(Object(c.a)(t.x),Object(c.a)(t.y)),this[0]=t.x,this[1]=t.y,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t}},{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(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return I.j(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return Object(u.a)(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return I.i(this,this,t),this.check()}},{key:"transformByMatrix2x3",value:function(t){return I.h(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return I.g(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 2}}]),A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(0),r=A.n(n);function i(t){var e=t.x,A=t.y,i=t.parentWidth,o=t.parentHeight,a=t.children,s=Object(n.useRef)(null),g=i<500;return Object(n.useEffect)((function(){var t=s.current,n=g?-5:10,r=e>i/2?-(100+n):n,a=A>o/2?-(100+n):n,c=g?.75:1;t.style.transform="translateX(".concat(r,"%) translateY(").concat(a,"%) scale(").concat(c,")"),t.style.whiteSpace=g?"normal":"nowrap"})),r.a.createElement("div",{ref:s,className:"cell-tooltip bg-primary",style:{left:"".concat(e,"px"),top:"".concat(A,"px")}},a)}},function(t,e,A){"use strict";var n={};A.r(n),A.d(n,"JsonPatchError",(function(){return et})),A.d(n,"deepClone",(function(){return At})),A.d(n,"getValueByPointer",(function(){return it})),A.d(n,"applyOperation",(function(){return ot})),A.d(n,"applyPatch",(function(){return at})),A.d(n,"applyReducer",(function(){return st})),A.d(n,"validator",(function(){return gt})),A.d(n,"validate",(function(){return ct})),A.d(n,"_areEquals",(function(){return It}));var r={};A.r(r),A.d(r,"unobserve",(function(){return ht})),A.d(r,"observe",(function(){return Bt})),A.d(r,"generate",(function(){return ft})),A.d(r,"compare",(function(){return Qt}));var i={};A.r(i),A.d(i,"aggregate",(function(){return _a})),A.d(i,"bin",(function(){return Ta})),A.d(i,"collect",(function(){return Ya})),A.d(i,"compare",(function(){return Va})),A.d(i,"countpattern",(function(){return Wa})),A.d(i,"cross",(function(){return Pa})),A.d(i,"density",(function(){return Xa})),A.d(i,"dotbin",(function(){return As})),A.d(i,"expression",(function(){return ns})),A.d(i,"extent",(function(){return is})),A.d(i,"facet",(function(){return ss})),A.d(i,"field",(function(){return cs})),A.d(i,"filter",(function(){return us})),A.d(i,"flatten",(function(){return ls})),A.d(i,"fold",(function(){return Cs})),A.d(i,"formula",(function(){return hs})),A.d(i,"generate",(function(){return Bs})),A.d(i,"impute",(function(){return Fs})),A.d(i,"joinaggregate",(function(){return ws})),A.d(i,"kde",(function(){return Ds})),A.d(i,"key",(function(){return Rs})),A.d(i,"load",(function(){return Gs})),A.d(i,"lookup",(function(){return ks})),A.d(i,"multiextent",(function(){return xs})),A.d(i,"multivalues",(function(){return Ms})),A.d(i,"params",(function(){return _s})),A.d(i,"pivot",(function(){return Js})),A.d(i,"prefacet",(function(){return js})),A.d(i,"project",(function(){return Hs})),A.d(i,"proxy",(function(){return Ys})),A.d(i,"quantile",(function(){return Zs})),A.d(i,"relay",(function(){return Ks})),A.d(i,"sample",(function(){return Ps})),A.d(i,"sequence",(function(){return qs})),A.d(i,"sieve",(function(){return Xs})),A.d(i,"subflow",(function(){return os})),A.d(i,"timeunit",(function(){return zs})),A.d(i,"tupleindex",(function(){return eg})),A.d(i,"values",(function(){return Ag})),A.d(i,"window",(function(){return sg}));var o={};A.r(o),A.d(o,"interpolate",(function(){return wh})),A.d(o,"interpolateArray",(function(){return Qh})),A.d(o,"interpolateBasis",(function(){return oh})),A.d(o,"interpolateBasisClosed",(function(){return ah})),A.d(o,"interpolateDate",(function(){return ph})),A.d(o,"interpolateDiscrete",(function(){return GB})),A.d(o,"interpolateHue",(function(){return NB})),A.d(o,"interpolateNumber",(function(){return yh})),A.d(o,"interpolateNumberArray",(function(){return fh})),A.d(o,"interpolateObject",(function(){return vh})),A.d(o,"interpolateRound",(function(){return Sh})),A.d(o,"interpolateString",(function(){return Fh})),A.d(o,"interpolateTransformCss",(function(){return LB})),A.d(o,"interpolateTransformSvg",(function(){return _B})),A.d(o,"interpolateZoom",(function(){return jB})),A.d(o,"interpolateRgb",(function(){return lh})),A.d(o,"interpolateRgbBasis",(function(){return hh})),A.d(o,"interpolateRgbBasisClosed",(function(){return Bh})),A.d(o,"interpolateHsl",(function(){return YB})),A.d(o,"interpolateHslLong",(function(){return VB})),A.d(o,"interpolateLab",(function(){return of})),A.d(o,"interpolateHcl",(function(){return sf})),A.d(o,"interpolateHclLong",(function(){return gf})),A.d(o,"interpolateCubehelix",(function(){return df})),A.d(o,"interpolateCubehelixLong",(function(){return Qf})),A.d(o,"piecewise",(function(){return sB})),A.d(o,"quantize",(function(){return Ef}));var a={};A.r(a),A.d(a,"bound",(function(){return _d})),A.d(a,"identifier",(function(){return Td})),A.d(a,"mark",(function(){return jd})),A.d(a,"overlap",(function(){return Hd})),A.d(a,"render",(function(){return Xd})),A.d(a,"viewlayout",(function(){return QQ}));var s={};A.r(s),A.d(s,"axisticks",(function(){return EQ})),A.d(s,"datajoin",(function(){return pQ})),A.d(s,"encode",(function(){return vQ})),A.d(s,"legendentries",(function(){return mQ})),A.d(s,"linkpath",(function(){return RQ})),A.d(s,"pie",(function(){return xQ})),A.d(s,"scale",(function(){return LQ})),A.d(s,"sortitems",(function(){return jQ})),A.d(s,"stack",(function(){return YQ}));var g={};A.r(g),A.d(g,"contour",(function(){return BE})),A.d(g,"geojson",(function(){return fE})),A.d(g,"geopath",(function(){return Wm})),A.d(g,"geopoint",(function(){return Km})),A.d(g,"geoshape",(function(){return Pm})),A.d(g,"graticule",(function(){return ib})),A.d(g,"heatmap",(function(){return xb})),A.d(g,"isocontour",(function(){return iE})),A.d(g,"kde2d",(function(){return uE})),A.d(g,"projection",(function(){return Mb}));var c={};A.r(c),A.d(c,"force",(function(){return Xb}));var I={};A.r(I),A.d(I,"nest",(function(){return cF})),A.d(I,"pack",(function(){return LF})),A.d(I,"partition",(function(){return HF})),A.d(I,"stratify",(function(){return qF})),A.d(I,"tree",(function(){return sw})),A.d(I,"treelinks",(function(){return cw})),A.d(I,"treemap",(function(){return dw}));var u={};A.r(u),A.d(u,"loess",(function(){return pw})),A.d(u,"regression",(function(){return vw}));var l={};A.r(l),A.d(l,"voronoi",(function(){return Kw}));var C={};A.r(C),A.d(C,"wordcloud",(function(){return sS}));var h={};A.r(h),A.d(h,"crossfilter",(function(){return QS})),A.d(h,"resolvefilter",(function(){return pS}));var B={};A.r(B),A.d(B,"version",(function(){return yS.a})),A.d(B,"bandwidthNRD",(function(){return Vo})),A.d(B,"bin",(function(){return Zo})),A.d(B,"bootstrapCI",(function(){return Po})),A.d(B,"dotbin",(function(){return qo})),A.d(B,"quantiles",(function(){return jo})),A.d(B,"quartiles",(function(){return Ho})),A.d(B,"random",(function(){return Wo})),A.d(B,"setRandom",(function(){return Ko})),A.d(B,"randomLCG",(function(){return Xo})),A.d(B,"randomInteger",(function(){return zo})),A.d(B,"randomKDE",(function(){return aa})),A.d(B,"randomLogNormal",(function(){return ua})),A.d(B,"sampleLogNormal",(function(){return sa})),A.d(B,"densityLogNormal",(function(){return ga})),A.d(B,"cumulativeLogNormal",(function(){return ca})),A.d(B,"quantileLogNormal",(function(){return Ia})),A.d(B,"randomMixture",(function(){return la})),A.d(B,"randomNormal",(function(){return oa})),A.d(B,"sampleNormal",(function(){return Aa})),A.d(B,"densityNormal",(function(){return na})),A.d(B,"cumulativeNormal",(function(){return ra})),A.d(B,"quantileNormal",(function(){return ia})),A.d(B,"randomUniform",(function(){return da})),A.d(B,"sampleUniform",(function(){return Ca})),A.d(B,"densityUniform",(function(){return ha})),A.d(B,"cumulativeUniform",(function(){return Ba})),A.d(B,"quantileUniform",(function(){return fa})),A.d(B,"regressionLinear",(function(){return va})),A.d(B,"regressionLog",(function(){return ma})),A.d(B,"regressionExp",(function(){return Fa})),A.d(B,"regressionPow",(function(){return wa})),A.d(B,"regressionQuad",(function(){return Sa})),A.d(B,"regressionPoly",(function(){return Da})),A.d(B,"regressionLoess",(function(){return Ua})),A.d(B,"sampleCurve",(function(){return xa})),A.d(B,"TIME_UNITS",(function(){return QA})),A.d(B,"YEAR",(function(){return sA})),A.d(B,"QUARTER",(function(){return gA})),A.d(B,"MONTH",(function(){return cA})),A.d(B,"WEEK",(function(){return IA})),A.d(B,"DATE",(function(){return uA})),A.d(B,"DAY",(function(){return lA})),A.d(B,"DAYOFYEAR",(function(){return CA})),A.d(B,"HOURS",(function(){return hA})),A.d(B,"MINUTES",(function(){return BA})),A.d(B,"SECONDS",(function(){return fA})),A.d(B,"MILLISECONDS",(function(){return dA})),A.d(B,"timeUnitSpecifier",(function(){return vA})),A.d(B,"timeUnits",(function(){return pA})),A.d(B,"dayofyear",(function(){return $A})),A.d(B,"week",(function(){return tn})),A.d(B,"utcdayofyear",(function(){return on})),A.d(B,"utcweek",(function(){return an})),A.d(B,"timeFloor",(function(){return Bn})),A.d(B,"utcFloor",(function(){return Qn})),A.d(B,"timeInterval",(function(){return Yn})),A.d(B,"timeOffset",(function(){return Wn})),A.d(B,"timeSequence",(function(){return qn})),A.d(B,"utcInterval",(function(){return Vn})),A.d(B,"utcOffset",(function(){return Kn})),A.d(B,"utcSequence",(function(){return Xn})),A.d(B,"timeBin",(function(){return Ir})),A.d(B,"accessor",(function(){return U.f})),A.d(B,"accessorName",(function(){return U.h})),A.d(B,"accessorFields",(function(){return U.g})),A.d(B,"id",(function(){return U.w})),A.d(B,"identity",(function(){return U.x})),A.d(B,"zero",(function(){return U.kb})),A.d(B,"one",(function(){return U.O})),A.d(B,"truthy",(function(){return U.gb})),A.d(B,"falsy",(function(){return U.r})),A.d(B,"logger",(function(){return U.K})),A.d(B,"None",(function(){return U.d})),A.d(B,"Error",(function(){return U.b})),A.d(B,"Warn",(function(){return U.e})),A.d(B,"Info",(function(){return U.c})),A.d(B,"Debug",(function(){return U.a})),A.d(B,"mergeConfig",(function(){return U.N})),A.d(B,"writeConfig",(function(){return U.jb})),A.d(B,"panLinear",(function(){return U.Q})),A.d(B,"panLog",(function(){return U.R})),A.d(B,"panPow",(function(){return U.S})),A.d(B,"panSymlog",(function(){return U.T})),A.d(B,"zoomLinear",(function(){return U.lb})),A.d(B,"zoomLog",(function(){return U.mb})),A.d(B,"zoomPow",(function(){return U.nb})),A.d(B,"zoomSymlog",(function(){return U.ob})),A.d(B,"quarter",(function(){return U.V})),A.d(B,"utcquarter",(function(){return U.hb})),A.d(B,"array",(function(){return U.i})),A.d(B,"clampRange",(function(){return U.j})),A.d(B,"compare",(function(){return U.k})),A.d(B,"constant",(function(){return U.l})),A.d(B,"debounce",(function(){return U.m})),A.d(B,"error",(function(){return U.n})),A.d(B,"extend",(function(){return U.o})),A.d(B,"extent",(function(){return U.p})),A.d(B,"extentIndex",(function(){return U.q})),A.d(B,"fastmap",(function(){return U.s})),A.d(B,"field",(function(){return U.t})),A.d(B,"flush",(function(){return U.u})),A.d(B,"hasOwnProperty",(function(){return U.v})),A.d(B,"inherits",(function(){return U.y})),A.d(B,"inrange",(function(){return U.z})),A.d(B,"isArray",(function(){return U.A})),A.d(B,"isBoolean",(function(){return U.B})),A.d(B,"isDate",(function(){return U.C})),A.d(B,"isFunction",(function(){return U.D})),A.d(B,"isNumber",(function(){return U.E})),A.d(B,"isObject",(function(){return U.F})),A.d(B,"isRegExp",(function(){return U.G})),A.d(B,"isString",(function(){return U.H})),A.d(B,"key",(function(){return U.I})),A.d(B,"lerp",(function(){return U.J})),A.d(B,"lruCache",(function(){return U.L})),A.d(B,"merge",(function(){return U.M})),A.d(B,"pad",(function(){return U.P})),A.d(B,"peek",(function(){return U.U})),A.d(B,"repeat",(function(){return U.W})),A.d(B,"span",(function(){return U.X})),A.d(B,"splitAccessPath",(function(){return U.Y})),A.d(B,"stringValue",(function(){return U.Z})),A.d(B,"toBoolean",(function(){return U.ab})),A.d(B,"toDate",(function(){return U.bb})),A.d(B,"toNumber",(function(){return U.cb})),A.d(B,"toString",(function(){return U.eb})),A.d(B,"toSet",(function(){return U.db})),A.d(B,"truncate",(function(){return U.fb})),A.d(B,"visitArray",(function(){return U.ib})),A.d(B,"loader",(function(){return Hi})),A.d(B,"read",(function(){return ji})),A.d(B,"inferType",(function(){return le})),A.d(B,"inferTypes",(function(){return Ce})),A.d(B,"typeParsers",(function(){return ce})),A.d(B,"format",(function(){return Ue})),A.d(B,"formats",(function(){return Ge})),A.d(B,"responseType",(function(){return Ne})),A.d(B,"Bounds",(function(){return wI})),A.d(B,"Gradient",(function(){return yg})),A.d(B,"GroupItem",(function(){return RI})),A.d(B,"ResourceLoader",(function(){return NI})),A.d(B,"Item",(function(){return DI})),A.d(B,"Scenegraph",(function(){return vl})),A.d(B,"Handler",(function(){return Gl})),A.d(B,"Renderer",(function(){return xl})),A.d(B,"CanvasHandler",(function(){return Zl})),A.d(B,"CanvasRenderer",(function(){return zl})),A.d(B,"SVGHandler",(function(){return eC})),A.d(B,"SVGRenderer",(function(){return gd})),A.d(B,"SVGStringRenderer",(function(){return vd})),A.d(B,"RenderType",(function(){return wd})),A.d(B,"renderModule",(function(){return Dd})),A.d(B,"intersect",(function(){return Rd})),A.d(B,"Marks",(function(){return Bl})),A.d(B,"boundClip",(function(){return xd})),A.d(B,"boundContext",(function(){return jI})),A.d(B,"boundStroke",(function(){return MI})),A.d(B,"boundItem",(function(){return fl})),A.d(B,"boundMark",(function(){return Ql})),A.d(B,"pathCurves",(function(){return Bc})),A.d(B,"pathSymbols",(function(){return kc})),A.d(B,"pathRectangle",(function(){return Pc})),A.d(B,"pathTrail",(function(){return qc})),A.d(B,"pathParse",(function(){return Qc})),A.d(B,"pathRender",(function(){return Rc})),A.d(B,"point",(function(){return Ul})),A.d(B,"domCreate",(function(){return Fl})),A.d(B,"domFind",(function(){return wl})),A.d(B,"domChild",(function(){return Sl})),A.d(B,"domClear",(function(){return Dl})),A.d(B,"openTag",(function(){return rd})),A.d(B,"closeTag",(function(){return id})),A.d(B,"font",(function(){return cl})),A.d(B,"fontFamily",(function(){return gl})),A.d(B,"fontSize",(function(){return rl})),A.d(B,"lineHeight",(function(){return il})),A.d(B,"multiLineOffset",(function(){return al})),A.d(B,"textMetrics",(function(){return zu})),A.d(B,"sceneEqual",(function(){return Od})),A.d(B,"pathEqual",(function(){return Md})),A.d(B,"sceneToJSON",(function(){return pl})),A.d(B,"sceneFromJSON",(function(){return yl})),A.d(B,"intersectPath",(function(){return $I})),A.d(B,"intersectPoint",(function(){return tu})),A.d(B,"intersectRule",(function(){return Au})),A.d(B,"intersectBoxLine",(function(){return nu})),A.d(B,"sceneZOrder",(function(){return uu})),A.d(B,"sceneVisit",(function(){return lu})),A.d(B,"scenePickVisit",(function(){return Cu})),A.d(B,"resetSVGClipId",(function(){return bI})),A.d(B,"resetSVGDefIds",(function(){return Ld})),A.d(B,"Dataflow",(function(){return co})),A.d(B,"EventStream",(function(){return Kt})),A.d(B,"Parameters",(function(){return Jt})),A.d(B,"Pulse",(function(){return Xi})),A.d(B,"MultiPulse",(function(){return Ao})),A.d(B,"Operator",(function(){return Yt})),A.d(B,"Transform",(function(){return lo})),A.d(B,"changeset",(function(){return Lt})),A.d(B,"ingest",(function(){return Gt})),A.d(B,"isTuple",(function(){return Dt})),A.d(B,"definition",(function(){return Bo})),A.d(B,"transform",(function(){return fo})),A.d(B,"transforms",(function(){return ho})),A.d(B,"tupleid",(function(){return Rt})),A.d(B,"scale",(function(){return QB})),A.d(B,"scheme",(function(){return Rf})),A.d(B,"interpolate",(function(){return Ff})),A.d(B,"interpolateColors",(function(){return vf})),A.d(B,"interpolateRange",(function(){return yf})),A.d(B,"quantizeInterpolator",(function(){return mf})),A.d(B,"projection",(function(){return Hm})),A.d(B,"View",(function(){return DN})),A.d(B,"formatLocale",(function(){return aA})),A.d(B,"timeFormatLocale",(function(){return Mi})),A.d(B,"locale",(function(){return _i})),A.d(B,"defaultLocale",(function(){return Ji})),A.d(B,"resetDefaultLocale",(function(){return Ti})),A.d(B,"expressionFunction",(function(){return iN})),A.d(B,"parse",(function(){return eM})),A.d(B,"runtimeContext",(function(){return fN}));var f={};A.r(f),A.d(f,"invalidSpec",(function(){return L_})),A.d(f,"FIT_NON_SINGLE",(function(){return __})),A.d(f,"containerSizeNonSingle",(function(){return J_})),A.d(f,"containerSizeNotCompatibleWithAutosize",(function(){return T_})),A.d(f,"droppingFit",(function(){return j_})),A.d(f,"cannotProjectOnChannelWithoutField",(function(){return H_})),A.d(f,"cannotProjectAggregate",(function(){return Y_})),A.d(f,"nearestNotSupportForContinuous",(function(){return V_})),A.d(f,"selectionNotSupported",(function(){return Z_})),A.d(f,"selectionNotFound",(function(){return W_})),A.d(f,"SCALE_BINDINGS_CONTINUOUS",(function(){return K_})),A.d(f,"LEGEND_BINDINGS_PROJECT_LENGTH",(function(){return P_})),A.d(f,"noSameUnitLookup",(function(){return q_})),A.d(f,"noSuchRepeatedValue",(function(){return X_})),A.d(f,"columnsNotSupportByRowCol",(function(){return z_})),A.d(f,"CONCAT_CANNOT_SHARE_AXIS",(function(){return $_})),A.d(f,"unrecognizedParse",(function(){return tJ})),A.d(f,"differentParse",(function(){return eJ})),A.d(f,"invalidTransformIgnored",(function(){return AJ})),A.d(f,"NO_FIELDS_NEEDS_AS",(function(){return nJ})),A.d(f,"customFormatTypeNotAllowed",(function(){return rJ})),A.d(f,"encodingOverridden",(function(){return iJ})),A.d(f,"projectionOverridden",(function(){return oJ})),A.d(f,"REPLACE_ANGLE_WITH_THETA",(function(){return aJ})),A.d(f,"primitiveChannelDef",(function(){return sJ})),A.d(f,"invalidFieldType",(function(){return gJ})),A.d(f,"invalidFieldTypeForCountAggregate",(function(){return cJ})),A.d(f,"invalidAggregate",(function(){return IJ})),A.d(f,"missingFieldType",(function(){return uJ})),A.d(f,"droppingColor",(function(){return lJ})),A.d(f,"emptyFieldDef",(function(){return CJ})),A.d(f,"latLongDeprecated",(function(){return hJ})),A.d(f,"LINE_WITH_VARYING_SIZE",(function(){return BJ})),A.d(f,"incompatibleChannel",(function(){return fJ})),A.d(f,"invalidEncodingChannel",(function(){return dJ})),A.d(f,"facetChannelShouldBeDiscrete",(function(){return QJ})),A.d(f,"facetChannelDropped",(function(){return EJ})),A.d(f,"discreteChannelCannotEncode",(function(){return pJ})),A.d(f,"lineWithRange",(function(){return yJ})),A.d(f,"orientOverridden",(function(){return vJ})),A.d(f,"CANNOT_UNION_CUSTOM_DOMAIN_WITH_FIELD_DOMAIN",(function(){return mJ})),A.d(f,"RANGE_STEP_DEPRECATED",(function(){return bJ})),A.d(f,"cannotUseScalePropertyWithNonColor",(function(){return FJ})),A.d(f,"unaggregateDomainHasNoEffectForRawField",(function(){return wJ})),A.d(f,"unaggregateDomainWithNonSharedDomainOp",(function(){return SJ})),A.d(f,"unaggregatedDomainWithLogScale",(function(){return DJ})),A.d(f,"cannotApplySizeToNonOrientedMark",(function(){return RJ})),A.d(f,"scaleTypeNotWorkWithChannel",(function(){return UJ})),A.d(f,"scaleTypeNotWorkWithFieldDef",(function(){return GJ})),A.d(f,"scalePropertyNotWorkWithScaleType",(function(){return NJ})),A.d(f,"scaleTypeNotWorkWithMark",(function(){return kJ})),A.d(f,"stepDropped",(function(){return xJ})),A.d(f,"mergeConflictingProperty",(function(){return OJ})),A.d(f,"mergeConflictingDomainProperty",(function(){return MJ})),A.d(f,"independentScaleMeansIndependentGuide",(function(){return LJ})),A.d(f,"domainSortDropped",(function(){return _J})),A.d(f,"MORE_THAN_ONE_SORT",(function(){return JJ})),A.d(f,"FACETED_INDEPENDENT_DIFFERENT_SOURCES",(function(){return TJ})),A.d(f,"FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES",(function(){return jJ})),A.d(f,"FACETED_INDEPENDENT_SAME_SOURCE",(function(){return HJ})),A.d(f,"INVALID_CHANNEL_FOR_AXIS",(function(){return YJ})),A.d(f,"cannotStackRangedMark",(function(){return VJ})),A.d(f,"cannotStackNonLinearScale",(function(){return ZJ})),A.d(f,"stackNonSummativeAggregate",(function(){return WJ})),A.d(f,"invalidTimeUnit",(function(){return KJ})),A.d(f,"droppedDay",(function(){return PJ})),A.d(f,"errorBarCenterAndExtentAreNotNeeded",(function(){return qJ})),A.d(f,"errorBarCenterIsUsedWithWrongExtent",(function(){return XJ})),A.d(f,"errorBarContinuousAxisHasCustomizedAggregate",(function(){return zJ})),A.d(f,"errorBarCenterIsNotNeeded",(function(){return $J})),A.d(f,"errorBand1DNotSupport",(function(){return tT})),A.d(f,"channelRequiredForBinned",(function(){return eT})),A.d(f,"domainRequiredForThresholdScale",(function(){return AT}));var d={};A.r(d),A.d(d,"compile",(function(){return QX})),A.d(d,"extractTransforms",(function(){return vX})),A.d(d,"normalize",(function(){return YV})),A.d(d,"version",(function(){return bX}));var Q={};A.r(Q),A.d(Q,"dark",(function(){return DX})),A.d(Q,"excel",(function(){return RX})),A.d(Q,"fivethirtyeight",(function(){return UX})),A.d(Q,"ggplot2",(function(){return GX})),A.d(Q,"latimes",(function(){return xX})),A.d(Q,"quartz",(function(){return OX})),A.d(Q,"vox",(function(){return MX})),A.d(Q,"urbaninstitute",(function(){return _X})),A.d(Q,"googlecharts",(function(){return JX})),A.d(Q,"version",(function(){return TX}));var E=A(12),p=A(21),y=A(20),v=A(0),m=A.n(v),b=A(1137),F=A(9),w=A(15),S="vg-tooltip-element",D={offsetX:10,offsetY:10,id:S,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;")},maxDepth:2};var R=A(17),U=A(3),G=function(t,e){var A={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(A[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(A[n[r]]=t[n[r]])}return A};function N(t,e){return JSON.stringify(t,function(t){var e=[];return function(A,n){if("object"!==typeof n||null===n)return n;var r=e.indexOf(this)+1;return e.length=r,e.length>t?"[Object]":e.indexOf(n)>=0?"[Circular]":(e.push(n),n)}}(e))}var k=function(){function t(e){Object(F.a)(this,t),this.options=Object.assign(Object.assign({},D),e);var A=this.options.id;if(this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){var n=document.createElement("style");n.setAttribute("id",this.options.styleId),n.innerHTML=function(t){if(!/^[A-Za-z]+[-:.\w]*$/.test(t))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,t)}(A);var r=document.head;r.childNodes.length>0?r.insertBefore(n,r.childNodes[0]):r.appendChild(n)}this.el=document.getElementById(A),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",A),this.el.classList.add("vg-tooltip"),document.body.appendChild(this.el))}return Object(w.a)(t,[{key:"tooltipHandler",value:function(t,e,A,n){if(null!=n&&""!==n){this.el.innerHTML=function(t,e,A){if(Object(U.A)(t))return"[".concat(t.map((function(t){return e(Object(U.H)(t)?t:N(t,A))})).join(", "),"]");if(Object(U.F)(t)){var n="",r=t,i=r.title,o=r.image,a=G(r,["title","image"]);i&&(n+="<h2>".concat(e(i),"</h2>")),o&&(n+='<img src="'.concat(e(o),'">'));var s=Object.keys(a);if(s.length>0){n+="<table>";var g,c=Object(R.a)(s);try{for(c.s();!(g=c.n()).done;){var I=g.value,u=a[I];void 0!==u&&(Object(U.F)(u)&&(u=N(u,A)),n+='<tr><td class="key">'.concat(e(I),':</td><td class="value">').concat(e(u),"</td></tr>"))}}catch(l){c.e(l)}finally{c.f()}n+="</table>"}return n||"{}"}return e(t)}(n,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible","".concat(this.options.theme,"-theme"));var r=function(t,e,A,n){var r=t.clientX+A;r+e.width>window.innerWidth&&(r=+t.clientX-A-e.width);var i=t.clientY+n;return i+e.height>window.innerHeight&&(i=+t.clientY-n-e.height),{x:r,y:i}}(e,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY),i=r.x,o=r.y;this.el.setAttribute("style","top: ".concat(o,"px; left: ").concat(i,"px"))}else this.el.classList.remove("visible","".concat(this.options.theme,"-theme"))}}]),t}(),x=(b.version,A(54)),O=A(23),M=A(24),L=A(25),_=A.n(L),J={};function T(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,A=Object.keys(t),n=Object.keys(e);return t===e||A.length===n.length&&A.every((function(A){return t[A]===e[A]}))}var j=A(2),H=A.n(j);function Y(t,e,A,n){return new(A||(A=Promise))((function(r,i){function o(t){try{s(n.next(t))}catch(e){i(e)}}function a(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof A?e:new A((function(t){t(e)}))).then(o,a)}s((n=n.apply(t,e||[])).next())}))}var V=function(){var t=function(e,A){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var A in e)e.hasOwnProperty(A)&&(t[A]=e[A])})(e,A)};return function(e,A){function n(){this.constructor=e}t(e,A),e.prototype=null===A?Object.create(A):(n.prototype=A.prototype,new n)}}(),Z=Object.prototype.hasOwnProperty;function W(t,e){return Z.call(t,e)}function K(t){if(Array.isArray(t)){for(var e=new Array(t.length),A=0;A<e.length;A++)e[A]=""+A;return e}if(Object.keys)return Object.keys(t);e=[];for(var n in t)W(t,n)&&e.push(n);return e}function P(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function q(t){for(var e,A=0,n=t.length;A<n;){if(!((e=t.charCodeAt(A))>=48&&e<=57))return!1;A++}return!0}function X(t){return-1===t.indexOf("/")&&-1===t.indexOf("~")?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function z(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function $(t,e){var A=[t];for(var n in e){var r="object"===typeof e[n]?JSON.stringify(e[n],null,2):e[n];"undefined"!==typeof r&&A.push(n+": "+r)}return A.join("\n")}var tt=function(t){function e(e,A,n,r,i){var o=this.constructor,a=t.call(this,$(e,{name:A,index:n,operation:r,tree:i}))||this;return a.name=A,a.index=n,a.operation=r,a.tree=i,Object.setPrototypeOf(a,o.prototype),a.message=$(e,{name:A,index:n,operation:r,tree:i}),a}return V(e,t),e}(Error),et=tt,At=P,nt={add:function(t,e,A){return t[e]=this.value,{newDocument:A}},remove:function(t,e,A){var n=t[e];return delete t[e],{newDocument:A,removed:n}},replace:function(t,e,A){var n=t[e];return t[e]=this.value,{newDocument:A,removed:n}},move:function(t,e,A){var n=it(A,this.path);n&&(n=P(n));var r=ot(A,{op:"remove",path:this.from}).removed;return ot(A,{op:"add",path:this.path,value:r}),{newDocument:A,removed:n}},copy:function(t,e,A){var n=it(A,this.from);return ot(A,{op:"add",path:this.path,value:P(n)}),{newDocument:A}},test:function(t,e,A){return{newDocument:A,test:It(t[e],this.value)}},_get:function(t,e,A){return this.value=t[e],{newDocument:A}}},rt={add:function(t,e,A){return q(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:A,index:e}},remove:function(t,e,A){return{newDocument:A,removed:t.splice(e,1)[0]}},replace:function(t,e,A){var n=t[e];return t[e]=this.value,{newDocument:A,removed:n}},move:nt.move,copy:nt.copy,test:nt.test,_get:nt._get};function it(t,e){if(""==e)return t;var A={op:"_get",path:e};return ot(t,A),A.value}function ot(t,e,A,n,r,i){if(void 0===A&&(A=!1),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===i&&(i=0),A&&("function"==typeof A?A(e,0,t,e.path):gt(e,0)),""===e.path){var o={newDocument:t};if("add"===e.op)return o.newDocument=e.value,o;if("replace"===e.op)return o.newDocument=e.value,o.removed=t,o;if("move"===e.op||"copy"===e.op)return o.newDocument=it(t,e.from),"move"===e.op&&(o.removed=t),o;if("test"===e.op){if(o.test=It(t,e.value),!1===o.test)throw new et("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return o.newDocument=t,o}if("remove"===e.op)return o.removed=t,o.newDocument=null,o;if("_get"===e.op)return e.value=t,o;if(A)throw new et("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",i,e,t);return o}n||(t=P(t));var a=(e.path||"").split("/"),s=t,g=1,c=a.length,I=void 0,u=void 0,l=void 0;for(l="function"==typeof A?A:gt;;){if(u=a[g],r&&"__proto__"==u)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(A&&void 0===I&&(void 0===s[u]?I=a.slice(0,g).join("/"):g==c-1&&(I=e.path),void 0!==I&&l(e,0,t,I)),g++,Array.isArray(s)){if("-"===u)u=s.length;else{if(A&&!q(u))throw new et("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",i,e,t);q(u)&&(u=~~u)}if(g>=c){if(A&&"add"===e.op&&u>s.length)throw new et("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,e,t);if(!1===(o=rt[e.op].call(e,s,u,t)).test)throw new et("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return o}}else if(u&&-1!=u.indexOf("~")&&(u=z(u)),g>=c){if(!1===(o=nt[e.op].call(e,s,u,t)).test)throw new et("Test operation failed","TEST_OPERATION_FAILED",i,e,t);return o}s=s[u]}}function at(t,e,A,n,r){if(void 0===n&&(n=!0),void 0===r&&(r=!0),A&&!Array.isArray(e))throw new et("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(t=P(t));for(var i=new Array(e.length),o=0,a=e.length;o<a;o++)i[o]=ot(t,e[o],A,!0,r,o),t=i[o].newDocument;return i.newDocument=t,i}function st(t,e,A){var n=ot(t,e);if(!1===n.test)throw new et("Test operation failed","TEST_OPERATION_FAILED",A,e,t);return n.newDocument}function gt(t,e,A,n){if("object"!==typeof t||null===t||Array.isArray(t))throw new et("Operation is not an object","OPERATION_NOT_AN_OBJECT",e,t,A);if(!nt[t.op])throw new et("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",e,t,A);if("string"!==typeof t.path)throw new et("Operation `path` property is not a string","OPERATION_PATH_INVALID",e,t,A);if(0!==t.path.indexOf("/")&&t.path.length>0)throw new et('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",e,t,A);if(("move"===t.op||"copy"===t.op)&&"string"!==typeof t.from)throw new et("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",e,t,A);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new et("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",e,t,A);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&function t(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var A=0,n=e.length;A<n;A++)if(t(e[A]))return!0}else if("object"===typeof e){var r=K(e),i=r.length;for(A=0;A<i;A++)if(t(e[r[A]]))return!0}return!1}(t.value))throw new et("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",e,t,A);if(A)if("add"==t.op){var r=t.path.split("/").length,i=n.split("/").length;if(r!==i+1&&r!==i)throw new et("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",e,t,A)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==n)throw new et("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",e,t,A)}else if("move"===t.op||"copy"===t.op){var o=ct([{op:"_get",path:t.from,value:void 0}],A);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new et("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",e,t,A)}}function ct(t,e,A){try{if(!Array.isArray(t))throw new et("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(e)at(P(e),P(t),A||!0);else{A=A||gt;for(var n=0;n<t.length;n++)A(t[n],n,e,void 0)}}catch(r){if(r instanceof et)return r;throw r}}function It(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var A,n,r,i=Array.isArray(t),o=Array.isArray(e);if(i&&o){if((n=t.length)!=e.length)return!1;for(A=n;0!==A--;)if(!It(t[A],e[A]))return!1;return!0}if(i!=o)return!1;var a=Object.keys(t);if((n=a.length)!==Object.keys(e).length)return!1;for(A=n;0!==A--;)if(!e.hasOwnProperty(a[A]))return!1;for(A=n;0!==A--;)if(!It(t[r=a[A]],e[r]))return!1;return!0}return t!==t&&e!==e}var ut=new WeakMap,lt=function(t){this.observers=new Map,this.obj=t},Ct=function(t,e){this.callback=t,this.observer=e};function ht(t,e){e.unobserve()}function Bt(t,e){var A,n=function(t){return ut.get(t)}(t);if(n){var r=function(t,e){return t.observers.get(e)}(n,e);A=r&&r.observer}else n=new lt(t),ut.set(t,n);if(A)return A;if(A={},n.value=P(t),e){A.callback=e,A.next=null;var i=function(){ft(A)},o=function(){clearTimeout(A.next),A.next=setTimeout(i)};"undefined"!==typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return A.patches=[],A.object=t,A.unobserve=function(){ft(A),clearTimeout(A.next),function(t,e){t.observers.delete(e.callback)}(n,A),"undefined"!==typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},n.observers.set(e,new Ct(e,A)),A}function ft(t,e){void 0===e&&(e=!1);var A=ut.get(t.object);dt(A.value,t.object,t.patches,"",e),t.patches.length&&at(A.value,t.patches);var n=t.patches;return n.length>0&&(t.patches=[],t.callback&&t.callback(n)),n}function dt(t,e,A,n,r){if(e!==t){"function"===typeof e.toJSON&&(e=e.toJSON());for(var i=K(e),o=K(t),a=!1,s=o.length-1;s>=0;s--){var g=t[I=o[s]];if(!W(e,I)||void 0===e[I]&&void 0!==g&&!1===Array.isArray(e))Array.isArray(t)===Array.isArray(e)?(r&&A.push({op:"test",path:n+"/"+X(I),value:P(g)}),A.push({op:"remove",path:n+"/"+X(I)}),a=!0):(r&&A.push({op:"test",path:n,value:t}),A.push({op:"replace",path:n,value:e}),!0);else{var c=e[I];"object"==typeof g&&null!=g&&"object"==typeof c&&null!=c?dt(g,c,A,n+"/"+X(I),r):g!==c&&(!0,r&&A.push({op:"test",path:n+"/"+X(I),value:P(g)}),A.push({op:"replace",path:n+"/"+X(I),value:P(c)}))}}if(a||i.length!=o.length)for(s=0;s<i.length;s++){var I;W(t,I=i[s])||void 0===e[I]||A.push({op:"add",path:n+"/"+X(I),value:P(e[I])})}}}function Qt(t,e,A){void 0===A&&(A=!1);var n=[];return dt(t,e,n,"",A),n}Object.assign({},n,r,{JsonPatchError:tt,deepClone:P,escapePathComponent:X,unescapePathComponent:z});var Et=A(832),pt=A.n(Et),yt=A(952);function vt(t){var e=t||U.x,A=[],n={};return A.add=function(t){var r=e(t);return n[r]||(n[r]=1,A.push(t)),A},A.remove=function(t){var r,i=e(t);return n[i]&&(n[i]=0,(r=A.indexOf(t))>=0&&A.splice(r,1)),A},A}var mt=A(8),bt=function(t,e){return Ft.apply(this,arguments)};function Ft(){return(Ft=Object(mt.a)(H.a.mark((function t(e,A){return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,A(e);case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),e.error(t.t0);case 8:case"end":return t.stop()}}),t,null,[[0,5]])})))).apply(this,arguments)}var wt=Symbol("vega_id"),St=1;function Dt(t){return!(!t||!Rt(t))}function Rt(t){return t[wt]}function Ut(t,e){return t[wt]=e,t}function Gt(t){var e=t===Object(t)?t:{data:t};return Rt(e)?e:Ut(e,St++)}function Nt(t){return kt(t,Gt({}))}function kt(t,e){for(var A in t)e[A]=t[A];return e}function xt(t,e){return Ut(e,Rt(t))}function Ot(t,e){return t?e?function(A,n){return t(A,n)||Rt(e(A))-Rt(e(n))}:function(e,A){return t(e,A)||Rt(e)-Rt(A)}:null}function Mt(t){return t&&t.constructor===Lt}function Lt(){var t=[],e=[],A=[],n=[],r=[],i=null,o=!1;return{constructor:Lt,insert:function(e){for(var A=Object(U.i)(e),n=0,r=A.length;n<r;++n)t.push(A[n]);return this},remove:function(t){for(var A=Object(U.D)(t)?n:e,r=Object(U.i)(t),i=0,o=r.length;i<o;++i)A.push(r[i]);return this},modify:function(t,e,n){var i={field:e,value:Object(U.l)(n)};return Object(U.D)(t)?(i.filter=t,r.push(i)):(i.tuple=t,A.push(i)),this},encode:function(t,e){return Object(U.D)(t)?r.push({filter:t,field:e}):A.push({tuple:t,field:e}),this},clean:function(t){return i=t,this},reflow:function(){return o=!0,this},pulse:function(a,s){var g,c,I,u,l,C,h={},B={};for(g=0,c=s.length;g<c;++g)h[Rt(s[g])]=1;for(g=0,c=e.length;g<c;++g)h[Rt(l=e[g])]=-1;for(g=0,c=n.length;g<c;++g)u=n[g],s.forEach((function(t){u(t)&&(h[Rt(t)]=-1)}));for(g=0,c=t.length;g<c;++g)C=Rt(l=t[g]),h[C]?h[C]=1:a.add.push(Gt(t[g]));for(g=0,c=s.length;g<c;++g)l=s[g],h[Rt(l)]<0&&a.rem.push(l);function f(t,e,A){A?t[e]=A(t):a.encode=e,o||(B[Rt(t)]=t)}for(g=0,c=A.length;g<c;++g)l=(I=A[g]).tuple,u=I.field,(C=h[Rt(l)])>0&&(f(l,u,I.value),a.modifies(u));for(g=0,c=r.length;g<c;++g)I=r[g],u=I.filter,s.forEach((function(t){u(t)&&h[Rt(t)]>0&&f(t,I.field,I.value)})),a.modifies(I.field);if(o)a.mod=e.length||n.length?s.filter((function(t){return h[Rt(t)]>0})):s.slice();else for(C in B)a.mod.push(B[C]);return(i||null==i&&(e.length||n.length))&&a.clean(!0),a}}}var _t="_:mod:_";function Jt(){Object.defineProperty(this,_t,{writable:!0,value:{}})}var Tt=Jt.prototype;Tt.set=function(t,e,A,n){var r=this,i=r[t],o=r[_t];return null!=e&&e>=0?(i[e]!==A||n)&&(i[e]=A,o[e+":"+t]=-1,o[t]=-1):(i!==A||n)&&(r[t]=A,o[t]=Object(U.A)(A)?1+A.length:-1),r},Tt.modified=function(t,e){var A,n=this[_t];if(!arguments.length){for(A in n)if(n[A])return!0;return!1}if(Object(U.A)(t)){for(A=0;A<t.length;++A)if(n[t[A]])return!0;return!1}return null!=e&&e>=0?e+1<n[t]||!!n[e+":"+t]:!!n[t]},Tt.clear=function(){return this[_t]={},this};var jt=0,Ht=new Jt;function Yt(t,e,A,n){this.id=++jt,this.value=t,this.stamp=-1,this.rank=-1,this.qrank=-1,this.flags=0,e&&(this._update=e),A&&this.parameters(A,n)}var Vt=Yt.prototype;function Zt(t){return function(e){var A=this.flags;return 0===arguments.length?!!(A&t):(this.flags=e?A|t:A&~t,this)}}Vt.targets=function(){return this._targets||(this._targets=vt(U.w))},Vt.set=function(t){return this.value!==t?(this.value=t,1):0},Vt.skip=Zt(1),Vt.modified=Zt(2),Vt.parameters=function(t,e,A){e=!1!==e;var n,r,i,o,a=this,s=a._argval=a._argval||new Jt,g=a._argops=a._argops||[],c=[];function I(t,A,n){n instanceof Yt?(n!==a&&(e&&n.targets().add(a),c.push(n)),g.push({op:n,name:t,index:A})):s.set(t,A,n)}for(n in t)if(r=t[n],"pulse"===n)Object(U.i)(r).forEach((function(t){t instanceof Yt?t!==a&&(t.targets().add(a),c.push(t)):Object(U.n)("Pulse parameters must be operator instances.")})),a.source=r;else if(Object(U.A)(r))for(s.set(n,-1,Array(i=r.length)),o=0;o<i;++o)I(n,o,r[o]);else I(n,-1,r);return this.marshall().clear(),A&&(g.initonly=!0),c},Vt.marshall=function(t){var e,A,n,r,i,o=this._argval||Ht,a=this._argops;if(a){for(A=0,n=a.length;A<n;++A)i=(r=(e=a[A]).op).modified()&&r.stamp===t,o.set(e.name,e.index,r.value,i);if(a.initonly){for(A=0;A<n;++A)(e=a[A]).op.targets().remove(this);this._argops=null,this._update=null}}return o},Vt.detach=function(){var t,e,A,n=this._argops;if(n)for(t=0,e=n.length;t<e;++t)(A=n[t].op)._targets&&A._targets.remove(this)},Vt.evaluate=function(t){var e=this._update;if(e){var A=this.marshall(t.stamp),n=e.call(this,A,t);if(A.clear(),n!==this.value)this.value=n;else if(!this.modified())return t.StopPropagation}},Vt.run=function(t){return t.stamp<this.stamp?t.StopPropagation:(this.skip()?(this.skip(!1),e=0):e=this.evaluate(t),this.pulse=e||t);var e};var Wt=0;function Kt(t,e,A){this.id=++Wt,this.value=null,A&&(this.receive=A),t&&(this._filter=t),e&&(this._apply=e)}function Pt(t,e,A){return new Kt(t,e,A)}var qt=Kt.prototype;qt._filter=U.gb,qt._apply=U.x,qt.targets=function(){return this._targets||(this._targets=vt(U.w))},qt.consume=function(t){return arguments.length?(this._consume=!!t,this):!!this._consume},qt.receive=function(t){if(this._filter(t)){for(var e=this.value=this._apply(t),A=this._targets,n=A?A.length:0,r=0;r<n;++r)A[r].receive(e);this._consume&&(t.preventDefault(),t.stopPropagation())}},qt.filter=function(t){var e=Pt(t);return this.targets().add(e),e},qt.apply=function(t){var e=Pt(null,t);return this.targets().add(e),e},qt.merge=function(){var t=Pt();this.targets().add(t);for(var e=0,A=arguments.length;e<A;++e)arguments[e].targets().add(t);return t},qt.throttle=function(t){var e=-1;return this.filter((function(){var A=Date.now();return A-e>t?(e=A,1):0}))},qt.debounce=function(t){var e=Pt();return this.targets().add(Pt(null,null,Object(U.m)(t,(function(t){var A=t.dataflow;e.receive(t),A&&A.run&&A.run()})))),e},qt.between=function(t,e){var A=!1;return t.targets().add(Pt(null,null,(function(){A=!0}))),e.targets().add(Pt(null,null,(function(){A=!1}))),this.filter((function(){return A}))};var Xt=/^([A-Za-z]+:)?\/\//,zt=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,$t=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g;function te(t,e){return ee.apply(this,arguments)}function ee(){return(ee=Object(mt.a)(H.a.mark((function t(e,A){var n,r;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.sanitize(e,A);case 2:return n=t.sent,r=n.href,t.abrupt("return",n.localFile?this.file(r):this.http(r,A));case 5:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function Ae(t,e){return ne.apply(this,arguments)}function ne(){return(ne=Object(mt.a)(H.a.mark((function t(e,A){var n,r,i,o,a,s,g;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=Object(U.o)({},this.options,A),n=this.fileAccess,r={href:null},s=zt.test(e.replace($t,"")),null!=e&&"string"===typeof e&&s||Object(U.n)("Sanitize failure, invalid URI: "+Object(U.Z)(e)),g=Xt.test(e),(a=A.baseURL)&&!g&&(e.startsWith("/")||"/"===a[a.length-1]||(e="/"+e),e=a+e),o=(i=e.startsWith("file://"))||"file"===A.mode||"http"!==A.mode&&!g&&n,i?e=e.slice("file://".length):e.startsWith("//")&&("file"===A.defaultProtocol?(e=e.slice(2),o=!0):e=(A.defaultProtocol||"http")+":"+e),Object.defineProperty(r,"localFile",{value:!!o}),r.href=e,A.target&&(r.target=A.target+""),A.rel&&(r.rel=A.rel+""),"image"===A.context&&A.crossOrigin&&(r.crossOrigin=A.crossOrigin+""),t.abrupt("return",r);case 14:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function re(t){return t?function(e){return new Promise((function(A,n){t.readFile(e,(function(t,e){t?n(t):A(e)}))}))}:ie}function ie(){return oe.apply(this,arguments)}function oe(){return(oe=Object(mt.a)(H.a.mark((function t(){return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(U.n)("No file system access.");case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ae(t){return t?function(){var e=Object(mt.a)(H.a.mark((function e(A,n){var r,i,o;return H.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(U.o)({},this.options.http,n),i=n&&n.response,e.next=4,t(A,r);case 4:return o=e.sent,e.abrupt("return",o.ok?Object(U.D)(o[i])?o[i]():o.text():Object(U.n)(o.status+""+o.statusText));case 6:case"end":return e.stop()}}),e,this)})));return function(t,A){return e.apply(this,arguments)}}():se}function se(){return ge.apply(this,arguments)}function ge(){return(ge=Object(mt.a)(H.a.mark((function t(){return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Object(U.n)("No HTTP fetch method available.");case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ce={boolean:U.ab,integer:U.cb,number:U.cb,date:U.bb,string:U.eb,unknown:U.x},Ie=[function(t){return"true"===t||"false"===t||!0===t||!1===t},function(t){return he(t)&&Number.isInteger(+t)},he,function(t){return!Number.isNaN(Date.parse(t))}],ue=["boolean","integer","number","date"];function le(t,e){if(!t||!t.length)return"unknown";for(var A,n,r,i=t.length,o=Ie.length,a=Ie.map((function(t,e){return e+1})),s=0,g=0;s<i;++s)for(n=e?t[s][e]:t[s],A=0;A<o;++A)if(a[A]&&(null!=(r=n)&&r===r)&&!Ie[A](n)&&(a[A]=0,++g===Ie.length))return"string";return ue[a.reduce((function(t,e){return 0===t?e:t}),0)-1]}function Ce(t,e){return e.reduce((function(e,A){return e[A]=le(t,A),e}),{})}function he(t){return!Number.isNaN(+t)&&!(t instanceof Date)}var Be=A(1393);function fe(t){var e=function(e,A){var n={delimiter:t};return de(e,A?Object(U.o)(A,n):n)};return e.responseType="text",e}function de(t,e){return e.header&&(t=e.header.map(U.Z).join(e.delimiter)+"\n"+t),Object(Be.a)(e.delimiter).parse(t+"")}de.responseType="text";var Qe=A(831),Ee=function(t){return t},pe=function(t){if(null==t)return Ee;var e,A,n=t.scale[0],r=t.scale[1],i=t.translate[0],o=t.translate[1];return function(t,a){a||(e=A=0);var s=2,g=t.length,c=new Array(g);for(c[0]=(e+=t[0])*n+i,c[1]=(A+=t[1])*r+o;s<g;)c[s]=t[s],++s;return c}},ye=function(t,e){return"string"===typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return ve(t,e)}))}:ve(t,e)};function ve(t,e){var A=e.id,n=e.bbox,r=null==e.properties?{}:e.properties,i=me(t,e);return null==A&&null==n?{type:"Feature",properties:r,geometry:i}:null==n?{type:"Feature",id:A,properties:r,geometry:i}:{type:"Feature",id:A,bbox:n,properties:r,geometry:i}}function me(t,e){var A=pe(t.transform),n=t.arcs;function r(t,e){e.length&&e.pop();for(var r=n[t<0?~t:t],i=0,o=r.length;i<o;++i)e.push(A(r[i],i));t<0&&function(t,e){for(var A,n=t.length,r=n-e;r<--n;)A=t[r],t[r++]=t[n],t[n]=A}(e,o)}function i(t){return A(t)}function o(t){for(var e=[],A=0,n=t.length;A<n;++A)r(t[A],e);return e.length<2&&e.push(e[0]),e}function a(t){for(var e=o(t);e.length<4;)e.push(e[0]);return e}function s(t){return t.map(a)}return function t(e){var A,n=e.type;switch(n){case"GeometryCollection":return{type:n,geometries:e.geometries.map(t)};case"Point":A=i(e.coordinates);break;case"MultiPoint":A=e.coordinates.map(i);break;case"LineString":A=o(e.arcs);break;case"MultiLineString":A=e.arcs.map(o);break;case"Polygon":A=s(e.arcs);break;case"MultiPolygon":A=e.arcs.map(s);break;default:return null}return{type:n,coordinates:A}}(e)}var be=function(t,e){var A={},n={},r={},i=[],o=-1;function a(t,e){for(var n in t){var r=t[n];delete e[r.start],delete r.start,delete r.end,r.forEach((function(t){A[t<0?~t:t]=1})),i.push(r)}}return e.forEach((function(A,n){var r,i=t.arcs[A<0?~A:A];i.length<3&&!i[1][0]&&!i[1][1]&&(r=e[++o],e[o]=A,e[n]=r)})),e.forEach((function(e){var A,i,o=function(e){var A,n=t.arcs[e<0?~e:e],r=n[0];t.transform?(A=[0,0],n.forEach((function(t){A[0]+=t[0],A[1]+=t[1]}))):A=n[n.length-1];return e<0?[A,r]:[r,A]}(e),a=o[0],s=o[1];if(A=r[a])if(delete r[A.end],A.push(e),A.end=s,i=n[s]){delete n[i.start];var g=i===A?A:A.concat(i);n[g.start=A.start]=r[g.end=i.end]=g}else n[A.start]=r[A.end]=A;else if(A=n[s])if(delete n[A.start],A.unshift(e),A.start=a,i=r[a]){delete r[i.end];var c=i===A?A:i.concat(A);n[c.start=i.start]=r[c.end=A.end]=c}else n[A.start]=r[A.end]=A;else n[(A=[e]).start=a]=r[A.end=s]=A})),a(r,n),a(n,r),e.forEach((function(t){A[t<0?~t:t]||i.push([t])})),i},Fe=function(t){return me(t,we.apply(this,arguments))};function we(t,e,A){var n,r,i;if(arguments.length>1)n=Se(t,e,A);else for(r=0,n=new Array(i=t.arcs.length);r<i;++r)n[r]=r;return{type:"MultiLineString",arcs:be(t,n)}}function Se(t,e,A){var n,r=[],i=[];function o(t){var e=t<0?~t:t;(i[e]||(i[e]=[])).push({i:t,g:n})}function a(t){t.forEach(o)}function s(t){t.forEach(a)}return function t(e){switch(n=e,e.type){case"GeometryCollection":e.geometries.forEach(t);break;case"LineString":a(e.arcs);break;case"MultiLineString":case"Polygon":s(e.arcs);break;case"MultiPolygon":!function(t){t.forEach(s)}(e.arcs)}}(e),i.forEach(null==A?function(t){r.push(t[0].i)}:function(t){A(t[0].g,t[t.length-1].g)&&r.push(t[0].i)}),r}var De={interior:function(t,e){return t!==e},exterior:function(t,e){return t===e}};function Re(t,e){var A,n,r,i;return t=Object(Qe.a)(t,e),e&&e.feature?(A=ye,r=e.feature):e&&e.mesh?(A=Fe,r=e.mesh,i=De[e.filter]):Object(U.n)("Missing TopoJSON feature or mesh parameter."),(n=(n=t.objects[r])?A(t,n,i):Object(U.n)("Invalid TopoJSON object: "+r))&&n.features||[n]}Re.responseType="json";var Ue={dsv:de,csv:fe(","),tsv:fe("\t"),json:Qe.a,topojson:Re};function Ge(t,e){return arguments.length>1?(Ue[t]=e,this):Object(U.v)(Ue,t)?Ue[t]:null}function Ne(t){var e=Ge(t);return e&&e.responseType||"text"}var ke=function(t){var e={};return function(A){return e[A]||(e[A]=t(A))}},xe=Math.sqrt(50),Oe=Math.sqrt(10),Me=Math.sqrt(2);var Le=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _e(t){if(!(e=Le.exec(t)))throw new Error("invalid format: "+t);var e;return new Je({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Je(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}_e.prototype=Je.prototype,Je.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 Te,je,He,Ye,Ve,Ze,We=function(t,e){if((A=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var A,n=t.slice(0,A);return[n.length>1?n[0]+n.slice(2):n,+t.slice(A+1)]},Ke=function(t){return(t=We(Math.abs(t)))?t[1]:NaN},Pe=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ke(e)/3)))-Ke(Math.abs(t)))},qe=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ke(e)-Ke(t))+1},Xe=function(t){return Math.max(0,-Ke(Math.abs(t)))},ze=function(t,e){var A=We(t,e);if(!A)return t+"";var n=A[0],r=A[1];return r<0?"0."+new Array(-r).join("0")+n:n.length>r+1?n.slice(0,r+1)+"."+n.slice(r+1):n+new Array(r-n.length+2).join("0")},$e={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return ze(100*t,e)},r:ze,s:function(t,e){var A=We(t,e);if(!A)return t+"";var n=A[0],r=A[1],i=r-(Te=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+We(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},tA=function(t){return t},eA=Array.prototype.map,AA=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"],nA=function(t){var e,A,n=void 0===t.grouping||void 0===t.thousands?tA:(e=eA.call(t.grouping,Number),A=t.thousands+"",function(t,n){for(var r=t.length,i=[],o=0,a=e[0],s=0;r>0&&a>0&&(s+a+1>n&&(a=Math.max(1,n-s)),i.push(t.substring(r-=a,r+a)),!((s+=a+1)>n));)a=e[o=(o+1)%e.length];return i.reverse().join(A)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?tA:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(eA.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function I(t){var e=(t=_e(t)).fill,A=t.align,I=t.sign,u=t.symbol,l=t.zero,C=t.width,h=t.comma,B=t.precision,f=t.trim,d=t.type;"n"===d?(h=!0,d="g"):$e[d]||(void 0===B&&(B=12),f=!0,d="g"),(l||"0"===e&&"="===A)&&(l=!0,e="0",A="=");var Q="$"===u?r:"#"===u&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",E="$"===u?i:/[%p]/.test(d)?s:"",p=$e[d],y=/[defgprs%]/.test(d);function v(t){var r,i,s,u=Q,v=E;if("c"===d)v=p(t)+v,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:p(Math.abs(t),B),f&&(t=function(t){t:for(var e,A=t.length,n=1,r=-1;n<A;++n)switch(t[n]){case".":r=e=n;break;case"0":0===r&&(r=n),e=n;break;default:if(!+t[n])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),m&&0===+t&&"+"!==I&&(m=!1),u=(m?"("===I?I:g:"-"===I||"("===I?"":I)+u,v=("s"===d?AA[8+Te/3]:"")+v+(m&&"("===I?")":""),y)for(r=-1,i=t.length;++r<i;)if(48>(s=t.charCodeAt(r))||s>57){v=(46===s?o+t.slice(r+1):t.slice(r))+v,t=t.slice(0,r);break}}h&&!l&&(t=n(t,1/0));var b=u.length+t.length+v.length,F=b<C?new Array(C-b+1).join(e):"";switch(h&&l&&(t=n(F+t,F.length?C-v.length:1/0),F=""),A){case"<":t=u+t+v+F;break;case"=":t=u+F+t+v;break;case"^":t=F.slice(0,b=F.length>>1)+u+t+v+F.slice(b);break;default:t=F+u+t+v}return a(t)}return B=void 0===B?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B)),v.toString=function(){return t+""},v}return{format:I,formatPrefix:function(t,e){var A=I(((t=_e(t)).type="f",t)),n=3*Math.max(-8,Math.min(8,Math.floor(Ke(e)/3))),r=Math.pow(10,-n),i=AA[8+n/3];return function(t){return A(r*t)+i}}}};function rA(t){var e=ke(t.format),A=t.formatPrefix;return{format:e,formatPrefix:A,formatFloat:function(t){var A=_e(t||",");if(null==A.precision){switch(A.precision=12,A.type){case"%":A.precision-=2;break;case"e":A.precision-=1}return function(t,e){return function(A){var n,r,i=t(A),o=i.indexOf(e);if(o<0)return i;for(r=(n=function(t,e){var A,n=t.lastIndexOf("e");if(n>0)return n;for(n=t.length;--n>e;)if((A=t.charCodeAt(n))>=48&&A<=57)return n+1}(i,o))<i.length?i.slice(n):"";--n>o;)if("0"!==i[n]){++n;break}return i.slice(0,n)+r}}(e(A),e(".1f")(1)[1])}return e(A)},formatSpan:function(t,n,r,i){i=_e(null==i?",f":i);var o,a=function(t,e,A){var n=Math.abs(e-t)/Math.max(0,A),r=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/r;return i>=xe?r*=10:i>=Oe?r*=5:i>=Me&&(r*=2),e<t?-r:r}(t,n,r),s=Math.max(Math.abs(t),Math.abs(n));if(null==i.precision)switch(i.type){case"s":return isNaN(o=Pe(a,s))||(i.precision=o),A(i,s);case"":case"e":case"g":case"p":case"r":isNaN(o=qe(a,s))||(i.precision=o-("e"===i.type));break;case"f":case"%":isNaN(o=Xe(a))||(i.precision=o-2*("%"===i.type))}return e(i)}}}function iA(){return Ve=rA({format:He,formatPrefix:Ye})}function oA(t){return rA(nA(t))}function aA(t){return arguments.length?Ve=oA(t):Ve}je=nA({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),He=je.format,Ye=je.formatPrefix,iA();var sA="year",gA="quarter",cA="month",IA="week",uA="date",lA="day",CA="dayofyear",hA="hours",BA="minutes",fA="seconds",dA="milliseconds",QA=[sA,gA,cA,IA,uA,lA,CA,hA,BA,fA,dA],EA=QA.reduce((function(t,e,A){return t[e]=1+A,t}),{});function pA(t){var e=Object(U.i)(t).slice(),A={};return e.length||Object(U.n)("Missing time unit."),e.forEach((function(t){Object(U.v)(EA,t)?A[t]=1:Object(U.n)("Invalid time unit: ".concat(t,"."))})),(A[IA]||A[lA]?1:0)+(A[gA]||A[cA]||A[uA]?1:0)+(A[CA]?1:0)>1&&Object(U.n)("Incompatible time units: ".concat(t)),e.sort((function(t,e){return EA[t]-EA[e]})),e}var yA=(Ze={},Object(E.a)(Ze,sA,"%Y "),Object(E.a)(Ze,gA,"Q%q "),Object(E.a)(Ze,cA,"%b "),Object(E.a)(Ze,uA,"%d "),Object(E.a)(Ze,IA,"W%U "),Object(E.a)(Ze,lA,"%a "),Object(E.a)(Ze,CA,"%j "),Object(E.a)(Ze,hA,"%H:00"),Object(E.a)(Ze,BA,"00:%M"),Object(E.a)(Ze,fA,":%S"),Object(E.a)(Ze,dA,".%L"),Object(E.a)(Ze,"".concat(sA,"-").concat(cA),"%Y-%m "),Object(E.a)(Ze,"".concat(sA,"-").concat(cA,"-").concat(uA),"%Y-%m-%d "),Object(E.a)(Ze,"".concat(hA,"-").concat(BA),"%H:%M"),Ze);function vA(t,e){var A,n,r=Object(U.o)({},yA,e),i=pA(t),o=i.length,a="",s=0;for(s=0;s<o;)for(A=i.length;A>s;--A)if(null!=r[n=i.slice(s,A).join("-")]){a+=r[n],s=A;break}return a.trim()}var mA=new Date,bA=new Date;function FA(t,e,A,n){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=function(e){return t(e=new Date(+e)),e},r.ceil=function(A){return t(A=new Date(A-1)),e(A,1),t(A),A},r.round=function(t){var e=r(t),A=r.ceil(t);return t-e<A-t?e:A},r.offset=function(t,A){return e(t=new Date(+t),null==A?1:Math.floor(A)),t},r.range=function(A,n,i){var o,a=[];if(A=r.ceil(A),i=null==i?1:Math.floor(i),!(A<n)||!(i>0))return a;do{a.push(o=new Date(+A)),e(A,i),t(A)}while(o<A&&A<n);return a},r.filter=function(A){return FA((function(e){if(e>=e)for(;t(e),!A(e);)e.setTime(e-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!A(t););else for(;--n>=0;)for(;e(t,1),!A(t););}))},A&&(r.count=function(e,n){return mA.setTime(+e),bA.setTime(+n),t(mA),t(bA),Math.floor(A(mA,bA))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(n?function(e){return n(e)%t===0}:function(e){return r.count(0,e)%t===0}):r:null}),r}var wA=FA((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),SA=wA;wA.range;function DA(t){return FA((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var RA=DA(0),UA=DA(1),GA=DA(2),NA=DA(3),kA=DA(4),xA=DA(5),OA=DA(6),MA=(RA.range,UA.range,GA.range,NA.range,kA.range,xA.range,OA.range,FA((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),LA=MA;MA.range;function _A(t){return FA((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var JA,TA,jA,HA,YA=_A(0),VA=_A(1),ZA=_A(2),WA=_A(3),KA=_A(4),PA=_A(5),qA=_A(6),XA=(YA.range,VA.range,ZA.range,WA.range,KA.range,PA.range,qA.range,new Date);function zA(t){return XA.setFullYear(t),XA.setMonth(0),XA.setDate(1),XA.setHours(0,0,0,0),XA}function $A(t){return en(new Date(t))}function tn(t){return An(new Date(t))}function en(t){return SA.count(zA(t.getFullYear())-1,t)}function An(t){return RA.count(zA(t.getFullYear())-1,t)}function nn(t){return zA(t).getDay()}function rn(t,e,A,n,r,i,o){if(0<=t&&t<100){var a=new Date(-1,e,A,n,r,i,o);return a.setFullYear(t),a}return new Date(t,e,A,n,r,i,o)}function on(t){return sn(new Date(t))}function an(t){return gn(new Date(t))}function sn(t){var e=Date.UTC(t.getUTCFullYear(),0,1);return LA.count(e-1,t)}function gn(t){var e=Date.UTC(t.getUTCFullYear(),0,1);return YA.count(e-1,t)}function cn(t){return XA.setTime(Date.UTC(t,0,1)),XA.getUTCDay()}function In(t,e,A,n,r,i,o){if(0<=t&&t<100){var a=new Date(Date.UTC(-1,e,A,n,r,i,o));return a.setUTCFullYear(A.y),a}return new Date(Date.UTC(t,e,A,n,r,i,o))}function un(t,e,A,n,r){var i=e||1,o=Object(U.U)(t),a=function(t,e,r){return function(t,e,A,n){var r=A<=1?t:n?function(e,r){return n+A*Math.floor((t(e,r)-n)/A)}:function(e,n){return A*Math.floor(t(e,n)/A)};return e?function(t,A){return e(r(t,A),A)}:r}(A[r=r||t],n[r],t===o&&i,e)},s=new Date,g=Object(U.db)(t),c=g[sA]?a(sA):Object(U.l)(2012),I=g[cA]?a(cA):g[gA]?a(gA):U.kb,u=g[IA]&&g[lA]?a(lA,1,IA+lA):g[IA]?a(IA,1):g[lA]?a(lA,1):g[uA]?a(uA,1):g[CA]?a(CA,1):U.O,l=g[hA]?a(hA):U.kb,C=g[BA]?a(BA):U.kb,h=g[fA]?a(fA):U.kb,B=g[dA]?a(dA):U.kb;return function(t){s.setTime(+t);var e=c(s);return r(e,I(s),u(s,e),l(s),C(s),h(s),B(s))}}function ln(t,e,A){return e+7*t-(A+6)%7}var Cn=(JA={},Object(E.a)(JA,sA,(function(t){return t.getFullYear()})),Object(E.a)(JA,gA,(function(t){return Math.floor(t.getMonth()/3)})),Object(E.a)(JA,cA,(function(t){return t.getMonth()})),Object(E.a)(JA,uA,(function(t){return t.getDate()})),Object(E.a)(JA,hA,(function(t){return t.getHours()})),Object(E.a)(JA,BA,(function(t){return t.getMinutes()})),Object(E.a)(JA,fA,(function(t){return t.getSeconds()})),Object(E.a)(JA,dA,(function(t){return t.getMilliseconds()})),Object(E.a)(JA,CA,(function(t){return en(t)})),Object(E.a)(JA,IA,(function(t){return An(t)})),Object(E.a)(JA,IA+lA,(function(t,e){return ln(An(t),t.getDay(),nn(e))})),Object(E.a)(JA,lA,(function(t,e){return ln(1,t.getDay(),nn(e))})),JA),hn=(TA={},Object(E.a)(TA,gA,(function(t){return 3*t})),Object(E.a)(TA,IA,(function(t,e){return ln(t,0,nn(e))})),TA);function Bn(t,e){return un(t,e||1,Cn,hn,rn)}var fn=(jA={},Object(E.a)(jA,sA,(function(t){return t.getUTCFullYear()})),Object(E.a)(jA,gA,(function(t){return Math.floor(t.getUTCMonth()/3)})),Object(E.a)(jA,cA,(function(t){return t.getUTCMonth()})),Object(E.a)(jA,uA,(function(t){return t.getUTCDate()})),Object(E.a)(jA,hA,(function(t){return t.getUTCHours()})),Object(E.a)(jA,BA,(function(t){return t.getUTCMinutes()})),Object(E.a)(jA,fA,(function(t){return t.getUTCSeconds()})),Object(E.a)(jA,dA,(function(t){return t.getUTCMilliseconds()})),Object(E.a)(jA,CA,(function(t){return sn(t)})),Object(E.a)(jA,IA,(function(t){return gn(t)})),Object(E.a)(jA,lA,(function(t,e){return ln(1,t.getUTCDay(),cn(e))})),Object(E.a)(jA,IA+lA,(function(t,e){return ln(gn(t),t.getUTCDay(),cn(e))})),jA),dn=(HA={},Object(E.a)(HA,gA,(function(t){return 3*t})),Object(E.a)(HA,IA,(function(t,e){return ln(t,0,cn(e))})),HA);function Qn(t,e){return un(t,e||1,fn,dn,In)}var En=FA((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));En.every=function(t){return isFinite(t=Math.floor(t))&&t>0?FA((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,A){e.setFullYear(e.getFullYear()+A*t)})):null};var pn=En,yn=(En.range,FA((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),vn=yn,mn=(yn.range,FA((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),bn=mn,Fn=(mn.range,FA((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()}))),wn=Fn,Sn=(Fn.range,FA((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),Dn=Sn,Rn=(Sn.range,FA((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));Rn.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?FA((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,A){e.setTime(+e+A*t)}),(function(e,A){return(A-e)/t})):Rn:null};var Un=Rn,Gn=(Rn.range,FA((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Gn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?FA((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,A){e.setUTCFullYear(e.getUTCFullYear()+A*t)})):null};var Nn,kn,xn=Gn,On=(Gn.range,FA((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}))),Mn=On,Ln=(On.range,FA((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),_n=Ln,Jn=(Ln.range,FA((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()}))),Tn=Jn,jn=(Jn.range,Nn={},Object(E.a)(Nn,sA,pn),Object(E.a)(Nn,gA,vn.every(3)),Object(E.a)(Nn,cA,vn),Object(E.a)(Nn,IA,RA),Object(E.a)(Nn,uA,SA),Object(E.a)(Nn,lA,SA),Object(E.a)(Nn,CA,SA),Object(E.a)(Nn,hA,bn),Object(E.a)(Nn,BA,wn),Object(E.a)(Nn,fA,Dn),Object(E.a)(Nn,dA,Un),Nn),Hn=(kn={},Object(E.a)(kn,sA,xn),Object(E.a)(kn,gA,Mn.every(3)),Object(E.a)(kn,cA,Mn),Object(E.a)(kn,IA,YA),Object(E.a)(kn,uA,LA),Object(E.a)(kn,lA,LA),Object(E.a)(kn,CA,LA),Object(E.a)(kn,hA,_n),Object(E.a)(kn,BA,Tn),Object(E.a)(kn,fA,Dn),Object(E.a)(kn,dA,Un),kn);function Yn(t){return jn[t]}function Vn(t){return Hn[t]}function Zn(t,e,A){return t?t.offset(e,A):void 0}function Wn(t,e,A){return Zn(Yn(t),e,A)}function Kn(t,e,A){return Zn(Vn(t),e,A)}function Pn(t,e,A,n){return t?t.range(e,A,n):void 0}function qn(t,e,A,n){return Pn(Yn(t),e,A,n)}function Xn(t,e,A,n){return Pn(Vn(t),e,A,n)}var zn=function(t){var e;return 1===t.length&&(e=t,t=function(t,A){return(n=e(t))<(r=A)?-1:n>r?1:n>=r?0:NaN;var n,r}),{left:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)<0?n=i+1:r=i}return n},right:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)>0?r=i:n=i+1}return n}}};var $n=Math.sqrt(50),tr=Math.sqrt(10),er=Math.sqrt(2);function Ar(t,e,A){var n=Math.abs(e-t)/Math.max(0,A),r=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/r;return i>=$n?r*=10:i>=tr?r*=5:i>=er&&(r*=2),e<t?-r:r}var nr=[sA,cA,uA,hA,BA,fA,dA],rr=nr.slice(0,-1),ir=rr.slice(0,-1),or=ir.slice(0,-1),ar=or.slice(0,-1),sr=[sA,cA],gr=[sA],cr=[[rr,1,1e3],[rr,5,5e3],[rr,15,15e3],[rr,30,3e4],[ir,1,6e4],[ir,5,3e5],[ir,15,9e5],[ir,30,18e5],[or,1,36e5],[or,3,108e5],[or,6,216e5],[or,12,432e5],[ar,1,864e5],[[sA,IA],1,6048e5],[sr,1,2592e6],[sr,3,7776e6],[gr,1,31536e6]],Ir=function(t){var e,A,n=t.extent,r=t.maxbins||40,i=Math.abs(Object(U.X)(n))/r,o=zn((function(t){return t[2]})).right(cr,i);return o===cr.length?(e=gr,A=Ar(n[0]/31536e6,n[1]/31536e6,r)):o?(e=(o=cr[i/cr[o-1][2]<cr[o][2]/i?o-1:o])[0],A=o[1]):(e=nr,A=Math.max(Ar(n[0],n[1],r),1)),{units:e,step:A}};function ur(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function lr(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Cr(t,e,A){return{y:t,m:e,d:A,H:0,M:0,S:0,L:0}}function hr(t){var e=t.dateTime,A=t.date,n=t.time,r=t.periods,i=t.days,o=t.shortDays,a=t.months,s=t.shortMonths,g=Sr(r),c=Dr(r),I=Sr(i),u=Dr(i),l=Sr(o),C=Dr(o),h=Sr(a),B=Dr(a),f=Sr(s),d=Dr(s),Q={a:function(t){return o[t.getDay()]},A:function(t){return i[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:qr,e:qr,f:ei,H:Xr,I:zr,j:$r,L:ti,m:Ai,M:ni,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ui,s:Gi,S:ri,u:ii,U:oi,V:ai,w:si,W:gi,x:null,X:null,y:ci,Y:Ii,Z:ui,"%":Ri},E={a:function(t){return o[t.getUTCDay()]},A:function(t){return i[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:li,e:li,f:di,H:Ci,I:hi,j:Bi,L:fi,m:Qi,M:Ei,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ui,s:Gi,S:pi,u:yi,U:vi,V:mi,w:bi,W:Fi,x:null,X:null,y:wi,Y:Si,Z:Di,"%":Ri},p={a:function(t,e,A){var n=l.exec(e.slice(A));return n?(t.w=C[n[0].toLowerCase()],A+n[0].length):-1},A:function(t,e,A){var n=I.exec(e.slice(A));return n?(t.w=u[n[0].toLowerCase()],A+n[0].length):-1},b:function(t,e,A){var n=f.exec(e.slice(A));return n?(t.m=d[n[0].toLowerCase()],A+n[0].length):-1},B:function(t,e,A){var n=h.exec(e.slice(A));return n?(t.m=B[n[0].toLowerCase()],A+n[0].length):-1},c:function(t,A,n){return m(t,e,A,n)},d:Jr,e:Jr,f:Zr,H:jr,I:jr,j:Tr,L:Vr,m:_r,M:Hr,p:function(t,e,A){var n=g.exec(e.slice(A));return n?(t.p=c[n[0].toLowerCase()],A+n[0].length):-1},q:Lr,Q:Kr,s:Pr,S:Yr,u:Ur,U:Gr,V:Nr,w:Rr,W:kr,x:function(t,e,n){return m(t,A,e,n)},X:function(t,e,A){return m(t,n,e,A)},y:Or,Y:xr,Z:Mr,"%":Wr};function y(t,e){return function(A){var n,r,i,o=[],a=-1,s=0,g=t.length;for(A instanceof Date||(A=new Date(+A));++a<g;)37===t.charCodeAt(a)&&(o.push(t.slice(s,a)),null!=(r=yr[n=t.charAt(++a)])?n=t.charAt(++a):r="e"===n?" ":"0",(i=e[n])&&(n=i(A,r)),o.push(n),s=a+1);return o.push(t.slice(s,a)),o.join("")}}function v(t,e){return function(A){var n,r,i=Cr(1900,void 0,1);if(m(i,t,A+="",0)!=A.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(e&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(r=(n=lr(Cr(i.y,0,1))).getUTCDay(),n=r>4||0===r?VA.ceil(n):VA(n),n=LA.offset(n,7*(i.V-1)),i.y=n.getUTCFullYear(),i.m=n.getUTCMonth(),i.d=n.getUTCDate()+(i.w+6)%7):(r=(n=ur(Cr(i.y,0,1))).getDay(),n=r>4||0===r?UA.ceil(n):UA(n),n=SA.offset(n,7*(i.V-1)),i.y=n.getFullYear(),i.m=n.getMonth(),i.d=n.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?lr(Cr(i.y,0,1)).getUTCDay():ur(Cr(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,lr(i)):ur(i)}}function m(t,e,A,n){for(var r,i,o=0,a=e.length,s=A.length;o<a;){if(n>=s)return-1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(i=p[r in yr?e.charAt(o++):r])||(n=i(t,A,n))<0)return-1}else if(r!=A.charCodeAt(n++))return-1}return n}return Q.x=y(A,Q),Q.X=y(n,Q),Q.c=y(e,Q),E.x=y(A,E),E.X=y(n,E),E.c=y(e,E),{format:function(t){var e=y(t+="",Q);return e.toString=function(){return t},e},parse:function(t){var e=v(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=y(t+="",E);return e.toString=function(){return t},e},utcParse:function(t){var e=v(t+="",!0);return e.toString=function(){return t},e}}}var Br,fr,dr,Qr,Er,pr,yr={"-":"",_:" ",0:"0"},vr=/^\s*\d+/,mr=/^%/,br=/[\\^$*+?|[\]().{}]/g;function Fr(t,e,A){var n=t<0?"-":"",r=(n?-t:t)+"",i=r.length;return n+(i<A?new Array(A-i+1).join(e)+r:r)}function wr(t){return t.replace(br,"\\$&")}function Sr(t){return new RegExp("^(?:"+t.map(wr).join("|")+")","i")}function Dr(t){for(var e={},A=-1,n=t.length;++A<n;)e[t[A].toLowerCase()]=A;return e}function Rr(t,e,A){var n=vr.exec(e.slice(A,A+1));return n?(t.w=+n[0],A+n[0].length):-1}function Ur(t,e,A){var n=vr.exec(e.slice(A,A+1));return n?(t.u=+n[0],A+n[0].length):-1}function Gr(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.U=+n[0],A+n[0].length):-1}function Nr(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.V=+n[0],A+n[0].length):-1}function kr(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.W=+n[0],A+n[0].length):-1}function xr(t,e,A){var n=vr.exec(e.slice(A,A+4));return n?(t.y=+n[0],A+n[0].length):-1}function Or(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),A+n[0].length):-1}function Mr(t,e,A){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(A,A+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),A+n[0].length):-1}function Lr(t,e,A){var n=vr.exec(e.slice(A,A+1));return n?(t.q=3*n[0]-3,A+n[0].length):-1}function _r(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.m=n[0]-1,A+n[0].length):-1}function Jr(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.d=+n[0],A+n[0].length):-1}function Tr(t,e,A){var n=vr.exec(e.slice(A,A+3));return n?(t.m=0,t.d=+n[0],A+n[0].length):-1}function jr(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.H=+n[0],A+n[0].length):-1}function Hr(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.M=+n[0],A+n[0].length):-1}function Yr(t,e,A){var n=vr.exec(e.slice(A,A+2));return n?(t.S=+n[0],A+n[0].length):-1}function Vr(t,e,A){var n=vr.exec(e.slice(A,A+3));return n?(t.L=+n[0],A+n[0].length):-1}function Zr(t,e,A){var n=vr.exec(e.slice(A,A+6));return n?(t.L=Math.floor(n[0]/1e3),A+n[0].length):-1}function Wr(t,e,A){var n=mr.exec(e.slice(A,A+1));return n?A+n[0].length:-1}function Kr(t,e,A){var n=vr.exec(e.slice(A));return n?(t.Q=+n[0],A+n[0].length):-1}function Pr(t,e,A){var n=vr.exec(e.slice(A));return n?(t.s=+n[0],A+n[0].length):-1}function qr(t,e){return Fr(t.getDate(),e,2)}function Xr(t,e){return Fr(t.getHours(),e,2)}function zr(t,e){return Fr(t.getHours()%12||12,e,2)}function $r(t,e){return Fr(1+SA.count(pn(t),t),e,3)}function ti(t,e){return Fr(t.getMilliseconds(),e,3)}function ei(t,e){return ti(t,e)+"000"}function Ai(t,e){return Fr(t.getMonth()+1,e,2)}function ni(t,e){return Fr(t.getMinutes(),e,2)}function ri(t,e){return Fr(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return 0===e?7:e}function oi(t,e){return Fr(RA.count(pn(t)-1,t),e,2)}function ai(t,e){var A=t.getDay();return t=A>=4||0===A?kA(t):kA.ceil(t),Fr(kA.count(pn(t),t)+(4===pn(t).getDay()),e,2)}function si(t){return t.getDay()}function gi(t,e){return Fr(UA.count(pn(t)-1,t),e,2)}function ci(t,e){return Fr(t.getFullYear()%100,e,2)}function Ii(t,e){return Fr(t.getFullYear()%1e4,e,4)}function ui(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Fr(e/60|0,"0",2)+Fr(e%60,"0",2)}function li(t,e){return Fr(t.getUTCDate(),e,2)}function Ci(t,e){return Fr(t.getUTCHours(),e,2)}function hi(t,e){return Fr(t.getUTCHours()%12||12,e,2)}function Bi(t,e){return Fr(1+LA.count(xn(t),t),e,3)}function fi(t,e){return Fr(t.getUTCMilliseconds(),e,3)}function di(t,e){return fi(t,e)+"000"}function Qi(t,e){return Fr(t.getUTCMonth()+1,e,2)}function Ei(t,e){return Fr(t.getUTCMinutes(),e,2)}function pi(t,e){return Fr(t.getUTCSeconds(),e,2)}function yi(t){var e=t.getUTCDay();return 0===e?7:e}function vi(t,e){return Fr(YA.count(xn(t)-1,t),e,2)}function mi(t,e){var A=t.getUTCDay();return t=A>=4||0===A?KA(t):KA.ceil(t),Fr(KA.count(xn(t),t)+(4===xn(t).getUTCDay()),e,2)}function bi(t){return t.getUTCDay()}function Fi(t,e){return Fr(VA.count(xn(t)-1,t),e,2)}function wi(t,e){return Fr(t.getUTCFullYear()%100,e,2)}function Si(t,e){return Fr(t.getUTCFullYear()%1e4,e,4)}function Di(){return"+0000"}function Ri(){return"%"}function Ui(t){return+t}function Gi(t){return Math.floor(+t/1e3)}function Ni(t,e,A){A=A||{},Object(U.F)(A)||Object(U.n)("Invalid time multi-format specifier: ".concat(A));var n=e(fA),r=e(BA),i=e(hA),o=e(uA),a=e(IA),s=e(cA),g=e(gA),c=e(sA),I=t(A[dA]||".%L"),u=t(A[fA]||":%S"),l=t(A[BA]||"%I:%M"),C=t(A[hA]||"%I %p"),h=t(A[uA]||A[lA]||"%a %d"),B=t(A[IA]||"%b %d"),f=t(A[cA]||"%B"),d=t(A[gA]||"%B"),Q=t(A[sA]||"%Y");return function(t){return(n(t)<t?I:r(t)<t?u:i(t)<t?l:o(t)<t?C:s(t)<t?a(t)<t?h:B:c(t)<t?g(t)<t?f:d:Q)(t)}}function ki(t){var e=ke(t.format),A=ke(t.utcFormat);return{timeFormat:function(t){return Object(U.H)(t)?e(t):Ni(e,Yn,t)},utcFormat:function(t){return Object(U.H)(t)?A(t):Ni(A,Vn,t)},timeParse:ke(t.parse),utcParse:ke(t.utcParse)}}function xi(){return pr=ki({format:fr,parse:dr,utcFormat:Qr,utcParse:Er})}function Oi(t){return ki(hr(t))}function Mi(t){return arguments.length?pr=Oi(t):pr}!function(t){Br=hr(t),fr=Br.format,dr=Br.parse,Qr=Br.utcFormat,Er=Br.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"]}),xi();var Li=function(t,e){return Object(U.o)({},t,e)};function _i(t,e){var A=t?oA(t):aA(),n=e?Oi(e):Mi();return Li(A,n)}function Ji(t,e){var A=arguments.length;return A&&2!==A&&Object(U.n)("defaultLocale expects either zero or two arguments."),A?Li(aA(t),Mi(e)):Li(aA(),Mi())}function Ti(){return iA(),xi(),Ji()}var ji=function(t,e,A,n){var r=Ge((e=e||{}).type||"json");return r||Object(U.n)("Unknown data format type: "+e.type),t=r(t,e),e.parse&&function(t,e,A,n){if(!t.length)return;var r=Mi();A=A||r.timeParse,n=n||r.utcParse;var i,o,a,s,g,c,I,u=t.columns||Object.keys(t[0]);"auto"===e&&(e=Ce(t,u));for(u=Object.keys(e),i=u.map((function(t){var r,i,o=e[t];if(o&&(o.startsWith("date:")||o.startsWith("utc:")))return("'"===(i=(r=o.split(/:(.+)?/,2))[1])[0]&&"'"===i[i.length-1]||'"'===i[0]&&'"'===i[i.length-1])&&(i=i.slice(1,-1)),("utc"===r[0]?n:A)(i);if(!ce[o])throw Error("Illegal format pattern: "+t+":"+o);return ce[o]})),s=0,c=t.length,I=u.length;s<c;++s)for(o=t[s],g=0;g<I;++g)a=u[g],o[a]=i[g](o[a])}(t,e.parse,A,n),Object(U.v)(t,"columns")&&delete t.columns,t};var Hi=function(t,e){return function(A){return{options:A||{},sanitize:Ae,load:te,fileAccess:!!e,file:re(e),http:ae(t)}}}("undefined"!==typeof fetch&&fetch,null);function Yi(){return(Yi=Object(mt.a)(H.a.mark((function t(e,A){var n,r,i;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this,r=0,t.prev=2,t.next=5,n.loader().load(e,{context:"dataflow",response:Ne(A&&A.type)});case 5:i=t.sent;try{i=n.parse(i,A)}catch(o){r=-2,n.warn("Data ingestion failed",e,o)}t.next=13;break;case 9:t.prev=9,t.t0=t.catch(2),r=-1,n.warn("Loading failed",e,t.t0);case 13:return t.abrupt("return",{data:i,status:r});case 14:case"end":return t.stop()}}),t,this,[[2,9]])})))).apply(this,arguments)}function Vi(){return(Vi=Object(mt.a)(H.a.mark((function t(e,A,n){var r,i,o;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(i=(r=this)._pending||Zi(r)).requests+=1,t.next=4,r.request(A,n);case 4:return o=t.sent,r.pulse(e,r.changeset().remove(U.gb).insert(o.data||[])),i.done(),t.abrupt("return",o);case 8:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function Zi(t){var e,A=new Promise((function(t){e=t}));return A.requests=0,A.done=function(){0===--A.requests&&(t._pending=null,e(t))},t._pending=A}var Wi={skip:!0};function Ki(t,e,A,n,r,i){var o,a,s=Object(U.o)({},i,Wi);Object(U.D)(A)||(A=Object(U.l)(A)),void 0===n?o=function(e){return t.touch(A(e))}:Object(U.D)(n)?(a=new Yt(null,n,r,!1),o=function(e){a.evaluate(e);var n=A(e),r=a.value;Mt(r)?t.pulse(n,r,i):t.update(n,r,s)}):o=function(e){return t.update(A(e),n,s)},e.apply(o)}function Pi(t,e,A,n,r,i){if(void 0===n)e.targets().add(A);else{var o=i||{},a=new Yt(null,function(t,e){return e=Object(U.D)(e)?e:Object(U.l)(e),t?function(A,n){var r=e(A,n);return t.skip()||(t.skip(r!==this.value).value=r),r}:e}(A,n),r,!1);a.modified(o.force),a.rank=e.rank,e.targets().add(a),A&&(a.skip(!0),a.value=A.value,a.targets().add(A),t.connect(A,[a]))}}var qi={};function Xi(t,e,A){this.dataflow=t,this.stamp=null==e?-1:e,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=A||null}var zi=Xi.prototype;function $i(t,e){return t?function(A,n){return t(A,n)&&e(A,n)}:e}function to(t,e){var A=[];return Object(U.ib)(t,e,(function(t){return A.push(t)})),A}function eo(t,e){var A={};return t.visit(e,(function(t){A[Rt(t)]=1})),function(t){return A[Rt(t)]?null:t}}function Ao(t,e,A,n){var r,i,o,a,s,g=this,c=0;for(this.dataflow=t,this.stamp=e,this.fields=null,this.encode=n||null,this.pulses=A,o=0,a=A.length;o<a;++o)if((r=A[o]).stamp===e){if(r.fields)for(s in i=g.fields||(g.fields={}),r.fields)i[s]=1;r.changed(g.ADD)&&(c|=g.ADD),r.changed(g.REM)&&(c|=g.REM),r.changed(g.MOD)&&(c|=g.MOD)}this.changes=c}zi.StopPropagation=qi,zi.ADD=1,zi.REM=2,zi.MOD=4,zi.ADD_REM=3,zi.ADD_MOD=5,zi.ALL=7,zi.REFLOW=8,zi.SOURCE=16,zi.NO_SOURCE=32,zi.NO_FIELDS=64,zi.fork=function(t){return new Xi(this.dataflow).init(this,t)},zi.clone=function(){var t=this.fork(7);return t.add=t.add.slice(),t.rem=t.rem.slice(),t.mod=t.mod.slice(),t.source&&(t.source=t.source.slice()),t.materialize(23)},zi.addAll=function(){var t=this;return t.source&&t.source.length!==t.add.length?((t=new Xi(this.dataflow).init(this)).add=t.source,t):t},zi.init=function(t,e){var A=this;return A.stamp=t.stamp,A.encode=t.encode,!t.fields||64&e||(A.fields=t.fields),1&e?(A.addF=t.addF,A.add=t.add):(A.addF=null,A.add=[]),2&e?(A.remF=t.remF,A.rem=t.rem):(A.remF=null,A.rem=[]),4&e?(A.modF=t.modF,A.mod=t.mod):(A.modF=null,A.mod=[]),32&e?(A.srcF=null,A.source=null):(A.srcF=t.srcF,A.source=t.source,t.cleans&&(A.cleans=t.cleans)),A},zi.runAfter=function(t){this.dataflow.runAfter(t)},zi.changed=function(t){var e=t||7;return 1&e&&this.add.length||2&e&&this.rem.length||4&e&&this.mod.length},zi.reflow=function(t){if(t)return this.fork(7).reflow();var e=this.add.length,A=this.source&&this.source.length;return A&&A!==e&&(this.mod=this.source,e&&this.filter(4,eo(this,1))),this},zi.clean=function(t){return arguments.length?(this.cleans=!!t,this):this.cleans},zi.modifies=function(t){var e=this.fields||(this.fields={});return Object(U.A)(t)?t.forEach((function(t){return e[t]=!0})):e[t]=!0,this},zi.modified=function(t,e){var A=this.fields;return!(!e&&!this.mod.length||!A)&&(arguments.length?Object(U.A)(t)?t.some((function(t){return A[t]})):A[t]:!!A)},zi.filter=function(t,e){var A=this;return 1&t&&(A.addF=$i(A.addF,e)),2&t&&(A.remF=$i(A.remF,e)),4&t&&(A.modF=$i(A.modF,e)),16&t&&(A.srcF=$i(A.srcF,e)),A},zi.materialize=function(t){var e=this;return 1&(t=t||7)&&e.addF&&(e.add=to(e.add,e.addF),e.addF=null),2&t&&e.remF&&(e.rem=to(e.rem,e.remF),e.remF=null),4&t&&e.modF&&(e.mod=to(e.mod,e.modF),e.modF=null),16&t&&e.srcF&&(e.source=e.source.filter(e.srcF),e.srcF=null),e},zi.visit=function(t,e){var A,n,r=this,i=e;return 16&t?(Object(U.ib)(r.source,r.srcF,i),r):(1&t&&Object(U.ib)(r.add,r.addF,i),2&t&&Object(U.ib)(r.rem,r.remF,i),4&t&&Object(U.ib)(r.mod,r.modF,i),8&t&&(A=r.source)&&((n=r.add.length+r.mod.length)===A.length||(n?Object(U.ib)(A,eo(r,5),i):Object(U.ib)(A,r.srcF,i))),r)};var no=Object(U.y)(Ao,Xi);function ro(){return(ro=Object(mt.a)(H.a.mark((function t(e,A,n){var r,i,o,a,s,g,c,I,u;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=[],!(r=this)._pulse){t.next=3;break}return t.abrupt("return",oo(r));case 3:if(!r._pending){t.next=6;break}return t.next=6,r._pending;case 6:if(!A){t.next=9;break}return t.next=9,bt(r,A);case 9:if(r._touched.length){t.next=12;break}return r.debug("Dataflow invoked, but nothing to do."),t.abrupt("return",r);case 12:o=++r._clock,r._pulse=new Xi(r,o,e),r._touched.forEach((function(t){return r._enqueue(t,!0)})),r._touched=vt(U.w),a=0,t.prev=17;case 18:if(!(r._heap.size()>0)){t.next=35;break}if((s=r._heap.pop()).rank===s.qrank){t.next=23;break}return r._enqueue(s,!0),t.abrupt("continue",18);case 23:if(!(g=s.run(r._getPulse(s,e))).then){t.next=30;break}return t.next=27,g;case 27:g=t.sent,t.next=31;break;case 30:g.async&&(i.push(g.async),g=qi);case 31:g!==qi&&s._targets&&s._targets.forEach((function(t){return r._enqueue(t)})),++a,t.next=18;break;case 35:t.next=41;break;case 37:t.prev=37,t.t0=t.catch(17),r._heap.clear(),c=t.t0;case 41:if(r._input={},r._pulse=null,r.debug("Pulse ".concat(o,": ").concat(a," operators")),c&&(r._postrun=[],r.error(c)),!r._postrun.length){t.next=55;break}I=r._postrun.sort((function(t,e){return e.priority-t.priority})),r._postrun=[],u=0;case 49:if(!(u<I.length)){t.next=55;break}return t.next=52,bt(r,I[u].callback);case 52:++u,t.next=49;break;case 55:if(!n){t.next=58;break}return t.next=58,bt(r,n);case 58:return i.length&&Promise.all(i).then((function(t){return r.runAsync(null,(function(){t.forEach((function(t){try{t(r)}catch(e){r.error(e)}}))}))})),t.abrupt("return",r);case 60:case"end":return t.stop()}}),t,this,[[17,37]])})))).apply(this,arguments)}function io(){return(io=Object(mt.a)(H.a.mark((function t(e,A,n){var r,i=this;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._running){t.next=5;break}return t.next=3,this._running;case 3:t.next=0;break;case 5:return r=function(){return i._running=null},(this._running=this.evaluate(e,A,n)).then(r,r),t.abrupt("return",this._running);case 8:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function oo(t){return t.error("Dataflow already running. Use runAsync() to chain invocations."),t}no.fork=function(t){var e=new Xi(this.dataflow).init(this,t&this.NO_FIELDS);return void 0!==t&&(t&e.ADD&&this.visit(e.ADD,(function(t){return e.add.push(t)})),t&e.REM&&this.visit(e.REM,(function(t){return e.rem.push(t)})),t&e.MOD&&this.visit(e.MOD,(function(t){return e.mod.push(t)}))),e},no.changed=function(t){return this.changes&t},no.modified=function(t){var e=this,A=e.fields;return A&&e.changes&e.MOD?Object(U.A)(t)?t.some((function(t){return A[t]})):A[t]:0},no.filter=function(){Object(U.n)("MultiPulse does not support filtering.")},no.materialize=function(){Object(U.n)("MultiPulse does not support materialization.")},no.visit=function(t,e){var A=this,n=A.pulses,r=n.length,i=0;if(t&A.SOURCE)for(;i<r;++i)n[i].visit(t,e);else for(;i<r;++i)n[i].stamp===A.stamp&&n[i].visit(t,e);return A};var ao={skip:!1,force:!1};function so(t){var e=[];return{clear:function(){return e=[]},size:function(){return e.length},peek:function(){return e[0]},push:function(A){return e.push(A),go(e,0,e.length-1,t)},pop:function(){var A,n=e.pop();return e.length?(A=e[0],e[0]=n,function(t,e,A){var n,r=e,i=t.length,o=t[e],a=1+(e<<1);for(;a<i;)(n=a+1)<i&&A(t[a],t[n])>=0&&(a=n),t[e]=t[a],a=1+((e=a)<<1);t[e]=o,go(t,r,e,A)}(e,0,t)):A=n,A}}}function go(t,e,A,n){var r,i,o;for(r=t[A];A>e&&n(r,i=t[o=A-1>>1])<0;)t[A]=i,A=o;return t[A]=r}function co(){this.logger(Object(U.K)()),this.logLevel(U.b),this._clock=0,this._rank=0,this._locale=Ji();try{this._loader=Hi()}catch(t){}this._touched=vt(U.w),this._input={},this._pulse=null,this._heap=so((function(t,e){return t.qrank-e.qrank})),this._postrun=[]}var Io=co.prototype;function uo(t){return function(){return this._log[t].apply(this,arguments)}}function lo(t,e){Yt.call(this,t,null,e)}Io.stamp=function(){return this._clock},Io.loader=function(t){return arguments.length?(this._loader=t,this):this._loader},Io.locale=function(t){return arguments.length?(this._locale=t,this):this._locale},Io.cleanThreshold=1e4,Io.add=function(t,e,A,n){var r,i=1;return t instanceof Yt?r=t:t&&t.prototype instanceof Yt?r=new t:Object(U.D)(t)?r=new Yt(null,t):(i=0,r=new Yt(t,e)),this.rank(r),i&&(n=A,A=e),A&&this.connect(r,r.parameters(A,n)),this.touch(r),r},Io.connect=function(t,e){var A,n,r=t.rank;for(A=0,n=e.length;A<n;++A)if(r<e[A].rank)return void this.rerank(t)},Io.rank=function(t){t.rank=++this._rank},Io.rerank=function(t){for(var e,A,n,r=[t];r.length;)if(this.rank(e=r.pop()),A=e._targets)for(n=A.length;--n>=0;)r.push(e=A[n]),e===t&&Object(U.n)("Cycle detected in dataflow graph.")},Io.pulse=function(t,e,A){this.touch(t,A||ao);var n=new Xi(this,this._clock+(this._pulse?0:1)),r=t.pulse&&t.pulse.source||[];return n.target=t,this._input[t.id]=e.pulse(n,r),this},Io.touch=function(t,e){var A=e||ao;return this._pulse?this._enqueue(t):this._touched.add(t),A.skip&&t.skip(!0),this},Io.update=function(t,e,A){var n=A||ao;return(t.set(e)||n.force)&&this.touch(t,n),this},Io.changeset=Lt,Io.ingest=function(t,e,A){return e=this.parse(e,A),this.pulse(t,this.changeset().insert(e))},Io.parse=function(t,e){var A=this.locale();return ji(t,e,A.timeParse,A.utcParse)},Io.preload=function(t,e,A){return Vi.apply(this,arguments)},Io.request=function(t,e){return Yi.apply(this,arguments)},Io.events=function(t,e,A,n){for(var r,i=this,o=Pt(A,n),a=function(t){t.dataflow=i;try{o.receive(t)}catch(e){i.error(e)}finally{i.run()}},s=0,g=(r="string"===typeof t&&"undefined"!==typeof document?document.querySelectorAll(t):Object(U.i)(t)).length;s<g;++s)r[s].addEventListener(e,a);return o},Io.on=function(t,e,A,n,r){return(t instanceof Yt?Pi:Ki)(this,t,e,A,n,r),this},Io.evaluate=function(t,e,A){return ro.apply(this,arguments)},Io.run=function(t,e,A){return this._pulse?oo(this):(this.evaluate(t,e,A),this)},Io.runAsync=function(t,e,A){return io.apply(this,arguments)},Io.runAfter=function(t,e,A){if(this._pulse||e)this._postrun.push({priority:A||0,callback:t});else try{t(this)}catch(n){this.error(n)}},Io._enqueue=function(t,e){var A=t.stamp<this._clock;A&&(t.stamp=this._clock),(A||e)&&(t.qrank=t.rank,this._heap.push(t))},Io._getPulse=function(t,e){var A=t.source,n=this._clock;return A&&Object(U.A)(A)?new Ao(this,n,A.map((function(t){return t.pulse})),e):this._input[t.id]||function(t,e){if(e&&e.stamp===t.stamp)return e;t=t.fork(),e&&e!==qi&&(t.source=e.source);return t}(this._pulse,A&&A.pulse)},Io.logger=function(t){return arguments.length?(this._log=t,this):this._log},Io.error=uo("error"),Io.warn=uo("warn"),Io.info=uo("info"),Io.debug=uo("debug"),Io.logLevel=uo("level");var Co=Object(U.y)(lo,Yt);Co.run=function(t){var e,A=this;return t.stamp<this.stamp?t.StopPropagation:(this.skip()?this.skip(!1):e=this.evaluate(t),(e=e||t).then?e=e.then((function(t){return A.pulse=t})):e!==t.StopPropagation&&(this.pulse=e),e)},Co.evaluate=function(t){var e=this.marshall(t.stamp),A=this.transform(e,t);return e.clear(),A},Co.transform=function(){};var ho={};function Bo(t){var e=fo(t);return e&&e.Definition||null}function fo(t){return t=t&&t.toLowerCase(),Object(U.v)(ho,t)?ho[t]:null}function Qo(t){return t&&t.length?1===t.length?t[0]:(e=t,function(t){for(var A=e.length,n=1,r=String(e[0](t));n<A;++n)r+="|"+e[n](t);return r}):function(){return""};var e}function Eo(t,e,A){return A||t+(e?"_"+e:"")}var po=function(){},yo={init:po,add:po,rem:po,idx:0},vo={values:{init:function(t){return t.cell.store=!0},value:function(t){return t.cell.data.values()},idx:-1},count:{value:function(t){return t.cell.num}},__count__:{value:function(t){return t.missing+t.valid}},missing:{value:function(t){return t.missing}},valid:{value:function(t){return t.valid}},sum:{init:function(t){return t.sum=0},value:function(t){return t.sum},add:function(t,e){return t.sum+=+e},rem:function(t,e){return t.sum-=e}},product:{init:function(t){return t.product=1},value:function(t){return t.valid?t.product:void 0},add:function(t,e){return t.product*=e},rem:function(t,e){return t.product/=e}},mean:{init:function(t){return t.mean=0},value:function(t){return t.valid?t.mean:void 0},add:function(t,e){return t.mean_d=e-t.mean,t.mean+=t.mean_d/t.valid},rem:function(t,e){return t.mean_d=e-t.mean,t.mean-=t.valid?t.mean_d/t.valid:t.mean}},average:{value:function(t){return t.valid?t.mean:void 0},req:["mean"],idx:1},variance:{init:function(t){return t.dev=0},value:function(t){return t.valid>1?t.dev/(t.valid-1):void 0},add:function(t,e){return t.dev+=t.mean_d*(e-t.mean)},rem:function(t,e){return t.dev-=t.mean_d*(e-t.mean)},req:["mean"],idx:1},variancep:{value:function(t){return t.valid>1?t.dev/t.valid:void 0},req:["variance"],idx:2},stdev:{value:function(t){return t.valid>1?Math.sqrt(t.dev/(t.valid-1)):void 0},req:["variance"],idx:2},stdevp:{value:function(t){return t.valid>1?Math.sqrt(t.dev/t.valid):void 0},req:["variance"],idx:2},stderr:{value:function(t){return t.valid>1?Math.sqrt(t.dev/(t.valid*(t.valid-1))):void 0},req:["variance"],idx:2},distinct:{value:function(t){return t.cell.data.distinct(t.get)},req:["values"],idx:3},ci0:{value:function(t){return t.cell.data.ci0(t.get)},req:["values"],idx:3},ci1:{value:function(t){return t.cell.data.ci1(t.get)},req:["values"],idx:3},median:{value:function(t){return t.cell.data.q2(t.get)},req:["values"],idx:3},q1:{value:function(t){return t.cell.data.q1(t.get)},req:["values"],idx:3},q3:{value:function(t){return t.cell.data.q3(t.get)},req:["values"],idx:3},min:{init:function(t){return t.min=void 0},value:function(t){return t.min=Number.isNaN(t.min)?t.cell.data.min(t.get):t.min},add:function(t,e){(e<t.min||void 0===t.min)&&(t.min=e)},rem:function(t,e){e<=t.min&&(t.min=NaN)},req:["values"],idx:4},max:{init:function(t){return t.max=void 0},value:function(t){return t.max=Number.isNaN(t.max)?t.cell.data.max(t.get):t.max},add:function(t,e){(e>t.max||void 0===t.max)&&(t.max=e)},rem:function(t,e){e>=t.max&&(t.max=NaN)},req:["values"],idx:4},argmin:{init:function(t){return t.argmin=void 0},value:function(t){return t.argmin||t.cell.data.argmin(t.get)},add:function(t,e,A){e<t.min&&(t.argmin=A)},rem:function(t,e){e<=t.min&&(t.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:function(t){return t.argmax=void 0},value:function(t){return t.argmax||t.cell.data.argmax(t.get)},add:function(t,e,A){e>t.max&&(t.argmax=A)},rem:function(t,e){e>=t.max&&(t.argmax=void 0)},req:["max","values"],idx:3}},mo=Object.keys(vo);function bo(t,e){return vo[t](e)}function Fo(t,e){return t.idx-e.idx}function wo(){var t=this;this.valid=0,this.missing=0,this._ops.forEach((function(e){return e.init(t)}))}function So(t,e){var A=this;null!=t&&""!==t?t===t&&(++this.valid,this._ops.forEach((function(n){return n.add(A,t,e)}))):++this.missing}function Do(t,e){var A=this;null!=t&&""!==t?t===t&&(--this.valid,this._ops.forEach((function(n){return n.rem(A,t,e)}))):--this.missing}function Ro(t){var e=this;return this._out.forEach((function(A){return t[A.out]=A.value(e)})),t}function Uo(t,e){var A=e||U.x,n=function(t){var e={};return t.forEach((function(t){return e[t.name]=t})),t.forEach((function t(A){A.req&&A.req.forEach((function(A){e[A]||t(e[A]=vo[A]())}))})),Object.values(e).sort(Fo)}(t),r=t.slice().sort(Fo);function i(t){this._ops=n,this._out=r,this.cell=t,this.init()}return i.prototype.init=wo,i.prototype.add=So,i.prototype.rem=Do,i.prototype.set=Ro,i.prototype.get=A,i.fields=t.map((function(t){return t.out})),i}mo.forEach((function(t){vo[t]=function(t,e){return function(A){return Object(U.o)({name:t,out:A||t},yo,e)}}(t,vo[t])}));var Go=H.a.mark(No);function No(t,e){var A,n,r,i,o,a,s;return H.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:if(null!=e){g.next=21;break}A=Object(R.a)(t),g.prev=2,A.s();case 4:if((n=A.n()).done){g.next=11;break}if(!(null!=(r=n.value)&&""!==r&&(r=+r)>=r)){g.next=9;break}return g.next=9,r;case 9:g.next=4;break;case 11:g.next=16;break;case 13:g.prev=13,g.t0=g.catch(2),A.e(g.t0);case 16:return g.prev=16,A.f(),g.finish(16);case 19:g.next=41;break;case 21:i=-1,o=Object(R.a)(t),g.prev=23,o.s();case 25:if((a=o.n()).done){g.next=33;break}if(s=a.value,!(null!=(s=e(s,++i,t))&&""!==s&&(s=+s)>=s)){g.next=31;break}return g.next=31,s;case 31:g.next=25;break;case 33:g.next=38;break;case 35:g.prev=35,g.t1=g.catch(23),o.e(g.t1);case 38:return g.prev=38,o.f(),g.finish(38);case 41:case"end":return g.stop()}}),Go,null,[[2,13,16,19],[23,35,38,41]])}var ko=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};function xo(t,e){var A;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;null!=i&&(A<i||void 0===A&&i>=i)&&(A=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;null!=(g=e(g,++a,t))&&(A<g||void 0===A&&g>=g)&&(A=g)}}catch(c){s.e(c)}finally{s.f()}}return A}function Oo(t,e){var A;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;null!=i&&(A>i||void 0===A&&i>=i)&&(A=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;null!=(g=e(g,++a,t))&&(A>g||void 0===A&&g>=g)&&(A=g)}}catch(c){s.e(c)}finally{s.f()}}return A}function Mo(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}var Lo=H.a.mark(Jo),_o=function(t){return null===t?NaN:+t};function Jo(t,e){var A,n,r,i,o,a,s;return H.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:if(void 0!==e){g.next=21;break}A=Object(R.a)(t),g.prev=2,A.s();case 4:if((n=A.n()).done){g.next=11;break}if(!(null!=(r=n.value)&&(r=+r)>=r)){g.next=9;break}return g.next=9,r;case 9:g.next=4;break;case 11:g.next=16;break;case 13:g.prev=13,g.t0=g.catch(2),A.e(g.t0);case 16:return g.prev=16,A.f(),g.finish(16);case 19:g.next=40;break;case 21:i=-1,o=Object(R.a)(t),g.prev=23,o.s();case 25:if((a=o.n()).done){g.next=32;break}if(s=a.value,!(null!=(s=e(s,++i,t))&&(s=+s)>=s)){g.next=30;break}return g.next=30,s;case 30:g.next=25;break;case 32:g.next=37;break;case 34:g.prev=34,g.t1=g.catch(23),o.e(g.t1);case 37:return g.prev=37,o.f(),g.finish(37);case 40:case"end":return g.stop()}}),Lo,null,[[2,13,16,19],[23,34,37,40]])}function To(t,e,A){if(n=(t=Float64Array.from(Jo(t,A))).length){if((e=+e)<=0||n<2)return Oo(t);if(e>=1)return xo(t);var n,r=(n-1)*e,i=Math.floor(r),o=xo(function t(e,A){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length-1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ko;r>n;){if(r-n>600){var o=r-n+1,a=A-n+1,s=Math.log(o),g=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*g*(o-g)/o)*(a-o/2<0?-1:1),I=Math.max(n,Math.floor(A-a*g/o+c)),u=Math.min(r,Math.floor(A+(o-a)*g/o+c));t(e,A,I,u,i)}var l=e[A],C=n,h=r;for(Mo(e,n,A),i(e[r],l)>0&&Mo(e,n,r);C<h;){for(Mo(e,C,h),++C,--h;i(e[C],l)<0;)++C;for(;i(e[h],l)>0;)--h}0===i(e[n],l)?Mo(e,n,h):Mo(e,++h,r),h<=A&&(n=h+1),A<=h&&(r=h-1)}return e}(t,i).subarray(0,i+1));return o+(Oo(t.subarray(i+1))-o)*(r-i)}}var jo=function(t,e,A){var n=Float64Array.from(No(t,A));return n.sort(ko),e.map((function(t){return function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_o;if(n=t.length){if((e=+e)<=0||n<2)return+A(t[0],0,t);if(e>=1)return+A(t[n-1],n-1,t);var n,r=(n-1)*e,i=Math.floor(r),o=+A(t[i],i,t),a=+A(t[i+1],i+1,t);return o+(a-o)*(r-i)}}(n,t)}))},Ho=function(t,e){return jo(t,[.25,.5,.75],e)};function Yo(t,e){var A=function(t,e){var A,n=0,r=0,i=0;if(void 0===e){var o,a=Object(R.a)(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;null!=s&&(s=+s)>=s&&(i+=(A=s-r)*(s-(r+=A/++n)))}}catch(l){a.e(l)}finally{a.f()}}else{var g,c=-1,I=Object(R.a)(t);try{for(I.s();!(g=I.n()).done;){var u=g.value;null!=(u=e(u,++c,t))&&(u=+u)>=u&&(i+=(A=u-r)*(u-(r+=A/++n)))}}catch(l){I.e(l)}finally{I.f()}}if(n>1)return i/(n-1)}(t,e);return A?Math.sqrt(A):A}var Vo=function(t,e){var A=t.length,n=Yo(t,e),r=Ho(t,e),i=(r[2]-r[0])/1.34;return 1.06*(n=Math.min(n,i)||n||Math.abs(r[0])||1)*Math.pow(A,-.2)},Zo=function(t){var e,A,n,r,i,o,a,s,g=t.maxbins||20,c=t.base||10,I=Math.log(c),u=t.divide||[5,2],l=t.extent[0],C=t.extent[1],h=t.span||C-l||Math.abs(l)||1;if(t.step)e=t.step;else if(t.steps){for(i=h/g,o=0,a=t.steps.length;o<a&&t.steps[o]<i;++o);e=t.steps[Math.max(0,o-1)]}else{for(A=Math.ceil(Math.log(g)/I),n=t.minstep||0,e=Math.max(n,Math.pow(c,Math.round(Math.log(h)/I)-A));Math.ceil(h/e)>g;)e*=c;for(o=0,a=u.length;o<a;++o)(i=e/u[o])>=n&&h/i<=g&&(e=i)}return r=(i=Math.log(e))>=0?0:1+~~(-i/I),s=Math.pow(c,-r-1),(t.nice||void 0===t.nice)&&(l=l<(i=Math.floor(l/e+s)*e)?i-e:i,C=Math.ceil(C/e)*e),{start:l,stop:C===l?l+e:C,step:e}},Wo=Math.random;function Ko(t){Wo=t}var Po=function(t,e,A,n){if(!t.length)return[void 0,void 0];var r,i,o,a,s=Float64Array.from(No(t,n)),g=s.length,c=e;for(o=0,a=Array(c);o<c;++o){for(r=0,i=0;i<g;++i)r+=s[~~(Wo()*g)];a[o]=r/g}return a.sort(ko),[To(a,A/2),To(a,1-A/2)]},qo=function(t,e,A,n){n=n||function(t){return t};for(var r,i=0,o=1,a=t.length,s=new Float64Array(a),g=n(t[0]),c=g,I=g+e;o<a;++o){if((r=n(t[o]))>=I){for(c=(g+c)/2;i<o;++i)s[i]=c;I=r+e,g=r}c=r}for(c=(g+c)/2;i<o;++i)s[i]=c;return A?function(t,e){var A,n,r=t.length,i=0,o=1;for(;t[i]===t[o];)++o;for(;o<r;){for(A=o+1;t[o]===t[A];)++A;if(t[o]-t[o-1]<e){for(n=o+(i+A-o-o>>1);n<o;)t[n++]=t[o];for(;n>o;)t[n--]=t[i]}i=o,o=A}return t}(s,e+e/4):s};var Xo=function(t){return function(){return(t=(1103515245*t+12345)%2147483647)/2147483647}},zo=function(t,e){null==e&&(e=t,t=0);var A,n,r,i={};return i.min=function(t){return arguments.length?(r=n-(A=t||0),i):A},i.max=function(t){return arguments.length?(r=(n=t||0)-A,i):n},i.sample=function(){return A+Math.floor(r*Wo())},i.pdf=function(t){return t===Math.floor(t)&&t>=A&&t<n?1/r:0},i.cdf=function(t){var e=Math.floor(t);return e<A?0:e>=n?1:(e-A+1)/r},i.icdf=function(t){return t>=0&&t<=1?A-1+Math.floor(t*r):NaN},i.min(t).max(e)},$o=Math.sqrt(2*Math.PI),ta=Math.SQRT2,ea=NaN;function Aa(t,e){t=t||0,e=null==e?1:e;var A,n,r=0,i=0;if(ea===ea)r=ea,ea=NaN;else{do{A=(r=2*Wo()-1)*r+(i=2*Wo()-1)*i}while(0===A||A>1);r*=n=Math.sqrt(-2*Math.log(A)/A),ea=i*n}return t+r*e}function na(t,e,A){var n=(t-(e||0))/(A=null==A?1:A);return Math.exp(-.5*n*n)/(A*$o)}function ra(t,e,A){var n,r=(t-(e=e||0))/(A=null==A?1:A),i=Math.abs(r);if(i>37)n=0;else{var o=Math.exp(-i*i/2);i<7.07106781186547?(n=o*((((((.0352624965998911*i+.700383064443688)*i+6.37396220353165)*i+33.912866078383)*i+112.079291497871)*i+221.213596169931)*i+220.206867912376),n/=((((((.0883883476483184*i+1.75566716318264)*i+16.064177579207)*i+86.7807322029461)*i+296.564248779674)*i+637.333633378831)*i+793.826512519948)*i+440.413735824752):n=o/(i+1/(i+2/(i+3/(i+4/(i+.65)))))/2.506628274631}return r>0?1-n:n}function ia(t,e,A){return t<0||t>1?NaN:(e||0)+(null==A?1:A)*ta*function(t){var e,A=-Math.log((1-t)*(1+t));A<6.25?e=1.6536545626831027+(e=.24015818242558962+(e=(e=(e=.00018673420803405714+(e=(e=(e=4.2347877827932404e-7+(e=(e=(e=1.0512122733215323e-9+(e=(e=(e=26335093153082323e-28+(e=(e=(e=6637638134358324e-30+(e=20972767875968562e-33+(e=(e=11157877678025181e-33+(e=128584807152564e-32+(e=(e=-364441206401782e-35)*(A-=3.125)-16850591381820166e-35)*A)*A)*A-1333171662854621e-31)*A)*A)*A-4054566272975207e-29)*A-8151934197605472e-29)*A)*A-12975133253453532e-27)*A-5415412054294628e-26)*A)*A-4.112633980346984e-9)*A-2.9070369957882005e-8)*A)*A-13654692000834679e-22)*A-13882523362786469e-21)*A)*A-.000740702534166267)*A-.006033670871430149)*A)*A:A<16?(A=Math.sqrt(A)-3.25,e=3.0838856104922208+(e=1.0052589676941592+(e=.005370914553590064+(e=(e=.002491442096107851+(e=(e=.0009532893797373805+(e=(e=24031110387097894e-21+(e=6828485145957318e-20+(e=(e=12475304481671779e-21+(e=29234449089955446e-22+(e=(e=15027403968909828e-22+(e=1.8239629214389228e-8+(e=(e=9.075656193888539e-8+(e=2.2137376921775787e-9)*A)*A-2.7517406297064545e-7)*A)*A)*A-4013867526981546e-21)*A)*A)*A-47318229009055734e-21)*A)*A)*A-.0003550375203628475)*A)*A-.0016882755560235047)*A)*A-.003751208507569241)*A)*A)*A):Number.isFinite(A)?(A=Math.sqrt(A)-5,e=4.849906401408584+(e=1.0103004648645344+(e=(e=(e=7599527703001776e-20+(e=(e=4526062597223154e-21+(e=(e=2.2900482228026655e-7+(e=(e=2.914795345090108e-8+(e=(e=7.61570120807834e-9+(e=(e=1.5076572693500548e-9+(e=(e=-27109920616438573e-27)*A-2.555641816996525e-10)*A)*A-3.789465440126737e-9)*A)*A-1.496002662714924e-8)*A)*A-6.771199775845234e-8)*A)*A-9.9298272942317e-7)*A)*A-1968177810553167e-20)*A)*A-.00021503011930044477)*A-.00013871931833623122)*A)*A):e=1/0;return e*t}(2*t-1)}var oa=function(t,e){var A,n,r={mean:function(t){return arguments.length?(A=t||0,r):A},stdev:function(t){return arguments.length?(n=null==t?1:t,r):n},sample:function(){return Aa(A,n)},pdf:function(t){return na(t,A,n)},cdf:function(t){return ra(t,A,n)},icdf:function(t){return ia(t,A,n)}};return r.mean(t).stdev(e)},aa=function(t,e){var A=oa(),n={},r=0;return n.data=function(A){return arguments.length?(t=A,r=A?A.length:0,n.bandwidth(e)):t},n.bandwidth=function(A){return arguments.length?(!(e=A)&&t&&(e=Vo(t)),n):e},n.sample=function(){return t[~~(Wo()*r)]+e*A.sample()},n.pdf=function(n){for(var i=0,o=0;o<r;++o)i+=A.pdf((n-t[o])/e);return i/e/r},n.cdf=function(n){for(var i=0,o=0;o<r;++o)i+=A.cdf((n-t[o])/e);return i/r},n.icdf=function(){throw Error("KDE icdf not supported.")},n.data(t)};function sa(t,e){return t=t||0,e=null==e?1:e,Math.exp(t+Aa()*e)}function ga(t,e,A){if(t<=0)return 0;e=e||0,A=null==A?1:A;var n=(Math.log(t)-e)/A;return Math.exp(-.5*n*n)/(A*$o*t)}function ca(t,e,A){return ra(Math.log(t),e,A)}function Ia(t,e,A){return Math.exp(ia(t,e,A))}var ua=function(t,e){var A,n,r={mean:function(t){return arguments.length?(A=t||0,r):A},stdev:function(t){return arguments.length?(n=null==t?1:t,r):n},sample:function(){return sa(A,n)},pdf:function(t){return ga(t,A,n)},cdf:function(t){return ca(t,A,n)},icdf:function(t){return Ia(t,A,n)}};return r.mean(t).stdev(e)},la=function(t,e){var A,n={},r=0;function i(t){var e,A=[],n=0;for(e=0;e<r;++e)n+=A[e]=null==t[e]?1:+t[e];for(e=0;e<r;++e)A[e]/=n;return A}return n.weights=function(t){return arguments.length?(A=i(e=t||[]),n):e},n.distributions=function(A){return arguments.length?(A?(r=A.length,t=A):(r=0,t=[]),n.weights(e)):t},n.sample=function(){for(var e=Wo(),n=t[r-1],i=A[0],o=0;o<r-1;i+=A[++o])if(e<i){n=t[o];break}return n.sample()},n.pdf=function(e){for(var n=0,i=0;i<r;++i)n+=A[i]*t[i].pdf(e);return n},n.cdf=function(e){for(var n=0,i=0;i<r;++i)n+=A[i]*t[i].cdf(e);return n},n.icdf=function(){throw Error("Mixture icdf not supported.")},n.distributions(t).weights(e)};function Ca(t,e){return null==e&&(e=null==t?1:t,t=0),t+(e-t)*Wo()}function ha(t,e,A){return null==A&&(A=null==e?1:e,e=0),t>=e&&t<=A?1/(A-e):0}function Ba(t,e,A){return null==A&&(A=null==e?1:e,e=0),t<e?0:t>A?1:(t-e)/(A-e)}function fa(t,e,A){return null==A&&(A=null==e?1:e,e=0),t>=0&&t<=1?e+t*(A-e):NaN}var da=function(t,e){var A,n,r={min:function(t){return arguments.length?(A=t||0,r):A},max:function(t){return arguments.length?(n=null==t?1:t,r):n},sample:function(){return Ca(A,n)},pdf:function(t){return ha(t,A,n)},cdf:function(t){return Ba(t,A,n)},icdf:function(t){return fa(t,A,n)}};return null==e&&(e=null==t?1:t,t=0),r.min(t).max(e)},Qa=function(t,e,A,n){var r=n-t*t,i=Math.abs(r)<1e-24?0:(A-t*e)/r;return[e-i*t,i]};function Ea(t,e,A,n){t=t.filter((function(t){var n=e(t),r=A(t);return null!=n&&(n=+n)>=n&&null!=r&&(r=+r)>=r})),n&&t.sort((function(t,A){return e(t)-e(A)}));var r,i,o,a,s=t.length,g=new Float64Array(s),c=new Float64Array(s),I=0,u=0,l=0,C=Object(R.a)(t);try{for(C.s();!(a=C.n()).done;)o=a.value,g[I]=r=+e(o),c[I]=i=+A(o),u+=(r-u)/++I,l+=(i-l)/I}catch(h){C.e(h)}finally{C.f()}for(I=0;I<s;++I)g[I]-=u,c[I]-=l;return[g,c,u,l]}function pa(t,e,A,n){var r,i,o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;r=e(g),i=A(g),null!=r&&(r=+r)>=r&&null!=i&&(i=+i)>=i&&n(r,i,++a)}}catch(c){s.e(c)}finally{s.f()}}var ya=function(t,e,A,n,r){var i=0,o=0;return pa(t,e,A,(function(t,e){var A=e-r(t),a=e-n;i+=A*A,o+=a*a})),1-i/o},va=function(t,e,A){var n=0,r=0,i=0,o=0,a=0;pa(t,e,A,(function(t,e){++a,n+=(t-n)/a,r+=(e-r)/a,i+=(t*e-i)/a,o+=(t*t-o)/a}));var s=Qa(n,r,i,o),g=function(t){return s[0]+s[1]*t};return{coef:s,predict:g,rSquared:ya(t,e,A,r,g)}},ma=function(t,e,A){var n=0,r=0,i=0,o=0,a=0;pa(t,e,A,(function(t,e){++a,t=Math.log(t),n+=(t-n)/a,r+=(e-r)/a,i+=(t*e-i)/a,o+=(t*t-o)/a}));var s=Qa(n,r,i,o),g=function(t){return s[0]+s[1]*Math.log(t)};return{coef:s,predict:g,rSquared:ya(t,e,A,r,g)}},ba=A(13),Fa=function(t,e,A){var n,r,i,o=Ea(t,e,A),a=Object(ba.a)(o,4),s=a[0],g=(a[1],a[2]),c=a[3],I=0,u=0,l=0,C=0,h=0;pa(t,e,A,(function(t,e){n=s[h++],r=Math.log(e),I+=(e*r-I)/h,u+=((i=n*e)-u)/h,l+=(i*r-l)/h,C+=(n*i-C)/h}));var B=Qa(u/c,I/c,l/c,C/c),f=Object(ba.a)(B,2),d=f[0],Q=f[1],E=function(t){return Math.exp(d+Q*(t-g))};return{coef:[Math.exp(d-Q*g),Q],predict:E,rSquared:ya(t,e,A,c,E)}},wa=function(t,e,A){var n=0,r=0,i=0,o=0,a=0,s=0;pa(t,e,A,(function(t,e){var A=Math.log(t),g=Math.log(e);++s,n+=(A-n)/s,r+=(g-r)/s,i+=(A*g-i)/s,o+=(A*A-o)/s,a+=(e-a)/s}));var g=Qa(n,r,i,o),c=function(t){return g[0]*Math.pow(t,g[1])};return g[0]=Math.exp(g[0]),{coef:g,predict:c,rSquared:ya(t,e,A,a,c)}},Sa=function(t,e,A){var n,r,i,o,a=Ea(t,e,A),s=Object(ba.a)(a,4),g=s[0],c=s[1],I=s[2],u=s[3],l=g.length,C=0,h=0,B=0,f=0,d=0;for(n=0;n<l;)r=g[n],i=c[n++],C+=((o=r*r)-C)/n,h+=(o*r-h)/n,B+=(o*o-B)/n,f+=(r*i-f)/n,d+=(o*i-d)/n;var Q=B-C*C,E=C*Q-h*h,p=(d*C-f*h)/E,y=(f*Q-d*h)/E,v=-p*C,m=function(t){return p*(t-=I)*t+y*t+v+u};return{coef:[v-y*I+p*I*I+u,y-2*p*I,p],predict:m,rSquared:ya(t,e,A,u,m)}},Da=function(t,e,A,n){if(1===n)return va(t,e,A);if(2===n)return Sa(t,e,A);var r,i,o,a,s,g=Ea(t,e,A),c=Object(ba.a)(g,4),I=c[0],u=c[1],l=c[2],C=c[3],h=I.length,B=[],f=[],d=n+1;for(r=0;r<d;++r){for(o=0,a=0;o<h;++o)a+=Math.pow(I[o],r)*u[o];for(B.push(a),s=new Float64Array(d),i=0;i<d;++i){for(o=0,a=0;o<h;++o)a+=Math.pow(I[o],r+i);s[i]=a}f.push(s)}f.push(B);var Q=function(t){var e,A,n,r,i,o=t.length-1,a=[];for(e=0;e<o;++e){for(r=e,A=e+1;A<o;++A)Math.abs(t[e][A])>Math.abs(t[e][r])&&(r=A);for(n=e;n<o+1;++n)i=t[n][e],t[n][e]=t[n][r],t[n][r]=i;for(A=e+1;A<o;++A)for(n=o;n>=e;n--)t[n][A]-=t[n][e]*t[e][A]/t[e][e]}for(A=o-1;A>=0;--A){for(i=0,n=A+1;n<o;++n)i+=t[n][A]*a[n];a[A]=(t[o][A]-i)/t[A][A]}return a}(f),E=function(t){t-=l;var e=C+Q[0]+Q[1]*t+Q[2]*t*t;for(r=3;r<d;++r)e+=Q[r]*Math.pow(t,r);return e};return{coef:Ra(d,Q,-l,C),predict:E,rSquared:ya(t,e,A,C,E)}};function Ra(t,e,A,n){var r,i,o,a,s=Array(t);for(r=0;r<t;++r)s[r]=0;for(r=t-1;r>=0;--r)for(o=e[r],a=1,s[r]+=o,i=1;i<=r;++i)a*=(r+1-i)/i,s[r-i]+=o*Math.pow(A,i)*a;return s[0]+=n,s}var Ua=function(t,e,A,n){for(var r=Ea(t,e,A,!0),i=Object(ba.a)(r,4),o=i[0],a=i[1],s=i[2],g=i[3],c=o.length,I=Math.max(2,~~(n*c)),u=new Float64Array(c),l=new Float64Array(c),C=new Float64Array(c).fill(1),h=-1;++h<=2;){for(var B=[0,I-1],f=0;f<c;++f){for(var d=o[f],Q=B[0],E=B[1],p=d-o[Q]>o[E]-d?Q:E,y=0,v=0,m=0,b=0,F=0,w=1/Math.abs(o[p]-d||1),S=Q;S<=E;++S){var D=o[S],R=a[S],U=Ga(Math.abs(d-D)*w)*C[S],G=D*U;y+=U,v+=G,m+=R*U,b+=R*G,F+=D*G}var N=Qa(v/y,m/y,b/y,F/y),k=Object(ba.a)(N,2),x=k[0],O=k[1];u[f]=x+O*d,l[f]=Math.abs(a[f]-u[f]),Na(o,f+1,B)}if(2===h)break;var M=To(l,.5,void 0);if(Math.abs(M)<1e-12)break;for(var L,_,J=0;J<c;++J)L=l[J]/(6*M),C[J]=L>=1?1e-12:(_=1-L*L)*_}return function(t,e,A,n){for(var r,i=t.length,o=[],a=0,s=0,g=[];a<i;++a)r=t[a]+A,g[0]===r?g[1]+=(e[a]-g[1])/++s:(s=0,g[1]+=n,g=[r,e[a]],o.push(g));return g[1]+=n,o}(o,u,s,g)};function Ga(t){return(t=1-t*t*t)*t*t}function Na(t,e,A){var n=t[e],r=A[0],i=A[1]+1;if(!(i>=t.length))for(;e>r&&t[i]-n<=n-t[r];)A[0]=++r,A[1]=i,++i}var ka=.1*Math.PI/180,xa=function(t,e,A,n){A=A||25,n=Math.max(A,n||200);var r=function(e){return[e,t(e)]},i=e[0],o=e[1],a=o-i,s=a/n,g=[r(i)],c=[];if(A===n){for(var I=1;I<n;++I)g.push(r(i+I/A*a));return g.push(r(o)),g}c.push(r(o));for(var u=A;--u>0;)c.push(r(i+u/A*a));for(var l=g[0],C=c[c.length-1];C;){var h=r((l[0]+C[0])/2);h[0]-l[0]>=s&&Oa(l,h,C)>ka?c.push(h):(l=C,g.push(C),c.pop()),C=c[c.length-1]}return g};function Oa(t,e,A){var n=Math.atan2(A[1]-t[1],A[0]-t[0]),r=Math.atan2(e[1]-t[1],e[0]-t[0]);return Math.abs(n-r)}function Ma(t){this._key=t?Object(U.t)(t):Rt,this.reset()}var La=Ma.prototype;function _a(t){lo.call(this,null,t),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}La.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},La.add=function(t){this._add.push(t)},La.rem=function(t){this._rem.push(t)},La.values=function(){if(this._get=null,0===this._rem.length)return this._add;var t,e,A,n=this._add,r=this._rem,i=this._key,o=n.length,a=r.length,s=Array(o-a),g={};for(t=0;t<a;++t)g[i(r[t])]=1;for(t=0,e=0;t<o;++t)g[i(A=n[t])]?g[i(A)]=0:s[e++]=A;return this._rem=[],this._add=s},La.distinct=function(t){for(var e,A=this.values(),n=A.length,r={},i=0;--n>=0;)e=t(A[n])+"",Object(U.v)(r,e)||(r[e]=1,++i);return i},La.extent=function(t){if(this._get!==t||!this._ext){var e=this.values(),A=Object(U.q)(e,t);this._ext=[e[A[0]],e[A[1]]],this._get=t}return this._ext},La.argmin=function(t){return this.extent(t)[0]||{}},La.argmax=function(t){return this.extent(t)[1]||{}},La.min=function(t){var e=this.extent(t)[0];return null!=e?t(e):void 0},La.max=function(t){var e=this.extent(t)[1];return null!=e?t(e):void 0},La.quartile=function(t){return this._get===t&&this._q||(this._q=Ho(this.values(),t),this._get=t),this._q},La.q1=function(t){return this.quartile(t)[0]},La.q2=function(t){return this.quartile(t)[1]},La.q3=function(t){return this.quartile(t)[2]},La.ci=function(t){return this._get===t&&this._ci||(this._ci=Po(this.values(),1e3,.05,t),this._get=t),this._ci},La.ci0=function(t){return this.ci(t)[0]},La.ci1=function(t){return this.ci(t)[1]},_a.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:mo},{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 Ja=Object(U.y)(_a,lo);Ja.transform=function(t,e){var A=this,n=this,r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=t.modified();return n.stamp=r.stamp,n.value&&(i||e.modified(n._inputs,!0))?(n._prev=n.value,n.value=i?n.init(t):{},e.visit(e.SOURCE,(function(t){return n.add(t)}))):(n.value=n.value||n.init(t),e.visit(e.REM,(function(t){return n.rem(t)})),e.visit(e.ADD,(function(t){return n.add(t)}))),r.modifies(n._outputs),n._drop=!1!==t.drop,t.cross&&n._dims.length>1&&(n._drop=!1,n.cross()),e.clean()&&n._drop&&r.clean(!0).runAfter((function(){return A.clean()})),n.changes(r)},Ja.cross=function(){var t=this,e=t.value,A=t._dnames,n=A.map((function(){return{}})),r=A.length;function i(t){var e,i,o,a;for(e in t)for(o=t[e].tuple,i=0;i<r;++i)n[i][a=o[A[i]]]=a}i(t._prev),i(e),function i(o,a,s){var g,c,I=A[s],u=n[s++];for(g in u)a[I]=u[g],c=o?o+"|"+g:g,s<r?i(c,a,s):e[c]||t.cell(c,a)}("",{},0)},Ja.init=function(t){var e=this._inputs=[],A=this._outputs=[],n={};function r(t){for(var A,r=Object(U.i)(Object(U.g)(t)),i=0,o=r.length;i<o;++i)n[A=r[i]]||(n[A]=1,e.push(A))}this._dims=Object(U.i)(t.groupby),this._dnames=this._dims.map((function(t){var e=Object(U.h)(t);return r(t),A.push(e),e})),this.cellkey=t.key?t.key:Qo(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];var i,o,a,s,g,c,I=t.fields||[null],u=t.ops||["count"],l=t.as||[],C=I.length,h={};for(C!==u.length&&Object(U.n)("Unmatched number of fields and aggregate ops."),c=0;c<C;++c)i=I[c],o=u[c],null==i&&"count"!==o&&Object(U.n)("Null aggregate field specified."),g=Eo(o,s=Object(U.h)(i),l[c]),A.push(g),"count"!==o?((a=h[s])||(r(i),(a=h[s]=[]).field=i,this._measures.push(a)),"count"!==o&&(this._countOnly=!1),a.push(bo(o,g))):this._counts.push(g);return this._measures=this._measures.map((function(t){return Uo(t,t.field)})),{}},Ja.cellkey=Qo(),Ja.cell=function(t,e){var A=this.value[t];return A?0===A.num&&this._drop&&A.stamp<this.stamp?(A.stamp=this.stamp,this._adds[this._alen++]=A):A.stamp<this.stamp&&(A.stamp=this.stamp,this._mods[this._mlen++]=A):(A=this.value[t]=this.newcell(t,e),this._adds[this._alen++]=A),A},Ja.newcell=function(t,e){var A={key:t,num:0,agg:null,tuple:this.newtuple(e,this._prev&&this._prev[t]),stamp:this.stamp,store:!1};if(!this._countOnly){var n,r=this._measures,i=r.length;for(A.agg=Array(i),n=0;n<i;++n)A.agg[n]=new r[n](A)}return A.store&&(A.data=new Ma),A},Ja.newtuple=function(t,e){var A,n,r=this._dnames,i=this._dims,o={};for(A=0,n=i.length;A<n;++A)o[r[A]]=i[A](t);return e?xt(e.tuple,o):Gt(o)},Ja.clean=function(){var t=this.value;for(var e in t)0===t[e].num&&delete t[e]},Ja.add=function(t){var e,A,n,r=this.cellkey(t),i=this.cell(r,t);if(i.num+=1,!this._countOnly)for(i.store&&i.data.add(t),A=0,n=(e=i.agg).length;A<n;++A)e[A].add(e[A].get(t),t)},Ja.rem=function(t){var e,A,n,r=this.cellkey(t),i=this.cell(r,t);if(i.num-=1,!this._countOnly)for(i.store&&i.data.rem(t),A=0,n=(e=i.agg).length;A<n;++A)e[A].rem(e[A].get(t),t)},Ja.celltuple=function(t){var e,A,n,r=t.tuple,i=this._counts;for(t.store&&t.data.values(),A=0,n=i.length;A<n;++A)r[i[A]]=t.num;if(!this._countOnly)for(A=0,n=(e=t.agg).length;A<n;++A)e[A].set(r);return r},Ja.changes=function(t){var e,A,n,r,i=this._adds,o=this._mods,a=this._prev,s=this._drop,g=t.add,c=t.rem,I=t.mod;if(a)for(A in a)e=a[A],s&&!e.num||c.push(e.tuple);for(n=0,r=this._alen;n<r;++n)g.push(this.celltuple(i[n])),i[n]=null;for(n=0,r=this._mlen;n<r;++n)(0===(e=o[n]).num&&s?c:I).push(this.celltuple(e)),o[n]=null;return this._alen=this._mlen=0,this._prev=null,t};function Ta(t){lo.call(this,null,t)}Ta.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 ja=Object(U.y)(Ta,lo);ja.transform=function(t,e){var A,n=!1!==t.interval,r=this._bins(t),i=r.start,o=r.step,a=t.as||["bin0","bin1"],s=a[0],g=a[1];return A=t.modified()?(e=e.reflow(!0)).SOURCE:e.modified(Object(U.g)(t.field))?e.ADD_MOD:e.ADD,e.visit(A,n?function(t){var e=r(t);t[s]=e,t[g]=null==e?null:i+o*(1+(e-i)/o)}:function(t){t[s]=r(t)}),e.modifies(n?a:s)},ja._bins=function(t){if(this.value&&!t.modified())return this.value;var e,A,n=t.field,r=Zo(t),i=r.step,o=r.start,a=o+Math.ceil((r.stop-o)/i)*i;null!=(e=t.anchor)&&(A=e-(o+i*Math.floor((e-o)/i)),o+=A,a+=A);var s=function(t){var e=Object(U.cb)(n(t));return null==e?null:e<o?-1/0:e>a?1/0:(e=Math.max(o,Math.min(e,a-i)),o+i*Math.floor(1e-14+(e-o)/i))};return s.start=o,s.stop=r.stop,s.step=i,this.value=Object(U.f)(s,Object(U.g)(n),t.name||"bin_"+Object(U.h)(n))};var Ha=function(t,e,A){var n=t,r=e||[],i=A||[],o={},a=0;return{add:function(t){i.push(t)},remove:function(t){o[n(t)]=++a},size:function(){return r.length},data:function(t,e){return a&&(r=r.filter((function(t){return!o[n(t)]})),o={},a=0),e&&t&&r.sort(t),i.length&&(r=t?Object(U.M)(t,r,i.sort(t)):r.concat(i),i=[]),r}}};function Ya(t){lo.call(this,[],t)}function Va(t){Yt.call(this,null,Za,t)}function Za(t){return this.value&&!t.modified()?this.value:Object(U.k)(t.fields,t.orders)}function Wa(t){lo.call(this,null,t)}Ya.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},Object(U.y)(Ya,lo).transform=function(t,e){var A=e.fork(e.ALL),n=Ha(Rt,this.value,A.materialize(A.ADD).add),r=t.sort,i=e.changed()||r&&(t.modified("sort")||e.modified(r.fields));return A.visit(A.REM,n.remove),this.modified(i),this.value=A.source=n.data(Ot(r),i),e.source&&e.source.root&&(this.value.root=e.source.root),A},Object(U.y)(Va,Yt),Wa.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 Ka=Object(U.y)(Wa,lo);function Pa(t){lo.call(this,null,t)}Ka.transform=function(t,e){function A(e){return function(A){for(var n,r=function(t,e,A){switch(e){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase()}return t.match(A)}(a(A),t.case,i)||[],s=0,g=r.length;s<g;++s)o.test(n=r[s])||e(n)}}var n=this._parameterCheck(t,e),r=this._counts,i=this._match,o=this._stop,a=t.field,s=t.as||["text","count"],g=A((function(t){r[t]=1+(r[t]||0)})),c=A((function(t){r[t]-=1}));return n?e.visit(e.SOURCE,g):(e.visit(e.ADD,g),e.visit(e.REM,c)),this._finish(e,s)},Ka._parameterCheck=function(t,e){var A=!1;return!t.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(t.stopwords||"")+"$","i"),A=!0),!t.modified("pattern")&&this._match||(this._match=new RegExp(t.pattern||"[\\w']+","g"),A=!0),(t.modified("field")||e.modified(t.field.fields))&&(A=!0),A&&(this._counts={}),A},Ka._finish=function(t,e){var A,n,r,i=this._counts,o=this._tuples||(this._tuples={}),a=e[0],s=e[1],g=t.fork(t.NO_SOURCE|t.NO_FIELDS);for(A in i)n=o[A],r=i[A]||0,!n&&r?(o[A]=n=Gt({}),n[a]=A,n[s]=r,g.add.push(n)):0===r?(n&&g.rem.push(n),i[A]=null,o[A]=null):n[s]!==r&&(n[s]=r,g.mod.push(n));return g.modifies(e)},Pa.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},Object(U.y)(Pa,lo).transform=function(t,e){var A=e.fork(e.NO_SOURCE),n=this.value,r=t.as||["a","b"],i=r[0],o=r[1];return!n||e.changed(e.ADD_REM)||t.modified("as")||t.modified("filter")?(n&&(A.rem=n),n=e.materialize(e.SOURCE).source,A.add=this.value=function(t,e,A,n){for(var r,i,o=[],a={},s=t.length,g=0;g<s;++g)for(a[e]=i=t[g],r=0;r<s;++r)a[A]=t[r],n(a)&&(o.push(Gt(a)),(a={})[e]=i);return o}(n,i,o,t.filter||U.gb)):A.mod=n,A.source=this.value,A.modifies(r)};var qa={kde:aa,mixture:la,normal:oa,lognormal:ua,uniform:da};function Xa(t){lo.call(this,null,t)}var za=[{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}]}],$a={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:za},{name:"weights",type:"number",array:!0}]};function ts(t,e){return t?t.map((function(t,A){return e[A]||Object(U.h)(t)})):null}function es(t,e,A){var n,r,i,o,a,s,g=[],c=function(t){return t(o)};if(null==e)g.push(t.map(A));else for(n={},r=0,i=t.length;r<i;++r)o=t[r],(s=n[a=e.map(c)])||(n[a]=s=[],s.dims=a,g.push(s)),s.push(A(o));return g}Xa.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:za.concat($a)},{name:"as",type:"string",array:!0,default:["value","density"]}]},Object(U.y)(Xa,lo).transform=function(t,e){var A=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){var n=function t(e,A){var n=e.function;Object(U.v)(qa,n)||Object(U.n)("Unknown distribution function: "+n);var r=qa[n]();for(var i in e)"field"===i?r.data((e.from||A()).map(e[i])):"distributions"===i?r[i](e[i].map((function(e){return t(e,A)}))):"function"===typeof r[i]&&r[i](e[i]);return r}(t.distribution,function(t){return function(){return t.materialize(t.SOURCE).source}}(e)),r=t.steps||t.minsteps||25,i=t.steps||t.maxsteps||200,o=t.method||"pdf";"pdf"!==o&&"cdf"!==o&&Object(U.n)("Invalid density method: "+o),t.extent||n.data||Object(U.n)("Missing density extent parameter."),o=n[o];var a=t.as||["value","density"],s=t.extent||Object(U.p)(n.data()),g=xa(o,s,r,i).map((function(t){var e={};return e[a[0]]=t[0],e[a[1]]=t[1],Gt(e)}));this.value&&(A.rem=this.value),this.value=A.add=A.source=g}return A};function As(t){lo.call(this,null,t)}function ns(t){Yt.call(this,null,rs,t),this.modified(!0)}function rs(t){var e=t.expr;return this.value&&!t.modified("expr")?this.value:Object(U.f)((function(A){return e(A,t)}),Object(U.g)(e),Object(U.h)(e))}function is(t){lo.call(this,[void 0,void 0],t)}function os(t,e){Yt.call(this,t),this.parent=e,this.count=0}As.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(U.y)(As,lo).transform=function(t,e){if(this.value&&!t.modified()&&!e.changed())return e;for(var A,n=e.materialize(e.SOURCE).source,r=es(e.source,t.groupby,U.x),i=t.smooth||!1,o=t.field,a=t.step||function(t,e){return Object(U.X)(Object(U.p)(t,e))/30}(n,o),s=Ot((function(t,e){return o(t)-o(e)})),g=t.as||"bin",c=r.length,I=1/0,u=-1/0,l=0;l<c;++l){var C=r[l].sort(s);A=-1;var h,B=Object(R.a)(qo(C,a,i,o));try{for(B.s();!(h=B.n()).done;){var f=h.value;f<I&&(I=f),f>u&&(u=f),C[++A][g]=f}}catch(d){B.e(d)}finally{B.f()}}return this.value={start:I,stop:u,step:a},e.reflow(!0).modifies(g)},Object(U.y)(ns,Yt),is.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},Object(U.y)(is,lo).transform=function(t,e){var A,n=this.value,r=t.field,i=n[0],o=n[1];if(((A=e.changed()||e.modified(r.fields)||t.modified("field"))||null==i)&&(i=1/0,o=-1/0),e.visit(A?e.SOURCE:e.ADD,(function(t){var e=Object(U.cb)(r(t));null!=e&&(e<i&&(i=e),e>o&&(o=e))})),!Number.isFinite(i)||!Number.isFinite(o)){var a=Object(U.h)(r);a&&(a=' for field "'.concat(a,'"')),e.dataflow.warn("Infinite extent".concat(a,": [").concat(i,", ").concat(o,"]")),i=o=void 0}this.value=[i,o]};var as=Object(U.y)(os,Yt);function ss(t){lo.call(this,{},t),this._keys=Object(U.s)();var e=this._targets=[];e.active=0,e.forEach=function(t){for(var A=0,n=e.active;A<n;++A)t(e[A],A,e)}}as.connect=function(t){return this.detachSubflow=t.detachSubflow,this.targets().add(t),t.source=this},as.add=function(t){this.count+=1,this.value.add.push(t)},as.rem=function(t){this.count-=1,this.value.rem.push(t)},as.mod=function(t){this.value.mod.push(t)},as.init=function(t){this.value.init(t,t.NO_SOURCE)},as.evaluate=function(){return this.value};var gs=Object(U.y)(ss,lo);function cs(t){Yt.call(this,null,Is,t)}function Is(t){return this.value&&!t.modified()?this.value:Object(U.A)(t.name)?Object(U.i)(t.name).map((function(t){return Object(U.t)(t)})):Object(U.t)(t.name,t.as)}function us(t){lo.call(this,Object(U.s)(),t)}function ls(t){lo.call(this,[],t)}function Cs(t){lo.call(this,[],t)}function hs(t){lo.call(this,null,t)}function Bs(t){lo.call(this,[],t)}function fs(t,e){var A;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;null!=i&&(A<i||void 0===A&&i>=i)&&(A=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;null!=(g=e(g,++a,t))&&(A<g||void 0===A&&g>=g)&&(A=g)}}catch(c){s.e(c)}finally{s.f()}}return A}function ds(t,e){var A;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;null!=i&&(A>i||void 0===A&&i>=i)&&(A=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;null!=(g=e(g,++a,t))&&(A>g||void 0===A&&g>=g)&&(A=g)}}catch(c){s.e(c)}finally{s.f()}}return A}gs.activate=function(t){this._targets[this._targets.active++]=t},gs.subflow=function(t,e,A,n){var r,i,o=this.value,a=Object(U.v)(o,t)&&o[t];return a?a.value.stamp<A.stamp&&(a.init(A),this.activate(a)):(i=n||(i=this._group[t])&&i.tuple,r=A.dataflow,a=new os(A.fork(A.NO_SOURCE),this),r.add(a).connect(e(r,t,i)),o[t]=a,this.activate(a)),a},gs.clean=function(){var t=this.value;for(var e in t)if(0===t[e].count){var A=t[e].detachSubflow;A&&A(),delete t[e]}},gs.initTargets=function(){for(var t=this._targets,e=t.length,A=0;A<e&&null!=t[A];++A)t[A]=null;t.active=0},gs.transform=function(t,e){var A=this,n=e.dataflow,r=t.key,i=t.subflow,o=this._keys,a=t.modified("key"),s=function(t){return A.subflow(t,i,e)};return this._group=t.group||{},this.initTargets(),e.visit(e.REM,(function(t){var e=Rt(t),A=o.get(e);void 0!==A&&(o.delete(e),s(A).rem(t))})),e.visit(e.ADD,(function(t){var e=r(t);o.set(Rt(t),e),s(e).add(t)})),a||e.modified(r.fields)?e.visit(e.MOD,(function(t){var e=Rt(t),A=o.get(e),n=r(t);A===n?s(n).mod(t):(o.set(e,n),s(A).rem(t),s(n).add(t))})):e.changed(e.MOD)&&e.visit(e.MOD,(function(t){s(o.get(Rt(t))).mod(t)})),a&&e.visit(e.REFLOW,(function(t){var e=Rt(t),A=o.get(e),n=r(t);A!==n&&(o.set(e,n),s(A).rem(t),s(n).add(t))})),e.clean()?n.runAfter((function(){A.clean(),o.clean()})):o.empty>n.cleanThreshold&&n.runAfter(o.clean),e},Object(U.y)(cs,Yt),us.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},Object(U.y)(us,lo).transform=function(t,e){var A=e.dataflow,n=this.value,r=e.fork(),i=r.add,o=r.rem,a=r.mod,s=t.expr,g=!0;function c(e){var A=Rt(e),r=s(e,t),c=n.get(A);r&&c?(n.delete(A),i.push(e)):r||c?g&&r&&!c&&a.push(e):(n.set(A,1),o.push(e))}return e.visit(e.REM,(function(t){var e=Rt(t);n.has(e)?n.delete(e):o.push(t)})),e.visit(e.ADD,(function(e){s(e,t)?i.push(e):n.set(Rt(e),1)})),e.visit(e.MOD,c),t.modified()&&(g=!1,e.visit(e.REFLOW,c)),n.empty>A.cleanThreshold&&A.runAfter(n.clean),r},ls.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(U.y)(ls,lo).transform=function(t,e){var A=e.fork(e.NO_SOURCE),n=t.fields,r=ts(n,t.as||[]),i=t.index||null,o=r.length;return A.rem=this.value,e.visit(e.SOURCE,(function(t){for(var e,a,s,g=n.map((function(e){return e(t)})),c=g.reduce((function(t,e){return Math.max(t,e.length)}),0),I=0;I<c;++I){for(a=Nt(t),e=0;e<o;++e)a[r[e]]=null==(s=g[e][I])?null:s;i&&(a[i]=I),A.add.push(a)}})),this.value=A.source=A.add,i&&A.modifies(i),A.modifies(r)},Cs.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(U.y)(Cs,lo).transform=function(t,e){var A=e.fork(e.NO_SOURCE),n=t.fields,r=n.map(U.h),i=t.as||["key","value"],o=i[0],a=i[1],s=n.length;return A.rem=this.value,e.visit(e.SOURCE,(function(t){for(var e,i=0;i<s;++i)(e=Nt(t))[o]=r[i],e[a]=n[i](t),A.add.push(e)})),this.value=A.source=A.add,A.modifies(i)},hs.Definition={type:"Formula",metadata:{modifies:!0},params:[{name:"expr",type:"expr",required:!0},{name:"as",type:"string",required:!0},{name:"initonly",type:"boolean"}]},Object(U.y)(hs,lo).transform=function(t,e){var A=t.expr,n=t.as,r=t.modified(),i=t.initonly?e.ADD:r?e.SOURCE:e.modified(A.fields)||e.modified(n)?e.ADD_MOD:e.ADD;return r&&(e=e.materialize().reflow(!0)),t.initonly||e.modifies(n),e.visit(i,(function(e){return e[n]=A(e,t)}))},Object(U.y)(Bs,lo).transform=function(t,e){var A,n,r,i=this.value,o=e.fork(e.ALL),a=t.size-i.length,s=t.generator;if(a>0){for(A=[];--a>=0;)A.push(r=Gt(s(t))),i.push(r);o.add=o.add.length?o.materialize(o.ADD).add.concat(A):A}else n=i.slice(0,-a),o.rem=o.rem.length?o.materialize(o.REM).rem.concat(n):n,i=i.slice(-a);return o.source=this.value=i,o};var Qs=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};function Es(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}var ps=H.a.mark(ys);function ys(t,e){var A,n,r,i,o,a,s;return H.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:if(void 0!==e){g.next=21;break}A=Object(R.a)(t),g.prev=2,A.s();case 4:if((n=A.n()).done){g.next=11;break}if(!(null!=(r=n.value)&&(r=+r)>=r)){g.next=9;break}return g.next=9,r;case 9:g.next=4;break;case 11:g.next=16;break;case 13:g.prev=13,g.t0=g.catch(2),A.e(g.t0);case 16:return g.prev=16,A.f(),g.finish(16);case 19:g.next=40;break;case 21:i=-1,o=Object(R.a)(t),g.prev=23,o.s();case 25:if((a=o.n()).done){g.next=32;break}if(s=a.value,!(null!=(s=e(s,++i,t))&&(s=+s)>=s)){g.next=30;break}return g.next=30,s;case 30:g.next=25;break;case 32:g.next=37;break;case 34:g.prev=34,g.t1=g.catch(23),o.e(g.t1);case 37:return g.prev=37,o.f(),g.finish(37);case 40:case"end":return g.stop()}}),ps,null,[[2,13,16,19],[23,34,37,40]])}function vs(t,e,A){if(n=(t=Float64Array.from(ys(t,A))).length){if((e=+e)<=0||n<2)return ds(t);if(e>=1)return fs(t);var n,r=(n-1)*e,i=Math.floor(r),o=fs(function t(e,A){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length-1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Qs;r>n;){if(r-n>600){var o=r-n+1,a=A-n+1,s=Math.log(o),g=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*g*(o-g)/o)*(a-o/2<0?-1:1),I=Math.max(n,Math.floor(A-a*g/o+c)),u=Math.min(r,Math.floor(A+(o-a)*g/o+c));t(e,A,I,u,i)}var l=e[A],C=n,h=r;for(Es(e,n,A),i(e[r],l)>0&&Es(e,n,r);C<h;){for(Es(e,C,h),++C,--h;i(e[C],l)<0;)++C;for(;i(e[h],l)>0;)--h}0===i(e[n],l)?Es(e,n,h):Es(e,++h,r),h<=A&&(n=h+1),A<=h&&(r=h-1)}return e}(t,i).subarray(0,i+1));return o+(ds(t.subarray(i+1))-o)*(r-i)}}var ms={value:"value",median:function(t,e){return vs(t,.5,e)},mean:function(t,e){var A=0,n=0;if(void 0===e){var r,i=Object(R.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;null!=o&&(o=+o)>=o&&(++A,n+=o)}}catch(I){i.e(I)}finally{i.f()}}else{var a,s=-1,g=Object(R.a)(t);try{for(g.s();!(a=g.n()).done;){var c=a.value;null!=(c=e(c,++s,t))&&(c=+c)>=c&&(++A,n+=c)}}catch(I){g.e(I)}finally{g.f()}}if(A)return n/A},min:ds,max:fs},bs=[];function Fs(t){lo.call(this,[],t)}function ws(t){_a.call(this,t)}Fs.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(U.y)(Fs,lo).transform=function(t,e){var A,n,r,i,o,a,s,g,c,I,u=e.fork(e.ALL),l=function(t){var e,A=t.method||ms.value;if(null!=ms[A])return A===ms.value?(e=void 0!==t.value?t.value:0,function(){return e}):ms[A];Object(U.n)("Unrecognized imputation method: "+A)}(t),C=function(t){var e=t.field;return function(t){return t?e(t):NaN}}(t),h=Object(U.h)(t.field),B=Object(U.h)(t.key),f=(t.groupby||[]).map(U.h),d=function(t,e,A,n){var r,i,o,a,s,g,c,I,u=function(t){return t(I)},l=[],C=n?n.slice():[],h={},B={};for(C.forEach((function(t,e){h[t]=e+1})),a=0,c=t.length;a<c;++a)I=t[a],g=A(I),s=h[g]||(h[g]=C.push(g)),i=(r=e?e.map(u):bs)+"",(o=B[i])||(o=B[i]=[],l.push(o),o.values=r),o[s-1]=I;return l.domain=C,l}(e.source,t.groupby,t.key,t.keyvals),Q=[],E=this.value,p=d.domain.length;for(o=0,g=d.length;o<g;++o)for(r=(A=d[o]).values,n=NaN,s=0;s<p;++s)if(null==A[s]){for(i=d.domain[s],I={_impute:!0},a=0,c=r.length;a<c;++a)I[f[a]]=r[a];I[B]=i,I[h]=Number.isNaN(n)?n=l(A,C):n,Q.push(Gt(I))}return Q.length&&(u.add=u.materialize(u.ADD).add.concat(Q)),E.length&&(u.rem=u.materialize(u.REM).rem.concat(E)),this.value=Q,u},ws.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:mo},{name:"as",type:"string",null:!0,array:!0},{name:"key",type:"field"}]};var Ss=Object(U.y)(ws,_a);function Ds(t){lo.call(this,null,t)}function Rs(t){Yt.call(this,null,Us,t)}function Us(t){return this.value&&!t.modified()?this.value:Object(U.I)(t.fields,t.flat)}function Gs(t){lo.call(this,[],t),this._pending=null}function Ns(t,e,A){A.forEach(Gt);var n=e.fork(e.NO_FIELDS&e.NO_SOURCE);return n.rem=t.value,t.value=n.source=n.add=A,t._pending=null,n.rem.length&&n.clean(!0),n}function ks(t){lo.call(this,{},t)}function xs(t){Yt.call(this,null,Os,t)}function Os(t){if(this.value&&!t.modified())return this.value;var e,A,n,r=1/0,i=-1/0,o=t.extents;for(e=0,A=o.length;e<A;++e)(n=o[e])[0]<r&&(r=n[0]),n[1]>i&&(i=n[1]);return[r,i]}function Ms(t){Yt.call(this,null,Ls,t)}function Ls(t){return this.value&&!t.modified()?this.value:t.values.reduce((function(t,e){return t.concat(e)}),[])}function _s(t){lo.call(this,null,t)}function Js(t){_a.call(this,t)}Ss.transform=function(t,e){var A,n=this,r=t.modified();return n.value&&(r||e.modified(n._inputs,!0))?(A=n.value=r?n.init(t):{},e.visit(e.SOURCE,(function(t){n.add(t)}))):(A=n.value=n.value||this.init(t),e.visit(e.REM,(function(t){n.rem(t)})),e.visit(e.ADD,(function(t){n.add(t)}))),n.changes(),e.visit(e.SOURCE,(function(t){Object(U.o)(t,A[n.cellkey(t)].tuple)})),e.reflow(r).modifies(this._outputs)},Ss.changes=function(){var t,e,A=this._adds,n=this._mods;for(t=0,e=this._alen;t<e;++t)this.celltuple(A[t]),A[t]=null;for(t=0,e=this._mlen;t<e;++t)this.celltuple(n[t]),n[t]=null;this._alen=this._mlen=0},Ds.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(U.y)(Ds,lo).transform=function(t,e){var A=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){var n=e.materialize(e.SOURCE).source,r=es(n,t.groupby,t.field),i=(t.groupby||[]).map(U.h),o=t.bandwidth,a=t.cumulative?"cdf":"pdf",s=t.as||["value","density"],g=[],c=t.extent,I=t.steps||t.minsteps||25,u=t.steps||t.maxsteps||200;"pdf"!==a&&"cdf"!==a&&Object(U.n)("Invalid density method: "+a),"shared"===t.resolve&&(c||(c=Object(U.p)(n,t.field)),I=u=t.steps||u),r.forEach((function(e){var A=aa(e,o)[a],n=t.counts?e.length:1,r=c||Object(U.p)(e);xa(A,r,I,u).forEach((function(t){for(var A={},r=0;r<i.length;++r)A[i[r]]=e.dims[r];A[s[0]]=t[0],A[s[1]]=t[1]*n,g.push(Gt(A))}))})),this.value&&(A.rem=this.value),this.value=A.add=A.source=g}return A},Object(U.y)(Rs,Yt),Object(U.y)(Gs,lo).transform=function(t,e){var A=this,n=e.dataflow;return this._pending?Ns(this,e,this._pending):function(t){return t.modified("async")&&!(t.modified("values")||t.modified("url")||t.modified("format"))}(t)?e.StopPropagation:t.values?Ns(this,e,n.parse(t.values,t.format)):t.async?{async:n.request(t.url,t.format).then((function(t){return A._pending=Object(U.i)(t.data),function(t){return t.touch(A)}}))}:n.request(t.url,t.format).then((function(t){return Ns(A,e,Object(U.i)(t.data))}))},ks.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(U.y)(ks,lo).transform=function(t,e){var A,n,r=e,i=t.as,o=t.fields,a=t.index,s=t.values,g=null==t.default?null:t.default,c=t.modified(),I=c?e.SOURCE:e.ADD,u=o.length;return s?(n=s.length,u>1&&!i&&Object(U.n)('Multi-field lookup requires explicit "as" parameter.'),i&&i.length!==u*n&&Object(U.n)('The "as" parameter has too few output field names.'),i=i||s.map(U.h),A=function(t){for(var e,A,r=0,c=0;r<u;++r)if(null==(A=a.get(o[r](t))))for(e=0;e<n;++e,++c)t[i[c]]=g;else for(e=0;e<n;++e,++c)t[i[c]]=s[e](A)}):(i||Object(U.n)("Missing output field names."),A=function(t){for(var e,A=0;A<u;++A)e=a.get(o[A](t)),t[i[A]]=null==e?g:e}),c?r=e.reflow(!0):I|=o.some((function(t){return e.modified(t.fields)}))?e.MOD:0,e.visit(I,A),r.modifies(i)},Object(U.y)(xs,Yt),Object(U.y)(Ms,Yt),Object(U.y)(_s,lo),_s.prototype.transform=function(t,e){return this.modified(t.modified()),this.value=t,e.fork(e.NO_SOURCE|e.NO_FIELDS)},Js.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:mo,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};var Ts=Object(U.y)(Js,_a);function js(t){ss.call(this,t)}function Hs(t){lo.call(this,null,t)}function Ys(t){lo.call(this,null,t)}Ts._transform=Ts.transform,Ts.transform=function(t,e){return this._transform(function(t,e){var A=t.field,n=t.value,r=("count"===t.op?"__count__":t.op)||"sum",i=Object(U.g)(A).concat(Object(U.g)(n)),o=function(t,e,A){var n={},r=[];return A.visit(A.SOURCE,(function(e){var A=t(e);n[A]||(n[A]=1,r.push(A))})),r.sort((function(t,e){return(t<e||null==t)&&null!=e?-1:(t>e||null==e)&&null!=t?1:(e=e instanceof Date?+e:e,(t=t instanceof Date?+t:t)!==t&&e===e?-1:e!==e&&t===t?1:0)})),e?r.slice(0,e):r}(A,t.limit||0,e);e.changed()&&t.set("__pivot__",null,null,!0);return{key:t.key,groupby:t.groupby,ops:o.map((function(){return r})),fields:o.map((function(t){return function(t,e,A,n){return Object(U.f)((function(n){return e(n)===t?A(n):NaN}),n,t+"")}(t,A,n,i)})),as:o.map((function(t){return t+""})),modified:t.modified.bind(t)}}(t,e),e)},Object(U.y)(js,ss).transform=function(t,e){var A=this,n=t.subflow,r=t.field,i=function(t){return A.subflow(Rt(t),n,e,t)};return(t.modified("field")||r&&e.modified(Object(U.g)(r)))&&Object(U.n)("PreFacet does not support field modification."),this.initTargets(),r?(e.visit(e.MOD,(function(t){var e=i(t);r(t).forEach((function(t){return e.mod(t)}))})),e.visit(e.ADD,(function(t){var e=i(t);r(t).forEach((function(t){return e.add(Gt(t))}))})),e.visit(e.REM,(function(t){var e=i(t);r(t).forEach((function(t){return e.rem(t)}))}))):(e.visit(e.MOD,(function(t){return i(t).mod(t)})),e.visit(e.ADD,(function(t){return i(t).add(t)})),e.visit(e.REM,(function(t){return i(t).rem(t)}))),e.clean()&&e.runAfter((function(){return A.clean()})),e},Hs.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},Object(U.y)(Hs,lo).transform=function(t,e){var A,n,r=t.fields,i=ts(t.fields,t.as||[]),o=r?function(t,e){return function(t,e,A,n){for(var r=0,i=A.length;r<i;++r)e[n[r]]=A[r](t);return e}(t,e,r,i)}:kt;return this.value?n=this.value:(e=e.addAll(),n=this.value={}),A=e.fork(e.NO_SOURCE),e.visit(e.REM,(function(t){var e=Rt(t);A.rem.push(n[e]),n[e]=null})),e.visit(e.ADD,(function(t){var e=o(t,Gt({}));n[Rt(t)]=e,A.add.push(e)})),e.visit(e.MOD,(function(t){A.mod.push(o(t,n[Rt(t)]))})),A},Object(U.y)(Ys,lo).transform=function(t,e){return this.value=t.value,t.modified("value")?e.fork(e.NO_SOURCE|e.NO_FIELDS):e.StopPropagation};var Vs=function(t,e,A){t=+t,e=+e,A=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+A;for(var n=-1,r=0|Math.max(0,Math.ceil((e-t)/A)),i=new Array(r);++n<r;)i[n]=t+n*A;return i};function Zs(t){lo.call(this,null,t)}Zs.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 Ws=Object(U.y)(Zs,lo);function Ks(t){lo.call(this,null,t)}function Ps(t){lo.call(this,[],t),this.count=0}function qs(t){lo.call(this,null,t)}function Xs(t){lo.call(this,null,t),this.modified(!0)}function zs(t){lo.call(this,null,t)}Ws.transform=function(t,e){var A=e.fork(e.NO_SOURCE|e.NO_FIELDS),n=t.as||["prob","value"];if(this.value&&!t.modified()&&!e.changed())return A.source=this.value,A;var r=es(e.materialize(e.SOURCE).source,t.groupby,t.field),i=(t.groupby||[]).map(U.h),o=[],a=t.step||.01,s=t.probs||Vs(a/2,1-1e-14,a),g=s.length;return r.forEach((function(t){for(var e=jo(t,s),A=0;A<g;++A){for(var r={},a=0;a<i.length;++a)r[i[a]]=t.dims[a];r[n[0]]=s[A],r[n[1]]=e[A],o.push(Gt(r))}})),this.value&&(A.rem=this.value),this.value=A.add=A.source=o,A},Object(U.y)(Ks,lo).transform=function(t,e){var A,n;return this.value?n=this.value:(A=e=e.addAll(),n=this.value={}),t.derive&&(A=e.fork(e.NO_SOURCE),e.visit(e.REM,(function(t){var e=Rt(t);A.rem.push(n[e]),n[e]=null})),e.visit(e.ADD,(function(t){var e=Nt(t);n[Rt(t)]=e,A.add.push(e)})),e.visit(e.MOD,(function(t){var e,r=n[Rt(t)];for(e in t)r[e]=t[e],A.modifies(e);A.mod.push(r)}))),A},Ps.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},Object(U.y)(Ps,lo).transform=function(t,e){var A=e.fork(e.NO_SOURCE),n=t.modified("size"),r=t.size,i=this.value,o=this.count,a=0,s=i.reduce((function(t,e){return t[Rt(e)]=1,t}),{});function g(t){var e,n;i.length<r?i.push(t):(n=~~((o+1)*Wo()))<i.length&&n>=a&&(e=i[n],s[Rt(e)]&&A.rem.push(e),i[n]=t),++o}if(e.rem.length&&(e.visit(e.REM,(function(t){var e=Rt(t);s[e]&&(s[e]=-1,A.rem.push(t)),--o})),i=i.filter((function(t){return-1!==s[Rt(t)]}))),(e.rem.length||n)&&i.length<r&&e.source&&(a=o=i.length,e.visit(e.SOURCE,(function(t){s[Rt(t)]||g(t)})),a=-1),n&&i.length>r){for(var c=0,I=i.length-r;c<I;++c)s[Rt(i[c])]=-1,A.rem.push(i[c]);i=i.slice(I)}return e.mod.length&&e.visit(e.MOD,(function(t){s[Rt(t)]&&A.mod.push(t)})),e.add.length&&e.visit(e.ADD,g),(e.add.length||a<0)&&(A.add=i.filter((function(t){return!s[Rt(t)]}))),this.count=o,this.value=A.source=i,A},qs.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(U.y)(qs,lo).transform=function(t,e){if(!this.value||t.modified()){var A=e.materialize().fork(e.MOD),n=t.as||"data";return A.rem=this.value?e.rem.concat(this.value):e.rem,this.value=Vs(t.start,t.stop,t.step||1).map((function(t){var e={};return e[n]=t,Gt(e)})),A.add=e.add.concat(this.value),A}},Object(U.y)(Xs,lo).transform=function(t,e){return this.value=e.source,e.changed()?e.fork(e.NO_SOURCE|e.NO_FIELDS):e.StopPropagation};var $s=["unit0","unit1"];zs.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:QA,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:$s}]};var tg=Object(U.y)(zs,lo);function eg(t){lo.call(this,Object(U.s)(),t)}function Ag(t){lo.call(this,null,t)}tg.transform=function(t,e){var A=t.field,n=!1!==t.interval,r="utc"===t.timezone,i=this._floor(t,e),o=(r?Vn:Yn)(i.unit).offset,a=t.as||$s,s=a[0],g=a[1],c=i.start||1/0,I=i.stop||-1/0,u=i.step,l=e.ADD;return(t.modified()||e.modified(Object(U.g)(A)))&&(l=(e=e.reflow(!0)).SOURCE,c=1/0,I=-1/0),e.visit(l,(function(t){var e,r,a=A(t);null==a?(t[s]=null,n&&(t[g]=null)):(t[s]=e=r=i(a),n&&(t[g]=r=o(e,u)),e<c&&(c=e),r>I&&(I=r))})),i.start=c,i.stop=I,e.modifies(n?a:s)},tg._floor=function(t,e){var A="utc"===t.timezone,n=t.units?{units:t.units,step:t.step||1}:Ir({extent:t.extent||Object(U.p)(e.materialize(e.SOURCE).source,t.field),maxbins:t.maxbins}),r=n.units,i=n.step;r=pA(r);var o=this.value||{},a=(A?Qn:Bn)(r,i);return a.unit=Object(U.U)(r),a.units=r,a.step=i,a.start=o.start,a.stop=o.stop,this.value=a},Object(U.y)(eg,lo).transform=function(t,e){var A=e.dataflow,n=t.field,r=this.value,i=!0;function o(t){r.set(n(t),t)}return t.modified("field")||e.modified(n.fields)?(r.clear(),e.visit(e.SOURCE,o)):e.changed()?(e.visit(e.REM,(function(t){r.delete(n(t))})),e.visit(e.ADD,o)):i=!1,this.modified(i),r.empty>A.cleanThreshold&&A.runAfter(r.clean),e.fork()},Object(U.y)(Ag,lo).transform=function(t,e){(!this.value||t.modified("field")||t.modified("sort")||e.changed()||t.sort&&e.modified(t.sort.fields))&&(this.value=(t.sort?e.source.slice().sort(Ot(t.sort)):e.source).map(t.field))};var ng={row_number:function(){return{next:function(t){return t.index+1}}},rank:function(){var t;return{init:function(){return t=1},next:function(e){var A=e.index,n=e.data;return A&&e.compare(n[A-1],n[A])?t=A+1:t}}},dense_rank:function(){var t;return{init:function(){return t=1},next:function(e){var A=e.index,n=e.data;return A&&e.compare(n[A-1],n[A])?++t:t}}},percent_rank:function(){var t=ng.rank(),e=t.next;return{init:t.init,next:function(t){return(e(t)-1)/(t.data.length-1)}}},cume_dist:function(){var t;return{init:function(){return t=0},next:function(e){var A=e.index,n=e.data,r=e.compare;if(t<A){for(;A+1<n.length&&!r(n[A],n[A+1]);)++A;t=A}return(1+t)/n.length}}},ntile:function(t,e){(e=+e)>0||Object(U.n)("ntile num must be greater than zero.");var A=ng.cume_dist(),n=A.next;return{init:A.init,next:function(t){return Math.ceil(e*n(t))}}},lag:function(t,e){return e=+e||1,{next:function(A){var n=A.index-e;return n>=0?t(A.data[n]):null}}},lead:function(t,e){return e=+e||1,{next:function(A){var n=A.index+e,r=A.data;return n<r.length?t(r[n]):null}}},first_value:function(t){return{next:function(e){return t(e.data[e.i0])}}},last_value:function(t){return{next:function(e){return t(e.data[e.i1-1])}}},nth_value:function(t,e){return(e=+e)>0||Object(U.n)("nth_value nth must be greater than zero."),{next:function(A){var n=A.i0+(e-1);return n<A.i1?t(A.data[n]):null}}},prev_value:function(t){var e;return{init:function(){return e=null},next:function(A){var n=t(A.data[A.index]);return null!=n?e=n:e}}},next_value:function(t){var e,A;return{init:function(){return e=null,A=-1},next:function(n){var r=n.data;return n.index<=A?e:(A=function(t,e,A){for(var n=e.length;A<n;++A){if(null!=t(e[A]))return A}return-1}(t,r,n.index))<0?(A=r.length,e=null):e=t(r[A])}}}};var rg=Object.keys(ng);function ig(t){var e=Object(U.i)(t.ops),A=Object(U.i)(t.fields),n=Object(U.i)(t.params),r=Object(U.i)(t.as),i=this.outputs=[],o=this.windows=[],a={},s={},g=!0,c=[],I=[];function u(t){Object(U.i)(Object(U.g)(t)).forEach((function(t){return a[t]=1}))}u(t.sort),e.forEach((function(t,e){var a=A[e],l=Object(U.h)(a),C=Eo(t,l,r[e]);if(u(a),i.push(C),Object(U.v)(ng,t))o.push(function(t,e,A,n){var r=ng[t](e,A);return{init:r.init||U.kb,update:function(t,e){e[n]=r.next(t)}}}(t,A[e],n[e],C));else{if(null==a&&"count"!==t&&Object(U.n)("Null aggregate field specified."),"count"===t)return void c.push(C);g=!1;var h=s[l];h||((h=s[l]=[]).field=a,I.push(h)),h.push(bo(t,C))}})),(c.length||I.length)&&(this.cell=function(t,e,A){t=t.map((function(t){return Uo(t,t.field)}));var n={num:0,agg:null,store:!1,count:e};if(!A)for(var r=t.length,i=n.agg=Array(r),o=0;o<r;++o)i[o]=new t[o](n);if(n.store)var a=n.data=new Ma;return n.add=function(t){if(n.num+=1,!A){a&&a.add(t);for(var e=0;e<r;++e)i[e].add(i[e].get(t),t)}},n.rem=function(t){if(n.num-=1,!A){a&&a.rem(t);for(var e=0;e<r;++e)i[e].rem(i[e].get(t),t)}},n.set=function(t){var r,o;for(a&&a.values(),r=0,o=e.length;r<o;++r)t[e[r]]=n.num;if(!A)for(r=0,o=i.length;r<o;++r)i[r].set(t)},n.init=function(){n.num=0,a&&a.reset();for(var t=0;t<r;++t)i[t].init()},n}(I,c,g)),this.inputs=Object.keys(a)}var og=ig.prototype;og.init=function(){this.windows.forEach((function(t){return t.init()})),this.cell&&this.cell.init()},og.update=function(t,e){var A,n=this.cell,r=this.windows,i=t.data,o=r&&r.length;if(n){for(A=t.p0;A<t.i0;++A)n.rem(i[A]);for(A=t.p1;A<t.i1;++A)n.add(i[A]);n.set(e)}for(A=0;A<o;++A)r[A].update(t,e)};var ag=function(t){var e;return 1===t.length&&(e=t,t=function(t,A){return Qs(e(t),A)}),{left:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)<0?n=i+1:r=i}return n},right:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)>0?r=i:n=i+1}return n}}};function sg(t){lo.call(this,{},t),this._mlen=0,this._mods=[]}sg.Definition={type:"Window",metadata:{modifies:!0},params:[{name:"sort",type:"compare"},{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:rg.concat(mo)},{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 gg=Object(U.y)(sg,lo);function cg(t,e,A,n){var r=n.sort,i=r&&!n.ignorePeers,o=n.frame||[null,0],a=t.data(A),s=a.length,g=0,c=i?ag(r):null,I={i0:0,i1:0,p0:0,p1:0,index:0,data:a,compare:r||Object(U.l)(-1)};for(e.init();g<s;++g)Ig(I,o,g,s),i&&ug(I,c),e.update(I,a[g])}function Ig(t,e,A,n){t.p0=t.i0,t.p1=t.i1,t.i0=null==e[0]?0:Math.max(0,A-Math.abs(e[0])),t.i1=null==e[1]?n:Math.min(n,A+Math.abs(e[1])+1),t.index=A}function ug(t,e){var A=t.i0,n=t.i1-1,r=t.compare,i=t.data,o=i.length-1;A>0&&!r(i[A],i[A-1])&&(t.i0=e.left(i,i[A])),n<o&&!r(i[n],i[n+1])&&(t.i1=e.right(i,i[n]))}gg.transform=function(t,e){var A,n,r=this,i=r.state,o=t.modified(),a=Ot(t.sort);this.stamp=e.stamp,i&&!o||(i=r.state=new ig(t));var s=Qo(t.groupby);function g(t){return r.group(s(t))}for(o||e.modified(i.inputs)?(r.value={},e.visit(e.SOURCE,(function(t){g(t).add(t)}))):(e.visit(e.REM,(function(t){g(t).remove(t)})),e.visit(e.ADD,(function(t){g(t).add(t)}))),A=0,n=r._mlen;A<n;++A)cg(r._mods[A],i,a,t);return r._mlen=0,r._mods=[],e.reflow(o).modifies(i.outputs)},gg.group=function(t){var e=this.value[t];return e||((e=this.value[t]=Ha(Rt)).stamp=-1),e.stamp<this.stamp&&(e.stamp=this.stamp,this._mods[this._mlen++]=e),e};var lg="top",Cg="left",hg="right",Bg="end",fg="row",dg=0;function Qg(t){return t&&t.gradient}function Eg(t,e,A){var n=t.id,r=t.gradient,i="radial"===r?"p_":"";return n||(n=t.id="gradient_"+dg++,"radial"===r?(t.x1=pg(t.x1,.5),t.y1=pg(t.y1,.5),t.r1=pg(t.r1,0),t.x2=pg(t.x2,.5),t.y2=pg(t.y2,.5),t.r2=pg(t.r2,.5),i="p_"):(t.x1=pg(t.x1,0),t.y1=pg(t.y1,0),t.x2=pg(t.x2,1),t.y2=pg(t.y2,0))),e[n]=t,"url("+(A||"")+"#"+i+n+")"}function pg(t,e){return null!=t?t:e}var yg=function(t,e){var A,n=[];return A={gradient:"linear",x1:t?t[0]:0,y1:t?t[1]:0,x2:e?e[0]:1,y2:e?e[1]:0,stops:n,stop:function(t,e){return n.push({offset:t,color:e}),A}}};function vg(t,e,A){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+A)/6)}function mg(t){this._context=t}mg.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:vg(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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);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:vg(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var bg=function(){};function Fg(t){this._context=t}Fg.prototype={areaStart:bg,areaEnd:bg,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:vg(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function wg(t){this._context=t}wg.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var A=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(A,n):this._context.moveTo(A,n);break;case 3:this._point=4;default:vg(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Sg(t,e){this._basis=new mg(t),this._beta=e}Sg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,A=t.length-1;if(A>0)for(var n,r=t[0],i=e[0],o=t[A]-r,a=e[A]-i,s=-1;++s<=A;)n=s/A,this._basis.point(this._beta*t[s]+(1-this._beta)*(r+n*o),this._beta*e[s]+(1-this._beta)*(i+n*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Dg=function t(e){function A(t){return 1===e?new mg(t):new Sg(t,e)}return A.beta=function(e){return t(+e)},A}(.85);function Rg(t,e,A){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-A),t._x2,t._y2)}function Ug(t,e){this._context=t,this._k=(1-e)/6}Ug.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:Rg(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Rg(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Gg=function t(e){function A(t){return new Ug(t,e)}return A.tension=function(e){return t(+e)},A}(0);function Ng(t,e){this._context=t,this._k=(1-e)/6}Ng.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(t,e){switch(t=+t,e=+e,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:Rg(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kg=function t(e){function A(t){return new Ng(t,e)}return A.tension=function(e){return t(+e)},A}(0);function xg(t,e){this._context=t,this._k=(1-e)/6}xg.prototype={areaStart:bg,areaEnd:bg,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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Rg(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Og=function t(e){function A(t){return new xg(t,e)}return A.tension=function(e){return t(+e)},A}(0),Mg=Math.abs,Lg=Math.atan2,_g=Math.cos,Jg=Math.max,Tg=Math.min,jg=Math.sin,Hg=Math.sqrt,Yg=Math.PI,Vg=Yg/2,Zg=2*Yg;function Wg(t){return t>1?0:t<-1?Yg:Math.acos(t)}function Kg(t){return t>=1?Vg:t<=-1?-Vg:Math.asin(t)}function Pg(t,e,A){var n=t._x1,r=t._y1,i=t._x2,o=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var g=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*g+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*g+t._y1*t._l23_2a-A*t._l12_2a)/c}t._context.bezierCurveTo(n,r,i,o,t._x2,t._y2)}function qg(t,e){this._context=t,this._alpha=e}qg.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(t,e){if(t=+t,e=+e,this._point){var A=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(A*A+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Pg(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Xg=function t(e){function A(t){return e?new qg(t,e):new Ug(t,0)}return A.alpha=function(e){return t(+e)},A}(.5);function zg(t,e){this._context=t,this._alpha=e}zg.prototype={areaStart:bg,areaEnd:bg,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(t,e){if(t=+t,e=+e,this._point){var A=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(A*A+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Pg(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var $g=function t(e){function A(t){return e?new zg(t,e):new xg(t,0)}return A.alpha=function(e){return t(+e)},A}(.5);function tc(t,e){this._context=t,this._alpha=e}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(t,e){if(t=+t,e=+e,this._point){var A=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(A*A+n*n,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:Pg(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ec=function t(e){function A(t){return e?new tc(t,e):new Ng(t,0)}return A.alpha=function(e){return t(+e)},A}(.5);function Ac(t){this._context=t}Ac.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var nc=function(t){return new Ac(t)};function rc(t){this._context=t}rc.prototype={areaStart:bg,areaEnd:bg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function ic(t){return t<0?-1:1}function oc(t,e,A){var n=t._x1-t._x0,r=e-t._x1,i=(t._y1-t._y0)/(n||r<0&&-0),o=(A-t._y1)/(r||n<0&&-0),a=(i*r+o*n)/(n+r);return(ic(i)+ic(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(a))||0}function ac(t,e){var A=t._x1-t._x0;return A?(3*(t._y1-t._y0)/A-e)/2:e}function sc(t,e,A){var n=t._x0,r=t._y0,i=t._x1,o=t._y1,a=(i-n)/3;t._context.bezierCurveTo(n+a,r+a*e,i-a,o-a*A,i,o)}function gc(t){this._context=t}function cc(t){this._context=new Ic(t)}function Ic(t){this._context=t}function uc(t){this._context=t}function lc(t){var e,A,n=t.length-1,r=new Array(n),i=new Array(n),o=new Array(n);for(r[0]=0,i[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,i[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,i[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)A=r[e]/i[e-1],i[e]-=A,o[e]-=A*o[e-1];for(r[n-1]=o[n-1]/i[n-1],e=n-2;e>=0;--e)r[e]=(o[e]-r[e+1])/i[e];for(i[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)i[e]=2*t[e+1]-r[e+1];return[r,i]}gc.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:sc(this,this._t0,ac(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var A=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,sc(this,ac(this,A=oc(this,t,e)),A);break;default:sc(this,this._t0,A=oc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=A}}},(cc.prototype=Object.create(gc.prototype)).point=function(t,e){gc.prototype.point.call(this,e,t)},Ic.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,A,n,r,i){this._context.bezierCurveTo(e,t,n,A,i,r)}},uc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,A=t.length;if(A)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===A)this._context.lineTo(t[1],e[1]);else for(var n=lc(t),r=lc(e),i=0,o=1;o<A;++i,++o)this._context.bezierCurveTo(n[0][i],r[0][i],n[1][i],r[1][i],t[o],e[o]);(this._line||0!==this._line&&1===A)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Cc(t,e){this._context=t,this._t=e}Cc.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(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var A=this._x*(1-this._t)+t*this._t;this._context.lineTo(A,this._y),this._context.lineTo(A,e)}}this._x=t,this._y=e}};var hc={basis:{curve:function(t){return new mg(t)}},"basis-closed":{curve:function(t){return new Fg(t)}},"basis-open":{curve:function(t){return new wg(t)}},bundle:{curve:Dg,tension:"beta",value:.85},cardinal:{curve:Gg,tension:"tension",value:0},"cardinal-open":{curve:kg,tension:"tension",value:0},"cardinal-closed":{curve:Og,tension:"tension",value:0},"catmull-rom":{curve:Xg,tension:"alpha",value:.5},"catmull-rom-closed":{curve:$g,tension:"alpha",value:.5},"catmull-rom-open":{curve:ec,tension:"alpha",value:.5},linear:{curve:nc},"linear-closed":{curve:function(t){return new rc(t)}},monotone:{horizontal:function(t){return new cc(t)},vertical:function(t){return new gc(t)}},natural:{curve:function(t){return new uc(t)}},step:{curve:function(t){return new Cc(t,.5)}},"step-after":{curve:function(t){return new Cc(t,1)}},"step-before":{curve:function(t){return new Cc(t,0)}}};function Bc(t,e,A){var n=Object(U.v)(hc,t)&&hc[t],r=null;return n&&(r=n.curve||n[e||"vertical"],n.tension&&null!=A&&(r=r[n.tension](A))),r}var fc={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},dc=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\d)([-+])/g,/\s|,|###/],Qc=function(t){var e,A,n,r,i,o,a,s,g,c,I,u=[];for(s=0,c=(e=t.slice().replace(dc[0],"###$1").split(dc[1]).slice(1)).length;s<c;++s){for(n=(A=e[s]).slice(1).trim().replace(dc[2],"$1###$2").split(dc[3]),r=[o=A.charAt(0)],g=0,I=n.length;g<I;++g)(i=+n[g])===i&&r.push(i);if(a=fc[o.toLowerCase()],r.length-1>a)for(g=1,I=r.length;g<I;g+=a)u.push([o].concat(r.slice(g,g+a)));else u.push(r)}return u},Ec=Math.PI/180,pc=Math.PI/2,yc=2*Math.PI,vc=Math.sqrt(3)/2,mc={},bc={},Fc=[].join;function wc(t){var e=Fc.call(t);if(bc[e])return bc[e];var A=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],g=t[7],c=g*o,I=-s*a,u=s*o,l=g*a,C=Math.cos(r),h=Math.sin(r),B=Math.cos(i),f=Math.sin(i),d=.5*(i-r),Q=Math.sin(.5*d),E=8/3*Q*Q/Math.sin(d),p=A+C-E*h,y=n+h+E*C,v=A+B,m=n+f,b=v+E*f,F=m-E*B;return bc[e]=[c*p+I*y,u*p+l*y,c*b+I*F,u*b+l*F,c*v+I*m,u*v+l*m]}var Sc=["l",0,0,0,0,0,0,0];function Dc(t,e,A){var n=Sc[0]=t[0];if("a"===n||"A"===n)Sc[1]=e*t[1],Sc[2]=A*t[2],Sc[3]=t[3],Sc[4]=t[4],Sc[5]=t[5],Sc[6]=e*t[6],Sc[7]=A*t[7];else if("h"===n||"H"===n)Sc[1]=e*t[1];else if("v"===n||"V"===n)Sc[1]=A*t[1];else for(var r=1,i=t.length;r<i;++r)Sc[r]=(r%2==1?e:A)*t[r];return Sc}var Rc=function(t,e,A,n,r,i){var o,a,s,g,c,I=null,u=0,l=0,C=0,h=0;null==A&&(A=0),null==n&&(n=0),null==r&&(r=1),null==i&&(i=r),t.beginPath&&t.beginPath();for(var B=0,f=e.length;B<f;++B){switch(o=e[B],1===r&&1===i||(o=Dc(o,r,i)),o[0]){case"l":u+=o[1],l+=o[2],t.lineTo(u+A,l+n);break;case"L":u=o[1],l=o[2],t.lineTo(u+A,l+n);break;case"h":u+=o[1],t.lineTo(u+A,l+n);break;case"H":u=o[1],t.lineTo(u+A,l+n);break;case"v":l+=o[1],t.lineTo(u+A,l+n);break;case"V":l=o[1],t.lineTo(u+A,l+n);break;case"m":u+=o[1],l+=o[2],t.moveTo(u+A,l+n);break;case"M":u=o[1],l=o[2],t.moveTo(u+A,l+n);break;case"c":a=u+o[5],s=l+o[6],C=u+o[3],h=l+o[4],t.bezierCurveTo(u+o[1]+A,l+o[2]+n,C+A,h+n,a+A,s+n),u=a,l=s;break;case"C":u=o[5],l=o[6],C=o[3],h=o[4],t.bezierCurveTo(o[1]+A,o[2]+n,C+A,h+n,u+A,l+n);break;case"s":a=u+o[3],s=l+o[4],C=2*u-C,h=2*l-h,t.bezierCurveTo(C+A,h+n,u+o[1]+A,l+o[2]+n,a+A,s+n),C=u+o[1],h=l+o[2],u=a,l=s;break;case"S":a=o[3],s=o[4],C=2*u-C,h=2*l-h,t.bezierCurveTo(C+A,h+n,o[1]+A,o[2]+n,a+A,s+n),u=a,l=s,C=o[1],h=o[2];break;case"q":a=u+o[3],s=l+o[4],C=u+o[1],h=l+o[2],t.quadraticCurveTo(C+A,h+n,a+A,s+n),u=a,l=s;break;case"Q":a=o[3],s=o[4],t.quadraticCurveTo(o[1]+A,o[2]+n,a+A,s+n),u=a,l=s,C=o[1],h=o[2];break;case"t":a=u+o[1],s=l+o[2],null===I[0].match(/[QqTt]/)?(C=u,h=l):"t"===I[0]?(C=2*u-g,h=2*l-c):"q"===I[0]&&(C=2*u-C,h=2*l-h),g=C,c=h,t.quadraticCurveTo(C+A,h+n,a+A,s+n),l=s,C=(u=a)+o[1],h=l+o[2];break;case"T":a=o[1],s=o[2],C=2*u-C,h=2*l-h,t.quadraticCurveTo(C+A,h+n,a+A,s+n),u=a,l=s;break;case"a":Uc(t,u+A,l+n,[o[1],o[2],o[3],o[4],o[5],o[6]+u+A,o[7]+l+n]),u+=o[6],l+=o[7];break;case"A":Uc(t,u+A,l+n,[o[1],o[2],o[3],o[4],o[5],o[6]+A,o[7]+n]),u=o[6],l=o[7];break;case"z":case"Z":t.closePath()}I=o}};function Uc(t,e,A,n){for(var r=function(t,e,A,n,r,i,o,a,s){var g=Fc.call(arguments);if(mc[g])return mc[g];var c=o*Ec,I=Math.sin(c),u=Math.cos(c),l=u*(a-t)*.5+I*(s-e)*.5,C=u*(s-e)*.5-I*(a-t)*.5,h=l*l/((A=Math.abs(A))*A)+C*C/((n=Math.abs(n))*n);h>1&&(A*=h=Math.sqrt(h),n*=h);var B=u/A,f=I/A,d=-I/n,Q=u/n,E=B*a+f*s,p=d*a+Q*s,y=B*t+f*e,v=d*t+Q*e,m=(y-E)*(y-E)+(v-p)*(v-p),b=1/m-.25;b<0&&(b=0);var F=Math.sqrt(b);i==r&&(F=-F);var w=.5*(E+y)-F*(v-p),S=.5*(p+v)+F*(y-E),D=Math.atan2(p-S,E-w),R=Math.atan2(v-S,y-w),U=R-D;U<0&&1===i?U+=yc:U>0&&0===i&&(U-=yc);for(var G=Math.ceil(Math.abs(U/(pc+.001))),N=[],k=0;k<G;++k){var x=D+k*U/G,O=D+(k+1)*U/G;N[k]=[w,S,x,O,A,n,I,u]}return mc[g]=N}(n[5],n[6],n[0],n[1],n[3],n[4],n[2],e,A),i=0;i<r.length;++i){var o=wc(r[i]);t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5])}}var Gc=.5773502691896257,Nc={circle:{draw:function(t,e){var A=Math.sqrt(e)/2;t.moveTo(A,0),t.arc(0,0,A,0,yc)}},cross:{draw:function(t,e){var A=Math.sqrt(e)/2,n=A/2.5;t.moveTo(-A,-n),t.lineTo(-A,n),t.lineTo(-n,n),t.lineTo(-n,A),t.lineTo(n,A),t.lineTo(n,n),t.lineTo(A,n),t.lineTo(A,-n),t.lineTo(n,-n),t.lineTo(n,-A),t.lineTo(-n,-A),t.lineTo(-n,-n),t.closePath()}},diamond:{draw:function(t,e){var A=Math.sqrt(e)/2;t.moveTo(-A,0),t.lineTo(0,-A),t.lineTo(A,0),t.lineTo(0,A),t.closePath()}},square:{draw:function(t,e){var A=Math.sqrt(e),n=-A/2;t.rect(n,n,A,A)}},arrow:{draw:function(t,e){var A=Math.sqrt(e)/2,n=A/7,r=A/2.5,i=A/8;t.moveTo(-n,A),t.lineTo(n,A),t.lineTo(n,-i),t.lineTo(r,-i),t.lineTo(0,-A),t.lineTo(-r,-i),t.lineTo(-n,-i),t.closePath()}},wedge:{draw:function(t,e){var A=Math.sqrt(e)/2,n=vc*A,r=n-A*Gc,i=A/4;t.moveTo(0,-n-r),t.lineTo(-i,n-r),t.lineTo(i,n-r),t.closePath()}},triangle:{draw:function(t,e){var A=Math.sqrt(e)/2,n=vc*A,r=n-A*Gc;t.moveTo(0,-n-r),t.lineTo(-A,n-r),t.lineTo(A,n-r),t.closePath()}},"triangle-up":{draw:function(t,e){var A=Math.sqrt(e)/2,n=vc*A;t.moveTo(0,-n),t.lineTo(-A,n),t.lineTo(A,n),t.closePath()}},"triangle-down":{draw:function(t,e){var A=Math.sqrt(e)/2,n=vc*A;t.moveTo(0,n),t.lineTo(-A,-n),t.lineTo(A,-n),t.closePath()}},"triangle-right":{draw:function(t,e){var A=Math.sqrt(e)/2,n=vc*A;t.moveTo(n,0),t.lineTo(-n,-A),t.lineTo(-n,A),t.closePath()}},"triangle-left":{draw:function(t,e){var A=Math.sqrt(e)/2,n=vc*A;t.moveTo(-n,0),t.lineTo(n,-A),t.lineTo(n,A),t.closePath()}},stroke:{draw:function(t,e){var A=Math.sqrt(e)/2;t.moveTo(-A,0),t.lineTo(A,0)}}};function kc(t){return Object(U.v)(Nc,t)?Nc[t]:function(t){if(!Object(U.v)(xc,t)){var e=Qc(t);xc[t]={draw:function(t,A){Rc(t,e,0,0,Math.sqrt(A)/2)}}}return xc[t]}(t)}var xc={};var Oc=Math.PI,Mc=2*Oc,Lc=Mc-1e-6;function _c(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Jc(){return new _c}_c.prototype=Jc.prototype={constructor:_c,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,A,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+A)+","+(this._y1=+n)},bezierCurveTo:function(t,e,A,n,r,i){this._+="C"+ +t+","+ +e+","+ +A+","+ +n+","+(this._x1=+r)+","+(this._y1=+i)},arcTo:function(t,e,A,n,r){t=+t,e=+e,A=+A,n=+n,r=+r;var i=this._x1,o=this._y1,a=A-t,s=n-e,g=i-t,c=o-e,I=g*g+c*c;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(I>1e-6)if(Math.abs(c*a-s*g)>1e-6&&r){var u=A-i,l=n-o,C=a*a+s*s,h=u*u+l*l,B=Math.sqrt(C),f=Math.sqrt(I),d=r*Math.tan((Oc-Math.acos((C+I-h)/(2*B*f)))/2),Q=d/f,E=d/B;Math.abs(Q-1)>1e-6&&(this._+="L"+(t+Q*g)+","+(e+Q*c)),this._+="A"+r+","+r+",0,0,"+ +(c*u>g*l)+","+(this._x1=t+E*a)+","+(this._y1=e+E*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,A,n,r,i){t=+t,e=+e,i=!!i;var o=(A=+A)*Math.cos(n),a=A*Math.sin(n),s=t+o,g=e+a,c=1^i,I=i?n-r:r-n;if(A<0)throw new Error("negative radius: "+A);null===this._x1?this._+="M"+s+","+g:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-g)>1e-6)&&(this._+="L"+s+","+g),A&&(I<0&&(I=I%Mc+Mc),I>Lc?this._+="A"+A+","+A+",0,1,"+c+","+(t-o)+","+(e-a)+"A"+A+","+A+",0,1,"+c+","+(this._x1=s)+","+(this._y1=g):I>1e-6&&(this._+="A"+A+","+A+",0,"+ +(I>=Oc)+","+c+","+(this._x1=t+A*Math.cos(r))+","+(this._y1=e+A*Math.sin(r))))},rect:function(t,e,A,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +A+"v"+ +n+"h"+-A+"Z"},toString:function(){return this._}};var Tc=Jc,jc=.448084975506;function Hc(t){return t.x}function Yc(t){return t.y}function Vc(t){return t.width}function Zc(t){return t.height}function Wc(t){return"function"===typeof t?t:function(){return+t}}function Kc(t,e,A){return Math.max(e,Math.min(t,A))}var Pc=function(){var t=Hc,e=Yc,A=Vc,n=Zc,r=Wc(0),i=r,o=r,a=r,s=null;function g(g,c,I){var u,l=null!=c?c:+t.call(this,g),C=null!=I?I:+e.call(this,g),h=+A.call(this,g),B=+n.call(this,g),f=Math.min(h,B)/2,d=Kc(+r.call(this,g),0,f),Q=Kc(+i.call(this,g),0,f),E=Kc(+o.call(this,g),0,f),p=Kc(+a.call(this,g),0,f);if(s||(s=u=Tc()),d<=0&&Q<=0&&E<=0&&p<=0)s.rect(l,C,h,B);else{var y=l+h,v=C+B;s.moveTo(l+d,C),s.lineTo(y-Q,C),s.bezierCurveTo(y-jc*Q,C,y,C+jc*Q,y,C+Q),s.lineTo(y,v-p),s.bezierCurveTo(y,v-jc*p,y-jc*p,v,y-p,v),s.lineTo(l+E,v),s.bezierCurveTo(l+jc*E,v,l,v-jc*E,l,v-E),s.lineTo(l,C+d),s.bezierCurveTo(l,C+jc*d,l+jc*d,C,l+d,C),s.closePath()}if(u)return s=null,u+""||null}return g.x=function(e){return arguments.length?(t=Wc(e),g):t},g.y=function(t){return arguments.length?(e=Wc(t),g):e},g.width=function(t){return arguments.length?(A=Wc(t),g):A},g.height=function(t){return arguments.length?(n=Wc(t),g):n},g.cornerRadius=function(t,e,A,n){return arguments.length?(r=Wc(t),i=null!=e?Wc(e):r,a=null!=A?Wc(A):r,o=null!=n?Wc(n):i,g):r},g.context=function(t){return arguments.length?(s=null==t?null:t,g):s},g},qc=function(){var t,e,A,n,r,i,o,a,s=null;function g(t,e,A){var n=A/2;if(r){var g=o-e,c=t-i;if(g||c){var I=Math.sqrt(g*g+c*c),u=(g/=I)*a,l=(c/=I)*a,C=Math.atan2(c,g);s.moveTo(i-u,o-l),s.lineTo(t-g*n,e-c*n),s.arc(t,e,n,C-Math.PI,C),s.lineTo(i+u,o+l),s.arc(i,o,a,C,C+Math.PI)}else s.arc(t,e,n,0,yc);s.closePath()}else r=1;i=t,o=e,a=n}function c(i){var o,a,c,I=i.length,u=!1;for(null==s&&(s=c=Tc()),o=0;o<=I;++o)!(o<I&&n(a=i[o],o,i))===u&&(u=!u)&&(r=0),u&&g(+t(a,o,i),+e(a,o,i),+A(a,o,i));if(c)return s=null,c+""||null}return c.x=function(e){return arguments.length?(t=e,c):t},c.y=function(t){return arguments.length?(e=t,c):e},c.size=function(t){return arguments.length?(A=t,c):A},c.defined=function(t){return arguments.length?(n=t,c):n},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c},Xc=function(t){return function(){return t}};function zc(t){return t.innerRadius}function $c(t){return t.outerRadius}function tI(t){return t.startAngle}function eI(t){return t.endAngle}function AI(t){return t&&t.padAngle}function nI(t,e,A,n,r,i,o,a){var s=A-t,g=n-e,c=o-r,I=a-i,u=I*s-c*g;if(!(u*u<1e-12))return[t+(u=(c*(e-i)-I*(t-r))/u)*s,e+u*g]}function rI(t,e,A,n,r,i,o){var a=t-A,s=e-n,g=(o?i:-i)/Hg(a*a+s*s),c=g*s,I=-g*a,u=t+c,l=e+I,C=A+c,h=n+I,B=(u+C)/2,f=(l+h)/2,d=C-u,Q=h-l,E=d*d+Q*Q,p=r-i,y=u*h-C*l,v=(Q<0?-1:1)*Hg(Jg(0,p*p*E-y*y)),m=(y*Q-d*v)/E,b=(-y*d-Q*v)/E,F=(y*Q+d*v)/E,w=(-y*d+Q*v)/E,S=m-B,D=b-f,R=F-B,U=w-f;return S*S+D*D>R*R+U*U&&(m=F,b=w),{cx:m,cy:b,x01:-c,y01:-I,x11:m*(r/p-1),y11:b*(r/p-1)}}function iI(t){return t[0]}function oI(t){return t[1]}var aI=function(){var t=iI,e=oI,A=Xc(!0),n=null,r=nc,i=null;function o(o){var a,s,g,c=o.length,I=!1;for(null==n&&(i=r(g=Tc())),a=0;a<=c;++a)!(a<c&&A(s=o[a],a,o))===I&&((I=!I)?i.lineStart():i.lineEnd()),I&&i.point(+t(s,a,o),+e(s,a,o));if(g)return i=null,g+""||null}return o.x=function(e){return arguments.length?(t="function"===typeof e?e:Xc(+e),o):t},o.y=function(t){return arguments.length?(e="function"===typeof t?t:Xc(+t),o):e},o.defined=function(t){return arguments.length?(A="function"===typeof t?t:Xc(!!t),o):A},o.curve=function(t){return arguments.length?(r=t,null!=n&&(i=r(n)),o):r},o.context=function(t){return arguments.length?(null==t?n=i=null:i=r(n=t),o):n},o},sI=function(){var t=iI,e=null,A=Xc(0),n=oI,r=Xc(!0),i=null,o=nc,a=null;function s(s){var g,c,I,u,l,C=s.length,h=!1,B=new Array(C),f=new Array(C);for(null==i&&(a=o(l=Tc())),g=0;g<=C;++g){if(!(g<C&&r(u=s[g],g,s))===h)if(h=!h)c=g,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),I=g-1;I>=c;--I)a.point(B[I],f[I]);a.lineEnd(),a.areaEnd()}h&&(B[g]=+t(u,g,s),f[g]=+A(u,g,s),a.point(e?+e(u,g,s):B[g],n?+n(u,g,s):f[g]))}if(l)return a=null,l+""||null}function g(){return aI().defined(r).curve(o).context(i)}return s.x=function(A){return arguments.length?(t="function"===typeof A?A:Xc(+A),e=null,s):t},s.x0=function(e){return arguments.length?(t="function"===typeof e?e:Xc(+e),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"===typeof t?t:Xc(+t),s):e},s.y=function(t){return arguments.length?(A="function"===typeof t?t:Xc(+t),n=null,s):A},s.y0=function(t){return arguments.length?(A="function"===typeof t?t:Xc(+t),s):A},s.y1=function(t){return arguments.length?(n=null==t?null:"function"===typeof t?t:Xc(+t),s):n},s.lineX0=s.lineY0=function(){return g().x(t).y(A)},s.lineY1=function(){return g().x(t).y(n)},s.lineX1=function(){return g().x(e).y(A)},s.defined=function(t){return arguments.length?(r="function"===typeof t?t:Xc(!!t),s):r},s.curve=function(t){return arguments.length?(o=t,null!=i&&(a=o(i)),s):o},s.context=function(t){return arguments.length?(null==t?i=a=null:a=o(i=t),s):i},s},gI={draw:function(t,e){var A=Math.sqrt(e/Yg);t.moveTo(A,0),t.arc(0,0,A,0,Zg)}},cI=(Math.sqrt(1/3),Math.sin(Yg/10)/Math.sin(7*Yg/10));Math.sin(Zg/10),Math.cos(Zg/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12);function II(t,e){return null!=t?t:e}var uI=function(t){return t.x||0},lI=function(t){return t.y||0},CI=function(t){return!(!1===t.defined)},hI=function(){var t=zc,e=$c,A=Xc(0),n=null,r=tI,i=eI,o=AI,a=null;function s(){var s,g,c=+t.apply(this,arguments),I=+e.apply(this,arguments),u=r.apply(this,arguments)-Vg,l=i.apply(this,arguments)-Vg,C=Mg(l-u),h=l>u;if(a||(a=s=Tc()),I<c&&(g=I,I=c,c=g),I>1e-12)if(C>Zg-1e-12)a.moveTo(I*_g(u),I*jg(u)),a.arc(0,0,I,u,l,!h),c>1e-12&&(a.moveTo(c*_g(l),c*jg(l)),a.arc(0,0,c,l,u,h));else{var B,f,d=u,Q=l,E=u,p=l,y=C,v=C,m=o.apply(this,arguments)/2,b=m>1e-12&&(n?+n.apply(this,arguments):Hg(c*c+I*I)),F=Tg(Mg(I-c)/2,+A.apply(this,arguments)),w=F,S=F;if(b>1e-12){var D=Kg(b/c*jg(m)),R=Kg(b/I*jg(m));(y-=2*D)>1e-12?(E+=D*=h?1:-1,p-=D):(y=0,E=p=(u+l)/2),(v-=2*R)>1e-12?(d+=R*=h?1:-1,Q-=R):(v=0,d=Q=(u+l)/2)}var U=I*_g(d),G=I*jg(d),N=c*_g(p),k=c*jg(p);if(F>1e-12){var x,O=I*_g(Q),M=I*jg(Q),L=c*_g(E),_=c*jg(E);if(C<Yg&&(x=nI(U,G,L,_,O,M,N,k))){var J=U-x[0],T=G-x[1],j=O-x[0],H=M-x[1],Y=1/jg(Wg((J*j+T*H)/(Hg(J*J+T*T)*Hg(j*j+H*H)))/2),V=Hg(x[0]*x[0]+x[1]*x[1]);w=Tg(F,(c-V)/(Y-1)),S=Tg(F,(I-V)/(Y+1))}}v>1e-12?S>1e-12?(B=rI(L,_,U,G,I,S,h),f=rI(O,M,N,k,I,S,h),a.moveTo(B.cx+B.x01,B.cy+B.y01),S<F?a.arc(B.cx,B.cy,S,Lg(B.y01,B.x01),Lg(f.y01,f.x01),!h):(a.arc(B.cx,B.cy,S,Lg(B.y01,B.x01),Lg(B.y11,B.x11),!h),a.arc(0,0,I,Lg(B.cy+B.y11,B.cx+B.x11),Lg(f.cy+f.y11,f.cx+f.x11),!h),a.arc(f.cx,f.cy,S,Lg(f.y11,f.x11),Lg(f.y01,f.x01),!h))):(a.moveTo(U,G),a.arc(0,0,I,d,Q,!h)):a.moveTo(U,G),c>1e-12&&y>1e-12?w>1e-12?(B=rI(N,k,O,M,c,-w,h),f=rI(U,G,L,_,c,-w,h),a.lineTo(B.cx+B.x01,B.cy+B.y01),w<F?a.arc(B.cx,B.cy,w,Lg(B.y01,B.x01),Lg(f.y01,f.x01),!h):(a.arc(B.cx,B.cy,w,Lg(B.y01,B.x01),Lg(B.y11,B.x11),!h),a.arc(0,0,c,Lg(B.cy+B.y11,B.cx+B.x11),Lg(f.cy+f.y11,f.cx+f.x11),h),a.arc(f.cx,f.cy,w,Lg(f.y11,f.x11),Lg(f.y01,f.x01),!h))):a.arc(0,0,c,p,E,h):a.lineTo(N,k)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return s.centroid=function(){var A=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,n=(+r.apply(this,arguments)+ +i.apply(this,arguments))/2-Yg/2;return[_g(n)*A,jg(n)*A]},s.innerRadius=function(e){return arguments.length?(t="function"===typeof e?e:Xc(+e),s):t},s.outerRadius=function(t){return arguments.length?(e="function"===typeof t?t:Xc(+t),s):e},s.cornerRadius=function(t){return arguments.length?(A="function"===typeof t?t:Xc(+t),s):A},s.padRadius=function(t){return arguments.length?(n=null==t?null:"function"===typeof t?t:Xc(+t),s):n},s.startAngle=function(t){return arguments.length?(r="function"===typeof t?t:Xc(+t),s):r},s.endAngle=function(t){return arguments.length?(i="function"===typeof t?t:Xc(+t),s):i},s.padAngle=function(t){return arguments.length?(o="function"===typeof t?t:Xc(+t),s):o},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}().startAngle((function(t){return t.startAngle||0})).endAngle((function(t){return t.endAngle||0})).padAngle((function(t){return t.padAngle||0})).innerRadius((function(t){return t.innerRadius||0})).outerRadius((function(t){return t.outerRadius||0})).cornerRadius((function(t){return t.cornerRadius||0})),BI=sI().x(uI).y1(lI).y0((function(t){return(t.y||0)+(t.height||0)})).defined(CI),fI=sI().y(lI).x1(uI).x0((function(t){return(t.x||0)+(t.width||0)})).defined(CI),dI=aI().x(uI).y(lI).defined(CI),QI=Pc().x(uI).y(lI).width((function(t){return t.width||0})).height((function(t){return t.height||0})).cornerRadius((function(t){return II(t.cornerRadiusTopLeft,t.cornerRadius)||0}),(function(t){return II(t.cornerRadiusTopRight,t.cornerRadius)||0}),(function(t){return II(t.cornerRadiusBottomRight,t.cornerRadius)||0}),(function(t){return II(t.cornerRadiusBottomLeft,t.cornerRadius)||0})),EI=function(){var t=Xc(gI),e=Xc(64),A=null;function n(){var n;if(A||(A=n=Tc()),t.apply(this,arguments).draw(A,+e.apply(this,arguments)),n)return A=null,n+""||null}return n.type=function(e){return arguments.length?(t="function"===typeof e?e:Xc(e),n):t},n.size=function(t){return arguments.length?(e="function"===typeof t?t:Xc(+t),n):e},n.context=function(t){return arguments.length?(A=null==t?null:t,n):A},n}().type((function(t){return kc(t.shape||"circle")})).size((function(t){return II(t.size,64)})),pI=qc().x(uI).y(lI).defined(CI).size((function(t){return t.size||1}));function yI(t){return t.cornerRadius||t.cornerRadiusTopLeft||t.cornerRadiusTopRight||t.cornerRadiusBottomRight||t.cornerRadiusBottomLeft}function vI(t,e,A,n){return QI.context(t)(e,A,n)}var mI=1;function bI(){mI=1}var FI=function(t,e,A){var n=e.clip,r=t._defs,i=e.clip_id||(e.clip_id="clip"+mI++),o=r.clipping[i]||(r.clipping[i]={id:i});return Object(U.D)(n)?o.path=n(null):yI(A)?o.path=vI(null,A,0,0):(o.width=A.width||0,o.height=A.height||0),"url(#"+i+")"};function wI(t){this.clear(),t&&this.union(t)}var SI=wI.prototype;function DI(t){this.mark=t,this.bounds=this.bounds||new wI}function RI(t){DI.call(this,t),this.items=this.items||[]}function UI(t,e){if("undefined"!==typeof document&&document.createElement){var A=document.createElement("canvas");if(A&&A.getContext)return A.width=t,A.height=e,A}return null}function GI(){return"undefined"!==typeof Image?Image:null}function NI(t){this._pending=0,this._loader=t||Hi()}SI.clone=function(){return new wI(this)},SI.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},SI.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},SI.equals=function(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2},SI.set=function(t,e,A,n){return A<t?(this.x2=t,this.x1=A):(this.x1=t,this.x2=A),n<e?(this.y2=e,this.y1=n):(this.y1=e,this.y2=n),this},SI.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},SI.expand=function(t){return this.x1-=t,this.y1-=t,this.x2+=t,this.y2+=t,this},SI.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},SI.scale=function(t){return this.x1*=t,this.y1*=t,this.x2*=t,this.y2*=t,this},SI.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},SI.rotate=function(t,e,A){var n=this.rotatedPoints(t,e,A);return this.clear().add(n[0],n[1]).add(n[2],n[3]).add(n[4],n[5]).add(n[6],n[7])},SI.rotatedPoints=function(t,e,A){var n=this.x1,r=this.y1,i=this.x2,o=this.y2,a=Math.cos(t),s=Math.sin(t),g=e-e*a+A*s,c=A-e*s-A*a;return[a*n-s*r+g,s*n+a*r+c,a*n-s*o+g,s*n+a*o+c,a*i-s*r+g,s*i+a*r+c,a*i-s*o+g,s*i+a*o+c]},SI.union=function(t){return t.x1<this.x1&&(this.x1=t.x1),t.y1<this.y1&&(this.y1=t.y1),t.x2>this.x2&&(this.x2=t.x2),t.y2>this.y2&&(this.y2=t.y2),this},SI.intersect=function(t){return t.x1>this.x1&&(this.x1=t.x1),t.y1>this.y1&&(this.y1=t.y1),t.x2<this.x2&&(this.x2=t.x2),t.y2<this.y2&&(this.y2=t.y2),this},SI.encloses=function(t){return t&&this.x1<=t.x1&&this.x2>=t.x2&&this.y1<=t.y1&&this.y2>=t.y2},SI.alignsWith=function(t){return t&&(this.x1==t.x1||this.x2==t.x2||this.y1==t.y1||this.y2==t.y2)},SI.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},SI.contains=function(t,e){return!(t<this.x1||t>this.x2||e<this.y1||e>this.y2)},SI.width=function(){return this.x2-this.x1},SI.height=function(){return this.y2-this.y1},Object(U.y)(RI,DI);var kI=NI.prototype;function xI(t){t._pending+=1}function OI(t){t._pending-=1}kI.pending=function(){return this._pending},kI.sanitizeURL=function(t){var e=this;return xI(e),e._loader.sanitize(t,{context:"href"}).then((function(t){return OI(e),t})).catch((function(){return OI(e),null}))},kI.loadImage=function(t){var e=this,A=GI();return xI(e),e._loader.sanitize(t,{context:"image"}).then((function(t){var n=t.href;if(!n||!A)throw{url:n};var r=new A,i=Object(U.v)(t,"crossOrigin")?t.crossOrigin:"anonymous";return null!=i&&(r.crossOrigin=i),r.onload=function(){return OI(e)},r.onerror=function(){return OI(e)},r.src=n,r})).catch((function(t){return OI(e),{complete:!1,width:0,height:0,src:t&&t.url||""}}))},kI.ready=function(){var t=this;return new Promise((function(e){!function A(n){t.pending()?setTimeout((function(){A(!0)}),10):e(n)}(!1)}))};var MI=function(t,e,A){if(e.stroke&&0!==e.opacity&&0!==e.strokeOpacity){var n=null!=e.strokeWidth?+e.strokeWidth:1;t.expand(n+(A?function(t,e){return t.strokeJoin&&"miter"!==t.strokeJoin?0:e}(e,n):0))}return t};var LI,_I,JI,TI=yc-1e-8;function jI(t){return LI=t,jI}function HI(){}function YI(t,e){LI.add(t,e)}function VI(t,e){YI(_I=t,JI=e)}function ZI(t){YI(t,LI.y1)}function WI(t){YI(LI.x1,t)}function KI(t,e,A,n){var r=(t-e)/(t+A-2*e);0<r&&r<1&&n(t+(e-t)*r)}function PI(t,e,A,n,r){var i,o=n-t+3*e-3*A,a=t+A-2*e,s=t-e,g=0,c=0;Math.abs(o)>1e-14?(i=a*a+s*o)>=0&&(g=(-a+(i=Math.sqrt(i)))/o,c=(-a-i)/o):g=.5*s/a,0<g&&g<1&&r(qI(g,t,e,A,n)),0<c&&c<1&&r(qI(c,t,e,A,n))}function qI(t,e,A,n,r){var i=1-t,o=i*i,a=t*t;return o*i*e+3*o*t*A+3*i*a*n+a*t*r}jI.beginPath=HI,jI.closePath=HI,jI.moveTo=VI,jI.lineTo=VI,jI.rect=function(t,e,A,n){YI(t+A,e+n),VI(t,e)},jI.quadraticCurveTo=function(t,e,A,n){KI(_I,t,A,ZI),KI(JI,e,n,WI),VI(A,n)},jI.bezierCurveTo=function(t,e,A,n,r,i){PI(_I,t,A,r,ZI),PI(JI,e,n,i,WI),VI(r,i)},jI.arc=function(t,e,A,n,r,i){if(_I=A*Math.cos(r)+t,JI=A*Math.sin(r)+e,Math.abs(r-n)>TI)YI(t-A,e-A),YI(t+A,e+A);else{var o,a,s=function(n){return YI(A*Math.cos(n)+t,A*Math.sin(n)+e)};if(s(n),s(r),r!==n)if((n%=yc)<0&&(n+=yc),(r%=yc)<0&&(r+=yc),r<n&&(i=!i,o=n,n=r,r=o),i)for(r-=yc,o=n-n%pc,a=0;a<4&&o>r;++a,o-=pc)s(o);else for(o=n-n%pc+pc,a=0;a<4&&o<r;++a,o+=pc)s(o)}};var XI=(XI=UI(1,1))?XI.getContext("2d"):null,zI=new wI;function $I(t){return function(e,A){if(!XI)return!0;t(XI,e),zI.clear().union(e.bounds).intersect(A).round();for(var n=zI.x1,r=zI.y1,i=zI.x2,o=zI.y2,a=r;a<=o;++a)for(var s=n;s<=i;++s)if(XI.isPointInPath(s,a))return!0;return!1}}function tu(t,e){return e.contains(t.x||0,t.y||0)}function eu(t,e){var A=t.x||0,n=t.y||0,r=t.width||0,i=t.height||0;return e.intersects(zI.set(A,n,A+r,n+i))}function Au(t,e){var A=t.x||0,n=t.y||0;return nu(e,A,n,null!=t.x2?t.x2:A,null!=t.y2?t.y2:n)}function nu(t,e,A,n,r){var i,o,a,s,g=t.x1,c=t.y1,I=t.x2,u=t.y2,l=n-e,C=r-A,h=0,B=1;for(s=0;s<4;++s){if(0===s&&(i=-l,o=-(g-e)),1===s&&(i=l,o=I-e),2===s&&(i=-C,o=-(c-A)),3===s&&(i=C,o=u-A),Math.abs(i)<1e-10&&o<0)return!1;if(a=o/i,i<0){if(a>B)return!1;a>h&&(h=a)}else if(i>0){if(a<h)return!1;a<B&&(B=a)}}return!0}var ru=function(t,e){t.globalCompositeOperation=e.blend||"source-over"},iu=function(t,e){return null==t?e:t};function ou(t,e){for(var A=e.length,n=0;n<A;++n)t.addColorStop(e[n].offset,e[n].color);return t}var au=function(t,e,A){return Qg(A)?function(t,e,A){var n,r=A.width(),i=A.height();if("radial"===e.gradient)n=t.createRadialGradient(A.x1+iu(e.x1,.5)*r,A.y1+iu(e.y1,.5)*i,Math.max(r,i)*iu(e.r1,0),A.x1+iu(e.x2,.5)*r,A.y1+iu(e.y2,.5)*i,Math.max(r,i)*iu(e.r2,.5));else{var o=iu(e.x1,0),a=iu(e.y1,0),s=iu(e.x2,1),g=iu(e.y2,0);if(o!==s&&a!==g&&r!==i){var c=UI(Math.ceil(r),Math.ceil(i)),I=c.getContext("2d");return I.scale(r,i),I.fillStyle=ou(I.createLinearGradient(o,a,s,g),e.stops),I.fillRect(0,0,r,i),t.createPattern(c,"no-repeat")}n=t.createLinearGradient(A.x1+o*r,A.y1+a*i,A.x1+s*r,A.y1+g*i)}return ou(n,e.stops)}(t,A,e.bounds):A},su=function(t,e,A){return(A*=null==e.fillOpacity?1:e.fillOpacity)>0&&(t.globalAlpha=A,t.fillStyle=au(t,e,e.fill),!0)},gu=[],cu=function(t,e,A){var n=null!=(n=e.strokeWidth)?n:1;return!(n<=0)&&((A*=null==e.strokeOpacity?1:e.strokeOpacity)>0&&(t.globalAlpha=A,t.strokeStyle=au(t,e,e.stroke),t.lineWidth=n,t.lineCap=e.strokeCap||"butt",t.lineJoin=e.strokeJoin||"miter",t.miterLimit=e.strokeMiterLimit||10,t.setLineDash&&(t.setLineDash(e.strokeDash||gu),t.lineDashOffset=e.strokeDashOffset||0),!0))};function Iu(t,e){return t.zindex-e.zindex||t.index-e.index}function uu(t){if(!t.zdirty)return t.zitems;var e,A,n,r=t.items,i=[];for(A=0,n=r.length;A<n;++A)(e=r[A]).index=A,e.zindex&&i.push(e);return t.zdirty=!1,t.zitems=i.sort(Iu)}function lu(t,e){var A,n,r=t.items;if(r&&r.length){var i=uu(t);if(i&&i.length){for(A=0,n=r.length;A<n;++A)r[A].zindex||e(r[A]);r=i}for(A=0,n=r.length;A<n;++A)e(r[A])}}function Cu(t,e){var A,n,r=t.items;if(!r||!r.length)return null;var i=uu(t);for(i&&i.length&&(r=i),n=r.length;--n>=0;)if(A=e(r[n]))return A;if(r===i)for(n=(r=t.items).length;--n>=0;)if(!r[n].zindex&&(A=e(r[n])))return A;return null}function hu(t){return function(e,A,n){lu(A,(function(A){n&&!n.intersects(A.bounds)||Bu(t,e,A,A)}))}}function Bu(t,e,A,n){var r=null==A.opacity?1:A.opacity;0!==r&&(t(e,n)||(ru(e,A),A.fill&&su(e,A,r)&&e.fill(),A.stroke&&cu(e,A,r)&&e.stroke()))}function fu(t){return t=t||U.gb,function(e,A,n,r,i,o){return n*=e.pixelRatio,r*=e.pixelRatio,Cu(A,(function(A){var a=A.bounds;if((!a||a.contains(i,o))&&a)return t(e,A,n,r,i,o)?A:void 0}))}}function du(t,e){return function(A,n,r,i){var o,a,s=Array.isArray(n)?n[0]:n,g=null==e?s.fill:e,c=s.stroke&&A.isPointInStroke;return c&&(o=s.strokeWidth,a=s.strokeCap,A.lineWidth=null!=o?o:1,A.lineCap=null!=a?a:"butt"),!t(A,n)&&(g&&A.isPointInPath(r,i)||c&&A.isPointInStroke(r,i))}}function Qu(t){return fu(du(t))}function Eu(t,e){return"translate("+t+","+e+")"}function pu(t){return"rotate("+t+")"}function yu(t){return Eu(t.x||0,t.y||0)}function vu(t){return Eu(t.x||0,t.y||0)+(t.angle?" "+pu(t.angle):"")+(t.scaleX||t.scaleY?" "+(e=t.scaleX||1,A=t.scaleY||1,"scale("+e+","+A+")"):"");var e,A}var mu=function(t,e,A){function n(t,A){var n=A.x||0,r=A.y||0,i=A.angle||0;t.translate(n,r),i&&t.rotate(i*=Ec),t.beginPath(),e(t,A),i&&t.rotate(-i),t.translate(-n,-r)}return{type:t,tag:"path",nested:!1,attr:function(t,A){t("transform",vu(A)),t("d",e(null,A))},bound:function(t,A){var n=A.x||0,r=A.y||0;return e(jI(t),A),MI(t,A).translate(n,r),A.angle&&t.rotate(A.angle*Ec,n,r),t},draw:hu(n),pick:Qu(n),isect:A||$I(n)}},bu=mu("arc",(function(t,e){return hI.context(t)(e)}));var Fu=function(t,e,A){function n(t,A){t.beginPath(),e(t,A)}var r,i=du(n);return{type:t,tag:"path",nested:!0,attr:function(t,A){var n=A.mark.items;n.length&&t("d",e(null,n))},bound:function(t,A){var n=A.items;return 0===n.length?t:(e(jI(t),n),MI(t,n[0]))},draw:(r=n,function(t,e,A){!e.items.length||A&&!A.intersects(e.bounds)||Bu(r,t,e.items[0],e.items)}),pick:function(t,e,A,n,r,o){var a=e.items,s=e.bounds;return!a||!a.length||s&&!s.contains(r,o)?null:(A*=t.pixelRatio,n*=t.pixelRatio,i(t,a,A,n)?a[0]:null)},isect:tu,tip:A}},wu=Fu("area",(function(t,e){var A=e[0],n=A.interpolate||"linear";return("horizontal"===A.orient?fI:BI).curve(Bc(n,A.orient,A.tension)).context(t)(e)}),(function(t,e){for(var A,n,r="horizontal"===t[0].orient?e[1]:e[0],i="horizontal"===t[0].orient?"y":"x",o=t.length,a=1/0;--o>=0;)!1!==t[o].defined&&(n=Math.abs(t[o][i]-r))<a&&(a=n,A=t[o]);return A}));function Su(t,e){t.beginPath(),yI(e)?vI(t,e,0,0):t.rect(0,0,e.width||0,e.height||0),t.clip()}function Du(t){var e=iu(t.strokeWidth,1);return null!=t.strokeOffset?t.strokeOffset:t.stroke&&e>.5&&e<1.5?.5-Math.abs(e-1):0}function Ru(t,e){var A=Du(e);t("d",vI(null,e,A,A))}function Uu(t,e,A,n){var r=Du(e);t.beginPath(),vI(t,e,(A||0)+r,(n||0)+r)}var Gu=du(Uu),Nu=du(Uu,!1);var ku={type:"group",tag:"g",nested:!1,attr:function(t,e){t("transform",yu(e))},bound:function(t,e){if(!e.clip&&e.items)for(var A=e.items,n=A.length,r=0;r<n;++r)t.union(A[r].bounds);return(e.clip||e.width||e.height)&&!e.noBound&&t.add(0,0).add(e.width||0,e.height||0),MI(t,e),t.translate(e.x||0,e.y||0)},draw:function(t,e,A){var n=this;lu(e,(function(e){var r=e.x||0,i=e.y||0,o=e.strokeForeground,a=null==e.opacity?1:e.opacity;(e.stroke||e.fill)&&a&&(Uu(t,e,r,i),ru(t,e),e.fill&&su(t,e,a)&&t.fill(),e.stroke&&!o&&cu(t,e,a)&&t.stroke()),t.save(),t.translate(r,i),e.clip&&Su(t,e),A&&A.translate(-r,-i),lu(e,(function(e){n.draw(t,e,A)})),A&&A.translate(r,i),t.restore(),o&&e.stroke&&a&&(Uu(t,e,r,i),ru(t,e),cu(t,e,a)&&t.stroke())}))},pick:function(t,e,A,n,r,i){var o=this;if(e.bounds&&!e.bounds.contains(r,i)||!e.items)return null;var a=A*t.pixelRatio,s=n*t.pixelRatio;return Cu(e,(function(g){var c,I,u,l,C,h,B,f,d;if((!(f=g.bounds)||f.contains(r,i))&&(l=g.x||0,C=g.y||0,h=l+(g.width||0),B=C+(g.height||0),!(d=g.clip)||!(r<l||r>h||i<C||i>B)))return t.save(),t.translate(l,C),l=r-l,C=i-C,d&&yI(g)&&!Gu(t,g,a,s)?(t.restore(),null):(I=g.strokeForeground,(u=!1!==e.interactive)&&I&&g.stroke&&Nu(t,g,a,s)?(t.restore(),g):(!(c=Cu(g,(function(t){return function(t,e,A){return(!1!==t.interactive||"group"===t.marktype)&&t.bounds&&t.bounds.contains(e,A)}(t,l,C)?o.pick(t,A,n,l,C):null})))&&u&&(g.fill||!I&&g.stroke)&&Gu(t,g,a,s)&&(c=g),t.restore(),c||null))}))},isect:eu,content:function(t,e,A){t("clip-path",e.clip?FI(A,e,e):null)},background:function(t,e){t("class","background"),t("aria-hidden",!0),Ru(t,e)},foreground:function(t,e){t("class","foreground"),t("aria-hidden",!0),e.strokeForeground?Ru(t,e):t("d","")}},xu={version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function Ou(t,e){var A=t.image;return(!A||t.url&&t.url!==A.url)&&(A={complete:!1,width:0,height:0},e.loadImage(t.url).then((function(e){t.image=e,t.image.url=t.url}))),A}function Mu(t,e){return null!=t.width?t.width:e&&e.width?!1!==t.aspect&&t.height?t.height*e.width/e.height:e.width:0}function Lu(t,e){return null!=t.height?t.height:e&&e.height?!1!==t.aspect&&t.width?t.width*e.height/e.width:e.height:0}function _u(t,e){return"center"===t?e/2:"right"===t?e:0}function Ju(t,e){return"middle"===t?e/2:"bottom"===t?e:0}var Tu={type:"image",tag:"image",nested:!1,attr:function(t,e,A){var n=Ou(e,A),r=Mu(e,n),i=Lu(e,n),o=(e.x||0)-_u(e.align,r),a=(e.y||0)-Ju(e.baseline,i);t("href",!n.src&&n.toDataURL?n.toDataURL():n.src||"",xu["xmlns:xlink"],"xlink:href"),t("transform",Eu(o,a)),t("width",r),t("height",i),t("preserveAspectRatio",!1===e.aspect?"none":"xMidYMid")},bound:function(t,e){var A=e.image,n=Mu(e,A),r=Lu(e,A),i=(e.x||0)-_u(e.align,n),o=(e.y||0)-Ju(e.baseline,r);return t.set(i,o,i+n,o+r)},draw:function(t,e,A){var n=this;lu(e,(function(e){if(!A||A.intersects(e.bounds)){var r,i,o,a,s=Ou(e,n),g=Mu(e,s),c=Lu(e,s),I=(e.x||0)-_u(e.align,g),u=(e.y||0)-Ju(e.baseline,c);!1!==e.aspect&&(i=s.width/s.height,o=e.width/e.height,i===i&&o===o&&i!==o&&(o<i?(u+=(c-(a=g/i))/2,c=a):(I+=(g-(a=c*i))/2,g=a))),(s.complete||s.toDataURL)&&(ru(t,e),t.globalAlpha=null!=(r=e.opacity)?r:1,t.imageSmoothingEnabled=!1!==e.smooth,t.drawImage(s,I,u,g,c))}}))},pick:fu(),isect:U.gb,get:Ou,xOffset:_u,yOffset:Ju},ju=Fu("line",(function(t,e){var A=e[0],n=A.interpolate||"linear";return dI.curve(Bc(n,A.orient,A.tension)).context(t)(e)}),(function(t,e){for(var A,n,r=Math.pow(t[0].strokeWidth||1,2),i=t.length;--i>=0;)if(!1!==t[i].defined&&(A=t[i].x-e[0])*A+(n=t[i].y-e[1])*n<r)return t[i];return null}));function Hu(t,e){var A=e.path;if(null==A)return!0;var n=e.x||0,r=e.y||0,i=e.scaleX||1,o=e.scaleY||1,a=(e.angle||0)*Ec,s=e.pathCache;s&&s.path===A||((e.pathCache=s=Qc(A)).path=A),a&&t.rotate&&t.translate?(t.translate(n,r),t.rotate(a),Rc(t,s,0,0,i,o),t.rotate(-a),t.translate(-n,-r)):Rc(t,s,n,r,i,o)}var Yu={type:"path",tag:"path",nested:!1,attr:function(t,e){var A=e.scaleX||1,n=e.scaleY||1;1===A&&1===n||t("vector-effect","non-scaling-stroke"),t("transform",vu(e)),t("d",e.path)},bound:function(t,e){return Hu(jI(t),e)?t.set(0,0,0,0):MI(t,e,!0),e.angle&&t.rotate(e.angle*Ec,e.x||0,e.y||0),t},draw:hu(Hu),pick:Qu(Hu),isect:$I(Hu)};function Vu(t,e){t.beginPath(),vI(t,e)}var Zu={type:"rect",tag:"path",nested:!1,attr:function(t,e){t("d",vI(null,e))},bound:function(t,e){var A,n;return MI(t.set(A=e.x||0,n=e.y||0,A+e.width||0,n+e.height||0),e)},draw:hu(Vu),pick:Qu(Vu),isect:eu};function Wu(t,e,A){var n,r,i,o;return!(!e.stroke||!cu(t,e,A))&&(n=e.x||0,r=e.y||0,i=null!=e.x2?e.x2:n,o=null!=e.y2?e.y2:r,t.beginPath(),t.moveTo(n,r),t.lineTo(i,o),!0)}var Ku={type:"rule",tag:"line",nested:!1,attr:function(t,e){t("transform",yu(e)),t("x2",null!=e.x2?e.x2-(e.x||0):0),t("y2",null!=e.y2?e.y2-(e.y||0):0)},bound:function(t,e){var A,n;return MI(t.set(A=e.x||0,n=e.y||0,null!=e.x2?e.x2:A,null!=e.y2?e.y2:n),e)},draw:function(t,e,A){lu(e,(function(e){if(!A||A.intersects(e.bounds)){var n=null==e.opacity?1:e.opacity;n&&Wu(t,e,n)&&(ru(t,e),t.stroke())}}))},pick:fu((function(t,e,A,n){return!!t.isPointInStroke&&(Wu(t,e,1)&&t.isPointInStroke(A,n))})),isect:Au},Pu=mu("shape",(function(t,e){return(e.mark.shape||e.shape).context(t)(e)})),qu=mu("symbol",(function(t,e){return EI.context(t)(e)}),tu),Xu=Object(U.L)(),zu={height:rl,measureWidth:Al,estimateWidth:tl,width:tl,canvas:$u};function $u(t){zu.width=t&&XI?Al:tl}function tl(t,e){return el(sl(t,e),rl(t))}function el(t,e){return~~(.8*t.length*e)}function Al(t,e){return rl(t)<=0||!(e=sl(t,e))?0:nl(e,cl(t))}function nl(t,e){var A="(".concat(e,") ").concat(t),n=Xu.get(A);return void 0===n&&(XI.font=e,n=XI.measureText(t).width,Xu.set(A,n)),n}function rl(t){return null!=t.fontSize?+t.fontSize||0:11}function il(t){return null!=t.lineHeight?t.lineHeight:rl(t)+2}function ol(t){return e=t.lineBreak&&t.text&&!Object(U.A)(t.text)?t.text.split(t.lineBreak):t.text,Object(U.A)(e)?e.length>1?e:e[0]:e;var e}function al(t){var e=ol(t);return(Object(U.A)(e)?e.length-1:0)*il(t)}function sl(t,e){var A=null==e?"":(e+"").trim();return t.limit>0&&A.length?function(t,e){var A=+t.limit,n=function(t){if(zu.width===Al){var e=cl(t);return function(t){return nl(t,e)}}var A=rl(t);return function(t){return el(t,A)}}(t);if(n(e)<A)return e;var r,i=t.ellipsis||"\u2026",o="rtl"===t.dir,a=0,s=e.length;if(A-=n(i),o){for(;a<s;)r=a+s>>>1,n(e.slice(r))>A?a=r+1:s=r;return i+e.slice(a)}for(;a<s;)r=1+(a+s>>>1),n(e.slice(0,r))<A?a=r:s=r-1;return e.slice(0,a)+i}(t,A):A}function gl(t,e){var A=t.font;return(e&&A?String(A).replace(/"/g,"'"):A)||"sans-serif"}function cl(t,e){return(t.fontStyle?t.fontStyle+" ":"")+(t.fontVariant?t.fontVariant+" ":"")+(t.fontWeight?t.fontWeight+" ":"")+rl(t)+"px "+gl(t,e)}function Il(t){var e=t.baseline,A=rl(t);return Math.round("top"===e?.79*A:"middle"===e?.3*A:"bottom"===e?-.21*A:"line-top"===e?.29*A+.5*il(t):"line-bottom"===e?.29*A-.5*il(t):0)}$u(!0);var ul={left:"start",center:"middle",right:"end"},ll=new wI;function Cl(t){var e,A=t.x||0,n=t.y||0,r=t.radius||0;return r&&(e=(t.theta||0)-pc,A+=r*Math.cos(e),n+=r*Math.sin(e)),ll.x1=A,ll.y1=n,ll}function hl(t,e,A){var n,r=zu.height(e),i=e.align,o=Cl(e),a=o.x1,s=o.y1,g=e.dx||0,c=(e.dy||0)+Il(e)-Math.round(.8*r),I=ol(e);if(Object(U.A)(I)?(r+=il(e)*(I.length-1),n=I.reduce((function(t,A){return Math.max(t,zu.width(e,A))}),0)):n=zu.width(e,I),"center"===i?g-=n/2:"right"===i&&(g-=n),t.set(g+=a,c+=s,g+n,c+r),e.angle&&!A)t.rotate(e.angle*Ec,a,s);else if(2===A)return t.rotatedPoints(e.angle*Ec,a,s);return t}var Bl={arc:bu,area:wu,group:ku,image:Tu,line:ju,path:Yu,rect:Zu,rule:Ku,shape:Pu,symbol:qu,text:{type:"text",tag:"text",nested:!1,attr:function(t,e){var A,n=e.dx||0,r=(e.dy||0)+Il(e),i=Cl(e),o=i.x1,a=i.y1,s=e.angle||0;t("text-anchor",ul[e.align]||"start"),s?(A=Eu(o,a)+" "+pu(s),(n||r)&&(A+=" "+Eu(n,r))):A=Eu(o+n,a+r),t("transform",A)},bound:hl,draw:function(t,e,A){lu(e,(function(e){var n,r,i,o,a,s,g,c=null==e.opacity?1:e.opacity;if(!(A&&!A.intersects(e.bounds)||0===c||e.fontSize<=0||null==e.text||0===e.text.length)){if(t.font=cl(e),t.textAlign=e.align||"left",r=(n=Cl(e)).x1,i=n.y1,e.angle&&(t.save(),t.translate(r,i),t.rotate(e.angle*Ec),r=i=0),r+=e.dx||0,i+=(e.dy||0)+Il(e),s=ol(e),ru(t,e),Object(U.A)(s))for(a=il(e),o=0;o<s.length;++o)g=sl(e,s[o]),e.fill&&su(t,e,c)&&t.fillText(g,r,i),e.stroke&&cu(t,e,c)&&t.strokeText(g,r,i),i+=a;else g=sl(e,s),e.fill&&su(t,e,c)&&t.fillText(g,r,i),e.stroke&&cu(t,e,c)&&t.strokeText(g,r,i);e.angle&&t.restore()}}))},pick:fu((function(t,e,A,n,r,i){if(e.fontSize<=0)return!1;if(!e.angle)return!0;var o=Cl(e),a=o.x1,s=o.y1,g=hl(ll,e,1),c=-e.angle*Ec,I=Math.cos(c),u=Math.sin(c),l=I*r-u*i+(a-I*a+u*s),C=u*r+I*i+(s-u*a-I*s);return g.contains(l,C)})),isect:function(t,e){var A=hl(ll,t,2);return nu(e,A[0],A[1],A[2],A[3])||nu(e,A[0],A[1],A[4],A[5])||nu(e,A[4],A[5],A[6],A[7])||nu(e,A[2],A[3],A[6],A[7])}},trail:Fu("trail",(function(t,e){return pI.context(t)(e)}),(function(t,e){for(var A,n,r=t.length;--r>=0;)if(!1!==t[r].defined&&(A=t[r].x-e[0])*A+(n=t[r].y-e[1])*n<(A=t[r].size||1)*A)return t[r];return null}))},fl=function(t,e,A){var n=Bl[t.mark.marktype],r=e||n.bound;return n.nested&&(t=t.mark),r(t.bounds||(t.bounds=new wI),t,A)},dl={mark:null},Ql=function(t,e,A){var n,r,i,o,a=Bl[t.marktype],s=a.bound,g=t.items,c=g&&g.length;if(a.nested)return c?i=g[0]:(dl.mark=t,i=dl),o=fl(i,s,A),e=e&&e.union(o)||o;if(e=e||t.bounds&&t.bounds.clear()||new wI,c)for(n=0,r=g.length;n<r;++n)e.union(fl(g[n],s,A));return t.bounds=e},El=["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 pl(t,e){return JSON.stringify(t,El,e)}function yl(t){return function t(e){var A,n,r,i=e.marktype,o=e.items;if(o)for(n=0,r=o.length;n<r;++n)A=i?"mark":"group",o[n][A]=e,o[n].zindex&&(o[n][A].zdirty=!0),"group"===(i||A)&&t(o[n]);i&&Ql(e);return e}("string"===typeof t?JSON.parse(t):t)}function vl(t){arguments.length?this.root=yl(t):(this.root=bl({marktype:"group",name:"root",role:"frame"}),this.root.items=[new RI(this.root)])}var ml=vl.prototype;function bl(t,e){var A={bounds:new wI,clip:!!t.clip,group:e,interactive:!1!==t.interactive,items:[],marktype:t.marktype,name:t.name||void 0,role:t.role||void 0,zindex:t.zindex||0};return null!=t.aria&&(A.aria=t.aria),t.description&&(A.description=t.description),A}function Fl(t,e,A){return!t&&"undefined"!==typeof document&&document.createElement&&(t=document),t?A?t.createElementNS(A,e):t.createElement(e):null}function wl(t,e){e=e.toLowerCase();for(var A=t.childNodes,n=0,r=A.length;n<r;++n)if(A[n].tagName.toLowerCase()===e)return A[n]}function Sl(t,e,A,n){var r,i=t.childNodes[e];return i&&i.tagName.toLowerCase()===A.toLowerCase()||(r=i||null,i=Fl(t.ownerDocument,A,n),t.insertBefore(i,r)),i}function Dl(t,e){for(var A=t.childNodes,n=A.length;n>e;)t.removeChild(A[--n]);return t}function Rl(t){return"mark-"+t.marktype+(t.role?" role-"+t.role:"")+(t.name?" "+t.name:"")}ml.toJSON=function(t){return pl(this.root,t||0)},ml.mark=function(t,e,A){var n=bl(t,e=e||this.root.items[0]);return e.items[A]=n,n.zindex&&(n.group.zdirty=!0),n};var Ul=function(t,e){var A=e.getBoundingClientRect();return[t.clientX-A.left-(e.clientLeft||0),t.clientY-A.top-(e.clientTop||0)]};function Gl(t,e){this._active=null,this._handlers={},this._loader=t||Hi(),this._tooltip=e||Nl}function Nl(t,e,A,n){t.element().setAttribute("title",n||"")}var kl=Gl.prototype;function xl(t){this._el=null,this._bgcolor=null,this._loader=new NI(t)}kl.initialize=function(t,e,A){return this._el=t,this._obj=A||null,this.origin(e)},kl.element=function(){return this._el},kl.canvas=function(){return this._el&&this._el.firstChild},kl.origin=function(t){return arguments.length?(this._origin=t||[0,0],this):this._origin.slice()},kl.scene=function(t){return arguments.length?(this._scene=t,this):this._scene},kl.on=function(){},kl.off=function(){},kl._handlerIndex=function(t,e,A){for(var n=t?t.length:0;--n>=0;)if(t[n].type===e&&(!A||t[n].handler===A))return n;return-1},kl.handlers=function(t){var e=this._handlers,A=[];if(t)A.push.apply(A,e[this.eventName(t)]);else for(var n in e)A.push.apply(A,e[n]);return A},kl.eventName=function(t){var e=t.indexOf(".");return e<0?t:t.slice(0,e)},kl.handleHref=function(t,e,A){this._loader.sanitize(A,{context:"href"}).then((function(e){var A=new MouseEvent(t.type,t),n=Fl(null,"a");for(var r in e)n.setAttribute(r,e[r]);n.dispatchEvent(A)})).catch((function(){}))},kl.handleTooltip=function(t,e,A){if(e&&null!=e.tooltip){e=function(t,e,A,n){var r,i,o=t&&t.mark;if(o&&(r=Bl[o.marktype]).tip){for((i=Ul(e,A))[0]-=n[0],i[1]-=n[1];t=t.mark.group;)i[0]-=t.x||0,i[1]-=t.y||0;t=r.tip(o.items,i)}return t}(e,t,this.canvas(),this._origin);var n=A&&e&&e.tooltip||null;this._tooltip.call(this._obj,this,t,e,n)}},kl.getItemBoundingClientRect=function(t){var e=this.canvas();if(e){for(var A=e.getBoundingClientRect(),n=this._origin,r=t.bounds,i=r.width(),o=r.height(),a=r.x1+n[0]+A.left,s=r.y1+n[1]+A.top;t.mark&&(t=t.mark.group);)a+=t.x||0,s+=t.y||0;return{x:a,y:s,width:i,height:o,left:a,top:s,right:a+i,bottom:s+o}}};var Ol=xl.prototype;Ol.initialize=function(t,e,A,n,r){return this._el=t,this.resize(e,A,n,r)},Ol.element=function(){return this._el},Ol.canvas=function(){return this._el&&this._el.firstChild},Ol.background=function(t){return 0===arguments.length?this._bgcolor:(this._bgcolor=t,this)},Ol.resize=function(t,e,A,n){return this._width=t,this._height=e,this._origin=A||[0,0],this._scale=n||1,this},Ol.dirty=function(){},Ol.render=function(t){var e=this;return e._call=function(){e._render(t)},e._call(),e._call=null,e},Ol._render=function(){},Ol.renderAsync=function(t){var e=this.render(t);return this._ready?this._ready.then((function(){return e})):Promise.resolve(e)},Ol._load=function(t,e){var A=this,n=A._loader[t](e);if(!A._ready){var r=A._call;A._ready=A._loader.ready().then((function(t){t&&r(),A._ready=null}))}return n},Ol.sanitizeURL=function(t){return this._load("sanitizeURL",t)},Ol.loadImage=function(t){return this._load("loadImage",t)};var Ml="dragleave",Ll="mousedown",_l="mousemove",Jl="mouseout",Tl="click",jl=["keydown","keypress","keyup","dragenter",Ml,"dragover",Ll,"mouseup",_l,Jl,"mouseover",Tl,"dblclick","wheel","mousewheel","touchstart","touchmove","touchend"],Hl=_l,Yl=Jl,Vl=Tl;function Zl(t,e){Gl.call(this,t,e),this._down=null,this._touch=null,this._first=!0,this._events={}}var Wl=Object(U.y)(Zl,Gl);Wl.initialize=function(t,e,A){var n=this;return this._canvas=t&&wl(t,"canvas"),[Tl,Ll,_l,Jl,Ml].forEach((function(t){return Kl(n,t)})),Gl.prototype.initialize.call(this,t,e,A)};function Kl(t,e){(function(t){return"touchstart"===t||"touchmove"===t||"touchend"===t?["touchstart","touchmove","touchend"]:[t]})(e).forEach((function(e){return function(t,e){var A=t.canvas();A&&!t._events[e]&&(t._events[e]=1,A.addEventListener(e,t[e]?function(A){return t[e](A)}:function(A){return t.fire(e,A)}))}(t,e)}))}function Pl(t,e,A){return function(n){var r=this._active,i=this.pickEvent(n);i===r||(r&&r.exit||this.fire(A,n),this._active=i,this.fire(e,n)),this.fire(t,n)}}function ql(t){return function(e){this.fire(t,e),this._active=null}}Wl.canvas=function(){return this._canvas},Wl.context=function(){return this._canvas.getContext("2d")},Wl.events=jl,Wl.DOMMouseScroll=function(t){this.fire("mousewheel",t)},Wl.mousemove=Pl(_l,"mouseover",Jl),Wl.dragover=Pl("dragover","dragenter",Ml),Wl.mouseout=ql(Jl),Wl.dragleave=ql(Ml),Wl.mousedown=function(t){this._down=this._active,this.fire(Ll,t)},Wl.click=function(t){this._down===this._active&&(this.fire(Tl,t),this._down=null)},Wl.touchstart=function(t){this._touch=this.pickEvent(t.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire("touchstart",t,!0)},Wl.touchmove=function(t){this.fire("touchmove",t,!0)},Wl.touchend=function(t){this.fire("touchend",t,!0),this._touch=null},Wl.fire=function(t,e,A){var n=A?this._touch:this._active,r=this._handlers[t];if(e.vegaType=t,t===Vl&&n&&n.href?this.handleHref(e,n,n.href):t!==Hl&&t!==Yl||this.handleTooltip(e,n,t!==Yl),r)for(var i=0,o=r.length;i<o;++i)r[i].handler.call(this._obj,e,n)},Wl.on=function(t,e){var A=this.eventName(t),n=this._handlers;return this._handlerIndex(n[A],t,e)<0&&(Kl(this,t),(n[A]||(n[A]=[])).push({type:t,handler:e})),this},Wl.off=function(t,e){var A=this.eventName(t),n=this._handlers[A],r=this._handlerIndex(n,t,e);return r>=0&&n.splice(r,1),this},Wl.pickEvent=function(t){var e=Ul(t,this._canvas),A=this._origin;return this.pick(this._scene,e[0],e[1],e[0]-A[0],e[1]-A[1])},Wl.pick=function(t,e,A,n,r){var i=this.context();return Bl[t.marktype].pick.call(this,i,t,e,A,n,r)};var Xl="undefined"!==typeof window&&window.devicePixelRatio||1;function zl(t){xl.call(this,t),this._options={},this._redraw=!1,this._dirty=new wI,this._tempb=new wI}var $l=Object(U.y)(zl,xl),tC=xl.prototype;$l.initialize=function(t,e,A,n,r,i){return this._options=i||{},this._canvas=this._options.externalContext?null:UI(1,1,this._options.type),t&&this._canvas&&(Dl(t,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),tC.initialize.call(this,t,e,A,n,r)},$l.resize=function(t,e,A,n){if(tC.resize.call(this,t,e,A,n),this._canvas)!function(t,e,A,n,r,i){var o="undefined"!==typeof HTMLElement&&t instanceof HTMLElement&&null!=t.parentNode,a=t.getContext("2d"),s=o?Xl:r;for(var g in t.width=e*s,t.height=A*s,i)a[g]=i[g];o&&1!==s&&(t.style.width=e+"px",t.style.height=A+"px"),a.pixelRatio=s,a.setTransform(s,0,0,s,s*n[0],s*n[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{var r=this._options.externalContext;r||Object(U.n)("CanvasRenderer is missing a valid canvas or context"),r.scale(this._scale,this._scale),r.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},$l.canvas=function(){return this._canvas},$l.context=function(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},$l.dirty=function(t){for(var e=this._tempb.clear().union(t.bounds),A=t.mark.group;A;)e.translate(A.x||0,A.y||0),A=A.mark.group;this._dirty.union(e)};function eC(t,e){Gl.call(this,t,e);var A=this;A._hrefHandler=nC(A,(function(t,e){e&&e.href&&A.handleHref(t,e,e.href)})),A._tooltipHandler=nC(A,(function(t,e){A.handleTooltip(t,e,t.type!==Yl)}))}$l._render=function(t){var e,A,n,r=this.context(),i=this._origin,o=this._width,a=this._height,s=this._dirty,g=(e=i,A=o,n=a,(new wI).set(0,0,A,n).translate(-e[0],-e[1]));r.save();var c=this._redraw||s.empty()?(this._redraw=!1,g.expand(1)):function(t,e,A){return e.expand(1).round(),t.pixelRatio%1&&e.scale(t.pixelRatio).round().scale(1/t.pixelRatio),e.translate(-A[0]%1,-A[1]%1),t.beginPath(),t.rect(e.x1,e.y1,e.width(),e.height()),t.clip(),e}(r,g.intersect(s),i);return this.clear(-i[0],-i[1],o,a),this.draw(r,t,c),r.restore(),s.clear(),this},$l.draw=function(t,e,A){var n=Bl[e.marktype];e.clip&&function(t,e){var A=e.clip;t.save(),Object(U.D)(A)?(t.beginPath(),A(t),t.clip()):Su(t,e.group)}(t,e),n.draw.call(this,t,e,A),e.clip&&t.restore()},$l.clear=function(t,e,A,n){var r=this._options,i=this.context();"pdf"===r.type||r.externalContext||i.clearRect(t,e,A,n),null!=this._bgcolor&&(i.fillStyle=this._bgcolor,i.fillRect(t,e,A,n))};var AC=Object(U.y)(eC,Gl);AC.initialize=function(t,e,A){var n=this._svg;return n&&(n.removeEventListener(Vl,this._hrefHandler),n.removeEventListener(Hl,this._tooltipHandler),n.removeEventListener(Yl,this._tooltipHandler)),this._svg=n=t&&wl(t,"svg"),n&&(n.addEventListener(Vl,this._hrefHandler),n.addEventListener(Hl,this._tooltipHandler),n.addEventListener(Yl,this._tooltipHandler)),Gl.prototype.initialize.call(this,t,e,A)},AC.canvas=function(){return this._svg};var nC=function(t,e){return function(A){var n=A.target.__data__;n=Array.isArray(n)?n[0]:n,A.vegaType=A.type,e.call(t._obj,A,n)}};AC.on=function(t,e){var A=this.eventName(t),n=this._handlers;if(this._handlerIndex(n[A],t,e)<0){var r={type:t,handler:e,listener:nC(this,e)};(n[A]||(n[A]=[])).push(r),this._svg&&this._svg.addEventListener(A,r.listener)}return this},AC.off=function(t,e){var A=this.eventName(t),n=this._handlers[A],r=this._handlerIndex(n,t,e);return r>=0&&(this._svg&&this._svg.removeEventListener(A,n[r].listener),n.splice(r,1)),this};var rC=function(t,e,A){var n=t-e+2*A;return t?n>0?n:1:0},iC="log",oC="time",aC="utc",sC="continuous",gC=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},cC=function(t){var e;return 1===t.length&&(e=t,t=function(t,A){return gC(e(t),A)}),{left:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)<0?n=i+1:r=i}return n},right:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)>0?r=i:n=i+1}return n}}};var IC=cC(gC),uC=IC.right,lC=(IC.left,uC);function CC(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function hC(t,e){switch(arguments.length){case 0:break;case 1:"function"===typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"===typeof e?this.interpolator(e):this.range(e)}return this}var BC=Symbol("implicit");function fC(){var t=new Map,e=[],A=[],n=BC;function r(r){var i=r+"",o=t.get(i);if(!o){if(n!==BC)return n;t.set(i,o=e.push(r))}return A[(o-1)%A.length]}return r.domain=function(A){if(!arguments.length)return e.slice();e=[],t=new Map;var n,i=Object(R.a)(A);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=o+"";t.has(a)||t.set(a,e.push(o))}}catch(s){i.e(s)}finally{i.f()}return r},r.range=function(t){return arguments.length?(A=Array.from(t),r):A.slice()},r.unknown=function(t){return arguments.length?(n=t,r):n},r.copy=function(){return fC(e,A).unknown(n)},CC.apply(r,arguments),r}function dC(){var t,e,A=fC().unknown(void 0),n=A.domain,r=A.range,i=[0,1],o=!1,a=0,s=0,g=.5;function c(){var A=n().length,c=i[1]<i[0],I=i[c-0],u=i[1-c],l=rC(A,a,s);t=(u-I)/(l||1),o&&(t=Math.floor(t)),I+=(u-I-t*(A-a))*g,e=t*(1-a),o&&(I=Math.round(I),e=Math.round(e));var C=function(t,e,A){t=+t,e=+e,A=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+A;for(var n=-1,r=0|Math.max(0,Math.ceil((e-t)/A)),i=new Array(r);++n<r;)i[n]=t+n*A;return i}(A).map((function(e){return I+t*e}));return r(c?C.reverse():C)}return delete A.unknown,A.domain=function(t){return arguments.length?(n(t),c()):n()},A.range=function(t){return arguments.length?(i=[+t[0],+t[1]],c()):i.slice()},A.rangeRound=function(t){return i=[+t[0],+t[1]],o=!0,c()},A.bandwidth=function(){return e},A.step=function(){return t},A.round=function(t){return arguments.length?(o=!!t,c()):o},A.padding=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),a=s,c()):a},A.paddingInner=function(t){return arguments.length?(a=Math.max(0,Math.min(1,t)),c()):a},A.paddingOuter=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),c()):s},A.align=function(t){return arguments.length?(g=Math.max(0,Math.min(1,t)),c()):g},A.invertRange=function(t){if(null!=t[0]&&null!=t[1]){var A,o,a,s=+t[0],g=+t[1],c=i[1]<i[0],I=c?r().reverse():r(),u=I.length-1;if(s===s&&g===g&&(g<s&&(a=s,s=g,g=a),!(g<I[0]||s>i[1-c])))return A=Math.max(0,uC(I,s)-1),o=s===g?A:uC(I,g)-1,s-I[A]>e+1e-10&&++A,c&&(a=A,A=u-o,o=u-a),A>o?void 0:n().slice(A,o+1)}},A.invert=function(t){var e=A.invertRange([t,t]);return e?e[0]:e},A.copy=function(){return dC().domain(n()).range(i).round(o).paddingInner(a).paddingOuter(s).align(g)},c()}var QC=Math.sqrt(50),EC=Math.sqrt(10),pC=Math.sqrt(2),yC=function(t,e,A){var n,r,i,o,a=-1;if(A=+A,(t=+t)===(e=+e)&&A>0)return[t];if((n=e<t)&&(r=t,t=e,e=r),0===(o=vC(t,e,A))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),i=new Array(r=Math.ceil(e-t+1));++a<r;)i[a]=(t+a)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),i=new Array(r=Math.ceil(t-e+1));++a<r;)i[a]=(t-a)/o;return n&&i.reverse(),i};function vC(t,e,A){var n=(e-t)/Math.max(0,A),r=Math.floor(Math.log(n)/Math.LN10),i=n/Math.pow(10,r);return r>=0?(i>=QC?10:i>=EC?5:i>=pC?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(i>=QC?10:i>=EC?5:i>=pC?2:1)}function mC(t,e,A){var n=Math.abs(e-t)/Math.max(0,A),r=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/r;return i>=QC?r*=10:i>=EC?r*=5:i>=pC&&(r*=2),e<t?-r:r}var bC=function(t,e,A,n){var r,i=mC(t,e,A);switch((n=_e(null==n?",f":n)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(r=Pe(i,o))||(n.precision=r),Ye(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(r=qe(i,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=r-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(r=Xe(i))||(n.precision=r-2*("%"===n.type))}return He(n)},FC=Array.prototype.map;function wC(t){return FC.call(t,(function(t){return+t}))}var SC=Array.prototype.slice;var DC=function(t,e,A){t.prototype=e.prototype=A,A.constructor=t};function RC(t,e){var A=Object.create(t.prototype);for(var n in e)A[n]=e[n];return A}function UC(){}var GC="\\s*([+-]?\\d+)\\s*",NC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",kC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xC=/^#([0-9a-f]{3,8})$/,OC=new RegExp("^rgb\\("+[GC,GC,GC]+"\\)$"),MC=new RegExp("^rgb\\("+[kC,kC,kC]+"\\)$"),LC=new RegExp("^rgba\\("+[GC,GC,GC,NC]+"\\)$"),_C=new RegExp("^rgba\\("+[kC,kC,kC,NC]+"\\)$"),JC=new RegExp("^hsl\\("+[NC,kC,kC]+"\\)$"),TC=new RegExp("^hsla\\("+[NC,kC,kC,NC]+"\\)$"),jC={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 HC(){return this.rgb().formatHex()}function YC(){return this.rgb().formatRgb()}function VC(t){var e,A;return t=(t+"").trim().toLowerCase(),(e=xC.exec(t))?(A=e[1].length,e=parseInt(e[1],16),6===A?ZC(e):3===A?new qC(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===A?new qC(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===A?new qC(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=OC.exec(t))?new qC(e[1],e[2],e[3],1):(e=MC.exec(t))?new qC(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=LC.exec(t))?WC(e[1],e[2],e[3],e[4]):(e=_C.exec(t))?WC(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=JC.exec(t))?th(e[1],e[2]/100,e[3]/100,1):(e=TC.exec(t))?th(e[1],e[2]/100,e[3]/100,e[4]):jC.hasOwnProperty(t)?ZC(jC[t]):"transparent"===t?new qC(NaN,NaN,NaN,0):null}function ZC(t){return new qC(t>>16&255,t>>8&255,255&t,1)}function WC(t,e,A,n){return n<=0&&(t=e=A=NaN),new qC(t,e,A,n)}function KC(t){return t instanceof UC||(t=VC(t)),t?new qC((t=t.rgb()).r,t.g,t.b,t.opacity):new qC}function PC(t,e,A,n){return 1===arguments.length?KC(t):new qC(t,e,A,null==n?1:n)}function qC(t,e,A,n){this.r=+t,this.g=+e,this.b=+A,this.opacity=+n}function XC(){return"#"+$C(this.r)+$C(this.g)+$C(this.b)}function zC(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}function $C(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function th(t,e,A,n){return n<=0?t=e=A=NaN:A<=0||A>=1?t=e=NaN:e<=0&&(t=NaN),new nh(t,e,A,n)}function eh(t){if(t instanceof nh)return new nh(t.h,t.s,t.l,t.opacity);if(t instanceof UC||(t=VC(t)),!t)return new nh;if(t instanceof nh)return t;var e=(t=t.rgb()).r/255,A=t.g/255,n=t.b/255,r=Math.min(e,A,n),i=Math.max(e,A,n),o=NaN,a=i-r,s=(i+r)/2;return a?(o=e===i?(A-n)/a+6*(A<n):A===i?(n-e)/a+2:(e-A)/a+4,a/=s<.5?i+r:2-i-r,o*=60):a=s>0&&s<1?0:o,new nh(o,a,s,t.opacity)}function Ah(t,e,A,n){return 1===arguments.length?eh(t):new nh(t,e,A,null==n?1:n)}function nh(t,e,A,n){this.h=+t,this.s=+e,this.l=+A,this.opacity=+n}function rh(t,e,A){return 255*(t<60?e+(A-e)*t/60:t<180?A:t<240?e+(A-e)*(240-t)/60:e)}function ih(t,e,A,n,r){var i=t*t,o=i*t;return((1-3*t+3*i-o)*e+(4-6*i+3*o)*A+(1+3*t+3*i-3*o)*n+o*r)/6}DC(UC,VC,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:HC,formatHex:HC,formatHsl:function(){return eh(this).formatHsl()},formatRgb:YC,toString:YC}),DC(qC,PC,RC(UC,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new qC(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new qC(this.r*t,this.g*t,this.b*t,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:XC,formatHex:XC,formatRgb:zC,toString:zC})),DC(nh,Ah,RC(UC,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new nh(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new nh(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,A=this.l,n=A+(A<.5?A:1-A)*e,r=2*A-n;return new qC(rh(t>=240?t-240:t+120,r,n),rh(t,r,n),rh(t<120?t+240:t-120,r,n),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 t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var oh=function(t){var e=t.length-1;return function(A){var n=A<=0?A=0:A>=1?(A=1,e-1):Math.floor(A*e),r=t[n],i=t[n+1],o=n>0?t[n-1]:2*r-i,a=n<e-1?t[n+2]:2*i-r;return ih((A-n/e)*e,o,r,i,a)}},ah=function(t){var e=t.length;return function(A){var n=Math.floor(((A%=1)<0?++A:A)*e),r=t[(n+e-1)%e],i=t[n%e],o=t[(n+1)%e],a=t[(n+2)%e];return ih((A-n/e)*e,r,i,o,a)}},sh=function(t){return function(){return t}};function gh(t,e){return function(A){return t+A*e}}function ch(t,e){var A=e-t;return A?gh(t,A>180||A<-180?A-360*Math.round(A/360):A):sh(isNaN(t)?e:t)}function Ih(t){return 1===(t=+t)?uh:function(e,A){return A-e?function(t,e,A){return t=Math.pow(t,A),e=Math.pow(e,A)-t,A=1/A,function(n){return Math.pow(t+n*e,A)}}(e,A,t):sh(isNaN(e)?A:e)}}function uh(t,e){var A=e-t;return A?gh(t,A):sh(isNaN(t)?e:t)}var lh=function t(e){var A=Ih(e);function n(t,e){var n=A((t=PC(t)).r,(e=PC(e)).r),r=A(t.g,e.g),i=A(t.b,e.b),o=uh(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=r(e),t.b=i(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function Ch(t){return function(e){var A,n,r=e.length,i=new Array(r),o=new Array(r),a=new Array(r);for(A=0;A<r;++A)n=PC(e[A]),i[A]=n.r||0,o[A]=n.g||0,a[A]=n.b||0;return i=t(i),o=t(o),a=t(a),n.opacity=1,function(t){return n.r=i(t),n.g=o(t),n.b=a(t),n+""}}}var hh=Ch(oh),Bh=Ch(ah),fh=function(t,e){e||(e=[]);var A,n=t?Math.min(e.length,t.length):0,r=e.slice();return function(i){for(A=0;A<n;++A)r[A]=t[A]*(1-i)+e[A]*i;return r}};function dh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var Qh=function(t,e){return(dh(e)?fh:Eh)(t,e)};function Eh(t,e){var A,n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n);for(A=0;A<r;++A)i[A]=wh(t[A],e[A]);for(;A<n;++A)o[A]=e[A];return function(t){for(A=0;A<r;++A)o[A]=i[A](t);return o}}var ph=function(t,e){var A=new Date;return t=+t,e=+e,function(n){return A.setTime(t*(1-n)+e*n),A}},yh=function(t,e){return t=+t,e=+e,function(A){return t*(1-A)+e*A}},vh=function(t,e){var A,n={},r={};for(A in null!==t&&"object"===typeof t||(t={}),null!==e&&"object"===typeof e||(e={}),e)A in t?n[A]=wh(t[A],e[A]):r[A]=e[A];return function(t){for(A in n)r[A]=n[A](t);return r}},mh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bh=new RegExp(mh.source,"g");var Fh=function(t,e){var A,n,r,i=mh.lastIndex=bh.lastIndex=0,o=-1,a=[],s=[];for(t+="",e+="";(A=mh.exec(t))&&(n=bh.exec(e));)(r=n.index)>i&&(r=e.slice(i,r),a[o]?a[o]+=r:a[++o]=r),(A=A[0])===(n=n[0])?a[o]?a[o]+=n:a[++o]=n:(a[++o]=null,s.push({i:o,x:yh(A,n)})),i=bh.lastIndex;return i<e.length&&(r=e.slice(i),a[o]?a[o]+=r:a[++o]=r),a.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var A,n=0;n<e;++n)a[(A=s[n]).i]=A.x(t);return a.join("")})},wh=function(t,e){var A,n=typeof e;return null==e||"boolean"===n?sh(e):("number"===n?yh:"string"===n?(A=VC(e))?(e=A,lh):Fh:e instanceof VC?lh:e instanceof Date?ph:dh(e)?fh:Array.isArray(e)?Eh:"function"!==typeof e.valueOf&&"function"!==typeof e.toString||isNaN(e)?vh:yh)(t,e)},Sh=function(t,e){return t=+t,e=+e,function(A){return Math.round(t*(1-A)+e*A)}},Dh=function(t){return+t},Rh=[0,1];function Uh(t){return t}function Gh(t,e){return(e-=t=+t)?function(A){return(A-t)/e}:(A=isNaN(e)?NaN:.5,function(){return A});var A}function Nh(t,e,A){var n=t[0],r=t[1],i=e[0],o=e[1];return r<n?(n=Gh(r,n),i=A(o,i)):(n=Gh(n,r),i=A(i,o)),function(t){return i(n(t))}}function kh(t,e,A){var n=Math.min(t.length,e.length)-1,r=new Array(n),i=new Array(n),o=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<n;)r[o]=Gh(t[o],t[o+1]),i[o]=A(e[o],e[o+1]);return function(e){var A=lC(t,e,1,n)-1;return i[A](r[A](e))}}function xh(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Oh(){var t,e,A,n,r,i,o=Rh,a=Rh,s=wh,g=Uh;function c(){var t=Math.min(o.length,a.length);return g!==Uh&&(g=function(t,e){var A;return t>e&&(A=t,t=e,e=A),function(A){return Math.max(t,Math.min(e,A))}}(o[0],o[t-1])),n=t>2?kh:Nh,r=i=null,I}function I(e){return isNaN(e=+e)?A:(r||(r=n(o.map(t),a,s)))(t(g(e)))}return I.invert=function(A){return g(e((i||(i=n(a,o.map(t),yh)))(A)))},I.domain=function(t){return arguments.length?(o=Array.from(t,Dh),c()):o.slice()},I.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},I.rangeRound=function(t){return a=Array.from(t),s=Sh,c()},I.clamp=function(t){return arguments.length?(g=!!t||Uh,c()):g!==Uh},I.interpolate=function(t){return arguments.length?(s=t,c()):s},I.unknown=function(t){return arguments.length?(A=t,I):A},function(A,n){return t=A,e=n,c()}}function Mh(){return Oh()(Uh,Uh)}function Lh(t){var e=t.domain;return t.ticks=function(t){var A=e();return yC(A[0],A[A.length-1],null==t?10:t)},t.tickFormat=function(t,A){var n=e();return bC(n[0],n[n.length-1],null==t?10:t,A)},t.nice=function(A){null==A&&(A=10);var n,r=e(),i=0,o=r.length-1,a=r[i],s=r[o];return s<a&&(n=a,a=s,s=n,n=i,i=o,o=n),(n=vC(a,s,A))>0?n=vC(a=Math.floor(a/n)*n,s=Math.ceil(s/n)*n,A):n<0&&(n=vC(a=Math.ceil(a*n)/n,s=Math.floor(s*n)/n,A)),n>0?(r[i]=Math.floor(a/n)*n,r[o]=Math.ceil(s/n)*n,e(r)):n<0&&(r[i]=Math.ceil(a*n)/n,r[o]=Math.floor(s*n)/n,e(r)),t},t}var _h=function(t,e){var A,n=0,r=(t=t.slice()).length-1,i=t[n],o=t[r];return o<i&&(A=n,n=r,r=A,A=i,i=o,o=A),t[n]=e.floor(i),t[r]=e.ceil(o),t};function Jh(t){return Math.log(t)}function Th(t){return Math.exp(t)}function jh(t){return-Math.log(-t)}function Hh(t){return-Math.exp(-t)}function Yh(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Vh(t){return function(e){return-t(-e)}}function Zh(t){var e,A,n=t(Jh,Th),r=n.domain,i=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(i),A=function(t){return 10===t?Yh:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(i),r()[0]<0?(e=Vh(e),A=Vh(A),t(jh,Hh)):t(Jh,Th),n}return n.base=function(t){return arguments.length?(i=+t,o()):i},n.domain=function(t){return arguments.length?(r(t),o()):r()},n.ticks=function(t){var n,o=r(),a=o[0],s=o[o.length-1];(n=s<a)&&(u=a,a=s,s=u);var g,c,I,u=e(a),l=e(s),C=null==t?10:+t,h=[];if(!(i%1)&&l-u<C){if(u=Math.floor(u),l=Math.ceil(l),a>0){for(;u<=l;++u)for(c=1,g=A(u);c<i;++c)if(!((I=g*c)<a)){if(I>s)break;h.push(I)}}else for(;u<=l;++u)for(c=i-1,g=A(u);c>=1;--c)if(!((I=g*c)<a)){if(I>s)break;h.push(I)}2*h.length<C&&(h=yC(a,s,C))}else h=yC(u,l,Math.min(l-u,C)).map(A);return n?h.reverse():h},n.tickFormat=function(t,r){if(null==r&&(r=10===i?".0e":","),"function"!==typeof r&&(r=He(r)),t===1/0)return r;null==t&&(t=10);var o=Math.max(1,i*t/n.ticks().length);return function(t){var n=t/A(Math.round(e(t)));return n*i<i-.5&&(n*=i),n<=o?r(t):""}},n.nice=function(){return r(_h(r(),{floor:function(t){return A(Math.floor(e(t)))},ceil:function(t){return A(Math.ceil(e(t)))}}))},n}function Wh(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Kh(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ph(t){return t<0?-t*t:t*t}function qh(t){var e=t(Uh,Uh),A=1;function n(){return 1===A?t(Uh,Uh):.5===A?t(Kh,Ph):t(Wh(A),Wh(1/A))}return e.exponent=function(t){return arguments.length?(A=+t,n()):A},Lh(e)}function Xh(){var t=qh(Oh());return t.copy=function(){return xh(t,Xh()).exponent(t.exponent())},CC.apply(t,arguments),t}function zh(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function $h(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function tB(t){var e=1,A=t(zh(e),$h(e));return A.constant=function(A){return arguments.length?t(zh(e=+A),$h(e)):e},Lh(A)}function eB(t){return new Date(t)}function AB(t){return t instanceof Date?+t:+new Date(+t)}function nB(t,e,A,n,r,i,o,a,s){var g=Mh(),c=g.invert,I=g.domain,u=s(".%L"),l=s(":%S"),C=s("%I:%M"),h=s("%I %p"),B=s("%a %d"),f=s("%b %d"),d=s("%B"),Q=s("%Y"),E=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[r,1,36e5],[r,3,108e5],[r,6,216e5],[r,12,432e5],[n,1,864e5],[n,2,1728e5],[A,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function p(a){return(o(a)<a?u:i(a)<a?l:r(a)<a?C:n(a)<a?h:e(a)<a?A(a)<a?B:f:t(a)<a?d:Q)(a)}function y(e,A,n){if(null==e&&(e=10),"number"===typeof e){var r,i=Math.abs(n-A)/e,o=cC((function(t){return t[2]})).right(E,i);return o===E.length?(r=mC(A/31536e6,n/31536e6,e),e=t):o?(r=(o=E[i/E[o-1][2]<E[o][2]/i?o-1:o])[1],e=o[0]):(r=Math.max(mC(A,n,e),1),e=a),e.every(r)}return e}return g.invert=function(t){return new Date(c(t))},g.domain=function(t){return arguments.length?I(Array.from(t,AB)):I().map(eB)},g.ticks=function(t){var e,A=I(),n=A[0],r=A[A.length-1],i=r<n;return i&&(e=n,n=r,r=e),e=(e=y(t,n,r))?e.range(n,r+1):[],i?e.reverse():e},g.tickFormat=function(t,e){return null==e?p:s(e)},g.nice=function(t){var e=I();return(t=y(t,e[0],e[e.length-1]))?I(_h(e,t)):g},g.copy=function(){return xh(g,nB(t,e,A,n,r,i,o,a,s))},g}function rB(){var t,e,A,n,r,i=0,o=1,a=Uh,s=!1;function g(e){return isNaN(e=+e)?r:a(0===A?.5:(e=(n(e)-t)*A,s?Math.max(0,Math.min(1,e)):e))}function c(t){return function(e){var A,n,r,i;return arguments.length?(A=e,r=(n=Object(ba.a)(A,2))[0],i=n[1],a=t(r,i),g):[a(0),a(1)]}}return g.domain=function(r){var a,s;return arguments.length?(a=r,s=Object(ba.a)(a,2),i=s[0],o=s[1],t=n(i=+i),e=n(o=+o),A=t===e?0:1/(e-t),g):[i,o]},g.clamp=function(t){return arguments.length?(s=!!t,g):s},g.interpolator=function(t){return arguments.length?(a=t,g):a},g.range=c(wh),g.rangeRound=c(Sh),g.unknown=function(t){return arguments.length?(r=t,g):r},function(r){return n=r,t=r(i),e=r(o),A=t===e?0:1/(e-t),g}}function iB(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function oB(){var t=Lh(rB()(Uh));return t.copy=function(){return iB(t,oB())},hC.apply(t,arguments)}function aB(){var t=qh(rB());return t.copy=function(){return iB(t,aB()).exponent(t.exponent())},hC.apply(t,arguments)}function sB(t,e){for(var A=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);A<n;)i[A]=t(r,r=e[++A]);return function(t){var e=Math.max(0,Math.min(n-1,Math.floor(t*=n)));return i[e](t-e)}}function gB(){var t,e,A,n,r,i,o,a=0,s=.5,g=1,c=1,I=Uh,u=!1;function l(t){return isNaN(t=+t)?o:(t=.5+((t=+i(t))-e)*(c*t<c*e?n:r),I(u?Math.max(0,Math.min(1,t)):t))}function C(t){return function(e){var A,n,r,i,o;return arguments.length?(A=e,r=(n=Object(ba.a)(A,3))[0],i=n[1],o=n[2],I=sB(t,[r,i,o]),l):[I(0),I(.5),I(1)]}}return l.domain=function(o){var I,u;return arguments.length?(I=o,u=Object(ba.a)(I,3),a=u[0],s=u[1],g=u[2],t=i(a=+a),e=i(s=+s),A=i(g=+g),n=t===e?0:.5/(e-t),r=e===A?0:.5/(A-e),c=e<t?-1:1,l):[a,s,g]},l.clamp=function(t){return arguments.length?(u=!!t,l):u},l.interpolator=function(t){return arguments.length?(I=t,l):I},l.range=C(wh),l.rangeRound=C(Sh),l.unknown=function(t){return arguments.length?(o=t,l):o},function(o){return i=o,t=o(a),e=o(s),A=o(g),n=t===e?0:.5/(e-t),r=e===A?0:.5/(A-e),c=e<t?-1:1,l}}function cB(){var t=qh(gB());return t.copy=function(){return iB(t,cB()).exponent(t.exponent())},hC.apply(t,arguments)}function IB(t,e){var A;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;null!=i&&(A<i||void 0===A&&i>=i)&&(A=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;null!=(g=e(g,++a,t))&&(A<g||void 0===A&&g>=g)&&(A=g)}}catch(c){s.e(c)}finally{s.f()}}return A}function uB(t,e){var A;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;null!=i&&(A>i||void 0===A&&i>=i)&&(A=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;null!=(g=e(g,++a,t))&&(A>g||void 0===A&&g>=g)&&(A=g)}}catch(c){s.e(c)}finally{s.f()}}return A}function lB(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}var CB=H.a.mark(hB);function hB(t,e){var A,n,r,i,o,a,s;return H.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:if(void 0!==e){g.next=21;break}A=Object(R.a)(t),g.prev=2,A.s();case 4:if((n=A.n()).done){g.next=11;break}if(!(null!=(r=n.value)&&(r=+r)>=r)){g.next=9;break}return g.next=9,r;case 9:g.next=4;break;case 11:g.next=16;break;case 13:g.prev=13,g.t0=g.catch(2),A.e(g.t0);case 16:return g.prev=16,A.f(),g.finish(16);case 19:g.next=40;break;case 21:i=-1,o=Object(R.a)(t),g.prev=23,o.s();case 25:if((a=o.n()).done){g.next=32;break}if(s=a.value,!(null!=(s=e(s,++i,t))&&(s=+s)>=s)){g.next=30;break}return g.next=30,s;case 30:g.next=25;break;case 32:g.next=37;break;case 34:g.prev=34,g.t1=g.catch(23),o.e(g.t1);case 37:return g.prev=37,o.f(),g.finish(37);case 40:case"end":return g.stop()}}),CB,null,[[2,13,16,19],[23,34,37,40]])}function BB(t,e,A){if(n=(t=Float64Array.from(hB(t,A))).length){if((e=+e)<=0||n<2)return uB(t);if(e>=1)return IB(t);var n,r=(n-1)*e,i=Math.floor(r),o=IB(function t(e,A){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length-1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:gC;r>n;){if(r-n>600){var o=r-n+1,a=A-n+1,s=Math.log(o),g=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*g*(o-g)/o)*(a-o/2<0?-1:1),I=Math.max(n,Math.floor(A-a*g/o+c)),u=Math.min(r,Math.floor(A+(o-a)*g/o+c));t(e,A,I,u,i)}var l=e[A],C=n,h=r;for(lB(e,n,A),i(e[r],l)>0&&lB(e,n,r);C<h;){for(lB(e,C,h),++C,--h;i(e[C],l)<0;)++C;for(;i(e[h],l)>0;)--h}0===i(e[n],l)?lB(e,n,h):lB(e,++h,r),h<=A&&(n=h+1),A<=h&&(r=h-1)}return e}(t,i).subarray(0,i+1));return o+(uB(t.subarray(i+1))-o)*(r-i)}}var fB={};function dB(t,e,A){var n=function(){var A=e();return A.invertRange||(A.invertRange=A.invert?function(t){return function(e){var A,n=e[0],r=e[1];return r<n&&(A=n,n=r,r=A),[t.invert(n),t.invert(r)]}}(A):A.invertExtent?function(t){return function(e){var A,n,r,i,o=t.range(),a=e[0],s=e[1],g=-1;for(s<a&&(n=a,a=s,s=n),r=0,i=o.length;r<i;++r)o[r]>=a&&o[r]<=s&&(g<0&&(g=r),A=r);if(!(g<0))return a=t.invertExtent(o[g]),s=t.invertExtent(o[A]),[void 0===a[0]?a[1]:a[0],void 0===s[1]?s[0]:s[1]]}}(A):void 0),A.type=t,A};return n.metadata=Object(U.db)(Object(U.i)(A)),n}function QB(t,e,A){return arguments.length>1?(fB[t]=dB(t,e,A),this):EB(t)?fB[t]:void 0}function EB(t){return Object(U.v)(fB,t)}function pB(t,e){var A=fB[t];return A&&A.metadata[e]}function yB(t){return pB(t,sC)}function vB(t){return pB(t,"discrete")}function mB(t){return pB(t,"discretizing")}function bB(t){return pB(t,iC)}function FB(t){return pB(t,"interpolating")}function wB(t){return pB(t,"quantile")}QB("identity",(function t(e){var A;function n(t){return isNaN(t=+t)?A:t}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,Dh),n):e.slice()},n.unknown=function(t){return arguments.length?(A=t,n):A},n.copy=function(){return t(e).unknown(A)},e=arguments.length?Array.from(e,Dh):[0,1],Lh(n)})),QB("linear",(function t(){var e=Mh();return e.copy=function(){return xh(e,t())},CC.apply(e,arguments),Lh(e)}),sC),QB(iC,(function t(){var e=Zh(Oh()).domain([1,10]);return e.copy=function(){return xh(e,t()).base(e.base())},CC.apply(e,arguments),e}),[sC,iC]),QB("pow",Xh,sC),QB("sqrt",(function(){return Xh.apply(null,arguments).exponent(.5)}),sC),QB("symlog",(function t(){var e=tB(Oh());return e.copy=function(){return xh(e,t()).constant(e.constant())},CC.apply(e,arguments)}),sC),QB(oC,(function(){return CC.apply(nB(pn,vn,RA,SA,bn,wn,Dn,Un,fr).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}),[sC,"temporal"]),QB(aC,(function(){return CC.apply(nB(xn,Mn,YA,LA,_n,Tn,Dn,Un,Qr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}),[sC,"temporal"]),QB("sequential",oB,[sC,"interpolating"]),QB("".concat("sequential","-").concat("linear"),oB,[sC,"interpolating"]),QB("".concat("sequential","-").concat(iC),(function t(){var e=Zh(rB()).domain([1,10]);return e.copy=function(){return iB(e,t()).base(e.base())},hC.apply(e,arguments)}),[sC,"interpolating",iC]),QB("".concat("sequential","-").concat("pow"),aB,[sC,"interpolating"]),QB("".concat("sequential","-").concat("sqrt"),(function(){return aB.apply(null,arguments).exponent(.5)}),[sC,"interpolating"]),QB("".concat("sequential","-").concat("symlog"),(function t(){var e=tB(rB());return e.copy=function(){return iB(e,t()).constant(e.constant())},hC.apply(e,arguments)}),[sC,"interpolating"]),QB("".concat("diverging","-").concat("linear"),(function t(){var e=Lh(gB()(Uh));return e.copy=function(){return iB(e,t())},hC.apply(e,arguments)}),[sC,"interpolating"]),QB("".concat("diverging","-").concat(iC),(function t(){var e=Zh(gB()).domain([.1,1,10]);return e.copy=function(){return iB(e,t()).base(e.base())},hC.apply(e,arguments)}),[sC,"interpolating",iC]),QB("".concat("diverging","-").concat("pow"),cB,[sC,"interpolating"]),QB("".concat("diverging","-").concat("sqrt"),(function(){return cB.apply(null,arguments).exponent(.5)}),[sC,"interpolating"]),QB("".concat("diverging","-").concat("symlog"),(function t(){var e=tB(gB());return e.copy=function(){return iB(e,t()).constant(e.constant())},hC.apply(e,arguments)}),[sC,"interpolating"]),QB("quantile",(function t(){var e,A=[],n=[],r=[];function i(){var t=0,e=Math.max(1,n.length);for(r=new Array(e-1);++t<e;)r[t-1]=BB(A,t/e);return o}function o(t){return isNaN(t=+t)?e:n[lC(r,t)]}return o.invertExtent=function(t){var e=n.indexOf(t);return e<0?[NaN,NaN]:[e>0?r[e-1]:A[0],e<r.length?r[e]:A[A.length-1]]},o.domain=function(t){if(!arguments.length)return A.slice();A=[];var e,n=Object(R.a)(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;null==r||isNaN(r=+r)||A.push(r)}}catch(o){n.e(o)}finally{n.f()}return A.sort(gC),i()},o.range=function(t){return arguments.length?(n=Array.from(t),i()):n.slice()},o.unknown=function(t){return arguments.length?(e=t,o):e},o.quantiles=function(){return r.slice()},o.copy=function(){return t().domain(A).range(n).unknown(e)},CC.apply(o,arguments)}),["discretizing","quantile"]),QB("quantize",(function t(){var e,A=0,n=1,r=1,i=[.5],o=[0,1];function a(t){return t<=t?o[lC(i,t,0,r)]:e}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*A)/(r+1);return a}return a.domain=function(t){var e,r;return arguments.length?(e=t,r=Object(ba.a)(e,2),A=r[0],n=r[1],A=+A,n=+n,s()):[A,n]},a.range=function(t){return arguments.length?(r=(o=Array.from(t)).length-1,s()):o.slice()},a.invertExtent=function(t){var e=o.indexOf(t);return e<0?[NaN,NaN]:e<1?[A,i[0]]:e>=r?[i[r-1],n]:[i[e-1],i[e]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return t().domain([A,n]).range(o).unknown(e)},CC.apply(Lh(a),arguments)}),"discretizing"),QB("threshold",(function t(){var e,A=[.5],n=[0,1],r=1;function i(t){return t<=t?n[lC(A,t,0,r)]:e}return i.domain=function(t){return arguments.length?(A=Array.from(t),r=Math.min(A.length,n.length-1),i):A.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(A.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var e=n.indexOf(t);return[A[e-1],A[e]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return t().domain(A).range(n).unknown(e)},CC.apply(i,arguments)}),"discretizing"),QB("bin-ordinal",(function t(){var e=[],A=[];function n(t){return null==t||t!==t?void 0:A[(lC(e,t)-1)%A.length]}return n.domain=function(t){return arguments.length?(e=wC(t),n):e.slice()},n.range=function(t){return arguments.length?(A=SC.call(t),n):A.slice()},n.tickFormat=function(t,A){return bC(e[0],Object(U.U)(e),null==t?10:t,A)},n.copy=function(){return t().domain(n.domain()).range(n.range())},n}),["discrete","discretizing"]),QB("ordinal",fC,"discrete"),QB("band",dC,"discrete"),QB("point",(function(){return function t(e){var A=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return t(A())},e}(dC().paddingInner(1))}),"discrete");var SB,DB,RB,UB,GB=function(t){var e=t.length;return function(A){return t[Math.max(0,Math.min(e-1,Math.floor(A*e)))]}},NB=function(t,e){var A=ch(+t,+e);return function(t){var e=A(t);return e-360*Math.floor(e/360)}},kB=180/Math.PI,xB={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},OB=function(t,e,A,n,r,i){var o,a,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*A+e*n)&&(A-=t*s,n-=e*s),(a=Math.sqrt(A*A+n*n))&&(A/=a,n/=a,s/=a),t*n<e*A&&(t=-t,e=-e,s=-s,o=-o),{translateX:r,translateY:i,rotate:Math.atan2(e,t)*kB,skewX:Math.atan(s)*kB,scaleX:o,scaleY:a}};function MB(t,e,A,n){function r(t){return t.length?t.pop()+" ":""}return function(i,o){var a=[],s=[];return i=t(i),o=t(o),function(t,n,r,i,o,a){if(t!==r||n!==i){var s=o.push("translate(",null,e,null,A);a.push({i:s-4,x:yh(t,r)},{i:s-2,x:yh(n,i)})}else(r||i)&&o.push("translate("+r+e+i+A)}(i.translateX,i.translateY,o.translateX,o.translateY,a,s),function(t,e,A,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:A.push(r(A)+"rotate(",null,n)-2,x:yh(t,e)})):e&&A.push(r(A)+"rotate("+e+n)}(i.rotate,o.rotate,a,s),function(t,e,A,i){t!==e?i.push({i:A.push(r(A)+"skewX(",null,n)-2,x:yh(t,e)}):e&&A.push(r(A)+"skewX("+e+n)}(i.skewX,o.skewX,a,s),function(t,e,A,n,i,o){if(t!==A||e!==n){var a=i.push(r(i)+"scale(",null,",",null,")");o.push({i:a-4,x:yh(t,A)},{i:a-2,x:yh(e,n)})}else 1===A&&1===n||i.push(r(i)+"scale("+A+","+n+")")}(i.scaleX,i.scaleY,o.scaleX,o.scaleY,a,s),i=o=null,function(t){for(var e,A=-1,n=s.length;++A<n;)a[(e=s[A]).i]=e.x(t);return a.join("")}}}var LB=MB((function(t){return"none"===t?xB:(SB||(SB=document.createElement("DIV"),DB=document.documentElement,RB=document.defaultView),SB.style.transform=t,t=RB.getComputedStyle(DB.appendChild(SB),null).getPropertyValue("transform"),DB.removeChild(SB),t=t.slice(7,-1).split(","),OB(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),_B=MB((function(t){return null==t?xB:(UB||(UB=document.createElementNS("http://www.w3.org/2000/svg","g")),UB.setAttribute("transform",t),(t=UB.transform.baseVal.consolidate())?(t=t.matrix,OB(t.a,t.b,t.c,t.d,t.e,t.f)):xB)}),", ",")",")"),JB=Math.SQRT2;function TB(t){return((t=Math.exp(t))+1/t)/2}var jB=function(t,e){var A,n,r=t[0],i=t[1],o=t[2],a=e[0],s=e[1],g=e[2],c=a-r,I=s-i,u=c*c+I*I;if(u<1e-12)n=Math.log(g/o)/JB,A=function(t){return[r+t*c,i+t*I,o*Math.exp(JB*t*n)]};else{var l=Math.sqrt(u),C=(g*g-o*o+4*u)/(2*o*2*l),h=(g*g-o*o-4*u)/(2*g*2*l),B=Math.log(Math.sqrt(C*C+1)-C),f=Math.log(Math.sqrt(h*h+1)-h);n=(f-B)/JB,A=function(t){var e,A=t*n,a=TB(B),s=o/(2*l)*(a*(e=JB*A+B,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(B));return[r+s*c,i+s*I,o*a/TB(JB*A+B)]}}return A.duration=1e3*n,A};function HB(t){return function(e,A){var n=t((e=Ah(e)).h,(A=Ah(A)).h),r=uh(e.s,A.s),i=uh(e.l,A.l),o=uh(e.opacity,A.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(t),e.opacity=o(t),e+""}}}var YB=HB(ch),VB=HB(uh),ZB=Math.PI/180,WB=180/Math.PI;function KB(t){if(t instanceof qB)return new qB(t.l,t.a,t.b,t.opacity);if(t instanceof nf)return rf(t);t instanceof qC||(t=KC(t));var e,A,n=tf(t.r),r=tf(t.g),i=tf(t.b),o=XB((.2225045*n+.7168786*r+.0606169*i)/1);return n===r&&r===i?e=A=o:(e=XB((.4360747*n+.3850649*r+.1430804*i)/.96422),A=XB((.0139322*n+.0971045*r+.7141733*i)/.82521)),new qB(116*o-16,500*(e-o),200*(o-A),t.opacity)}function PB(t,e,A,n){return 1===arguments.length?KB(t):new qB(t,e,A,null==n?1:n)}function qB(t,e,A,n){this.l=+t,this.a=+e,this.b=+A,this.opacity=+n}function XB(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function zB(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function $B(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function tf(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ef(t){if(t instanceof nf)return new nf(t.h,t.c,t.l,t.opacity);if(t instanceof qB||(t=KB(t)),0===t.a&&0===t.b)return new nf(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*WB;return new nf(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Af(t,e,A,n){return 1===arguments.length?ef(t):new nf(t,e,A,null==n?1:n)}function nf(t,e,A,n){this.h=+t,this.c=+e,this.l=+A,this.opacity=+n}function rf(t){if(isNaN(t.h))return new qB(t.l,0,0,t.opacity);var e=t.h*ZB;return new qB(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function of(t,e){var A=uh((t=PB(t)).l,(e=PB(e)).l),n=uh(t.a,e.a),r=uh(t.b,e.b),i=uh(t.opacity,e.opacity);return function(e){return t.l=A(e),t.a=n(e),t.b=r(e),t.opacity=i(e),t+""}}function af(t){return function(e,A){var n=t((e=Af(e)).h,(A=Af(A)).h),r=uh(e.c,A.c),i=uh(e.l,A.l),o=uh(e.opacity,A.opacity);return function(t){return e.h=n(t),e.c=r(t),e.l=i(t),e.opacity=o(t),e+""}}}DC(qB,PB,RC(UC,{brighter:function(t){return new qB(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new qB(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,A=isNaN(this.b)?t:t-this.b/200;return new qC($B(3.1338561*(e=.96422*zB(e))-1.6168667*(t=1*zB(t))-.4906146*(A=.82521*zB(A))),$B(-.9787684*e+1.9161415*t+.033454*A),$B(.0719453*e-.2289914*t+1.4052427*A),this.opacity)}})),DC(nf,Af,RC(UC,{brighter:function(t){return new nf(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new nf(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return rf(this).rgb()}}));var sf=af(ch),gf=af(uh),cf=1.97294,If=-.90649*cf,uf=1.78277*cf,lf=-.6557636667999999;function Cf(t){if(t instanceof Bf)return new Bf(t.h,t.s,t.l,t.opacity);t instanceof qC||(t=KC(t));var e=t.r/255,A=t.g/255,n=t.b/255,r=(lf*n+If*e-uf*A)/(lf+If-uf),i=n-r,o=(cf*(A-r)- -.29227*i)/-.90649,a=Math.sqrt(o*o+i*i)/(cf*r*(1-r)),s=a?Math.atan2(o,i)*WB-120:NaN;return new Bf(s<0?s+360:s,a,r,t.opacity)}function hf(t,e,A,n){return 1===arguments.length?Cf(t):new Bf(t,e,A,null==n?1:n)}function Bf(t,e,A,n){this.h=+t,this.s=+e,this.l=+A,this.opacity=+n}function ff(t){return function e(A){function n(e,n){var r=t((e=hf(e)).h,(n=hf(n)).h),i=uh(e.s,n.s),o=uh(e.l,n.l),a=uh(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(Math.pow(t,A)),e.opacity=a(t),e+""}}return A=+A,n.gamma=e,n}(1)}DC(Bf,hf,RC(UC,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Bf(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Bf(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ZB,e=+this.l,A=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),r=Math.sin(t);return new qC(255*(e+A*(-.14861*n+1.78277*r)),255*(e+A*(-.29227*n+-.90649*r)),255*(e+A*(cf*n)),this.opacity)}}));var df=ff(ch),Qf=ff(uh),Ef=function(t,e){for(var A=new Array(e),n=0;n<e;++n)A[n]=t(n/(e-1));return A},pf=["clamp","base","constant","exponent"];function yf(t,e){var A=e[0],n=Object(U.U)(e)-A;return function(e){return t(A+e*n)}}function vf(t,e,A){return sB(Ff(e||"rgb",A),t)}function mf(t,e){for(var A=new Array(e),n=e+1,r=0;r<e;)A[r]=t(++r/n);return A}function bf(t,e,A){var n,r,i,o=A-e;return o&&Number.isFinite(o)?(n=(r=t.type).indexOf("-"),r=n<0?r:r.slice(n+1),i=QB(r)().domain([e,A]).range([0,1]),pf.forEach((function(e){return t[e]?i[e](t[e]()):0})),i):Object(U.l)(.5)}function Ff(t,e){var A=o[function(t){return"interpolate"+t.toLowerCase().split("-").map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("")}(t)];return null!=e&&A&&A.gamma?A.gamma(e):A}function wf(t){for(var e=t.length/6|0,A=new Array(e),n=0;n<e;)A[n]="#"+t.slice(6*n,6*++n);return A}function Sf(t,e){for(var A in t)Rf(A,e(t[A]))}var Df={};function Rf(t,e){return t=t&&t.toLowerCase(),arguments.length>1?(Df[t]=e,this):Df[t]}Sf({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"},wf),Sf({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(t){return vf(wf(t))}));var Uf,Gf,Nf=function(t){return Object(U.A)(t)?t.map((function(t){return String(t)})):String(t)},kf=function(t,e){return t[1]-e[1]},xf=function(t,e){return e[1]-t[1]};function Of(t,e,A){var n;return Object(U.E)(e)&&(t.bins&&(e=Math.max(e,t.bins.length)),null!=A&&(e=Math.min(e,Math.floor(Object(U.X)(t.domain())/A||1)))),Object(U.F)(e)&&(n=e.step,e=e.interval),Object(U.H)(e)&&(e=t.type===oC?Yn(e):t.type==aC?Vn(e):Object(U.n)("Only time and utc scales accept interval strings."),n&&(e=e.every(n))),e}function Mf(t,e,A){var n=t.range(),r=n[0],i=Object(U.U)(n),o=kf;if(r>i&&(n=i,i=r,r=n,o=xf),r=Math.floor(r),i=Math.ceil(i),e=e.map((function(e){return[e,t(e)]})).filter((function(t){return r<=t[1]&&t[1]<=i})).sort(o).map((function(t){return t[0]})),A>0&&e.length>1){for(var a=[e[0],Object(U.U)(e)];e.length>A&&e.length>=3;)e=e.filter((function(t,e){return!(e%2)}));e.length<3&&(e=a)}return e}function Lf(t,e){return t.bins?Mf(t,t.bins):t.ticks?t.ticks(e):t.domain()}function _f(t,e,A,n,r,i){var o=e.type,a=Nf;if(o===oC||r===oC)a=t.timeFormat(n);else if(o===aC||r===aC)a=t.utcFormat(n);else if(bB(o)){var s=t.formatFloat(n);if(i||e.bins)a=s;else{var g=Jf(e,A,!1);a=function(t){return g(t)?s(t):""}}}else if(e.tickFormat){var c=e.domain();a=t.formatSpan(c[0],c[c.length-1],A,n)}else n&&(a=t.format(n));return a}function Jf(t,e,A){var n=Lf(t,e),r=t.base(),i=Math.log(r),o=Math.max(1,r*e/n.length),a=function(t){var e=t/Math.pow(r,Math.round(Math.log(t)/i));return e*r<r-.5&&(e*=r),e<=o};return A?n.filter(a):a}var Tf=(Uf={},Object(E.a)(Uf,"quantile","quantiles"),Object(E.a)(Uf,"quantize","thresholds"),Object(E.a)(Uf,"threshold","domain"),Uf),jf=(Gf={},Object(E.a)(Gf,"quantile","quantiles"),Object(E.a)(Gf,"quantize","domain"),Gf);function Hf(t,e){return t.bins?function(t){var e=t.slice(0,-1);return e.max=Object(U.U)(t),e}(t.bins):t.type===iC?Jf(t,e,!0):Tf[t.type]?function(t){var e=[-1/0].concat(t);return e.max=1/0,e}(t[Tf[t.type]]()):Lf(t,e)}function Yf(t,e,A,n,r,i,o){var a=jf[e.type]&&i!==oC&&i!==aC?function(t,e,A){var n,r=e[jf[e.type]](),i=r.length,o=i>1?r[1]-r[0]:r[0];for(n=1;n<i;++n)o=Math.min(o,r[n]-r[n-1]);return t.formatSpan(0,o,30,A)}(t,e,r):_f(t,e,A,r,i,o);return"symbol"===n&&function(t){return Tf[t.type]||t.bins}(e)?function(t){return function(e,A,n){var r=Vf(n[A+1],Vf(n.max,1/0)),i=Zf(e,t),o=Zf(r,t);return i&&o?i+" \u2013 "+o:o?"< "+o:"\u2265 "+i}}(a):"discrete"===n?function(t){return function(e,A){return A?t(e):null}}(a):function(t){return function(e){return t(e)}}(a)}function Vf(t,e){return null!=t?t:e}function Zf(t,e){return Number.isFinite(t)?e(t):null}function Wf(t,e,A,n){var r=n||e.type;return Object(U.H)(A)&&pB(r,"temporal")&&(A=A.replace(/%a/g,"%A").replace(/%b/g,"%B")),A||r!==oC?A||r!==aC?Yf(t,e,5,null,A,n,!0):t.utcFormat("%A, %d %B %Y, %X UTC"):t.timeFormat("%A, %d %B %Y, %X")}function Kf(t,e,A){A=A||{};var n=Math.max(3,A.maxlen||7),r=Wf(t,e,A.format,A.formatType);if(mB(e.type)){var i=Hf(e).slice(1).map(r),o=i.length;return"".concat(o," boundar").concat(1===o?"y":"ies",": ").concat(i.join(", "))}if(vB(e.type)){var a=e.domain(),s=a.length,g=s>n?a.slice(0,n-2).map(r).join(", ")+", ending with "+a.slice(-1).map(r):a.map(r).join(", ");return"".concat(s," value").concat(1===s?"":"s",": ").concat(g)}var c=e.domain();return"values from ".concat(r(c[0])," to ").concat(r(Object(U.U)(c)))}var Pf=function(t,e,A){var n;return n={},Object(E.a)(n,"role",t),Object(E.a)(n,"aria-roledescription",e),Object(E.a)(n,"aria-label",A||void 0),n},qf=Object(U.db)(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Xf={axis:{desc:"axis",caption:function(t){var e=t.datum,A=t.orient,n=e.title?Ad(t):null,r=t.context,i=r.scales[e.scale].value,o=r.dataflow.locale(),a=i.type;return"".concat("left"===A||"right"===A?"Y":"X","-axis")+(n?" titled '".concat(n,"'"):"")+" for a ".concat(vB(a)?"discrete":a," scale")+" with ".concat(Kf(o,i,t))}},legend:{desc:"legend",caption:function(t){var e=t.datum,A=e.title?Ad(t):null,n="".concat(e.type||""," legend").trim(),r=e.scales,i=Object.keys(r),o=t.context,a=o.scales[r[i[0]]].value,s=o.dataflow.locale();return g=n,(g.length?g[0].toUpperCase()+g.slice(1):g)+(A?" titled '".concat(A,"'"):"")+" for ".concat(function(t){return(t=t.map((function(t){return t+("fill"===t||"stroke"===t?" color":"")}))).length<2?t[0]:t.slice(0,-1).join(", ")+" and "+Object(U.U)(t)}(i))+" with ".concat(Kf(s,a,t));var g}},"title-text":{desc:"title",caption:function(t){return"Title text '".concat(ed(t),"'")}},"title-subtitle":{desc:"subtitle",caption:function(t){return"Subtitle text '".concat(ed(t),"'")}}},zf={ariaRole:"role",ariaRoleDescription:"aria-roledescription",description:"aria-label"};function $f(t,e){var A=!1===e.aria;if(t("aria-hidden",A||void 0),A||null==e.description)for(var n in zf)t(zf[n],void 0);else{var r=e.mark.marktype;t("aria-label",e.description),t("role",e.ariaRole||("group"===r?"graphics-object":"graphics-symbol")),t("aria-roledescription",e.ariaRoleDescription||"".concat(r," mark"))}}function td(t){return!1===t.aria?Object(E.a)({},"aria-hidden",!0):qf[t.role]?null:Xf[t.role]?function(t,e){try{var A=t.items[0],n=e.caption||function(){return""};return Pf(e.role||"graphics-symbol",e.desc,A.description||n(A))}catch(r){return null}}(t,Xf[t.role]):function(t){var e=t.marktype,A="group"===e||"text"===e||t.items.some((function(t){return null!=t.description&&!1!==t.aria}));return Pf(A?"graphics-object":"graphics-symbol","".concat(e," mark container"),t.description)}(t)}function ed(t){return Object(U.i)(t.text).join(" ")}function Ad(t){try{return Object(U.i)(Object(U.U)(t.items).items[0].text).join(" ")}catch(e){return null}}var nd=function(t){return(t+"").replace(/&/g,"&amp;").replace(/"/g,"&quot;")};function rd(t,e,A){var n,r,i="<"+t;if(e)for(n in e)null!=(r=e[n])&&(i+=" "+n+'="'+nd(r)+'"');return A&&(i+=" "+A),i+">"}function id(t){return"</"+t+">"}var od={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"},ad={fill:"none","stroke-miterlimit":10},sd=xu.xmlns;function gd(t){xl.call(this,t),this._dirtyID=0,this._dirty=[],this._svg=null,this._root=null,this._defs=null}var cd=Object(U.y)(gd,xl),Id=xl.prototype;function ud(t,e,A){var n,r,i;if("radial"===e.gradient){var o=Sl(t,A++,"pattern",sd);o.setAttribute("id","p_"+e.id),o.setAttribute("viewBox","0,0,1,1"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("preserveAspectRatio","xMidYMid slice"),(o=Sl(o,0,"rect",sd)).setAttribute("width","1"),o.setAttribute("height","1"),o.setAttribute("fill","url("+yd()+"#"+e.id+")"),(t=Sl(t,A++,"radialGradient",sd)).setAttribute("id",e.id),t.setAttribute("fx",e.x1),t.setAttribute("fy",e.y1),t.setAttribute("fr",e.r1),t.setAttribute("cx",e.x2),t.setAttribute("cy",e.y2),t.setAttribute("r",e.r2)}else(t=Sl(t,A++,"linearGradient",sd)).setAttribute("id",e.id),t.setAttribute("x1",e.x1),t.setAttribute("x2",e.x2),t.setAttribute("y1",e.y1),t.setAttribute("y2",e.y2);for(n=0,r=e.stops.length;n<r;++n)(i=Sl(t,n,"stop",sd)).setAttribute("offset",e.stops[n].offset),i.setAttribute("stop-color",e.stops[n].color);return Dl(t,n),A}function ld(t,e,A){var n;return(t=Sl(t,A,"clipPath",sd)).setAttribute("id",e.id),e.path?(n=Sl(t,0,"path",sd)).setAttribute("d",e.path):((n=Sl(t,0,"rect",sd)).setAttribute("x",0),n.setAttribute("y",0),n.setAttribute("width",e.width),n.setAttribute("height",e.height)),Dl(t,1),A+1}function Cd(t,e){for(;t&&t.dirty!==e;t=t.mark.group){if(t.dirty=e,!t.mark||t.mark.dirty===e)return;t.mark.dirty=e}}function hd(t,e,A,n,r){var i,o=t._svg;if(!o&&(o=Fl(i=e.ownerDocument,n,sd),t._svg=o,t.mark&&(o.__data__=t,o.__values__={fill:"default"},"g"===n))){var a=Fl(i,"path",sd);o.appendChild(a),a.__data__=t;var s=Fl(i,"g",sd);o.appendChild(s),s.__data__=t;var g=Fl(i,"path",sd);o.appendChild(g),g.__data__=t,g.__values__={fill:"default"}}return(o.ownerSVGElement!==r||function(t,e){return t.parentNode&&t.parentNode.childNodes.length>1&&t.previousSibling!=e}(o,A))&&e.insertBefore(o,A?A.nextSibling:e.firstChild),o}cd.initialize=function(t,e,A,n){if(this._defs={gradient:{},clipping:{}},t){for(var r in this._svg=Sl(t,0,"svg",sd),this._svg.setAttribute("class","marks"),Dl(t,1),this._root=Sl(this._svg,0,"g",sd),ad)this._root.setAttribute(r,ad[r]);Dl(this._svg,1)}return this.background(this._bgcolor),Id.initialize.call(this,t,e,A,n)},cd.background=function(t){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",t),Id.background.apply(this,arguments)},cd.resize=function(t,e,A,n){return Id.resize.call(this,t,e,A,n),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},cd.canvas=function(){return this._svg},cd.svg=function(){if(!this._svg)return null;var t={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var e in xu)t[e]=xu[e];var A=this._bgcolor?rd("rect",{width:this._width,height:this._height,fill:this._bgcolor})+id("rect"):"";return rd("svg",t)+(this._defs.el?this._defs.el.outerHTML:"")+A+this._root.outerHTML+id("svg")},cd._render=function(t){return this._dirtyCheck()&&(this._dirtyAll&&this._resetDefs(),this.draw(this._root,t),Dl(this._root,1)),this.updateDefs(),this._dirty=[],++this._dirtyID,this},cd.updateDefs=function(){var t=this._svg,e=this._defs,A=e.el,n=0;for(var r in e.gradient)A||(e.el=A=Sl(t,0,"defs",sd)),n=ud(A,e.gradient[r],n);for(var i in e.clipping)A||(e.el=A=Sl(t,0,"defs",sd)),n=ld(A,e.clipping[i],n);A&&(0===n?(t.removeChild(A),e.el=null):Dl(A,n))},cd._resetDefs=function(){var t=this._defs;t.gradient={},t.clipping={}},cd.dirty=function(t){t.dirty!==this._dirtyID&&(t.dirty=this._dirtyID,this._dirty.push(t))},cd.isDirty=function(t){return this._dirtyAll||!t._svg||t.dirty===this._dirtyID},cd._dirtyCheck=function(){this._dirtyAll=!0;var t=this._dirty;if(!t.length||!this._dirtyID)return!0;var e,A,n,r,i,o,a,s=++this._dirtyID;for(i=0,o=t.length;i<o;++i)(A=(e=t[i]).mark).marktype!==n&&(n=A.marktype,r=Bl[n]),A.zdirty&&A.dirty!==s&&(this._dirtyAll=!1,Cd(e,s),A.items.forEach((function(t){t.dirty=s}))),A.zdirty||(e.exit?(r.nested&&A.items.length?(a=A.items[0])._svg&&this._update(r,a._svg,a):e._svg&&(a=e._svg.parentNode)&&a.removeChild(e._svg),e._svg=null):(e=r.nested?A.items[0]:e)._update!==s&&(e._svg&&e._svg.ownerSVGElement?this._update(r,e._svg,e):(this._dirtyAll=!1,Cd(e,s)),e._update=s));return!this._dirtyAll},cd.draw=function(t,e,A){var n=this;if(!this.isDirty(e))return e._svg;var r,i=this._svg,o=Bl[e.marktype],a=!1===e.interactive?"none":null,s="g"===o.tag,g=null,c=0;(r=hd(e,t,A,"g",i)).setAttribute("class",Rl(e));var I=td(e);for(var u in I)pd(r,u,I[u]);s||pd(r,"pointer-events",a),pd(r,"clip-path",e.clip?FI(this,e,e.group):null);var l=function(t){var e=n.isDirty(t),A=hd(t,r,g,o.tag,i);e&&(n._update(o,A,t),s&&function(t,e,A){e=e.lastChild.previousSibling;var n,r=0;lu(A,(function(A){n=t.draw(e,A,n),++r})),Dl(e,1+r)}(n,A,t)),g=A,++c};return o.nested?e.items.length&&l(e.items[0]):lu(e,l),Dl(r,c),r};var Bd=null,fd=null,dd={group:function(t,e,A){var n=Bd=e.childNodes[2];fd=n.__values__,t.foreground(Ed,A,this),fd=e.__values__,Bd=e.childNodes[1],t.content(Ed,A,this);var r=Bd=e.childNodes[0];t.background(Ed,A,this);var i=!1===A.mark.interactive?"none":null;if(i!==fd.events&&(pd(n,"pointer-events",i),pd(r,"pointer-events",i),fd.events=i),A.strokeForeground&&A.stroke){var o=A.fill;pd(n,"display",null),this.style(r,A),pd(r,"stroke",null),o&&(A.fill=null),fd=n.__values__,this.style(n,A),o&&(A.fill=o),Bd=null}else pd(n,"display","none")},image:function(t,e,A){!1===A.smooth?(Qd(e,"image-rendering","optimizeSpeed"),Qd(e,"image-rendering","pixelated")):Qd(e,"image-rendering",null)},text:function(t,e,A){var n,r,i,o,a=ol(A);Object(U.A)(a)?(n=(r=a.map((function(t){return sl(A,t)}))).join("\n"))!==fd.text&&(Dl(e,0),i=e.ownerDocument,o=il(A),r.forEach((function(t,n){var r=Fl(i,"tspan",sd);r.__data__=A,r.textContent=t,n&&(r.setAttribute("x",0),r.setAttribute("dy",o)),e.appendChild(r)})),fd.text=n):(r=sl(A,a))!==fd.text&&(e.textContent=r,fd.text=r),pd(e,"font-family",gl(A)),pd(e,"font-size",rl(A)+"px"),pd(e,"font-style",A.fontStyle),pd(e,"font-variant",A.fontVariant),pd(e,"font-weight",A.fontWeight)}};function Qd(t,e,A){A!==fd[e]&&(null==A?t.style.removeProperty(e):t.style.setProperty(e,A+""),fd[e]=A)}function Ed(t,e,A){e!==fd[t]&&(A?function(t,e,A,n){null!=A?t.setAttributeNS(n,e,A):t.removeAttributeNS(n,e)}(Bd,t,e,A):pd(Bd,t,e),fd[t]=e)}function pd(t,e,A){null!=A?t.setAttribute(e,A):t.removeAttribute(e)}function yd(){var t;return"undefined"===typeof window?"":(t=window.location).hash?t.href.slice(0,-t.hash.length):t.href}function vd(t){xl.call(this,t),this._text={head:"",bg:"",root:"",foot:"",defs:"",body:""},this._defs={gradient:{},clipping:{}}}cd._update=function(t,e,A){Bd=e,fd=e.__values__,$f(Ed,A),t.attr(Ed,A,this);var n=dd[t.type];n&&n.call(this,t,e,A),Bd&&this.style(Bd,A)},cd.style=function(t,e){if(null!=e)for(var A in od){var n="font"===A?gl(e):e[A];if(n!==fd[A]){var r=od[A];null==n?t.removeAttribute(r):(Qg(n)&&(n=Eg(n,this._defs.gradient,yd())),t.setAttribute(r,n+"")),fd[A]=n}}};var md=Object(U.y)(vd,xl),bd=xl.prototype;function Fd(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}md.resize=function(t,e,A,n){bd.resize.call(this,t,e,A,n);var r=this._origin,i=this._text,o={class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 "+this._width+" "+this._height};for(var a in xu)o[a]=xu[a];i.head=rd("svg",o);var s=this._bgcolor;return"transparent"!==s&&"none"!==s||(s=null),i.bg=s?rd("rect",{width:this._width,height:this._height,fill:s})+id("rect"):"",i.root=rd("g",Object(U.o)({},ad,{transform:"translate("+r+")"})),i.foot=id("g")+id("svg"),this},md.background=function(){var t=bd.background.apply(this,arguments);return arguments.length&&this._text.head&&this.resize(this._width,this._height,this._origin,this._scale),t},md.svg=function(){var t=this._text;return t.head+t.defs+t.bg+t.root+t.body+t.foot},md._render=function(t){return this._text.body=this.mark(t),this._text.defs=this.buildDefs(),this},md.buildDefs=function(){var t,e="";for(var A in this._defs.gradient){var n=this._defs.gradient[A],r=n.stops;"radial"===n.gradient?(e+=rd(t="pattern",{id:"p_"+A,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e+=rd("rect",{width:"1",height:"1",fill:"url(#"+A+")"})+id("rect"),e+=id(t),e+=rd(t="radialGradient",{id:A,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})):e+=rd(t="linearGradient",{id:A,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2});for(var i=0;i<r.length;++i)e+=rd("stop",{offset:r[i].offset,"stop-color":r[i].color})+id("stop");e+=id(t)}for(var o in this._defs.clipping){var a=this._defs.clipping[o];e+=rd("clipPath",{id:o}),a.path?e+=rd("path",{d:a.path})+id("path"):e+=rd("rect",{x:0,y:0,width:a.width,height:a.height})+id("rect"),e+=id("clipPath")}return e?rd("defs")+e+id("defs"):""},md.attr=function(t,e,A,n){var r=this,i={},o=function(t,e,A,n){i[n||t]=e};return Array.isArray(A)?A.forEach((function(t){return t(o,e,r)})):A(o,e,this),n&&function(t,e,A,n,r){if(null==e)return t;"bgrect"===n&&!1===A.interactive&&(t["pointer-events"]="none");if("bgfore"===n&&(!1===A.interactive&&(t["pointer-events"]="none"),t.display="none",null!==e.fill))return t;"image"===n&&!1===e.smooth&&(t.style="image-rendering: optimizeSpeed; image-rendering: pixelated;");"text"===n&&(t["font-family"]=gl(e),t["font-size"]=rl(e)+"px",e.fontStyle&&(t["font-style"]=e.fontStyle),e.fontVariant&&(t["font-variant"]=e.fontVariant),e.fontWeight&&(t["font-weight"]=e.fontWeight));for(var i in od){var o=e[i],a=od[i];("transparent"!==o||"fill"!==a&&"stroke"!==a)&&null!=o&&(Qg(o)&&(o=Eg(o,r.gradient,"")),t[a]=o)}}(i,e,t,n,this._defs),i},md.href=function(t){var e,A=this,n=t.href;if(n){if(e=A._hrefs&&A._hrefs[n])return e;A.sanitizeURL(n).then((function(t){t["xlink:href"]=t.href,t.href=null,(A._hrefs||(A._hrefs={}))[n]=t}))}return null},md.mark=function(t){var e=this,A=Bl[t.marktype],n=A.tag,r=[$f,A.attr],i="";i+=rd("g",Object(U.o)({class:Rl(t),"clip-path":t.clip?FI(this,t,t.group):null},td(t),{"pointer-events":"g"!==n&&!1===t.interactive?"none":null}));var o=function(o){var a=e.href(o);if(a&&(i+=rd("a",a)),i+=rd(n,e.attr(t,o,r,"g"!==n?n:null)),"text"===n){var s=ol(o);if(Object(U.A)(s))for(var g={x:0,dy:il(o)},c=0;c<s.length;++c)i+=rd("tspan",c?g:null)+Fd(sl(o,s[c]))+id("tspan");else i+=Fd(sl(o,s))}else if("g"===n){var I=o.strokeForeground,u=o.fill,l=o.stroke;I&&l&&(o.stroke=null),i+=rd("path",e.attr(t,o,A.background,"bgrect"))+id("path"),i+=rd("g",e.attr(t,o,A.content))+e.markGroup(o)+id("g"),I&&l?(u&&(o.fill=null),o.stroke=l,i+=rd("path",e.attr(t,o,A.foreground,"bgrect"))+id("path"),u&&(o.fill=u)):i+=rd("path",e.attr(t,o,A.foreground,"bgfore"))+id("path")}i+=id(n),a&&(i+=id("a"))};return A.nested?t.items&&t.items.length&&o(t.items[0]):lu(t,o),i+id("g")},md.markGroup=function(t){var e=this,A="";return lu(t,(function(t){A+=e.mark(t)})),A};var wd={Canvas:"canvas",PNG:"png",SVG:"svg",None:"none"},Sd={};function Dd(t,e){return t=String(t||"").toLowerCase(),arguments.length>1?(Sd[t]=e,this):Sd[t]}function Rd(t,e,A){var n=[],r=(new wI).union(e),i=t.marktype;return i?Ud(t,r,A,n):"group"===i?Gd(t,r,A,n):Object(U.n)("Intersect scene must be mark node or group item.")}function Ud(t,e,A,n){if(function(t,e,A){return t.bounds&&e.intersects(t.bounds)&&("group"===t.marktype||!1!==t.interactive&&(!A||A(t)))}(t,e,A)){var r=t.items,i=t.marktype,o=r.length,a=0;if("group"===i)for(;a<o;++a)Gd(r[a],e,A,n);else for(var s=Bl[i].isect;a<o;++a){var g=r[a];Nd(g,e,s)&&n.push(g)}}return n}function Gd(t,e,A,n){A&&A(t.mark)&&Nd(t,e,Bl.group.isect)&&n.push(t);var r=t.items,i=r&&r.length;if(i){var o=t.x||0,a=t.y||0;e.translate(-o,-a);for(var s=0;s<i;++s)Ud(r[s],e,A,n);e.translate(o,a)}return n}function Nd(t,e,A){var n=t.bounds;return e.encloses(n)||e.intersects(n)&&A(t,e)}Sd.canvas=Sd.png={renderer:zl,headless:zl,handler:Zl},Sd.svg={renderer:gd,headless:vd,handler:eC},Sd.none={};var kd=new wI,xd=function(t){var e=t.clip;if(Object(U.D)(e))e(jI(kd.clear()));else{if(!e)return;kd.set(0,0,t.group.width,t.group.height)}t.bounds.intersect(kd)};function Od(t,e,A){return t===e||("path"===A?Md(t,e):t instanceof Date&&e instanceof Date?+t===+e:Object(U.E)(t)&&Object(U.E)(e)?Math.abs(t-e)<=1e-9:t&&e&&(Object(U.F)(t)||Object(U.F)(e))?null!=t&&null!=e&&function(t,e){var A,n,r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(r.sort(),i.sort(),n=r.length-1;n>=0;n--)if(r[n]!=i[n])return!1;for(n=r.length-1;n>=0;n--)if(A=r[n],!Od(t[A],e[A],A))return!1;return typeof t===typeof e}(t,e):t==e)}function Md(t,e){return Od(Qc(t),Qc(e))}function Ld(){bI(),dg=0}function _d(t){lo.call(this,null,t)}function Jd(t,e,A){return e(t.bounds.clear(),t,A)}Object(U.y)(_d,lo).transform=function(t,e){var A,n=e.dataflow,r=t.mark,i=r.marktype,o=Bl[i],a=o.bound,s=r.bounds;if(o.nested)r.items.length&&n.dirty(r.items[0]),s=Jd(r,a),r.items.forEach((function(t){t.bounds.clear().union(s)}));else if("group"===i||t.modified())switch(e.visit(e.MOD,(function(t){return n.dirty(t)})),s.clear(),r.items.forEach((function(t){return s.union(Jd(t,a))})),r.role){case"axis":case"legend":case"title":e.reflow()}else A=e.changed(e.REM),e.visit(e.ADD,(function(t){s.union(Jd(t,a))})),e.visit(e.MOD,(function(t){A=A||s.alignsWith(t.bounds),n.dirty(t),s.union(Jd(t,a))})),A&&(s.clear(),r.items.forEach((function(t){return s.union(t.bounds)})));return xd(r),e.modifies("bounds")};function Td(t){lo.call(this,0,t)}function jd(t){lo.call(this,null,t)}function Hd(t){lo.call(this,null,t)}Td.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},Object(U.y)(Td,lo).transform=function(t,e){var A=function(t){var e=t._signals[":vega_identifier:"];e||(t._signals[":vega_identifier:"]=e=t.add(0));return e}(e.dataflow),n=A.value,r=t.as;return e.visit(e.ADD,(function(t){t[r]||(t[r]=++n)})),A.set(this.value=n),e},Object(U.y)(jd,lo).transform=function(t,e){var A=this.value;A||((A=e.dataflow.scenegraph().mark(t.markdef,function(t){var e=t.groups,A=t.parent;return e&&1===e.size?e.get(Object.keys(e.object)[0]):e&&A?e.lookup(A):null}(t),t.index)).group.context=t.context,t.context.group||(t.context.group=A.group),A.source=this.source,A.clip=t.clip,A.interactive=t.interactive,this.value=A);var n="group"===A.marktype?RI:DI;return e.visit(e.ADD,(function(t){return n.call(t,A)})),(t.modified("clip")||t.modified("interactive"))&&(A.clip=t.clip,A.interactive=!!t.interactive,A.zdirty=!0,e.reflow()),A.items=e.source,e};var Yd=Object(U.y)(Hd,lo),Vd={parity:function(t){return t.filter((function(t,e){return e%2?t.opacity=0:1}))},greedy:function(t,e){var A;return t.filter((function(t,n){return n&&Zd(A.bounds,t.bounds,e)?t.opacity=0:(A=t,1)}))}};function Zd(t,e,A){return A>Math.max(e.x1-t.x2,t.x1-e.x2,e.y1-t.y2,t.y1-e.y2)}function Wd(t,e){for(var A,n=1,r=t.length,i=t[0].bounds;n<r;i=A,++n)if(Zd(i,A=t[n].bounds,e))return!0}function Kd(t){var e=t.bounds;return e.width()>1&&e.height()>1}function Pd(t){return t.forEach((function(t){return t.opacity=1})),t}function qd(t,e){return t.reflow(e.modified()).modifies("opacity")}function Xd(t){lo.call(this,null,t)}Yd.transform=function(t,e){var A,n,r,i=Vd[t.method]||Vd.parity,o=e.materialize(e.SOURCE).source,a=t.separation||0;if(o&&o.length){if(!t.method)return t.modified("method")&&(Pd(o),e=qd(e,t)),e;if((o=o.filter(Kd)).length){if(t.sort&&(o=o.slice().sort(t.sort)),A=Pd(o),e=qd(e,t),A.length>=3&&Wd(A,a)){do{A=i(A,a)}while(A.length>=3&&Wd(A,a));A.length<3&&!Object(U.U)(o).opacity&&(A.length>1&&(Object(U.U)(A).opacity=0),Object(U.U)(o).opacity=1)}return t.boundScale&&t.boundTolerance>=0&&(n=function(t,e,A){var n=t.range(),r=new wI;return e===lg||"bottom"===e?r.set(n[0],-1/0,n[1],1/0):r.set(-1/0,n[0],1/0,n[1]),r.expand(A||1),function(t){return r.encloses(t.bounds)}}(t.boundScale,t.boundOrient,+t.boundTolerance),o.forEach((function(t){n(t)||(t.opacity=0)}))),r=A[0].mark.bounds.clear(),o.forEach((function(t){t.opacity&&r.union(t.bounds)})),e}}},Object(U.y)(Xd,lo).transform=function(t,e){var A=e.dataflow;if(e.visit(e.ALL,(function(t){return A.dirty(t)})),e.fields&&e.fields.zindex){var n=e.source&&e.source[0];n&&(n.mark.zdirty=!0)}};var zd=new wI;function $d(t,e,A){return t[e]===A?0:(t[e]=A,1)}function tQ(t){var e=t.items[0].orient;return e===Cg||e===hg}function eQ(t,e,A,n){var r,i,o=e.items[0],a=o.datum,s=null!=o.translate?o.translate:.5,g=o.orient,c=function(t){var e=+t.grid;return[t.ticks?e++:-1,t.labels?e++:-1,e+ +t.domain]}(a),I=o.range,u=o.offset,l=o.position,C=o.minExtent,h=o.maxExtent,B=a.title&&o.items[c[2]].items[0],f=o.titlePadding,d=o.bounds,Q=B&&al(B),E=0,p=0;switch(zd.clear().union(d),d.clear(),(r=c[0])>-1&&d.union(o.items[r].bounds),(r=c[1])>-1&&d.union(o.items[r].bounds),g){case lg:E=l||0,p=-u,i=Math.max(C,Math.min(h,-d.y1)),d.add(0,-i).add(I,0),B&&AQ(t,B,i,f,Q,0,-1,d);break;case Cg:E=-u,p=l||0,i=Math.max(C,Math.min(h,-d.x1)),d.add(-i,0).add(0,I),B&&AQ(t,B,i,f,Q,1,-1,d);break;case hg:E=A+u,p=l||0,i=Math.max(C,Math.min(h,d.x2)),d.add(0,0).add(i,I),B&&AQ(t,B,i,f,Q,1,1,d);break;case"bottom":E=l||0,p=n+u,i=Math.max(C,Math.min(h,d.y2)),d.add(0,0).add(I,i),B&&AQ(t,B,i,f,0,0,1,d);break;default:E=o.x,p=o.y}return MI(d.translate(E,p),o),$d(o,"x",E+s)|$d(o,"y",p+s)&&(o.bounds=zd,t.dirty(o),o.bounds=d,t.dirty(o)),o.mark.bounds.clear().union(d)}function AQ(t,e,A,n,r,i,o,a){var s=e.bounds;if(e.auto){var g=o*(A+r+n),c=0,I=0;t.dirty(e),i?c=(e.x||0)-(e.x=g):I=(e.y||0)-(e.y=g),e.mark.bounds.clear().union(s.translate(-c,-I)),t.dirty(e)}a.union(s)}var nQ=function(t,e){return Math.floor(Math.min(t,e))},rQ=function(t,e){return Math.ceil(Math.max(t,e))};function iQ(t){return(new wI).set(0,0,t.width||0,t.height||0)}function oQ(t){var e=t.bounds.clone();return e.empty()?e.set(0,0,0,0):e.translate(-(t.x||0),-(t.y||0))}function aQ(t,e,A){var n=Object(U.F)(t)?t[e]:t;return null!=n?n:void 0!==A?A:0}function sQ(t){return t<0?Math.ceil(-t):0}function gQ(t,e,A){var n,r,i,o,a,s,g,c,I,u,l,C=!A.nodirty,h="flush"===A.bounds?iQ:oQ,B=zd.set(0,0,0,0),f=aQ(A.align,"column"),d=aQ(A.align,fg),Q=aQ(A.padding,"column"),E=aQ(A.padding,fg),p=A.columns||e.length,y=p<=0?1:Math.ceil(e.length/p),v=e.length,m=Array(v),b=Array(p),F=0,w=Array(v),S=Array(y),D=0,R=Array(v),U=Array(v),G=Array(v);for(r=0;r<p;++r)b[r]=0;for(r=0;r<y;++r)S[r]=0;for(r=0;r<v;++r)s=e[r],a=G[r]=h(s),s.x=s.x||0,R[r]=0,s.y=s.y||0,U[r]=0,i=r%p,o=~~(r/p),F=Math.max(F,g=Math.ceil(a.x2)),D=Math.max(D,c=Math.ceil(a.y2)),b[i]=Math.max(b[i],g),S[o]=Math.max(S[o],c),m[r]=Q+sQ(a.x1),w[r]=E+sQ(a.y1),C&&t.dirty(e[r]);for(r=0;r<v;++r)r%p===0&&(m[r]=0),r<p&&(w[r]=0);if("each"===f)for(i=1;i<p;++i){for(l=0,r=i;r<v;r+=p)l<m[r]&&(l=m[r]);for(r=i;r<v;r+=p)m[r]=l+b[i-1]}else if("all"===f){for(l=0,r=0;r<v;++r)r%p&&l<m[r]&&(l=m[r]);for(r=0;r<v;++r)r%p&&(m[r]=l+F)}else for(f=!1,i=1;i<p;++i)for(r=i;r<v;r+=p)m[r]+=b[i-1];if("each"===d)for(o=1;o<y;++o){for(l=0,n=(r=o*p)+p;r<n;++r)l<w[r]&&(l=w[r]);for(r=o*p;r<n;++r)w[r]=l+S[o-1]}else if("all"===d){for(l=0,r=p;r<v;++r)l<w[r]&&(l=w[r]);for(r=p;r<v;++r)w[r]=l+D}else for(d=!1,o=1;o<y;++o)for(n=(r=o*p)+p;r<n;++r)w[r]+=S[o-1];for(I=0,r=0;r<v;++r)I=m[r]+(r%p?I:0),R[r]+=I-e[r].x;for(i=0;i<p;++i)for(u=0,r=i;r<v;r+=p)u+=w[r],U[r]+=u-e[r].y;if(f&&aQ(A.center,"column")&&y>1)for(r=0;r<v;++r)(I=(a="all"===f?F:b[r%p])-G[r].x2-e[r].x-R[r])>0&&(R[r]+=I/2);if(d&&aQ(A.center,fg)&&1!==p)for(r=0;r<v;++r)(u=(a="all"===d?D:S[~~(r/p)])-G[r].y2-e[r].y-U[r])>0&&(U[r]+=u/2);for(r=0;r<v;++r)B.union(G[r].translate(R[r],U[r]));switch(I=aQ(A.anchor,"x"),u=aQ(A.anchor,"y"),aQ(A.anchor,"column")){case Bg:I-=B.width();break;case"middle":I-=B.width()/2}switch(aQ(A.anchor,fg)){case Bg:u-=B.height();break;case"middle":u-=B.height()/2}for(I=Math.round(I),u=Math.round(u),B.clear(),r=0;r<v;++r)e[r].mark.bounds.clear();for(r=0;r<v;++r)(s=e[r]).x+=R[r]+=I,s.y+=U[r]+=u,B.union(s.mark.bounds.union(s.bounds.translate(R[r],U[r]))),C&&t.dirty(s);return B}function cQ(t,e,A){var n,r,i,o,a,s,g,c=function(t){for(var e,A,n,r,i,o,a,s=t.items,g=s.length,c=0,I={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};c<g;++c)if(a=(o=s[c]).items,"group"===o.marktype)switch(o.role){case"axis":case"legend":case"title":break;case"row-header":(e=I.rowheaders).push.apply(e,Object(p.a)(a));break;case"row-footer":(A=I.rowfooters).push.apply(A,Object(p.a)(a));break;case"column-header":(n=I.colheaders).push.apply(n,Object(p.a)(a));break;case"column-footer":(r=I.colfooters).push.apply(r,Object(p.a)(a));break;case"row-title":I.rowtitle=a[0];break;case"column-title":I.coltitle=a[0];break;default:(i=I.marks).push.apply(i,Object(p.a)(a))}return I}(e),I=c.marks,u="flush"===A.bounds?IQ:uQ,l=A.offset,C=A.columns||I.length,h=C<=0?1:Math.ceil(I.length/C),B=h*C,f=gQ(t,I,A);f.empty()&&f.set(0,0,0,0),c.rowheaders&&(s=aQ(A.headerBand,fg,null),n=lQ(t,c.rowheaders,I,C,h,-aQ(l,"rowHeader"),nQ,0,u,"x1",0,C,1,s)),c.colheaders&&(s=aQ(A.headerBand,"column",null),r=lQ(t,c.colheaders,I,C,C,-aQ(l,"columnHeader"),nQ,1,u,"y1",0,1,C,s)),c.rowfooters&&(s=aQ(A.footerBand,fg,null),i=lQ(t,c.rowfooters,I,C,h,aQ(l,"rowFooter"),rQ,0,u,"x2",C-1,C,1,s)),c.colfooters&&(s=aQ(A.footerBand,"column",null),o=lQ(t,c.colfooters,I,C,C,aQ(l,"columnFooter"),rQ,1,u,"y2",B-C,1,C,s)),c.rowtitle&&(a=aQ(A.titleAnchor,fg),g=aQ(l,"rowTitle"),g=a===Bg?i+g:n-g,s=aQ(A.titleBand,fg,.5),CQ(t,c.rowtitle,g,0,f,s)),c.coltitle&&(a=aQ(A.titleAnchor,"column"),g=aQ(l,"columnTitle"),g=a===Bg?o+g:r-g,s=aQ(A.titleBand,"column",.5),CQ(t,c.coltitle,g,1,f,s))}function IQ(t,e){return"x1"===e?t.x||0:"y1"===e?t.y||0:"x2"===e?(t.x||0)+(t.width||0):"y2"===e?(t.y||0)+(t.height||0):void 0}function uQ(t,e){return t.bounds[e]}function lQ(t,e,A,n,r,i,o,a,s,g,c,I,u,l){var C,h,B,f,d,Q,E,p,y,v=A.length,m=0,b=0;if(!v)return m;for(C=c;C<v;C+=I)A[C]&&(m=o(m,s(A[C],g)));if(!e.length)return m;for(e.length>r&&(t.warn("Grid headers exceed limit: "+r),e=e.slice(0,r)),m+=i,h=0,f=e.length;h<f;++h)t.dirty(e[h]),e[h].mark.bounds.clear();for(C=c,h=0,f=e.length;h<f;++h,C+=I){for(d=(Q=e[h]).mark.bounds,B=C;B>=0&&null==(E=A[B]);B-=u);a?(p=null==l?E.x:Math.round(E.bounds.x1+l*E.bounds.width()),y=m):(p=m,y=null==l?E.y:Math.round(E.bounds.y1+l*E.bounds.height())),d.union(Q.bounds.translate(p-(Q.x||0),y-(Q.y||0))),Q.x=p,Q.y=y,t.dirty(Q),b=o(b,d[g])}return b}function CQ(t,e,A,n,r,i){if(e){t.dirty(e);var o=A,a=A;n?o=Math.round(r.x1+i*r.width()):a=Math.round(r.y1+i*r.height()),e.bounds.translate(o-(e.x||0),a-(e.y||0)),e.mark.bounds.clear().union(e.bounds),e.x=o,e.y=a,t.dirty(e)}}function hQ(t,e,A,n,r,i,o){var a=function(t,e){var A=t[e]||{};return function(e,n){return null!=A[e]?A[e]:null!=t[e]?t[e]:n}}(A,e),s=function(t,e){var A=-1/0;return t.forEach((function(t){null!=t.offset&&(A=Math.max(A,t.offset))})),A>-1/0?A:e}(t,a("offset",0)),g=a("anchor","start"),c=g===Bg?1:"middle"===g?.5:0,I={align:"each",bounds:a("bounds","flush"),columns:"vertical"===a("direction")?1:t.length,padding:a("margin",8),center:a("center"),nodirty:!0};switch(e){case Cg:I.anchor={x:Math.floor(n.x1)-s,column:Bg,y:c*(o||n.height()+2*n.y1),row:g};break;case hg:I.anchor={x:Math.ceil(n.x2)+s,y:c*(o||n.height()+2*n.y1),row:g};break;case lg:I.anchor={y:Math.floor(r.y1)-s,row:Bg,x:c*(i||r.width()+2*r.x1),column:g};break;case"bottom":I.anchor={y:Math.ceil(r.y2)+s,x:c*(i||r.width()+2*r.x1),column:g};break;case"top-left":I.anchor={x:s,y:s};break;case"top-right":I.anchor={x:i-s,y:s,column:Bg};break;case"bottom-left":I.anchor={x:s,y:o-s,row:Bg};break;case"bottom-right":I.anchor={x:i-s,y:o-s,column:Bg,row:Bg}}return I}function BQ(t,e){var A,n,r=e.items[0],i=r.datum,o=r.orient,a=r.bounds,s=r.x,g=r.y;return r._bounds?r._bounds.clear().union(a):r._bounds=a.clone(),a.clear(),function(t,e,A){var n=e.padding,r=n-A.x,i=n-A.y;if(e.datum.title){var o=e.items[1].items[0],a=o.anchor,s=e.titlePadding||0,g=n-o.x,c=n-o.y;switch(o.orient){case Cg:r+=Math.ceil(o.bounds.width())+s;break;case hg:case"bottom":break;default:i+=o.bounds.height()+s}switch((r||i)&&dQ(t,A,r,i),o.orient){case Cg:c+=fQ(e,A,o,a,1,1);break;case hg:g+=fQ(e,A,o,Bg,0,0)+s,c+=fQ(e,A,o,a,1,1);break;case"bottom":g+=fQ(e,A,o,a,0,0),c+=fQ(e,A,o,Bg,-1,0,1)+s;break;default:g+=fQ(e,A,o,a,0,0)}(g||c)&&dQ(t,o,g,c),(g=Math.round(o.bounds.x1-n))<0&&(dQ(t,A,-g,0),dQ(t,o,-g,0))}else(r||i)&&dQ(t,A,r,i)}(t,r,r.items[0].items[0]),a=function(t,e){return t.items.forEach((function(t){return e.union(t.bounds)})),e.x1=t.padding,e.y1=t.padding,e}(r,a),A=2*r.padding,n=2*r.padding,a.empty()||(A=Math.ceil(a.width()+A),n=Math.ceil(a.height()+n)),"symbol"===i.type&&function(t){var e=t.reduce((function(t,e){return t[e.column]=Math.max(e.bounds.x2-e.x,t[e.column]||0),t}),{});t.forEach((function(t){t.width=e[t.column],t.height=t.bounds.y2-t.y}))}(r.items[0].items[0].items[0].items),"none"!==o&&(r.x=s=0,r.y=g=0),r.width=A,r.height=n,MI(a.set(s,g,s+A,g+n),r),r.mark.bounds.clear().union(a),r}function fQ(t,e,A,n,r,i,o){var a="symbol"!==t.datum.type,s=A.datum.vgrad,g=(!a||!i&&s||o?e:e.items[0]).bounds[r?"y2":"x2"]-t.padding,c=s&&i?g:0,I=s&&i?0:g,u=r<=0?0:al(A);return Math.round("start"===n?c:n===Bg?I-u:.5*(g-u))}function dQ(t,e,A,n){e.x+=A,e.y+=n,e.bounds.translate(A,n),e.mark.bounds.translate(A,n),t.dirty(e)}function QQ(t){lo.call(this,null,t)}function EQ(t){lo.call(this,null,t)}function pQ(t){lo.call(this,null,t)}function yQ(){return Gt({})}function vQ(t){lo.call(this,null,t)}function mQ(t){lo.call(this,[],t)}Object(U.y)(QQ,lo).transform=function(t,e){var A,n=e.dataflow;return t.mark.items.forEach((function(e){t.layout&&cQ(n,e,t.layout),function(t,e,A){var n,r,i,o,a,s=e.items,g=Math.max(0,e.width||0),c=Math.max(0,e.height||0),I=(new wI).set(0,0,g,c),u=I.clone(),l=I.clone(),C=[];for(o=0,a=s.length;o<a;++o)switch((r=s[o]).role){case"axis":(tQ(r)?u:l).union(eQ(t,r,g,c));break;case"title":n=r;break;case"legend":C.push(BQ(t,r));break;case"frame":case"scope":case"row-header":case"row-footer":case"row-title":case"column-header":case"column-footer":case"column-title":u.union(r.bounds),l.union(r.bounds);break;default:I.union(r.bounds)}if(C.length){var h={};for(var B in C.forEach((function(t){"none"!==(i=t.orient||hg)&&(h[i]||(h[i]=[])).push(t)})),h){var f=h[B];gQ(t,f,hQ(f,B,A.legends,u,l,g,c))}C.forEach((function(e){var n=e.bounds;if(n.equals(e._bounds)||(e.bounds=e._bounds,t.dirty(e),e.bounds=n,t.dirty(e)),A.autosize&&"fit"===A.autosize.type)switch(e.orient){case Cg:case hg:I.add(n.x1,0).add(n.x2,0);break;case lg:case"bottom":I.add(0,n.y1).add(0,n.y2)}else I.union(n)}))}I.union(u).union(l),n&&I.union(function(t,e,A,n,r){var i,o=e.items[0],a=o.frame,s=o.orient,g=o.anchor,c=o.offset,I=o.padding,u=o.items[0].items[0],l=o.items[1]&&o.items[1].items[0],C=s===Cg||s===hg?n:A,h=0,B=0,f=0,d=0,Q=0;if("group"!==a?s===Cg?(h=r.y2,C=r.y1):s===hg?(h=r.y1,C=r.y2):(h=r.x1,C=r.x2):s===Cg&&(h=n,C=0),i="start"===g?h:g===Bg?C:(h+C)/2,l&&l.text){switch(s){case lg:case"bottom":Q=u.bounds.height()+I;break;case Cg:d=u.bounds.width()+I;break;case hg:d=-u.bounds.width()-I}zd.clear().union(l.bounds),zd.translate(d-(l.x||0),Q-(l.y||0)),$d(l,"x",d)|$d(l,"y",Q)&&(t.dirty(l),l.bounds.clear().union(zd),l.mark.bounds.clear().union(zd),t.dirty(l)),zd.clear().union(l.bounds)}else zd.clear();switch(zd.union(u.bounds),s){case lg:B=i,f=r.y1-zd.height()-c;break;case Cg:B=r.x1-zd.width()-c,f=i;break;case hg:B=r.x2+zd.width()+c,f=i;break;case"bottom":B=i,f=r.y2+c;break;default:B=o.x,f=o.y}return $d(o,"x",B)|$d(o,"y",f)&&(zd.translate(B,f),t.dirty(o),o.bounds.clear().union(zd),e.bounds.clear().union(zd),t.dirty(o)),o.bounds}(t,n,g,c,I));e.clip&&I.set(0,0,e.width||0,e.height||0);!function(t,e,A,n){var r=n.autosize||{},i=r.type;if(t._autosize<1||!i)return;var o=t._width,a=t._height,s=Math.max(0,e.width||0),g=Math.max(0,Math.ceil(-A.x1)),c=Math.max(0,Math.ceil(A.x2-s)),I=Math.max(0,e.height||0),u=Math.max(0,Math.ceil(-A.y1)),l=Math.max(0,Math.ceil(A.y2-I));if("padding"===r.contains){var C=t.padding();o-=C.left+C.right,a-=C.top+C.bottom}"none"===i?(g=0,u=0,s=o,I=a):"fit"===i?(s=Math.max(0,o-g-c),I=Math.max(0,a-u-l)):"fit-x"===i?(s=Math.max(0,o-g-c),a=I+u+l):"fit-y"===i?(o=s+g+c,I=Math.max(0,a-u-l)):"pad"===i&&(o=s+g+c,a=I+u+l);t._resizeView(o,a,s,I,[g,u],r.resize)}(t,e,I,A)}(n,e,t)})),(A=t.mark.group)&&"legend-entry"!==A.mark.role?e.reflow():e},Object(U.y)(EQ,lo).transform=function(t,e){if(this.value&&!t.modified())return e.StopPropagation;var A=e.dataflow.locale(),n=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=this.value,i=t.scale,o=Of(i,null==t.count?t.values?t.values.length:10:t.count,t.minstep),a=t.format||_f(A,i,o,t.formatSpecifier,t.formatType,!!t.values),s=t.values?Mf(i,t.values,o):Lf(i,o);return r&&(n.rem=r),r=s.map((function(t,e){return Gt({index:e/(s.length-1||1),value:t,label:a(t)})})),t.extra&&r.length&&r.push(Gt({index:-1,extra:{value:r[0].value},label:""})),n.source=r,n.add=r,this.value=r,n},Object(U.y)(pQ,lo).transform=function(t,e){var A=e.dataflow,n=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=t.item||yQ,i=t.key||Rt,o=this.value;return Object(U.A)(n.encode)&&(n.encode=null),o&&(t.modified("key")||e.modified(i))&&Object(U.n)("DataJoin does not support modified key function or fields."),o||(e=e.addAll(),this.value=o=function(t){var e=Object(U.s)().test((function(t){return t.exit}));return e.lookup=function(A){return e.get(t(A))},e}(i)),e.visit(e.ADD,(function(t){var e=i(t),A=o.get(e);A?A.exit?(o.empty--,n.add.push(A)):n.mod.push(A):(A=r(t),o.set(e,A),n.add.push(A)),A.datum=t,A.exit=!1})),e.visit(e.MOD,(function(t){var e=i(t),A=o.get(e);A&&(A.datum=t,n.mod.push(A))})),e.visit(e.REM,(function(t){var e=i(t),A=o.get(e);t!==A.datum||A.exit||(n.rem.push(A),A.exit=!0,++o.empty)})),e.changed(e.ADD_MOD)&&n.modifies("datum"),(e.clean()||t.clean&&o.empty>A.cleanThreshold)&&A.runAfter(o.clean),n},Object(U.y)(vQ,lo).transform=function(t,e){var A=e.fork(e.ADD_REM),n=t.mod||!1,r=t.encoders,i=e.encode;if(Object(U.A)(i)){if(!A.changed()&&!i.every((function(t){return r[t]})))return e.StopPropagation;i=i[0],A.encode=null}var o="enter"===i,a=r.update||U.r,s=r.enter||U.r,g=r.exit||U.r,c=(i&&!o?r[i]:a)||U.r;if(e.changed(e.ADD)&&(e.visit(e.ADD,(function(e){s(e,t),a(e,t)})),A.modifies(s.output),A.modifies(a.output),c!==U.r&&c!==a&&(e.visit(e.ADD,(function(e){c(e,t)})),A.modifies(c.output))),e.changed(e.REM)&&g!==U.r&&(e.visit(e.REM,(function(e){g(e,t)})),A.modifies(g.output)),o||c!==U.r){var I=e.MOD|(t.modified()?e.REFLOW:0);o?(e.visit(I,(function(e){var r=s(e,t)||n;(c(e,t)||r)&&A.mod.push(e)})),A.mod.length&&A.modifies(s.output)):e.visit(I,(function(e){(c(e,t)||n)&&A.mod.push(e)})),A.mod.length&&A.modifies(c.output)}return A.changed()?A:e.StopPropagation},Object(U.y)(mQ,lo).transform=function(t,e){if(null!=this.value&&!t.modified())return e.StopPropagation;var A,n,r,i,o,a=e.dataflow.locale(),s=e.fork(e.NO_SOURCE|e.NO_FIELDS),g=this.value,c=t.type||"symbol",I=t.scale,u=+t.limit,l=Of(I,null==t.count?5:t.count,t.minstep),C=!!t.values||"symbol"===c,h=t.format||Yf(a,I,l,c,t.formatSpecifier,t.formatType,C),B=t.values||Hf(I,l);return g&&(s.rem=g),"symbol"===c?(u&&B.length>u?(e.dataflow.warn("Symbol legend count exceeds limit, filtering items."),g=B.slice(0,u-1),o=!0):g=B,Object(U.D)(r=t.size)?(t.values||0!==I(g[0])||(g=g.slice(1)),i=g.reduce((function(e,A){return Math.max(e,r(A,t))}),0)):r=Object(U.l)(i=r||8),g=g.map((function(e,A){return Gt({index:A,label:h(e,A,g),value:e,offset:i,size:r(e,t)})})),o&&(o=B[g.length],g.push(Gt({index:g.length,label:"\u2026".concat(B.length-g.length," entries"),value:o,offset:i,size:r(o,t)})))):"gradient"===c?(A=I.domain(),n=bf(I,A[0],Object(U.U)(A)),B.length<3&&!t.values&&A[0]!==Object(U.U)(A)&&(B=[A[0],Object(U.U)(A)]),g=B.map((function(t,e){return Gt({index:e,label:h(t,e,B),value:t,perc:n(t)})}))):(r=B.length-1,n=function(t){var e=t.domain(),A=e.length-1,n=+e[0],r=+Object(U.U)(e),i=r-n;if("threshold"===t.type){var o=A?i/A:.1;i=(r+=o)-(n-=o)}return function(t){return(t-n)/i}}(I),g=B.map((function(t,e){return Gt({index:e,label:h(t,e,B),value:t,perc:e?n(t):0,perc2:e===r?1:n(B[e+1])})}))),s.source=g,s.add=g,this.value=g,s};var bQ=Object(U.s)({line:UQ,"line-radial":function(t,e,A,n){return UQ(e*Math.cos(t),e*Math.sin(t),n*Math.cos(A),n*Math.sin(A))},arc:GQ,"arc-radial":function(t,e,A,n){return GQ(e*Math.cos(t),e*Math.sin(t),n*Math.cos(A),n*Math.sin(A))},curve:NQ,"curve-radial":function(t,e,A,n){return NQ(e*Math.cos(t),e*Math.sin(t),n*Math.cos(A),n*Math.sin(A))},"orthogonal-horizontal":function(t,e,A,n){return"M"+t+","+e+"V"+n+"H"+A},"orthogonal-vertical":function(t,e,A,n){return"M"+t+","+e+"H"+A+"V"+n},"orthogonal-radial":function(t,e,A,n){var r=Math.cos(t),i=Math.sin(t),o=Math.cos(A),a=Math.sin(A),s=Math.abs(A-t)>Math.PI?A<=t:A>t;return"M"+e*r+","+e*i+"A"+e+","+e+" 0 0,"+(s?1:0)+" "+e*o+","+e*a+"L"+n*o+","+n*a},"diagonal-horizontal":function(t,e,A,n){var r=(t+A)/2;return"M"+t+","+e+"C"+r+","+e+" "+r+","+n+" "+A+","+n},"diagonal-vertical":function(t,e,A,n){var r=(e+n)/2;return"M"+t+","+e+"C"+t+","+r+" "+A+","+r+" "+A+","+n},"diagonal-radial":function(t,e,A,n){var r=Math.cos(t),i=Math.sin(t),o=Math.cos(A),a=Math.sin(A),s=(e+n)/2;return"M"+e*r+","+e*i+"C"+s*r+","+s*i+" "+s*o+","+s*a+" "+n*o+","+n*a}});function FQ(t){return t.source.x}function wQ(t){return t.source.y}function SQ(t){return t.target.x}function DQ(t){return t.target.y}function RQ(t){lo.call(this,{},t)}function UQ(t,e,A,n){return"M"+t+","+e+"L"+A+","+n}function GQ(t,e,A,n){var r=A-t,i=n-e,o=Math.sqrt(r*r+i*i)/2;return"M"+t+","+e+"A"+o+","+o+" "+180*Math.atan2(i,r)/Math.PI+" 0 1 "+A+","+n}function NQ(t,e,A,n){var r=A-t,i=n-e,o=.2*(r+i),a=.2*(i-r);return"M"+t+","+e+"C"+(t+o)+","+(e+a)+" "+(A+a)+","+(n-o)+" "+A+","+n}RQ.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(U.y)(RQ,lo).transform=function(t,e){var A=t.sourceX||FQ,n=t.sourceY||wQ,r=t.targetX||SQ,i=t.targetY||DQ,o=t.as||"path",a=t.orient||"vertical",s=t.shape||"line",g=bQ.get(s+"-"+a)||bQ.get(s);return g||Object(U.n)("LinkPath unsupported type: "+t.shape+(t.orient?"-"+t.orient:"")),e.visit(e.SOURCE,(function(t){t[o]=g(A(t),n(t),r(t),i(t))})),e.reflow(t.modified()).modifies(o)};var kQ=function(t,e,A){t=+t,e=+e,A=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+A;for(var n=-1,r=0|Math.max(0,Math.ceil((e-t)/A)),i=new Array(r);++n<r;)i[n]=t+n*A;return i};function xQ(t){lo.call(this,null,t)}xQ.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(U.y)(xQ,lo).transform=function(t,e){var A,n,r,i=t.as||["startAngle","endAngle"],o=i[0],a=i[1],s=t.field||U.O,g=t.startAngle||0,c=null!=t.endAngle?t.endAngle:2*Math.PI,I=e.source,u=I.map(s),l=u.length,C=g,h=(c-g)/function(t,e){var A=0;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i=+i)&&(A+=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;(g=+e(g,++a,t))&&(A+=g)}}catch(c){s.e(c)}finally{s.f()}}return A}(u),B=kQ(l);for(t.sort&&B.sort((function(t,e){return u[t]-u[e]})),A=0;A<l;++A)r=u[B[A]],(n=I[B[A]])[o]=C,n[a]=C+=r*h;return this.value=u,e.reflow(t.modified()).modifies(i)};function OQ(t){return yB(t)&&"sequential"!==t}var MQ=Object(U.db)(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma"]);function LQ(t){lo.call(this,null,t),this.modified(!0)}function _Q(t,e,A){bB(t)&&(Math.abs(e.reduce((function(t,e){return t+(e<0?-1:e>0?1:0)}),0))!==e.length&&A.warn("Log scale domain includes zero: "+Object(U.Z)(e)));return e}function JQ(t,e,A){return Object(U.D)(t)&&(e||A)?yf(t,TQ(e||[0,1],A)):t}function TQ(t,e){return e?t.slice().reverse():t}function jQ(t){lo.call(this,null,t)}Object(U.y)(LQ,lo).transform=function(t,e){var A=e.dataflow,n=this.value,r=function(t){var e,A=t.type,n="";if("sequential"===A)return"sequential-linear";(function(t){var e=t.type;return yB(e)&&e!==oC&&e!==aC&&(t.scheme||t.range&&t.range.length&&t.range.every(U.H))})(t)&&(e=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(null!=t.domainMid):0,n=2===e?"sequential-":3===e?"diverging-":"");return(n+A||"linear").toLowerCase()}(t);for(r in n&&r===n.type||(this.value=n=QB(r)()),t)if(!MQ[r]){if("padding"===r&&OQ(n.type))continue;Object(U.D)(n[r])?n[r](t[r]):A.warn("Unsupported scale property: "+r)}return function(t,e,A){var n=t.type,r=e.round||!1,i=e.range;if(null!=e.rangeStep)i=function(t,e,A){"band"!==t&&"point"!==t&&Object(U.n)("Only band and point scales support rangeStep.");var n=(null!=e.paddingOuter?e.paddingOuter:e.padding)||0,r="point"===t?1:(null!=e.paddingInner?e.paddingInner:e.padding)||0;return[0,e.rangeStep*rC(A,r,n)]}(n,e,A);else if(e.scheme&&(i=function(t,e,A){var n,r,i=e.schemeExtent;Object(U.A)(e.scheme)?r=vf(e.scheme,e.interpolate,e.interpolateGamma):(n=e.scheme.toLowerCase(),(r=Rf(n))||Object(U.n)("Unrecognized scheme name: ".concat(e.scheme)));return A="threshold"===t?A+1:"bin-ordinal"===t?A-1:"quantile"===t||"quantize"===t?+e.schemeCount||5:A,FB(t)?JQ(r,i,e.reverse):Object(U.D)(r)?mf(JQ(r,i),A):"ordinal"===t?r:r.slice(0,A)}(n,e,A),Object(U.D)(i))){if(t.interpolator)return t.interpolator(i);Object(U.n)("Scale type ".concat(n," does not support interpolating color schemes."))}if(i&&FB(n))return t.interpolator(vf(TQ(i,e.reverse),e.interpolate,e.interpolateGamma));i&&e.interpolate&&t.interpolate?t.interpolate(Ff(e.interpolate,e.interpolateGamma)):Object(U.D)(t.round)?t.round(r):Object(U.D)(t.rangeRound)&&t.interpolate(r?Sh:wh);i&&t.range(TQ(i,e.reverse))}(n,t,function(t,e,A){var n=e.bins;if(n&&!Object(U.A)(n)){var r=t.domain(),i=r[0],o=Object(U.U)(r),a=null==n.start?i:n.start,s=null==n.stop?o:n.stop,g=n.step;g||Object(U.n)("Scale bins parameter missing step property."),a<i&&(a=g*Math.ceil(i/g)),s>o&&(s=g*Math.floor(o/g)),n=kQ(a,s+g/2,g)}n?t.bins=n:t.bins&&delete t.bins;"bin-ordinal"===t.type&&(n?e.domain||e.domainRaw||(t.domain(n),A=n.length):t.bins=t.domain());return A}(n,t,function(t,e,A){var n=function(t,e,A){return e?(t.domain(_Q(t.type,e,A)),e.length):-1}(t,e.domainRaw,A);if(n>-1)return n;var r,i,o=e.domain,a=t.type,s=e.zero||void 0===e.zero&&function(t){var e=t.type;return!t.bins&&("linear"===e||"pow"===e||"sqrt"===e)}(t);if(!o)return 0;OQ(a)&&e.padding&&o[0]!==Object(U.U)(o)&&(o=function(t,e,A,n,r,i){var o=Math.abs(Object(U.U)(A)-A[0]),a=o/(o-2*n),s=t===iC?Object(U.mb)(e,null,a):"sqrt"===t?Object(U.nb)(e,null,a,.5):"pow"===t?Object(U.nb)(e,null,a,r||1):"symlog"===t?Object(U.ob)(e,null,a,i||1):Object(U.lb)(e,null,a);return(e=e.slice())[0]=s[0],e[e.length-1]=s[1],e}(a,o,e.range,e.padding,e.exponent,e.constant));if((s||null!=e.domainMin||null!=e.domainMax||null!=e.domainMid)&&(r=(o=o.slice()).length-1||1,s&&(o[0]>0&&(o[0]=0),o[r]<0&&(o[r]=0)),null!=e.domainMin&&(o[0]=e.domainMin),null!=e.domainMax&&(o[r]=e.domainMax),null!=e.domainMid)){var g=(i=e.domainMid)>o[r]?r+1:i<o[0]?0:r;g!==r&&A.warn("Scale domainMid exceeds domain min or max.",i),o.splice(g,0,i)}t.domain(_Q(a,o,A)),"ordinal"===a&&t.unknown(e.domainImplicit?BC:void 0);e.nice&&t.nice&&t.nice(!0!==e.nice&&Of(t,e.nice)||null);return o.length}(n,t,A))),e.fork(e.NO_SOURCE|e.NO_FIELDS)},Object(U.y)(jQ,lo).transform=function(t,e){var A=t.modified("sort")||e.changed(e.ADD)||e.modified(t.sort.fields)||e.modified("datum");return A&&e.source.sort(Ot(t.sort)),this.modified(A),e};var HQ=["y0","y1"];function YQ(t){lo.call(this,null,t)}function VQ(t,e,A,n,r){for(var i,o=(e-t.sum)/2,a=t.length,s=0;s<a;++s)(i=t[s])[n]=o,i[r]=o+=Math.abs(A(i))}function ZQ(t,e,A,n,r){for(var i,o=1/t.sum,a=0,s=t.length,g=0,c=0;g<s;++g)(i=t[g])[n]=a,i[r]=a=o*(c+=Math.abs(A(i)))}function WQ(t,e,A,n,r){for(var i,o,a=0,s=0,g=t.length,c=0;c<g;++c)(i=+A(o=t[c]))<0?(o[n]=s,o[r]=s+=i):(o[n]=a,o[r]=a+=i)}function KQ(t,e){var A;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;null!=i&&(A<i||void 0===A&&i>=i)&&(A=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;null!=(g=e(g,++a,t))&&(A<g||void 0===A&&g>=g)&&(A=g)}}catch(c){s.e(c)}finally{s.f()}}return A}function PQ(){}YQ.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:HQ}]},Object(U.y)(YQ,lo).transform=function(t,e){var A,n,r,i,o=t.as||HQ,a=o[0],s=o[1],g=Ot(t.sort),c=t.field||U.O,I="center"===t.offset?VQ:"normalize"===t.offset?ZQ:WQ;for(A=function(t,e,A,n){var r,i,o,a,s,g,c,I,u,l=[],C=function(t){return t(s)};if(null==e)l.push(t.slice());else for(r={},i=0,o=t.length;i<o;++i)s=t[i],g=e.map(C),(c=r[g])||(r[g]=c=[],l.push(c)),c.push(s);for(g=0,u=0,a=l.length;g<a;++g){for(c=l[g],i=0,I=0,o=c.length;i<o;++i)I+=Math.abs(n(c[i]));c.sum=I,I>u&&(u=I),A&&c.sort(A)}return l.max=u,l}(e.source,t.groupby,g,c),n=0,r=A.length,i=A.max;n<r;++n)I(A[n],i,c,a,s);return e.reflow(t.modified()).modifies(o)};var qQ=[[],[[[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]]],[]],XQ=function(){var t=1,e=1,A=o;function n(t,e){return e.map((function(e){return r(t,e)}))}function r(n,r){var o=[],a=[];return function(A,n,r){var o,a,s,g,c,I,u=new Array,l=new Array;o=a=-1,g=A[0]>=n,qQ[g<<1].forEach(C);for(;++o<t-1;)s=g,g=A[o+1]>=n,qQ[s|g<<1].forEach(C);qQ[g<<0].forEach(C);for(;++a<e-1;){for(o=-1,g=A[a*t+t]>=n,c=A[a*t]>=n,qQ[g<<1|c<<2].forEach(C);++o<t-1;)s=g,g=A[a*t+t+o+1]>=n,I=c,c=A[a*t+o+1]>=n,qQ[s|g<<1|c<<2|I<<3].forEach(C);qQ[g|c<<3].forEach(C)}o=-1,c=A[a*t]>=n,qQ[c<<2].forEach(C);for(;++o<t-1;)I=c,c=A[a*t+o+1]>=n,qQ[c<<2|I<<3].forEach(C);function C(t){var e,A,n=[t[0][0]+o,t[0][1]+a],s=[t[1][0]+o,t[1][1]+a],g=i(n),c=i(s);(e=l[g])?(A=u[c])?(delete l[e.end],delete u[A.start],e===A?(e.ring.push(s),r(e.ring)):u[e.start]=l[A.end]={start:e.start,end:A.end,ring:e.ring.concat(A.ring)}):(delete l[e.end],e.ring.push(s),l[e.end=c]=e):(e=u[c])?(A=l[g])?(delete u[e.start],delete l[A.end],e===A?(e.ring.push(s),r(e.ring)):u[A.start]=l[e.end]={start:A.start,end:e.end,ring:A.ring.concat(e.ring)}):(delete u[e.start],e.ring.unshift(n),u[e.start=g]=e):u[g]=l[c]={start:g,end:c,ring:[n,s]}}qQ[c<<3].forEach(C)}(n,r,(function(t){A(t,n,r),function(t){var e=0,A=t.length,n=t[A-1][1]*t[0][0]-t[A-1][0]*t[0][1];for(;++e<A;)n+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return n}(t)>0?o.push([t]):a.push(t)})),a.forEach((function(t){for(var e,A=0,n=o.length;A<n;++A)if(-1!==zQ((e=o[A])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:r,coordinates:o}}function i(e){return 2*e[0]+e[1]*(t+1)*4}function o(A,n,r){A.forEach((function(A){var i,o=A[0],a=A[1],s=0|o,g=0|a,c=n[g*t+s];o>0&&o<t&&s===o&&(i=n[g*t+s-1],A[0]=o+(r-i)/(c-i)-.5),a>0&&a<e&&g===a&&(i=n[(g-1)*t+s],A[1]=a+(r-i)/(c-i)-.5)}))}return n.contour=r,n.size=function(A){if(!arguments.length)return[t,e];var r=Math.floor(A[0]),i=Math.floor(A[1]);return r>=0&&i>=0||Object(U.n)("invalid size"),t=r,e=i,n},n.smooth=function(t){return arguments.length?(A=t?o:PQ,n):A===o},n};function zQ(t,e){for(var A,n=-1,r=e.length;++n<r;)if(A=$Q(t,e[n]))return A;return 0}function $Q(t,e){for(var A=e[0],n=e[1],r=-1,i=0,o=t.length,a=o-1;i<o;a=i++){var s=t[i],g=s[0],c=s[1],I=t[a],u=I[0],l=I[1];if(tE(s,I,e))return 0;c>n!==l>n&&A<(u-g)*(n-c)/(l-c)+g&&(r=-r)}return r}function tE(t,e,A){var n,r,i,o;return function(t,e,A){return(e[0]-t[0])*(A[1]-t[1])===(A[0]-t[0])*(e[1]-t[1])}(t,e,A)&&(r=t[n=+(t[0]===e[0])],i=A[n],o=e[n],r<=i&&i<=o||o<=i&&i<=r)}var eE=Math.sqrt(50),AE=Math.sqrt(10),nE=Math.sqrt(2);var rE=function(t,e,A){return function(n){var r=Object(U.p)(n),i=A?Math.min(r[0],0):r[0],o=r[1],a=o-i,s=e?function(t,e,A){var n=Math.abs(e-t)/Math.max(0,A),r=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/r;return i>=eE?r*=10:i>=AE?r*=5:i>=nE&&(r*=2),e<t?-r:r}(i,o,t):a/(t+1);return function(t,e,A){t=+t,e=+e,A=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+A;for(var n=-1,r=0|Math.max(0,Math.ceil((e-t)/A)),i=new Array(r);++n<r;)i[n]=t+n*A;return i}(s,o,s)}};function iE(t){lo.call(this,null,t)}function oE(t,e,A,n,r){var i=t.x1||0,o=t.y1||0,a=e*A<0;function s(t){t.forEach(g)}function g(t){a&&t.reverse(),t.forEach(c)}function c(t){t[0]=(t[0]-i)*e+n,t[1]=(t[1]-o)*A+r}return function(t){return t.coordinates.forEach(s),t}}function aE(t,e,A){var n=t>=0?t:Vo(e,A);return Math.round((Math.sqrt(4*n*n+1)-1)/2)}function sE(t){return Object(U.D)(t)?t:Object(U.l)(+t)}iE.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(U.y)(iE,lo).transform=function(t,e){if(this.value&&!e.changed()&&!t.modified())return e.StopPropagation;var A=e.fork(e.NO_SOURCE|e.NO_FIELDS),n=e.materialize(e.SOURCE).source,r=t.field||U.x,i=XQ().smooth(!1!==t.smooth),o=t.thresholds||function(t,e,A){var n=rE(A.levels||10,A.nice,!1!==A.zero);return"shared"!==A.resolve?n:n(t.map((function(t){return KQ(e(t).values)})))}(n,r,t),a=null===t.as?null:t.as||"contour",s=[];return n.forEach((function(e){var A=r(e),n=i.size([A.width,A.height])(A.values,Object(U.A)(o)?o:o(A.values));!function(t,e,A,n){var r=n.scale||e.scale,i=n.translate||e.translate;Object(U.D)(r)&&(r=r(A,n));Object(U.D)(i)&&(i=i(A,n));if((1===r||null==r)&&!i)return;var o=(Object(U.E)(r)?r:r[0])||1,a=(Object(U.E)(r)?r:r[1])||1,s=i&&i[0]||0,g=i&&i[1]||0;t.forEach(oE(e,o,a,s,g))}(n,A,e,t),n.forEach((function(t){s.push(kt(e,Gt(null!=a?Object(E.a)({},a,t):t)))}))})),this.value&&(A.rem=this.value),this.value=A.source=A.add=s,A};var gE=function(){var t=function(t){return t[0]},e=function(t){return t[1]},A=U.O,n=[-1,-1],r=960,i=500,o=2;function a(a,s){var g=aE(n[0],a,t)>>o,c=aE(n[1],a,e)>>o,I=g?g+2:0,u=c?c+2:0,l=2*I+(r>>o),C=2*u+(i>>o),h=new Float32Array(l*C),B=new Float32Array(l*C),f=h;a.forEach((function(n){var r=I+(+t(n)>>o),i=u+(+e(n)>>o);r>=0&&r<l&&i>=0&&i<C&&(h[r+i*l]+=+A(n))})),g>0&&c>0?(cE(l,C,h,B,g),IE(l,C,B,h,c),cE(l,C,h,B,g),IE(l,C,B,h,c),cE(l,C,h,B,g),IE(l,C,B,h,c)):g>0?(cE(l,C,h,B,g),cE(l,C,B,h,g),cE(l,C,h,B,g),f=B):c>0&&(IE(l,C,h,B,c),IE(l,C,B,h,c),IE(l,C,h,B,c),f=B);for(var d=s?Math.pow(2,-2*o):1/function(t,e){var A=0;if(void 0===e){var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i=+i)&&(A+=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(R.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;(g=+e(g,++a,t))&&(A+=g)}}catch(c){s.e(c)}finally{s.f()}}return A}(f),Q=0,E=l*C;Q<E;++Q)f[Q]*=d;return{values:f,scale:1<<o,width:l,height:C,x1:I,y1:u,x2:I+(r>>o),y2:u+(i>>o)}}return a.x=function(e){return arguments.length?(t=sE(e),a):t},a.y=function(t){return arguments.length?(e=sE(t),a):e},a.weight=function(t){return arguments.length?(A=sE(t),a):A},a.size=function(t){if(!arguments.length)return[r,i];var e=+t[0],A=+t[1];return e>=0&&A>=0||Object(U.n)("invalid size"),r=e,i=A,a},a.cellSize=function(t){return arguments.length?((t=+t)>=1||Object(U.n)("invalid cell size"),o=Math.floor(Math.log(t)/Math.LN2),a):1<<o},a.bandwidth=function(t){return arguments.length?(1===(t=Object(U.i)(t)).length&&(t=[+t[0],+t[0]]),2!==t.length&&Object(U.n)("invalid bandwidth"),n=t,a):n},a};function cE(t,e,A,n,r){for(var i=1+(r<<1),o=0;o<e;++o)for(var a=0,s=0;a<t+r;++a)a<t&&(s+=A[a+o*t]),a>=r&&(a>=i&&(s-=A[a-i+o*t]),n[a-r+o*t]=s/Math.min(a+1,t-1+i-a,i))}function IE(t,e,A,n,r){for(var i=1+(r<<1),o=0;o<t;++o)for(var a=0,s=0;a<e+r;++a)a<e&&(s+=A[o+a*t]),a>=r&&(a>=i&&(s-=A[o+(a-i)*t]),n[o+(a-r)*t]=s/Math.min(a+1,e-1+i-a,i))}function uE(t){lo.call(this,null,t)}uE.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 lE=Object(U.y)(uE,lo),CE=["x","y","weight","size","cellSize","bandwidth"];function hE(t,e){return CE.forEach((function(A){return null!=e[A]?t[A](e[A]):0})),t}function BE(t){lo.call(this,null,t)}lE.transform=function(t,e){if(this.value&&!e.changed()&&!t.modified())return e.StopPropagation;var A,n=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=function(t,e){var A,n,r,i,o,a,s=[],g=function(t){return t(i)};if(null==e)s.push(t);else for(A={},n=0,r=t.length;n<r;++n)i=t[n],o=e.map(g),(a=A[o])||(A[o]=a=[],a.dims=o,s.push(a)),a.push(i);return s}(e.materialize(e.SOURCE).source,t.groupby),i=(t.groupby||[]).map(U.h),o=hE(gE(),t),a=t.as||"grid";return A=r.map((function(e){return Gt(function(t,e){for(var A=0;A<i.length;++A)t[i[A]]=e[A];return t}(Object(E.a)({},a,o(e,t.counts)),e.dims))})),this.value&&(n.rem=this.value),this.value=n.source=n.add=A,n},BE.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(U.y)(BE,lo).transform=function(t,e){if(this.value&&!e.changed()&&!t.modified())return e.StopPropagation;var A,n,r=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=XQ().smooth(!1!==t.smooth),o=t.values,a=t.thresholds||rE(t.count||10,t.nice,!!o),s=t.size;return o||(o=e.materialize(e.SOURCE).source,n=oE(A=hE(gE(),t)(o,!0),A.scale||1,A.scale||1,0,0),s=[A.width,A.height],o=A.values),a=Object(U.A)(a)?a:a(o),o=i.size(s)(o,a),n&&o.forEach(n),this.value&&(r.rem=this.value),this.value=r.source=r.add=(o||[]).map(Gt),r};function fE(t){lo.call(this,null,t)}fE.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},Object(U.y)(fE,lo).transform=function(t,e){var A,n=this._features,r=this._points,i=t.fields,o=i&&i[0],a=i&&i[1],s=t.geojson||!i&&U.x,g=e.ADD;A=t.modified()||e.changed(e.REM)||e.modified(Object(U.g)(s))||o&&e.modified(Object(U.g)(o))||a&&e.modified(Object(U.g)(a)),this.value&&!A||(g=e.SOURCE,this._features=n=[],this._points=r=[]),s&&e.visit(g,(function(t){n.push(s(t))})),o&&a&&(e.visit(g,(function(t){var e=o(t),A=a(t);null!=e&&null!=A&&(e=+e)===e&&(A=+A)===A&&r.push([e,A])})),n=n.concat({type:"Feature",geometry:{type:"MultiPoint",coordinates:r}})),this.value={type:"FeatureCollection",features:n}};var dE=function(t){return t};function QE(t,e){t&&pE.hasOwnProperty(t.type)&&pE[t.type](t,e)}var EE={Feature:function(t,e){QE(t.geometry,e)},FeatureCollection:function(t,e){for(var A=t.features,n=-1,r=A.length;++n<r;)QE(A[n].geometry,e)}},pE={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)t=A[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){yE(t.coordinates,e,0)},MultiLineString:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)yE(A[n],e,0)},Polygon:function(t,e){vE(t.coordinates,e)},MultiPolygon:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)vE(A[n],e)},GeometryCollection:function(t,e){for(var A=t.geometries,n=-1,r=A.length;++n<r;)QE(A[n],e)}};function yE(t,e,A){var n,r=-1,i=t.length-A;for(e.lineStart();++r<i;)n=t[r],e.point(n[0],n[1],n[2]);e.lineEnd()}function vE(t,e){var A=-1,n=t.length;for(e.polygonStart();++A<n;)yE(t[A],e,1);e.polygonEnd()}var mE=function(t,e){t&&EE.hasOwnProperty(t.type)?EE[t.type](t,e):QE(t,e)},bE=function(){return new FE};function FE(){this.reset()}FE.prototype={constructor:FE,reset:function(){this.s=this.t=0},add:function(t){SE(wE,t,this.t),SE(this,wE.s,this.s),this.s?this.t+=wE.t:this.s=wE.t},valueOf:function(){return this.s}};var wE=new FE;function SE(t,e,A){var n=t.s=e+A,r=n-e,i=n-r;t.t=e-i+(A-r)}var DE=Math.PI,RE=DE/2,UE=DE/4,GE=2*DE,NE=180/DE,kE=DE/180,xE=Math.abs,OE=Math.atan,ME=Math.atan2,LE=Math.cos,_E=(Math.ceil,Math.exp),JE=(Math.floor,Math.log),TE=Math.pow,jE=Math.sin,HE=Math.sign||function(t){return t>0?1:t<0?-1:0},YE=Math.sqrt,VE=Math.tan;function ZE(t){return t>1?0:t<-1?DE:Math.acos(t)}function WE(t){return t>1?RE:t<-1?-RE:Math.asin(t)}function KE(){}var PE,qE,XE,zE,$E=bE(),tp=bE(),ep={point:KE,lineStart:KE,lineEnd:KE,polygonStart:function(){ep.lineStart=Ap,ep.lineEnd=ip},polygonEnd:function(){ep.lineStart=ep.lineEnd=ep.point=KE,$E.add(xE(tp)),tp.reset()},result:function(){var t=$E/2;return $E.reset(),t}};function Ap(){ep.point=np}function np(t,e){ep.point=rp,PE=XE=t,qE=zE=e}function rp(t,e){tp.add(zE*t-XE*e),XE=t,zE=e}function ip(){rp(PE,qE)}var op=ep,ap=1/0,sp=ap,gp=-ap,cp=gp;var Ip,up,lp,Cp,hp={point:function(t,e){t<ap&&(ap=t);t>gp&&(gp=t);e<sp&&(sp=e);e>cp&&(cp=e)},lineStart:KE,lineEnd:KE,polygonStart:KE,polygonEnd:KE,result:function(){var t=[[ap,sp],[gp,cp]];return gp=cp=-(sp=ap=1/0),t}},Bp=0,fp=0,dp=0,Qp=0,Ep=0,pp=0,yp=0,vp=0,mp=0,bp={point:Fp,lineStart:wp,lineEnd:Rp,polygonStart:function(){bp.lineStart=Up,bp.lineEnd=Gp},polygonEnd:function(){bp.point=Fp,bp.lineStart=wp,bp.lineEnd=Rp},result:function(){var t=mp?[yp/mp,vp/mp]:pp?[Qp/pp,Ep/pp]:dp?[Bp/dp,fp/dp]:[NaN,NaN];return Bp=fp=dp=Qp=Ep=pp=yp=vp=mp=0,t}};function Fp(t,e){Bp+=t,fp+=e,++dp}function wp(){bp.point=Sp}function Sp(t,e){bp.point=Dp,Fp(lp=t,Cp=e)}function Dp(t,e){var A=t-lp,n=e-Cp,r=YE(A*A+n*n);Qp+=r*(lp+t)/2,Ep+=r*(Cp+e)/2,pp+=r,Fp(lp=t,Cp=e)}function Rp(){bp.point=Fp}function Up(){bp.point=Np}function Gp(){kp(Ip,up)}function Np(t,e){bp.point=kp,Fp(Ip=lp=t,up=Cp=e)}function kp(t,e){var A=t-lp,n=e-Cp,r=YE(A*A+n*n);Qp+=r*(lp+t)/2,Ep+=r*(Cp+e)/2,pp+=r,yp+=(r=Cp*t-lp*e)*(lp+t),vp+=r*(Cp+e),mp+=3*r,Fp(lp=t,Cp=e)}var xp=bp;function Op(t){this._context=t}Op.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,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(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,GE)}},result:KE};var Mp,Lp,_p,Jp,Tp,jp=bE(),Hp={point:KE,lineStart:function(){Hp.point=Yp},lineEnd:function(){Mp&&Vp(Lp,_p),Hp.point=KE},polygonStart:function(){Mp=!0},polygonEnd:function(){Mp=null},result:function(){var t=+jp;return jp.reset(),t}};function Yp(t,e){Hp.point=Vp,Lp=Jp=t,_p=Tp=e}function Vp(t,e){Jp-=t,Tp-=e,jp.add(YE(Jp*Jp+Tp*Tp)),Jp=t,Tp=e}var Zp=Hp;function Wp(){this._string=[]}function Kp(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Wp.prototype={_radius:4.5,_circle:Kp(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,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(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Kp(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Pp=function(t,e){var A,n,r=4.5;function i(t){return t&&("function"===typeof r&&n.pointRadius(+r.apply(this,arguments)),mE(t,A(n))),n.result()}return i.area=function(t){return mE(t,A(op)),op.result()},i.measure=function(t){return mE(t,A(Zp)),Zp.result()},i.bounds=function(t){return mE(t,A(hp)),hp.result()},i.centroid=function(t){return mE(t,A(xp)),xp.result()},i.projection=function(e){return arguments.length?(A=null==e?(t=null,dE):(t=e).stream,i):t},i.context=function(t){return arguments.length?(n=null==t?(e=null,new Wp):new Op(e=t),"function"!==typeof r&&n.pointRadius(r),i):e},i.pointRadius=function(t){return arguments.length?(r="function"===typeof t?t:(n.pointRadius(+t),+t),i):r},i.projection(t).context(e)},qp=function(){var t,e=[];return{point:function(e,A,n){t.push([e,A,n])},lineStart:function(){e.push(t=[])},lineEnd:KE,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var A=e;return e=[],t=null,A}}},Xp=function(t,e){return xE(t[0]-e[0])<1e-6&&xE(t[1]-e[1])<1e-6};function zp(t,e,A,n){this.x=t,this.z=e,this.o=A,this.e=n,this.v=!1,this.n=this.p=null}var $p=function(t,e,A,n,r){var i,o,a=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,A,n=t[0],o=t[e];if(Xp(n,o)){if(!n[2]&&!o[2]){for(r.lineStart(),i=0;i<e;++i)r.point((n=t[i])[0],n[1]);return void r.lineEnd()}o[0]+=2e-6}a.push(A=new zp(n,t,null,!0)),s.push(A.o=new zp(n,null,A,!1)),a.push(A=new zp(o,t,null,!1)),s.push(A.o=new zp(o,null,A,!0))}})),a.length){for(s.sort(e),ty(a),ty(s),i=0,o=s.length;i<o;++i)s[i].e=A=!A;for(var g,c,I=a[0];;){for(var u=I,l=!0;u.v;)if((u=u.n)===I)return;g=u.z,r.lineStart();do{if(u.v=u.o.v=!0,u.e){if(l)for(i=0,o=g.length;i<o;++i)r.point((c=g[i])[0],c[1]);else n(u.x,u.n.x,1,r);u=u.n}else{if(l)for(g=u.p.z,i=g.length-1;i>=0;--i)r.point((c=g[i])[0],c[1]);else n(u.x,u.p.x,-1,r);u=u.p}g=(u=u.o).z,l=!l}while(!u.v);r.lineEnd()}}};function ty(t){if(e=t.length){for(var e,A,n=0,r=t[0];++n<e;)r.n=A=t[n],A.p=r,r=A;r.n=A=t[0],A.p=r}}function ey(t){return[ME(t[1],t[0]),WE(t[2])]}function Ay(t){var e=t[0],A=t[1],n=LE(A);return[n*LE(e),n*jE(e),jE(A)]}function ny(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ry(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function iy(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function oy(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ay(t){var e=YE(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var sy=bE();function gy(t){return xE(t[0])<=DE?t[0]:HE(t[0])*((xE(t[0])+DE)%GE-DE)}var cy=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var Iy=function(t){var e;return 1===t.length&&(e=t,t=function(t,A){return cy(e(t),A)}),{left:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)<0?n=i+1:r=i}return n},right:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)>0?r=i:n=i+1}return n}}}(cy);Iy.right,Iy.left;var uy=Array.prototype;uy.slice,uy.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var ly=function(t){for(var e,A,n,r=t.length,i=-1,o=0;++i<r;)o+=t[i].length;for(A=new Array(o);--r>=0;)for(e=(n=t[r]).length;--e>=0;)A[--o]=n[e];return A};var Cy=function(t,e,A,n){return function(r){var i,o,a,s=e(r),g=qp(),c=e(g),I=!1,u={point:l,lineStart:h,lineEnd:B,polygonStart:function(){u.point=f,u.lineStart=d,u.lineEnd=Q,o=[],i=[]},polygonEnd:function(){u.point=l,u.lineStart=h,u.lineEnd=B,o=ly(o);var t=function(t,e){var A=gy(e),n=e[1],r=jE(n),i=[jE(A),-LE(A),0],o=0,a=0;sy.reset(),1===r?n=RE+1e-6:-1===r&&(n=-RE-1e-6);for(var s=0,g=t.length;s<g;++s)if(I=(c=t[s]).length)for(var c,I,u=c[I-1],l=gy(u),C=u[1]/2+UE,h=jE(C),B=LE(C),f=0;f<I;++f,l=Q,h=p,B=y,u=d){var d=c[f],Q=gy(d),E=d[1]/2+UE,p=jE(E),y=LE(E),v=Q-l,m=v>=0?1:-1,b=m*v,F=b>DE,w=h*p;if(sy.add(ME(w*m*jE(b),B*y+w*LE(b))),o+=F?v+m*GE:v,F^l>=A^Q>=A){var S=ry(Ay(u),Ay(d));ay(S);var D=ry(i,S);ay(D);var R=(F^v>=0?-1:1)*WE(D[2]);(n>R||n===R&&(S[0]||S[1]))&&(a+=F^v>=0?1:-1)}}return(o<-1e-6||o<1e-6&&sy<-1e-6)^1&a}(i,n);o.length?(I||(r.polygonStart(),I=!0),$p(o,By,t,A,r)):t&&(I||(r.polygonStart(),I=!0),r.lineStart(),A(null,null,1,r),r.lineEnd()),I&&(r.polygonEnd(),I=!1),o=i=null},sphere:function(){r.polygonStart(),r.lineStart(),A(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function l(e,A){t(e,A)&&r.point(e,A)}function C(t,e){s.point(t,e)}function h(){u.point=C,s.lineStart()}function B(){u.point=l,s.lineEnd()}function f(t,e){a.push([t,e]),c.point(t,e)}function d(){c.lineStart(),a=[]}function Q(){f(a[0][0],a[0][1]),c.lineEnd();var t,e,A,n,s=c.clean(),u=g.result(),l=u.length;if(a.pop(),i.push(a),a=null,l)if(1&s){if((e=(A=u[0]).length-1)>0){for(I||(r.polygonStart(),I=!0),r.lineStart(),t=0;t<e;++t)r.point((n=A[t])[0],n[1]);r.lineEnd()}}else l>1&&2&s&&u.push(u.pop().concat(u.shift())),o.push(u.filter(hy))}return u}};function hy(t){return t.length>1}function By(t,e){return((t=t.x)[0]<0?t[1]-RE-1e-6:RE-t[1])-((e=e.x)[0]<0?e[1]-RE-1e-6:RE-e[1])}var fy=Cy((function(){return!0}),(function(t){var e,A=NaN,n=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,o){var a=i>0?DE:-DE,s=xE(i-A);xE(s-DE)<1e-6?(t.point(A,n=(n+o)/2>0?RE:-RE),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(a,n),t.point(i,n),e=0):r!==a&&s>=DE&&(xE(A-r)<1e-6&&(A-=1e-6*r),xE(i-a)<1e-6&&(i-=1e-6*a),n=function(t,e,A,n){var r,i,o=jE(t-A);return xE(o)>1e-6?OE((jE(e)*(i=LE(n))*jE(A)-jE(n)*(r=LE(e))*jE(t))/(r*i*o)):(e+n)/2}(A,n,i,o),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(a,n),e=0),t.point(A=i,n=o),r=a},lineEnd:function(){t.lineEnd(),A=n=NaN},clean:function(){return 2-e}}}),(function(t,e,A,n){var r;if(null==t)r=A*RE,n.point(-DE,r),n.point(0,r),n.point(DE,r),n.point(DE,0),n.point(DE,-r),n.point(0,-r),n.point(-DE,-r),n.point(-DE,0),n.point(-DE,r);else if(xE(t[0]-e[0])>1e-6){var i=t[0]<e[0]?DE:-DE;r=A*i/2,n.point(-i,r),n.point(0,r),n.point(i,r)}else n.point(e[0],e[1])}),[-DE,-RE]);var dy=function(t,e){function A(A,n){return A=t(A,n),e(A[0],A[1])}return t.invert&&e.invert&&(A.invert=function(A,n){return(A=e.invert(A,n))&&t.invert(A[0],A[1])}),A};function Qy(t,e){return[xE(t)>DE?t+Math.round(-t/GE)*GE:t,e]}function Ey(t,e,A){return(t%=GE)?e||A?dy(yy(t),vy(e,A)):yy(t):e||A?vy(e,A):Qy}function py(t){return function(e,A){return[(e+=t)>DE?e-GE:e<-DE?e+GE:e,A]}}function yy(t){var e=py(t);return e.invert=py(-t),e}function vy(t,e){var A=LE(t),n=jE(t),r=LE(e),i=jE(e);function o(t,e){var o=LE(e),a=LE(t)*o,s=jE(t)*o,g=jE(e),c=g*A+a*n;return[ME(s*r-c*i,a*A-g*n),WE(c*r+s*i)]}return o.invert=function(t,e){var o=LE(e),a=LE(t)*o,s=jE(t)*o,g=jE(e),c=g*r-s*i;return[ME(s*r+g*i,a*A+c*n),WE(c*A-a*n)]},o}Qy.invert=Qy;function my(t,e,A,n,r,i){if(A){var o=LE(e),a=jE(e),s=n*A;null==r?(r=e+n*GE,i=e-s/2):(r=by(o,r),i=by(o,i),(n>0?r<i:r>i)&&(r+=n*GE));for(var g,c=r;n>0?c>i:c<i;c-=s)g=ey([o,-a*LE(c),-a*jE(c)]),t.point(g[0],g[1])}}function by(t,e){(e=Ay(e))[0]-=t,ay(e);var A=ZE(-e[1]);return((-e[2]<0?-A:A)+GE-1e-6)%GE}var Fy=function(t){var e=LE(t),A=6*kE,n=e>0,r=xE(e)>1e-6;function i(t,A){return LE(t)*LE(A)>e}function o(t,A,n){var r=[1,0,0],i=ry(Ay(t),Ay(A)),o=ny(i,i),a=i[0],s=o-a*a;if(!s)return!n&&t;var g=e*o/s,c=-e*a/s,I=ry(r,i),u=oy(r,g);iy(u,oy(i,c));var l=I,C=ny(u,l),h=ny(l,l),B=C*C-h*(ny(u,u)-1);if(!(B<0)){var f=YE(B),d=oy(l,(-C-f)/h);if(iy(d,u),d=ey(d),!n)return d;var Q,E=t[0],p=A[0],y=t[1],v=A[1];p<E&&(Q=E,E=p,p=Q);var m=p-E,b=xE(m-DE)<1e-6;if(!b&&v<y&&(Q=y,y=v,v=Q),b||m<1e-6?b?y+v>0^d[1]<(xE(d[0]-E)<1e-6?y:v):y<=d[1]&&d[1]<=v:m>DE^(E<=d[0]&&d[0]<=p)){var F=oy(l,(-C+f)/h);return iy(F,u),[d,ey(F)]}}}function a(e,A){var r=n?t:DE-t,i=0;return e<-r?i|=1:e>r&&(i|=2),A<-r?i|=4:A>r&&(i|=8),i}return Cy(i,(function(t){var e,A,s,g,c;return{lineStart:function(){g=s=!1,c=1},point:function(I,u){var l,C=[I,u],h=i(I,u),B=n?h?0:a(I,u):h?a(I+(I<0?DE:-DE),u):0;if(!e&&(g=s=h)&&t.lineStart(),h!==s&&(!(l=o(e,C))||Xp(e,l)||Xp(C,l))&&(C[2]=1),h!==s)c=0,h?(t.lineStart(),l=o(C,e),t.point(l[0],l[1])):(l=o(e,C),t.point(l[0],l[1],2),t.lineEnd()),e=l;else if(r&&e&&n^h){var f;B&A||!(f=o(C,e,!0))||(c=0,n?(t.lineStart(),t.point(f[0][0],f[0][1]),t.point(f[1][0],f[1][1]),t.lineEnd()):(t.point(f[1][0],f[1][1]),t.lineEnd(),t.lineStart(),t.point(f[0][0],f[0][1],3)))}!h||e&&Xp(e,C)||t.point(C[0],C[1]),e=C,s=h,A=B},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(g&&s)<<1}}}),(function(e,n,r,i){my(i,t,A,r,e,n)}),n?[0,-t]:[-DE,t-DE])};function wy(t,e,A,n){function r(r,i){return t<=r&&r<=A&&e<=i&&i<=n}function i(r,i,a,g){var c=0,I=0;if(null==r||(c=o(r,a))!==(I=o(i,a))||s(r,i)<0^a>0)do{g.point(0===c||3===c?t:A,c>1?n:e)}while((c=(c+a+4)%4)!==I);else g.point(i[0],i[1])}function o(n,r){return xE(n[0]-t)<1e-6?r>0?0:3:xE(n[0]-A)<1e-6?r>0?2:1:xE(n[1]-e)<1e-6?r>0?1:0:r>0?3:2}function a(t,e){return s(t.x,e.x)}function s(t,e){var A=o(t,1),n=o(e,1);return A!==n?A-n:0===A?e[1]-t[1]:1===A?t[0]-e[0]:2===A?t[1]-e[1]:e[0]-t[0]}return function(o){var s,g,c,I,u,l,C,h,B,f,d,Q=o,E=qp(),p={point:y,lineStart:function(){p.point=v,g&&g.push(c=[]);f=!0,B=!1,C=h=NaN},lineEnd:function(){s&&(v(I,u),l&&B&&E.rejoin(),s.push(E.result()));p.point=y,B&&Q.lineEnd()},polygonStart:function(){Q=E,s=[],g=[],d=!0},polygonEnd:function(){var e=function(){for(var e=0,A=0,r=g.length;A<r;++A)for(var i,o,a=g[A],s=1,c=a.length,I=a[0],u=I[0],l=I[1];s<c;++s)i=u,o=l,I=a[s],u=I[0],l=I[1],o<=n?l>n&&(u-i)*(n-o)>(l-o)*(t-i)&&++e:l<=n&&(u-i)*(n-o)<(l-o)*(t-i)&&--e;return e}(),A=d&&e,r=(s=ly(s)).length;(A||r)&&(o.polygonStart(),A&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),r&&$p(s,a,e,i,o),o.polygonEnd());Q=o,s=g=c=null}};function y(t,e){r(t,e)&&Q.point(t,e)}function v(i,o){var a=r(i,o);if(g&&c.push([i,o]),f)I=i,u=o,l=a,f=!1,a&&(Q.lineStart(),Q.point(i,o));else if(a&&B)Q.point(i,o);else{var s=[C=Math.max(-1e9,Math.min(1e9,C)),h=Math.max(-1e9,Math.min(1e9,h))],E=[i=Math.max(-1e9,Math.min(1e9,i)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,A,n,r,i){var o,a=t[0],s=t[1],g=0,c=1,I=e[0]-a,u=e[1]-s;if(o=A-a,I||!(o>0)){if(o/=I,I<0){if(o<g)return;o<c&&(c=o)}else if(I>0){if(o>c)return;o>g&&(g=o)}if(o=r-a,I||!(o<0)){if(o/=I,I<0){if(o>c)return;o>g&&(g=o)}else if(I>0){if(o<g)return;o<c&&(c=o)}if(o=n-s,u||!(o>0)){if(o/=u,u<0){if(o<g)return;o<c&&(c=o)}else if(u>0){if(o>c)return;o>g&&(g=o)}if(o=i-s,u||!(o<0)){if(o/=u,u<0){if(o>c)return;o>g&&(g=o)}else if(u>0){if(o<g)return;o<c&&(c=o)}return g>0&&(t[0]=a+g*I,t[1]=s+g*u),c<1&&(e[0]=a+c*I,e[1]=s+c*u),!0}}}}}(s,E,t,e,A,n)?a&&(Q.lineStart(),Q.point(i,o),d=!1):(B||(Q.lineStart(),Q.point(s[0],s[1])),Q.point(E[0],E[1]),a||Q.lineEnd(),d=!1)}C=i,h=o,B=a}return p}}function Sy(t){return function(e){var A=new Dy;for(var n in t)A[n]=t[n];return A.stream=e,A}}function Dy(){}function Ry(t,e,A){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),mE(A,t.stream(hp)),e(hp.result()),null!=n&&t.clipExtent(n),t}function Uy(t,e,A){return Ry(t,(function(A){var n=e[1][0]-e[0][0],r=e[1][1]-e[0][1],i=Math.min(n/(A[1][0]-A[0][0]),r/(A[1][1]-A[0][1])),o=+e[0][0]+(n-i*(A[1][0]+A[0][0]))/2,a=+e[0][1]+(r-i*(A[1][1]+A[0][1]))/2;t.scale(150*i).translate([o,a])}),A)}function Gy(t,e,A){return Uy(t,[[0,0],e],A)}function Ny(t,e,A){return Ry(t,(function(A){var n=+e,r=n/(A[1][0]-A[0][0]),i=(n-r*(A[1][0]+A[0][0]))/2,o=-r*A[0][1];t.scale(150*r).translate([i,o])}),A)}function ky(t,e,A){return Ry(t,(function(A){var n=+e,r=n/(A[1][1]-A[0][1]),i=-r*A[0][0],o=(n-r*(A[1][1]+A[0][1]))/2;t.scale(150*r).translate([i,o])}),A)}Dy.prototype={constructor:Dy,point:function(t,e){this.stream.point(t,e)},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 xy=LE(30*kE),Oy=function(t,e){return+e?function(t,e){function A(n,r,i,o,a,s,g,c,I,u,l,C,h,B){var f=g-n,d=c-r,Q=f*f+d*d;if(Q>4*e&&h--){var E=o+u,p=a+l,y=s+C,v=YE(E*E+p*p+y*y),m=WE(y/=v),b=xE(xE(y)-1)<1e-6||xE(i-I)<1e-6?(i+I)/2:ME(p,E),F=t(b,m),w=F[0],S=F[1],D=w-n,R=S-r,U=d*D-f*R;(U*U/Q>e||xE((f*D+d*R)/Q-.5)>.3||o*u+a*l+s*C<xy)&&(A(n,r,i,o,a,s,w,S,b,E/=v,p/=v,y,h,B),B.point(w,S),A(w,S,b,E,p,y,g,c,I,u,l,C,h,B))}}return function(e){var n,r,i,o,a,s,g,c,I,u,l,C,h={point:B,lineStart:f,lineEnd:Q,polygonStart:function(){e.polygonStart(),h.lineStart=E},polygonEnd:function(){e.polygonEnd(),h.lineStart=f}};function B(A,n){A=t(A,n),e.point(A[0],A[1])}function f(){c=NaN,h.point=d,e.lineStart()}function d(n,r){var i=Ay([n,r]),o=t(n,r);A(c,I,g,u,l,C,c=o[0],I=o[1],g=n,u=i[0],l=i[1],C=i[2],16,e),e.point(c,I)}function Q(){h.point=B,e.lineEnd()}function E(){f(),h.point=p,h.lineEnd=y}function p(t,e){d(n=t,e),r=c,i=I,o=u,a=l,s=C,h.point=d}function y(){A(c,I,g,u,l,C,r,i,n,o,a,s,16,e),h.lineEnd=Q,Q()}return h}}(t,e):function(t){return Sy({point:function(e,A){e=t(e,A),this.stream.point(e[0],e[1])}})}(t)};var My=Sy({point:function(t,e){this.stream.point(t*kE,e*kE)}});function Ly(t,e,A,n,r){function i(i,o){return[e+t*(i*=n),A-t*(o*=r)]}return i.invert=function(i,o){return[(i-e)/t*n,(A-o)/t*r]},i}function _y(t,e,A,n,r,i){var o=LE(i),a=jE(i),s=o*t,g=a*t,c=o/t,I=a/t,u=(a*A-o*e)/t,l=(a*e+o*A)/t;function C(t,i){return[s*(t*=n)-g*(i*=r)+e,A-g*t-s*i]}return C.invert=function(t,e){return[n*(c*t-I*e+u),r*(l-I*t-c*e)]},C}function Jy(t){return Ty((function(){return t}))()}function Ty(t){var e,A,n,r,i,o,a,s,g,c,I=150,u=480,l=250,C=0,h=0,B=0,f=0,d=0,Q=0,E=1,p=1,y=null,v=fy,m=null,b=dE,F=.5;function w(t){return s(t[0]*kE,t[1]*kE)}function S(t){return(t=s.invert(t[0],t[1]))&&[t[0]*NE,t[1]*NE]}function D(){var t=_y(I,0,0,E,p,Q).apply(null,e(C,h)),n=(Q?_y:Ly)(I,u-t[0],l-t[1],E,p,Q);return A=Ey(B,f,d),a=dy(e,n),s=dy(A,a),o=Oy(a,F),R()}function R(){return g=c=null,w}return w.stream=function(t){return g&&c===t?g:g=My(function(t){return Sy({point:function(e,A){var n=t(e,A);return this.stream.point(n[0],n[1])}})}(A)(v(o(b(c=t)))))},w.preclip=function(t){return arguments.length?(v=t,y=void 0,R()):v},w.postclip=function(t){return arguments.length?(b=t,m=n=r=i=null,R()):b},w.clipAngle=function(t){return arguments.length?(v=+t?Fy(y=t*kE):(y=null,fy),R()):y*NE},w.clipExtent=function(t){return arguments.length?(b=null==t?(m=n=r=i=null,dE):wy(m=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),R()):null==m?null:[[m,n],[r,i]]},w.scale=function(t){return arguments.length?(I=+t,D()):I},w.translate=function(t){return arguments.length?(u=+t[0],l=+t[1],D()):[u,l]},w.center=function(t){return arguments.length?(C=t[0]%360*kE,h=t[1]%360*kE,D()):[C*NE,h*NE]},w.rotate=function(t){return arguments.length?(B=t[0]%360*kE,f=t[1]%360*kE,d=t.length>2?t[2]%360*kE:0,D()):[B*NE,f*NE,d*NE]},w.angle=function(t){return arguments.length?(Q=t%360*kE,D()):Q*NE},w.reflectX=function(t){return arguments.length?(E=t?-1:1,D()):E<0},w.reflectY=function(t){return arguments.length?(p=t?-1:1,D()):p<0},w.precision=function(t){return arguments.length?(o=Oy(a,F=t*t),R()):YE(F)},w.fitExtent=function(t,e){return Uy(w,t,e)},w.fitSize=function(t,e){return Gy(w,t,e)},w.fitWidth=function(t,e){return Ny(w,t,e)},w.fitHeight=function(t,e){return ky(w,t,e)},function(){return e=t.apply(this,arguments),w.invert=e.invert&&S,D()}}function jy(t){var e=0,A=DE/3,n=Ty(t),r=n(e,A);return r.parallels=function(t){return arguments.length?n(e=t[0]*kE,A=t[1]*kE):[e*NE,A*NE]},r}function Hy(t,e){var A=jE(t),n=(A+jE(e))/2;if(xE(n)<1e-6)return function(t){var e=LE(t);function A(t,A){return[t*e,jE(A)/e]}return A.invert=function(t,A){return[t/e,WE(A*e)]},A}(t);var r=1+A*(2*n-A),i=YE(r)/n;function o(t,e){var A=YE(r-2*n*jE(e))/n;return[A*jE(t*=n),i-A*LE(t)]}return o.invert=function(t,e){var A=i-e,o=ME(t,xE(A))*HE(A);return A*n<0&&(o-=DE*HE(t)*HE(A)),[o/n,WE((r-(t*t+A*A)*n*n)/(2*n))]},o}var Yy=function(){return jy(Hy).scale(155.424).center([0,33.6442])},Vy=function(){return Yy().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};function Zy(t){return function(e,A){var n=LE(e),r=LE(A),i=t(n*r);return[i*r*jE(e),i*jE(A)]}}function Wy(t){return function(e,A){var n=YE(e*e+A*A),r=t(n),i=jE(r),o=LE(r);return[ME(e*i,n*o),WE(n&&A*i/n)]}}var Ky=Zy((function(t){return YE(2/(1+t))}));Ky.invert=Wy((function(t){return 2*WE(t/2)}));var Py=Zy((function(t){return(t=ZE(t))&&t/jE(t)}));Py.invert=Wy((function(t){return t}));function qy(t,e){return[t,JE(VE((RE+e)/2))]}qy.invert=function(t,e){return[t,2*OE(_E(e))-RE]};function Xy(t){var e,A,n,r=Jy(t),i=r.center,o=r.scale,a=r.translate,s=r.clipExtent,g=null;function c(){var i=DE*o(),a=r(function(t){function e(e){return(e=t(e[0]*kE,e[1]*kE))[0]*=NE,e[1]*=NE,e}return t=Ey(t[0]*kE,t[1]*kE,t.length>2?t[2]*kE:0),e.invert=function(e){return(e=t.invert(e[0]*kE,e[1]*kE))[0]*=NE,e[1]*=NE,e},e}(r.rotate()).invert([0,0]));return s(null==g?[[a[0]-i,a[1]-i],[a[0]+i,a[1]+i]]:t===qy?[[Math.max(a[0]-i,g),e],[Math.min(a[0]+i,A),n]]:[[g,Math.max(a[1]-i,e)],[A,Math.min(a[1]+i,n)]])}return r.scale=function(t){return arguments.length?(o(t),c()):o()},r.translate=function(t){return arguments.length?(a(t),c()):a()},r.center=function(t){return arguments.length?(i(t),c()):i()},r.clipExtent=function(t){return arguments.length?(null==t?g=e=A=n=null:(g=+t[0][0],e=+t[0][1],A=+t[1][0],n=+t[1][1]),c()):null==g?null:[[g,e],[A,n]]},c()}function zy(t){return VE((RE+t)/2)}function $y(t,e){var A=LE(t),n=t===e?jE(t):JE(A/LE(e))/JE(zy(e)/zy(t)),r=A*TE(zy(t),n)/n;if(!n)return qy;function i(t,e){r>0?e<1e-6-RE&&(e=1e-6-RE):e>RE-1e-6&&(e=RE-1e-6);var A=r/TE(zy(e),n);return[A*jE(n*t),r-A*LE(n*t)]}return i.invert=function(t,e){var A=r-e,i=HE(n)*YE(t*t+A*A),o=ME(t,xE(A))*HE(A);return A*n<0&&(o-=DE*HE(t)*HE(A)),[o/n,2*OE(TE(r/i,1/n))-RE]},i}function tv(t,e){return[t,e]}tv.invert=tv;function ev(t,e){var A=LE(t),n=t===e?jE(t):(A-LE(e))/(e-t),r=A/n+t;if(xE(n)<1e-6)return tv;function i(t,e){var A=r-e,i=n*t;return[A*jE(i),r-A*LE(i)]}return i.invert=function(t,e){var A=r-e,i=ME(t,xE(A))*HE(A);return A*n<0&&(i-=DE*HE(t)*HE(A)),[i/n,r-HE(n)*YE(t*t+A*A)]},i}var Av=1.340264,nv=-.081106,rv=893e-6,iv=.003796,ov=YE(3)/2;function av(t,e){var A=WE(ov*jE(e)),n=A*A,r=n*n*n;return[t*LE(A)/(ov*(Av+3*nv*n+r*(7*rv+9*iv*n))),A*(Av+nv*n+r*(rv+iv*n))]}av.invert=function(t,e){for(var A,n=e,r=n*n,i=r*r*r,o=0;o<12&&(i=(r=(n-=A=(n*(Av+nv*r+i*(rv+iv*r))-e)/(Av+3*nv*r+i*(7*rv+9*iv*r)))*n)*r*r,!(xE(A)<1e-12));++o);return[ov*t*(Av+3*nv*r+i*(7*rv+9*iv*r))/LE(n),WE(jE(n)/ov)]};function sv(t,e){var A=LE(e),n=LE(t)*A;return[A*jE(t)/n,jE(e)/n]}sv.invert=Wy(OE);function gv(t,e){var A=e*e,n=A*A;return[t*(.8707-.131979*A+n*(n*(.003971*A-.001529*n)-.013791)),e*(1.007226+A*(.015085+n*(.028874*A-.044475-.005916*n)))]}gv.invert=function(t,e){var A,n=e,r=25;do{var i=n*n,o=i*i;n-=A=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-e)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(xE(A)>1e-6&&--r>0);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]};function cv(t,e){return[LE(e)*jE(t),jE(e)]}cv.invert=Wy(WE);function Iv(t,e){var A=LE(e),n=1+LE(t)*A;return[A*jE(t)/n,jE(e)/n]}Iv.invert=Wy((function(t){return 2*OE(t)}));function uv(t,e){return[JE(VE((RE+e)/2)),-t]}uv.invert=function(t,e){return[-e,2*OE(_E(t))-RE]};function lv(){}var Cv=function(){var t,e=[];return{point:function(e,A,n){t.push([e,A,n])},lineStart:function(){e.push(t=[])},lineEnd:lv,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var A=e;return e=[],t=null,A}}},hv=Math.PI,Bv=hv/2,fv=hv/4,dv=2*hv,Qv=180/hv,Ev=hv/180,pv=Math.abs,yv=Math.atan,vv=Math.atan2,mv=Math.cos,bv=(Math.ceil,Math.exp,Math.floor,Math.log,Math.pow,Math.sin),Fv=Math.sign||function(t){return t>0?1:t<0?-1:0},wv=Math.sqrt;Math.tan;function Sv(t){return t>1?Bv:t<-1?-Bv:Math.asin(t)}var Dv=function(t,e){return pv(t[0]-e[0])<1e-6&&pv(t[1]-e[1])<1e-6};function Rv(t,e,A,n){this.x=t,this.z=e,this.o=A,this.e=n,this.v=!1,this.n=this.p=null}var Uv=function(t,e,A,n,r){var i,o,a=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,A,n=t[0],o=t[e];if(Dv(n,o)){if(!n[2]&&!o[2]){for(r.lineStart(),i=0;i<e;++i)r.point((n=t[i])[0],n[1]);return void r.lineEnd()}o[0]+=2e-6}a.push(A=new Rv(n,t,null,!0)),s.push(A.o=new Rv(n,null,A,!1)),a.push(A=new Rv(o,t,null,!1)),s.push(A.o=new Rv(o,null,A,!0))}})),a.length){for(s.sort(e),Gv(a),Gv(s),i=0,o=s.length;i<o;++i)s[i].e=A=!A;for(var g,c,I=a[0];;){for(var u=I,l=!0;u.v;)if((u=u.n)===I)return;g=u.z,r.lineStart();do{if(u.v=u.o.v=!0,u.e){if(l)for(i=0,o=g.length;i<o;++i)r.point((c=g[i])[0],c[1]);else n(u.x,u.n.x,1,r);u=u.n}else{if(l)for(g=u.p.z,i=g.length-1;i>=0;--i)r.point((c=g[i])[0],c[1]);else n(u.x,u.p.x,-1,r);u=u.p}g=(u=u.o).z,l=!l}while(!u.v);r.lineEnd()}}};function Gv(t){if(e=t.length){for(var e,A,n=0,r=t[0];++n<e;)r.n=A=t[n],A.p=r,r=A;r.n=A=t[0],A.p=r}}function Nv(){this.reset()}Nv.prototype={constructor:Nv,reset:function(){this.s=this.t=0},add:function(t){xv(kv,t,this.t),xv(this,kv.s,this.s),this.s?this.t+=kv.t:this.s=kv.t},valueOf:function(){return this.s}};var kv=new Nv;function xv(t,e,A){var n=t.s=e+A,r=n-e,i=n-r;t.t=e-i+(A-r)}function Ov(t){return[vv(t[1],t[0]),Sv(t[2])]}function Mv(t){var e=t[0],A=t[1],n=mv(A);return[n*mv(e),n*bv(e),bv(A)]}function Lv(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function _v(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Jv(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Tv(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function jv(t){var e=wv(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Hv=new Nv;function Yv(t){return pv(t[0])<=hv?t[0]:Fv(t[0])*((pv(t[0])+hv)%dv-hv)}var Vv=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var Zv=function(t){var e;return 1===t.length&&(e=t,t=function(t,A){return Vv(e(t),A)}),{left:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)<0?n=i+1:r=i}return n},right:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)>0?r=i:n=i+1}return n}}}(Vv);Zv.right,Zv.left;var Wv=Array.prototype;Wv.slice,Wv.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var Kv=function(t){for(var e,A,n,r=t.length,i=-1,o=0;++i<r;)o+=t[i].length;for(A=new Array(o);--r>=0;)for(e=(n=t[r]).length;--e>=0;)A[--o]=n[e];return A};var Pv=function(t,e,A,n){return function(r){var i,o,a,s=e(r),g=Cv(),c=e(g),I=!1,u={point:l,lineStart:h,lineEnd:B,polygonStart:function(){u.point=f,u.lineStart=d,u.lineEnd=Q,o=[],i=[]},polygonEnd:function(){u.point=l,u.lineStart=h,u.lineEnd=B,o=Kv(o);var t=function(t,e){var A=Yv(e),n=e[1],r=bv(n),i=[bv(A),-mv(A),0],o=0,a=0;Hv.reset(),1===r?n=Bv+1e-6:-1===r&&(n=-Bv-1e-6);for(var s=0,g=t.length;s<g;++s)if(I=(c=t[s]).length)for(var c,I,u=c[I-1],l=Yv(u),C=u[1]/2+fv,h=bv(C),B=mv(C),f=0;f<I;++f,l=Q,h=p,B=y,u=d){var d=c[f],Q=Yv(d),E=d[1]/2+fv,p=bv(E),y=mv(E),v=Q-l,m=v>=0?1:-1,b=m*v,F=b>hv,w=h*p;if(Hv.add(vv(w*m*bv(b),B*y+w*mv(b))),o+=F?v+m*dv:v,F^l>=A^Q>=A){var S=_v(Mv(u),Mv(d));jv(S);var D=_v(i,S);jv(D);var R=(F^v>=0?-1:1)*Sv(D[2]);(n>R||n===R&&(S[0]||S[1]))&&(a+=F^v>=0?1:-1)}}return(o<-1e-6||o<1e-6&&Hv<-1e-6)^1&a}(i,n);o.length?(I||(r.polygonStart(),I=!0),Uv(o,Xv,t,A,r)):t&&(I||(r.polygonStart(),I=!0),r.lineStart(),A(null,null,1,r),r.lineEnd()),I&&(r.polygonEnd(),I=!1),o=i=null},sphere:function(){r.polygonStart(),r.lineStart(),A(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function l(e,A){t(e,A)&&r.point(e,A)}function C(t,e){s.point(t,e)}function h(){u.point=C,s.lineStart()}function B(){u.point=l,s.lineEnd()}function f(t,e){a.push([t,e]),c.point(t,e)}function d(){c.lineStart(),a=[]}function Q(){f(a[0][0],a[0][1]),c.lineEnd();var t,e,A,n,s=c.clean(),u=g.result(),l=u.length;if(a.pop(),i.push(a),a=null,l)if(1&s){if((e=(A=u[0]).length-1)>0){for(I||(r.polygonStart(),I=!0),r.lineStart(),t=0;t<e;++t)r.point((n=A[t])[0],n[1]);r.lineEnd()}}else l>1&&2&s&&u.push(u.pop().concat(u.shift())),o.push(u.filter(qv))}return u}};function qv(t){return t.length>1}function Xv(t,e){return((t=t.x)[0]<0?t[1]-Bv-1e-6:Bv-t[1])-((e=e.x)[0]<0?e[1]-Bv-1e-6:Bv-e[1])}var zv=Pv((function(){return!0}),(function(t){var e,A=NaN,n=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,o){var a=i>0?hv:-hv,s=pv(i-A);pv(s-hv)<1e-6?(t.point(A,n=(n+o)/2>0?Bv:-Bv),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(a,n),t.point(i,n),e=0):r!==a&&s>=hv&&(pv(A-r)<1e-6&&(A-=1e-6*r),pv(i-a)<1e-6&&(i-=1e-6*a),n=function(t,e,A,n){var r,i,o=bv(t-A);return pv(o)>1e-6?yv((bv(e)*(i=mv(n))*bv(A)-bv(n)*(r=mv(e))*bv(t))/(r*i*o)):(e+n)/2}(A,n,i,o),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(a,n),e=0),t.point(A=i,n=o),r=a},lineEnd:function(){t.lineEnd(),A=n=NaN},clean:function(){return 2-e}}}),(function(t,e,A,n){var r;if(null==t)r=A*Bv,n.point(-hv,r),n.point(0,r),n.point(hv,r),n.point(hv,0),n.point(hv,-r),n.point(0,-r),n.point(-hv,-r),n.point(-hv,0),n.point(-hv,r);else if(pv(t[0]-e[0])>1e-6){var i=t[0]<e[0]?hv:-hv;r=A*i/2,n.point(-i,r),n.point(0,r),n.point(i,r)}else n.point(e[0],e[1])}),[-hv,-Bv]);var $v=function(t,e){function A(A,n){return A=t(A,n),e(A[0],A[1])}return t.invert&&e.invert&&(A.invert=function(A,n){return(A=e.invert(A,n))&&t.invert(A[0],A[1])}),A};function tm(t,e){return[pv(t)>hv?t+Math.round(-t/dv)*dv:t,e]}function em(t,e,A){return(t%=dv)?e||A?$v(nm(t),rm(e,A)):nm(t):e||A?rm(e,A):tm}function Am(t){return function(e,A){return[(e+=t)>hv?e-dv:e<-hv?e+dv:e,A]}}function nm(t){var e=Am(t);return e.invert=Am(-t),e}function rm(t,e){var A=mv(t),n=bv(t),r=mv(e),i=bv(e);function o(t,e){var o=mv(e),a=mv(t)*o,s=bv(t)*o,g=bv(e),c=g*A+a*n;return[vv(s*r-c*i,a*A-g*n),Sv(c*r+s*i)]}return o.invert=function(t,e){var o=mv(e),a=mv(t)*o,s=bv(t)*o,g=bv(e),c=g*r-s*i;return[vv(s*r+g*i,a*A+c*n),Sv(c*A-a*n)]},o}tm.invert=tm;function im(t,e,A,n,r,i){if(A){var o=mv(e),a=bv(e),s=n*A;null==r?(r=e+n*dv,i=e-s/2):(r=om(o,r),i=om(o,i),(n>0?r<i:r>i)&&(r+=n*dv));for(var g,c=r;n>0?c>i:c<i;c-=s)g=Ov([o,-a*mv(c),-a*bv(c)]),t.point(g[0],g[1])}}function om(t,e){(e=Mv(e))[0]-=t,jv(e);var A,n=(A=-e[1])>1?0:A<-1?hv:Math.acos(A);return((-e[2]<0?-n:n)+dv-1e-6)%dv}var am=function(t){var e=mv(t),A=6*Ev,n=e>0,r=pv(e)>1e-6;function i(t,A){return mv(t)*mv(A)>e}function o(t,A,n){var r=[1,0,0],i=_v(Mv(t),Mv(A)),o=Lv(i,i),a=i[0],s=o-a*a;if(!s)return!n&&t;var g=e*o/s,c=-e*a/s,I=_v(r,i),u=Tv(r,g);Jv(u,Tv(i,c));var l=I,C=Lv(u,l),h=Lv(l,l),B=C*C-h*(Lv(u,u)-1);if(!(B<0)){var f=wv(B),d=Tv(l,(-C-f)/h);if(Jv(d,u),d=Ov(d),!n)return d;var Q,E=t[0],p=A[0],y=t[1],v=A[1];p<E&&(Q=E,E=p,p=Q);var m=p-E,b=pv(m-hv)<1e-6;if(!b&&v<y&&(Q=y,y=v,v=Q),b||m<1e-6?b?y+v>0^d[1]<(pv(d[0]-E)<1e-6?y:v):y<=d[1]&&d[1]<=v:m>hv^(E<=d[0]&&d[0]<=p)){var F=Tv(l,(-C+f)/h);return Jv(F,u),[d,Ov(F)]}}}function a(e,A){var r=n?t:hv-t,i=0;return e<-r?i|=1:e>r&&(i|=2),A<-r?i|=4:A>r&&(i|=8),i}return Pv(i,(function(t){var e,A,s,g,c;return{lineStart:function(){g=s=!1,c=1},point:function(I,u){var l,C=[I,u],h=i(I,u),B=n?h?0:a(I,u):h?a(I+(I<0?hv:-hv),u):0;if(!e&&(g=s=h)&&t.lineStart(),h!==s&&(!(l=o(e,C))||Dv(e,l)||Dv(C,l))&&(C[2]=1),h!==s)c=0,h?(t.lineStart(),l=o(C,e),t.point(l[0],l[1])):(l=o(e,C),t.point(l[0],l[1],2),t.lineEnd()),e=l;else if(r&&e&&n^h){var f;B&A||!(f=o(C,e,!0))||(c=0,n?(t.lineStart(),t.point(f[0][0],f[0][1]),t.point(f[1][0],f[1][1]),t.lineEnd()):(t.point(f[1][0],f[1][1]),t.lineEnd(),t.lineStart(),t.point(f[0][0],f[0][1],3)))}!h||e&&Dv(e,C)||t.point(C[0],C[1]),e=C,s=h,A=B},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(g&&s)<<1}}}),(function(e,n,r,i){im(i,t,A,r,e,n)}),n?[0,-t]:[-hv,t-hv])};function sm(t,e,A,n){function r(r,i){return t<=r&&r<=A&&e<=i&&i<=n}function i(r,i,a,g){var c=0,I=0;if(null==r||(c=o(r,a))!==(I=o(i,a))||s(r,i)<0^a>0)do{g.point(0===c||3===c?t:A,c>1?n:e)}while((c=(c+a+4)%4)!==I);else g.point(i[0],i[1])}function o(n,r){return pv(n[0]-t)<1e-6?r>0?0:3:pv(n[0]-A)<1e-6?r>0?2:1:pv(n[1]-e)<1e-6?r>0?1:0:r>0?3:2}function a(t,e){return s(t.x,e.x)}function s(t,e){var A=o(t,1),n=o(e,1);return A!==n?A-n:0===A?e[1]-t[1]:1===A?t[0]-e[0]:2===A?t[1]-e[1]:e[0]-t[0]}return function(o){var s,g,c,I,u,l,C,h,B,f,d,Q=o,E=Cv(),p={point:y,lineStart:function(){p.point=v,g&&g.push(c=[]);f=!0,B=!1,C=h=NaN},lineEnd:function(){s&&(v(I,u),l&&B&&E.rejoin(),s.push(E.result()));p.point=y,B&&Q.lineEnd()},polygonStart:function(){Q=E,s=[],g=[],d=!0},polygonEnd:function(){var e=function(){for(var e=0,A=0,r=g.length;A<r;++A)for(var i,o,a=g[A],s=1,c=a.length,I=a[0],u=I[0],l=I[1];s<c;++s)i=u,o=l,I=a[s],u=I[0],l=I[1],o<=n?l>n&&(u-i)*(n-o)>(l-o)*(t-i)&&++e:l<=n&&(u-i)*(n-o)<(l-o)*(t-i)&&--e;return e}(),A=d&&e,r=(s=Kv(s)).length;(A||r)&&(o.polygonStart(),A&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),r&&Uv(s,a,e,i,o),o.polygonEnd());Q=o,s=g=c=null}};function y(t,e){r(t,e)&&Q.point(t,e)}function v(i,o){var a=r(i,o);if(g&&c.push([i,o]),f)I=i,u=o,l=a,f=!1,a&&(Q.lineStart(),Q.point(i,o));else if(a&&B)Q.point(i,o);else{var s=[C=Math.max(-1e9,Math.min(1e9,C)),h=Math.max(-1e9,Math.min(1e9,h))],E=[i=Math.max(-1e9,Math.min(1e9,i)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,A,n,r,i){var o,a=t[0],s=t[1],g=0,c=1,I=e[0]-a,u=e[1]-s;if(o=A-a,I||!(o>0)){if(o/=I,I<0){if(o<g)return;o<c&&(c=o)}else if(I>0){if(o>c)return;o>g&&(g=o)}if(o=r-a,I||!(o<0)){if(o/=I,I<0){if(o>c)return;o>g&&(g=o)}else if(I>0){if(o<g)return;o<c&&(c=o)}if(o=n-s,u||!(o>0)){if(o/=u,u<0){if(o<g)return;o<c&&(c=o)}else if(u>0){if(o>c)return;o>g&&(g=o)}if(o=i-s,u||!(o<0)){if(o/=u,u<0){if(o>c)return;o>g&&(g=o)}else if(u>0){if(o<g)return;o<c&&(c=o)}return g>0&&(t[0]=a+g*I,t[1]=s+g*u),c<1&&(e[0]=a+c*I,e[1]=s+c*u),!0}}}}}(s,E,t,e,A,n)?a&&(Q.lineStart(),Q.point(i,o),d=!1):(B||(Q.lineStart(),Q.point(s[0],s[1])),Q.point(E[0],E[1]),a||Q.lineEnd(),d=!1)}C=i,h=o,B=a}return p}}var gm=function(t){return t};function cm(t){return function(e){var A=new Im;for(var n in t)A[n]=t[n];return A.stream=e,A}}function Im(){}function um(t,e){t&&Cm.hasOwnProperty(t.type)&&Cm[t.type](t,e)}Im.prototype={constructor:Im,point:function(t,e){this.stream.point(t,e)},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 lm={Feature:function(t,e){um(t.geometry,e)},FeatureCollection:function(t,e){for(var A=t.features,n=-1,r=A.length;++n<r;)um(A[n].geometry,e)}},Cm={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)t=A[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){hm(t.coordinates,e,0)},MultiLineString:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)hm(A[n],e,0)},Polygon:function(t,e){Bm(t.coordinates,e)},MultiPolygon:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)Bm(A[n],e)},GeometryCollection:function(t,e){for(var A=t.geometries,n=-1,r=A.length;++n<r;)um(A[n],e)}};function hm(t,e,A){var n,r=-1,i=t.length-A;for(e.lineStart();++r<i;)n=t[r],e.point(n[0],n[1],n[2]);e.lineEnd()}function Bm(t,e){var A=-1,n=t.length;for(e.polygonStart();++A<n;)hm(t[A],e,1);e.polygonEnd()}var fm=1/0,dm=fm,Qm=-fm,Em=Qm;var pm={point:function(t,e){t<fm&&(fm=t);t>Qm&&(Qm=t);e<dm&&(dm=e);e>Em&&(Em=e)},lineStart:lv,lineEnd:lv,polygonStart:lv,polygonEnd:lv,result:function(){var t=[[fm,dm],[Qm,Em]];return Qm=Em=-(dm=fm=1/0),t}};function ym(t,e,A){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),function(t,e){t&&lm.hasOwnProperty(t.type)?lm[t.type](t,e):um(t,e)}(A,t.stream(pm)),e(pm.result()),null!=n&&t.clipExtent(n),t}function vm(t,e,A){return ym(t,(function(A){var n=e[1][0]-e[0][0],r=e[1][1]-e[0][1],i=Math.min(n/(A[1][0]-A[0][0]),r/(A[1][1]-A[0][1])),o=+e[0][0]+(n-i*(A[1][0]+A[0][0]))/2,a=+e[0][1]+(r-i*(A[1][1]+A[0][1]))/2;t.scale(150*i).translate([o,a])}),A)}var mm=mv(30*Ev),bm=function(t,e){return+e?function(t,e){function A(n,r,i,o,a,s,g,c,I,u,l,C,h,B){var f=g-n,d=c-r,Q=f*f+d*d;if(Q>4*e&&h--){var E=o+u,p=a+l,y=s+C,v=wv(E*E+p*p+y*y),m=Sv(y/=v),b=pv(pv(y)-1)<1e-6||pv(i-I)<1e-6?(i+I)/2:vv(p,E),F=t(b,m),w=F[0],S=F[1],D=w-n,R=S-r,U=d*D-f*R;(U*U/Q>e||pv((f*D+d*R)/Q-.5)>.3||o*u+a*l+s*C<mm)&&(A(n,r,i,o,a,s,w,S,b,E/=v,p/=v,y,h,B),B.point(w,S),A(w,S,b,E,p,y,g,c,I,u,l,C,h,B))}}return function(e){var n,r,i,o,a,s,g,c,I,u,l,C,h={point:B,lineStart:f,lineEnd:Q,polygonStart:function(){e.polygonStart(),h.lineStart=E},polygonEnd:function(){e.polygonEnd(),h.lineStart=f}};function B(A,n){A=t(A,n),e.point(A[0],A[1])}function f(){c=NaN,h.point=d,e.lineStart()}function d(n,r){var i=Mv([n,r]),o=t(n,r);A(c,I,g,u,l,C,c=o[0],I=o[1],g=n,u=i[0],l=i[1],C=i[2],16,e),e.point(c,I)}function Q(){h.point=B,e.lineEnd()}function E(){f(),h.point=p,h.lineEnd=y}function p(t,e){d(n=t,e),r=c,i=I,o=u,a=l,s=C,h.point=d}function y(){A(c,I,g,u,l,C,r,i,n,o,a,s,16,e),h.lineEnd=Q,Q()}return h}}(t,e):function(t){return cm({point:function(e,A){e=t(e,A),this.stream.point(e[0],e[1])}})}(t)};var Fm=cm({point:function(t,e){this.stream.point(t*Ev,e*Ev)}});function wm(t,e,A,n,r){function i(i,o){return[e+t*(i*=n),A-t*(o*=r)]}return i.invert=function(i,o){return[(i-e)/t*n,(A-o)/t*r]},i}function Sm(t,e,A,n,r,i){var o=mv(i),a=bv(i),s=o*t,g=a*t,c=o/t,I=a/t,u=(a*A-o*e)/t,l=(a*e+o*A)/t;function C(t,i){return[s*(t*=n)-g*(i*=r)+e,A-g*t-s*i]}return C.invert=function(t,e){return[n*(c*t-I*e+u),r*(l-I*t-c*e)]},C}function Dm(t){return function(t){var e,A,n,r,i,o,a,s,g,c,I=150,u=480,l=250,C=0,h=0,B=0,f=0,d=0,Q=0,E=1,p=1,y=null,v=zv,m=null,b=gm,F=.5;function w(t){return s(t[0]*Ev,t[1]*Ev)}function S(t){return(t=s.invert(t[0],t[1]))&&[t[0]*Qv,t[1]*Qv]}function D(){var t=Sm(I,0,0,E,p,Q).apply(null,e(C,h)),n=(Q?Sm:wm)(I,u-t[0],l-t[1],E,p,Q);return A=em(B,f,d),a=$v(e,n),s=$v(A,a),o=bm(a,F),R()}function R(){return g=c=null,w}return w.stream=function(t){return g&&c===t?g:g=Fm(function(t){return cm({point:function(e,A){var n=t(e,A);return this.stream.point(n[0],n[1])}})}(A)(v(o(b(c=t)))))},w.preclip=function(t){return arguments.length?(v=t,y=void 0,R()):v},w.postclip=function(t){return arguments.length?(b=t,m=n=r=i=null,R()):b},w.clipAngle=function(t){return arguments.length?(v=+t?am(y=t*Ev):(y=null,zv),R()):y*Qv},w.clipExtent=function(t){return arguments.length?(b=null==t?(m=n=r=i=null,gm):sm(m=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),R()):null==m?null:[[m,n],[r,i]]},w.scale=function(t){return arguments.length?(I=+t,D()):I},w.translate=function(t){return arguments.length?(u=+t[0],l=+t[1],D()):[u,l]},w.center=function(t){return arguments.length?(C=t[0]%360*Ev,h=t[1]%360*Ev,D()):[C*Qv,h*Qv]},w.rotate=function(t){return arguments.length?(B=t[0]%360*Ev,f=t[1]%360*Ev,d=t.length>2?t[2]%360*Ev:0,D()):[B*Qv,f*Qv,d*Qv]},w.angle=function(t){return arguments.length?(Q=t%360*Ev,D()):Q*Qv},w.reflectX=function(t){return arguments.length?(E=t?-1:1,D()):E<0},w.reflectY=function(t){return arguments.length?(p=t?-1:1,D()):p<0},w.precision=function(t){return arguments.length?(o=bm(a,F=t*t),R()):wv(F)},w.fitExtent=function(t,e){return vm(w,t,e)},w.fitSize=function(t,e){return function(t,e,A){return vm(t,[[0,0],e],A)}(w,t,e)},w.fitWidth=function(t,e){return function(t,e,A){return ym(t,(function(A){var n=+e,r=n/(A[1][0]-A[0][0]),i=(n-r*(A[1][0]+A[0][0]))/2,o=-r*A[0][1];t.scale(150*r).translate([i,o])}),A)}(w,t,e)},w.fitHeight=function(t,e){return function(t,e,A){return ym(t,(function(A){var n=+e,r=n/(A[1][1]-A[0][1]),i=-r*A[0][0],o=(n-r*(A[1][1]+A[0][1]))/2;t.scale(150*r).translate([i,o])}),A)}(w,t,e)},function(){return e=t.apply(this,arguments),w.invert=e.invert&&S,D()}}((function(){return t}))()}var Rm=Math.abs,Um=(Math.atan,Math.atan2,Math.ceil,Math.cos),Gm=(Math.exp,Math.floor,Math.log,Math.max,Math.min,Math.pow,Math.round,Math.sign,Math.sin),Nm=(Math.tan,Math.PI),km=Nm/2,xm=(Math.SQRT1_2,Mm(2));Mm(Nm);function Om(t){return t>1?km:t<-1?-km:Math.asin(t)}function Mm(t){return t>0?Math.sqrt(t):0}function Lm(t,e){var A,n=t*Gm(e),r=30;do{e-=A=(e+Gm(e)-n)/(1+Um(e))}while(Rm(A)>1e-6&&--r>0);return e/2}var _m=function(t,e,A){function n(n,r){return[t*n*Um(r=Lm(A,r)),e*Gm(r)]}return n.invert=function(n,r){return r=Om(r/e),[n/(t*Um(r)),Om((2*r+Gm(2*r))/A)]},n}(xm/km,xm,Nm),Jm=Pp(),Tm=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function jm(t,e){return function A(){var n=e();return n.type=t,n.path=Pp().projection(n),n.copy=n.copy||function(){var t=A();return Tm.forEach((function(e){n[e]&&t[e](n[e]())})),t.path.pointRadius(n.path.pointRadius()),t},n}}function Hm(t,e){if(!t||"string"!==typeof t)throw new Error("Projection type must be a name string.");return t=t.toLowerCase(),arguments.length>1?(Vm[t]=jm(t,e),this):Vm[t]||null}function Ym(t){return t&&t.path||Jm}var Vm={albers:Vy,albersusa:function(){var t,e,A,n,r,i,o=Vy(),a=Yy().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Yy().rotate([157,0]).center([-3,19.9]).parallels([8,18]),g={point:function(t,e){i=[t,e]}};function c(t){var e=t[0],o=t[1];return i=null,A.point(e,o),i||(n.point(e,o),i)||(r.point(e,o),i)}function I(){return t=e=null,c}return c.invert=function(t){var e=o.scale(),A=o.translate(),n=(t[0]-A[0])/e,r=(t[1]-A[1])/e;return(r>=.12&&r<.234&&n>=-.425&&n<-.214?a:r>=.166&&r<.234&&n>=-.214&&n<-.115?s:o).invert(t)},c.stream=function(A){return t&&e===A?t:t=function(t){var e=t.length;return{point:function(A,n){for(var r=-1;++r<e;)t[r].point(A,n)},sphere:function(){for(var A=-1;++A<e;)t[A].sphere()},lineStart:function(){for(var A=-1;++A<e;)t[A].lineStart()},lineEnd:function(){for(var A=-1;++A<e;)t[A].lineEnd()},polygonStart:function(){for(var A=-1;++A<e;)t[A].polygonStart()},polygonEnd:function(){for(var A=-1;++A<e;)t[A].polygonEnd()}}}([o.stream(e=A),a.stream(A),s.stream(A)])},c.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),I()):o.precision()},c.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),c.translate(o.translate())):o.scale()},c.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),i=+t[0],c=+t[1];return A=o.translate(t).clipExtent([[i-.455*e,c-.238*e],[i+.455*e,c+.238*e]]).stream(g),n=a.translate([i-.307*e,c+.201*e]).clipExtent([[i-.425*e+1e-6,c+.12*e+1e-6],[i-.214*e-1e-6,c+.234*e-1e-6]]).stream(g),r=s.translate([i-.205*e,c+.212*e]).clipExtent([[i-.214*e+1e-6,c+.166*e+1e-6],[i-.115*e-1e-6,c+.234*e-1e-6]]).stream(g),I()},c.fitExtent=function(t,e){return Uy(c,t,e)},c.fitSize=function(t,e){return Gy(c,t,e)},c.fitWidth=function(t,e){return Ny(c,t,e)},c.fitHeight=function(t,e){return ky(c,t,e)},c.scale(1070)},azimuthalequalarea:function(){return Jy(Ky).scale(124.75).clipAngle(179.999)},azimuthalequidistant:function(){return Jy(Py).scale(79.4188).clipAngle(179.999)},conicconformal:function(){return jy($y).scale(109.5).parallels([30,30])},conicequalarea:Yy,conicequidistant:function(){return jy(ev).scale(131.154).center([0,13.9389])},equalEarth:function(){return Jy(av).scale(177.158)},equirectangular:function(){return Jy(tv).scale(152.63)},gnomonic:function(){return Jy(sv).scale(144.049).clipAngle(60)},identity:function(){var t,e,A,n,r,i,o,a=1,s=0,g=0,c=1,I=1,u=0,l=null,C=1,h=1,B=Sy({point:function(t,e){var A=Q([t,e]);this.stream.point(A[0],A[1])}}),f=dE;function d(){return C=a*c,h=a*I,i=o=null,Q}function Q(A){var n=A[0]*C,r=A[1]*h;if(u){var i=r*t-n*e;n=n*t+r*e,r=i}return[n+s,r+g]}return Q.invert=function(A){var n=A[0]-s,r=A[1]-g;if(u){var i=r*t+n*e;n=n*t-r*e,r=i}return[n/C,r/h]},Q.stream=function(t){return i&&o===t?i:i=B(f(o=t))},Q.postclip=function(t){return arguments.length?(f=t,l=A=n=r=null,d()):f},Q.clipExtent=function(t){return arguments.length?(f=null==t?(l=A=n=r=null,dE):wy(l=+t[0][0],A=+t[0][1],n=+t[1][0],r=+t[1][1]),d()):null==l?null:[[l,A],[n,r]]},Q.scale=function(t){return arguments.length?(a=+t,d()):a},Q.translate=function(t){return arguments.length?(s=+t[0],g=+t[1],d()):[s,g]},Q.angle=function(A){return arguments.length?(e=jE(u=A%360*kE),t=LE(u),d()):u*NE},Q.reflectX=function(t){return arguments.length?(c=t?-1:1,d()):c<0},Q.reflectY=function(t){return arguments.length?(I=t?-1:1,d()):I<0},Q.fitExtent=function(t,e){return Uy(Q,t,e)},Q.fitSize=function(t,e){return Gy(Q,t,e)},Q.fitWidth=function(t,e){return Ny(Q,t,e)},Q.fitHeight=function(t,e){return ky(Q,t,e)},Q},mercator:function(){return Xy(qy).scale(961/GE)},mollweide:function(){return Dm(_m).scale(169.529)},naturalEarth1:function(){return Jy(gv).scale(175.295)},orthographic:function(){return Jy(cv).scale(249.5).clipAngle(90.000001)},stereographic:function(){return Jy(Iv).scale(250).clipAngle(142)},transversemercator:function(){var t=Xy(uv),e=t.center,A=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?A([t[0],t[1],t.length>2?t[2]+90:90]):[(t=A())[0],t[1],t[2]-90]},A([0,0,90]).scale(159.155)}};for(var Zm in Vm)Hm(Zm,Vm[Zm]);function Wm(t){lo.call(this,null,t)}function Km(t){lo.call(this,null,t)}function Pm(t){lo.call(this,null,t)}Wm.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(U.y)(Wm,lo).transform=function(t,e){var A=e.fork(e.ALL),n=this.value,r=t.field||U.x,i=t.as||"path",o=A.SOURCE;!n||t.modified()?(this.value=n=Ym(t.projection),A.materialize().reflow()):o=r===U.x||e.modified(r.fields)?A.ADD_MOD:A.ADD;var a=function(t,e){var A=t.pointRadius();t.context(null),null!=e&&t.pointRadius(e);return A}(n,t.pointRadius);return A.visit(o,(function(t){t[i]=n(r(t))})),n.pointRadius(a),A.modifies(i)},Km.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(U.y)(Km,lo).transform=function(t,e){var A,n=t.projection,r=t.fields[0],i=t.fields[1],o=t.as||["x","y"],a=o[0],s=o[1];function g(t){var e=n([r(t),i(t)]);e?(t[a]=e[0],t[s]=e[1]):(t[a]=void 0,t[s]=void 0)}return t.modified()?e=e.materialize().reflow(!0).visit(e.SOURCE,g):(A=e.modified(r.fields)||e.modified(i.fields),e.visit(A?e.ADD_MOD:e.ADD,g)),e.modifies(o)},Pm.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(U.y)(Pm,lo).transform=function(t,e){var A=e.fork(e.ALL),n=this.value,r=t.as||"shape",i=A.ADD;return n&&!t.modified()||(this.value=n=function(t,e,A){var n=null==A?function(A){return t(e(A))}:function(n){var r=t.pointRadius(),i=t.pointRadius(A)(e(n));return t.pointRadius(r),i};return n.context=function(e){return t.context(e),n},n}(Ym(t.projection),t.field||Object(U.t)("datum"),t.pointRadius),A.materialize().reflow(),i=A.SOURCE),A.visit(i,(function(t){t[r]=n})),A.modifies(r)};var qm=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var Xm=function(t){var e;return 1===t.length&&(e=t,t=function(t,A){return qm(e(t),A)}),{left:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)<0?n=i+1:r=i}return n},right:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)>0?r=i:n=i+1}return n}}}(qm);Xm.right,Xm.left;var zm=Array.prototype,$m=(zm.slice,zm.map,function(t,e,A){t=+t,e=+e,A=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+A;for(var n=-1,r=0|Math.max(0,Math.ceil((e-t)/A)),i=new Array(r);++n<r;)i[n]=t+n*A;return i});Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Math.PI;var tb=Math.abs,eb=(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 Ab(t,e,A){var n=$m(t,e-1e-6,A).concat(e);return function(t){return n.map((function(e){return[t,e]}))}}function nb(t,e,A){var n=$m(t,e-1e-6,A).concat(e);return function(t){return n.map((function(e){return[e,t]}))}}function rb(){var t,e,A,n,r,i,o,a,s,g,c,I,u=10,l=u,C=90,h=360,B=2.5;function f(){return{type:"MultiLineString",coordinates:d()}}function d(){return $m(eb(n/C)*C,A,C).map(c).concat($m(eb(a/h)*h,o,h).map(I)).concat($m(eb(e/u)*u,t,u).filter((function(t){return tb(t%C)>1e-6})).map(s)).concat($m(eb(i/l)*l,r,l).filter((function(t){return tb(t%h)>1e-6})).map(g))}return f.lines=function(){return d().map((function(t){return{type:"LineString",coordinates:t}}))},f.outline=function(){return{type:"Polygon",coordinates:[c(n).concat(I(o).slice(1),c(A).reverse().slice(1),I(a).reverse().slice(1))]}},f.extent=function(t){return arguments.length?f.extentMajor(t).extentMinor(t):f.extentMinor()},f.extentMajor=function(t){return arguments.length?(n=+t[0][0],A=+t[1][0],a=+t[0][1],o=+t[1][1],n>A&&(t=n,n=A,A=t),a>o&&(t=a,a=o,o=t),f.precision(B)):[[n,a],[A,o]]},f.extentMinor=function(A){return arguments.length?(e=+A[0][0],t=+A[1][0],i=+A[0][1],r=+A[1][1],e>t&&(A=e,e=t,t=A),i>r&&(A=i,i=r,r=A),f.precision(B)):[[e,i],[t,r]]},f.step=function(t){return arguments.length?f.stepMajor(t).stepMinor(t):f.stepMinor()},f.stepMajor=function(t){return arguments.length?(C=+t[0],h=+t[1],f):[C,h]},f.stepMinor=function(t){return arguments.length?(u=+t[0],l=+t[1],f):[u,l]},f.precision=function(u){return arguments.length?(B=+u,s=Ab(i,r,90),g=nb(e,t,B),c=Ab(a,o,90),I=nb(n,A,B),f):B},f.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function ib(t){lo.call(this,[],t),this.generator=rb()}ib.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(U.y)(ib,lo).transform=function(t,e){var A,n=this.value,r=this.generator;if(!n.length||t.modified())for(var i in t)Object(U.D)(r[i])&&r[i](t[i]);return A=r(),n.length?e.mod.push(xt(n[0],A)):e.add.push(Gt(A)),n[0]=A,e};var ob=function(t,e,A){t.prototype=e.prototype=A,A.constructor=t};function ab(t,e){var A=Object.create(t.prototype);for(var n in e)A[n]=e[n];return A}function sb(){}var gb="\\s*([+-]?\\d+)\\s*",cb="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ib="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ub=/^#([0-9a-f]{3,8})$/,lb=new RegExp("^rgb\\("+[gb,gb,gb]+"\\)$"),Cb=new RegExp("^rgb\\("+[Ib,Ib,Ib]+"\\)$"),hb=new RegExp("^rgba\\("+[gb,gb,gb,cb]+"\\)$"),Bb=new RegExp("^rgba\\("+[Ib,Ib,Ib,cb]+"\\)$"),fb=new RegExp("^hsl\\("+[cb,Ib,Ib]+"\\)$"),db=new RegExp("^hsla\\("+[cb,Ib,Ib,cb]+"\\)$"),Qb={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 Eb(){return this.rgb().formatHex()}function pb(){return this.rgb().formatRgb()}function yb(t){var e,A;return t=(t+"").trim().toLowerCase(),(e=ub.exec(t))?(A=e[1].length,e=parseInt(e[1],16),6===A?vb(e):3===A?new wb(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===A?mb(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===A?mb(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=lb.exec(t))?new wb(e[1],e[2],e[3],1):(e=Cb.exec(t))?new wb(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=hb.exec(t))?mb(e[1],e[2],e[3],e[4]):(e=Bb.exec(t))?mb(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=fb.exec(t))?Ub(e[1],e[2]/100,e[3]/100,1):(e=db.exec(t))?Ub(e[1],e[2]/100,e[3]/100,e[4]):Qb.hasOwnProperty(t)?vb(Qb[t]):"transparent"===t?new wb(NaN,NaN,NaN,0):null}function vb(t){return new wb(t>>16&255,t>>8&255,255&t,1)}function mb(t,e,A,n){return n<=0&&(t=e=A=NaN),new wb(t,e,A,n)}function bb(t){return t instanceof sb||(t=yb(t)),t?new wb((t=t.rgb()).r,t.g,t.b,t.opacity):new wb}function Fb(t,e,A,n){return 1===arguments.length?bb(t):new wb(t,e,A,null==n?1:n)}function wb(t,e,A,n){this.r=+t,this.g=+e,this.b=+A,this.opacity=+n}function Sb(){return"#"+Rb(this.r)+Rb(this.g)+Rb(this.b)}function Db(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}function Rb(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ub(t,e,A,n){return n<=0?t=e=A=NaN:A<=0||A>=1?t=e=NaN:e<=0&&(t=NaN),new Nb(t,e,A,n)}function Gb(t){if(t instanceof Nb)return new Nb(t.h,t.s,t.l,t.opacity);if(t instanceof sb||(t=yb(t)),!t)return new Nb;if(t instanceof Nb)return t;var e=(t=t.rgb()).r/255,A=t.g/255,n=t.b/255,r=Math.min(e,A,n),i=Math.max(e,A,n),o=NaN,a=i-r,s=(i+r)/2;return a?(o=e===i?(A-n)/a+6*(A<n):A===i?(n-e)/a+2:(e-A)/a+4,a/=s<.5?i+r:2-i-r,o*=60):a=s>0&&s<1?0:o,new Nb(o,a,s,t.opacity)}function Nb(t,e,A,n){this.h=+t,this.s=+e,this.l=+A,this.opacity=+n}function kb(t,e,A){return 255*(t<60?e+(A-e)*t/60:t<180?A:t<240?e+(A-e)*(240-t)/60:e)}function xb(t){lo.call(this,null,t)}function Ob(t){if(!Object(U.D)(t))return!1;var e=Object(U.db)(Object(U.g)(t));return e.$x||e.$y||e.$value||e.$max}function Mb(t){lo.call(this,null,t),this.modified(!0)}function Lb(t,e,A){Object(U.D)(t[e])&&t[e](A)}ob(sb,yb,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Eb,formatHex:Eb,formatHsl:function(){return Gb(this).formatHsl()},formatRgb:pb,toString:pb}),ob(wb,Fb,ab(sb,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wb(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wb(this.r*t,this.g*t,this.b*t,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:Sb,formatHex:Sb,formatRgb:Db,toString:Db})),ob(Nb,(function(t,e,A,n){return 1===arguments.length?Gb(t):new Nb(t,e,A,null==n?1:n)}),ab(sb,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Nb(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Nb(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,A=this.l,n=A+(A<.5?A:1-A)*e,r=2*A-n;return new wb(kb(t>=240?t-240:t+120,r,n),kb(t,r,n),kb(t<120?t+240:t-120,r,n),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 t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}})),xb.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(U.y)(xb,lo).transform=function(t,e){if(!e.changed()&&!t.modified())return e.StopPropagation;var A=e.materialize(e.SOURCE).source,n="shared"===t.resolve,r=t.field||U.x,i=function(t,e){var A;Object(U.D)(t)?(A=function(A){return t(A,e)}).dep=Ob(t):t?A=Object(U.l)(t):(A=function(t){return t.$value/t.$max||0}).dep=!0;return A}(t.opacity,t),o=function(t,e){var A;Object(U.D)(t)?(A=function(A){return Fb(t(A,e))}).dep=Ob(t):A=Object(U.l)(Fb(t||"#888"));return A}(t.color,t),a=t.as||"image",s={$x:0,$y:0,$value:0,$max:n?KQ(A.map((function(t){return KQ(r(t).values)}))):0};return A.forEach((function(t){var e=r(t),A=Object(U.o)({},t,s);n||(A.$max=KQ(e.values||[])),t[a]=function(t,e,A,n){for(var r=t.width,i=t.height,o=t.x1||0,a=t.y1||0,s=t.x2||r,g=t.y2||i,c=t.values,I=c?function(t){return c[t]}:U.kb,u=UI(s-o,g-a),l=u.getContext("2d"),C=l.getImageData(0,0,s-o,g-a),h=C.data,B=a,f=0;B<g;++B){e.$y=B-a;for(var d=o,Q=B*r;d<s;++d,f+=4){e.$x=d-o,e.$value=I(d+Q);var E=A(e);h[f+0]=E.r,h[f+1]=E.g,h[f+2]=E.b,h[f+3]=~~(255*n(e))}}return l.putImageData(C,0,0),u}(e,A,o.dep?o:Object(U.l)(o(A)),i.dep?i:Object(U.l)(i(A)))})),e.reflow(!0).modifies(a)},Object(U.y)(Mb,lo).transform=function(t,e){var A=this.value;return!A||t.modified("type")?(this.value=A=function(t){var e=Hm((t||"mercator").toLowerCase());e||Object(U.n)("Unrecognized projection type: "+t);return e()}(t.type),Tm.forEach((function(e){null!=t[e]&&Lb(A,e,t[e])}))):Tm.forEach((function(e){t.modified(e)&&Lb(A,e,t[e])})),null!=t.pointRadius&&A.path.pointRadius(t.pointRadius),t.fit&&function(t,e){var A=function(t){return 1===(t=Object(U.i)(t)).length?t[0]:{type:"FeatureCollection",features:t.reduce((function(t,e){return t.concat(function(t){return"FeatureCollection"===t.type?t.features:Object(U.i)(t).filter((function(t){return null!=t})).map((function(t){return"Feature"===t.type?t:{type:"Feature",geometry:t}}))}(e))}),[])}}(e.fit);e.extent?t.fitExtent(e.extent,A):e.size&&t.fitSize(e.size,A)}(A,t),e.fork(e.NO_SOURCE|e.NO_FIELDS)};var _b=A(977),Jb=function(t){return function(){return t}},Tb=function(t){return 1e-6*(t()-.5)};function jb(t){return t.x+t.vx}function Hb(t){return t.y+t.vy}var Yb=A(879);function Vb(t){return t.index}function Zb(t,e){var A=t.get(e);if(!A)throw new Error("node not found: "+e);return A}var Wb={center:function(t,e){var A,n=1;function r(){var r,i,o=A.length,a=0,s=0;for(r=0;r<o;++r)a+=(i=A[r]).x,s+=i.y;for(a=(a/o-t)*n,s=(s/o-e)*n,r=0;r<o;++r)(i=A[r]).x-=a,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){A=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r.strength=function(t){return arguments.length?(n=+t,r):n},r},collide:function(t){var e,A,n,r=1,i=1;function o(){for(var t,o,s,g,c,I,u,l=e.length,C=0;C<i;++C)for(o=Object(_b.a)(e,jb,Hb).visitAfter(a),t=0;t<l;++t)s=e[t],I=A[s.index],u=I*I,g=s.x+s.vx,c=s.y+s.vy,o.visit(h);function h(t,e,A,i,o){var a=t.data,l=t.r,C=I+l;if(!a)return e>g+C||i<g-C||A>c+C||o<c-C;if(a.index>s.index){var h=g-a.x-a.vx,B=c-a.y-a.vy,f=h*h+B*B;f<C*C&&(0===h&&(f+=(h=Tb(n))*h),0===B&&(f+=(B=Tb(n))*B),f=(C-(f=Math.sqrt(f)))/f*r,s.vx+=(h*=f)*(C=(l*=l)/(u+l)),s.vy+=(B*=f)*C,a.vx-=h*(C=1-C),a.vy-=B*C)}}}function a(t){if(t.data)return t.r=A[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var n,r,i=e.length;for(A=new Array(i),n=0;n<i;++n)r=e[n],A[r.index]=+t(r,n,e)}}return"function"!==typeof t&&(t=Jb(null==t?1:+t)),o.initialize=function(t,A){e=t,n=A,s()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(e){return arguments.length?(t="function"===typeof e?e:Jb(+e),s(),o):t},o},nbody:function(){var t,e,A,n,r,i=Jb(-30),o=1,a=1/0,s=.81;function g(A){var r,i=t.length,o=Object(_b.a)(t,Yb.b,Yb.c).visitAfter(I);for(n=A,r=0;r<i;++r)e=t[r],o.visit(u)}function c(){if(t){var e,A,n=t.length;for(r=new Array(n),e=0;e<n;++e)A=t[e],r[A.index]=+i(A,e,t)}}function I(t){var e,A,n,i,o,a=0,s=0;if(t.length){for(n=i=o=0;o<4;++o)(e=t[o])&&(A=Math.abs(e.value))&&(a+=e.value,s+=A,n+=A*e.x,i+=A*e.y);t.x=n/s,t.y=i/s}else{(e=t).x=e.data.x,e.y=e.data.y;do{a+=r[e.data.index]}while(e=e.next)}t.value=a}function u(t,i,g,c){if(!t.value)return!0;var I=t.x-e.x,u=t.y-e.y,l=c-i,C=I*I+u*u;if(l*l/s<C)return C<a&&(0===I&&(C+=(I=Tb(A))*I),0===u&&(C+=(u=Tb(A))*u),C<o&&(C=Math.sqrt(o*C)),e.vx+=I*t.value*n/C,e.vy+=u*t.value*n/C),!0;if(!(t.length||C>=a)){(t.data!==e||t.next)&&(0===I&&(C+=(I=Tb(A))*I),0===u&&(C+=(u=Tb(A))*u),C<o&&(C=Math.sqrt(o*C)));do{t.data!==e&&(l=r[t.data.index]*n/C,e.vx+=I*l,e.vy+=u*l)}while(t=t.next)}}return g.initialize=function(e,n){t=e,A=n,c()},g.strength=function(t){return arguments.length?(i="function"===typeof t?t:Jb(+t),c(),g):i},g.distanceMin=function(t){return arguments.length?(o=t*t,g):Math.sqrt(o)},g.distanceMax=function(t){return arguments.length?(a=t*t,g):Math.sqrt(a)},g.theta=function(t){return arguments.length?(s=t*t,g):Math.sqrt(s)},g},link:function(t){var e,A,n,r,i,o,a=Vb,s=function(t){return 1/Math.min(r[t.source.index],r[t.target.index])},g=Jb(30),c=1;function I(n){for(var r=0,a=t.length;r<c;++r)for(var s,g,I,u,l,C,h,B=0;B<a;++B)g=(s=t[B]).source,u=(I=s.target).x+I.vx-g.x-g.vx||Tb(o),l=I.y+I.vy-g.y-g.vy||Tb(o),u*=C=((C=Math.sqrt(u*u+l*l))-A[B])/C*n*e[B],l*=C,I.vx-=u*(h=i[B]),I.vy-=l*h,g.vx+=u*(h=1-h),g.vy+=l*h}function u(){if(n){var o,s,g=n.length,c=t.length,I=new Map(n.map((function(t,e){return[a(t,e,n),t]})));for(o=0,r=new Array(g);o<c;++o)(s=t[o]).index=o,"object"!==typeof s.source&&(s.source=Zb(I,s.source)),"object"!==typeof s.target&&(s.target=Zb(I,s.target)),r[s.source.index]=(r[s.source.index]||0)+1,r[s.target.index]=(r[s.target.index]||0)+1;for(o=0,i=new Array(c);o<c;++o)s=t[o],i[o]=r[s.source.index]/(r[s.source.index]+r[s.target.index]);e=new Array(c),l(),A=new Array(c),C()}}function l(){if(n)for(var A=0,r=t.length;A<r;++A)e[A]=+s(t[A],A,t)}function C(){if(n)for(var e=0,r=t.length;e<r;++e)A[e]=+g(t[e],e,t)}return null==t&&(t=[]),I.initialize=function(t,e){n=t,o=e,u()},I.links=function(e){return arguments.length?(t=e,u(),I):t},I.id=function(t){return arguments.length?(a=t,I):a},I.iterations=function(t){return arguments.length?(c=+t,I):c},I.strength=function(t){return arguments.length?(s="function"===typeof t?t:Jb(+t),l(),I):s},I.distance=function(t){return arguments.length?(g="function"===typeof t?t:Jb(+t),C(),I):g},I},x:function(t){var e,A,n,r=Jb(.1);function i(t){for(var r,i=0,o=e.length;i<o;++i)(r=e[i]).vx+=(n[i]-r.x)*A[i]*t}function o(){if(e){var i,o=e.length;for(A=new Array(o),n=new Array(o),i=0;i<o;++i)A[i]=isNaN(n[i]=+t(e[i],i,e))?0:+r(e[i],i,e)}}return"function"!==typeof t&&(t=Jb(null==t?0:+t)),i.initialize=function(t){e=t,o()},i.strength=function(t){return arguments.length?(r="function"===typeof t?t:Jb(+t),o(),i):r},i.x=function(e){return arguments.length?(t="function"===typeof e?e:Jb(+e),o(),i):t},i},y:function(t){var e,A,n,r=Jb(.1);function i(t){for(var r,i=0,o=e.length;i<o;++i)(r=e[i]).vy+=(n[i]-r.y)*A[i]*t}function o(){if(e){var i,o=e.length;for(A=new Array(o),n=new Array(o),i=0;i<o;++i)A[i]=isNaN(n[i]=+t(e[i],i,e))?0:+r(e[i],i,e)}}return"function"!==typeof t&&(t=Jb(null==t?0:+t)),i.initialize=function(t){e=t,o()},i.strength=function(t){return arguments.length?(r="function"===typeof t?t:Jb(+t),o(),i):r},i.y=function(e){return arguments.length?(t="function"===typeof e?e:Jb(+e),o(),i):t},i}},Kb=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],Pb=["static","iterations"],qb=["x","y","vx","vy"];function Xb(t){lo.call(this,null,t)}Xb.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:qb}]};var zb=Object(U.y)(Xb,lo);function $b(t,e,A,n){var r,i,o,a,s=Object(U.i)(e.forces);for(r=0,i=Kb.length;r<i;++r)"forces"!==(o=Kb[r])&&e.modified(o)&&t[o](e[o]);for(r=0,i=s.length;r<i;++r)a="forces"+r,(o=A||e.modified("forces",r)?eF(s[r]):n&&tF(s[r],n)?t.force(a):null)&&t.force(a,o);for(i=t.numForces||0;r<i;++r)t.force("forces"+r,null);return t.numForces=s.length,t}function tF(t,e){var A,n;for(A in t)if(Object(U.D)(n=t[A])&&e.modified(Object(U.g)(n)))return 1;return 0}function eF(t){var e,A;for(A in Object(U.v)(Wb,t.force)||Object(U.n)("Unrecognized force: "+t.force),e=Wb[t.force](),t)Object(U.D)(e[A])&&AF(e[A],t[A],t);return e}function AF(t,e,A){t(Object(U.D)(e)?function(t){return e(t,A)}:e)}zb.transform=function(t,e){var A,n,r=this.value,i=e.changed(e.ADD_REM),o=t.modified(Kb),a=t.iterations||300;if(r?(i&&(e.modifies("index"),r.nodes(e.source)),(o||e.changed(e.MOD))&&$b(r,t,0,e)):(this.value=r=function(t,e){var A=Object(Yb.a)(t),n=!1,r=A.stop,i=A.restart;return A.stopped=function(){return n},A.restart=function(){return n=!1,i()},A.stop=function(){return n=!0,r()},$b(A,e,!0).on("end",(function(){n=!0}))}(e.source,t),r.on("tick",(A=e.dataflow,n=this,function(){A.touch(n).run()})),t.static||(i=!0,r.tick()),e.modifies("index")),o||i||t.modified(Pb)||e.changed()&&t.restart)if(r.alpha(Math.max(r.alpha(),t.alpha||1)).alphaDecay(1-Math.pow(r.alphaMin(),1/a)),t.static)for(r.stop();--a>=0;)r.tick();else if(r.stopped()&&r.restart(),!i)return e.StopPropagation;return this.finish(t,e)},zb.finish=function(t,e){for(var A,n=e.dataflow,r=this._argops,i=0,o=r.length;i<o;++i)if("forces"===(A=r[i]).name&&"link"===A.op._argval.force)for(var a,s=A.op._argops,g=0,c=s.length;g<c;++g)if("links"===s[g].name&&(a=s[g].op.source)){n.pulse(a,n.changeset().reflow());break}return e.reflow(t.modified()).modifies(qb)};var nF=function(t,e,A){var n={};return t.each((function(t){var r=t.data;A(r)&&(n[e(r)]=t)})),t.lookup=n,t};function rF(t){var e=0,A=t.children,n=A&&A.length;if(n)for(;--n>=0;)e+=A[n].value;else e=1;t.value=e}function iF(t,e){var A,n,r,i,o,a=new gF(t),s=+t.value&&(a.value=t.value),g=[a];for(null==e&&(e=oF);A=g.pop();)if(s&&(A.value=+A.data.value),(r=e(A.data))&&(o=r.length))for(A.children=new Array(o),i=o-1;i>=0;--i)g.push(n=A.children[i]=new gF(r[i])),n.parent=A,n.depth=A.depth+1;return a.eachBefore(sF)}function oF(t){return t.children}function aF(t){t.data=t.data.data}function sF(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function gF(t){this.data=t,this.depth=this.height=0,this.parent=null}function cF(t){lo.call(this,null,t)}function IF(t){return t.values}function uF(){var t,e=[];return t={entries:function(t){return function t(A,n){if(++n>e.length)return A;var r,i=[];for(r in A)i.push({key:r,values:t(A[r],n)});return i}(function t(A,n){if(n>=e.length)return A;for(var r,i,o,a=-1,s=A.length,g=e[n++],c={},I={};++a<s;)(o=c[r=g(i=A[a])+""])?o.push(i):c[r]=[i];for(r in c)I[r]=t(c[r],n);return I}(t,0),0)},key:function(A){return e.push(A),t}}}function lF(t){lo.call(this,null,t)}function CF(t,e){return t.parent===e.parent?1:2}gF.prototype=iF.prototype={constructor:gF,count:function(){return this.eachAfter(rF)},each:function(t){var e,A,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(t(i),A=i.children)for(n=0,r=A.length;n<r;++n)o.push(A[n])}while(o.length);return this},eachAfter:function(t){for(var e,A,n,r=this,i=[r],o=[];r=i.pop();)if(o.push(r),e=r.children)for(A=0,n=e.length;A<n;++A)i.push(e[A]);for(;r=o.pop();)t(r);return this},eachBefore:function(t){for(var e,A,n=this,r=[n];n=r.pop();)if(t(n),e=n.children)for(A=e.length-1;A>=0;--A)r.push(e[A]);return this},sum:function(t){return this.eachAfter((function(e){for(var A=+t(e.data)||0,n=e.children,r=n&&n.length;--r>=0;)A+=n[r].value;e.value=A}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,A=function(t,e){if(t===e)return t;var A=t.ancestors(),n=e.ancestors(),r=null;t=A.pop(),e=n.pop();for(;t===e;)r=t,t=A.pop(),e=n.pop();return r}(e,t),n=[e];e!==A;)e=e.parent,n.push(e);for(var r=n.length;t!==A;)n.splice(r,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(A){A!==t&&e.push({source:A.parent,target:A})})),e},copy:function(){return iF(this).eachBefore(aF)}},cF.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]},Object(U.y)(cF,lo).transform=function(t,e){e.source||Object(U.n)("Nest transform requires an upstream data source.");var A=t.generate,n=t.modified(),r=e.clone(),i=this.value;return(!i||n||e.changed())&&(i&&i.each((function(t){t.children&&Dt(t.data)&&r.rem.push(t.data)})),this.value=i=iF({values:Object(U.i)(t.keys).reduce((function(t,e){return t.key(e),t}),uF()).entries(r.source)},IF),A&&i.each((function(t){t.children&&(t=Gt(t.data),r.add.push(t),r.source.push(t))})),nF(i,Rt,Rt)),r.source.root=i,r},Object(U.y)(lF,lo).transform=function(t,e){e.source&&e.source.root||Object(U.n)(this.constructor.name+" transform requires a backing tree data source.");var A=this.layout(t.method),n=this.fields,r=e.source.root,i=t.as||n;t.field?r.sum(t.field):r.count(),t.sort&&r.sort(Ot(t.sort,(function(t){return t.data}))),function(t,e,A){for(var n,r=0,i=e.length;r<i;++r)(n=e[r])in A&&t[n](A[n])}(A,this.params,t),A.separation&&A.separation(!1!==t.separation?CF:U.O);try{this.value=A(r)}catch(o){Object(U.n)(o)}return r.each((function(t){!function(t,e,A){for(var n=t.data,r=0,i=e.length-1;r<i;++r)n[A[r]]=t[e[r]];n[A[i]]=t.children?t.children.length:0}(t,n,i)})),e.reflow(t.modified()).modifies(i).modifies("leaf")};var hF=Array.prototype.slice;var BF=function(t){for(var e,A,n=0,r=(t=function(t){for(var e,A,n=t.length;n;)A=Math.random()*n--|0,e=t[n],t[n]=t[A],t[A]=e;return t}(hF.call(t))).length,i=[];n<r;)e=t[n],A&&QF(A,e)?++n:(A=pF(i=fF(i,e)),n=0);return A};function fF(t,e){var A,n;if(EF(e,t))return[e];for(A=0;A<t.length;++A)if(dF(e,t[A])&&EF(yF(t[A],e),t))return[t[A],e];for(A=0;A<t.length-1;++A)for(n=A+1;n<t.length;++n)if(dF(yF(t[A],t[n]),e)&&dF(yF(t[A],e),t[n])&&dF(yF(t[n],e),t[A])&&EF(vF(t[A],t[n],e),t))return[t[A],t[n],e];throw new Error}function dF(t,e){var A=t.r-e.r,n=e.x-t.x,r=e.y-t.y;return A<0||A*A<n*n+r*r}function QF(t,e){var A=t.r-e.r+1e-6,n=e.x-t.x,r=e.y-t.y;return A>0&&A*A>n*n+r*r}function EF(t,e){for(var A=0;A<e.length;++A)if(!QF(t,e[A]))return!1;return!0}function pF(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return yF(t[0],t[1]);case 3:return vF(t[0],t[1],t[2])}var e}function yF(t,e){var A=t.x,n=t.y,r=t.r,i=e.x,o=e.y,a=e.r,s=i-A,g=o-n,c=a-r,I=Math.sqrt(s*s+g*g);return{x:(A+i+s/I*c)/2,y:(n+o+g/I*c)/2,r:(I+r+a)/2}}function vF(t,e,A){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,g=A.x,c=A.y,I=A.r,u=n-o,l=n-g,C=r-a,h=r-c,B=s-i,f=I-i,d=n*n+r*r-i*i,Q=d-o*o-a*a+s*s,E=d-g*g-c*c+I*I,p=l*C-u*h,y=(C*E-h*Q)/(2*p)-n,v=(h*B-C*f)/p,m=(l*Q-u*E)/(2*p)-r,b=(u*f-l*B)/p,F=v*v+b*b-1,w=2*(i+y*v+m*b),S=y*y+m*m-i*i,D=-(F?(w+Math.sqrt(w*w-4*F*S))/(2*F):S/w);return{x:n+y+v*D,y:r+m+b*D,r:D}}function mF(t,e,A){var n,r,i,o,a=t.x-e.x,s=t.y-e.y,g=a*a+s*s;g?(r=e.r+A.r,r*=r,o=t.r+A.r,r>(o*=o)?(n=(g+o-r)/(2*g),i=Math.sqrt(Math.max(0,o/g-n*n)),A.x=t.x-n*a-i*s,A.y=t.y-n*s+i*a):(n=(g+r-o)/(2*g),i=Math.sqrt(Math.max(0,r/g-n*n)),A.x=e.x+n*a-i*s,A.y=e.y+n*s+i*a)):(A.x=e.x+A.r,A.y=e.y)}function bF(t,e){var A=t.r+e.r-1e-6,n=e.x-t.x,r=e.y-t.y;return A>0&&A*A>n*n+r*r}function FF(t){var e=t._,A=t.next._,n=e.r+A.r,r=(e.x*A.r+A.x*e.r)/n,i=(e.y*A.r+A.y*e.r)/n;return r*r+i*i}function wF(t){this._=t,this.next=null,this.previous=null}function SF(t){if(!(r=t.length))return 0;var e,A,n,r,i,o,a,s,g,c,I;if((e=t[0]).x=0,e.y=0,!(r>1))return e.r;if(A=t[1],e.x=-A.r,A.x=e.r,A.y=0,!(r>2))return e.r+A.r;mF(A,e,n=t[2]),e=new wF(e),A=new wF(A),n=new wF(n),e.next=n.previous=A,A.next=e.previous=n,n.next=A.previous=e;t:for(a=3;a<r;++a){mF(e._,A._,n=t[a]),n=new wF(n),s=A.next,g=e.previous,c=A._.r,I=e._.r;do{if(c<=I){if(bF(s._,n._)){A=s,e.next=A,A.previous=e,--a;continue t}c+=s._.r,s=s.next}else{if(bF(g._,n._)){(e=g).next=A,A.previous=e,--a;continue t}I+=g._.r,g=g.previous}}while(s!==g.next);for(n.previous=e,n.next=A,e.next=A.previous=A=n,i=FF(e);(n=n.next)!==A;)(o=FF(n))<i&&(e=n,i=o);A=e.next}for(e=[A._],n=A;(n=n.next)!==A;)e.push(n._);for(n=BF(e),a=0;a<r;++a)(e=t[a]).x-=n.x,e.y-=n.y;return n.r}function DF(t){return null==t?null:RF(t)}function RF(t){if("function"!==typeof t)throw new Error;return t}function UF(){return 0}var GF=function(t){return function(){return t}};function NF(t){return Math.sqrt(t.value)}function kF(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function xF(t,e){return function(A){if(n=A.children){var n,r,i,o=n.length,a=t(A)*e||0;if(a)for(r=0;r<o;++r)n[r].r+=a;if(i=SF(n),a)for(r=0;r<o;++r)n[r].r-=a;A.r=i+a}}}function OF(t){return function(e){var A=e.parent;e.r*=t,A&&(e.x=A.x+t*e.x,e.y=A.y+t*e.y)}}var MF=["x","y","r","depth","children"];function LF(t){lF.call(this,t)}LF.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:MF.length,default:MF}]};var _F=Object(U.y)(LF,lF);_F.layout=function(){var t=null,e=1,A=1,n=UF;function r(r){return r.x=e/2,r.y=A/2,t?r.eachBefore(kF(t)).eachAfter(xF(n,.5)).eachBefore(OF(1)):r.eachBefore(kF(NF)).eachAfter(xF(UF,1)).eachAfter(xF(n,r.r/Math.min(e,A))).eachBefore(OF(Math.min(e,A)/(2*r.r))),r}return r.radius=function(e){return arguments.length?(t=DF(e),r):t},r.size=function(t){return arguments.length?(e=+t[0],A=+t[1],r):[e,A]},r.padding=function(t){return arguments.length?(n="function"===typeof t?t:GF(+t),r):n},r},_F.params=["radius","size","padding"],_F.fields=MF;var JF=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},TF=function(t,e,A,n,r){for(var i,o=t.children,a=-1,s=o.length,g=t.value&&(n-e)/t.value;++a<s;)(i=o[a]).y0=A,i.y1=r,i.x0=e,i.x1=e+=i.value*g},jF=["x0","y0","x1","y1","depth","children"];function HF(t){lF.call(this,t)}HF.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:jF.length,default:jF}]};var YF=Object(U.y)(HF,lF);YF.layout=function(){var t=1,e=1,A=0,n=!1;function r(r){var i=r.height+1;return r.x0=r.y0=A,r.x1=t,r.y1=e/i,r.eachBefore(function(t,e){return function(n){n.children&&TF(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var r=n.x0,i=n.y0,o=n.x1-A,a=n.y1-A;o<r&&(r=o=(r+o)/2),a<i&&(i=a=(i+a)/2),n.x0=r,n.y0=i,n.x1=o,n.y1=a}}(e,i)),n&&r.eachBefore(JF),r}return r.round=function(t){return arguments.length?(n=!!t,r):n},r.size=function(A){return arguments.length?(t=+A[0],e=+A[1],r):[t,e]},r.padding=function(t){return arguments.length?(A=+t,r):A},r},YF.params=["size","round","padding"],YF.fields=jF;var VF={depth:-1},ZF={};function WF(t){return t.id}function KF(t){return t.parentId}var PF=function(){var t=WF,e=KF;function A(A){var n,r,i,o,a,s,g,c=A.length,I=new Array(c),u={};for(r=0;r<c;++r)n=A[r],a=I[r]=new gF(n),null!=(s=t(n,r,A))&&(s+="")&&(u[g="$"+(a.id=s)]=g in u?ZF:a);for(r=0;r<c;++r)if(a=I[r],null!=(s=e(A[r],r,A))&&(s+="")){if(!(o=u["$"+s]))throw new Error("missing: "+s);if(o===ZF)throw new Error("ambiguous: "+s);o.children?o.children.push(a):o.children=[a],a.parent=o}else{if(i)throw new Error("multiple roots");i=a}if(!i)throw new Error("no root");if(i.parent=VF,i.eachBefore((function(t){t.depth=t.parent.depth+1,--c})).eachBefore(sF),i.parent=null,c>0)throw new Error("cycle");return i}return A.id=function(e){return arguments.length?(t=RF(e),A):t},A.parentId=function(t){return arguments.length?(e=RF(t),A):e},A};function qF(t){lo.call(this,null,t)}function XF(t,e){return t.parent===e.parent?1:2}function zF(t){var e=t.children;return e?e[0]:t.t}function $F(t){var e=t.children;return e?e[e.length-1]:t.t}function tw(t,e,A){var n=A/(e.i-t.i);e.c-=n,e.s+=A,t.c+=n,e.z+=A,e.m+=A}function ew(t,e,A){return t.a.parent===e.parent?t.a:A}function Aw(t,e){this._=t,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=e}qF.Definition={type:"Stratify",metadata:{treesource:!0},params:[{name:"key",type:"field",required:!0},{name:"parentKey",type:"field",required:!0}]},Object(U.y)(qF,lo).transform=function(t,e){e.source||Object(U.n)("Stratify transform requires an upstream data source.");var A=this.value,n=t.modified(),r=e.fork(e.ALL).materialize(e.SOURCE),i=!this.value||n||e.changed(e.ADD_REM)||e.modified(t.key.fields)||e.modified(t.parentKey.fields);return r.source=r.source.slice(),i&&(A=r.source.length?nF(PF().id(t.key).parentId(t.parentKey)(r.source),t.key,U.gb):nF(PF()([{}]),t.key,t.key)),r.source.root=this.value=A,r},Aw.prototype=Object.create(gF.prototype);function nw(t,e){return t.parent===e.parent?1:2}function rw(t,e){return t+e.x}function iw(t,e){return Math.max(t,e.y)}var ow={tidy:function(){var t=XF,e=1,A=1,n=null;function r(r){var s=function(t){for(var e,A,n,r,i,o=new Aw(t,0),a=[o];e=a.pop();)if(n=e._.children)for(e.children=new Array(i=n.length),r=i-1;r>=0;--r)a.push(A=e.children[r]=new Aw(n[r],r)),A.parent=e;return(o.parent=new Aw(null,0)).children=[o],o}(r);if(s.eachAfter(i),s.parent.m=-s.z,s.eachBefore(o),n)r.eachBefore(a);else{var g=r,c=r,I=r;r.eachBefore((function(t){t.x<g.x&&(g=t),t.x>c.x&&(c=t),t.depth>I.depth&&(I=t)}));var u=g===c?1:t(g,c)/2,l=u-g.x,C=e/(c.x+u+l),h=A/(I.depth||1);r.eachBefore((function(t){t.x=(t.x+l)*C,t.y=t.depth*h}))}return r}function i(e){var A=e.children,n=e.parent.children,r=e.i?n[e.i-1]:null;if(A){!function(t){for(var e,A=0,n=0,r=t.children,i=r.length;--i>=0;)(e=r[i]).z+=A,e.m+=A,A+=e.s+(n+=e.c)}(e);var i=(A[0].z+A[A.length-1].z)/2;r?(e.z=r.z+t(e._,r._),e.m=e.z-i):e.z=i}else r&&(e.z=r.z+t(e._,r._));e.parent.A=function(e,A,n){if(A){for(var r,i=e,o=e,a=A,s=i.parent.children[0],g=i.m,c=o.m,I=a.m,u=s.m;a=$F(a),i=zF(i),a&&i;)s=zF(s),(o=$F(o)).a=e,(r=a.z+I-i.z-g+t(a._,i._))>0&&(tw(ew(a,e,n),e,r),g+=r,c+=r),I+=a.m,g+=i.m,u+=s.m,c+=o.m;a&&!$F(o)&&(o.t=a,o.m+=I-c),i&&!zF(s)&&(s.t=i,s.m+=g-u,n=e)}return n}(e,r,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=e,t.y=t.depth*A}return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(t){return arguments.length?(n=!1,e=+t[0],A=+t[1],r):n?null:[e,A]},r.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],A=+t[1],r):n?[e,A]:null},r},cluster:function(){var t=nw,e=1,A=1,n=!1;function r(r){var i,o=0;r.eachAfter((function(e){var A=e.children;A?(e.x=function(t){return t.reduce(rw,0)/t.length}(A),e.y=function(t){return 1+t.reduce(iw,0)}(A)):(e.x=i?o+=t(e,i):0,e.y=0,i=e)}));var a=function(t){for(var e;e=t.children;)t=e[0];return t}(r),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(r),g=a.x-t(a,s)/2,c=s.x+t(s,a)/2;return r.eachAfter(n?function(t){t.x=(t.x-r.x)*e,t.y=(r.y-t.y)*A}:function(t){t.x=(t.x-g)/(c-g)*e,t.y=(1-(r.y?t.y/r.y:1))*A})}return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(t){return arguments.length?(n=!1,e=+t[0],A=+t[1],r):n?null:[e,A]},r.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],A=+t[1],r):n?[e,A]:null},r}},aw=["x","y","depth","children"];function sw(t){lF.call(this,t)}sw.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:aw.length,default:aw}]};var gw=Object(U.y)(sw,lF);function cw(t){lo.call(this,[],t)}gw.layout=function(t){var e=t||"tidy";if(Object(U.v)(ow,e))return ow[e]();Object(U.n)("Unrecognized Tree layout method: "+e)},gw.params=["size","nodeSize"],gw.fields=aw,cw.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},Object(U.y)(cw,lo).transform=function(t,e){var A=this.value,n=e.source&&e.source.root,r=e.fork(e.NO_SOURCE),i={};return n||Object(U.n)("TreeLinks transform requires a tree data source."),e.changed(e.ADD_REM)?(r.rem=A,e.visit(e.SOURCE,(function(t){i[Rt(t)]=1})),n.each((function(t){var e=t.data,A=t.parent&&t.parent.data;A&&i[Rt(e)]&&i[Rt(A)]&&r.add.push(Gt({source:A,target:e}))})),this.value=r.add):e.changed(e.MOD)&&(e.visit(e.MOD,(function(t){i[Rt(t)]=1})),A.forEach((function(t){(i[Rt(t.source)]||i[Rt(t.target)])&&r.mod.push(t)}))),r};var Iw=function(t,e,A,n,r){for(var i,o=t.children,a=-1,s=o.length,g=t.value&&(r-A)/t.value;++a<s;)(i=o[a]).x0=e,i.x1=n,i.y0=A,i.y1=A+=i.value*g},uw=(1+Math.sqrt(5))/2;function lw(t,e,A,n,r,i){for(var o,a,s,g,c,I,u,l,C,h,B,f=[],d=e.children,Q=0,E=0,p=d.length,y=e.value;Q<p;){s=r-A,g=i-n;do{c=d[E++].value}while(!c&&E<p);for(I=u=c,B=c*c*(h=Math.max(g/s,s/g)/(y*t)),C=Math.max(u/B,B/I);E<p;++E){if(c+=a=d[E].value,a<I&&(I=a),a>u&&(u=a),B=c*c*h,(l=Math.max(u/B,B/I))>C){c-=a;break}C=l}f.push(o={value:c,dice:s<g,children:d.slice(Q,E)}),o.dice?TF(o,A,n,r,y?n+=g*c/y:i):Iw(o,A,n,y?A+=s*c/y:r,i),y-=c,Q=E}return f}var Cw=function t(e){function A(t,A,n,r,i){lw(e,t,A,n,r,i)}return A.ratio=function(e){return t((e=+e)>1?e:1)},A}(uw),hw=function t(e){function A(t,A,n,r,i){if((o=t._squarify)&&o.ratio===e)for(var o,a,s,g,c,I=-1,u=o.length,l=t.value;++I<u;){for(s=(a=o[I]).children,g=a.value=0,c=s.length;g<c;++g)a.value+=s[g].value;a.dice?TF(a,A,n,r,n+=(i-n)*a.value/l):Iw(a,A,n,A+=(r-A)*a.value/l,i),l-=a.value}else t._squarify=o=lw(e,t,A,n,r,i),o.ratio=e}return A.ratio=function(e){return t((e=+e)>1?e:1)},A}(uw),Bw={binary:function(t,e,A,n,r){var i,o,a=t.children,s=a.length,g=new Array(s+1);for(g[0]=o=i=0;i<s;++i)g[i+1]=o+=a[i].value;!function t(e,A,n,r,i,o,s){if(e>=A-1){var c=a[e];return c.x0=r,c.y0=i,c.x1=o,void(c.y1=s)}var I=g[e],u=n/2+I,l=e+1,C=A-1;for(;l<C;){var h=l+C>>>1;g[h]<u?l=h+1:C=h}u-g[l-1]<g[l]-u&&e+1<l&&--l;var B=g[l]-I,f=n-B;if(o-r>s-i){var d=(r*f+o*B)/n;t(e,l,B,r,i,d,s),t(l,A,f,d,i,o,s)}else{var Q=(i*f+s*B)/n;t(e,l,B,r,i,o,Q),t(l,A,f,r,Q,o,s)}}(0,s,t.value,e,A,n,r)},dice:TF,slice:Iw,slicedice:function(t,e,A,n,r){(1&t.depth?Iw:TF)(t,e,A,n,r)},squarify:Cw,resquarify:hw},fw=["x0","y0","x1","y1","depth","children"];function dw(t){lF.call(this,t)}dw.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:fw.length,default:fw}]};var Qw=Object(U.y)(dw,lF);Qw.layout=function(){var t=function(){var t=Cw,e=!1,A=1,n=1,r=[0],i=UF,o=UF,a=UF,s=UF,g=UF;function c(t){return t.x0=t.y0=0,t.x1=A,t.y1=n,t.eachBefore(I),r=[0],e&&t.eachBefore(JF),t}function I(e){var A=r[e.depth],n=e.x0+A,c=e.y0+A,I=e.x1-A,u=e.y1-A;I<n&&(n=I=(n+I)/2),u<c&&(c=u=(c+u)/2),e.x0=n,e.y0=c,e.x1=I,e.y1=u,e.children&&(A=r[e.depth+1]=i(e)/2,n+=g(e)-A,c+=o(e)-A,(I-=a(e)-A)<n&&(n=I=(n+I)/2),(u-=s(e)-A)<c&&(c=u=(c+u)/2),t(e,n,c,I,u))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(A=+t[0],n=+t[1],c):[A,n]},c.tile=function(e){return arguments.length?(t=RF(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(i="function"===typeof t?t:GF(+t),c):i},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o="function"===typeof t?t:GF(+t),c):o},c.paddingRight=function(t){return arguments.length?(a="function"===typeof t?t:GF(+t),c):a},c.paddingBottom=function(t){return arguments.length?(s="function"===typeof t?t:GF(+t),c):s},c.paddingLeft=function(t){return arguments.length?(g="function"===typeof t?t:GF(+t),c):g},c}();return t.ratio=function(e){var A=t.tile();A.ratio&&t.tile(A.ratio(e))},t.method=function(e){Object(U.v)(Bw,e)?t.tile(Bw[e]):Object(U.n)("Unrecognized Treemap layout method: "+e)},t},Qw.params=["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],Qw.fields=fw;var Ew=function(t,e){var A,n,r,i,o,a,s=[],g=function(t){return t(i)};if(null==e)s.push(t);else for(A={},n=0,r=t.length;n<r;++n)i=t[n],(a=A[o=e.map(g)])||(A[o]=a=[],a.dims=o,s.push(a)),a.push(i);return s};function pw(t){lo.call(this,null,t)}pw.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(U.y)(pw,lo).transform=function(t,e){var A=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){var n=e.materialize(e.SOURCE).source,r=Ew(n,t.groupby),i=(t.groupby||[]).map(U.h),o=i.length,a=t.as||[Object(U.h)(t.x),Object(U.h)(t.y)],s=[];r.forEach((function(e){Ua(e,t.x,t.y,t.bandwidth||.3).forEach((function(t){for(var A={},n=0;n<o;++n)A[i[n]]=e.dims[n];A[a[0]]=t[0],A[a[1]]=t[1],s.push(Gt(A))}))})),this.value&&(A.rem=this.value),this.value=A.add=A.source=s}return A};var yw={linear:va,log:ma,exp:Fa,pow:wa,quad:Sa,poly:Da};function vw(t){lo.call(this,null,t)}vw.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(yw)},{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(U.y)(vw,lo).transform=function(t,e){var A=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){var n=e.materialize(e.SOURCE).source,r=Ew(n,t.groupby),i=(t.groupby||[]).map(U.h),o=t.method||"linear",a=t.order||3,s=function(t,e){return"poly"===t?e:"quad"===t?2:1}(o,a),g=t.as||[Object(U.h)(t.x),Object(U.h)(t.y)],c=yw[o],I=[],u=t.extent;Object(U.v)(yw,o)||Object(U.n)("Invalid regression method: "+o),null!=u&&"log"===o&&u[0]<=0&&(e.dataflow.warn("Ignoring extent with values <= 0 for log regression."),u=null),r.forEach((function(A){if(A.length<=s)e.dataflow.warn("Skipping regression with more parameters than data points.");else{var n=c(A,t.x,t.y,a);if(t.params)I.push(Gt({keys:A.dims,coef:n.coef,rSquared:n.rSquared}));else{var r=u||Object(U.p)(A,t.x),l=function(t){for(var e={},n=0;n<i.length;++n)e[i[n]]=A.dims[n];e[g[0]]=t[0],e[g[1]]=t[1],I.push(Gt(e))};"linear"===o?r.forEach((function(t){return l([t,n.predict(t)])})):xa(n.predict,r,25,200).forEach(l)}}})),this.value&&(A.rem=this.value),this.value=A.add=A.source=I}return A};var mw=Math.pow(2,-52),bw=new Uint32Array(512),Fw=function(){function t(e){Object(F.a)(this,t);var A=e.length>>1;if(A>0&&"number"!==typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;var n=Math.max(2*A-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(A)),this._hullPrev=new Uint32Array(A),this._hullNext=new Uint32Array(A),this._hullTri=new Uint32Array(A),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(A),this._dists=new Float64Array(A),this.update()}return Object(w.a)(t,null,[{key:"from",value:function(e){for(var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kw,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:xw,r=e.length,i=new Float64Array(2*r),o=0;o<r;o++){var a=e[o];i[2*o]=A(a),i[2*o+1]=n(a)}return new t(i)}}]),Object(w.a)(t,[{key:"update",value:function(){for(var t=this.coords,e=this._hullPrev,A=this._hullNext,n=this._hullTri,r=this._hullHash,i=t.length>>1,o=1/0,a=1/0,s=-1/0,g=-1/0,c=0;c<i;c++){var I=t[2*c],u=t[2*c+1];I<o&&(o=I),u<a&&(a=u),I>s&&(s=I),u>g&&(g=u),this._ids[c]=c}for(var l,C,h,B=(o+s)/2,f=(a+g)/2,d=1/0,Q=0;Q<i;Q++){var E=ww(B,f,t[2*Q],t[2*Q+1]);E<d&&(l=Q,d=E)}var p=t[2*l],y=t[2*l+1];d=1/0;for(var v=0;v<i;v++)if(v!==l){var m=ww(p,y,t[2*v],t[2*v+1]);m<d&&m>0&&(C=v,d=m)}for(var b=t[2*C],F=t[2*C+1],w=1/0,S=0;S<i;S++)if(S!==l&&S!==C){var D=Uw(p,y,b,F,t[2*S],t[2*S+1]);D<w&&(h=S,w=D)}var R=t[2*h],U=t[2*h+1];if(w===1/0){for(var G=0;G<i;G++)this._dists[G]=t[2*G]-t[0]||t[2*G+1]-t[1];Gw(this._ids,this._dists,0,i-1);for(var N=new Uint32Array(i),k=0,x=0,O=-1/0;x<i;x++){var M=this._ids[x];this._dists[M]>O&&(N[k++]=M,O=this._dists[M])}return this.hull=N.subarray(0,k),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Dw(p,y,b,F,R,U)){var L=C,_=b,J=F;C=h,b=R,F=U,h=L,R=_,U=J}var T=function(t,e,A,n,r,i){var o=A-t,a=n-e,s=r-t,g=i-e,c=o*o+a*a,I=s*s+g*g,u=.5/(o*g-a*s);return{x:t+(g*c-a*I)*u,y:e+(o*I-s*c)*u}}(p,y,b,F,R,U);this._cx=T.x,this._cy=T.y;for(var j=0;j<i;j++)this._dists[j]=ww(t[2*j],t[2*j+1],T.x,T.y);Gw(this._ids,this._dists,0,i-1),this._hullStart=l;var H=3;A[l]=e[h]=C,A[C]=e[l]=h,A[h]=e[C]=l,n[l]=0,n[C]=1,n[h]=2,r.fill(-1),r[this._hashKey(p,y)]=l,r[this._hashKey(b,F)]=C,r[this._hashKey(R,U)]=h,this.trianglesLen=0,this._addTriangle(l,C,h,-1,-1,-1);for(var Y,V,Z=0;Z<this._ids.length;Z++){var W=this._ids[Z],K=t[2*W],P=t[2*W+1];if(!(Z>0&&Math.abs(K-Y)<=mw&&Math.abs(P-V)<=mw)&&(Y=K,V=P,W!==l&&W!==C&&W!==h)){for(var q=0,X=0,z=this._hashKey(K,P);X<this._hashSize&&(-1===(q=r[(z+X)%this._hashSize])||q===A[q]);X++);for(var $=q=e[q],tt=void 0;tt=A[$],!Dw(K,P,t[2*$],t[2*$+1],t[2*tt],t[2*tt+1]);)if(($=tt)===q){$=-1;break}if(-1!==$){var et=this._addTriangle($,W,A[$],-1,-1,n[$]);n[W]=this._legalize(et+2),n[$]=et,H++;for(var At=A[$];tt=A[At],Dw(K,P,t[2*At],t[2*At+1],t[2*tt],t[2*tt+1]);)et=this._addTriangle(At,W,tt,n[W],-1,n[At]),n[W]=this._legalize(et+2),A[At]=At,H--,At=tt;if($===q)for(;Dw(K,P,t[2*(tt=e[$])],t[2*tt+1],t[2*$],t[2*$+1]);)et=this._addTriangle(tt,W,$,-1,n[$],n[tt]),this._legalize(et+2),n[tt]=et,A[$]=$,H--,$=tt;this._hullStart=e[W]=$,A[$]=e[At]=W,A[W]=At,r[this._hashKey(K,P)]=W,r[this._hashKey(t[2*$],t[2*$+1])]=$}}}this.hull=new Uint32Array(H);for(var nt=0,rt=this._hullStart;nt<H;nt++)this.hull[nt]=rt,rt=A[rt];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}},{key:"_hashKey",value:function(t,e){return Math.floor(function(t,e){var A=t/(Math.abs(t)+Math.abs(e));return(e>0?3-A:1+A)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}},{key:"_legalize",value:function(t){for(var e=this._triangles,A=this._halfedges,n=this.coords,r=0,i=0;;){var o=A[t],a=t-t%3;if(i=a+(t+2)%3,-1!==o){var s=o-o%3,g=a+(t+1)%3,c=s+(o+2)%3,I=e[i],u=e[t],l=e[g],C=e[c];if(Rw(n[2*I],n[2*I+1],n[2*u],n[2*u+1],n[2*l],n[2*l+1],n[2*C],n[2*C+1])){e[t]=C,e[o]=I;var h=A[c];if(-1===h){var B=this._hullStart;do{if(this._hullTri[B]===c){this._hullTri[B]=t;break}B=this._hullPrev[B]}while(B!==this._hullStart)}this._link(t,h),this._link(o,A[i]),this._link(i,c);var f=s+(o+1)%3;r<bw.length&&(bw[r++]=f)}else{if(0===r)break;t=bw[--r]}}else{if(0===r)break;t=bw[--r]}}return i}},{key:"_link",value:function(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}},{key:"_addTriangle",value:function(t,e,A,n,r,i){var o=this.trianglesLen;return this._triangles[o]=t,this._triangles[o+1]=e,this._triangles[o+2]=A,this._link(o,n),this._link(o+1,r),this._link(o+2,i),this.trianglesLen+=3,o}}]),t}();function ww(t,e,A,n){var r=t-A,i=e-n;return r*r+i*i}function Sw(t,e,A,n,r,i){var o=(n-e)*(r-t),a=(A-t)*(i-e);return Math.abs(o-a)>=33306690738754716e-32*Math.abs(o+a)?o-a:0}function Dw(t,e,A,n,r,i){return(Sw(r,i,t,e,A,n)||Sw(t,e,A,n,r,i)||Sw(A,n,r,i,t,e))<0}function Rw(t,e,A,n,r,i,o,a){var s=t-o,g=e-a,c=A-o,I=n-a,u=r-o,l=i-a,C=c*c+I*I,h=u*u+l*l;return s*(I*h-C*l)-g*(c*h-C*u)+(s*s+g*g)*(c*l-I*u)<0}function Uw(t,e,A,n,r,i){var o=A-t,a=n-e,s=r-t,g=i-e,c=o*o+a*a,I=s*s+g*g,u=.5/(o*g-a*s),l=(g*c-a*I)*u,C=(o*I-s*c)*u;return l*l+C*C}function Gw(t,e,A,n){if(n-A<=20)for(var r=A+1;r<=n;r++){for(var i=t[r],o=e[i],a=r-1;a>=A&&e[t[a]]>o;)t[a+1]=t[a--];t[a+1]=i}else{var s=A+1,g=n;Nw(t,A+n>>1,s),e[t[A]]>e[t[n]]&&Nw(t,A,n),e[t[s]]>e[t[n]]&&Nw(t,s,n),e[t[A]]>e[t[s]]&&Nw(t,A,s);for(var c=t[s],I=e[c];;){do{s++}while(e[t[s]]<I);do{g--}while(e[t[g]]>I);if(g<s)break;Nw(t,s,g)}t[A+1]=t[g],t[g]=c,n-s+1>=g-A?(Gw(t,e,s,n),Gw(t,e,A,g-1)):(Gw(t,e,A,g-1),Gw(t,e,s,n))}}function Nw(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function kw(t){return t[0]}function xw(t){return t[1]}var Ow=function(){function t(){Object(F.a)(this,t),this._x0=this._y0=this._x1=this._y1=null,this._=""}return Object(w.a)(t,[{key:"moveTo",value:function(t,e){this._+="M".concat(this._x0=this._x1=+t,",").concat(this._y0=this._y1=+e)}},{key:"closePath",value:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}},{key:"lineTo",value:function(t,e){this._+="L".concat(this._x1=+t,",").concat(this._y1=+e)}},{key:"arc",value:function(t,e,A){var n=(t=+t)+(A=+A),r=e=+e;if(A<0)throw new Error("negative radius");null===this._x1?this._+="M".concat(n,",").concat(r):(Math.abs(this._x1-n)>1e-6||Math.abs(this._y1-r)>1e-6)&&(this._+="L"+n+","+r),A&&(this._+="A".concat(A,",").concat(A,",0,1,1,").concat(t-A,",").concat(e,"A").concat(A,",").concat(A,",0,1,1,").concat(this._x1=n,",").concat(this._y1=r))}},{key:"rect",value:function(t,e,A,n){this._+="M".concat(this._x0=this._x1=+t,",").concat(this._y0=this._y1=+e,"h").concat(+A,"v").concat(+n,"h").concat(-A,"Z")}},{key:"value",value:function(){return this._||null}}]),t}(),Mw=function(){function t(){Object(F.a)(this,t),this._=[]}return Object(w.a)(t,[{key:"moveTo",value:function(t,e){this._.push([t,e])}},{key:"closePath",value:function(){this._.push(this._[0].slice())}},{key:"lineTo",value:function(t,e){this._.push([t,e])}},{key:"value",value:function(){return this._.length?this._:null}}]),t}(),Lw=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,960,500],n=Object(ba.a)(A,4),r=n[0],i=n[1],o=n[2],a=n[3];if(Object(F.a)(this,t),!((o=+o)>=(r=+r))||!((a=+a)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=o,this.xmin=r,this.ymax=a,this.ymin=i,this._init()}return Object(w.a)(t,[{key:"update",value:function(){return this.delaunay.update(),this._init(),this}},{key:"_init",value:function(){for(var t,e,A=this.delaunay,n=A.points,r=A.hull,i=A.triangles,o=this.vectors,a=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2),s=0,g=0,c=i.length;s<c;s+=3,g+=2){var I=2*i[s],u=2*i[s+1],l=2*i[s+2],C=n[I],h=n[I+1],B=n[u],f=n[u+1],d=n[l],Q=n[l+1],E=B-C,p=f-h,y=d-C,v=Q-h,m=E*E+p*p,b=y*y+v*v,F=2*(E*v-p*y);if(F)if(Math.abs(F)<1e-8)t=(C+d)/2,e=(h+Q)/2;else{var w=1/F;t=C+(v*m-p*b)*w,e=h+(E*b-y*m)*w}else t=(C+d)/2-1e8*v,e=(h+Q)/2+1e8*y;a[g]=t,a[g+1]=e}var S,D,R,U=r[r.length-1],G=4*U,N=n[2*U],k=n[2*U+1];o.fill(0);for(var x=0;x<r.length;++x)S=G,D=N,R=k,G=4*(U=r[x]),N=n[2*U],k=n[2*U+1],o[S+2]=o[G]=R-k,o[S+3]=o[G+1]=N-D}},{key:"render",value:function(t){var e=null==t?t=new Ow:void 0,A=this.delaunay,n=A.halfedges,r=A.inedges,i=A.hull,o=this.circumcenters,a=this.vectors;if(i.length<=1)return null;for(var s=0,g=n.length;s<g;++s){var c=n[s];if(!(c<s)){var I=2*Math.floor(s/3),u=2*Math.floor(c/3),l=o[I],C=o[I+1],h=o[u],B=o[u+1];this._renderSegment(l,C,h,B,t)}}for(var f,d=i[i.length-1],Q=0;Q<i.length;++Q){f=d,d=i[Q];var E=2*Math.floor(r[d]/3),p=o[E],y=o[E+1],v=4*f,m=this._project(p,y,a[v+2],a[v+3]);m&&this._renderSegment(p,y,m[0],m[1],t)}return e&&e.value()}},{key:"renderBounds",value:function(t){var e=null==t?t=new Ow:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),e&&e.value()}},{key:"renderCell",value:function(t,e){var A=null==e?e=new Ow:void 0,n=this._clip(t);if(null!==n&&n.length){e.moveTo(n[0],n[1]);for(var r=n.length;n[0]===n[r-2]&&n[1]===n[r-1]&&r>1;)r-=2;for(var i=2;i<r;i+=2)n[i]===n[i-2]&&n[i+1]===n[i-1]||e.lineTo(n[i],n[i+1]);return e.closePath(),A&&A.value()}}},{key:"cellPolygons",value:H.a.mark((function t(){var e,A,n,r;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.delaunay.points,A=0,n=e.length/2;case 2:if(!(A<n)){t.next=11;break}if(!(r=this.cellPolygon(A))){t.next=8;break}return r.index=A,t.next=8,r;case 8:++A,t.next=2;break;case 11:case"end":return t.stop()}}),t,this)}))},{key:"cellPolygon",value:function(t){var e=new Mw;return this.renderCell(t,e),e.value()}},{key:"_renderSegment",value:function(t,e,A,n,r){var i,o=this._regioncode(t,e),a=this._regioncode(A,n);0===o&&0===a?(r.moveTo(t,e),r.lineTo(A,n)):(i=this._clipSegment(t,e,A,n,o,a))&&(r.moveTo(i[0],i[1]),r.lineTo(i[2],i[3]))}},{key:"contains",value:function(t,e,A){return(e=+e)===e&&(A=+A)===A&&this.delaunay._step(t,e,A)===t}},{key:"neighbors",value:H.a.mark((function t(e){var A,n,r,i,o,a,s,g,c;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(A=this._clip(e))){t.next=33;break}n=Object(R.a)(this.delaunay.neighbors(e)),t.prev=3,n.s();case 5:if((r=n.n()).done){t.next=25;break}if(i=r.value,!(o=this._clip(i))){t.next=23;break}a=0,s=A.length;case 10:if(!(a<s)){t.next=23;break}g=0,c=o.length;case 12:if(!(g<c)){t.next=20;break}if(A[a]!=o[g]||A[a+1]!=o[g+1]||A[(a+2)%s]!=o[(g+c-2)%c]||A[(a+3)%s]!=o[(g+c-1)%c]){t.next=17;break}return t.next=16,i;case 16:return t.abrupt("break",23);case 17:g+=2,t.next=12;break;case 20:a+=2,t.next=10;break;case 23:t.next=5;break;case 25:t.next=30;break;case 27:t.prev=27,t.t0=t.catch(3),n.e(t.t0);case 30:return t.prev=30,n.f(),t.finish(30);case 33:case"end":return t.stop()}}),t,this,[[3,27,30,33]])}))},{key:"_cell",value:function(t){var e=this.circumcenters,A=this.delaunay,n=A.inedges,r=A.halfedges,i=A.triangles,o=n[t];if(-1===o)return null;var a=[],s=o;do{var g=Math.floor(s/3);if(a.push(e[2*g],e[2*g+1]),i[s=s%3===2?s-2:s+1]!==t)break;s=r[s]}while(s!==o&&-1!==s);return a}},{key:"_clip",value:function(t){if(0===t&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];var e=this._cell(t);if(null===e)return null;var A=this.vectors,n=4*t;return A[n]||A[n+1]?this._clipInfinite(t,e,A[n],A[n+1],A[n+2],A[n+3]):this._clipFinite(t,e)}},{key:"_clipFinite",value:function(t,e){for(var A,n,r,i,o,a=e.length,s=null,g=e[a-2],c=e[a-1],I=this._regioncode(g,c),u=0;u<a;u+=2)if(A=g,n=c,g=e[u],c=e[u+1],r=I,I=this._regioncode(g,c),0===r&&0===I)i=o,o=0,s?s.push(g,c):s=[g,c];else{var l=void 0,C=void 0,h=void 0,B=void 0,f=void 0;if(0===r){if(null===(l=this._clipSegment(A,n,g,c,r,I)))continue;var d=l,Q=Object(ba.a)(d,4);C=Q[0],h=Q[1],B=Q[2],f=Q[3]}else{if(null===(l=this._clipSegment(g,c,A,n,I,r)))continue;var E=l,p=Object(ba.a)(E,4);B=p[0],f=p[1],C=p[2],h=p[3],i=o,o=this._edgecode(C,h),i&&o&&this._edge(t,i,o,s,s.length),s?s.push(C,h):s=[C,h]}i=o,o=this._edgecode(B,f),i&&o&&this._edge(t,i,o,s,s.length),s?s.push(B,f):s=[B,f]}if(s)i=o,o=this._edgecode(s[0],s[1]),i&&o&&this._edge(t,i,o,s,s.length);else if(this.contains(t,(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 s}},{key:"_clipSegment",value:function(t,e,A,n,r,i){for(;;){if(0===r&&0===i)return[t,e,A,n];if(r&i)return null;var o=void 0,a=void 0,s=r||i;8&s?(o=t+(A-t)*(this.ymax-e)/(n-e),a=this.ymax):4&s?(o=t+(A-t)*(this.ymin-e)/(n-e),a=this.ymin):2&s?(a=e+(n-e)*(this.xmax-t)/(A-t),o=this.xmax):(a=e+(n-e)*(this.xmin-t)/(A-t),o=this.xmin),r?(t=o,e=a,r=this._regioncode(t,e)):(A=o,n=a,i=this._regioncode(A,n))}}},{key:"_clipInfinite",value:function(t,e,A,n,r,i){var o,a=Array.from(e);if((o=this._project(a[0],a[1],A,n))&&a.unshift(o[0],o[1]),(o=this._project(a[a.length-2],a[a.length-1],r,i))&&a.push(o[0],o[1]),a=this._clipFinite(t,a))for(var s,g=0,c=a.length,I=this._edgecode(a[c-2],a[c-1]);g<c;g+=2)s=I,I=this._edgecode(a[g],a[g+1]),s&&I&&(g=this._edge(t,s,I,a,g),c=a.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(a=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return a}},{key:"_edge",value:function(t,e,A,n,r){for(;e!==A;){var i=void 0,o=void 0;switch(e){case 5:e=4;continue;case 4:e=6,i=this.xmax,o=this.ymin;break;case 6:e=2;continue;case 2:e=10,i=this.xmax,o=this.ymax;break;case 10:e=8;continue;case 8:e=9,i=this.xmin,o=this.ymax;break;case 9:e=1;continue;case 1:e=5,i=this.xmin,o=this.ymin}n[r]===i&&n[r+1]===o||!this.contains(t,i,o)||(n.splice(r,0,i,o),r+=2)}if(n.length>4)for(var a=0;a<n.length;a+=2){var s=(a+2)%n.length,g=(a+4)%n.length;(n[a]===n[s]&&n[s]===n[g]||n[a+1]===n[s+1]&&n[s+1]===n[g+1])&&(n.splice(s,2),a-=2)}return r}},{key:"_project",value:function(t,e,A,n){var r,i,o,a=1/0;if(n<0){if(e<=this.ymin)return null;(r=(this.ymin-e)/n)<a&&(o=this.ymin,i=t+(a=r)*A)}else if(n>0){if(e>=this.ymax)return null;(r=(this.ymax-e)/n)<a&&(o=this.ymax,i=t+(a=r)*A)}if(A>0){if(t>=this.xmax)return null;(r=(this.xmax-t)/A)<a&&(i=this.xmax,o=e+(a=r)*n)}else if(A<0){if(t<=this.xmin)return null;(r=(this.xmin-t)/A)<a&&(i=this.xmin,o=e+(a=r)*n)}return[i,o]}},{key:"_edgecode",value:function(t,e){return(t===this.xmin?1:t===this.xmax?2:0)|(e===this.ymin?4:e===this.ymax?8:0)}},{key:"_regioncode",value:function(t,e){return(t<this.xmin?1:t>this.xmax?2:0)|(e<this.ymin?4:e>this.ymax?8:0)}}]),t}(),_w=H.a.mark(Ww),Jw=2*Math.PI,Tw=Math.pow;function jw(t){return t[0]}function Hw(t){return t[1]}function Yw(t,e,A){return[t+Math.sin(t+e)*A,e+Math.cos(t-e)*A]}var Vw=function(){function t(e){Object(F.a)(this,t),this._delaunator=new Fw(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}return Object(w.a)(t,null,[{key:"from",value:function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:jw,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Hw,r=arguments.length>3?arguments[3]:void 0;return new t("length"in e?Zw(e,A,n,r):Float64Array.from(Ww(e,A,n,r)))}}]),Object(w.a)(t,[{key:"update",value:function(){return this._delaunator.update(),this._init(),this}},{key:"_init",value:function(){var t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&function(t){for(var e=t.triangles,A=t.coords,n=0;n<e.length;n+=3){var r=2*e[n],i=2*e[n+1],o=2*e[n+2];if((A[o]-A[r])*(A[i+1]-A[r+1])-(A[i]-A[r])*(A[o+1]-A[r+1])>1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},(function(t,e){return e})).sort((function(t,A){return e[2*t]-e[2*A]||e[2*t+1]-e[2*A+1]}));for(var A=this.collinear[0],n=this.collinear[this.collinear.length-1],r=[e[2*A],e[2*A+1],e[2*n],e[2*n+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]),o=0,a=e.length/2;o<a;++o){var s=Yw(e[2*o],e[2*o+1],i);e[2*o]=s[0],e[2*o+1]=s[1]}this._delaunator=new Fw(e)}else delete this.collinear;for(var g=this.halfedges=this._delaunator.halfedges,c=this.hull=this._delaunator.hull,I=this.triangles=this._delaunator.triangles,u=this.inedges.fill(-1),l=this._hullIndex.fill(-1),C=0,h=g.length;C<h;++C){var B=I[C%3===2?C-2:C+1];-1!==g[C]&&-1!==u[B]||(u[B]=C)}for(var f=0,d=c.length;f<d;++f)l[c[f]]=f;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],u[c[0]]=1,2===c.length&&(u[c[1]]=0))}},{key:"voronoi",value:function(t){return new Lw(this,t)}},{key:"neighbors",value:H.a.mark((function t(e){var A,n,r,i,o,a,s,g,c,I,u;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=this.inedges,n=this.hull,r=this._hullIndex,i=this.halfedges,o=this.triangles,!(a=this.collinear)){t.next=10;break}if(!((s=a.indexOf(e))>0)){t.next=6;break}return t.next=6,a[s-1];case 6:if(!(s<a.length-1)){t.next=9;break}return t.next=9,a[s+1];case 9:return t.abrupt("return");case 10:if(-1!==(g=A[e])){t.next=13;break}return t.abrupt("return");case 13:c=g,I=-1;case 14:return t.next=16,I=o[c];case 16:if(o[c=c%3===2?c-2:c+1]===e){t.next=19;break}return t.abrupt("return");case 19:if(-1!==(c=i[c])){t.next=26;break}if((u=n[(r[e]+1)%n.length])===I){t.next=25;break}return t.next=25,u;case 25:return t.abrupt("return");case 26:if(c!==g){t.next=14;break}case 27:case"end":return t.stop()}}),t,this)}))},{key:"find",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if((t=+t)!==t||(e=+e)!==e)return-1;for(var n,r=A;(n=this._step(A,t,e))>=0&&n!==A&&n!==r;)A=n;return n}},{key:"_step",value:function(t,e,A){var n=this.inedges,r=this.hull,i=this._hullIndex,o=this.halfedges,a=this.triangles,s=this.points;if(-1===n[t]||!s.length)return(t+1)%(s.length>>1);var g=t,c=Tw(e-s[2*t],2)+Tw(A-s[2*t+1],2),I=n[t],u=I;do{var l=a[u],C=Tw(e-s[2*l],2)+Tw(A-s[2*l+1],2);if(C<c&&(c=C,g=l),a[u=u%3===2?u-2:u+1]!==t)break;if(-1===(u=o[u])){if((u=r[(i[t]+1)%r.length])!==l&&Tw(e-s[2*u],2)+Tw(A-s[2*u+1],2)<c)return u;break}}while(u!==I);return g}},{key:"render",value:function(t){for(var e=null==t?t=new Ow:void 0,A=this.points,n=this.halfedges,r=this.triangles,i=0,o=n.length;i<o;++i){var a=n[i];if(!(a<i)){var s=2*r[i],g=2*r[a];t.moveTo(A[s],A[s+1]),t.lineTo(A[g],A[g+1])}}return this.renderHull(t),e&&e.value()}},{key:"renderPoints",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,A=null==t?t=new Ow:void 0,n=this.points,r=0,i=n.length;r<i;r+=2){var o=n[r],a=n[r+1];t.moveTo(o+e,a),t.arc(o,a,e,0,Jw)}return A&&A.value()}},{key:"renderHull",value:function(t){var e=null==t?t=new Ow:void 0,A=this.hull,n=this.points,r=2*A[0],i=A.length;t.moveTo(n[r],n[r+1]);for(var o=1;o<i;++o){var a=2*A[o];t.lineTo(n[a],n[a+1])}return t.closePath(),e&&e.value()}},{key:"hullPolygon",value:function(){var t=new Mw;return this.renderHull(t),t.value()}},{key:"renderTriangle",value:function(t,e){var A=null==e?e=new Ow:void 0,n=this.points,r=this.triangles,i=2*r[t*=3],o=2*r[t+1],a=2*r[t+2];return e.moveTo(n[i],n[i+1]),e.lineTo(n[o],n[o+1]),e.lineTo(n[a],n[a+1]),e.closePath(),A&&A.value()}},{key:"trianglePolygons",value:H.a.mark((function t(){var e,A,n;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.triangles,A=0,n=e.length/3;case 2:if(!(A<n)){t.next=8;break}return t.next=5,this.trianglePolygon(A);case 5:++A,t.next=2;break;case 8:case"end":return t.stop()}}),t,this)}))},{key:"trianglePolygon",value:function(t){var e=new Mw;return this.renderTriangle(t,e),e.value()}}]),t}();function Zw(t,e,A,n){for(var r=t.length,i=new Float64Array(2*r),o=0;o<r;++o){var a=t[o];i[2*o]=e.call(n,a,o,t),i[2*o+1]=A.call(n,a,o,t)}return i}function Ww(t,e,A,n){var r,i,o,a;return H.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:r=0,i=Object(R.a)(t),s.prev=2,i.s();case 4:if((o=i.n()).done){s.next=13;break}return a=o.value,s.next=8,e.call(n,a,r,t);case 8:return s.next=10,A.call(n,a,r,t);case 10:++r;case 11:s.next=4;break;case 13:s.next=18;break;case 15:s.prev=15,s.t0=s.catch(2),i.e(s.t0);case 18:return s.prev=18,i.f(),s.finish(18);case 21:case"end":return s.stop()}}),_w,null,[[2,15,18,21]])}function Kw(t){lo.call(this,null,t)}Kw.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 Pw=Object(U.y)(Kw,lo),qw=[-1e5,-1e5,1e5,1e5];function Xw(t){for(var e=t[0][0],A=t[0][1],n=t.length-1;t[n][0]===e&&t[n][1]===A;--n);return"M"+t.slice(0,n+1).join("L")+"Z"}Pw.transform=function(t,e){var A=t.as||"path",n=e.source;if(!n||!n.length)return e;var r=t.size;r=r?[0,0,r[0],r[1]]:(r=t.extent)?[r[0][0],r[0][1],r[1][0],r[1][1]]:qw;for(var i=this.value=Vw.from(n,t.x,t.y).voronoi(r),o=0,a=n.length;o<a;++o){var s=i.cellPolygon(o);n[o][A]=s?Xw(s):null}return e.reflow(t.modified()).modifies(A)};var zw=Math.PI/180,$w=function(){var t,e,A,n,r,i,o,a=[256,256],s=nS,g=[],c=Math.random,I={};function u(t,e,A){for(var n,r,i,o,g,I=e.x,u=e.y,l=Math.sqrt(a[0]*a[0]+a[1]*a[1]),C=s(a),h=c()<.5?1:-1,B=-h;(n=C(B+=h))&&(r=~~n[0],i=~~n[1],!(Math.min(Math.abs(r),Math.abs(i))>=l));)if(e.x=I+r,e.y=u+i,!(e.x+e.x0<0||e.y+e.y0<0||e.x+e.x1>a[0]||e.y+e.y1>a[1])&&(!A||!eS(e,t,a[0]))&&(!A||(g=A,(o=e).x+o.x1>g[0].x&&o.x+o.x0<g[1].x&&o.y+o.y1>g[0].y&&o.y+o.y0<g[1].y))){for(var f,d=e.sprite,Q=e.width>>5,E=a[0]>>5,p=e.x-(Q<<4),y=127&p,v=32-y,m=e.y1-e.y0,b=(e.y+e.y0)*E+(p>>5),F=0;F<m;F++){f=0;for(var w=0;w<=Q;w++)t[b+w]|=f<<v|(w<Q?(f=d[F*Q+w])>>>y:0);b+=E}return e.sprite=null,!0}return!1}return I.layout=function(){for(var s=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;var A=t.getContext("2d");return A.fillStyle=A.strokeStyle="red",A.textAlign="center",{context:A,ratio:e}}(UI()),I=function(t){var e=[],A=-1;for(;++A<t;)e[A]=0;return e}((a[0]>>5)*a[1]),l=null,C=g.length,h=-1,B=[],f=g.map((function(a){return{text:t(a),font:e(a),style:n(a),weight:r(a),rotate:i(a),size:~~(A(a)+1e-14),padding:o(a),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:a}})).sort((function(t,e){return e.size-t.size}));++h<C;){var d=f[h];d.x=a[0]*(c()+.5)>>1,d.y=a[1]*(c()+.5)>>1,tS(s,d,f,h),d.hasText&&u(I,d,l)&&(B.push(d),l?AS(l,d):l=[{x:d.x+d.x0,y:d.y+d.y0},{x:d.x+d.x1,y:d.y+d.y1}],d.x-=a[0]>>1,d.y-=a[1]>>1)}return B},I.words=function(t){return arguments.length?(g=t,I):g},I.size=function(t){return arguments.length?(a=[+t[0],+t[1]],I):a},I.font=function(t){return arguments.length?(e=rS(t),I):e},I.fontStyle=function(t){return arguments.length?(n=rS(t),I):n},I.fontWeight=function(t){return arguments.length?(r=rS(t),I):r},I.rotate=function(t){return arguments.length?(i=rS(t),I):i},I.text=function(e){return arguments.length?(t=rS(e),I):t},I.spiral=function(t){return arguments.length?(s=iS[t]||t,I):s},I.fontSize=function(t){return arguments.length?(A=rS(t),I):A},I.padding=function(t){return arguments.length?(o=rS(t),I):o},I.random=function(t){return arguments.length?(c=t,I):c},I};function tS(t,e,A,n){if(!e.sprite){var r=t.context,i=t.ratio;r.clearRect(0,0,2048/i,2048/i);var o,a,s,g,c,I=0,u=0,l=0,C=A.length;for(--n;++n<C;){if(e=A[n],r.save(),r.font=e.style+" "+e.weight+" "+~~((e.size+1)/i)+"px "+e.font,o=r.measureText(e.text+"m").width*i,s=e.size<<1,e.rotate){var h=Math.sin(e.rotate*zw),B=Math.cos(e.rotate*zw),f=o*B,d=o*h,Q=s*B,E=s*h;o=Math.max(Math.abs(f+E),Math.abs(f-E))+31>>5<<5,s=~~Math.max(Math.abs(d+Q),Math.abs(d-Q))}else o=o+31>>5<<5;if(s>l&&(l=s),I+o>=2048&&(I=0,u+=l,l=0),u+s>=2048)break;r.translate((I+(o>>1))/i,(u+(s>>1))/i),e.rotate&&r.rotate(e.rotate*zw),r.fillText(e.text,0,0),e.padding&&(r.lineWidth=2*e.padding,r.strokeText(e.text,0,0)),r.restore(),e.width=o,e.height=s,e.xoff=I,e.yoff=u,e.x1=o>>1,e.y1=s>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,I+=o}for(var p=r.getImageData(0,0,2048/i,2048/i).data,y=[];--n>=0;)if((e=A[n]).hasText){for(a=(o=e.width)>>5,s=e.y1-e.y0,g=0;g<s*a;g++)y[g]=0;if(null==(I=e.xoff))return;u=e.yoff;var v=0,m=-1;for(c=0;c<s;c++){for(g=0;g<o;g++){var b=a*c+(g>>5),F=p[2048*(u+c)+(I+g)<<2]?1<<31-g%32:0;y[b]|=F,v|=F}v?m=c:(e.y0++,s--,c--,u++)}e.y1=e.y0+m,e.sprite=y.slice(0,(e.y1-e.y0)*a)}}}function eS(t,e,A){A>>=5;for(var n,r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,s=32-a,g=t.y1-t.y0,c=(t.y+t.y0)*A+(o>>5),I=0;I<g;I++){n=0;for(var u=0;u<=i;u++)if((n<<s|(u<i?(n=r[I*i+u])>>>a:0))&e[c+u])return!0;c+=A}return!1}function AS(t,e){var A=t[0],n=t[1];e.x+e.x0<A.x&&(A.x=e.x+e.x0),e.y+e.y0<A.y&&(A.y=e.y+e.y0),e.x+e.x1>n.x&&(n.x=e.x+e.x1),e.y+e.y1>n.y&&(n.y=e.y+e.y1)}function nS(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function rS(t){return"function"===typeof t?t:function(){return t}}var iS={archimedean:nS,rectangular:function(t){var e=4*t[0]/t[1],A=0,n=0;return function(t){var r=t<0?-1:1;switch(Math.sqrt(1+4*r*t)-r&3){case 0:A+=e;break;case 1:n+=4;break;case 2:A-=e;break;default:n-=4}return[A,n]}}},oS=["x","y","font","fontSize","fontStyle","fontWeight","angle"],aS=["text","font","rotate","fontSize","fontStyle","fontWeight"];function sS(t){lo.call(this,$w(),t)}function gS(t){return new Uint8Array(t)}function cS(t){return new Uint16Array(t)}function IS(t){return new Uint32Array(t)}function uS(t,e,A){var n=(e<257?gS:e<65537?cS:IS)(t);return A&&n.set(A),n}sS.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:oS}]},Object(U.y)(sS,lo).transform=function(t,e){!t.size||t.size[0]&&t.size[1]||Object(U.n)("Wordcloud size dimensions must be non-zero.");var A=t.modified();if(A||e.changed(e.ADD_REM)||aS.some((function(A){var n=t[A];return Object(U.D)(n)&&e.modified(n.fields)}))){var n,r=e.materialize(e.SOURCE).source,i=this.value,o=t.as||oS,a=t.fontSize||14;if(Object(U.D)(a)?n=t.fontSizeRange:a=Object(U.l)(a),n){var s=a,g=QB("sqrt")().domain(Object(U.p)(r,s)).range(n);a=function(t){return g(s(t))}}r.forEach((function(t){t[o[0]]=NaN,t[o[1]]=NaN,t[o[3]]=0}));for(var c,I,u=i.words(r).text(t.text).size(t.size||[500,500]).padding(t.padding||1).spiral(t.spiral||"archimedean").rotate(t.rotate||0).font(t.font||"sans-serif").fontStyle(t.fontStyle||"normal").fontWeight(t.fontWeight||"normal").fontSize(a).random(Wo).layout(),l=i.size(),C=l[0]>>1,h=l[1]>>1,B=0,f=u.length;B<f;++B)(I=(c=u[B]).datum)[o[0]]=c.x+C,I[o[1]]=c.y+h,I[o[2]]=c.font,I[o[3]]=c.size,I[o[4]]=c.style,I[o[5]]=c.weight,I[o[6]]=c.rotate;return e.reflow(A).modifies(o)}};var lS=function(t,e,A){var n=1<<e;return{one:n,zero:~n,range:A.slice(),bisect:t.bisect,index:t.index,size:t.size,onAdd:function(t,e){var A,r=this.bisect(this.range,t.value),i=t.index,o=r[0],a=r[1],s=i.length;for(A=0;A<o;++A)e[i[A]]|=n;for(A=a;A<s;++A)e[i[A]]|=n;return this}}},CS=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var hS=function(t){var e;return 1===t.length&&(e=t,t=function(t,A){return CS(e(t),A)}),{left:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)<0?n=i+1:r=i}return n},right:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)>0?r=i:n=i+1}return n}}}(CS),BS=hS.right,fS=hS.left;function dS(){var t=IS(0),e=[],A=0;return{insert:function(n,r,i){if(!r.length)return[];var o,a,s,g,c,I,u,l=A,C=r.length,h=Array(C),B=IS(C);for(s=0;s<C;++s)h[s]=n(r[s]),B[s]=s;if(u=B,(I=h).sort.call(u,(function(t,e){var A=I[t],n=I[e];return A<n?-1:A>n?1:0})),g=I,c=u,h=Array.from(c,(function(t){return g[t]})),l)o=e,a=t,e=Array(l+C),t=IS(l+C),function(t,e,A,n,r,i,o,a,s){var g,c=0,I=0;for(g=0;c<n&&I<o;++g)e[c]<r[I]?(a[g]=e[c],s[g]=A[c++]):(a[g]=r[I],s[g]=i[I++]+t);for(;c<n;++c,++g)a[g]=e[c],s[g]=A[c];for(;I<o;++I,++g)a[g]=r[I],s[g]=i[I]+t}(i,o,a,l,h,B,C,e,t);else{if(i>0)for(s=0;s<C;++s)B[s]+=i;e=h,t=B}return A=l+C,{index:B,value:h}},remove:function(n,r){var i,o,a,s=A;for(o=0;!r[t[o]]&&o<s;++o);for(a=o;o<s;++o)r[i=t[o]]||(t[a]=i,e[a]=e[o],++a);A=s-n},bisect:function(t,n){var r;return n?r=n.length:(n=e,r=A),[fS(n,t[0],0,r),BS(n,t[1],0,r)]},reindex:function(e){for(var n=0,r=A;n<r;++n)t[n]=e[t[n]]},index:function(){return t},size:function(){return A}}}function QS(t){lo.call(this,function(){var t=8,e=[],A=IS(0),n=uS(0,t),r=uS(0,t);return{data:function(){return e},seen:function(){return t=A,n=e.length,A=t.length>=n?t:((r=r||new t.constructor(n)).set(t),r);var t,n,r},add:function(t){for(var A,n=0,r=e.length,i=t.length;n<i;++n)(A=t[n])._index=r++,e.push(A)},remove:function(t,A){var i,o,a,s=e.length,g=Array(s-t),c=e;for(o=0;!A[o]&&o<s;++o)g[o]=e[o],c[o]=o;for(a=o;o<s;++o)i=e[o],A[o]?c[o]=-1:(c[o]=a,n[a]=n[o],r[a]=r[o],g[a]=i,i._index=a++),n[o]=0;return e=g,c},size:function(){return e.length},curr:function(){return n},prev:function(){return r},reset:function(t){r[t]=n[t]},all:function(){return t<257?255:t<65537?65535:4294967295},set:function(t,e){n[t]|=e},clear:function(t,e){n[t]&=~e},resize:function(e,A){(e>n.length||A>t)&&(t=Math.max(A,t),n=uS(e,t,n),r=uS(e,t))}}}(),t),this._indices=null,this._dims=null}QS.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 ES=Object(U.y)(QS,lo);function pS(t){lo.call(this,null,t)}ES.transform=function(t,e){return this._dims?t.modified("fields")||t.fields.some((function(t){return e.modified(t.fields)}))?this.reinit(t,e):this.eval(t,e):this.init(t,e)},ES.init=function(t,e){for(var A,n,r=t.fields,i=t.query,o=this._indices={},a=this._dims=[],s=i.length,g=0;g<s;++g)n=o[A=r[g].fname]||(o[A]=dS()),a.push(lS(n,g,i[g]));return this.eval(t,e)},ES.reinit=function(t,e){var A,n,r,i,o,a,s,g,c,I=e.materialize().fork(),u=t.fields,l=t.query,C=this._indices,h=this._dims,B=this.value,f=B.curr(),d=B.prev(),Q=B.all(),E=I.rem=I.add,p=I.mod,y=l.length,v={};if(d.set(f),e.rem.length&&(o=this.remove(t,e,I)),e.add.length&&B.add(e.add),e.mod.length)for(a={},s=0,g=(i=e.mod).length;s<g;++s)a[i[s]._index]=1;for(s=0;s<y;++s)c=u[s],(!h[s]||t.modified("fields",s)||e.modified(c.fields))&&((A=v[r=c.fname])||(C[r]=n=dS(),v[r]=A=n.insert(c,e.source,0)),h[s]=lS(n,s,l[s]).onAdd(A,f));for(s=0,g=B.data().length;s<g;++s)o[s]||(d[s]!==f[s]?E.push(s):a[s]&&f[s]!==Q&&p.push(s));return B.mask=(1<<y)-1,I},ES.eval=function(t,e){var A=e.materialize().fork(),n=this._dims.length,r=0;return e.rem.length&&(this.remove(t,e,A),r|=(1<<n)-1),t.modified("query")&&!t.modified("fields")&&(r|=this.update(t,e,A)),e.add.length&&(this.insert(t,e,A),r|=(1<<n)-1),e.mod.length&&(this.modify(e,A),r|=(1<<n)-1),this.value.mask=r,A},ES.insert=function(t,e,A){var n,r,i,o=e.add,a=this.value,s=this._dims,g=this._indices,c=t.fields,I={},u=A.add,l=a.size(),C=l+o.length,h=s.length;a.resize(C,h),a.add(o);var B=a.curr(),f=a.prev(),d=a.all();for(n=0;n<h;++n)i=I[r=c[n].fname]||(I[r]=g[r].insert(c[n],o,l)),s[n].onAdd(i,B);for(;l<C;++l)f[l]=d,B[l]!==d&&u.push(l)},ES.modify=function(t,e){var A,n,r,i=e.mod,o=this.value,a=o.curr(),s=o.all(),g=t.mod;for(A=0,n=g.length;A<n;++A)a[r=g[A]._index]!==s&&i.push(r)},ES.remove=function(t,e,A){var n,r,i,o,a=this._indices,s=this.value,g=s.curr(),c=s.prev(),I=s.all(),u={},l=A.rem,C=e.rem;for(n=0,r=C.length;n<r;++n)u[i=C[n]._index]=1,c[i]=o=g[i],g[i]=I,o!==I&&l.push(i);for(i in a)a[i].remove(r,u);return this.reindex(e,r,u),u},ES.reindex=function(t,e,A){var n=this._indices,r=this.value;t.runAfter((function(){var t=r.remove(e,A);for(var i in n)n[i].reindex(t)}))},ES.update=function(t,e,A){var n,r,i=this._dims,o=t.query,a=e.stamp,s=i.length,g=0;for(A.filters=0,r=0;r<s;++r)t.modified("query",r)&&(n=r,++g);if(1===g)g=i[n].one,this.incrementOne(i[n],o[n],A.add,A.rem);else for(r=0,g=0;r<s;++r)t.modified("query",r)&&(g|=i[r].one,this.incrementAll(i[r],o[r],a,A.add),A.rem=A.add);return g},ES.incrementAll=function(t,e,A,n){var r,i,o,a=this.value,s=a.seen(),g=a.curr(),c=a.prev(),I=t.index(),u=t.bisect(t.range),l=t.bisect(e),C=l[0],h=l[1],B=u[0],f=u[1],d=t.one;if(C<B)for(r=C,i=Math.min(B,h);r<i;++r)s[o=I[r]]!==A&&(c[o]=g[o],s[o]=A,n.push(o)),g[o]^=d;else if(C>B)for(r=B,i=Math.min(C,f);r<i;++r)s[o=I[r]]!==A&&(c[o]=g[o],s[o]=A,n.push(o)),g[o]^=d;if(h>f)for(r=Math.max(C,f),i=h;r<i;++r)s[o=I[r]]!==A&&(c[o]=g[o],s[o]=A,n.push(o)),g[o]^=d;else if(h<f)for(r=Math.max(B,h),i=f;r<i;++r)s[o=I[r]]!==A&&(c[o]=g[o],s[o]=A,n.push(o)),g[o]^=d;t.range=e.slice()},ES.incrementOne=function(t,e,A,n){var r,i,o,a=this.value.curr(),s=t.index(),g=t.bisect(t.range),c=t.bisect(e),I=c[0],u=c[1],l=g[0],C=g[1],h=t.one;if(I<l)for(r=I,i=Math.min(l,u);r<i;++r)a[o=s[r]]^=h,A.push(o);else if(I>l)for(r=l,i=Math.min(I,C);r<i;++r)a[o=s[r]]^=h,n.push(o);if(u>C)for(r=Math.max(I,C),i=u;r<i;++r)a[o=s[r]]^=h,A.push(o);else if(u<C)for(r=Math.max(l,u),i=C;r<i;++r)a[o=s[r]]^=h,n.push(o);t.range=e.slice()},pS.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(U.y)(pS,lo).transform=function(t,e){var A=~(t.ignore||0),n=t.filter,r=n.mask;if(0===(r&A))return e.StopPropagation;var i=e.fork(e.ALL),o=n.data(),a=n.curr(),s=n.prev(),g=function(t){return a[t]&A?null:o[t]};return i.filter(i.MOD,g),r&r-1?(i.filter(i.ADD,(function(t){var e=a[t]&A;return!e&&e^s[t]&A?o[t]:null})),i.filter(i.REM,(function(t){var e=a[t]&A;return e&&!(e^e^s[t]&A)?o[t]:null}))):(i.filter(i.ADD,g),i.filter(i.REM,(function(t){return(a[t]&A)===r?o[t]:null}))),i.filter(i.SOURCE,(function(t){return g(t._index)}))};var yS=A(1111);function vS(t,e){t&&(null==e?t.removeAttribute("aria-label"):t.setAttribute("aria-label",e))}function mS(t,e){var A=t.globalCursor()?"undefined"!==typeof document&&document.body:t.container();if(A)return null==e?A.style.removeProperty("cursor"):A.style.cursor=e}function bS(t,e){var A=t._runtime.data;return Object(U.v)(A,e)||Object(U.n)("Unrecognized data set: "+e),A[e]}function FS(t,e){Mt(e)||Object(U.n)("Second argument to changes must be a changeset.");var A=bS(this,t);return A.modified=!0,this.pulse(A.input,e)}function wS(t){var e=t.padding();return Math.max(0,t._viewWidth+e.left+e.right)}function SS(t){var e=t.padding();return Math.max(0,t._viewHeight+e.top+e.bottom)}function DS(t){var e=t.padding(),A=t._origin;return[e.left+A[0],e.top+A[1]]}function RS(t){var e=DS(t),A=wS(t),n=SS(t);t._renderer.background(t.background()),t._renderer.resize(A,n,e),t._handler.origin(e),t._resizeListeners.forEach((function(e){try{e(A,n)}catch(r){t.error(r)}}))}var US=function(t,e,A){var n,r,i,o=t._renderer,a=o&&o.canvas();return a&&(i=DS(t),r=e.changedTouches?e.changedTouches[0]:e,(n=Ul(r,a))[0]-=i[0],n[1]-=i[1]),e.dataflow=t,e.item=A,e.vega=function(t,e,A){var n=e?"group"===e.mark.marktype?e:e.mark.group:null;function r(t){var A,r=n;if(t)for(A=e;A;A=A.mark.group)if(A.mark.name===t){r=A;break}return r&&r.mark&&r.mark.interactive?r:{}}function i(t){if(!t)return A;Object(U.H)(t)&&(t=r(t));for(var e=A.slice();t;)e[0]-=t.x||0,e[1]-=t.y||0,t=t.mark&&t.mark.group;return e}return{view:Object(U.l)(t),item:Object(U.l)(e||{}),group:r,xy:i,x:function(t){return i(t)[0]},y:function(t){return i(t)[1]}}}(t,A,n),e};var GS={trap:!1};function NS(t,e,A){var n=t._eventConfig&&t._eventConfig[e];return!(!1===n||Object(U.F)(n)&&!n[A])||(t.warn("Blocked ".concat(e," ").concat(A," event listener.")),!1)}function kS(t){return t.item}function xS(t){return t.item.mark.source}function OS(t){return function(e,A){return A.vega.view().changeset().encode(A.item,t)}}var MS=function(t,e,A){var n=document.createElement(t);for(var r in e)n.setAttribute(r,e[r]);return null!=A&&(n.textContent=A),n},LS=Math.sqrt(50),_S=Math.sqrt(10),JS=Math.sqrt(2);var TS=function(t,e,A){if(e){var n=A.param,r=A.state;return r||(r=A.state={elements:null,active:!1,set:null,update:function(e){e!==t.signal(n.signal)&&t.runAsync(null,(function(){r.source=!0,t.signal(n.signal,e)}))}},n.debounce&&(r.update=Object(U.m)(n.debounce,r.update))),function(t,e,A,n){var r=MS("div",{class:"vega-bind"}),i="radio"===A.input?r:r.appendChild(MS("label"));i.appendChild(MS("span",{class:"vega-bind-name"},A.name||A.signal)),e.appendChild(r);var o=jS;switch(A.input){case"checkbox":o=HS;break;case"select":o=YS;break;case"radio":o=VS;break;case"range":o=ZS}o(t,i,A,n)}(r,e,n,t.signal(n.signal)),r.active||(t.on(t._signals[n.signal],null,(function(){r.source?r.source=!1:r.set(t.signal(n.signal))})),r.active=!0),r}};function jS(t,e,A,n){var r=MS("input");for(var i in A)"signal"!==i&&"element"!==i&&r.setAttribute("input"===i?"type":i,A[i]);r.setAttribute("name",A.signal),r.value=n,e.appendChild(r),r.addEventListener("input",(function(){return t.update(r.value)})),t.elements=[r],t.set=function(t){return r.value=t}}function HS(t,e,A,n){var r={type:"checkbox",name:A.signal};n&&(r.checked=!0);var i=MS("input",r);e.appendChild(i),i.addEventListener("change",(function(){return t.update(i.checked)})),t.elements=[i],t.set=function(t){return i.checked=!!t||null}}function YS(t,e,A,n){var r=MS("select",{name:A.signal}),i=A.labels||[];A.options.forEach((function(t,e){var A={value:t};WS(t,n)&&(A.selected=!0),r.appendChild(MS("option",A,(i[e]||t)+""))})),e.appendChild(r),r.addEventListener("change",(function(){t.update(A.options[r.selectedIndex])})),t.elements=[r],t.set=function(t){for(var e=0,n=A.options.length;e<n;++e)if(WS(A.options[e],t))return void(r.selectedIndex=e)}}function VS(t,e,A,n){var r=MS("span",{class:"vega-bind-radio"}),i=A.labels||[];e.appendChild(r),t.elements=A.options.map((function(e,o){var a={type:"radio",name:A.signal,value:e};WS(e,n)&&(a.checked=!0);var s=MS("input",a);s.addEventListener("change",(function(){return t.update(e)}));var g=MS("label",{},(i[o]||e)+"");return g.prepend(s),r.appendChild(g),s})),t.set=function(e){for(var A=t.elements,n=A.length,r=0;r<n;++r)WS(A[r].value,e)&&(A[r].checked=!0)}}function ZS(t,e,A,n){n=void 0!==n?n:(+A.max+ +A.min)/2;var r=null!=A.max?A.max:Math.max(100,+n)||100,i=A.min||Math.min(0,r,+n)||0,o=A.step||function(t,e,A){var n=Math.abs(e-t)/Math.max(0,A),r=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),i=n/r;return i>=LS?r*=10:i>=_S?r*=5:i>=JS&&(r*=2),e<t?-r:r}(i,r,100),a=MS("input",{type:"range",name:A.signal,min:i,max:r,step:o});a.value=n;var s=MS("span",{},+n);e.appendChild(a),e.appendChild(s);var g=function(){s.textContent=a.value,t.update(+a.value)};a.addEventListener("input",g),a.addEventListener("change",g),t.elements=[a],t.set=function(t){a.value=t,s.textContent=t}}function WS(t,e){return t===e||t+""===e+""}var KS=function(t,e,A,n,r,i){return(e=e||new n(t.loader())).initialize(A,wS(t),SS(t),DS(t),r,i).background(t.background())},PS=function(t,e){return e?function(){try{e.apply(this,arguments)}catch(A){t.error(A)}}:null};function qS(t,e){if("string"===typeof e){if("undefined"===typeof document)return t.error("DOM document instance not found."),null;if(!(e=document.querySelector(e)))return t.error("Signal bind element not found: "+e),null}if(e)try{e.innerHTML=""}catch(A){e=null,t.error(A)}return e}var XS=function(t){return+t||0},zS=function(t){return Object(U.F)(t)?{top:XS(t.top),bottom:XS(t.bottom),left:XS(t.left),right:XS(t.right)}:function(t){return{top:t,bottom:t,left:t,right:t}}(XS(t))},$S=function(t,e,A,n){return tD.apply(this,arguments)};function tD(){return(tD=Object(mt.a)(H.a.mark((function t(e,A,n,r){var i,o;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Dd(A),(o=i&&i.headless)||Object(U.n)("Unrecognized renderer type: "+A),t.next=4,e.runAsync();case 4:return t.abrupt("return",KS(e,null,null,o,n,r).renderAsync(e._scenegraph.root));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function eD(){return(eD=Object(mt.a)(H.a.mark((function t(e,A){var n;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e!==wd.Canvas&&e!==wd.SVG&&e!==wd.PNG&&Object(U.n)("Unrecognized image type: "+e),t.next=3,$S(this,e,A);case 3:return n=t.sent,t.abrupt("return",e===wd.SVG?AD(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png"));case 5:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function AD(t,e){var A=new Blob([t],{type:e});return window.URL.createObjectURL(A)}function nD(){return(nD=Object(mt.a)(H.a.mark((function t(e,A){var n;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$S(this,wd.Canvas,e,A);case 2:return n=t.sent,t.abrupt("return",n.canvas());case 4:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function rD(){return(rD=Object(mt.a)(H.a.mark((function t(e){var A;return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$S(this,wd.SVG,e);case 2:return A=t.sent,t.abrupt("return",A.svg());case 4:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function iD(t){var e=this.context.data[t];return e?e.values.value:[]}var oD=function(t){return function(e,A){return this.context.dataflow.locale()[t](A)(e)}},aD=oD("format"),sD=oD("timeFormat"),gD=oD("utcFormat"),cD=oD("timeParse"),ID=oD("utcParse"),uD=new Date(2e3,0,1);function lD(t,e,A){return Number.isInteger(t)&&Number.isInteger(e)?(uD.setYear(2e3),uD.setMonth(t),uD.setDate(e),sD.call(this,uD,A)):""}var CD,hD,BD,fD,dD;function QD(t){this.type=t}QD.prototype.visit=function(t){var e,A,n;if(t(this))return 1;for(A=0,n=(e=function(t){switch(t.type){case"ArrayExpression":return t.elements;case"BinaryExpression":case"LogicalExpression":return[t.left,t.right];case"CallExpression":var e=t.arguments.slice();return e.unshift(t.callee),e;case"ConditionalExpression":return[t.test,t.consequent,t.alternate];case"MemberExpression":return[t.object,t.property];case"ObjectExpression":return t.properties;case"Property":return[t.key,t.value];case"UnaryExpression":return[t.argument];case"Identifier":case"Literal":case"RawCode":default:return[]}}(this)).length;A<n;++A)if(e[A].visit(t))return 1};(CD={})[1]="Boolean",CD[2]="<end>",CD[3]="Identifier",CD[4]="Keyword",CD[5]="Null",CD[6]="Numeric",CD[7]="Punctuator",CD[8]="String",CD[9]="RegularExpression";var ED="ILLEGAL",pD=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]"),yD=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 vD(t,e){if(!t)throw new Error("ASSERT: "+e)}function mD(t){return t>=48&&t<=57}function bD(t){return"0123456789abcdefABCDEF".indexOf(t)>=0}function FD(t){return"01234567".indexOf(t)>=0}function wD(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0}function SD(t){return 10===t||13===t||8232===t||8233===t}function DD(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&pD.test(String.fromCharCode(t))}function RD(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&yD.test(String.fromCharCode(t))}var UD={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 GD(){for(var t;BD<fD&&(wD(t=hD.charCodeAt(BD))||SD(t));)++BD}function ND(t){var e,A,n,r=0;for(A="u"===t?4:2,e=0;e<A;++e)BD<fD&&bD(hD[BD])?(n=hD[BD++],r=16*r+"0123456789abcdef".indexOf(n.toLowerCase())):PD({},"Unexpected token %0",ED);return String.fromCharCode(r)}function kD(){var t,e,A,n;for(e=0,"}"===(t=hD[BD])&&PD({},"Unexpected token %0",ED);BD<fD&&bD(t=hD[BD++]);)e=16*e+"0123456789abcdef".indexOf(t.toLowerCase());return(e>1114111||"}"!==t)&&PD({},"Unexpected token %0",ED),e<=65535?String.fromCharCode(e):(A=55296+(e-65536>>10),n=56320+(e-65536&1023),String.fromCharCode(A,n))}function xD(){var t,e;for(t=hD.charCodeAt(BD++),e=String.fromCharCode(t),92===t&&(117!==hD.charCodeAt(BD)&&PD({},"Unexpected token %0",ED),++BD,(t=ND("u"))&&"\\"!==t&&DD(t.charCodeAt(0))||PD({},"Unexpected token %0",ED),e=t);BD<fD&&RD(t=hD.charCodeAt(BD));)++BD,e+=String.fromCharCode(t),92===t&&(e=e.substr(0,e.length-1),117!==hD.charCodeAt(BD)&&PD({},"Unexpected token %0",ED),++BD,(t=ND("u"))&&"\\"!==t&&RD(t.charCodeAt(0))||PD({},"Unexpected token %0",ED),e+=t);return e}function OD(){var t,e;return t=BD,{type:1===(e=92===hD.charCodeAt(BD)?xD():function(){var t,e;for(t=BD++;BD<fD;){if(92===(e=hD.charCodeAt(BD)))return BD=t,xD();if(!RD(e))break;++BD}return hD.slice(t,BD)}()).length?3:UD.hasOwnProperty(e)?4:"null"===e?5:"true"===e||"false"===e?1:3,value:e,start:t,end:BD}}function MD(){var t,e,A,n,r=BD,i=hD.charCodeAt(BD),o=hD[BD];switch(i){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++BD,{type:7,value:String.fromCharCode(i),start:r,end:BD};default:if(61===(t=hD.charCodeAt(BD+1)))switch(i){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return BD+=2,{type:7,value:String.fromCharCode(i)+String.fromCharCode(t),start:r,end:BD};case 33:case 61:return BD+=2,61===hD.charCodeAt(BD)&&++BD,{type:7,value:hD.slice(r,BD),start:r,end:BD}}}return">>>="===(n=hD.substr(BD,4))?{type:7,value:n,start:r,end:BD+=4}:">>>"===(A=n.substr(0,3))||"<<="===A||">>="===A?{type:7,value:A,start:r,end:BD+=3}:o===(e=A.substr(0,2))[1]&&"+-<>&|".indexOf(o)>=0||"=>"===e?{type:7,value:e,start:r,end:BD+=2}:"<>=!+-*%&|^/".indexOf(o)>=0?{type:7,value:o,start:r,end:++BD}:void PD({},"Unexpected token %0",ED)}function LD(){var t,e,A;if(vD(mD((A=hD[BD]).charCodeAt(0))||"."===A,"Numeric literal must start with a decimal digit or a decimal point"),e=BD,t="","."!==A){if(t=hD[BD++],A=hD[BD],"0"===t){if("x"===A||"X"===A)return++BD,function(t){for(var e="";BD<fD&&bD(hD[BD]);)e+=hD[BD++];return 0===e.length&&PD({},"Unexpected token %0",ED),DD(hD.charCodeAt(BD))&&PD({},"Unexpected token %0",ED),{type:6,value:parseInt("0x"+e,16),start:t,end:BD}}(e);if(FD(A))return function(t){for(var e="0"+hD[BD++];BD<fD&&FD(hD[BD]);)e+=hD[BD++];return(DD(hD.charCodeAt(BD))||mD(hD.charCodeAt(BD)))&&PD({},"Unexpected token %0",ED),{type:6,value:parseInt(e,8),octal:!0,start:t,end:BD}}(e);A&&mD(A.charCodeAt(0))&&PD({},"Unexpected token %0",ED)}for(;mD(hD.charCodeAt(BD));)t+=hD[BD++];A=hD[BD]}if("."===A){for(t+=hD[BD++];mD(hD.charCodeAt(BD));)t+=hD[BD++];A=hD[BD]}if("e"===A||"E"===A)if(t+=hD[BD++],"+"!==(A=hD[BD])&&"-"!==A||(t+=hD[BD++]),mD(hD.charCodeAt(BD)))for(;mD(hD.charCodeAt(BD));)t+=hD[BD++];else PD({},"Unexpected token %0",ED);return DD(hD.charCodeAt(BD))&&PD({},"Unexpected token %0",ED),{type:6,value:parseFloat(t),start:e,end:BD}}function _D(){var t,e,A,n;return dD=null,GD(),t=BD,e=function(){var t,e,A,n;for(vD("/"===(t=hD[BD]),"Regular expression literal must start with a slash"),e=hD[BD++],A=!1,n=!1;BD<fD;)if(e+=t=hD[BD++],"\\"===t)SD((t=hD[BD++]).charCodeAt(0))&&PD({},"Invalid regular expression: missing /"),e+=t;else if(SD(t.charCodeAt(0)))PD({},"Invalid regular expression: missing /");else if(A)"]"===t&&(A=!1);else{if("/"===t){n=!0;break}"["===t&&(A=!0)}return n||PD({},"Invalid regular expression: missing /"),{value:e.substr(1,e.length-2),literal:e}}(),A=function(){var t,e,A;for(e="",A="";BD<fD&&RD((t=hD[BD]).charCodeAt(0));)++BD,"\\"===t&&BD<fD?PD({},"Unexpected token %0",ED):(A+=t,e+=t);return A.search(/[^gimuy]/g)>=0&&PD({},"Invalid regular expression",A),{value:A,literal:e}}(),n=function(t,e){var A=t;e.indexOf("u")>=0&&(A=A.replace(/\\u\{([0-9a-fA-F]+)\}/g,(function(t,e){if(parseInt(e,16)<=1114111)return"x";PD({},"Invalid regular expression")})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(A)}catch(n){PD({},"Invalid regular expression")}try{return new RegExp(t,e)}catch(r){return null}}(e.value,A.value),{literal:e.literal+A.literal,value:n,regex:{pattern:e.value,flags:A.value},start:t,end:BD}}function JD(){var t;return GD(),BD>=fD?{type:2,start:BD,end:BD}:DD(t=hD.charCodeAt(BD))?OD():40===t||41===t||59===t?MD():39===t||34===t?function(){var t,e,A,n,r="",i=!1;for(vD("'"===(t=hD[BD])||'"'===t,"String literal must starts with a quote"),e=BD,++BD;BD<fD;){if((A=hD[BD++])===t){t="";break}if("\\"===A)if((A=hD[BD++])&&SD(A.charCodeAt(0)))"\r"===A&&"\n"===hD[BD]&&++BD;else switch(A){case"u":case"x":"{"===hD[BD]?(++BD,r+=kD()):r+=ND(A);break;case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+="\t";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:FD(A)?(0!==(n="01234567".indexOf(A))&&(i=!0),BD<fD&&FD(hD[BD])&&(i=!0,n=8*n+"01234567".indexOf(hD[BD++]),"0123".indexOf(A)>=0&&BD<fD&&FD(hD[BD])&&(n=8*n+"01234567".indexOf(hD[BD++]))),r+=String.fromCharCode(n)):r+=A}else{if(SD(A.charCodeAt(0)))break;r+=A}}return""!==t&&PD({},"Unexpected token %0",ED),{type:8,value:r,octal:i,start:e,end:BD}}():46===t?mD(hD.charCodeAt(BD+1))?LD():MD():mD(t)?LD():MD()}function TD(){var t;return BD=(t=dD).end,dD=JD(),BD=t.end,t}function jD(){var t;t=BD,dD=JD(),BD=t}function HD(t,e,A){var n=new QD("||"===t||"&&"===t?"LogicalExpression":"BinaryExpression");return n.operator=t,n.left=e,n.right=A,n}function YD(t,e){var A=new QD("CallExpression");return A.callee=t,A.arguments=e,A}function VD(t){var e=new QD("Identifier");return e.name=t,e}function ZD(t){var e=new QD("Literal");return e.value=t.value,e.raw=hD.slice(t.start,t.end),t.regex&&("//"===e.raw&&(e.raw="/(?:)/"),e.regex=t.regex),e}function WD(t,e,A){var n=new QD("MemberExpression");return n.computed="["===t,n.object=e,n.property=A,n.computed||(A.member=!0),n}function KD(t,e,A){var n=new QD("Property");return n.key=e,n.value=A,n.kind=t,n}function PD(t,e){var A,n=Array.prototype.slice.call(arguments,2),r=e.replace(/%(\d)/g,(function(t,e){return vD(e<n.length,"Message reference must be in range"),n[e]}));throw(A=new Error(r)).index=BD,A.description=r,A}function qD(t){2===t.type&&PD(t,"Unexpected end of input"),6===t.type&&PD(t,"Unexpected number"),8===t.type&&PD(t,"Unexpected string"),3===t.type&&PD(t,"Unexpected identifier"),4===t.type&&PD(t,"Unexpected reserved word"),PD(t,"Unexpected token %0",t.value)}function XD(t){var e=TD();7===e.type&&e.value===t||qD(e)}function zD(t){return 7===dD.type&&dD.value===t}function $D(t){return 4===dD.type&&dD.value===t}function tR(){var t=[];for(BD=dD.start,XD("[");!zD("]");)zD(",")?(TD(),t.push(null)):(t.push(uR()),zD("]")||XD(","));return TD(),function(t){var e=new QD("ArrayExpression");return e.elements=t,e}(t)}function eR(){var t;return BD=dD.start,8===(t=TD()).type||6===t.type?(t.octal&&PD(t,"Octal literals are not allowed in strict mode."),ZD(t)):VD(t.value)}function AR(){var t,e,A;return BD=dD.start,3===(t=dD).type?(A=eR(),XD(":"),KD("init",A,uR())):2!==t.type&&7!==t.type?(e=eR(),XD(":"),KD("init",e,uR())):void qD(t)}function nR(){var t,e,A=[],n={},r=String;for(BD=dD.start,XD("{");!zD("}");)e="$"+("Identifier"===(t=AR()).key.type?t.key.name:r(t.key.value)),Object.prototype.hasOwnProperty.call(n,e)?PD({},"Duplicate data property in object literal not allowed in strict mode"):n[e]=!0,A.push(t),zD("}")||XD(",");return XD("}"),function(t){var e=new QD("ObjectExpression");return e.properties=t,e}(A)}var rR={if:1};function iR(){var t,e,A;if(zD("("))return function(){var t;return XD("("),t=lR(),XD(")"),t}();if(zD("["))return tR();if(zD("{"))return nR();if(t=dD.type,BD=dD.start,3===t||rR[dD.value])A=VD(TD().value);else if(8===t||6===t)dD.octal&&PD(dD,"Octal literals are not allowed in strict mode."),A=ZD(TD());else{if(4===t)throw new Error("Disabled.");1===t?((e=TD()).value="true"===e.value,A=ZD(e)):5===t?((e=TD()).value=null,A=ZD(e)):zD("/")||zD("/=")?(A=ZD(_D()),jD()):qD(TD())}return A}function oR(){var t=[];if(XD("("),!zD(")"))for(;BD<fD&&(t.push(uR()),!zD(")"));)XD(",");return XD(")"),t}function aR(){return XD("."),function(){var t;return BD=dD.start,function(t){return 3===t.type||4===t.type||1===t.type||5===t.type}(t=TD())||qD(t),VD(t.value)}()}function sR(){var t;return XD("["),t=lR(),XD("]"),t}function gR(){var t=function(){var t;for(t=iR();;)if(zD("."))t=WD(".",t,aR());else if(zD("("))t=YD(t,oR());else{if(!zD("["))break;t=WD("[",t,sR())}return t}();if(7===dD.type&&(zD("++")||zD("--")))throw new Error("Disabled.");return t}function cR(){var t,e;if(7!==dD.type&&4!==dD.type)e=gR();else{if(zD("++")||zD("--"))throw new Error("Disabled.");if(zD("+")||zD("-")||zD("~")||zD("!"))t=TD(),e=cR(),e=function(t,e){var A=new QD("UnaryExpression");return A.operator=t,A.argument=e,A.prefix=!0,A}(t.value,e);else{if($D("delete")||$D("void")||$D("typeof"))throw new Error("Disabled.");e=gR()}}return e}function IR(t){var e=0;if(7!==t.type&&4!==t.type)return 0;switch(t.value){case"||":e=1;break;case"&&":e=2;break;case"|":e=3;break;case"^":e=4;break;case"&":e=5;break;case"==":case"!=":case"===":case"!==":e=6;break;case"<":case">":case"<=":case">=":case"instanceof":case"in":e=7;break;case"<<":case">>":case">>>":e=8;break;case"+":case"-":e=9;break;case"*":case"/":case"%":e=11}return e}function uR(){var t,e;return t=function(){var t,e,A,n,r,i,o,a,s,g;if(t=dD,s=cR(),0===(r=IR(n=dD)))return s;for(n.prec=r,TD(),e=[t,dD],i=[s,n,o=cR()];(r=IR(dD))>0;){for(;i.length>2&&r<=i[i.length-2].prec;)o=i.pop(),a=i.pop().value,s=i.pop(),e.pop(),A=HD(a,s,o),i.push(A);(n=TD()).prec=r,i.push(n),e.push(dD),A=cR(),i.push(A)}for(A=i[g=i.length-1],e.pop();g>1;)e.pop(),A=HD(i[g-1].value,i[g-2],A),g-=2;return A}(),zD("?")&&(TD(),e=uR(),XD(":"),t=function(t,e,A){var n=new QD("ConditionalExpression");return n.test=t,n.consequent=e,n.alternate=A,n}(t,e,uR())),t}function lR(){var t=uR();if(zD(","))throw new Error("Disabled.");return t}var CR=function(t){BD=0,fD=(hD=t).length,dD=null,jD();var e=lR();if(2!==dD.type)throw new Error("Unexpect token after expression.");return e},hR={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"},BR=function(t){function e(e,A,n){return function(r){return function(e,A,n,r){var i=t(A[0]);return n&&(i=n+"("+i+")",0===n.lastIndexOf("new ",0)&&(i="("+i+")")),i+"."+e+(r<0?"":0===r?"()":"("+A.slice(1).map(t).join(",")+")")}(e,r,A,n)}}var A="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(e){e.length<3&&Object(U.n)("Missing arguments to clamp function."),e.length>3&&Object(U.n)("Too many arguments to clamp function.");var A=e.map(t);return"Math.max("+A[1]+", Math.min("+A[2]+","+A[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:A,date:e("getDate",A,0),day:e("getDay",A,0),year:e("getFullYear",A,0),month:e("getMonth",A,0),hours:e("getHours",A,0),minutes:e("getMinutes",A,0),seconds:e("getSeconds",A,0),milliseconds:e("getMilliseconds",A,0),time:e("getTime",A,0),timezoneoffset:e("getTimezoneOffset",A,0),utcdate:e("getUTCDate",A,0),utcday:e("getUTCDay",A,0),utcyear:e("getUTCFullYear",A,0),utcmonth:e("getUTCMonth",A,0),utchours:e("getUTCHours",A,0),utcminutes:e("getUTCMinutes",A,0),utcseconds:e("getUTCSeconds",A,0),utcmilliseconds:e("getUTCMilliseconds",A,0),length:e("length",null,-1),join:e("join",null),indexof:e("indexOf",null),lastindexof:e("lastIndexOf",null),slice:e("slice",null),reverse:function(e){return"("+t(e[0])+").slice().reverse()"},parseFloat:"parseFloat",parseInt:"parseInt",upper:e("toUpperCase","String",0),lower:e("toLowerCase","String",0),substring:e("substring","String"),split:e("split","String"),replace:e("replace","String"),trim:e("trim","String",0),regexp:"RegExp",test:e("test","RegExp"),if:function(e){e.length<3&&Object(U.n)("Missing arguments to if function."),e.length>3&&Object(U.n)("Too many arguments to if function.");var A=e.map(t);return"("+A[0]+"?"+A[1]+":"+A[2]+")"}}};function fR(t,e,A,n){"Literal"!==e[0].type&&Object(U.n)("First argument to data functions must be a string literal.");var r=e[0].value,i=":"+r;if(!Object(U.v)(i,n))try{n[i]=A.getData(r).tuplesRef()}catch(o){}}function dR(t,e,A,n){if("Literal"===e[0].type)QR(A,n,e[0].value);else for(t in A.scales)QR(A,n,t)}function QR(t,e,A){var n="%"+A;if(!Object(U.v)(e,n))try{e[n]=t.scaleRef(A)}catch(r){}}function ER(t,e){var A;return Object(U.D)(t)?t:Object(U.H)(t)?(A=e.scales[t])&&A.value:void 0}var pR=function(){return new yR};function yR(){this.reset()}yR.prototype={constructor:yR,reset:function(){this.s=this.t=0},add:function(t){mR(vR,t,this.t),mR(this,vR.s,this.s),this.s?this.t+=vR.t:this.s=vR.t},valueOf:function(){return this.s}};var vR=new yR;function mR(t,e,A){var n=t.s=e+A,r=n-e,i=n-r;t.t=e-i+(A-r)}var bR=Math.PI,FR=bR/2,wR=bR/4,SR=2*bR,DR=180/bR,RR=bR/180,UR=Math.abs,GR=(Math.atan,Math.atan2),NR=Math.cos,kR=(Math.ceil,Math.exp,Math.floor,Math.log,Math.pow,Math.sin),xR=(Math.sign,Math.sqrt);Math.tan;function OR(t){return t>1?FR:t<-1?-FR:Math.asin(t)}function MR(){}function LR(t,e){t&&JR.hasOwnProperty(t.type)&&JR[t.type](t,e)}var _R={Feature:function(t,e){LR(t.geometry,e)},FeatureCollection:function(t,e){for(var A=t.features,n=-1,r=A.length;++n<r;)LR(A[n].geometry,e)}},JR={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)t=A[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){TR(t.coordinates,e,0)},MultiLineString:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)TR(A[n],e,0)},Polygon:function(t,e){jR(t.coordinates,e)},MultiPolygon:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)jR(A[n],e)},GeometryCollection:function(t,e){for(var A=t.geometries,n=-1,r=A.length;++n<r;)LR(A[n],e)}};function TR(t,e,A){var n,r=-1,i=t.length-A;for(e.lineStart();++r<i;)n=t[r],e.point(n[0],n[1],n[2]);e.lineEnd()}function jR(t,e){var A=-1,n=t.length;for(e.polygonStart();++A<n;)TR(t[A],e,1);e.polygonEnd()}var HR,YR,VR,ZR,WR,KR=function(t,e){t&&_R.hasOwnProperty(t.type)?_R[t.type](t,e):LR(t,e)},PR=pR(),qR=pR(),XR={point:MR,lineStart:MR,lineEnd:MR,polygonStart:function(){PR.reset(),XR.lineStart=zR,XR.lineEnd=$R},polygonEnd:function(){var t=+PR;qR.add(t<0?SR+t:t),this.lineStart=this.lineEnd=this.point=MR},sphere:function(){qR.add(SR)}};function zR(){XR.point=tU}function $R(){eU(HR,YR)}function tU(t,e){XR.point=eU,HR=t,YR=e,VR=t*=RR,ZR=NR(e=(e*=RR)/2+wR),WR=kR(e)}function eU(t,e){var A=(t*=RR)-VR,n=A>=0?1:-1,r=n*A,i=NR(e=(e*=RR)/2+wR),o=kR(e),a=WR*o,s=ZR*i+a*NR(r),g=a*n*kR(r);PR.add(GR(g,s)),VR=t,ZR=i,WR=o}function AU(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}var nU,rU,iU,oU,aU,sU,gU,cU,IU,uU,lU=pR(),CU={point:hU,lineStart:fU,lineEnd:dU,polygonStart:function(){CU.point=QU,CU.lineStart=EU,CU.lineEnd=pU,lU.reset(),XR.polygonStart()},polygonEnd:function(){XR.polygonEnd(),CU.point=hU,CU.lineStart=fU,CU.lineEnd=dU,PR<0?(nU=-(iU=180),rU=-(oU=90)):lU>1e-6?oU=90:lU<-1e-6&&(rU=-90),uU[0]=nU,uU[1]=iU},sphere:function(){nU=-(iU=180),rU=-(oU=90)}};function hU(t,e){IU.push(uU=[nU=t,iU=t]),e<rU&&(rU=e),e>oU&&(oU=e)}function BU(t,e){var A,n=function(t){var e=t[0],A=t[1],n=NR(A);return[n*NR(e),n*kR(e),kR(A)]}([t*RR,e*RR]);if(cU){var r=AU(cU,n),i=AU([r[1],-r[0],0],r);!function(t){var e=xR(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}(i),i=[GR((A=i)[1],A[0]),OR(A[2])];var o,a=t-aU,s=a>0?1:-1,g=i[0]*DR*s,c=UR(a)>180;c^(s*aU<g&&g<s*t)?(o=i[1]*DR)>oU&&(oU=o):c^(s*aU<(g=(g+360)%360-180)&&g<s*t)?(o=-i[1]*DR)<rU&&(rU=o):(e<rU&&(rU=e),e>oU&&(oU=e)),c?t<aU?yU(nU,t)>yU(nU,iU)&&(iU=t):yU(t,iU)>yU(nU,iU)&&(nU=t):iU>=nU?(t<nU&&(nU=t),t>iU&&(iU=t)):t>aU?yU(nU,t)>yU(nU,iU)&&(iU=t):yU(t,iU)>yU(nU,iU)&&(nU=t)}else IU.push(uU=[nU=t,iU=t]);e<rU&&(rU=e),e>oU&&(oU=e),cU=n,aU=t}function fU(){CU.point=BU}function dU(){uU[0]=nU,uU[1]=iU,CU.point=hU,cU=null}function QU(t,e){if(cU){var A=t-aU;lU.add(UR(A)>180?A+(A>0?360:-360):A)}else sU=t,gU=e;XR.point(t,e),BU(t,e)}function EU(){XR.lineStart()}function pU(){QU(sU,gU),XR.lineEnd(),UR(lU)>1e-6&&(nU=-(iU=180)),uU[0]=nU,uU[1]=iU,cU=null}function yU(t,e){return(e-=t)<0?e+360:e}function vU(t,e){return t[0]-e[0]}function mU(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var bU,FU,wU,SU,DU,RU,UU,GU,NU,kU,xU,OU,MU,LU,_U,JU,TU={sphere:MR,point:jU,lineStart:YU,lineEnd:WU,polygonStart:function(){TU.lineStart=KU,TU.lineEnd=PU},polygonEnd:function(){TU.lineStart=YU,TU.lineEnd=WU}};function jU(t,e){t*=RR;var A=NR(e*=RR);HU(A*NR(t),A*kR(t),kR(e))}function HU(t,e,A){++bU,wU+=(t-wU)/bU,SU+=(e-SU)/bU,DU+=(A-DU)/bU}function YU(){TU.point=VU}function VU(t,e){t*=RR;var A=NR(e*=RR);LU=A*NR(t),_U=A*kR(t),JU=kR(e),TU.point=ZU,HU(LU,_U,JU)}function ZU(t,e){t*=RR;var A=NR(e*=RR),n=A*NR(t),r=A*kR(t),i=kR(e),o=GR(xR((o=_U*i-JU*r)*o+(o=JU*n-LU*i)*o+(o=LU*r-_U*n)*o),LU*n+_U*r+JU*i);FU+=o,RU+=o*(LU+(LU=n)),UU+=o*(_U+(_U=r)),GU+=o*(JU+(JU=i)),HU(LU,_U,JU)}function WU(){TU.point=jU}function KU(){TU.point=qU}function PU(){XU(OU,MU),TU.point=jU}function qU(t,e){OU=t,MU=e,t*=RR,e*=RR,TU.point=XU;var A=NR(e);LU=A*NR(t),_U=A*kR(t),JU=kR(e),HU(LU,_U,JU)}function XU(t,e){t*=RR;var A=NR(e*=RR),n=A*NR(t),r=A*kR(t),i=kR(e),o=_U*i-JU*r,a=JU*n-LU*i,s=LU*r-_U*n,g=xR(o*o+a*a+s*s),c=OR(g),I=g&&-c/g;NU+=I*o,kU+=I*a,xU+=I*s,FU+=c,RU+=c*(LU+(LU=n)),UU+=c*(_U+(_U=r)),GU+=c*(JU+(JU=i)),HU(LU,_U,JU)}function zU(t,e){return function(A,n,r){if(A){var i=ER(A,(r||this).context);return i&&i.path[t](n)}return e(n)}}var $U=zU("area",(function(t){return qR.reset(),KR(t,XR),2*qR})),tG=zU("bounds",(function(t){var e,A,n,r,i,o,a;if(oU=iU=-(nU=rU=1/0),IU=[],KR(t,CU),A=IU.length){for(IU.sort(vU),e=1,i=[n=IU[0]];e<A;++e)mU(n,(r=IU[e])[0])||mU(n,r[1])?(yU(n[0],r[1])>yU(n[0],n[1])&&(n[1]=r[1]),yU(r[0],n[1])>yU(n[0],n[1])&&(n[0]=r[0])):i.push(n=r);for(o=-1/0,e=0,n=i[A=i.length-1];e<=A;n=r,++e)r=i[e],(a=yU(n[1],r[0]))>o&&(o=a,nU=r[0],iU=n[1])}return IU=uU=null,nU===1/0||rU===1/0?[[NaN,NaN],[NaN,NaN]]:[[nU,rU],[iU,oU]]})),eG=zU("centroid",(function(t){bU=FU=wU=SU=DU=RU=UU=GU=NU=kU=xU=0,KR(t,TU);var e=NU,A=kU,n=xU,r=e*e+A*A+n*n;return r<1e-12&&(e=RU,A=UU,n=GU,FU<1e-6&&(e=wU,A=SU,n=DU),(r=e*e+A*A+n*n)<1e-12)?[NaN,NaN]:[GR(A,e)*DR,OR(n/xR(r))*DR]}));function AG(t,e,A){try{t[e].apply(t,["EXPRESSION"].concat([].slice.call(A)))}catch(n){t.warn(n)}return A[A.length-1]}var nG=function(t,e,A){t.prototype=e.prototype=A,A.constructor=t};function rG(t,e){var A=Object.create(t.prototype);for(var n in e)A[n]=e[n];return A}function iG(){}var oG="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",aG="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sG=/^#([0-9a-f]{3,8})$/,gG=new RegExp("^rgb\\("+["\\s*([+-]?\\d+)\\s*","\\s*([+-]?\\d+)\\s*","\\s*([+-]?\\d+)\\s*"]+"\\)$"),cG=new RegExp("^rgb\\("+[aG,aG,aG]+"\\)$"),IG=new RegExp("^rgba\\("+["\\s*([+-]?\\d+)\\s*","\\s*([+-]?\\d+)\\s*","\\s*([+-]?\\d+)\\s*",oG]+"\\)$"),uG=new RegExp("^rgba\\("+[aG,aG,aG,oG]+"\\)$"),lG=new RegExp("^hsl\\("+[oG,aG,aG]+"\\)$"),CG=new RegExp("^hsla\\("+[oG,aG,aG,oG]+"\\)$"),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 BG(){return this.rgb().formatHex()}function fG(){return this.rgb().formatRgb()}function dG(t){var e,A;return t=(t+"").trim().toLowerCase(),(e=sG.exec(t))?(A=e[1].length,e=parseInt(e[1],16),6===A?QG(e):3===A?new vG(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===A?EG(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===A?EG(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=gG.exec(t))?new vG(e[1],e[2],e[3],1):(e=cG.exec(t))?new vG(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=IG.exec(t))?EG(e[1],e[2],e[3],e[4]):(e=uG.exec(t))?EG(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=lG.exec(t))?wG(e[1],e[2]/100,e[3]/100,1):(e=CG.exec(t))?wG(e[1],e[2]/100,e[3]/100,e[4]):hG.hasOwnProperty(t)?QG(hG[t]):"transparent"===t?new vG(NaN,NaN,NaN,0):null}function QG(t){return new vG(t>>16&255,t>>8&255,255&t,1)}function EG(t,e,A,n){return n<=0&&(t=e=A=NaN),new vG(t,e,A,n)}function pG(t){return t instanceof iG||(t=dG(t)),t?new vG((t=t.rgb()).r,t.g,t.b,t.opacity):new vG}function yG(t,e,A,n){return 1===arguments.length?pG(t):new vG(t,e,A,null==n?1:n)}function vG(t,e,A,n){this.r=+t,this.g=+e,this.b=+A,this.opacity=+n}function mG(){return"#"+FG(this.r)+FG(this.g)+FG(this.b)}function bG(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}function FG(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function wG(t,e,A,n){return n<=0?t=e=A=NaN:A<=0||A>=1?t=e=NaN:e<=0&&(t=NaN),new RG(t,e,A,n)}function SG(t){if(t instanceof RG)return new RG(t.h,t.s,t.l,t.opacity);if(t instanceof iG||(t=dG(t)),!t)return new RG;if(t instanceof RG)return t;var e=(t=t.rgb()).r/255,A=t.g/255,n=t.b/255,r=Math.min(e,A,n),i=Math.max(e,A,n),o=NaN,a=i-r,s=(i+r)/2;return a?(o=e===i?(A-n)/a+6*(A<n):A===i?(n-e)/a+2:(e-A)/a+4,a/=s<.5?i+r:2-i-r,o*=60):a=s>0&&s<1?0:o,new RG(o,a,s,t.opacity)}function DG(t,e,A,n){return 1===arguments.length?SG(t):new RG(t,e,A,null==n?1:n)}function RG(t,e,A,n){this.h=+t,this.s=+e,this.l=+A,this.opacity=+n}function UG(t,e,A){return 255*(t<60?e+(A-e)*t/60:t<180?A:t<240?e+(A-e)*(240-t)/60:e)}function GG(t){var e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function NG(t){var e=yG(t);return.2126*GG(e.r)+.7152*GG(e.g)+.0722*GG(e.b)}nG(iG,dG,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:BG,formatHex:BG,formatHsl:function(){return SG(this).formatHsl()},formatRgb:fG,toString:fG}),nG(vG,yG,rG(iG,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vG(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vG(this.r*t,this.g*t,this.b*t,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:mG,formatHex:mG,formatRgb:bG,toString:bG})),nG(RG,DG,rG(iG,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new RG(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new RG(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,A=this.l,n=A+(A<.5?A:1-A)*e,r=2*A-n;return new vG(UG(t>=240?t-240:t+120,r,n),UG(t,r,n),UG(t<120?t+240:t-120,r,n),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 t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));function kG(t,e){return t===e||t!==t&&e!==e||(Object(U.A)(t)?!(!Object(U.A)(e)||t.length!==e.length)&&function(t,e){for(var A=0,n=t.length;A<n;++A)if(!kG(t[A],e[A]))return!1;return!0}(t,e):!(!Object(U.F)(t)||!Object(U.F)(e))&&xG(t,e))}function xG(t,e){for(var A in t)if(!kG(t[A],e[A]))return!1;return!0}function OG(t){return function(e){return xG(t,e)}}var MG=function(t){return t.data};function LG(t,e){var A=iD.call(e,t);return A.root&&A.root.lookup||{}}var _G=function(){return"undefined"!==typeof window&&window||null};function JG(t,e){for(var A,n,r=e.fields,i=e.values,o=r.length,a=0;a<o;++a)if((n=r[a]).getter=U.t.getter||Object(U.t)(n.field),A=n.getter(t),Object(U.C)(A)&&(A=Object(U.cb)(A)),Object(U.C)(i[a])&&(i[a]=Object(U.cb)(i[a])),Object(U.C)(i[a][0])&&(i[a]=i[a].map(U.cb)),"E"===n.type){if(Object(U.A)(i[a])?i[a].indexOf(A)<0:A!==i[a])return!1}else if("R"===n.type){if(!Object(U.z)(A,i[a]))return!1}else if("R-RE"===n.type){if(!Object(U.z)(A,i[a],!0,!1))return!1}else if("R-E"===n.type){if(!Object(U.z)(A,i[a],!1,!1))return!1}else if("R-LE"===n.type&&!Object(U.z)(A,i[a],!1,!0))return!1;return!0}var TG={E_union:function(t,e){if(!t.length)return e;for(var A=0,n=e.length;A<n;++A)t.indexOf(e[A])<0&&t.push(e[A]);return t},E_intersect:function(t,e){return t.length?t.filter((function(t){return e.indexOf(t)>=0})):e},R_union:function(t,e){var A=Object(U.cb)(e[0]),n=Object(U.cb)(e[1]);return A>n&&(A=e[1],n=e[0]),t.length?(t[0]>A&&(t[0]=A),t[1]<n&&(t[1]=n),t):[A,n]},R_intersect:function(t,e){var A=Object(U.cb)(e[0]),n=Object(U.cb)(e[1]);return A>n&&(A=e[1],n=e[0]),t.length?n<t[0]||t[1]<A?[]:(t[0]<A&&(t[0]=A),t[1]>n&&(t[1]=n),t):[A,n]}};function jG(t,e,A,n){"Literal"!==e[0].type&&Object(U.n)("First argument to selection functions must be a string literal.");var r=e[0].value,i=":"+r;"intersect"!==(e.length>=2&&Object(U.U)(e).value)||Object(U.v)(n,"@unit")||(n["@unit"]=A.getData(r).indataRef(A,"unit")),Object(U.v)(n,i)||(n[i]=A.getData(r).tuplesRef())}var HG=Math.PI/180,YG=180/Math.PI;function VG(t){if(t instanceof WG)return new WG(t.l,t.a,t.b,t.opacity);if(t instanceof tN)return eN(t);t instanceof vG||(t=pG(t));var e,A,n=XG(t.r),r=XG(t.g),i=XG(t.b),o=KG((.2225045*n+.7168786*r+.0606169*i)/1);return n===r&&r===i?e=A=o:(e=KG((.4360747*n+.3850649*r+.1430804*i)/.96422),A=KG((.0139322*n+.0971045*r+.7141733*i)/.82521)),new WG(116*o-16,500*(e-o),200*(o-A),t.opacity)}function ZG(t,e,A,n){return 1===arguments.length?VG(t):new WG(t,e,A,null==n?1:n)}function WG(t,e,A,n){this.l=+t,this.a=+e,this.b=+A,this.opacity=+n}function KG(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function PG(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function qG(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function XG(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function zG(t){if(t instanceof tN)return new tN(t.h,t.c,t.l,t.opacity);if(t instanceof WG||(t=VG(t)),0===t.a&&0===t.b)return new tN(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*YG;return new tN(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function $G(t,e,A,n){return 1===arguments.length?zG(t):new tN(t,e,A,null==n?1:n)}function tN(t,e,A,n){this.h=+t,this.c=+e,this.l=+A,this.opacity=+n}function eN(t){if(isNaN(t.h))return new WG(t.l,0,0,t.opacity);var e=t.h*HG;return new WG(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}nG(WG,ZG,rG(iG,{brighter:function(t){return new WG(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new WG(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,A=isNaN(this.b)?t:t-this.b/200;return new vG(qG(3.1338561*(e=.96422*PG(e))-1.6168667*(t=1*PG(t))-.4906146*(A=.82521*PG(A))),qG(-.9787684*e+1.9161415*t+.033454*A),qG(.0719453*e-.2289914*t+1.4052427*A),this.opacity)}})),nG(tN,$G,rG(iG,{brighter:function(t){return new tN(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new tN(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return eN(this).rgb()}}));var AN={random:function(){return Wo()},cumulativeNormal:ra,cumulativeLogNormal:ca,cumulativeUniform:Ba,densityNormal:na,densityLogNormal:ga,densityUniform:ha,quantileNormal:ia,quantileLogNormal:Ia,quantileUniform:fa,sampleNormal:Aa,sampleLogNormal:sa,sampleUniform:Ca,isArray:U.A,isBoolean:U.B,isDate:U.C,isDefined:function(t){return void 0!==t},isNumber:U.E,isObject:U.F,isRegExp:U.G,isString:U.H,isTuple:Dt,isValid:function(t){return null!=t&&t===t},toBoolean:U.ab,toDate:U.bb,toNumber:U.cb,toString:U.eb,flush:U.u,lerp:U.J,merge:function(){var t=[].slice.call(arguments);return t.unshift({}),U.o.apply(null,t)},pad:U.P,peek:U.U,span:U.X,inrange:U.z,truncate:U.fb,rgb:yG,lab:ZG,hcl:$G,hsl:DG,luminance:NG,contrast:function(t,e){var A=NG(t),n=NG(e);return(Math.max(A,n)+.05)/(Math.min(A,n)+.05)},sequence:function(t,e,A){t=+t,e=+e,A=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+A;for(var n=-1,r=0|Math.max(0,Math.ceil((e-t)/A)),i=new Array(r);++n<r;)i[n]=t+n*A;return i},format:aD,utcFormat:gD,utcParse:ID,utcOffset:Kn,utcSequence:Xn,timeFormat:sD,timeParse:cD,timeOffset:Wn,timeSequence:qn,timeUnitSpecifier:vA,monthFormat:function(t){return lD.call(this,t,1,"%B")},monthAbbrevFormat:function(t){return lD.call(this,t,1,"%b")},dayFormat:function(t){return lD.call(this,0,2+t,"%A")},dayAbbrevFormat:function(t){return lD.call(this,0,2+t,"%a")},quarter:U.V,utcquarter:U.hb,week:tn,utcweek:an,dayofyear:$A,utcdayofyear:on,warn:function(){return AG(this.context.dataflow,"warn",arguments)},info:function(){return AG(this.context.dataflow,"info",arguments)},debug:function(){return AG(this.context.dataflow,"debug",arguments)},extent:U.p,inScope:function(t){var e=this.context.group,A=!1;if(e)for(;t;){if(t===e){A=!0;break}t=t.mark.group}return A},intersect:function(t,e,A){if(!t)return[];var n=Object(ba.a)(t,2),r=n[0],i=n[1],o=(new wI).set(r[0],r[1],i[0],i[1]);return Rd(A||this.context.dataflow.scenegraph().root,o,function(t){var e=null;if(t){var A=Object(U.i)(t.marktype),n=Object(U.i)(t.markname);e=function(t){return(!A.length||A.some((function(e){return t.marktype===e})))&&(!n.length||n.some((function(e){return t.name===e})))}}return e}(e))},clampRange:U.j,pinchDistance:function(t){var e=t.touches,A=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(A*A+n*n)},pinchAngle:function(t){var e=t.touches;return Math.atan2(e[0].clientY-e[1].clientY,e[0].clientX-e[1].clientX)},screen:function(){var t=_G();return t?t.screen:{}},containerSize:function(){var t=this.context.dataflow,e=t.container&&t.container();return e?[e.clientWidth,e.clientHeight]:[void 0,void 0]},windowSize:function(){var t=_G();return t?[t.innerWidth,t.innerHeight]:[void 0,void 0]},bandspace:function(t,e,A){return rC(t||0,e||0,A||0)},setdata:function(t,e){var A=this.context.dataflow,n=this.context.data[t].input;return A.pulse(n,A.changeset().remove(U.gb).insert(e)),1},pathShape:function(t){var e=null;return function(A){return A?Rc(A,e=e||Qc(t)):t}},panLinear:U.Q,panLog:U.R,panPow:U.S,panSymlog:U.T,zoomLinear:U.lb,zoomLog:U.mb,zoomPow:U.nb,zoomSymlog:U.ob,encode:function(t,e,A){if(t){var n=this.context.dataflow,r=t.mark.source;n.pulse(r,n.changeset().encode(t,e))}return void 0!==A?A:t},modify:function(t,e,A,n,r,i){var o,a,s=this.context.dataflow,g=this.context.data[t],c=g.input,I=g.changes,u=s.stamp();if(!1===s._trigger||!(c.value.length||e||n))return 0;if((!I||I.stamp<u)&&(g.changes=I=s.changeset(),I.stamp=u,s.runAfter((function(){g.modified=!0,s.pulse(c,I).run()}),!0,1)),A&&(o=!0===A?U.gb:Object(U.A)(A)||Dt(A)?A:OG(A),I.remove(o)),e&&I.insert(e),n&&(o=OG(n),c.value.some(o)?I.remove(o):I.insert(n)),r)for(a in i)I.modify(r,a,i[a]);return 1}},nN=["view","item","group","xy","x","y"],rN={};function iN(t,e,A){return 1===arguments.length?AN[t]:(AN[t]=e,A&&(rN[t]=A),aN&&(aN.functions[t]="this."+t),this)}iN("bandwidth",(function(t,e){var A=ER(t,(e||this).context);return A&&A.bandwidth?A.bandwidth():0}),dR),iN("copy",(function(t,e){var A=ER(t,(e||this).context);return A?A.copy():void 0}),dR),iN("domain",(function(t,e){var A=ER(t,(e||this).context);return A?A.domain():[]}),dR),iN("range",(function(t,e){var A=ER(t,(e||this).context);return A&&A.range?A.range():[]}),dR),iN("invert",(function(t,e,A){var n=ER(t,(A||this).context);return n?Object(U.A)(e)?(n.invertRange||n.invert)(e):(n.invert||n.invertExtent)(e):void 0}),dR),iN("scale",(function(t,e,A){var n=ER(t,(A||this).context);return n?n(e):void 0}),dR),iN("gradient",(function(t,e,A,n,r){t=ER(t,(r||this).context);var i=yg(e,A),o=t.domain(),a=o[0],s=Object(U.U)(o),g=U.x;return s-a?g=bf(t,a,s):t=(t.interpolator?QB("sequential")().interpolator(t.interpolator()):QB("linear")().interpolate(t.interpolate()).range(t.range())).domain([a=0,s=1]),t.ticks&&(a!==(o=t.ticks(+n||15))[0]&&o.unshift(a),s!==Object(U.U)(o)&&o.push(s)),o.forEach((function(e){return i.stop(g(e),t(e))})),i}),dR),iN("geoArea",$U,dR),iN("geoBounds",tG,dR),iN("geoCentroid",eG,dR),iN("geoShape",(function(t,e,A){var n=ER(t,(A||this).context);return function(t){return n?n.path.context(t)(e):""}}),dR),iN("indata",(function(t,e,A){var n=this.context.data[t]["index:"+e],r=n?n.value.get(A):void 0;return r?r.count:r}),(function(t,e,A,n){"Literal"!==e[0].type&&Object(U.n)("First argument to indata must be a string literal."),"Literal"!==e[1].type&&Object(U.n)("Second argument to indata must be a string literal.");var r=e[0].value,i=e[1].value,o="@"+i;Object(U.v)(o,n)||(n[o]=A.getData(r).indataRef(A,i))})),iN("data",iD,fR),iN("treePath",(function(t,e,A){var n=LG(t,this),r=n[e],i=n[A];return r&&i?r.path(i).map(MG):void 0}),fR),iN("treeAncestors",(function(t,e){var A=LG(t,this)[e];return A?A.ancestors().map(MG):void 0}),fR),iN("vlSelectionTest",(function(t,e,A){for(var n,r,i,o,a,s=this.context.data[t],g=s?s.values.value:[],c=s?s["index:unit"]&&s["index:unit"].value:void 0,I="intersect"===A,u=g.length,l=0;l<u;++l)if(n=g[l],c&&I){if(-1===(i=(r=r||{})[o=n.unit]||0))continue;if(a=JG(e,n),r[o]=a?-1:++i,a&&1===c.size)return!0;if(!a&&i===c.get(o).count)return!1}else if(I^(a=JG(e,n)))return a;return u&&I}),jG),iN("vlSelectionResolve",(function(t,e,A){for(var n,r,i,o,a,s,g,c,I,u,l,C=this.context.data[t],h=C?C.values.value:[],B={},f={},d={},Q=h.length,p=0;p<Q;++p){for(o=(n=h[p]).unit,r=n.fields,i=n.values,u=0,l=r.length;u<l;++u)a=r[u],g=(s=B[a.field]||(B[a.field]={}))[o]||(s[o]=[]),d[a.field]=c=a.type.charAt(0),I=TG[c+"_union"],s[o]=I(g,Object(U.i)(i[u]));A&&(g=f[o]||(f[o]=[])).push(Object(U.i)(i).reduce((function(t,e,A){return t[r[A].field]=e,t}),{}))}return e=e||"union",Object.keys(B).forEach((function(t){B[t]=Object.keys(B[t]).map((function(e){return B[t][e]})).reduce((function(A,n){return void 0===A?n:TG[d[t]+"_"+e](A,n)}))})),h=Object.keys(f),A&&h.length&&(B.vlMulti="union"===e?Object(E.a)({},"or",h.reduce((function(t,e){return t.push.apply(t,f[e]),t}),[])):Object(E.a)({},"and",h.map((function(t){return Object(E.a)({},"or",f[t])})))),B}),jG);var oN={blacklist:["_"],whitelist:["datum","event","item"],fieldvar:"datum",globalvar:function(t){return"_["+Object(U.Z)("$"+t)+"]"},functions:function(t){var e=BR(t);for(var A in nN.forEach((function(t){return e[t]="event.vega."+t})),AN)e[A]="this."+A;return Object(U.o)(e,function(t,e,A){e.__bandwidth=function(t){return t&&t.bandwidth?t.bandwidth():0},A._bandwidth=dR,A._range=dR,A._scale=dR;var n=function(e){return"_["+("Literal"===e.type?Object(U.Z)("%"+e.value):Object(U.Z)("%")+"+"+t(e))+"]"};return{_bandwidth:function(t){return"this.__bandwidth(".concat(n(t[0]),")")},_range:function(t){return"".concat(n(t[0]),".range()")},_scale:function(e){return"".concat(n(e[0]),"(").concat(t(e[1]),")")}}}(t,AN,rN)),e},constants:hR,visitors:rN},aN=function(t){var e=(t=t||{}).whitelist?Object(U.db)(t.whitelist):{},A=t.blacklist?Object(U.db)(t.blacklist):{},n=t.constants||hR,r=(t.functions||BR)(I),i=t.globalvar,o=t.fieldvar,a={},s={},g=0,c=Object(U.D)(i)?i:function(t){return i+'["'+t+'"]'};function I(t){if(Object(U.H)(t))return t;var e=u[t.type];return null==e&&Object(U.n)("Unsupported type: "+t.type),e(t)}var u={Literal:function(t){return t.raw},Identifier:function(t){var r=t.name;return g>0?r:Object(U.v)(A,r)?Object(U.n)("Illegal identifier: "+r):Object(U.v)(n,r)?n[r]:Object(U.v)(e,r)?r:(a[r]=1,c(r))},MemberExpression:function(t){var e=!t.computed,A=I(t.object);e&&(g+=1);var n=I(t.property);return A===o&&(s[function(t){var e=t&&t.length-1;return e&&('"'===t[0]&&'"'===t[e]||"'"===t[0]&&"'"===t[e])?t.slice(1,-1):t}(n)]=1),e&&(g-=1),A+(e?"."+n:"["+n+"]")},CallExpression:function(t){"Identifier"!==t.callee.type&&Object(U.n)("Illegal callee type: "+t.callee.type);var e=t.callee.name,A=t.arguments,n=Object(U.v)(r,e)&&r[e];return n||Object(U.n)("Unrecognized function: "+e),Object(U.D)(n)?n(A):n+"("+A.map(I).join(",")+")"},ArrayExpression:function(t){return"["+t.elements.map(I).join(",")+"]"},BinaryExpression:function(t){return"("+I(t.left)+t.operator+I(t.right)+")"},UnaryExpression:function(t){return"("+t.operator+I(t.argument)+")"},ConditionalExpression:function(t){return"("+I(t.test)+"?"+I(t.consequent)+":"+I(t.alternate)+")"},LogicalExpression:function(t){return"("+I(t.left)+t.operator+I(t.right)+")"},ObjectExpression:function(t){return"{"+t.properties.map(I).join(",")+"}"},Property:function(t){g+=1;var e=I(t.key);return g-=1,e+":"+I(t.value)}};function l(t){var e={code:I(t),globals:Object.keys(a),fields:Object.keys(s)};return a={},s={},e}return l.functions=r,l.constants=n,l}(oN),sN=function(t,e){var A,n,r={};try{t=Object(U.H)(t)?t:Object(U.Z)(t)+"",A=CR(t)}catch(i){Object(U.n)("Expression parse error: "+t)}return A.visit((function(t){if("CallExpression"===t.type){var A=t.callee.name,n=oN.visitors[A];n&&n(A,t.arguments,e,r)}})),(n=aN(A)).globals.forEach((function(t){var A="$"+t;!Object(U.v)(r,A)&&e.getSignal(t)&&(r[A]=e.signalRef(t))})),{$expr:Object(U.o)({code:n.code},e.options.ast?{ast:A}:null),$fields:n.fields,$params:r}},gN=Object(U.db)(["rule"]),cN=Object(U.db)(["group","image","rect"]);function IN(t){return(t+"").toLowerCase()}function uN(t,e,A){";"!==A[A.length-1]&&(A="return("+A+");");var n=Function.apply(null,e.concat(A));return t&&t.functions?n.bind(t.functions):n}var lN={operator:function(t,e){return uN(t,["_"],e.code)},parameter:function(t,e){return uN(t,["datum","_"],e.code)},event:function(t,e){return uN(t,["event"],e.code)},handler:function(t,e){return uN(t,["_","event"],"var datum=event.item&&event.item.datum;return ".concat(e.code,";"))},encode:function(t,e){var A=e.marktype,n=e.channels,r="var o=item,datum=o.datum,m=0,$;";for(var i in n){var o="o["+Object(U.Z)(i)+"]";r+="$=".concat(n[i].code,";if(").concat(o,"!==$)").concat(o,"=$,m=1;")}return r+=function(t,e){var A="";return gN[e]||(t.x2&&(t.x?(cN[e]&&(A+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),A+="o.width=o.x2-o.x;"):A+="o.x=o.x2-(o.width||0);"),t.xc&&(A+="o.x=o.xc-(o.width||0)/2;"),t.y2&&(t.y?(cN[e]&&(A+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),A+="o.height=o.y2-o.y;"):A+="o.y=o.y2-(o.height||0);"),t.yc&&(A+="o.y=o.yc-(o.height||0)/2;")),A}(n,A),uN(t,["item","_"],r+="return m;")},codegen:{get:function(t){var e="[".concat(t.map(U.Z).join("]["),"]"),A=Function("_","return _".concat(e,";"));return A.path=e,A},comparator:function(t,e){var A,n=Function("a","b","var u, v; return "+t.map((function(t,n){var r,i,o=e[n];return t.path?(r="a".concat(t.path),i="b".concat(t.path)):((A=A||{})["f"+n]=t,r="this.f".concat(n,"(a)"),i="this.f".concat(n,"(b)")),function(t,e,A,n){return"((u = ".concat(t,") < (v = ").concat(e,") || u == null) && v != null ? ").concat(A,"\n  : (u > v || v == null) && u != null ? ").concat(n,"\n  : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ").concat(A,"\n  : v !== v && u === u ? ").concat(n," : ")}(r,i,-o,o)})).join("")+"0;");return A?n.bind(A):n}}};function CN(t,e,A){if(!t||!Object(U.F)(t))return t;for(var n,r=0,i=hN.length;r<i;++r)if(n=hN[r],Object(U.v)(t,n.key))return n.parse(t,e,A);return t}var hN=[{key:"$ref",parse:function(t,e){return e.get(t.$ref)||Object(U.n)("Operator not defined: "+t.$ref)}},{key:"$key",parse:function(t,e){var A="k:"+t.$key+"_"+!!t.$flat;return e.fn[A]||(e.fn[A]=Object(U.I)(t.$key,t.$flat,e.expr.codegen))}},{key:"$expr",parse:function(t,e,A){t.$params&&e.parseParameters(t.$params,A);var n="e:"+t.$expr.code+"_"+t.$name;return e.fn[n]||(e.fn[n]=Object(U.f)(e.parameterExpression(t.$expr),t.$fields,t.$name))}},{key:"$field",parse:function(t,e){if(!t.$field)return null;var A="f:"+t.$field+"_"+t.$name;return e.fn[A]||(e.fn[A]=Object(U.t)(t.$field,t.$name,e.expr.codegen))}},{key:"$encode",parse:function(t,e){var A=t.$encode,n={};for(var r in A){var i=A[r];n[r]=Object(U.f)(e.encodeExpression(i.$expr),i.$fields),n[r].output=i.$output}return n}},{key:"$compare",parse:function(t,e){var A="c:"+t.$compare+"_"+t.$order,n=Object(U.i)(t.$compare).map((function(t){return t&&t.$tupleid?Rt:t}));return e.fn[A]||(e.fn[A]=Object(U.k)(n,t.$order,e.expr.codegen))}},{key:"$context",parse:function(t,e){return e}},{key:"$subflow",parse:function(t,e){var A=t.$subflow;return function(t,n,r){var i=e.fork().parse(A),o=i.get(A.operators[0].id),a=i.signals.parent;return a&&a.set(r),o.detachSubflow=function(){return e.detach(i)},o}}},{key:"$tupleid",parse:function(){return Rt}}];var BN={skip:!0};var fN=function(t,e,A,n){return new dN(t,e,A,n)};function dN(t,e,A,n){this.dataflow=t,this.transforms=e,this.events=t.events.bind(t),this.expr=n||lN,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},A&&(this.functions=Object.create(A),this.functions.context=this)}function QN(t){this.dataflow=t.dataflow,this.transforms=t.transforms,this.events=t.events,this.expr=t.expr,this.signals=Object.create(t.signals),this.scales=Object.create(t.scales),this.nodes=Object.create(t.nodes),this.data=Object.create(t.data),this.fn=Object.create(t.fn),t.functions&&(this.functions=Object.create(t.functions),this.functions.context=this)}dN.prototype=QN.prototype={fork:function(){var t=new QN(this);return(this.subcontext||(this.subcontext=[])).push(t),t},detach:function(t){this.subcontext=this.subcontext.filter((function(e){return e!==t}));for(var e=Object.keys(t.nodes),A=0,n=e;A<n.length;A++){var r=n[A];t.nodes[r]._targets=null}for(var i=0,o=e;i<o.length;i++){var a=o[i];t.nodes[a].detach()}t.nodes=null},get:function(t){return this.nodes[t]},set:function(t,e){return this.nodes[t]=e},add:function(t,e){var A=this,n=A.dataflow,r=t.value;if(A.set(t.id,e),"collect"===IN(t.type)&&r&&(r.$ingest?n.ingest(e,r.$ingest,r.$format):r.$request?n.preload(e,r.$request,r.$format):n.pulse(e,n.changeset().insert(r))),t.root&&(A.root=e),t.parent){var i=A.get(t.parent.$ref);i?(n.connect(i,[e]),e.targets().add(i)):(A.unresolved=A.unresolved||[]).push((function(){i=A.get(t.parent.$ref),n.connect(i,[e]),e.targets().add(i)}))}if(t.signal&&(A.signals[t.signal]=e),t.scale&&(A.scales[t.scale]=e),t.data){var o=function(n){var r=A.data[n]||(A.data[n]={});t.data[n].forEach((function(t){return r[t]=e}))};for(var a in t.data)o(a)}},resolve:function(){return(this.unresolved||[]).forEach((function(t){return t()})),delete this.unresolved,this},operator:function(t,e){this.add(t,this.dataflow.add(t.value,e))},transform:function(t,e){this.add(t,this.dataflow.add(this.transforms[IN(e)]))},stream:function(t,e){this.set(t.id,e)},update:function(t,e,A,n,r){this.dataflow.on(e,A,n,r,t.options)},operatorExpression:function(t){return this.expr.operator(this,t)},parameterExpression:function(t){return this.expr.parameter(this,t)},eventExpression:function(t){return this.expr.event(this,t)},handlerExpression:function(t){return this.expr.handler(this,t)},encodeExpression:function(t){return this.expr.encode(this,t)},parse:function(t){var e=this,A=t.operators||[];return t.background&&(e.background=t.background),t.eventConfig&&(e.eventConfig=t.eventConfig),t.locale&&(e.locale=t.locale),A.forEach((function(t){return e.parseOperator(t)})),A.forEach((function(t){return e.parseOperatorParameters(t)})),(t.streams||[]).forEach((function(t){return e.parseStream(t)})),(t.updates||[]).forEach((function(t){return e.parseUpdate(t)})),e.resolve()},parseOperator:function(t){"operator"!==IN(t.type)&&t.type?this.transform(t,t.type):this.operator(t,t.update?this.operatorExpression(t.update):null)},parseOperatorParameters:function(t){if(t.params){var e=this.get(t.id);e||Object(U.n)("Invalid operator id: "+t.id),this.dataflow.connect(e,e.parameters(this.parseParameters(t.params),t.react,t.initonly))}},parseParameters:function(t,e){e=e||{};var A=this;for(var n in t){var r=t[n];e[n]=Object(U.A)(r)?r.map((function(t){return CN(t,A,e)})):CN(r,A,e)}return e},parseStream:function(t){var e,A=this,n=null!=t.filter?A.eventExpression(t.filter):void 0,r=null!=t.stream?A.get(t.stream):void 0;t.source?r=A.events(t.source,t.type,n):t.merge&&(r=(e=t.merge.map((function(t){return A.get(t)})))[0].merge.apply(e[0],e.slice(1))),t.between&&(e=t.between.map((function(t){return A.get(t)})),r=r.between(e[0],e[1])),t.filter&&(r=r.filter(n)),null!=t.throttle&&(r=r.throttle(+t.throttle)),null!=t.debounce&&(r=r.debounce(+t.debounce)),null==r&&Object(U.n)("Invalid stream definition: "+JSON.stringify(t)),t.consume&&r.consume(!0),A.stream(t,r)},parseUpdate:function(t){var e,A=Object(U.F)(A=t.source)?A.$ref:A,n=this.get(A),r=t.update,i=void 0;n||Object(U.n)("Source not defined: "+t.source),e=t.target&&t.target.$expr?this.eventExpression(t.target.$expr):this.get(t.target),r&&r.$expr&&(r.$params&&(i=this.parseParameters(r.$params)),r=this.handlerExpression(r.$expr)),this.update(t,n,e,r,i)},getState:function(t){var e=this,A={};if(t.signals){var n=A.signals={};Object.keys(e.signals).forEach((function(A){var r=e.signals[A];t.signals(A,r)&&(n[A]=r.value)}))}if(t.data){var r=A.data={};Object.keys(e.data).forEach((function(A){var n=e.data[A];t.data(A,n)&&(r[A]=n.input.value)}))}return e.subcontext&&!1!==t.recurse&&(A.subcontext=e.subcontext.map((function(e){return e.getState(t)}))),A},setState:function(t){var e=this,A=e.dataflow,n=t.data,r=t.signals;Object.keys(r||{}).forEach((function(t){A.update(e.signals[t],r[t],BN)})),Object.keys(n||{}).forEach((function(t){A.pulse(e.data[t].input,A.changeset().remove(U.gb).insert(n[t]))})),(t.subcontext||[]).forEach((function(t,A){var n=e.subcontext[A];n&&n.setState(t)}))}};var EN={skip:!0};function pN(t,e){var A=t.autosize(),n=t.padding();return e-(A&&"padding"===A.contains?n.left+n.right:0)}function yN(t,e){var A=t.autosize(),n=t.padding();return e-(A&&"padding"===A.contains?n.top+n.bottom:0)}function vN(t,e){return e.modified&&Object(U.A)(e.input.value)&&t.indexOf("_:vega:_")}function mN(t,e){return!("parent"===t||e instanceof ho.proxy)}var bN=A(878),FN=function(t,e,A,n){var r=t.element();r&&r.setAttribute("title",function(t){return null==t?"":Object(U.A)(t)?wN(t):Object(U.F)(t)&&!Object(U.C)(t)?(e=t,Object.keys(e).map((function(t){var A=e[t];return t+": "+(Object(U.A)(A)?wN(A):SN(A))})).join("\n")):t+"";var e}(n))};function wN(t){return"["+t.map(SN).join(", ")+"]"}function SN(t){return Object(U.A)(t)?"[\u2026]":Object(U.F)(t)&&!Object(U.C)(t)?"{\u2026}":t}function DN(t,e){if(e=e||{},co.call(this),e.loader&&this.loader(e.loader),e.logger&&this.logger(e.logger),null!=e.logLevel&&this.logLevel(e.logLevel),e.locale||t.locale){var A=Object(U.o)({},t.locale,e.locale);this.locale(_i(A.number,A.time))}this._el=null,this._elBind=null,this._renderType=e.renderer||wd.Canvas,this._scenegraph=new vl;var n=this._scenegraph.root;this._renderer=null,this._tooltip=e.tooltip||FN,this._redraw=!0,this._handler=(new Zl).scene(n),this._globalCursor=!1,this._preventDefault=!1,this._timers=[],this._eventListeners=[],this._resizeListeners=[],this._eventConfig=function(t){var e=Object(U.o)({defaults:{}},t),A=function(t,e){e.forEach((function(e){Object(U.A)(t[e])&&(t[e]=Object(U.db)(t[e]))}))};return A(e.defaults,["prevent","allow"]),A(e,["view","window","selector"]),e}(t.eventConfig),this.globalCursor(this._eventConfig.globalCursor);var r=function(t,e,A){return fN(t,ho,AN,A).parse(e)}(this,t,e.expr);this._runtime=r,this._signals=r.signals,this._bind=(t.bindings||[]).map((function(t){return{state:null,param:Object(U.o)({},t)}})),r.root&&r.root.set(n),n.source=r.data.root.input,this.pulse(r.data.root.input,this.changeset().insert(n.items)),this._width=this.width(),this._height=this.height(),this._viewWidth=pN(this,this._width),this._viewHeight=yN(this,this._height),this._origin=[0,0],this._resize=0,this._autosize=1,function(t){var e=t._signals,A=e.width,n=e.height,r=e.padding;function i(){t._autosize=t._resize=1}t._resizeWidth=t.add(null,(function(e){t._width=e.size,t._viewWidth=pN(t,e.size),i()}),{size:A}),t._resizeHeight=t.add(null,(function(e){t._height=e.size,t._viewHeight=yN(t,e.size),i()}),{size:n});var o=t.add(null,i,{pad:r});t._resizeWidth.rank=A.rank+1,t._resizeHeight.rank=n.rank+1,o.rank=r.rank+1}(this),function(t){t.add(null,(function(e){return t._background=e.bg,t._resize=1,e.bg}),{bg:t._signals.background})}(this),function(t){var e=t._signals.cursor||(t._signals.cursor=t.add({user:"default",item:null}));t.on(t.events("view","mousemove"),e,(function(t,A){var n=e.value,r=n?Object(U.H)(n)?n:n.user:"default",i=A.item&&A.item.cursor||null;return n&&r===n.user&&i==n.item?n:{user:r,item:i}})),t.add(null,(function(e){var A=e.cursor,n=this.value;return Object(U.H)(A)||(n=A.item,A=A.user),mS(t,A&&"default"!==A?A:n||A),n}),{cursor:e})}(this),this.description(t.description),e.hover&&this.hover(),e.container&&this.initialize(e.container,e.bind)}var RN=Object(U.y)(DN,co);function UN(t,e){return Object(U.v)(t._signals,e)?t._signals[e]:Object(U.n)("Unrecognized signal name: "+Object(U.Z)(e))}function GN(t,e){var A=(t._targets||[]).filter((function(t){return t._update&&t._update.handler===e}));return A.length?A[0]:null}function NN(t,e,A,n){var r=GN(A,n);return r||((r=PS(t,(function(){return n(e,A.value)}))).handler=n,t.on(A,null,r)),t}function kN(t,e,A){var n=GN(e,A);return n&&e._targets.remove(n),t}RN.evaluate=function(){var t=Object(mt.a)(H.a.mark((function t(e,A,n){return H.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,co.prototype.evaluate.call(this,e,A);case 2:if(!this._redraw&&!this._resize){t.next=14;break}if(t.prev=3,!this._renderer){t.next=8;break}return this._resize&&(this._resize=0,RS(this)),t.next=8,this._renderer.renderAsync(this._scenegraph.root);case 8:this._redraw=!1,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(3),this.error(t.t0);case 14:return n&&bt(this,n),t.abrupt("return",this);case 16:case"end":return t.stop()}}),t,this,[[3,11]])})));return function(e,A,n){return t.apply(this,arguments)}}(),RN.dirty=function(t){this._redraw=!0,this._renderer&&this._renderer.dirty(t)},RN.description=function(t){if(arguments.length){var e=null!=t?t+"":null;return e!==this._desc&&vS(this._el,this._desc=e),this}return this._desc},RN.container=function(){return this._el},RN.scenegraph=function(){return this._scenegraph},RN.origin=function(){return this._origin.slice()},RN.signal=function(t,e,A){var n=UN(this,t);return 1===arguments.length?n.value:this.update(n,e,A)},RN.width=function(t){return arguments.length?this.signal("width",t):this.signal("width")},RN.height=function(t){return arguments.length?this.signal("height",t):this.signal("height")},RN.padding=function(t){return arguments.length?this.signal("padding",zS(t)):zS(this.signal("padding"))},RN.autosize=function(t){return arguments.length?this.signal("autosize",t):this.signal("autosize")},RN.background=function(t){return arguments.length?this.signal("background",t):this.signal("background")},RN.renderer=function(t){return arguments.length?(Dd(t)||Object(U.n)("Unrecognized renderer type: "+t),t!==this._renderType&&(this._renderType=t,this._resetRenderer()),this):this._renderType},RN.tooltip=function(t){return arguments.length?(t!==this._tooltip&&(this._tooltip=t,this._resetRenderer()),this):this._tooltip},RN.loader=function(t){return arguments.length?(t!==this._loader&&(co.prototype.loader.call(this,t),this._resetRenderer()),this):this._loader},RN.resize=function(){return this._autosize=1,this.touch(UN(this,"autosize"))},RN._resetRenderer=function(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},RN._resizeView=function(t,e,A,n,r,i){this.runAfter((function(o){var a=0;o._autosize=0,o.width()!==A&&(a=1,o.signal("width",A,EN),o._resizeWidth.skip(!0)),o.height()!==n&&(a=1,o.signal("height",n,EN),o._resizeHeight.skip(!0)),o._viewWidth!==t&&(o._resize=1,o._viewWidth=t),o._viewHeight!==e&&(o._resize=1,o._viewHeight=e),o._origin[0]===r[0]&&o._origin[1]===r[1]||(o._resize=1,o._origin=r),a&&o.run("enter"),i&&o.runAfter((function(t){return t.resize()}))}),!1,1)},RN.addEventListener=function(t,e,A){var n=e;return A&&!1===A.trap||((n=PS(this,e)).raw=e),this._handler.on(t,n),this},RN.removeEventListener=function(t,e){for(var A,n,r=this._handler.handlers(t),i=r.length;--i>=0;)if(n=r[i].type,A=r[i].handler,t===n&&(e===A||e===A.raw)){this._handler.off(n,A);break}return this},RN.addResizeListener=function(t){var e=this._resizeListeners;return e.indexOf(t)<0&&e.push(t),this},RN.removeResizeListener=function(t){var e=this._resizeListeners,A=e.indexOf(t);return A>=0&&e.splice(A,1),this},RN.addSignalListener=function(t,e){return NN(this,t,UN(this,t),e)},RN.removeSignalListener=function(t,e){return kN(this,UN(this,t),e)},RN.addDataListener=function(t,e){return NN(this,t,bS(this,t).values,e)},RN.removeDataListener=function(t,e){return kN(this,bS(this,t).values,e)},RN.globalCursor=function(t){if(arguments.length){if(this._globalCursor!==!!t){var e=mS(this,null);this._globalCursor=!!t,e&&mS(this,e)}return this}return this._globalCursor},RN.preventDefault=function(t){return arguments.length?(this._preventDefault=t,this):this._preventDefault},RN.timer=function(t,e){this._timers.push(function(t,e,A){var n=new bN.a,r=e;return null==e?(n.restart(t,e,A),n):(e=+e,A=null==A?Object(bN.b)():+A,n.restart((function i(o){o+=r,n.restart(i,r+=e,A),t(o)}),e,A),n)}((function(e){t({timestamp:Date.now(),elapsed:e})}),e))},RN.events=function(t,e,A){var n,r=this,i=new Kt(A),o=function(A,n){r.runAsync(null,(function(){"view"===t&&function(t,e){var A=t._eventConfig.defaults,n=A.prevent,r=A.allow;return!1!==n&&!0!==r&&(!0===n||!1===r||(n?n[e]:r?!r[e]:t.preventDefault()))}(r,e)&&A.preventDefault(),i.receive(US(r,A,n))}))};if("timer"===t)NS(r,"timer",e)&&r.timer(o,e);else if("view"===t)NS(r,"view",e)&&r.addEventListener(e,o,GS);else if("window"===t?NS(r,"window",e)&&"undefined"!==typeof window&&(n=[window]):"undefined"!==typeof document&&NS(r,"selector",e)&&(n=document.querySelectorAll(t)),n){for(var a=0,s=n.length;a<s;++a)n[a].addEventListener(e,o);r._eventListeners.push({type:e,sources:n,handler:o})}else r.warn("Can not resolve event source: "+t);return i},RN.finalize=function(){var t,e,A,n=this._tooltip,r=this._timers,i=this._eventListeners;for(t=r.length;--t>=0;)r[t].stop();for(t=i.length;--t>=0;)for(e=(A=i[t]).sources.length;--e>=0;)A.sources[e].removeEventListener(A.type,A.handler);return n&&n.call(this,this._handler,null,null,null),this},RN.hover=function(t,e){return e=[e||"update",(t=[t||"hover"])[0]],this.on(this.events("view","mouseover",kS),xS,OS(t)),this.on(this.events("view","mouseout",kS),xS,OS(e)),this},RN.data=function(t,e){return arguments.length<2?bS(this,t).values.value:FS.call(this,t,Lt().remove(U.gb).insert(e))},RN.change=FS,RN.insert=function(t,e){return FS.call(this,t,Lt().insert(e))},RN.remove=function(t,e){return FS.call(this,t,Lt().remove(e))},RN.scale=function(t){var e=this._runtime.scales;return Object(U.v)(e,t)||Object(U.n)("Unrecognized scale or projection: "+t),e[t].value},RN.initialize=function(t,e){var A=this,n=A._renderType,r=A._eventConfig.bind,i=Dd(n);t=A._el=t?qS(A,t):null,function(t){var e=t.container();e&&(e.setAttribute("role","graphics-document"),e.setAttribute("aria-roleDescription","visualization"),vS(e,t.description()))}(A),i||A.error("Unrecognized renderer type: "+n);var o=i.handler||Zl,a=t?i.renderer:i.headless;return A._renderer=a?KS(A,A._renderer,t,a):null,A._handler=function(t,e,A,n){var r=new n(t.loader(),PS(t,t.tooltip())).scene(t.scenegraph().root).initialize(A,DS(t),t);return e&&e.handlers().forEach((function(t){r.on(t.type,t.handler)})),r}(A,A._handler,t,o),A._redraw=!0,t&&"none"!==r&&(e=e?A._elBind=qS(A,e):t.appendChild(MS("form",{class:"vega-bindings"})),A._bind.forEach((function(t){t.param.element&&"container"!==r&&(t.element=qS(A,t.param.element))})),A._bind.forEach((function(t){TS(A,t.element||e,t)}))),A},RN.toImageURL=function(t,e){return eD.apply(this,arguments)},RN.toCanvas=function(t,e){return nD.apply(this,arguments)},RN.toSVG=function(t){return rD.apply(this,arguments)},RN.getState=function(t){return this._runtime.getState(t||{data:vN,signals:mN,recurse:!0})},RN.setState=function(t){return this.runAsync(null,(function(e){e._trigger=!1,e._runtime.setState(t)}),(function(t){t._trigger=!0})),this};var xN=function(t){return Object(U.F)(t)?t:{type:t||"pad"}},ON=function(t){return+t||0},MN=function(t){return Object(U.F)(t)?t.signal?t:{top:ON(t.top),bottom:ON(t.bottom),left:ON(t.left),right:ON(t.right)}:{top:e=ON(t),bottom:e,left:e,right:e};var e},LN=function(t){return Object(U.F)(t)&&!Object(U.A)(t)?Object(U.o)({},t):{value:t}};function _N(t,e,A,n){return null!=A?(Object(U.F)(A)&&!Object(U.A)(A)?t.update[e]=A:t[n||"enter"][e]={value:A},1):0}function JN(t,e,A){for(var n in e)_N(t,n,e[n]);for(var r in A)_N(t,r,A[r],"update")}function TN(t,e,A){for(var n in e)A&&Object(U.v)(A,n)||(t[n]=Object(U.o)(t[n]||{},e[n]));return t}function jN(t,e){return e&&(e.enter&&e.enter[t]||e.update&&e.update[t])}function HN(t,e,A){t[e]=A&&A.signal?{signal:A.signal}:{value:A}}var YN=function(t){return Object(U.H)(t)?Object(U.Z)(t):t.signal?"(".concat(t.signal,")"):KN(t)};function VN(t){if(null!=t.gradient)return function(t){var e=[t.start,t.stop,t.count].map((function(t){return null==t?null:Object(U.Z)(t)}));for(;e.length&&null==Object(U.U)(e);)e.pop();return e.unshift(YN(t.gradient)),"gradient(".concat(e.join(","),")")}(t);var e=t.signal?"(".concat(t.signal,")"):t.color?function(t){return t.c?ZN("hcl",t.h,t.c,t.l):t.h||t.s?ZN("hsl",t.h,t.s,t.l):t.l||t.a?ZN("lab",t.l,t.a,t.b):t.r||t.g||t.b?ZN("rgb",t.r,t.g,t.b):null}(t.color):null!=t.field?KN(t.field):void 0!==t.value?Object(U.Z)(t.value):void 0;return null!=t.scale&&(e=function(t,e){var A=YN(t.scale);null!=t.range?e="lerp(_range(".concat(A,"), ").concat(+t.range,")"):(void 0!==e&&(e="_scale(".concat(A,", ").concat(e,")")),t.band&&(e=(e?e+"+":"")+"_bandwidth(".concat(A,")")+(1===+t.band?"":"*"+WN(t.band)),t.extra&&(e="(datum.extra ? _scale(".concat(A,", datum.extra.value) : ").concat(e,")"))),null==e&&(e="0"));return e}(t,e)),void 0===e&&(e=null),null!=t.exponent&&(e="pow(".concat(e,",").concat(WN(t.exponent),")")),null!=t.mult&&(e+="*".concat(WN(t.mult))),null!=t.offset&&(e+="+".concat(WN(t.offset))),t.round&&(e="round(".concat(e,")")),e}var ZN=function(t,e,A,n){return"(".concat(t,"(").concat([e,A,n].map(VN).join(","),")+'')")};function WN(t){return Object(U.F)(t)?"("+VN(t)+")":t}function KN(t){return function t(e){var A,n,r;if(e.signal)A="datum",r=e.signal;else if(e.group||e.parent){for(n=Math.max(1,e.level||1),A="item";n-- >0;)A+=".mark.group";e.parent?(r=e.parent,A+=".datum"):r=e.group}else e.datum?(A="datum",r=e.datum):Object(U.n)("Invalid field reference: "+Object(U.Z)(e));e.signal||(r=Object(U.H)(r)?Object(U.Y)(r).map(U.Z).join("]["):t(r));return A+"["+r+"]"}(Object(U.F)(t)?t:{datum:t})}var PN=function(t,e,A,n,r,i){var o={};for(var a in(i=i||{}).encoders={$encode:o},t=function(t,e,A,n,r){var i,o,a,s={},g={};for(o in o="lineBreak","text"!==e||null==r[o]||jN(o,t)||HN(s,o,r[o]),("legend"==A||String(A).startsWith("axis"))&&(A=null),a="frame"===A?r.group:"mark"===A?Object(U.o)({},r.mark,r[e]):null)jN(o,t)||("fill"===o||"stroke"===o)&&(jN("fill",t)||jN("stroke",t))||HN(s,o,a[o]);for(o in Object(U.i)(n).forEach((function(e){var A=r.style&&r.style[e];for(var n in A)jN(n,t)||HN(s,n,A[n])})),t=Object(U.o)({},t),s)(a=s[o]).signal?(i=i||{})[o]=a:g[o]=a;return t.enter=Object(U.o)(g,t.enter),i&&(t.update=Object(U.o)(i,t.update)),t}(t,e,A,n,r.config))o[a]=qN(t[a],e,i,r);return i};function qN(t,e,A,n){var r,i={},o={};for(var a in t)null!=t[a]&&(i[a]=XN((r=t[a],Object(U.A)(r)?function(t){var e="";return t.forEach((function(t){var A=VN(t);e+=t.test?"(".concat(t.test,")?").concat(A,":"):A})),":"===Object(U.U)(e)&&(e+="null"),e}(r):VN(r)),n,A,o));return{$expr:{marktype:e,channels:i},$fields:Object.keys(o),$output:Object.keys(t)}}function XN(t,e,A,n){var r=sN(t,e);return r.$fields.forEach((function(t){return n[t]=1})),Object(U.o)(A,r.$params),r.$expr}var zN=["value","update","init","react","bind"];function $N(t,e){Object(U.n)(t+' for "outer" push: '+Object(U.Z)(e))}var tk=function(t,e){var A=t.name;if("outer"===t.push)e.signals[A]||$N("No prior signal definition",A),zN.forEach((function(e){void 0!==t[e]&&$N("Invalid property ",e)}));else{var n=e.addSignal(A,t.value);!1===t.react&&(n.react=!1),t.bind&&e.addBinding(A,t.bind)}};function ek(t,e,A,n){this.id=-1,this.type=t,this.value=e,this.params=A,n&&(this.parent=n)}function Ak(t,e,A,n){return new ek(t,e,A,n)}function nk(t,e){return Ak("operator",t,e)}function rk(t){var e={$ref:t.id};return t.id<0&&(t.refs=t.refs||[]).push(e),e}function ik(t,e){return e?{$field:t,$name:e}:{$field:t}}var ok=ik("key");function ak(t,e){return{$compare:t,$order:e}}function sk(t,e){return(t&&t.signal?"$"+t.signal:t||"")+(t&&e?"_":"")+(e&&e.signal?"$"+e.signal:e||"")}function gk(t){return t&&t.signal}function ck(t){if(gk(t))return!0;if(Object(U.F)(t))for(var e in t)if(ck(t[e]))return!0;return!1}function Ik(t,e){return null!=t?t:e}function uk(t){return t&&t.signal||t}function lk(t,e){return(t.merge?Ck:t.stream?hk:t.type?Bk:Object(U.n)("Invalid stream specification: "+Object(U.Z)(t)))(t,e)}function Ck(t,e){var A=fk({merge:t.merge.map((function(t){return lk(t,e)}))},t,e);return e.addStream(A).id}function hk(t,e){var A=fk({stream:lk(t.stream,e)},t,e);return e.addStream(A).id}function Bk(t,e){var A,n,r;return"timer"===t.type?(A=e.event("timer",t.throttle),t={between:t.between,filter:t.filter}):A=e.event("scope"===(r=t.source)?"view":r||"view",t.type),n=fk({stream:A},t,e),1===Object.keys(n).length?A:e.addStream(n).id}function fk(t,e,A){var n=e.between;return n&&(2!==n.length&&Object(U.n)('Stream "between" parameter must have 2 entries: '+Object(U.Z)(e)),t.between=[lk(n[0],A),lk(n[1],A)]),n=e.filter?[].concat(e.filter):[],(e.marktype||e.markname||e.markrole)&&n.push(function(t,e,A){var n="event.item";return n+(t&&"*"!==t?"&&"+n+".mark.marktype==='"+t+"'":"")+(A?"&&"+n+".mark.role==='"+A+"'":"")+(e?"&&"+n+".mark.name==='"+e+"'":"")}(e.marktype,e.markname,e.markrole)),"scope"===e.source&&n.push("inScope(event.item)"),n.length&&(t.filter=sN("("+n.join(")&&(")+")",A).$expr),null!=(n=e.throttle)&&(t.throttle=+n),null!=(n=e.debounce)&&(t.debounce=+n),e.consume&&(t.consume=!0),t}var dk,Qk,Ek=function(t,e,A){return dk=e||pk,Qk=A||vk,bk(t.trim()).map(Fk)},pk="view",yk=/[[\]{}]/,vk={"*":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 mk(t,e,A,n,r){for(var i,o=0,a=t.length;e<a;++e){if(i=t[e],!o&&i===A)return e;r&&r.indexOf(i)>=0?--o:n&&n.indexOf(i)>=0&&++o}return e}function bk(t){for(var e=[],A=0,n=t.length,r=0;r<n;)r=mk(t,r,",","[{","]}"),e.push(t.substring(A,r).trim()),A=++r;if(0===e.length)throw"Empty event selector: "+t;return e}function Fk(t){return"["===t[0]?function(t){var e,A,n=t.length,r=1;if((r=mk(t,r,"]","[","]"))===n)throw"Empty between selector: "+t;if(2!==(e=bk(t.substring(1,r))).length)throw"Between selector must have two elements: "+t;if(">"!==(t=t.slice(r+1).trim())[0])throw"Expected '>' after between selector: "+t;if(e=e.map(Fk),(A=Fk(t.slice(1).trim())).between)return{between:e,stream:A};A.between=e;return A}(t):function(t){var e,A,n={source:dk},r=[],i=[0,0],o=0,a=0,s=t.length,g=0;if("}"===t[s-1]){if(!((g=t.lastIndexOf("{"))>=0))throw"Unmatched right brace: "+t;try{i=function(t){var e=t.split(",");if(!t.length||e.length>2)throw t;return e.map((function(e){var A=+e;if(A!==A)throw t;return A}))}(t.substring(g+1,s-1))}catch(I){throw"Invalid throttle specification: "+t}t=t.slice(0,g).trim(),s=t.length,g=0}if(!s)throw t;"@"===t[0]&&(o=++g);(e=mk(t,g,":"))<s&&(r.push(t.substring(a,e).trim()),a=g=++e);if((g=mk(t,g,"["))===s)r.push(t.substring(a,s).trim());else if(r.push(t.substring(a,g).trim()),A=[],(a=++g)===s)throw"Unmatched left bracket: "+t;for(;g<s;){if((g=mk(t,g,"]"))===s)throw"Unmatched left bracket: "+t;if(A.push(t.substring(a,g).trim()),g<s-1&&"["!==t[++g])throw"Expected left bracket: "+t;a=++g}if(!(s=r.length)||yk.test(r[s-1]))throw"Invalid event selector: "+t;s>1?(n.type=r[1],o?n.markname=r[0].slice(1):(c=r[0],Qk[c]?n.marktype=r[0]:n.source=r[0])):n.type=r[0];var c;"!"===n.type.slice(-1)&&(n.consume=!0,n.type=n.type.slice(0,-1));null!=A&&(n.filter=A);i[0]&&(n.throttle=i[0]);i[1]&&(n.debounce=i[1]);return n}(t)}var wk={code:"_.$value",ast:{type:"Identifier",value:"value"}},Sk=function(t,e,A){var n=t.events,r=t.update,i=t.encode,o=[],a={target:A};n||Object(U.n)("Signal update missing events specification."),Object(U.H)(n)&&(n=Ek(n,e.isSubscope()?"scope":"view")),n=Object(U.i)(n).filter((function(t){return t.signal||t.scale?(o.push(t),0):1})),o.length>1&&(o=[Dk(o)]),n.length&&o.push(n.length>1?{merge:n}:n[0]),null!=i&&(r&&Object(U.n)("Signal encode and update are mutually exclusive."),r="encode(item(),"+Object(U.Z)(i)+")"),a.update=Object(U.H)(r)?sN(r,e):null!=r.expr?sN(r.expr,e):null!=r.value?r.value:null!=r.signal?{$expr:wk,$params:{$value:e.signalRef(r.signal)}}:Object(U.n)("Invalid signal update specification."),t.force&&(a.options={force:!0}),o.forEach((function(t){e.addUpdate(Object(U.o)(function(t,e){return{source:t.signal?e.signalRef(t.signal):t.scale?e.scaleRef(t.scale):lk(t,e)}}(t,e),a))}))};function Dk(t){return{signal:"["+t.map((function(t){return t.scale?'scale("'+t.scale+'")':t.signal}))+"]"}}var Rk=function(t){return function(e,A,n){return Ak(t,A,e||void 0,n)}},Uk=Rk("aggregate"),Gk=Rk("axisticks"),Nk=Rk("bound"),kk=Rk("collect"),xk=Rk("compare"),Ok=Rk("datajoin"),Mk=Rk("encode"),Lk=Rk("expression"),_k=(Rk("extent"),Rk("facet")),Jk=Rk("field"),Tk=Rk("key"),jk=Rk("legendentries"),Hk=Rk("load"),Yk=Rk("mark"),Vk=Rk("multiextent"),Zk=Rk("multivalues"),Wk=Rk("overlap"),Kk=Rk("params"),Pk=Rk("prefacet"),qk=Rk("projection"),Xk=Rk("proxy"),zk=Rk("relay"),$k=Rk("render"),tx=Rk("scale"),ex=Rk("sieve"),Ax=Rk("sortitems"),nx=Rk("viewlayout"),rx=Rk("values"),ix=0,ox={min:"min",max:"max",count:"sum"};function ax(t,e){var A,n,r=e.getScale(t.name).params;for(A in r.domain=Ix(t.domain,t,e),null!=t.range&&(r.range=function t(e,A,n){var r=e.range,i=A.config.range;if(r.signal)return A.signalRef(r.signal);if(Object(U.H)(r)){if(i&&Object(U.v)(i,r))return e=Object(U.o)({},e,{range:i[r]}),t(e,A,n);"width"===r?r=[0,{signal:"width"}]:"height"===r?r=vB(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:Object(U.n)("Unrecognized scale range value: "+Object(U.Z)(r))}else{if(r.scheme)return n.scheme=Object(U.A)(r.scheme)?gx(r.scheme,A):sx(r.scheme,A),r.extent&&(n.schemeExtent=gx(r.extent,A)),void(r.count&&(n.schemeCount=sx(r.count,A)));if(r.step)return void(n.rangeStep=sx(r.step,A));if(vB(e.type)&&!Object(U.A)(r))return Ix(r,e,A);Object(U.A)(r)||Object(U.n)("Unsupported range type: "+Object(U.Z)(r))}return r.map((function(t){return(Object(U.A)(t)?gx:sx)(t,A)}))}(t,e,r)),null!=t.interpolate&&function(t,e){e.interpolate=sx(t.type||t),null!=t.gamma&&(e.interpolateGamma=sx(t.gamma))}(t.interpolate,r),null!=t.nice&&(r.nice=(n=t.nice,Object(U.F)(n)?{interval:sx(n.interval),step:sx(n.step)}:sx(n))),null!=t.bins&&(r.bins=function(t,e){return t.signal||Object(U.A)(t)?gx(t,e):e.objectProperty(t)}(t.bins,e)),t)Object(U.v)(r,A)||"name"===A||(r[A]=sx(t[A],e))}function sx(t,e){return Object(U.F)(t)?t.signal?e.signalRef(t.signal):Object(U.n)("Unsupported object: "+Object(U.Z)(t)):t}function gx(t,e){return t.signal?e.signalRef(t.signal):t.map((function(t){return sx(t,e)}))}function cx(t){Object(U.n)("Can not find data set: "+Object(U.Z)(t))}function Ix(t,e,A){if(t)return t.signal?A.signalRef(t.signal):(Object(U.A)(t)?ux:t.fields?Cx:lx)(t,e,A);null==e.domainMin&&null==e.domainMax||Object(U.n)("No scale domain defined for domainMin/domainMax to override.")}function ux(t,e,A){return t.map((function(t){return sx(t,A)}))}function lx(t,e,A){var n=A.getData(t.data);return n||cx(t.data),vB(e.type)?n.valuesRef(A,t.field,Bx(t.sort,!1)):wB(e.type)?n.domainRef(A,t.field):n.extentRef(A,t.field)}function Cx(t,e,A){var n=t.data,r=t.fields.reduce((function(t,e){return e=Object(U.H)(e)?{data:n,field:e}:Object(U.A)(e)||e.signal?function(t,e){var A="_:vega:_"+ix++,n=kk({});if(Object(U.A)(t))n.value={$ingest:t};else if(t.signal){var r="setdata("+Object(U.Z)(A)+","+t.signal+")";n.params.input=e.signalRef(r)}return e.addDataPipeline(A,[n,ex({})]),{data:A,field:"data"}}(e,A):e,t.push(e),t}),[]);return(vB(e.type)?hx:wB(e.type)?fx:dx)(t,A,r)}function hx(t,e,A){var n,r,i,o,a,s=Bx(t.sort,!0);return n=A.map((function(t){var A=e.getData(t.data);return A||cx(t.data),A.countsRef(e,t.field,s)})),r={groupby:ok,pulse:n},s&&(i=s.op||"count",a=s.field?sk(i,s.field):"count",r.ops=[ox[i]],r.fields=[e.fieldRef(a)],r.as=[a]),i=e.add(Uk(r)),o=e.add(kk({pulse:rk(i)})),a=e.add(rx({field:ok,sort:e.sortRef(s),pulse:rk(o)})),rk(a)}function Bx(t,e){return t&&(t.field||t.op?t.field||"count"===t.op?e&&t.field&&t.op&&!ox[t.op]&&Object(U.n)("Multiple domain scales can not be sorted using "+t.op):Object(U.n)("No field provided for sort aggregate op: "+t.op):Object(U.F)(t)?t.field="key":t={field:"key"}),t}function fx(t,e,A){var n=A.map((function(t){var A=e.getData(t.data);return A||cx(t.data),A.domainRef(e,t.field)}));return rk(e.add(Zk({values:n})))}function dx(t,e,A){var n=A.map((function(t){var A=e.getData(t.data);return A||cx(t.data),A.extentRef(e,t.field)}));return rk(e.add(Vk({extents:n})))}function Qx(t,e,A){return Object(U.A)(t)?t.map((function(t){return Qx(t,e,A)})):Object(U.F)(t)?t.signal?A.signalRef(t.signal):"fit"===e?t:Object(U.n)("Unsupported parameter object: "+Object(U.Z)(t)):t}var Ex="value",px=["size","shape","fill","stroke","strokeWidth","strokeDash","opacity"],yx={name:1,style:1,interactive:1},vx={value:0},mx={value:1},bx=function(t){return t.type="group",t.interactive=t.interactive||!1,t};function Fx(t,e){var A=function(A,n){return Ik(t[A],Ik(e[A],n))};return A.isVertical=function(A){return"vertical"===Ik(t.direction,e.direction||(A?e.symbolDirection:e.gradientDirection))},A.gradientLength=function(){return Ik(t.gradientLength,e.gradientLength||e.gradientWidth)},A.gradientThickness=function(){return Ik(t.gradientThickness,e.gradientThickness||e.gradientHeight)},A.entryColumns=function(){return Ik(t.columns,Ik(e.columns,+A.isVertical(!0)))},A}function wx(t,e){var A=e&&(e.update&&e.update[t]||e.enter&&e.enter[t]);return A&&A.signal?A:A?A.value:null}function Sx(t,e,A){return"item.anchor === '".concat("start","' ? ").concat(t," : item.anchor === '").concat("end","' ? ").concat(e," : ").concat(A)}var Dx=Sx(Object(U.Z)("left"),Object(U.Z)("right"),Object(U.Z)("center"));function Rx(t,e){return e?t?Object(U.F)(t)?Object.assign({},t,{offset:Rx(t.offset,e)}):{value:t,offset:e}:e:t}var Ux=function(t,e){return e?(t.name=e.name,t.style=e.style||t.style,t.interactive=!!e.interactive,t.encode=TN(t.encode,e,yx)):t.interactive=!1,t},Gx=function(t,e,A,n){var r,i,o,a,s,g,c=Fx(t,A),I=c.isVertical(),u=c.gradientThickness(),l=c.gradientLength();return I?(o=[0,1],a=[0,0],s=u,g=l):(o=[0,0],a=[1,0],s=l,g=u),JN(r={enter:i={opacity:vx,x:vx,y:vx,width:LN(s),height:LN(g)},update:Object(U.o)({},i,{opacity:mx,fill:{gradient:e,start:o,stop:a}}),exit:{opacity:vx}},{stroke:c("gradientStrokeColor"),strokeWidth:c("gradientStrokeWidth")},{opacity:c("gradientOpacity")}),Ux({type:"rect",role:"legend-gradient",encode:r},n)},Nx=function(t,e,A,n,r){var i,o,a,s,g,c,I=Fx(t,A),u=I.isVertical(),l=I.gradientThickness(),C=I.gradientLength(),h="";return u?(a="y",g="y2",s="x",c="width",h="1-"):(a="x",g="x2",s="y",c="height"),(o={opacity:vx,fill:{scale:e,field:Ex}})[a]={signal:h+"datum.perc",mult:C},o[s]=vx,o[g]={signal:h+"datum.perc2",mult:C},o[c]=LN(l),JN(i={enter:o,update:Object(U.o)({},o,{opacity:mx}),exit:{opacity:vx}},{stroke:I("gradientStrokeColor"),strokeWidth:I("gradientStrokeWidth")},{opacity:I("gradientOpacity")}),Ux({type:"rect",role:"legend-band",key:Ex,from:r,encode:i},n)},kx="datum.".concat("perc",'<=0?"').concat("left",'":datum.').concat("perc",'>=1?"').concat("right",'":"').concat("center",'"'),xx="datum.".concat("perc",'<=0?"').concat("bottom",'":datum.').concat("perc",'>=1?"').concat("top",'":"').concat("middle",'"'),Ox=function(t,e,A,n){var r,i,o,a,s,g=Fx(t,e),c=g.isVertical(),I=LN(g.gradientThickness()),u=g.gradientLength(),l=g("labelOverlap"),C="";return JN(r={enter:i={opacity:vx},update:o={opacity:mx,text:{field:"label"}},exit:{opacity:vx}},{fill:g("labelColor"),fillOpacity:g("labelOpacity"),font:g("labelFont"),fontSize:g("labelFontSize"),fontStyle:g("labelFontStyle"),fontWeight:g("labelFontWeight"),limit:Ik(t.labelLimit,e.gradientLabelLimit)}),c?(i.align={value:"left"},i.baseline=o.baseline={signal:xx},a="y",s="x",C="1-"):(i.align=o.align={signal:kx},i.baseline={value:"top"},a="x",s="y"),i[a]=o[a]={signal:C+"datum.perc",mult:u},i[s]=o[s]=I,I.offset=Ik(t.labelOffset,e.gradientLabelOffset)||0,l=l?{separation:g("labelSeparation"),method:l,order:"datum.index"}:void 0,Ux({type:"text",role:"legend-label",style:"guide-label",key:Ex,from:n,encode:r,overlap:l},A)},Mx=function(t,e,A,n,r){var i,o,a,s,g,c,I,u=Fx(t,e),l=A.entries,C=!(!l||!l.interactive),h=l?l.name:void 0,B=u("clipHeight"),f=u("symbolOffset"),d={data:"value"},Q={},E="(".concat(r,") ? datum.").concat("offset"," : datum.").concat("size"),p=B?LN(B):{field:"size"},y="datum.".concat("index"),v="max(1, ".concat(r,")");p.mult=.5,Q={enter:i={opacity:vx,x:{signal:E,mult:.5,offset:f},y:p},update:o={opacity:mx,x:i.x,y:i.y},exit:{opacity:vx}};var m=null,b=null;return t.fill||(m=e.symbolBaseFillColor,b=e.symbolBaseStrokeColor),JN(Q,{fill:u("symbolFillColor",m),shape:u("symbolType"),size:u("symbolSize"),stroke:u("symbolStrokeColor",b),strokeDash:u("symbolDash"),strokeDashOffset:u("symbolDashOffset"),strokeWidth:u("symbolStrokeWidth")},{opacity:u("symbolOpacity")}),px.forEach((function(e){t[e]&&(o[e]=i[e]={scale:t[e],field:Ex})})),s=Ux({type:"symbol",role:"legend-symbol",key:Ex,from:d,clip:!!B||void 0,encode:Q},A.symbols),(a=LN(f)).offset=u("labelOffset"),JN(Q={enter:i={opacity:vx,x:{signal:E,offset:a},y:p},update:o={opacity:mx,text:{field:"label"},x:i.x,y:i.y},exit:{opacity:vx}},{align:u("labelAlign"),baseline:u("labelBaseline"),fill:u("labelColor"),fillOpacity:u("labelOpacity"),font:u("labelFont"),fontSize:u("labelFontSize"),fontStyle:u("labelFontStyle"),fontWeight:u("labelFontWeight"),limit:u("labelLimit")}),g=Ux({type:"text",role:"legend-label",style:"guide-label",key:Ex,from:d,encode:Q},A.labels),Q={enter:{noBound:{value:!B},width:vx,height:B?LN(B):vx,opacity:vx},exit:{opacity:vx},update:o={opacity:mx,row:{signal:null},column:{signal:null}}},u.isVertical(!0)?(c="ceil(item.mark.items.length / ".concat(v,")"),o.row.signal="".concat(y,"%").concat(c),o.column.signal="floor(".concat(y," / ").concat(c,")"),I={field:["row",y]}):(o.row.signal="floor(".concat(y," / ").concat(v,")"),o.column.signal="".concat(y," % ").concat(v),I={field:y}),o.column.signal="(".concat(r,")?").concat(o.column.signal,":").concat(y),bx({role:"scope",from:n={facet:{data:n,name:"value",groupby:"index"}},encode:TN(Q,l,yx),marks:[s,g],name:h,interactive:C,sort:I})};var Lx='item.orient === "left"',_x='item.orient === "right"',Jx="(".concat(Lx," || ").concat(_x,")"),Tx="datum.vgrad && ".concat(Jx),jx=Sx('"top"','"bottom"','"middle"'),Hx=Sx('"right"','"left"','"center"'),Yx="datum.vgrad && ".concat(_x," ? (").concat(Hx,") : (").concat(Jx," && !(datum.vgrad && ").concat(Lx,')) ? "left" : ').concat(Dx),Vx="item._anchor || (".concat(Jx,' ? "middle" : "start")'),Zx="".concat(Tx," ? (").concat(Lx," ? -90 : 90) : 0"),Wx="".concat(Jx," ? (datum.vgrad ? (").concat(_x,' ? "bottom" : "top") : ').concat(jx,') : "top"'),Kx=function(t,e){var A;return Object(U.F)(t)&&(t.signal?A=t.signal:t.path?A="pathShape("+Px(t.path)+")":t.sphere&&(A="geoShape("+Px(t.sphere)+', {type: "Sphere"})')),A?e.signalRef(A):!!t};function Px(t){return Object(U.F)(t)&&t.signal?t.signal:Object(U.Z)(t)}var qx=function(t){var e=t.role||"";return e.indexOf("axis")&&e.indexOf("legend")&&e.indexOf("title")?"group"===t.type?"scope":e||"mark":e},Xx=function(t){return{marktype:t.type,name:t.name||void 0,role:t.role||qx(t),zindex:+t.zindex||void 0,aria:t.aria,description:t.description}},zx=function(t,e){return t&&t.signal?e.signalRef(t.signal):!1!==t},$x=function(t,e){var A=Bo(t.type);A||Object(U.n)("Unrecognized transform type: "+Object(U.Z)(t.type));var n=Ak(A.type.toLowerCase(),null,tO(A,t,e));return t.signal&&e.addSignal(t.signal,e.proxy(n)),n.metadata=A.metadata||{},n};function tO(t,e,A){var n,r,i,o={};for(r=0,i=t.params.length;r<i;++r)o[(n=t.params[r]).name]=eO(n,e,A);return o}function eO(t,e,A){var n=t.type,r=e[t.name];return"index"===n?function(t,e,A){Object(U.H)(e.from)||Object(U.n)('Lookup "from" parameter must be a string literal.');return A.getData(e.from).lookupRef(A,e.key)}(0,e,A):void 0!==r?"param"===n?function(t,e,A){var n=e[t.name];return t.array?(Object(U.A)(n)||Object(U.n)("Expected an array of sub-parameters. Instead: "+Object(U.Z)(n)),n.map((function(e){return nO(t,e,A)}))):nO(t,n,A)}(t,e,A):"projection"===n?A.projectionRef(e[t.name]):t.array&&!gk(r)?r.map((function(e){return AO(t,e,A)})):AO(t,r,A):void(t.required&&Object(U.n)("Missing required "+Object(U.Z)(e.type)+" parameter: "+Object(U.Z)(t.name)))}function AO(t,e,A){var n=t.type;if(gk(e))return rO(n)?Object(U.n)("Expression references can not be signals."):iO(n)?A.fieldRef(e):oO(n)?A.compareRef(e):A.signalRef(e.signal);var r,i=t.expr||iO(n);return i&&((r=e)&&r.expr)?A.exprRef(e.expr,e.as):i&&function(t){return t&&t.field}(e)?ik(e.field,e.as):rO(n)?sN(e,A):function(t){return"data"===t}(n)?rk(A.getData(e).values):iO(n)?ik(e):oO(n)?A.compareRef(e):e}function nO(t,e,A){var n,r,i,o,a;for(o=0,a=t.params.length;o<a;++o){for(i in(r=t.params[o]).key)if(r.key[i]!==e[i]){r=null;break}if(r)break}return r||Object(U.n)("Unsupported parameter: "+Object(U.Z)(e)),n=Object(U.o)(tO(r,e,A),r.key),rk(A.add(Kk(n)))}function rO(t){return"expr"===t}function iO(t){return"field"===t}function oO(t){return"compare"===t}function aO(t,e){return t.$ref?t:t.data&&t.data.$ref?t.data:rk(e.getData(t.data).output)}function sO(t,e,A,n,r){this.scope=t,this.input=e,this.output=A,this.values=n,this.aggregate=r,this.index={}}sO.fromEntries=function(t,e){var A=e.length,n=1,r=e[0],i=e[A-1],o=e[A-2],a=null;for(r&&"load"===r.type&&(r=e[1]),t.add(e[0]);n<A;++n)e[n].params.pulse=rk(e[n-1]),t.add(e[n]),"aggregate"===e[n].type&&(a=e[n]);return new sO(t,r,o,i,a)};var gO=sO.prototype;function cO(t){return Object(U.H)(t)?t:null}function IO(t,e,A){var n,r=sk(A.op,A.field);if(e.ops){for(var i=0,o=e.as.length;i<o;++i)if(e.as[i]===r)return}else e.ops=["count"],e.fields=[null],e.as=["count"];A.op&&(e.ops.push((n=A.op.signal)?t.signalRef(n):A.op),e.fields.push(t.fieldRef(A.field)),e.as.push(r))}function uO(t,e,A,n,r,i,o){var a,s,g=e[A]||(e[A]={}),c=function(t){return Object(U.F)(t)?("descending"===t.order?"-":"+")+sk(t.op,t.field):""}(i),I=cO(r);if(null!=I&&(t=e.scope,a=g[I+=c?"|"+c:""]),!a){var u=i?{field:ok,pulse:e.countsRef(t,r,i)}:{field:t.fieldRef(r),pulse:rk(e.output)};c&&(u.sort=t.sortRef(i)),s=t.add(Ak(n,void 0,u)),o&&(e.index[r]=s),a=rk(s),null!=I&&(g[I]=a)}return a}gO.countsRef=function(t,e,A){var n,r,i,o=this.counts||(this.counts={}),a=cO(e);return null!=a&&(t=this.scope,n=o[a]),n?A&&A.field&&IO(t,n.agg.params,A):(i={groupby:t.fieldRef(e,"key"),pulse:rk(this.output)},A&&A.field&&IO(t,i,A),r=t.add(Uk(i)),n=t.add(kk({pulse:rk(r)})),n={agg:r,ref:rk(n)},null!=a&&(o[a]=n)),n.ref},gO.tuplesRef=function(){return rk(this.values)},gO.extentRef=function(t,e){return uO(t,this,"extent","extent",e,!1)},gO.domainRef=function(t,e){return uO(t,this,"domain","values",e,!1)},gO.valuesRef=function(t,e,A){return uO(t,this,"vals","values",e,A||!0)},gO.lookupRef=function(t,e){return uO(t,this,"lookup","tupleindex",e,!1)},gO.indataRef=function(t,e){return uO(t,this,"indata","tupleindex",e,!0,!0)};var lO=function(t,e,A){var n,r,i=t.remove,o=t.insert,a=t.toggle,s=t.modify,g=t.values,c=e.add(nk());n="if("+t.trigger+',modify("'+A+'",'+[o,i,a,s,g].map((function(t){return null==t?"null":t})).join(",")+"),0)",r=sN(n,e),c.update=r.$expr,c.params=r.$params},CO=function(t,e){var A,n,r,i,o,a,s,g,c,I,u,l,C,h,B=qx(t),f="group"===t.type,d=t.from&&t.from.facet,Q=t.layout||"scope"===B||"frame"===B,E="mark"===B||Q||d,p=t.overlap;r=function(t,e,A){var n,r,i,o,a;return t?(n=t.facet)&&(e||Object(U.n)("Only group marks can be faceted."),null!=n.field?o=a=aO(n,A):(t.data?a=rk(A.getData(t.data).aggregate):((i=$x(Object(U.o)({type:"aggregate",groupby:Object(U.i)(n.groupby)},n.aggregate),A)).params.key=A.keyRef(n.groupby),i.params.pulse=aO(n,A),o=a=rk(A.add(i))),r=A.keyRef(n.groupby,!0))):o=rk(A.add(kk(null,[{}]))),o||(o=aO(t,A)),{key:r,pulse:o,parent:a}}(t.from,f,e),I=rk(n=e.add(Ok({key:r.key||(t.key?ik(t.key):void 0),pulse:r.pulse,clean:!f}))),n=i=e.add(kk({pulse:I})),n=e.add(Yk({markdef:Xx(t),interactive:zx(t.interactive,e),clip:Kx(t.clip,e),context:{$context:!0},groups:e.lookup(),parent:e.signals.parent?e.signalRef("parent"):null,index:e.markpath(),pulse:rk(n)})),u=rk(n),(n=o=e.add(Mk(PN(t.encode,t.type,B,t.style,e,{mod:!1,pulse:u})))).params.parent=e.encode(),t.transform&&t.transform.forEach((function(t){var A=$x(t,e),r=A.metadata;(r.generates||r.changes)&&Object(U.n)("Mark transforms should not generate new data."),r.nomod||(o.params.mod=!0),A.params.pulse=rk(n),e.add(n=A)})),t.sort&&(n=e.add(Ax({sort:e.compareRef(t.sort),pulse:rk(n)}))),l=rk(n),(d||Q)&&(C=rk(Q=e.add(nx({layout:e.objectProperty(t.layout),legends:e.legends,mark:u,pulse:l})))),h=rk(a=e.add(Nk({mark:u,pulse:C||l}))),f&&(E&&((A=e.operators).pop(),Q&&A.pop()),e.pushState(l,C||h,I),d?function(t,e,A){var n,r,i,o,a=t.from.facet,s=a.name,g=aO(a,e);a.name||Object(U.n)("Facet must have a name: "+Object(U.Z)(a)),a.data||Object(U.n)("Facet must reference a data set: "+Object(U.Z)(a)),a.field?o=e.add(Pk({field:e.fieldRef(a.field),pulse:g})):a.groupby?o=e.add(_k({key:e.keyRef(a.groupby),group:rk(e.proxy(A.parent)),pulse:g})):Object(U.n)("Facet must specify groupby or field: "+Object(U.Z)(a)),r=(n=e.fork()).add(kk()),i=n.add(ex({pulse:rk(r)})),n.addData(s,new sO(n,r,r,i)),n.addSignal("parent",null),o.params.subflow={$subflow:n.parse(t).toRuntime()}}(t,e,r):E?function(t,e,A){var n=e.add(Pk({pulse:A.pulse})),r=e.fork();r.add(ex()),r.addSignal("parent",null),n.params.subflow={$subflow:r.parse(t).toRuntime()}}(t,e,r):e.parse(t),e.popState(),E&&(Q&&A.push(Q),A.push(a))),p&&(h=function(t,e,A){var n,r=t.method,i=t.bound,o=t.separation,a={separation:gk(o)?A.signalRef(o.signal):o,method:gk(r)?A.signalRef(r.signal):r,pulse:e};t.order&&(a.sort=A.compareRef({field:t.order}));i&&(n=i.tolerance,a.boundTolerance=gk(n)?A.signalRef(n.signal):+n,a.boundScale=A.scaleRef(i.scale),a.boundOrient=i.orient);return rk(A.add(Wk(a)))}(p,h,e)),s=e.add($k({pulse:h})),g=e.add(ex({pulse:rk(s)},void 0,e.parent())),null!=t.name&&(c=t.name,e.addData(c,new sO(e,i,s,g)),t.on&&t.on.forEach((function(t){(t.insert||t.remove||t.toggle)&&Object(U.n)("Marks only support modify triggers."),lO(t,e,c)})))};var hO=function(t,e){var A,n,r,i,o,a,s,g,c=e.config.legend,I=t.encode||{},u=I.legend||{},l=u.name||void 0,C=u.interactive,h=u.style,B=Fx(t,c),f={},d=0;return px.forEach((function(e){return t[e]?(f[e]=t[e],d=d||t[e]):0})),d||Object(U.n)("Missing valid scale for legend."),o=function(t,e){var A=t.type||"symbol";t.type||1!==function(t){return px.reduce((function(e,A){return e+(t[A]?1:0)}),0)}(t)||!t.fill&&!t.stroke||(A=yB(e)?"gradient":mB(e)?"discrete":"symbol");return"gradient"!==A?A:mB(e)?"discrete":"gradient"}(t,e.scaleType(d)),a={title:null!=t.title,scales:f,type:o,vgrad:"symbol"!==o&&B.isVertical()},s=rk(e.add(kk(null,[a]))),u=TN(function(t,e,A){var n={enter:{},update:{}};return JN(n,{orient:t("orient"),offset:t("offset"),padding:t("padding"),titlePadding:t("titlePadding"),cornerRadius:t("cornerRadius"),fill:t("fillColor"),stroke:t("strokeColor"),strokeWidth:A.strokeWidth,strokeDash:A.strokeDash,x:t("legendX"),y:t("legendY"),format:e.format,formatType:e.formatType}),n}(B,t,c),u,yx),A={enter:{x:{value:0},y:{value:0}}},g=rk(e.add(jk(r={type:o,scale:e.scaleRef(d),count:e.objectProperty(B("tickCount")),limit:e.property(B("symbolLimit")),values:e.objectProperty(t.values),minstep:e.property(t.tickMinStep),formatType:e.property(t.formatType),formatSpecifier:e.property(t.format)}))),"gradient"===o?(i=[Gx(t,d,c,I.gradient),Ox(t,c,I.labels,g)],r.count=r.count||e.signalRef("max(2,2*floor((".concat(uk(B.gradientLength()),")/100))"))):"discrete"===o?i=[Nx(t,d,c,I.gradient,g),Ox(t,c,I.labels,g)]:(n=function(t,e){var A=Fx(t,e);return{align:A("gridAlign"),columns:A.entryColumns(),center:{row:!0,column:!1},padding:{row:A("rowPadding"),column:A("columnPadding")}}}(t,c),i=[Mx(t,c,I,g,uk(n.columns))],r.size=function(t,e,A){var n=uk(BO("size",t,A)),r=uk(BO("strokeWidth",t,A)),i=uk(function(t,e,A){return wx("fontSize",t)||function(t,e,A){var n=e.config.style[A];return n&&n[t]}("fontSize",e,A)}(A[1].encode,e,"guide-label"));return sN("max(ceil(sqrt(".concat(n,")+").concat(r,"),").concat(i,")"),e)}(t,e,i[0].marks)),i=[bx({role:"legend-entry",from:s,encode:A,marks:i,layout:n,interactive:C})],a.title&&i.push(function(t,e,A,n){var r,i=Fx(t,e);return JN(r={enter:{opacity:vx},update:{opacity:mx,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:vx}},{orient:i("titleOrient"),_anchor:i("titleAnchor"),anchor:{signal:Vx},angle:{signal:Zx},align:{signal:Yx},baseline:{signal:Wx},text:t.title,fill:i("titleColor"),fillOpacity:i("titleOpacity"),font:i("titleFont"),fontSize:i("titleFontSize"),fontStyle:i("titleFontStyle"),fontWeight:i("titleFontWeight"),limit:i("titleLimit"),lineHeight:i("titleLineHeight")},{align:i("titleAlign"),baseline:i("titleBaseline")}),Ux({type:"text",role:"legend-title",style:"guide-title",from:n,encode:r},A)}(t,c,I.title,s)),CO(bx({role:"legend",from:s,encode:u,marks:i,aria:B("aria"),description:B("description"),zindex:B("zindex"),name:l,interactive:C,style:h}),e)};function BO(t,e,A){return e[t]?'scale("'.concat(e[t],'",datum)'):wx(t,A[0].encode)}var fO='item.orient==="'.concat("left",'"?-90:item.orient==="').concat("right",'"?90:0'),dO=function(t,e){var A,n,r=Fx(t=Object(U.H)(t)?{text:t}:t,e.config.title),i=t.encode||{},o=i.group||{},a=o.name||void 0,s=o.interactive,g=o.style,c=[];return A={},n=rk(e.add(kk(null,[A]))),c.push(function(t,e,A,n){var r={value:0},i=t.text,o={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return JN(o,{text:i,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:e("dx"),dy:e("dy"),fill:e("color"),font:e("font"),fontSize:e("fontSize"),fontStyle:e("fontStyle"),fontWeight:e("fontWeight"),lineHeight:e("lineHeight")},{align:e("align"),angle:e("angle"),baseline:e("baseline")}),Ux({type:"text",role:"title-text",style:"group-title",from:n,encode:o},A)}(t,r,function(t){var e=t.encode;return e&&e.title||Object(U.o)({name:t.name,interactive:t.interactive,style:t.style},e)}(t),n)),t.subtitle&&c.push(function(t,e,A,n){var r={value:0},i=t.subtitle,o={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};return JN(o,{text:i,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:e("dx"),dy:e("dy"),fill:e("subtitleColor"),font:e("subtitleFont"),fontSize:e("subtitleFontSize"),fontStyle:e("subtitleFontStyle"),fontWeight:e("subtitleFontWeight"),lineHeight:e("subtitleLineHeight")},{align:e("align"),angle:e("angle"),baseline:e("baseline")}),Ux({type:"text",role:"title-subtitle",style:"group-subtitle",from:n,encode:o},A)}(t,r,i.subtitle,n)),CO(bx({role:"title",from:n,encode:QO(r,o),marks:c,aria:r("aria"),description:r("description"),zindex:r("zindex"),name:a,interactive:s,style:g}),e)};function QO(t,e){var A={enter:{},update:{}};return JN(A,{orient:t("orient"),anchor:t("anchor"),align:{signal:Dx},angle:{signal:fO},limit:t("limit"),frame:t("frame"),offset:t("offset")||0,padding:t("subtitlePadding")}),TN(A,e,yx)}function EO(t,e){var A=[];t.transform&&t.transform.forEach((function(t){A.push($x(t,e))})),t.on&&t.on.forEach((function(A){lO(A,e,t.name)})),e.addDataPipeline(t.name,function(t,e,A){var n,r,i,o,a,s=[],g=null,c=!1,I=!1;t.values?ck(t.values)||ck(t.format)?(s.push(yO(e,t)),s.push(g=pO())):s.push(g=pO({$ingest:t.values,$format:t.format})):t.url?ck(t.url)||ck(t.format)?(s.push(yO(e,t)),s.push(g=pO())):s.push(g=pO({$request:t.url,$format:t.format})):t.source&&(g=n=Object(U.i)(t.source).map((function(t){return rk(e.getData(t).output)})),s.push(null));for(r=0,i=A.length;r<i;++r)o=A[r],a=o.metadata,g||a.source||s.push(g=pO()),s.push(o),a.generates&&(I=!0),a.modifies&&!I&&(c=!0),a.source?g=o:a.changes&&(g=null);n&&(i=n.length-1,s[0]=zk({derive:c,pulse:i?n:n[0]}),(c||i)&&s.splice(1,0,pO()));g||s.push(pO());return s.push(ex({})),s}(t,e,A))}function pO(t){var e=kk({},t);return e.metadata={source:!0},e}function yO(t,e){return Hk({url:e.url?t.property(e.url):void 0,async:e.async?t.property(e.async):void 0,values:e.values?t.property(e.values):void 0,format:t.objectProperty(e.format)})}var vO=function(t){return"bottom"===t||"top"===t},mO=function(t,e,A){return gk(t)?RO(t.signal,e,A):"left"===t||"top"===t?e:A},bO=function(t,e,A){return gk(t)?SO(t.signal,e,A):vO(t)?e:A},FO=function(t,e,A){return gk(t)?DO(t.signal,e,A):vO(t)?A:e},wO=function(t,e,A){return gk(t)?UO(t.signal,e,A):"top"===t?{value:e}:{value:A}},SO=function(t,e,A){return NO("".concat(t," === '").concat("top","' || ").concat(t," === '").concat("bottom","'"),e,A)},DO=function(t,e,A){return NO("".concat(t," !== '").concat("top","' && ").concat(t," !== '").concat("bottom","'"),e,A)},RO=function(t,e,A){return xO("".concat(t," === '").concat("left","' || ").concat(t," === '").concat("top","'"),e,A)},UO=function(t,e,A){return xO("".concat(t," === '").concat("top","'"),e,A)},GO=function(t,e,A){return xO("".concat(t," === '").concat("right","'"),e,A)},NO=function(t,e,A){return e=null!=e?LN(e):e,A=null!=A?LN(A):A,kO(e)&&kO(A)?(e=e?e.signal||Object(U.Z)(e.value):null,A=A?A.signal||Object(U.Z)(A.value):null,{signal:"".concat(t," ? (").concat(e,") : (").concat(A,")")}):[Object(U.o)({test:t},e)].concat(A||[])},kO=function(t){return null==t||1===Object.keys(t).length},xO=function(t,e,A){return{signal:"".concat(t," ? (").concat(OO(e),") : (").concat(OO(A),")")}},OO=function(t){return gk(t)?t.signal:null==t?null:Object(U.Z)(t)},MO=function(t,e){var A=t.signal;return A&&A.endsWith("(null)")?{signal:A.slice(0,-6)+e.signal}:t};function LO(t,e,A,n){var r;if(e&&Object(U.v)(e,t))return e[t];if(Object(U.v)(A,t))return A[t];if(t.startsWith("title")){switch(t){case"titleColor":r="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":r=t[5].toLowerCase()+t.slice(6)}return n["guide-title"][r]}if(t.startsWith("label")){switch(t){case"labelColor":r="fill";break;case"labelFont":case"labelFontSize":r=t[5].toLowerCase()+t.slice(6)}return n["guide-label"][r]}return null}function _O(t){var e,A={},n=Object(R.a)(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(r)for(var i in r)A[i]=1}}catch(o){n.e(o)}finally{n.f()}return Object.keys(A)}function JO(t,e){return{scale:t.scale,range:e}}var TO=function(t,e,A,n,r){var i,o,a,s,g,c,I,u,l=Fx(t,e),C=t.orient,h=t.gridScale,B=mO(C,1,-1),f=function(t,e){if(1===e);else if(Object(U.F)(t)){for(var A=t=Object(U.o)({},t);null!=A.mult;){if(!Object(U.F)(A.mult))return A.mult=gk(e)?{signal:"(".concat(A.mult,") * (").concat(e.signal,")")}:A.mult*e,t;A=A.mult=Object(U.o)({},A.mult)}A.mult=e}else t=gk(e)?{signal:"(".concat(e.signal,") * (").concat(t||0,")")}:e*(t||0);return t}(t.offset,B);return JN(i={enter:o={opacity:vx},update:s={opacity:mx},exit:a={opacity:vx}},{stroke:l("gridColor"),strokeCap:l("gridCap"),strokeDash:l("gridDash"),strokeDashOffset:l("gridDashOffset"),strokeOpacity:l("gridOpacity"),strokeWidth:l("gridWidth")}),g={scale:t.scale,field:Ex,band:r.band,extra:r.extra,offset:r.offset,round:l("tickRound")},u=bO(C,{signal:"height"},{signal:"width"}),c=h?{scale:h,range:0,mult:B,offset:f}:{value:0,offset:f},I=h?{scale:h,range:1,mult:B,offset:f}:Object(U.o)(u,{mult:B,offset:f}),o.x=s.x=bO(C,g,c),o.y=s.y=FO(C,g,c),o.x2=s.x2=FO(C,I),o.y2=s.y2=bO(C,I),a.x=bO(C,g),a.y=FO(C,g),Ux({type:"rule",role:"axis-grid",key:Ex,from:n,encode:i},A)};function jO(t,e,A,n,r){return{signal:'flush(range("'+t+'"), scale("'+t+'", datum.value), '+e+","+A+","+n+","+r+")"}}var HO=function(t,e,A,n,r,i){var o,a,s,g,c,I,u,l,C,h,B=Fx(t,e),f=t.orient,d=t.scale,Q=mO(f,-1,1),E=uk(B("labelFlush")),p=uk(B("labelFlushOffset")),y=0===E||!!E,v=B("labelAlign"),m=B("labelBaseline");return(g=LN(r)).mult=Q,g.offset=LN(B("labelPadding")||0),g.offset.mult=Q,c={scale:d,field:Ex,band:.5,offset:Rx(i.offset,B("labelOffset"))},I=bO(f,y?jO(d,E,'"left"','"right"','"center"'):{value:"center"},function(t,e,A){return gk(t)?GO(t.signal,e,A):"right"===t?{value:e}:{value:A}}(f,"left","right")),u=bO(f,wO(f,"bottom","top"),y?jO(d,E,'"top"','"bottom"','"middle"'):{value:"middle"}),h=jO(d,E,"-(".concat(p,")"),p,0),y=y&&p,JN(o={enter:a={opacity:vx,x:bO(f,c,g),y:FO(f,c,g)},update:s={opacity:mx,text:{field:"label"},x:a.x,y:a.y,align:I,baseline:u},exit:{opacity:vx,x:a.x,y:a.y}},{dx:!v&&y?bO(f,h):null,dy:!m&&y?FO(f,h):null}),JN(o,{angle:B("labelAngle"),fill:B("labelColor"),fillOpacity:B("labelOpacity"),font:B("labelFont"),fontSize:B("labelFontSize"),fontWeight:B("labelFontWeight"),fontStyle:B("labelFontStyle"),limit:B("labelLimit"),lineHeight:B("labelLineHeight")},{align:v,baseline:m}),l=B("labelBound"),C=(C=B("labelOverlap"))||l?{separation:B("labelSeparation"),method:C,order:"datum.index",bound:l?{scale:d,orient:f,tolerance:l}:null}:void 0,s.align!==I&&(s.align=MO(s.align,I)),s.baseline!==u&&(s.baseline=MO(s.baseline,u)),Ux({type:"text",role:"axis-label",style:"guide-label",key:Ex,from:n,encode:o,overlap:C},A)},YO=function(t,e,A,n){var r,i,o,a,s=Fx(t,e),g=t.orient,c=mO(g,-1,1);return r={enter:i={opacity:vx,anchor:LN(s("titleAnchor",null)),align:{signal:Dx}},update:o=Object(U.o)({},i,{opacity:mx,text:LN(t.title)}),exit:{opacity:vx}},a={signal:'lerp(range("'.concat(t.scale,'"), ').concat(Sx(0,1,.5),")")},o.x=bO(g,a),o.y=FO(g,a),i.angle=bO(g,vx,function(t,e){return 0===e?0:gk(t)?{signal:"(".concat(t.signal,") * ").concat(e)}:{value:t*e}}(c,90)),i.baseline=bO(g,wO(g,"bottom","top"),{value:"bottom"}),o.angle=i.angle,o.baseline=i.baseline,JN(r,{fill:s("titleColor"),fillOpacity:s("titleOpacity"),font:s("titleFont"),fontSize:s("titleFontSize"),fontStyle:s("titleFontStyle"),fontWeight:s("titleFontWeight"),limit:s("titleLimit"),lineHeight:s("titleLineHeight")},{align:s("titleAlign"),angle:s("titleAngle"),baseline:s("titleBaseline")}),function(t,e,A,n){var r=function(t,e){return null!=t?(A.update[e]=MO(LN(t),A.update[e]),!1):!jN(e,n)},i=r(t("titleX"),"x"),o=r(t("titleY"),"y");A.enter.auto=o===i?LN(o):bO(e,LN(o),LN(i))}(s,g,r,A),r.update.align=MO(r.update.align,i.align),r.update.angle=MO(r.update.angle,i.angle),r.update.baseline=MO(r.update.baseline,i.baseline),Ux({type:"text",role:"axis-title",style:"guide-title",from:n,encode:r},A)};var VO=function(t,e){var A,n,r,i,o,a=function(t,e){var A,n,r,i,o,a,s,g,c=e.config,I=c.style,u=c.axis,l="band"===e.scaleType(t.scale)&&c.axisBand,C=t.orient;if(gk(C)){var h=_O([c.axisX,c.axisY]),B=_O([c.axisTop,c.axisBottom,c.axisLeft,c.axisRight]);A={};var f,d=Object(R.a)(h);try{for(d.s();!(f=d.n()).done;)A[r=f.value]=bO(C,LO(r,c.axisX,u,I),LO(r,c.axisY,u,I))}catch(p){d.e(p)}finally{d.f()}n={};var Q,E=Object(R.a)(B);try{for(E.s();!(Q=E.n()).done;)n[r=Q.value]=(i=C.signal,o=LO(r,c.axisTop,u,I),a=LO(r,c.axisBottom,u,I),s=LO(r,c.axisLeft,u,I),g=LO(r,c.axisRight,u,I),{signal:(null!=s?"".concat(i," === '").concat("left","' ? (").concat(OO(s),") : "):"")+(null!=a?"".concat(i," === '").concat("bottom","' ? (").concat(OO(a),") : "):"")+(null!=g?"".concat(i," === '").concat("right","' ? (").concat(OO(g),") : "):"")+(null!=o?"".concat(i," === '").concat("top","' ? (").concat(OO(o),") : "):"")+"(null)"})}catch(p){E.e(p)}finally{E.f()}}else A="top"===C||"bottom"===C?c.axisX:c.axisY,n=c["axis"+C[0].toUpperCase()+C.slice(1)];return A||n||l?Object(U.o)({},u,A,n,l):u}(t,e),s=t.encode||{},g=s.axis||{},c=g.name||void 0,I=g.interactive,u=g.style,l=Fx(t,a),C=function(t){var e,A,n=t("tickBand"),r=t("tickOffset");return n?n.signal?(e={signal:"(".concat(n.signal,") === 'extent' ? 1 : 0.5")},A={signal:"(".concat(n.signal,") === 'extent'")},Object(U.F)(r)||(r={signal:"(".concat(n.signal,") === 'extent' ? 0 : ").concat(r)})):"extent"===n?(e=1,A=!0,r=0):(e=.5,A=!1):(e=t("bandPosition"),A=t("tickExtra")),{extra:A,band:e,offset:r}}(l);return A={scale:t.scale,ticks:!!l("ticks"),labels:!!l("labels"),grid:!!l("grid"),domain:!!l("domain"),title:null!=t.title},n=rk(e.add(kk({},[A]))),g=TN(function(t,e){var A={enter:{},update:{}};return JN(A,{orient:t("orient"),offset:t("offset")||0,position:Ik(e.position,0),titlePadding:t("titlePadding"),minExtent:t("minExtent"),maxExtent:t("maxExtent"),range:{signal:'abs(span(range("'.concat(e.scale,'")))')},translate:t("translate"),format:e.format,formatType:e.formatType}),A}(l,t),g,yx),r=rk(e.add(Gk({scale:e.scaleRef(t.scale),extra:e.property(C.extra),count:e.objectProperty(t.tickCount),values:e.objectProperty(t.values),minstep:e.property(t.tickMinStep),formatType:e.property(t.formatType),formatSpecifier:e.property(t.format)}))),o=[],A.grid&&o.push(TO(t,a,s.grid,r,C)),A.ticks&&(i=l("tickSize"),o.push(function(t,e,A,n,r,i){var o,a,s,g,c,I,u=Fx(t,e),l=t.orient,C=mO(l,-1,1);return JN(o={enter:a={opacity:vx},update:g={opacity:mx},exit:s={opacity:vx}},{stroke:u("tickColor"),strokeCap:u("tickCap"),strokeDash:u("tickDash"),strokeDashOffset:u("tickDashOffset"),strokeOpacity:u("tickOpacity"),strokeWidth:u("tickWidth")}),(c=LN(r)).mult=C,I={scale:t.scale,field:Ex,band:i.band,extra:i.extra,offset:i.offset,round:u("tickRound")},g.y=a.y=bO(l,vx,I),g.y2=a.y2=bO(l,c),s.x=bO(l,I),g.x=a.x=FO(l,vx,I),g.x2=a.x2=FO(l,c),s.y=FO(l,I),Ux({type:"rule",role:"axis-tick",key:Ex,from:n,encode:o},A)}(t,a,s.ticks,r,i,C))),A.labels&&(i=A.ticks?i:0,o.push(HO(t,a,s.labels,r,i,C))),A.domain&&o.push(function(t,e,A,n){var r,i,o,a=Fx(t,e),s=t.orient;JN(r={enter:i={opacity:vx},update:o={opacity:mx},exit:{opacity:vx}},{stroke:a("domainColor"),strokeCap:a("domainCap"),strokeDash:a("domainDash"),strokeDashOffset:a("domainDashOffset"),strokeWidth:a("domainWidth"),strokeOpacity:a("domainOpacity")});var g=JO(t,0),c=JO(t,1);return i.x=o.x=bO(s,g,vx),i.x2=o.x2=bO(s,c),i.y=o.y=FO(s,g,vx),i.y2=o.y2=FO(s,c),Ux({type:"rule",role:"axis-domain",from:n,encode:r},A)}(t,a,s.domain,n)),A.title&&o.push(YO(t,a,s.title,n)),CO(bx({role:"axis",from:n,encode:g,marks:o,aria:l("aria"),description:l("description"),zindex:l("zindex"),name:c,interactive:I,style:u}),e)};var ZO=function(t,e,A){var n=Object(U.i)(t.signals),r=Object(U.i)(t.scales);return A||n.forEach((function(t){return tk(t,e)})),Object(U.i)(t.projections).forEach((function(t){return function(t,e){var A=e.config.projection||{},n={};for(var r in t)"name"!==r&&(n[r]=Qx(t[r],r,e));for(r in A)null==n[r]&&(n[r]=Qx(A[r],r,e));e.addProjection(t.name,n)}(t,e)})),r.forEach((function(t){return function(t,e){var A=t.type||"linear";EB(A)||Object(U.n)("Unrecognized scale type: "+Object(U.Z)(A)),e.addScale(t.name,{type:A,domain:void 0})}(t,e)})),Object(U.i)(t.data).forEach((function(t){return EO(t,e)})),r.forEach((function(t){return ax(t,e)})),(A||n).forEach((function(t){return function(t,e){var A=e.getSignal(t.name),n=t.update;t.init&&(n?Object(U.n)("Signals can not include both init and update expressions."):(n=t.init,A.initonly=!0)),n&&(n=sN(n,e),A.update=n.$expr,A.params=n.$params),t.on&&t.on.forEach((function(t){Sk(t,e,A.id)}))}(t,e)})),Object(U.i)(t.axes).forEach((function(t){return VO(t,e)})),Object(U.i)(t.marks).forEach((function(t){return CO(t,e)})),Object(U.i)(t.legends).forEach((function(t){return hO(t,e)})),t.title&&dO(t.title,e),e.parseLambdas(),e};function WO(t,e){var A=e.config,n=rk(e.root=e.add(nk())),r=function(t,e){var A=function(A){return Ik(t[A],e[A])},n=[KO("background",A("background")),KO("autosize",xN(A("autosize"))),KO("padding",MN(A("padding"))),KO("width",A("width")||0),KO("height",A("height")||0)],r=n.reduce((function(t,e){return t[e.name]=e,t}),{}),i={};return Object(U.i)(t.signals).forEach((function(t){Object(U.v)(r,t.name)?t=Object(U.o)(r[t.name],t):n.push(t),i[t.name]=t})),Object(U.i)(e.signals).forEach((function(t){Object(U.v)(i,t.name)||Object(U.v)(r,t.name)||n.push(t)})),n}(t,A);r.forEach((function(t){return tk(t,e)})),e.description=t.description||A.description,e.eventConfig=A.events,e.legends=e.objectProperty(A.legend&&A.legend.layout),e.locale=A.locale;var i=e.add(kk()),o=e.add(Mk(PN(function(t){return TN({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},t)}(t.encode),"group","frame",t.style,e,{pulse:rk(i)}))),a=e.add(nx({layout:e.objectProperty(t.layout),legends:e.legends,autosize:e.signalRef("autosize"),mark:n,pulse:rk(o)}));e.operators.pop(),e.pushState(rk(o),rk(a),null),ZO(t,e,r),e.operators.push(a);var s=e.add(Nk({mark:n,pulse:rk(a)}));return s=e.add($k({pulse:rk(s)})),s=e.add(ex({pulse:rk(s)})),e.addData("root",new sO(e,i,i,s)),e}function KO(t,e){return e&&e.signal?{name:t,update:e.signal}:{name:t,value:e}}function PO(t,e){this.config=t||{},this.options=e||{},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 qO(t){this.config=t.config,this.options=t.options,this.legends=t.legends,this.field=Object.create(t.field),this.signals=Object.create(t.signals),this.lambdas=Object.create(t.lambdas),this.scales=Object.create(t.scales),this.events=Object.create(t.events),this.data=Object.create(t.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++t._nextsub[0],this._nextsub=t._nextsub,this._parent=t._parent.slice(),this._encode=t._encode.slice(),this._lookup=t._lookup.slice(),this._markpath=t._markpath}var XO=PO.prototype=qO.prototype;function zO(t){return(Object(U.A)(t)?$O:tM)(t)}function $O(t){for(var e,A="[",n=0,r=t.length;n<r;++n)e=t[n],A+=(n>0?",":"")+(Object(U.F)(e)?e.signal||zO(e):Object(U.Z)(e));return A+"]"}function tM(t){var e,A,n="{",r=0;for(e in t)A=t[e],n+=(++r>1?",":"")+Object(U.Z)(e)+":"+(Object(U.F)(A)?A.signal||zO(A):Object(U.Z)(A));return n+"}"}XO.parse=function(t){return ZO(t,this)},XO.fork=function(){return new qO(this)},XO.isSubscope=function(){return this._subid>0},XO.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}},XO.id=function(){return(this._subid?this._subid+":":0)+this._id++},XO.add=function(t){return this.operators.push(t),t.id=this.id(),t.refs&&(t.refs.forEach((function(e){e.$ref=t.id})),t.refs=null),t},XO.proxy=function(t){var e=t instanceof ek?rk(t):t;return this.add(Xk({value:e}))},XO.addStream=function(t){return this.streams.push(t),t.id=this.id(),t},XO.addUpdate=function(t){return this.updates.push(t),t},XO.finish=function(){var t,e;for(t in this.root&&(this.root.root=!0),this.signals)this.signals[t].signal=t;for(t in this.scales)this.scales[t].scale=t;function A(t,e,A){var n;t&&((n=t.data||(t.data={}))[e]||(n[e]=[])).push(A)}for(t in this.data)for(var n in A((e=this.data[t]).input,t,"input"),A(e.output,t,"output"),A(e.values,t,"values"),e.index)A(e.index[n],t,"index:"+n);return this},XO.pushState=function(t,e,A){this._encode.push(rk(this.add(ex({pulse:t})))),this._parent.push(e),this._lookup.push(A?rk(this.proxy(A)):null),this._markpath.push(-1)},XO.popState=function(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},XO.parent=function(){return Object(U.U)(this._parent)},XO.encode=function(){return Object(U.U)(this._encode)},XO.lookup=function(){return Object(U.U)(this._lookup)},XO.markpath=function(){var t=this._markpath;return++t[t.length-1]},XO.fieldRef=function(t,e){if(Object(U.H)(t))return ik(t,e);t.signal||Object(U.n)("Unsupported field reference: "+Object(U.Z)(t));var A,n=t.signal,r=this.field[n];return r||(A={name:this.signalRef(n)},e&&(A.as=e),this.field[n]=r=rk(this.add(Jk(A)))),r},XO.compareRef=function(t){function e(t){return gk(t)?(n=!0,A.signalRef(t.signal)):function(t){return t&&t.expr}(t)?(n=!0,A.exprRef(t.expr)):t}var A=this,n=!1,r=Object(U.i)(t.field).map(e),i=Object(U.i)(t.order).map(e);return n?rk(this.add(xk({fields:r,orders:i}))):ak(r,i)},XO.keyRef=function(t,e){var A=this.signals,n=!1;return t=Object(U.i)(t).map((function(t){return gk(t)?(n=!0,rk(A[t.signal])):t})),n?rk(this.add(Tk({fields:t,flat:e}))):function(t,e){var A={$key:t};return e&&(A.$flat=!0),A}(t,e)},XO.sortRef=function(t){if(!t)return t;var e=sk(t.op,t.field),A=t.order||"ascending";return A.signal?rk(this.add(xk({fields:e,orders:this.signalRef(A.signal)}))):ak(e,A)},XO.event=function(t,e){var A=t+":"+e;if(!this.events[A]){var n=this.id();this.streams.push({id:n,source:t,type:e}),this.events[A]=n}return this.events[A]},XO.hasOwnSignal=function(t){return Object(U.v)(this.signals,t)},XO.addSignal=function(t,e){this.hasOwnSignal(t)&&Object(U.n)("Duplicate signal name: "+Object(U.Z)(t));var A=e instanceof ek?e:this.add(nk(e));return this.signals[t]=A},XO.getSignal=function(t){return this.signals[t]||Object(U.n)("Unrecognized signal name: "+Object(U.Z)(t)),this.signals[t]},XO.signalRef=function(t){return this.signals[t]?rk(this.signals[t]):(Object(U.v)(this.lambdas,t)||(this.lambdas[t]=this.add(nk(null))),rk(this.lambdas[t]))},XO.parseLambdas=function(){for(var t=Object.keys(this.lambdas),e=0,A=t.length;e<A;++e){var n=t[e],r=sN(n,this),i=this.lambdas[n];i.params=r.$params,i.update=r.$expr}},XO.property=function(t){return t&&t.signal?this.signalRef(t.signal):t},XO.objectProperty=function(t){return t&&Object(U.F)(t)?this.signalRef(t.signal||zO(t)):t},XO.exprRef=function(t,e){var A={expr:sN(t,this)};return e&&(A.expr.$name=e),rk(this.add(Lk(A)))},XO.addBinding=function(t,e){this.bindings||Object(U.n)("Nested signals do not support binding: "+Object(U.Z)(t)),this.bindings.push(Object(U.o)({signal:t},e))},XO.addScaleProj=function(t,e){Object(U.v)(this.scales,t)&&Object(U.n)("Duplicate scale or projection name: "+Object(U.Z)(t)),this.scales[t]=this.add(e)},XO.addScale=function(t,e){this.addScaleProj(t,tx(e))},XO.addProjection=function(t,e){this.addScaleProj(t,qk(e))},XO.getScale=function(t){return this.scales[t]||Object(U.n)("Unrecognized scale name: "+Object(U.Z)(t)),this.scales[t]},XO.projectionRef=XO.scaleRef=function(t){return rk(this.getScale(t))},XO.projectionType=XO.scaleType=function(t){return this.getScale(t).params.type},XO.addData=function(t,e){return Object(U.v)(this.data,t)&&Object(U.n)("Duplicate data set name: "+Object(U.Z)(t)),this.data[t]=e},XO.getData=function(t){return this.data[t]||Object(U.n)("Undefined data set name: "+Object(U.Z)(t)),this.data[t]},XO.addDataPipeline=function(t,e){return Object(U.v)(this.data,t)&&Object(U.n)("Duplicate data set name: "+Object(U.Z)(t)),this.addData(t,sO.fromEntries(this,e))};var eM=function(t,e,A){return Object(U.F)(t)||Object(U.n)("Input Vega specification must be an object."),WO(t,new PO(e=Object(U.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"]}},e,t.config),A)).toRuntime()};Object(U.o)(ho,i,a,s,g,c,I,u,l,C,h);var AM=A(1138);function nM(t,e){var A={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(A[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(A[n[r]]=t[n[r]])}return A}Object.create;Object.create;A(1389);var rM=A(1139),iM=A.n(rM),oM=A(221),aM=A.n(oM),sM=A(542),gM=A.n(sM);function cM(t){return!!t.or}function IM(t){return!!t.and}function uM(t){return!!t.not}function lM(t,e){return uM(t)?{not:lM(t.not,e)}:IM(t)?{and:t.and.map((function(t){return lM(t,e)}))}:cM(t)?{or:t.or.map((function(t){return lM(t,e)}))}:e(t)}var CM=aM.a,hM=iM.a;function BM(t,e){var A,n={},r=Object(R.a)(e);try{for(r.s();!(A=r.n()).done;){var i=A.value;Object(U.v)(t,i)&&(n[i]=t[i])}}catch(o){r.e(o)}finally{r.f()}return n}function fM(t,e){var A,n=Object.assign({},t),r=Object(R.a)(e);try{for(r.s();!(A=r.n()).done;){delete n[A.value]}}catch(i){r.e(i)}finally{r.f()}return n}Set.prototype.toJSON=function(){return"Set(".concat(Object(p.a)(this).map((function(t){return gM()(t)})).join(","),")")};var dM=gM.a;function QM(t){if(Object(U.E)(t))return t;var e=Object(U.H)(t)?t:gM()(t);if(e.length<250)return e;for(var A=0,n=0;n<e.length;n++){A=(A<<5)-A+e.charCodeAt(n),A&=A}return A}function EM(t){return!1===t||null===t}function pM(t,e){return t.indexOf(e)>-1}function yM(t,e){var A,n=0,r=Object(R.a)(t.entries());try{for(r.s();!(A=r.n()).done;){var i=Object(ba.a)(A.value,2),o=i[0];if(e(i[1],o,n++))return!0}}catch(a){r.e(a)}finally{r.f()}return!1}function vM(t,e){var A,n=0,r=Object(R.a)(t.entries());try{for(r.s();!(A=r.n()).done;){var i=Object(ba.a)(A.value,2),o=i[0];if(!e(i[1],o,n++))return!1}}catch(a){r.e(a)}finally{r.f()}return!0}function mM(t,e){var A,n=Object(R.a)(RM(e));try{for(n.s();!(A=n.n()).done;){var r=A.value;Object(U.jb)(t,r,e[r],!0)}}catch(i){n.e(i)}finally{n.f()}}function bM(t,e){var A,n,r=[],i={},o=Object(R.a)(t);try{for(o.s();!(n=o.n()).done;){var a=n.value;(A=e(a))in i||(i[A]=1,r.push(a))}}catch(s){o.e(s)}finally{o.f()}return r}function FM(t,e){var A,n=Object(R.a)(t);try{for(n.s();!(A=n.n()).done;){var r=A.value;if(e.has(r))return!0}}catch(i){n.e(i)}finally{n.f()}return!1}function wM(t){var e,A=new Set,n=Object(R.a)(t);try{var r=function(){var t,n=e.value,r=Object(U.Y)(n).map((function(t,e){return 0===e?t:"[".concat(t,"]")})),i=r.map((function(t,e){return r.slice(0,e+1).join("")})),o=Object(R.a)(i);try{for(o.s();!(t=o.n()).done;){var a=t.value;A.add(a)}}catch(s){o.e(s)}finally{o.f()}};for(n.s();!(e=n.n()).done;)r()}catch(i){n.e(i)}finally{n.f()}return A}function SM(t,e){return void 0===t||void 0===e||FM(wM(t),wM(e))}function DM(t){return 0===RM(t).length}var RM=Object.keys,UM=Object.values;function GM(t){var e=[];for(var A in t)Object(U.v)(t,A)&&e.push({key:A,value:t[A]});return e}function NM(t){return!0===t||!1===t}function kM(t){var e=t.replace(/\W/g,"_");return(t.match(/^\d+/)?"_":"")+e}function xM(t,e){return uM(t)?"!("+xM(t.not,e)+")":IM(t)?"("+t.and.map((function(t){return xM(t,e)})).join(") && (")+")":cM(t)?"("+t.or.map((function(t){return xM(t,e)})).join(") || (")+")":e(t)}function OM(t,e){if(0===e.length)return!0;var A=e.shift();return A in t&&OM(t[A],e)&&delete t[A],DM(t)}function MM(t){return t.charAt(0).toUpperCase()+t.substr(1)}function LM(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum",A=Object(U.Y)(t),n=[],r=1;r<=A.length;r++){var i="[".concat(A.slice(0,r).map(U.Z).join("]["),"]");n.push("".concat(e).concat(i))}return n.join(" && ")}function _M(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"datum";return"".concat(e,"[").concat(Object(U.Z)(Object(U.Y)(t).join(".")),"]")}function JM(t){return t.replace(/(\[|\]|\.|'|")/g,"\\$1")}function TM(t){return"".concat(Object(U.Y)(t).map(JM).join("\\."))}function jM(t,e,A){return t.replace(new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),A)}function HM(t){return"".concat(Object(U.Y)(t).join("."))}function YM(t){return t?Object(U.Y)(t).length:0}function VM(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++){var i=r[n];if(void 0!==i)return i}}var ZM=42;function WM(t){var e=++ZM;return t?String(t)+e:e}function KM(t){return function(t){return 0===t.indexOf("__")}(t)?t:"__".concat(t)}function PM(t){if(void 0!==t)return(t%360+360)%360}function qM(t){return!!Object(U.E)(t)||!isNaN(t)&&!isNaN(parseFloat(t))}var XM={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 zM(t){return t&&t.condition}var $M=["domain","grid","labels","ticks","title"],tL={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"},eL={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},AL=Object.assign(Object.assign({},eL),{style:1,labelExpr:1,encoding:1});function nL(t){return!!AL[t]}RM(AL);var rL={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"},iL=rL.arc,oL=rL.area,aL=rL.bar,sL=rL.image,gL=rL.line,cL=rL.point,IL=rL.rect,uL=rL.rule,lL=rL.text,CL=rL.tick,hL=rL.trail,BL=rL.circle,fL=rL.square,dL=rL.geoshape;function QL(t){return pM(["line","area","trail"],t)}function EL(t){return pM(["rect","bar","image","arc"],t)}var pL=RM(rL);function yL(t){return t.type}Object(U.db)(pL);var vL=[].concat(["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit"],["fill","fillOpacity"]),mL=RM({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBand:1,timeUnitBandPosition:1}),bL={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]},FL={binSpacing:1,continuousBandSize:5,timeUnitBandPosition:.5},wL={binSpacing:0,continuousBandSize:5,timeUnitBandPosition:.5};function SL(t){return"mark"in t}var DL=function(){function t(e,A){Object(F.a)(this,t),this.name=e,this.run=A}return Object(w.a)(t,[{key:"hasMatchingType",value:function(t){return!!SL(t)&&(yL(e=t.mark)?e.type:e)===this.name;var e}}]),t}(),RL={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},UL={count:1,min:1,max:1};function GL(t){return!!t&&!!t.argmin}function NL(t){return!!t&&!!t.argmax}RM(RL);function kL(t){return Object(U.H)(t)&&!!RL[t]}var xL=["count","valid","missing","distinct"];function OL(t){return Object(U.H)(t)&&pM(xL,t)}var ML=["count","sum","distinct","valid","missing"],LL=Object(U.db)(["mean","average","median","q1","q3","min","max"]),_L="row",JL="column",TL="radius",jL="theta",HL="theta2",YL="color",VL="fill",ZL="stroke",WL="shape",KL="size",PL={theta:1,theta2:1,radius:1,radius2:1};function qL(t){return t in PL}var XL={longitude:1,longitude2:1,latitude:1,latitude2:1};var zL=RM(XL),$L=Object.assign(Object.assign(Object.assign(Object.assign({},{x:1,y:1,x2:1,y2:1}),PL),XL),{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 t_(t){return t===YL||t===VL||t===ZL}var e_={row:1,column:1,facet:1},A_=RM(e_),n_=Object.assign(Object.assign({},$L),e_),r_=RM(n_),i_=(n_.order,n_.detail,n_.tooltip,nM(n_,["order","detail","tooltip"])),o_=(i_.row,i_.column,i_.facet,nM(i_,["row","column","facet"]));RM(i_),RM(o_);function a_(t){return!!n_[t]}var s_=["x2","y2","latitude2","longitude2",HL,"radius2"];function g_(t){return c_(t)!==t}function c_(t){switch(t){case"x2":return"x";case"y2":return"y";case"latitude2":return"latitude";case"longitude2":return"longitude";case HL:return jL;case"radius2":return TL}return t}function I_(t){if(qL(t))switch(t){case jL:return"startAngle";case HL:return"endAngle";case TL:return"outerRadius";case"radius2":return"innerRadius"}return t}function u_(t){switch(t){case"x":return"x2";case"y":return"y2";case"latitude":return"latitude2";case"longitude":return"longitude2";case jL:return HL;case TL:return"radius2"}}function l_(t){switch(t){case"x":case"x2":return"width";case"y":case"y2":return"height"}}RM($L),$L.x,$L.y,$L.x2,$L.y2,$L.latitude,$L.longitude,$L.latitude2,$L.longitude2,$L.theta,$L.theta2,$L.radius,$L.radius2;var C_=nM($L,["x","y","x2","y2","latitude","longitude","latitude2","longitude2","theta","theta2","radius","radius2"]),h_=RM(C_),B_={x:1,y:1},f_=RM(B_);function d_(t){return t in B_}var Q_={theta:1,radius:1},E_=RM(Q_);function p_(t){return"width"===t?"x":"y"}C_.text,C_.tooltip,C_.href,C_.url,C_.description,C_.detail,C_.key,C_.order;var y_=nM(C_,["text","tooltip","href","url","description","detail","key","order"]),v_=RM(y_);var m_=Object.assign(Object.assign(Object.assign({},B_),Q_),y_),b_=RM(m_);function F_(t){return!!m_[t]}function w_(t,e){return function(t){switch(t){case YL:case VL:case ZL:case"description":case"detail":case"key":case"tooltip":case"href":case"order":case"opacity":case"fillOpacity":case"strokeOpacity":case"strokeWidth":case"facet":case _L:case JL:return S_;case"x":case"y":case"latitude":case"longitude":return D_;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 KL: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 WL: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 jL:case TL:return{text:"always",arc:"always"};case HL:case"radius2":return{arc:"always"}}}(t)[e]}var S_={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"},D_=nM(S_,["geoshape"]);function R_(t){switch(t){case"x":case"y":case jL:case TL:case KL:case"angle":case"strokeWidth":case"opacity":case"fillOpacity":case"strokeOpacity":case"x2":case"y2":case HL:case"radius2":return;case"facet":case _L:case JL:case WL:case"strokeDash":case"text":case"tooltip":case"href":case"url":case"description":return"discrete";case YL:case VL:case ZL:return"flexible";case"latitude":case"longitude":case"latitude2":case"longitude2":case"detail":case"key":case"order":return}}function U_(t){return Object(U.B)(t)&&(t=WH(t,void 0)),"bin"+RM(t).map((function(e){return x_(t[e])?kM("_".concat(e,"_").concat(Object.entries(t[e]))):kM("_".concat(e,"_").concat(t[e]))})).join("")}function G_(t){return!0===t||k_(t)&&!t.binned}function N_(t){return"binned"===t||k_(t)&&!0===t.binned}function k_(t){return Object(U.F)(t)}function x_(t){return null===t||void 0===t?void 0:t.selection}function O_(t){switch(t){case _L:case JL:case KL:case YL:case VL:case ZL:case"strokeWidth":case"opacity":case"fillOpacity":case"strokeOpacity":case WL:return 6;case"strokeDash":return 4;default:return 10}}var M_=A(426);function L_(t){return"Invalid specification ".concat(JSON.stringify(t),'. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".')}var __='Autosize "fit" only works for single views and layered views.';function J_(t){return"".concat("width"==t?"Width":"Height",' "container" only works for single views and layered views.')}function T_(t){var e="width"==t?"x":"y";return"".concat("width"==t?"Width":"Height",' "container" only works well with autosize "fit" or "fit-').concat(e,'".')}function j_(t){return t?'Dropping "fit-'.concat(t,'" because spec has discrete ').concat(l_(t),"."):'Dropping "fit" because spec has discrete size.'}function H_(t){return'Cannot project a selection on encoding channel "'.concat(t,'", which has no field.')}function Y_(t,e){return'Cannot project a selection on encoding channel "'.concat(t,'" as it uses an aggregate function ("').concat(e,'").')}function V_(t){return'The "nearest" transform is not supported for '.concat(t," marks.")}function Z_(t){return"Selection not supported for ".concat(t," yet.")}function W_(t){return'Cannot find a selection named "'.concat(t,'".')}var K_="Scale bindings are currently only supported for scales with unbinned, continuous domains.",P_="Legend bindings are only supported for selections over an individual field or encoding channel.";function q_(t){return'Cannot define and lookup the "'.concat(t,'" selection in the same view. ')+"Try moving the lookup into a second, layered view?"}function X_(t){return'Unknown repeated value "'.concat(t,'".')}function z_(t){return'The "columns" property cannot be used when "'.concat(t,'" has nested row/column.')}var $_="Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";function tJ(t){return'Unrecognized parse "'.concat(t,'".')}function eJ(t,e,A){return'An ancestor parsed field "'.concat(t,'" as ').concat(A," but a child wants to parse the field as ").concat(e,".")}function AJ(t){return"Ignoring an invalid transform: ".concat(dM(t),".")}var nJ='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 rJ(t){return"Config.customFormatTypes is not true, thus custom format type and format for channel ".concat(t," are dropped.")}function iJ(t){return"Layer's shared ".concat(t.join(",")," channel ").concat(1===t.length?"is":"are"," overriden.")}function oJ(t){var e=t.parentProjection,A=t.projection;return"Layer's shared projection ".concat(dM(e)," is overridden by a child projection ").concat(dM(A),".")}var aJ="Arc marks uses theta channel rather than angle, replacing angle with theta.";function sJ(t,e,A){return"Channel ".concat(t," is a ").concat(e,". Converted to {value: ").concat(dM(A),"}.")}function gJ(t){return'Invalid field type "'.concat(t,'".')}function cJ(t,e){return'Invalid field type "'.concat(t,'" for aggregate: "').concat(e,'", using "quantitative" instead.')}function IJ(t){return'Invalid aggregation operator "'.concat(t,'".')}function uJ(t,e){return'Missing type for channel "'.concat(t,'", using "').concat(e,'" instead.')}function lJ(t,e){var A=e.fill,n=e.stroke;return"Dropping color ".concat(t," as the plot also has ").concat(A&&n?"fill and stroke":A?"fill":"stroke",".")}function CJ(t,e){return"Dropping ".concat(dM(t),' from channel "').concat(e,'" since it does not contain any data field, datum, value, or signal.')}function hJ(t,e,A){return"".concat(t,"-encoding with type ").concat(e," is deprecated. Replacing with ").concat(A,"-encoding.")}var BJ="Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";function fJ(t,e,A){return"".concat(t,' dropped as it is incompatible with "').concat(e,'"').concat(A?" when ".concat(A):"",".")}function dJ(t){return"".concat(t,"-encoding is dropped as ").concat(t," is not a valid encoding channel.")}function QJ(t){return"".concat(t," encoding should be discrete (ordinal / nominal / binned).")}function EJ(t){return"Facet encoding dropped as ".concat(t.join(" and ")," ").concat(t.length>1?"are":"is"," also specified.")}function pJ(t,e){return'Using discrete channel "'.concat(t,'" to encode "').concat(e,'" field can be misleading as it does not encode ').concat("ordinal"===e?"order":"magnitude",".")}function yJ(t,e){return"Line mark is for continuous lines and thus cannot be used with ".concat(t&&e?"x2 and y2":t?"x2":"y2",". We will use the rule mark (line segments) instead.")}function vJ(t,e){return'Specified orient "'.concat(t,'" overridden with "').concat(e,'".')}var mJ="Custom domain scale cannot be unioned with default field-based domain.",bJ='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 FJ(t){return'Cannot use the scale property "'.concat(t,'" with non-color channel.')}function wJ(t){return"Using unaggregated domain with raw field has no effect (".concat(dM(t),").")}function SJ(t){return'Unaggregated domain not applicable for "'.concat(t,'" since it produces values outside the origin domain of the source data.')}function DJ(t){return"Unaggregated domain is currently unsupported for log scale (".concat(dM(t),").")}function RJ(t){return'Cannot apply size to non-oriented mark "'.concat(t,'".')}function UJ(t,e,A){return'Channel "'.concat(t,'" does not work with "').concat(e,'" scale. We are using "').concat(A,'" scale instead.')}function GJ(t,e){return'FieldDef does not work with "'.concat(t,'" scale. We are using "').concat(e,'" scale instead.')}function NJ(t,e,A){return"".concat(A,"-scale's \"").concat(e,'" is dropped as it does not work with ').concat(t," scale.")}function kJ(t,e){return'Scale type "'.concat(e,'" does not work with mark "').concat(t,'".')}function xJ(t){return'The step for "'.concat(t,'" is dropped because the ').concat("width"===t?"x":"y"," is continuous.")}function OJ(t,e,A,n){return"Conflicting ".concat(e.toString(),' property "').concat(t.toString(),'" (').concat(dM(A)," and ").concat(dM(n),"). Using ").concat(dM(A),".")}function MJ(t,e,A,n){return"Conflicting ".concat(e.toString(),' property "').concat(t.toString(),'" (').concat(dM(A)," and ").concat(dM(n),"). Using the union of the two domains.")}function LJ(t){return'Setting the scale to be independent for "'.concat(t,'" means we also have to set the guide (axis or legend) to be independent.')}function _J(t){return"Dropping sort property ".concat(dM(t),' as unioned domains only support boolean or op "count", "min", and "max".')}var JJ="Domains that should be unioned has conflicting sort properties. Sort will be set to true.",TJ="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.",jJ="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.",HJ="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.",YJ="Invalid channel for axis.";function VJ(t){return'Cannot stack "'.concat(t,'" if there is already "').concat(t,'2".')}function ZJ(t){return"Cannot stack non-linear scale (".concat(t,").")}function WJ(t){return'Stacking is applied even though the aggregate function is non-summative ("'.concat(t,'").')}function KJ(t,e){return"Invalid ".concat(t,": ").concat(dM(e),".")}function PJ(t){return"Dropping day from datetime ".concat(dM(t)," as day cannot be combined with other units.")}function qJ(t,e){return"".concat(e?"extent ":"").concat(e&&t?"and ":"").concat(t?"center ":"").concat(e&&t?"are ":"is ","not needed when data are aggregated.")}function XJ(t,e,A){return"".concat(t," is not usually used with ").concat(e," for ").concat(A,".")}function zJ(t,e){return"Continuous axis should not have customized aggregation function ".concat(t,"; ").concat(e," already agregates the axis.")}function $J(t,e){return"Center is not needed to be specified in ".concat(e," when extent is ").concat(t,".")}function tT(t){return"1D error band does not support ".concat(t,".")}function eT(t){return"Channel ".concat(t,' is required for "binned" bin.')}function AT(t){return"Domain for ".concat(t," is required for threshold scale.")}var nT=Object(U.K)(U.e),rT=nT;function iT(t){return rT=t}function oT(){return rT=nT}function aT(){var t;(t=rT).warn.apply(t,arguments)}function sT(t){if(t&&Object(U.F)(t)){var e,A=Object(R.a)(dT);try{for(A.s();!(e=A.n()).done;){if(e.value in t)return!0}}catch(n){A.e(n)}finally{A.f()}}return!1}var gT=["january","february","march","april","may","june","july","august","september","october","november","december"],cT=gT.map((function(t){return t.substr(0,3)})),IT=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],uT=IT.map((function(t){return t.substr(0,3)}));function lT(t,e){var A=[];if(e&&void 0!==t.day&&RM(t).length>1&&(aT(f.droppedDay(t)),delete(t=hM(t)).day),void 0!==t.year?A.push(t.year):A.push(2012),void 0!==t.month){var n=e?function(t){if(qM(t)&&(t=+t),Object(U.E)(t))return t-1;var e=t.toLowerCase(),A=gT.indexOf(e);if(-1!==A)return A;var n=e.substr(0,3),r=cT.indexOf(n);if(-1!==r)return r;throw new Error(f.invalidTimeUnit("month",t))}(t.month):t.month;A.push(n)}else if(void 0!==t.quarter){var r=e?function(t){if(qM(t)&&(t=+t),Object(U.E)(t))return t>4&&aT(f.invalidTimeUnit("quarter",t)),t-1;throw new Error(f.invalidTimeUnit("quarter",t))}(t.quarter):t.quarter;A.push(Object(U.E)(r)?3*r:r+"*3")}else A.push(0);if(void 0!==t.date)A.push(t.date);else if(void 0!==t.day){var i=e?function(t){if(qM(t)&&(t=+t),Object(U.E)(t))return t%7;var e=t.toLowerCase(),A=IT.indexOf(e);if(-1!==A)return A;var n=e.substr(0,3),r=uT.indexOf(n);if(-1!==r)return r;throw new Error(f.invalidTimeUnit("day",t))}(t.day):t.day;A.push(Object(U.E)(i)?i+1:i+"+1")}else A.push(1);for(var o=0,a=["hours","minutes","seconds","milliseconds"];o<a.length;o++){var s=t[a[o]];A.push("undefined"===typeof s?0:s)}return A}function CT(t){var e=lT(t,!0).join(", ");return t.utc?"utc(".concat(e,")"):"datetime(".concat(e,")")}function hT(t){var e=lT(t,!1).join(", ");return t.utc?"utc(".concat(e,")"):"datetime(".concat(e,")")}function BT(t){var e=lT(t,!0);return t.utc?+new Date(Date.UTC.apply(Date,Object(p.a)(e))):+Object(M_.a)(Date,Object(p.a)(e))}var fT={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},dT=RM(fT);function QT(t){return t.startsWith("utc")}var ET={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function pT(t){var e,A=[],n=Object(R.a)(dT);try{for(n.s();!(e=n.n()).done;){var r=e.value;yT(t,r)&&A.push(r)}}catch(i){n.e(i)}finally{n.f()}return A}function yT(t,e){var A=t.indexOf(e);return!(A<0)&&(!(A>0&&"seconds"===e&&"i"===t.charAt(A-1))&&(!(t.length>A+3&&"day"===e&&"o"===t.charAt(A+3))&&!(A>0&&"year"===e&&"f"===t.charAt(A-1))))}function vT(t,e){var A,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{end:!1},r=n.end,i=LM(e),o=QT(t)?"utc":"";function a(t){return"quarter"===t?"(".concat(o,"quarter(").concat(i,")-1)"):"".concat(o).concat(t,"(").concat(i,")")}var s,g={},c=Object(R.a)(dT);try{for(c.s();!(s=c.n()).done;){var I=s.value;yT(t,I)&&(g[I]=a(I),A=I)}}catch(u){c.e(u)}finally{c.f()}return r&&(g[A]+="+1"),hT(g)}function mT(t){if(t){var e=pT(t);return"timeUnitSpecifier(".concat(gM()(e),", ").concat(gM()(ET),")")}}function bT(t){var e;if(t)return Object(U.H)(t)?e={unit:t}:Object(U.F)(t)&&(e=Object.assign(Object.assign({},t),t.unit?{unit:t.unit}:{})),QT(e.unit)&&(e.utc=!0,e.unit=e.unit.substr(3)),e}function FT(t){var e=bT(t),A=e.utc,n=nM(e,["utc"]);return n.unit?(A?"utc":"")+RM(n).map((function(t){return kM("".concat("unit"===t?"":"_".concat(t,"_")).concat(n[t]))})).join(""):(A?"utc":"")+"timeunit"+RM(n).map((function(t){return kM("_".concat(t,"_").concat(n[t]))})).join("")}function wT(t){return t&&!!t.signal}function ST(t){return!!t.step}function DT(t){return!Object(U.A)(t)&&("field"in t&&"data"in t)}var RT=RM({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}),UT={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},GT=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function NT(t){return t&&!!t.field&&void 0!==t.equal}function kT(t){return t&&!!t.field&&void 0!==t.lt}function xT(t){return t&&!!t.field&&void 0!==t.lte}function OT(t){return t&&!!t.field&&void 0!==t.gt}function MT(t){return t&&!!t.field&&void 0!==t.gte}function LT(t){if(t&&t.field){if(Object(U.A)(t.range)&&2===t.range.length)return!0;if(wT(t.range))return!0}return!1}function _T(t){return t&&!!t.field&&(Object(U.A)(t.oneOf)||Object(U.A)(t.in))}function JT(t){return t&&!!t.field&&void 0!==t.valid}function TT(t){return _T(t)||NT(t)||LT(t)||kT(t)||OT(t)||xT(t)||MT(t)}function jT(t,e){return qH(t,{timeUnit:e,wrapTime:!0})}function HT(t,e){return t.map((function(t){return jT(t,e)}))}function YT(t){var e,A=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.field,r=null===(e=bT(t.timeUnit))||void 0===e?void 0:e.unit,i=r?"time("+vT(r,n)+")":RH(t,{expr:"datum"});if(NT(t))return i+"==="+jT(t.equal,r);if(kT(t)){var o=t.lt;return"".concat(i,"<").concat(jT(o,r))}if(OT(t)){var a=t.gt;return"".concat(i,">").concat(jT(a,r))}if(xT(t)){var s=t.lte;return"".concat(i,"<=").concat(jT(s,r))}if(MT(t)){var g=t.gte;return"".concat(i,">=").concat(jT(g,r))}if(_T(t))return"indexof([".concat(HT(t.oneOf,r).join(","),"], ").concat(i,") !== -1");if(JT(t))return VT(i,t.valid);if(LT(t)){var c=t.range,I=wT(c)?{signal:"".concat(c.signal,"[0]")}:c[0],u=wT(c)?{signal:"".concat(c.signal,"[1]")}:c[1];if(null!==I&&null!==u&&A)return"inrange("+i+", ["+jT(I,r)+", "+jT(u,r)+"])";var l=[];return null!==I&&l.push("".concat(i," >= ").concat(jT(I,r))),null!==u&&l.push("".concat(i," <= ").concat(jT(u,r))),l.length>0?l.join(" && "):"true"}throw new Error("Invalid field predicate: ".concat(JSON.stringify(t)))}function VT(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e?"isValid(".concat(t,") && isFinite(+").concat(t,")"):"!isValid(".concat(t,") || !isFinite(+").concat(t,")")}function ZT(t){var e;return TT(t)&&t.timeUnit?Object.assign(Object.assign({},t),{timeUnit:null===(e=bT(t.timeUnit))||void 0===e?void 0:e.unit}):t}var WT={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"};var KT=WT.quantitative,PT=WT.ordinal,qT=WT.temporal,XT=WT.nominal,zT=WT.geojson,$T=RM(WT);var tj="linear",ej="log",Aj="pow",nj="sqrt",rj="symlog",ij="time",oj="utc",aj="quantile",sj="quantize",gj="threshold",cj="point",Ij="band",uj={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"},lj=RM(uj);function Cj(t,e){var A=uj[t],n=uj[e];return A===n||"ordinal-position"===A&&"time"===n||"ordinal-position"===n&&"time"===A}var hj={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 Bj(t){return hj[t]}var fj=["linear","log","pow","sqrt","symlog","time","utc"],dj=Object(U.db)(fj),Qj=Object(U.db)(["linear","log","pow","sqrt","symlog"]);var Ej=Object(U.db)(["quantile","quantize","threshold"]),pj=fj.concat(["quantile","quantize","threshold","sequential","identity"]),yj=Object(U.db)(pj),vj=Object(U.db)(["ordinal","bin-ordinal","point","band"]);function mj(t){return t in vj}function bj(t){return t in yj}function Fj(t){return t in dj}function wj(t){return t in Ej}function Sj(t){return null===t||void 0===t?void 0:t.selection}var Dj={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},Rj=(RM(Dj),nM(Dj,["type","domain","range","scheme"])),Uj=RM(Rj);!function(){var t,e,A={},n=Object(R.a)(r_);try{for(n.s();!(e=n.n()).done;){var r,i=e.value,o=Object(R.a)($T);try{for(o.s();!(r=o.n()).done;){var a,s=r.value,g=Object(R.a)(lj);try{for(g.s();!(a=g.n()).done;){var c=a.value,I=Oj(i,s);xj(i,c)&&kj(c,s)&&(A[I]=null!==(t=A[I])&&void 0!==t?t:[],A[I].push(c))}}catch(u){g.e(u)}finally{g.f()}}}catch(u){o.e(u)}finally{o.f()}}}catch(u){n.e(u)}finally{n.f()}}();function Gj(t,e){switch(e){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!pM(["point","band","identity"],t);case"bins":return!pM(["point","band","identity","ordinal"],t);case"round":return Fj(t)||"band"===t||"point"===t;case"padding":return Fj(t)||pM(["point","band"],t);case"paddingOuter":case"align":return pM(["point","band"],t);case"paddingInner":return"band"===t;case"domainMid":case"clamp":return Fj(t);case"nice":return Fj(t)||"quantize"===t||"threshold"===t;case"exponent":return"pow"===t;case"base":return"log"===t;case"constant":return"symlog"===t;case"zero":return bj(t)&&!pM(["log","time","utc","threshold","quantile"],t)}}function Nj(t,e){switch(e){case"interpolate":case"scheme":case"domainMid":return t_(t)?void 0:f.cannotUseScalePropertyWithNonColor(t);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 kj(t,e){return pM([PT,XT],e)?void 0===t||mj(t):e===qT?pM([ij,oj,void 0],t):e!==KT||pM([ej,Aj,nj,rj,aj,sj,gj,tj,void 0],t)}function xj(t,e){if(!F_(t))return!1;switch(t){case"x":case"y":case jL:case TL:return Fj(e)||pM(["band","point"],e);case KL:case"strokeWidth":case"opacity":case"fillOpacity":case"strokeOpacity":case"angle":return Fj(e)||wj(e)||pM(["band","point","ordinal"],e);case YL:case VL:case ZL:return"band"!==e;case"strokeDash":return"ordinal"===e||wj(e);case WL:return"ordinal"===e}}function Oj(t,e){return t+"_"+e}function Mj(t){var e=t.channel,A=t.channelDef,n=t.markDef,r=t.scale,i=t.config,o=Hj(t);return fH(A)&&!OL(A.aggregate)&&r&&Fj(r.get("type"))&&!1===r.get("zero")?Lj({fieldDef:A,channel:e,markDef:n,ref:o,config:i}):o}function Lj(t){var e=t.fieldDef,A=t.channel,n=t.markDef,r=t.ref,i=t.config;return QL(n.type)||null===iY("invalid",n,i)?r:[_j(e,A),r]}function _j(t,e){var A=Jj(t,!0),n="y"===c_(e)?{field:{group:"height"}}:{value:0};return Object.assign({test:A},n)}function Jj(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return VT(Object(U.H)(t)?t:RH(t,{expr:"datum"}),!e)}function Tj(t,e,A,n){var r={};if(e&&(r.scale=e),QH(t)){var i=t.datum;sT(i)?r.signal=CT(i):wT(i)?r.signal=i.signal:r.value=i}else r.field=RH(t,A);if(n){var o=n.offset,a=n.band;o&&(r.offset=o),a&&(r.band=a)}return r}function jj(t){var e=t.scaleName,A=t.fieldOrDatumDef,n=t.fieldOrDatumDef2,r=t.offset,i=t.startSuffix,o=t.band,a=void 0===o?.5:o,s=0<a&&a<1?"datum":void 0,g=RH(A,{expr:s,suffix:i}),c=void 0!==n?RH(n,{expr:s}):RH(A,{suffix:"end",expr:s}),I={};if(0===a||1===a){I.scale=e;var u=0===a?g:c;I.field=u}else{var l="".concat(a," * ").concat(g," + ").concat(1-a," * ").concat(c);I.signal='scale("'.concat(e,'", ').concat(l,")")}return r&&(I.offset=r),I}function Hj(t){var e,A=t.channel,n=t.channelDef,r=t.channel2Def,i=t.markDef,o=t.config,a=t.scaleName,s=t.scale,g=t.stack,c=t.offset,I=t.defaultRef,u=t.band;if(n){if(yH(n)){if(vH(n)){u=null!==u&&void 0!==u?u:uH({channel:A,fieldDef:n,fieldDef2:r,markDef:i,stack:g,config:o,isMidPoint:!0});var l=n.bin,C=n.timeUnit,h=n.type;if(G_(l)||u&&C&&h===qT)return g&&g.impute?Tj(n,a,{binSuffix:"mid"},{offset:c}):u?jj({scaleName:a,fieldOrDatumDef:n,band:u,offset:c}):Tj(n,a,zH(n,A)?{binSuffix:"range"}:{},{offset:c});if(N_(l)){if(fH(r))return jj({scaleName:a,fieldOrDatumDef:n,fieldOrDatumDef2:r,band:u,offset:c});var B="x"===A?"x2":"y2";aT(f.channelRequiredForBinned(B))}}var d=null===s||void 0===s?void 0:s.get("type");return Tj(n,a,mj(d)?{binSuffix:"range"}:{},{offset:c,band:"band"===d?null!==(e=null!==u&&void 0!==u?u:n.band)&&void 0!==e?e:.5:void 0})}if(mH(n)){var Q=n.value,E=c?{offset:c}:{};return Object.assign(Object.assign({},Yj(A,Q)),E)}}return Object(U.D)(I)&&(I=I()),I?Object.assign(Object.assign({},I),c?{offset:c}:{}):I}function Yj(t,e){return pM(["x","x2"],t)&&"width"===e?{field:{group:"width"}}:pM(["y","y2"],t)&&"height"===e?{field:{group:"height"}}:eY(e)}function Vj(t){return t&&"number"!==t&&"time"!==t}function Zj(t,e,A){return"".concat(t,"(").concat(e).concat(A?", ".concat(JSON.stringify(A)):"",")")}function Wj(t){var e,A,n=t.fieldOrDatumDef,r=t.format,i=t.formatType,o=t.expr,a=t.normalizeStack,s=t.config;if(Vj(i))return Pj({fieldOrDatumDef:n,format:r,formatType:i,expr:o,config:s});var g=Kj(n,o,a);if(PH(n)){var c=function(t,e,A,n,r){return!e||A?(A=Object(U.H)(A)?A:n,"".concat(r?"utc":"time","Format(").concat(t,", '").concat(A,"')")):function(t,e,A){if(t){var n=mT(t),r=A||QT(t);return"".concat(r?"utc":"time","Format(").concat(e,", ").concat(n,")")}}(e,t,r)}(g,fH(n)?null===(e=bT(n.timeUnit))||void 0===e?void 0:e.unit:void 0,r,s.timeFormat,bH(n)&&(null===(A=n.scale)||void 0===A?void 0:A.type)===oj);return c?{signal:c}:void 0}return r=zj(dH(n),r,s),fH(n)&&G_(n.bin)?{signal:eH(g,RH(n,{expr:o,binSuffix:"end"}),r,i,s)}:r||"quantitative"===dH(n)?{signal:"".concat($j(g,r))}:{signal:"isValid(".concat(g,") ? ").concat(g,' : ""+').concat(g)}}function Kj(t,e,A){return fH(t)?A?"".concat(RH(t,{expr:e,suffix:"end"}),"-").concat(RH(t,{expr:e,suffix:"start"})):RH(t,{expr:e}):function(t){var e=t.datum;return sT(e)?CT(e):"".concat(JSON.stringify(e))}(t)}function Pj(t){var e=t.fieldOrDatumDef,A=t.format,n=t.formatType,r=t.expr,i=t.normalizeStack,o=t.config,a=t.field;return a=null!==a&&void 0!==a?a:Kj(e,r,i),fH(e)&&G_(e.bin)?{signal:eH(a,RH(e,{expr:r,binSuffix:"end"}),A,n,o)}:{signal:Zj(n,a,A)}}function qj(t,e,A,n,r,i){var o;if(!Vj(n))return PH(t)?function(t,e,A,n){if(t)return t;if(e)return{signal:mT(e)};return n?void 0:A.timeFormat}(A,fH(t)?null===(o=bT(t.timeUnit))||void 0===o?void 0:o.unit:void 0,r,i):zj(e,A,r)}function Xj(t,e,A){return t&&(wT(t)||"number"===t||"time"===t)?t:PH(e)&&"time"!==A&&"utc"!==A?"time":void 0}function zj(t,e,A){return Object(U.H)(e)?e:t===KT?A.numberFormat:void 0}function $j(t,e){return"format(".concat(t,', "').concat(e||"",'")')}function tH(t,e,A,n){var r;return Vj(A)?Zj(A,t,e):$j(t,null!==(r=Object(U.H)(e)?e:void 0)&&void 0!==r?r:n.numberFormat)}function eH(t,e,A,n,r){var i=tH(t,A,n,r),o=tH(e,A,n,r);return"".concat(VT(t,!1),' ? "null" : ').concat(i,' + "').concat(" \u2013 ",'" + ').concat(o)}var AH={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 nH(t){return t in AH}function rH(t){return!!t&&!!t.encoding}function iH(t){return!!t&&("count"===t.op||!!t.field)}function oH(t){return!!t&&Object(U.A)(t)}function aH(t){return"row"in t||"column"in t}function sH(t){return!!t&&"header"in t}function gH(t){return"facet"in t}function cH(t){var e=t.field,A=t.timeUnit,n=t.bin,r=t.aggregate;return Object.assign(Object.assign(Object.assign(Object.assign({},A?{timeUnit:A}:{}),n?{bin:n}:{}),r?{aggregate:r}:{}),{field:e})}function IH(t){return vH(t)&&"sort"in t}function uH(t){var e=t.channel,A=t.fieldDef,n=t.fieldDef2,r=t.markDef,i=t.stack,o=t.config,a=t.isMidPoint;if(yH(A)&&void 0!==A.band)return A.band;if(fH(A)){var s=A.timeUnit,g=A.bin;if(s&&!n)return a?oY("timeUnitBandPosition",r,o):EL(r.type)?oY("timeUnitBand",r,o):0;if(G_(g))return EL(r.type)&&!a?1:.5}return(null===i||void 0===i?void 0:i.fieldChannel)===e&&a?.5:void 0}function lH(t,e,A,n,r,i){return!!(G_(e.bin)||e.timeUnit&&vH(e)&&"temporal"===e.type)&&!!uH({channel:t,fieldDef:e,fieldDef2:A,stack:n,markDef:r,config:i})}function CH(t){return!!t&&"condition"in t}function hH(t){var e=t&&t.condition;return!!e&&!Object(U.A)(e)&&fH(e)}function BH(t){var e=t&&t.condition;return!!e&&!Object(U.A)(e)&&yH(e)}function fH(t){return!!t&&(!!t.field||"count"===t.aggregate)}function dH(t){return t&&t.type}function QH(t){return!!t&&"datum"in t}function EH(t){return vH(t)&&GH(t)||pH(t)}function pH(t){return QH(t)&&Object(U.E)(t.datum)}function yH(t){return fH(t)||QH(t)}function vH(t){return!!t&&("field"in t&&"type"in t||"count"===t.aggregate)}function mH(t){return t&&"value"in t&&"value"in t}function bH(t){return!!t&&("scale"in t||"sort"in t)}function FH(t){return t&&("axis"in t||"stack"in t||"impute"in t)}function wH(t){return!!t&&"legend"in t}function SH(t){return!!t&&("format"in t||"formatType"in t)}function DH(t){return"op"in t}function RH(t){var e,A,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.field,o=r.prefix,a=r.suffix,s="";if(NH(t))i=KM("count");else{var g;if(!r.nofn)if(DH(t))g=t.op;else{var c=t.bin,I=t.aggregate,u=t.timeUnit;G_(c)?(g=U_(c),a=(null!==(e=r.binSuffix)&&void 0!==e?e:"")+(null!==(A=r.suffix)&&void 0!==A?A:"")):I?NL(I)?(s='["'.concat(i,'"]'),i="argmax_".concat(I.argmax)):GL(I)?(s='["'.concat(i,'"]'),i="argmin_".concat(I.argmin)):g=String(I):u&&(g=FT(u),a=(!pM(["range","mid"],r.binSuffix)&&r.binSuffix||"")+(null!==(n=r.suffix)&&void 0!==n?n:""))}g&&(i=i?"".concat(g,"_").concat(i):g)}return a&&(i="".concat(i,"_").concat(a)),o&&(i="".concat(o,"_").concat(i)),r.forAs?HM(i):r.expr?_M(i,r.expr)+s:TM(i)+s}function UH(t){switch(t.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return fH(t)&&!!t.bin;case"temporal":return!1}throw new Error(f.invalidFieldType(t.type))}function GH(t){return!UH(t)}function NH(t){return"count"===t.aggregate}var kH=function(t,e){switch(e.fieldTitle){case"plain":return t.field;case"functional":return function(t){var e=t.aggregate,A=t.bin,n=t.timeUnit,r=t.field;if(NL(e))return"".concat(r," for argmax(").concat(e.argmax,")");if(GL(e))return"".concat(r," for argmin(").concat(e.argmin,")");var i=bT(n),o=e||(null===i||void 0===i?void 0:i.unit)||(null===i||void 0===i?void 0:i.maxbins)&&"timeunit"||G_(A)&&"bin";return o?o.toUpperCase()+"("+r+")":r}(t);default:return function(t,e){var A,n=t.field,r=t.bin,i=t.timeUnit,o=t.aggregate;if("count"===o)return e.countTitle;if(G_(r))return"".concat(n," (binned)");if(i){var a=null===(A=bT(i))||void 0===A?void 0:A.unit;if(a)return"".concat(n," (").concat(pT(a).join("-"),")")}else if(o)return NL(o)?"".concat(n," for max ").concat(o.argmax):GL(o)?"".concat(n," for min ").concat(o.argmin):"".concat(MM(o)," of ").concat(n);return n}(t,e)}},xH=kH;function OH(t){xH=t}function MH(){OH(kH)}function LH(t,e,A){var n,r,i=A.allowDisabling,o=A.includeDefault,a=void 0===o||o,s=(null!==(n=_H(t))&&void 0!==n?n:{}).title;if(!fH(t))return s;var g=t,c=a?JH(g,e):void 0;return i?VM(s,g.title,c):null!==(r=null!==s&&void 0!==s?s:g.title)&&void 0!==r?r:c}function _H(t){return FH(t)&&t.axis?t.axis:wH(t)&&t.legend?t.legend:sH(t)&&t.header?t.header:void 0}function JH(t,e){return xH(t,e)}function TH(t){var e;if(SH(t))return{format:t.format,formatType:t.formatType};var A=null!==(e=_H(t))&&void 0!==e?e:{};return{format:A.format,formatType:A.formatType}}function jH(t){return fH(t)?t:hH(t)?t.condition:void 0}function HH(t){return yH(t)?t:BH(t)?t.condition:void 0}function YH(t,e,A){if(Object(U.H)(t)||Object(U.E)(t)||Object(U.B)(t)){var n=Object(U.H)(t)?"string":Object(U.E)(t)?"number":"boolean";return aT(f.primitiveChannelDef(e,n,t)),{value:t}}return yH(t)?VH(t,e,A):BH(t)?Object.assign(Object.assign({},t),{condition:VH(t.condition,e,A)}):t}function VH(t,e,A){if(SH(t)){t.format;var n=t.formatType,r=nM(t,["format","formatType"]);if(Vj(n)&&!A.customFormatTypes)return aT(f.customFormatTypeNotAllowed(e)),VH(r,e,A)}else{var i=FH(t)?"axis":wH(t)?"legend":sH(t)?"header":null;if(i&&t[i]){var o=t[i],a=(o.format,o.formatType),s=nM(o,["format","formatType"]);if(Vj(a)&&!A.customFormatTypes)return aT(f.customFormatTypeNotAllowed(e)),VH(Object.assign(Object.assign({},t),Object(E.a)({},i,s)),e,A)}}return fH(t)?ZH(t,e):function(t){var e=t.type;if(e)return t;var A=t.datum;return e=Object(U.E)(A)?"quantitative":Object(U.H)(A)?"nominal":sT(A)?"temporal":void 0,Object.assign(Object.assign({},t),{type:e})}(t)}function ZH(t,e){var A=t.aggregate,n=t.timeUnit,r=t.bin,i=t.field,o=Object.assign({},t);if(!A||kL(A)||NL(A)||GL(A)||(aT(f.invalidAggregate(A)),delete o.aggregate),n&&(o.timeUnit=bT(n)),i&&(o.field="".concat(i)),G_(r)&&(o.bin=WH(r,e)),N_(r)&&!d_(e)&&aT("Channel ".concat(e,' should not be used with "binned" bin.')),vH(o)){var a=o.type,s=function(t){if(t)switch(t=t.toLowerCase()){case"q":case KT:return"quantitative";case"t":case qT:return"temporal";case"o":case PT:return"ordinal";case"n":case XT:return"nominal";case zT:return"geojson"}}(a);a!==s&&(o.type=s),"quantitative"!==a&&OL(A)&&(aT(f.invalidFieldTypeForCountAggregate(a,A)),o.type="quantitative")}else if(!g_(e)){var g=function(t,e){if(t.timeUnit)return"temporal";if(G_(t.bin))return"quantitative";switch(R_(e)){case"continuous":return"quantitative";case"discrete":case"flexible":return"nominal";default:return"quantitative"}}(o,e);aT(f.missingFieldType(e,g)),o.type=g}if(vH(o)){var c=function(t,e){var A=t.type;if("geojson"===A&&"shape"!==e)return{compatible:!1,warning:"Channel ".concat(e," should not be used with a geojson data.")};switch(e){case _L:case JL:case"facet":return GH(t)?{compatible:!1,warning:f.facetChannelShouldBeDiscrete(e)}:KH;case"x":case"y":case YL:case VL:case ZL:case"text":case"detail":case"key":case"tooltip":case"href":case"url":case"angle":case jL:case TL:case"description":return KH;case"longitude":case"longitude2":case"latitude":case"latitude2":return A!==KT?{compatible:!1,warning:"Channel ".concat(e," should be used with a quantitative field only, not ").concat(t.type," field.")}:KH;case"opacity":case"fillOpacity":case"strokeOpacity":case"strokeWidth":case KL:case HL:case"radius2":case"x2":case"y2":return"nominal"!==A||t.sort?KH:{compatible:!1,warning:"Channel ".concat(e," should not be used with an unsorted discrete field.")};case"strokeDash":return pM(["ordinal","nominal"],t.type)?KH:{compatible:!1,warning:"StrokeDash channel should be used with only discrete data."};case WL:return pM(["ordinal","nominal","geojson"],t.type)?KH:{compatible:!1,warning:"Shape channel should be used with only either discrete or geojson data."};case"order":return"nominal"!==t.type||"sort"in t?KH:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(o,e),I=c.compatible,u=c.warning;I||aT(u)}if(IH(o)&&Object(U.H)(o.sort)){var l=o.sort;if(nH(l))return Object.assign(Object.assign({},o),{sort:{encoding:l}});var C=l.substr(1);if("-"===l.charAt(0)&&nH(C))return Object.assign(Object.assign({},o),{sort:{encoding:C,order:"descending"}})}if(sH(o)){var h=o.header,B=h.orient,d=nM(h,["orient"]);if(B)return Object.assign(Object.assign({},o),{header:Object.assign(Object.assign({},d),{labelOrient:h.labelOrient||B,titleOrient:h.titleOrient||B})})}return o}function WH(t,e){return Object(U.B)(t)?{maxbins:O_(e)}:"binned"===t?{binned:!0}:t.maxbins||t.step?t:Object.assign(Object.assign({},t),{maxbins:O_(e)})}var KH={compatible:!0};function PH(t){var e,A=TH(t).formatType;return"time"===A||!A&&((e=t)&&("temporal"===e.type||fH(e)&&!!e.timeUnit))}function qH(t,e){var A,n,r=e.timeUnit,i=e.type,o=e.wrapTime,a=e.undefinedIfExprNotRequired,s=r&&(null===(A=bT(r))||void 0===A?void 0:A.unit),g=s||"temporal"===i;return wT(t)?n=t.signal:sT(t)?(g=!0,n=CT(t)):(Object(U.H)(t)||Object(U.E)(t))&&g&&(n="datetime(".concat(JSON.stringify(t),")"),function(t){return!!fT[t]}(s)&&(Object(U.E)(t)&&t<1e4||Object(U.H)(t)&&isNaN(Date.parse(t)))&&(n=CT(Object(E.a)({},s,t)))),n?o&&g?"time(".concat(n,")"):n:a?void 0:JSON.stringify(t)}function XH(t,e){var A=t.type;return e.map((function(e){var n=qH(e,{timeUnit:fH(t)?t.timeUnit:void 0,type:A,undefinedIfExprNotRequired:!0});return void 0!==n?{signal:n}:e}))}function zH(t,e){return G_(t.bin)?F_(e)&&pM(["ordinal","nominal"],t.type):(console.warn("Only call this method for binned field defs."),!1)}function $H(t){var e=t.anchor,A=t.frame,n=t.offset,r=t.orient,i=t.color,o=t.subtitleColor,a=t.subtitleFont,s=t.subtitleFontSize,g=t.subtitleFontStyle,c=t.subtitleFontWeight,I=t.subtitleLineHeight,u=t.subtitlePadding,l=nM(t,["anchor","frame","offset","orient","color","subtitleColor","subtitleFont","subtitleFontSize","subtitleFontStyle","subtitleFontWeight","subtitleLineHeight","subtitlePadding"]),C=Object.assign(Object.assign({},l),i?{fill:i}:{}),h=Object.assign(Object.assign(Object.assign(Object.assign({},e?{anchor:e}:{}),A?{frame:A}:{}),n?{offset:n}:{}),r?{orient:r}:{}),B=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o?{subtitleColor:o}:{}),a?{subtitleFont:a}:{}),s?{subtitleFontSize:s}:{}),g?{subtitleFontStyle:g}:{}),c?{subtitleFontWeight:c}:{}),I?{subtitleLineHeight:I}:{}),u?{subtitlePadding:u}:{});return{titleMarkConfig:C,subtitleMarkConfig:BM(C,["align","baseline","dx","dy","limit"]),nonMark:h,subtitle:B}}function tY(t){return Object(U.H)(t)||Object(U.A)(t)&&Object(U.H)(t[0])}function eY(t){return wT(t)?t:void 0!==t?{value:t}:void 0}function AY(t){return wT(t)?t.signal:Object(U.Z)(t.value)}function nY(t){return wT(t)?t.signal:null==t?null:Object(U.Z)(t)}function rY(t){var e;return[].concat(t.type,null!==(e=t.style)&&void 0!==e?e:[])}function iY(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.vgChannel,i=n.ignoreVgConfig;return r&&void 0!==e[r]?e[r]:void 0!==e[t]?e[t]:!i||r&&r!==t?oY(t,e,A,n):void 0}function oY(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.vgChannel;return VM(r?aY(t,e,A.style):void 0,aY(t,e,A.style),r?A[e.type][r]:void 0,A[e.type][t],r?A.mark[r]:A.mark[t])}function aY(t,e,A){return sY(t,rY(e),A)}function sY(t,e,A){var n;e=Object(U.i)(e);var r,i=Object(R.a)(e);try{for(i.s();!(r=i.n()).done;){var o=A[r.value];o&&void 0!==o[t]&&(n=o[t])}}catch(a){i.e(a)}finally{i.f()}return n}function gY(t,e){return Object(U.i)(t).reduce((function(t,A){var n;return t.field.push(RH(A,e)),t.order.push(null!==(n=A.sort)&&void 0!==n?n:"ascending"),t}),{field:[],order:[]})}function cY(t,e){var A=Object(p.a)(t);return e.forEach((function(t){var e,n=Object(R.a)(A);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(CM(r,t))return}}catch(i){n.e(i)}finally{n.f()}A.push(t)})),A}function IY(t,e){return CM(t,e)||!e?t:t?[].concat(Object(p.a)(Object(U.i)(t)),Object(p.a)(Object(U.i)(e))).join(", "):e}function uY(t,e){var A=t.value,n=e.value;if(null==A||null===n)return{explicit:t.explicit,value:null};if((tY(A)||wT(A))&&(tY(n)||wT(n)))return{explicit:t.explicit,value:IY(A,n)};if(tY(A)||wT(A))return{explicit:t.explicit,value:A};if(tY(n)||wT(n))return{explicit:t.explicit,value:n};if(!tY(A)&&!wT(A)&&!tY(n)&&!wT(n))return{explicit:t.explicit,value:cY(A,n)};throw new Error("It should never reach here")}function lY(t,e){var A=t&&t[e];return!!A&&(Object(U.A)(A)?yM(A,(function(t){return!!t.field})):fH(A)||hH(A))}function CY(t){return yM(r_,(function(e){if(lY(t,e)){var A=t[e];if(Object(U.A)(A))return yM(A,(function(t){return!!t.aggregate}));var n=jH(A);return n&&!!n.aggregate}return!1}))}function hY(t,e){var A=[],n=[],r=[],i=[],o={};return dY(t,(function(a,s){if(fH(a)){var g=a.field,c=a.aggregate,I=a.bin,u=a.timeUnit,l=nM(a,["field","aggregate","bin","timeUnit"]);if(c||u||I){var C,h=_H(a),B=h&&h.title,f=RH(a,{forAs:!0}),d=Object.assign(Object.assign(Object.assign({},B?[]:{title:LH(a,e,{allowDisabling:!0})}),l),{field:f});if(c){if(NL(c)?(C="argmax",f=RH({op:"argmax",field:c.argmax},{forAs:!0}),d.field="".concat(f,".").concat(g)):GL(c)?(C="argmin",f=RH({op:"argmin",field:c.argmin},{forAs:!0}),d.field="".concat(f,".").concat(g)):"boxplot"!==c&&"errorbar"!==c&&"errorband"!==c&&(C=c),C){var Q={op:C,as:f};g&&(Q.field=g),i.push(Q)}}else if(A.push(f),vH(a)&&G_(I)){if(n.push({bin:I,field:g,as:f}),A.push(RH(a,{binSuffix:"end"})),zH(a,s)&&A.push(RH(a,{binSuffix:"range"})),d_(s)){var E={field:f+"_end"};o[s+"2"]=E}d.bin="binned",g_(s)||(d.type=KT)}else if(u){r.push({timeUnit:u,field:g,as:f});var p=vH(a)&&a.type!==qT&&"time";p&&("text"===s||"tooltip"===s?d.formatType=p:!function(t){return!!C_[t]}(s)?d_(s)&&(d.axis=Object.assign({formatType:p},d.axis)):d.legend=Object.assign({formatType:p},d.legend))}o[s]=d}else A.push(g),o[s]=t[s]}else o[s]=t[s]})),{bins:n,timeUnits:r,aggregate:i,groupby:A,encoding:o}}function BY(t,e,A){var n=e.type;return RM(t).reduce((function(r,i){if(!a_(i))return aT(f.invalidEncodingChannel(i)),r;var o=t[i];if("angle"!==i||"arc"!==n||t.theta||(aT(f.REPLACE_ANGLE_WITH_THETA),i=jL),!function(t,e,A){var n=w_(e,A);if(!n)return!1;if("binned"===n){var r=t["x2"===e?"x":"y"];return!!(fH(r)&&fH(t[e])&&N_(r.bin))}return!0}(t,i,n))return aT(f.incompatibleChannel(i,n)),r;if(i===KL&&"line"===n){var a=jH(t[i]);if(null===a||void 0===a?void 0:a.aggregate)return aT(f.LINE_WITH_VARYING_SIZE),r}if(i===YL&&(e.filled?"fill"in t:"stroke"in t))return aT(f.droppingColor("encoding",{fill:"fill"in t,stroke:"stroke"in t})),r;if("detail"===i||"order"===i&&!Object(U.A)(o)&&!mH(o)||"tooltip"===i&&Object(U.A)(o))o&&(r[i]=Object(U.i)(o).reduce((function(t,e){return fH(e)?t.push(ZH(e,i)):aT(f.emptyFieldDef(e,i)),t}),[]));else{if("tooltip"===i&&null===o)r[i]=null;else if(!fH(o)&&!QH(o)&&!mH(o)&&!CH(o)&&!wT(o))return aT(f.emptyFieldDef(o,i)),r;r[i]=YH(o,i,A)}return r}),{})}function fY(t){var e,A=[],n=Object(R.a)(RM(t));try{for(n.s();!(e=n.n()).done;){var r=e.value;if(lY(t,r)){var i,o=t[r],a=Object(U.i)(o),s=Object(R.a)(a);try{for(s.s();!(i=s.n()).done;){var g=i.value;fH(g)?A.push(g):hH(g)&&A.push(g.condition)}}catch(c){s.e(c)}finally{s.f()}}}}catch(c){n.e(c)}finally{n.f()}return A}function dY(t,e,A){if(t){var n,r=Object(R.a)(RM(t));try{for(r.s();!(n=r.n()).done;){var i=n.value,o=t[i];if(Object(U.A)(o)){var a,s=Object(R.a)(o);try{for(s.s();!(a=s.n()).done;){var g=a.value;e.call(A,g,i)}}catch(c){s.e(c)}finally{s.f()}}else e.call(A,o,i)}}catch(c){r.e(c)}finally{r.f()}}}function QY(t,e,A,n){return t?RM(t).reduce((function(A,r){var i=t[r];return Object(U.A)(i)?i.reduce((function(t,A){return e.call(n,t,A,r)}),A):e.call(n,A,i,r)}),A):A}function EY(t,e){return RM(e).reduce((function(A,n){switch(n){case"x":case"y":case"href":case"description":case"url":case"x2":case"y2":case jL:case HL:case TL:case"radius2":case"latitude":case"longitude":case"latitude2":case"longitude2":case"text":case WL:case"angle":case"tooltip":return A;case"order":if("line"===t||"trail"===t)return A;case"detail":case"key":var r=e[n];if(Object(U.A)(r)||fH(r)){var i,o=Object(R.a)(Object(U.i)(r));try{for(o.s();!(i=o.n()).done;){var a=i.value;a.aggregate||A.push(RH(a,{}))}}catch(g){o.e(g)}finally{o.f()}}return A;case KL:if("trail"===t)return A;case YL:case VL:case ZL:case"opacity":case"fillOpacity":case"strokeOpacity":case"strokeDash":case"strokeWidth":var s=jH(e[n]);return s&&!s.aggregate&&A.push(RH(s,{})),A}}),[])}function pY(t,e,A){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("tooltip"in A)return{tooltip:A.tooltip};var r=t.map((function(t){var A=t.fieldPrefix,r=t.titlePrefix,i=n?" of ".concat(e.field):"";return{field:A+e.field,type:e.type,title:wT(r)?{signal:r+'"'.concat(escape(i),'"')}:r+i}}));return{tooltip:[].concat(Object(p.a)(r),Object(p.a)(fY(A)))}}function yY(t){var e=t.axis,A=t.title,n=t.field;return e&&void 0!==e.title?void 0:VM(A,n)}function vY(t,e,A,n,r){var i=A.scale,o=A.axis;return function(a){var s=a.partName,g=a.mark,c=a.positionPrefix,I=a.endPositionPrefix,u=void 0===I?void 0:I,l=a.aria,C=a.extraEncoding,h=void 0===C?{}:C,B=yY(A);return mY(t,s,r,l,{mark:g,encoding:Object.assign(Object.assign(Object.assign(Object(E.a)({},e,Object.assign(Object.assign(Object.assign({field:c+"_"+A.field,type:A.type},void 0!==B?{title:B}:{}),void 0!==i?{scale:i}:{}),void 0!==o?{axis:o}:{})),Object(U.H)(u)?Object(E.a)({},e+"2",{field:u+"_"+A.field}):{}),n),h)})}}function mY(t,e,A,n,r){var i=t.clip,o=t.color,a=t.opacity,s=t.type;return t[e]||void 0===t[e]&&A[e]?[Object.assign(Object.assign({},r),{mark:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A[e]),i?{clip:i}:{}),o?{color:o}:{}),a?{opacity:a}:{}),yL(r.mark)?r.mark:{type:r.mark}),{style:"".concat(s,"-").concat(e)}),Object(U.B)(t[e])?{}:t[e]),!1===n?{aria:n}:{})})]:[]}function bY(t,e,A){var n=t.encoding,r="vertical"===e?"y":"x",i=n[r],o=n[r+"2"],a=n[r+"Error"],s=n[r+"Error2"];return{continuousAxisChannelDef:FY(i,A),continuousAxisChannelDef2:FY(o,A),continuousAxisChannelDefError:FY(a,A),continuousAxisChannelDefError2:FY(s,A),continuousAxis:r}}function FY(t,e){if(t&&t.aggregate){var A=t.aggregate,n=nM(t,["aggregate"]);return A!==e&&aT(f.errorBarContinuousAxisHasCustomizedAggregate(A,e)),n}return t}function wY(t,e){var A=t.mark,n=t.encoding,r=n.x,i=n.y;if(EH(r)){if(EH(i)){var o=fH(r)&&r.aggregate,a=fH(i)&&i.aggregate;if(o||a!==e){if(a||o!==e){if(o===e&&a===e)throw new Error("Both x and y cannot have aggregate");return yL(A)&&A.orient?A.orient:"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if(EH(i))return"vertical";throw new Error("Need a valid continuous axis for "+e+"s")}var SY=new DL("boxplot",RY);function DY(t){return Object(U.E)(t)?"tukey":t}function RY(t,e){var A,n,r=e.config,i=t.mark,o=(t.encoding,t.selection),a=(t.projection,nM(t,["mark","encoding","selection","projection"])),s=yL(i)?i:{type:i};o&&aT(f.selectionNotSupported("boxplot"));var g,c=null!==(A=s.extent)&&void 0!==A?A:r.boxplot.extent,I=iY("size",s,r),u=DY(c),l=function(t,e,A){var n=wY(t,"boxplot"),r=bY(t,n,"boxplot"),i=r.continuousAxisChannelDef,o=r.continuousAxis,a=i.field,s=DY(e),g=[].concat(Object(p.a)(UY(a)),[{op:"median",field:a,as:"mid_box_"+a},{op:"min",field:a,as:("min-max"===s?"lower_whisker_":"min_")+a},{op:"max",field:a,as:("min-max"===s?"upper_whisker_":"max_")+a}]),c="min-max"===s||"tukey"===s?[]:[{calculate:'datum["upper_box_'.concat(a,'"] - datum["lower_box_').concat(a,'"]'),as:"iqr_"+a},{calculate:'min(datum["upper_box_'.concat(a,'"] + datum["iqr_').concat(a,'"] * ').concat(e,', datum["max_').concat(a,'"])'),as:"upper_whisker_"+a},{calculate:'max(datum["lower_box_'.concat(a,'"] - datum["iqr_').concat(a,'"] * ').concat(e,', datum["min_').concat(a,'"])'),as:"lower_whisker_"+a}],I=t.encoding,u=o,l=(I[u],function(t){var e,A,n=t.tooltip,r=nM(t,["tooltip"]);if(!n)return{filteredEncoding:t};if(Object(U.A)(n)){var i,o=Object(R.a)(n);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.aggregate?(e||(e=[]),e.push(a)):(A||(A=[]),A.push(a))}}catch(s){o.e(s)}finally{o.f()}e&&(r.tooltip=e)}else n.aggregate?r.tooltip=n:A=n;return Object(U.A)(A)&&1===A.length&&(A=A[0]),{customTooltipWithoutAggregatedField:A,filteredEncoding:r}}(nM(I,["symbol"===typeof u?u:u+""]))),C=l.customTooltipWithoutAggregatedField,h=hY(l.filteredEncoding,A),B=h.bins,f=h.timeUnits,d=h.aggregate,Q=h.groupby,E=h.encoding,y="vertical"===n?"horizontal":"vertical",v=n;return{transform:[].concat(Object(p.a)(B),Object(p.a)(f),[{aggregate:[].concat(Object(p.a)(d),Object(p.a)(g)),groupby:Q}],c),groupby:Q,aggregate:d,continuousAxisChannelDef:i,continuousAxis:o,encodingWithoutContinuousAxis:E,ticksOrient:y,boxOrient:v,customTooltipWithoutAggregatedField:C}}(t,c,r),C=l.transform,h=l.continuousAxisChannelDef,B=l.continuousAxis,d=l.groupby,Q=l.aggregate,y=l.encodingWithoutContinuousAxis,v=l.ticksOrient,m=l.boxOrient,b=l.customTooltipWithoutAggregatedField,F=(y.color,y.size),w=nM(y,["color","size"]),S=function(t){return vY(s,B,h,t,r.boxplot)},D=S(w),G=S(y),N=S(Object.assign(Object.assign({},w),F?{size:F}:{})),k=pY([{fieldPrefix:"min-max"===u?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===u?"lower_whisker_":"min_",titlePrefix:"Min"}],h,y),x={type:"tick",color:"black",opacity:1,orient:v,invalid:null},O="min-max"===u?k:pY([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],h,y),M=[].concat(Object(p.a)(D({partName:"rule",mark:{type:"rule",invalid:null},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",aria:!1,extraEncoding:O})),Object(p.a)(D({partName:"rule",mark:{type:"rule",invalid:null},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",aria:!1,extraEncoding:O})),Object(p.a)(D({partName:"ticks",mark:x,positionPrefix:"lower_whisker",aria:!1,extraEncoding:O})),Object(p.a)(D({partName:"ticks",mark:x,positionPrefix:"upper_whisker",aria:!1,extraEncoding:O}))),L=[].concat(Object(p.a)("tukey"!==u?M:[]),Object(p.a)(G({partName:"box",mark:Object.assign(Object.assign({type:"bar"},I?{size:I}:{}),{orient:m,invalid:null}),positionPrefix:"lower_box",endPositionPrefix:"upper_box",aria:!1,extraEncoding:k})),Object(p.a)(N({partName:"median",mark:Object.assign(Object.assign(Object.assign({type:"tick",invalid:null},Object(U.F)(r.boxplot.median)&&r.boxplot.median.color?{color:r.boxplot.median.color}:{}),I?{size:I}:{}),{orient:v,ariaRoleDescription:"box"}),positionPrefix:"mid_box",extraEncoding:k})));if("min-max"!==u){var _='datum["lower_box_'.concat(h.field,'"]'),J='datum["upper_box_'.concat(h.field,'"]'),T="(".concat(J," - ").concat(_,")"),j="".concat(_," - ").concat(c," * ").concat(T),H="".concat(J," + ").concat(c," * ").concat(T),Y='datum["'.concat(h.field,'"]'),V={joinaggregate:UY(h.field),groupby:d},Z=void 0;"tukey"===u&&(Z={transform:[{filter:"(".concat(j," <= ").concat(Y,") && (").concat(Y," <= ").concat(H,")")},{aggregate:[{op:"min",field:h.field,as:"lower_whisker_"+h.field},{op:"max",field:h.field,as:"upper_whisker_"+h.field},{op:"min",field:"lower_box_"+h.field,as:"lower_box_"+h.field},{op:"max",field:"upper_box_"+h.field,as:"upper_box_"+h.field}].concat(Object(p.a)(Q)),groupby:d}],layer:M});w.tooltip;var W=nM(w,["tooltip"]),K=h.scale,P=h.axis,q=yY(h),X=mY(s,"outliers",r.boxplot,!0,{transform:[{filter:"(".concat(Y," < ").concat(j,") || (").concat(Y," > ").concat(H,")")}],mark:"point",encoding:Object.assign(Object.assign(Object(E.a)({},B,Object.assign(Object.assign(Object.assign({field:h.field,type:h.type},void 0!==q?{title:q}:{}),void 0!==K?{scale:K}:{}),void 0!==P?{axis:P}:{})),W),b?{tooltip:b}:{})})[0];X&&Z?g={transform:[V],layer:[X,Z]}:X?(g=X).transform.unshift(V):Z&&(g=Z).transform.unshift(V)}return g?Object.assign(Object.assign({},a),{layer:[g,{transform:C,layer:L}]}):Object.assign(Object.assign({},a),{transform:(null!==(n=a.transform)&&void 0!==n?n:[]).concat(C),layer:L})}function UY(t){return[{op:"q1",field:t,as:"lower_box_"+t},{op:"q3",field:t,as:"upper_box_"+t}]}var GY=new DL("errorbar",NY);function NY(t,e){var A=e.config,n=xY(t,"errorbar",A),r=n.transform,i=n.continuousAxisChannelDef,o=n.continuousAxis,a=n.encodingWithoutContinuousAxis,s=n.ticksOrient,g=n.markDef,c=n.outerSpec,I=n.tooltipEncoding,u=vY(g,o,i,a,A.errorbar),l={type:"tick",orient:s},C=[].concat(Object(p.a)(u({partName:"ticks",mark:l,positionPrefix:"lower",aria:!1,extraEncoding:I})),Object(p.a)(u({partName:"ticks",mark:l,positionPrefix:"upper",aria:!1,extraEncoding:I})),Object(p.a)(u({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar"},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:I})));return Object.assign(Object.assign(Object.assign({},c),{transform:r}),C.length>1?{layer:C}:Object.assign({},C[0]))}function kY(t,e){var A=t.encoding;if(function(t){return(yH(t.x)||yH(t.y))&&!yH(t.x2)&&!yH(t.y2)&&!yH(t.xError)&&!yH(t.xError2)&&!yH(t.yError)&&!yH(t.yError2)}(A))return{orient:wY(t,e),inputType:"raw"};var n=function(t){return yH(t.x2)||yH(t.y2)}(A),r=function(t){return yH(t.xError)||yH(t.xError2)||yH(t.yError)||yH(t.yError2)}(A),i=A.x,o=A.y;if(n){if(r)throw new Error("".concat(e," cannot be both type aggregated-upper-lower and aggregated-error"));var a=A.x2,s=A.y2;if(yH(a)&&yH(s))throw new Error("".concat(e," cannot have both x2 and y2"));if(yH(a)){if(EH(i))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error("Both x and x2 have to be quantitative in ".concat(e))}if(yH(s)){if(EH(o))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error("Both y and y2 have to be quantitative in ".concat(e))}throw new Error("No ranged axis")}var g=A.xError,c=A.xError2,I=A.yError,u=A.yError2;if(yH(c)&&!yH(g))throw new Error("".concat(e," cannot have xError2 without xError"));if(yH(u)&&!yH(I))throw new Error("".concat(e," cannot have yError2 without yError"));if(yH(g)&&yH(I))throw new Error("".concat(e," cannot have both xError and yError with both are quantiative"));if(yH(g)){if(EH(i))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(yH(I)){if(EH(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 xY(t,e,A){var n,r=t.mark,i=t.encoding,o=t.selection,a=(t.projection,nM(t,["mark","encoding","selection","projection"])),s=yL(r)?r:{type:r};o&&aT(f.selectionNotSupported(e));var g=kY(t,e),c=g.orient,I=g.inputType,u=bY(t,c,e),l=u.continuousAxisChannelDef,C=u.continuousAxisChannelDef2,h=u.continuousAxisChannelDefError,B=u.continuousAxisChannelDefError2,d=u.continuousAxis,Q=function(t,e,A,n,r,i,o,a){var s,g=[],c=[],I=e.field,u=!1;if("raw"===i){var l,C,h,B=t.center?t.center:t.extent?"iqr"===t.extent?"median":"mean":a.errorbar.center,d=t.extent?t.extent:"mean"===B?"stderr":"iqr";if("median"===B!==("iqr"===d)&&aT(f.errorBarCenterIsUsedWithWrongExtent(B,d,o)),"stderr"===d||"stdev"===d)g=[{op:d,field:I,as:"extent_"+I},{op:B,field:I,as:"center_"+I}],c=[{calculate:'datum["center_'.concat(I,'"] + datum["extent_').concat(I,'"]'),as:"upper_"+I},{calculate:'datum["center_'.concat(I,'"] - datum["extent_').concat(I,'"]'),as:"lower_"+I}],s=[{fieldPrefix:"center_",titlePrefix:MM(B)},{fieldPrefix:"upper_",titlePrefix:OY(B,d,"+")},{fieldPrefix:"lower_",titlePrefix:OY(B,d,"-")}],u=!0;else t.center&&t.extent&&aT(f.errorBarCenterIsNotNeeded(t.extent,o)),"ci"===d?(l="mean",C="ci0",h="ci1"):(l="median",C="q1",h="q3"),g=[{op:C,field:I,as:"lower_"+I},{op:h,field:I,as:"upper_"+I},{op:l,field:I,as:"center_"+I}],s=[{fieldPrefix:"upper_",titlePrefix:LH({field:I,aggregate:h,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:LH({field:I,aggregate:C,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:LH({field:I,aggregate:l,type:"quantitative"},a,{allowDisabling:!1})}]}else{(t.center||t.extent)&&aT(f.errorBarCenterAndExtentAreNotNeeded(t.center,t.extent)),"aggregated-upper-lower"===i?(s=[],c=[{calculate:'datum["'.concat(A.field,'"]'),as:"upper_"+I},{calculate:'datum["'.concat(I,'"]'),as:"lower_"+I}]):"aggregated-error"===i&&(s=[{fieldPrefix:"",titlePrefix:I}],c=[{calculate:'datum["'.concat(I,'"] + datum["').concat(n.field,'"]'),as:"upper_"+I}],r?c.push({calculate:'datum["'.concat(I,'"] + datum["').concat(r.field,'"]'),as:"lower_"+I}):c.push({calculate:'datum["'.concat(I,'"] - datum["').concat(n.field,'"]'),as:"lower_"+I}));var Q,E=Object(R.a)(c);try{for(E.s();!(Q=E.n()).done;){var p=Q.value;s.push({fieldPrefix:p.as.substring(0,6),titlePrefix:jM(jM(p.calculate,'datum["',""),'"]',"")})}}catch(y){E.e(y)}finally{E.f()}}return{postAggregateCalculates:c,errorBarSpecificAggregate:g,tooltipSummary:s,tooltipTitleWithFieldName:u}}(s,l,C,h,B,I,e,A),E=Q.errorBarSpecificAggregate,y=Q.postAggregateCalculates,v=Q.tooltipSummary,m=Q.tooltipTitleWithFieldName,b=i,F=d,w=(b[F],"x"===d?"x2":"y2"),S=(b[w],"x"===d?"xError":"yError"),D=(b[S],"x"===d?"xError2":"yError2"),U=(b[D],hY(nM(b,["symbol"===typeof F?F:F+"","symbol"===typeof w?w:w+"","symbol"===typeof S?S:S+"","symbol"===typeof D?D:D+""]),A)),G=U.bins,N=U.timeUnits,k=U.aggregate,x=U.groupby,O=U.encoding,M=[].concat(Object(p.a)(k),Object(p.a)(E)),L="raw"!==I?[]:x,_=pY(v,l,O,m);return{transform:[].concat(Object(p.a)(null!==(n=a.transform)&&void 0!==n?n:[]),Object(p.a)(G),Object(p.a)(N),Object(p.a)(0===M.length?[]:[{aggregate:M,groupby:L}]),Object(p.a)(y)),groupby:L,continuousAxisChannelDef:l,continuousAxis:d,encodingWithoutContinuousAxis:O,ticksOrient:"vertical"===c?"horizontal":"vertical",markDef:s,outerSpec:a,tooltipEncoding:_}}function OY(t,e,A){return MM(t)+" "+A+" "+e}var MY=new DL("errorband",LY);function LY(t,e){var A=e.config,n=xY(t,"errorband",A),r=n.transform,i=n.continuousAxisChannelDef,o=n.continuousAxis,a=n.encodingWithoutContinuousAxis,s=n.markDef,g=n.outerSpec,c=n.tooltipEncoding,I=s,u=vY(I,o,i,a,A.errorband),l=void 0!==t.encoding.x&&void 0!==t.encoding.y,C={type:l?"area":"rect"},h={type:l?"line":"rule"},B=Object.assign(Object.assign({},I.interpolate?{interpolate:I.interpolate}:{}),I.tension&&I.interpolate?{tension:I.tension}:{});return l?(C=Object.assign(Object.assign(Object.assign({},C),B),{ariaRoleDescription:"errorband"}),h=Object.assign(Object.assign({},h),B)):I.interpolate?aT(f.errorBand1DNotSupport("interpolate")):I.tension&&aT(f.errorBand1DNotSupport("tension")),Object.assign(Object.assign({},g),{transform:r,layer:[].concat(Object(p.a)(u({partName:"band",mark:C,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})),Object(p.a)(u({partName:"borders",mark:h,positionPrefix:"lower",aria:!1,extraEncoding:c})),Object(p.a)(u({partName:"borders",mark:h,positionPrefix:"upper",aria:!1,extraEncoding:c})))})}var _Y={};function JY(t,e,A){var n=new DL(t,e);_Y[t]={normalizer:n,parts:A}}JY("boxplot",RY,["box","median","outliers","rule","ticks"]),JY("errorbar",NY,["ticks","rule"]),JY("errorband",LY,["band","borders"]);var TY=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],jY=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],HY={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"}},YY={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},VY=(RM(YY),{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 ZY(t){return!!t&&("legend"===t||!!t.legend)}function WY(t){return ZY(t)&&Object(U.F)(t)}function KY(t){return"concat"in t}function PY(t){return"vconcat"in t}function qY(t){return"hconcat"in t}function XY(t){return Object(U.F)(t)&&void 0!==t.step}function zY(t){return t.view||t.width||t.height}var $Y=RM({align:1,bounds:1,center:1,columns:1,spacing:1});function tV(t,e){var A;return null!==(A=t[e])&&void 0!==A?A:t["width"===e?"continuousWidth":"continuousHeight"]}function eV(t,e){var A=AV(t,e);return XY(A)?A.step:nV}function AV(t,e){var A;return VM(null!==(A=t[e])&&void 0!==A?A:t["width"===e?"discreteWidth":"discreteHeight"],{step:t.step})}var nV=20;var rV={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:nV},mark:{color:"#4c78a8",invalid:"filter",timeUnitBand:1},arc:{},area:{},bar:FL,circle:{},geoshape:{},image:{},line:{},point:{},rect:wL,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:VY,style:{},title:{},facet:{spacing:20},concat:{spacing:20}},iV=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],oV={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},aV={blue:iV[0],orange:iV[1],red:iV[2],teal:iV[3],green:iV[4],yellow:iV[5],purple:iV[6],pink:iV[7],brown:iV[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 sV(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{signals:[{name:"color",value:Object(U.F)(t)?Object.assign(Object.assign({},aV),t):aV}],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 gV(t){return{signals:[{name:"fontSize",value:Object(U.F)(t)?Object.assign(Object.assign({},oV),t):oV}],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 cV(t){return{text:{font:t},style:{"guide-label":{font:t},"guide-title":{font:t},"group-title":{font:t},"group-subtitle":{font:t}}}}function IV(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.color,A=t.font,n=t.fontSize,r=nM(t,["color","font","fontSize"]);return Object(U.N)({},rV,A?cV(A):{},e?sV(e):{},n?gV(n):{},r||{})}var uV=["view"].concat(Object(p.a)(pL)),lV=["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"],CV=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 hV(t){t=hM(t);var e,A=Object(R.a)(lV);try{for(A.s();!(e=A.n()).done;){delete t[e.value]}}catch(v){A.e(v)}finally{A.f()}if(t.axis)for(var n in t.axis)zM(t.axis[n])&&delete t.axis[n];if(t.legend){var r,i=Object(R.a)(TY);try{for(i.s();!(r=i.n()).done;){var o=r.value;delete t.legend[o]}}catch(v){i.e(v)}finally{i.f()}}if(t.mark){var a,s=Object(R.a)(mL);try{for(s.s();!(a=s.n()).done;){var g=a.value;delete t.mark[g]}}catch(v){s.e(v)}finally{s.f()}t.mark.tooltip&&Object(U.F)(t.mark.tooltip)&&delete t.mark.tooltip}var c,I=Object(R.a)(uV);try{for(I.s();!(c=I.n()).done;){var u,l=c.value,C=Object(R.a)(mL);try{for(C.s();!(u=C.n()).done;){var h=u.value;delete t[l][h]}}catch(v){C.e(v)}finally{C.f()}var B=CV[l];if(B){var f,d=Object(R.a)(B);try{for(d.s();!(f=d.n()).done;){var Q=f.value;delete t[l][Q]}}catch(v){d.e(v)}finally{d.f()}}BV(t,l)}}catch(v){I.e(v)}finally{I.f()}var E,p=Object(R.a)(RM(_Y));try{for(p.s();!(E=p.n()).done;){delete t[E.value]}}catch(v){p.e(v)}finally{p.f()}for(var y in function(t){var e=$H(t.title),A=e.titleMarkConfig,n=e.subtitleMarkConfig,r=e.subtitle;DM(A)||(t.style["group-title"]=Object.assign(Object.assign({},t.style["group-title"]),A));DM(n)||(t.style["group-subtitle"]=Object.assign(Object.assign({},t.style["group-subtitle"]),n));DM(r)?delete t.title:t.title=r}(t),t)Object(U.F)(t[y])&&DM(t[y])&&delete t[y];return DM(t)?void 0:t}function BV(t,e,A,n){var r=n?t[e][n]:t[e];"view"===e&&(A="cell");var i=Object.assign(Object.assign({},r),t.style[null!==A&&void 0!==A?A:e]);DM(i)||(t.style[null!==A&&void 0!==A?A:e]=i),n||delete t[e]}function fV(t){return"layer"in t}var dV=A(71),QV=A(92),EV=function(){function t(){Object(F.a)(this,t)}return Object(w.a)(t,[{key:"map",value:function(t,e){return gH(t)?this.mapFacet(t,e):function(t){return"repeat"in t}(t)?this.mapRepeat(t,e):qY(t)?this.mapHConcat(t,e):PY(t)?this.mapVConcat(t,e):KY(t)?this.mapConcat(t,e):this.mapLayerOrUnit(t,e)}},{key:"mapLayerOrUnit",value:function(t,e){if(fV(t))return this.mapLayer(t,e);if(SL(t))return this.mapUnit(t,e);throw new Error(f.invalidSpec(t))}},{key:"mapLayer",value:function(t,e){var A=this;return Object.assign(Object.assign({},t),{layer:t.layer.map((function(t){return A.mapLayerOrUnit(t,e)}))})}},{key:"mapHConcat",value:function(t,e){var A=this;return Object.assign(Object.assign({},t),{hconcat:t.hconcat.map((function(t){return A.map(t,e)}))})}},{key:"mapVConcat",value:function(t,e){var A=this;return Object.assign(Object.assign({},t),{vconcat:t.vconcat.map((function(t){return A.map(t,e)}))})}},{key:"mapConcat",value:function(t,e){var A=this,n=t.concat,r=nM(t,["concat"]);return Object.assign(Object.assign({},r),{concat:n.map((function(t){return A.map(t,e)}))})}},{key:"mapFacet",value:function(t,e){return Object.assign(Object.assign({},t),{spec:this.map(t.spec,e)})}},{key:"mapRepeat",value:function(t,e){return Object.assign(Object.assign({},t),{spec:this.map(t.spec,e)})}}]),t}(),pV={zero:1,center:1,normalize:1};function yV(t){return t in pV}var vV=new Set([iL,aL,oL,uL,cL,BL,fL,gL,lL,CL]),mV=new Set([aL,oL,iL]);function bV(t,e){var A,n,r="x"===e?"y":"radius",i=t[e],o=t[r];if(fH(i)&&fH(o))if("quantitative"===dH(i)&&"quantitative"===dH(o)){if(i.stack)return e;if(o.stack)return r;var a=fH(i)&&!!i.aggregate;if(a!==(fH(o)&&!!o.aggregate))return a?e:r;var s=null===(A=i.scale)||void 0===A?void 0:A.type,g=null===(n=o.scale)||void 0===n?void 0:n.type;if(s&&"linear"!==s)return r;if(g&&"linear"!==g)return e}else{if("quantitative"===dH(i))return e;if("quantitative"===dH(o))return r}else{if("quantitative"===dH(i))return e;if("quantitative"===dH(o))return r}}function FV(t){switch(t){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}function wV(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=yL(t)?t.type:t;if(!vV.has(n))return null;var r=bV(e,"x")||bV(e,"theta");if(!r)return null;var i=e[r],o=fH(i)?RH(i,{}):void 0,a=FV(r),s=e[a],g=fH(s)?RH(s,{}):void 0;g===o&&(g=void 0,s=void 0,a=void 0);var c,I=h_.reduce((function(t,A){if("tooltip"!==A&&lY(e,A)){var n,r=e[A],i=Object(R.a)(Object(U.i)(r));try{for(i.s();!(n=i.n()).done;){var o=jH(n.value);if(!o.aggregate){var a=RH(o,{});a&&a===g||t.push({channel:A,fieldDef:o})}}}catch(s){i.e(s)}finally{i.f()}}return t}),[]);if(void 0!==i.stack?c=Object(U.B)(i.stack)?i.stack?"zero":null:i.stack:I.length>0&&mV.has(n)&&(c="zero"),!c||!yV(c))return null;if(CY(e)&&0===I.length)return null;if(i.scale&&i.scale.type&&i.scale.type!==tj){if(A.disallowNonLinearStack)return null;aT(f.cannotStackNonLinearScale(i.scale.type))}return yH(e[u_(r)])?(void 0!==i.stack&&aT(f.cannotStackRangedMark(r)),null):(fH(i)&&i.aggregate&&!pM(ML,i.aggregate)&&aT(f.stackNonSummativeAggregate(i.aggregate)),{groupbyChannel:s?a:void 0,groupbyField:g,fieldChannel:r,impute:null!==i.impute&&QL(n),stackBy:I,offset:c})}function SV(t){t.point,t.line;var e=nM(t,["point","line"]);return RM(e).length>1?e:e.type}function DV(t){for(var e=0,A=["line","area","rule","trail"];e<A.length;e++){var n=A[e];t[n]&&(t=Object.assign(Object.assign({},t),Object(E.a)({},n,fM(t[n],["point","line"]))))}return t}function RV(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=arguments.length>2?arguments[2]:void 0;return"transparent"===t.point?{opacity:0}:t.point?Object(U.F)(t.point)?t.point:{}:void 0!==t.point?null:e.point||A.shape?Object(U.F)(e.point)?e.point:{}:void 0}function UV(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.line?!0===t.line?{}:t.line:void 0!==t.line?null:e.line?!0===e.line?{}:e.line:void 0}var GV=function(){function t(){Object(F.a)(this,t),this.name="path-overlay"}return Object(w.a)(t,[{key:"hasMatchingType",value:function(t,e){if(SL(t)){var A=t.mark,n=t.encoding,r=yL(A)?A:{type:A};switch(r.type){case"line":case"rule":case"trail":return!!RV(r,e[r.type],n);case"area":return!!RV(r,e[r.type],n)||!!UV(r,e[r.type])}}return!1}},{key:"run",value:function(t,e,A){var n=e.config,r=t.selection,i=t.projection,o=t.encoding,a=t.mark,s=nM(t,["selection","projection","encoding","mark"]),g=yL(a)?a:{type:a},c=RV(g,n[g.type],o),I="area"===g.type&&UV(g,n[g.type]),u=[Object.assign(Object.assign({},r?{selection:r}:{}),{mark:SV(Object.assign(Object.assign({},"area"===g.type&&void 0===g.opacity&&void 0===g.fillOpacity?{opacity:.7}:{}),g)),encoding:fM(o,["shape"])})],l=wV(g,o),C=o;if(l){var h=l.fieldChannel,B=l.offset;C=Object.assign(Object.assign({},o),Object(E.a)({},h,Object.assign(Object.assign({},o[h]),B?{stack:B}:{})))}return I&&u.push(Object.assign(Object.assign({},i?{projection:i}:{}),{mark:Object.assign(Object.assign({type:"line"},BM(g,["clip","interpolate","tension","tooltip"])),I),encoding:C})),c&&u.push(Object.assign(Object.assign({},i?{projection:i}:{}),{mark:Object.assign(Object.assign({type:"point",opacity:1,filled:!0},BM(g,["clip","tooltip"])),c),encoding:C})),A(Object.assign(Object.assign({},s),{layer:u}),Object.assign(Object.assign({},e),{config:DV(n)}))}}]),t}(),NV=function(){function t(){Object(F.a)(this,t),this.name="RangeStep"}return Object(w.a)(t,[{key:"hasMatchingType",value:function(t){var e;if(SL(t)&&t.encoding){var A,n=Object(R.a)(f_);try{for(n.s();!(A=n.n()).done;){var r=A.value,i=t.encoding[r];if(i&&yH(i)&&(null===(e=null===i||void 0===i?void 0:i.scale)||void 0===e?void 0:e.rangeStep))return!0}}catch(o){n.e(o)}finally{n.f()}}return!1}},{key:"run",value:function(t){var e,A,n={},r=Object.assign({},t.encoding),i=Object(R.a)(f_);try{for(i.s();!(A=i.n()).done;){var o=A.value,a=l_(o),s=r[o];if(s&&yH(s)&&(null===(e=null===s||void 0===s?void 0:s.scale)||void 0===e?void 0:e.rangeStep)){var g=s.scale,c=nM(s,["scale"]),I=g,u=(I.rangeStep,nM(I,["rangeStep"]));n[a]={step:g.rangeStep},aT(f.RANGE_STEP_DEPRECATED),r=Object.assign(Object.assign({},r),Object(E.a)({},o,Object.assign(Object.assign({},c),DM(u)?{}:{scale:u})))}}}catch(l){i.e(l)}finally{i.f()}return Object.assign(Object.assign(Object.assign({},n),t),{encoding:r})}}]),t}();function kV(t,e){return e?aH(t)?JV(t,e):MV(t,e):t}function xV(t,e){return e?JV(t,e):t}function OV(t,e,A){var n,r=e[t];return(n=r)&&!Object(U.H)(n)&&"repeat"in n?r.repeat in A?Object.assign(Object.assign({},e),Object(E.a)({},t,A[r.repeat])):void aT(f.noSuchRepeatedValue(r.repeat)):e}function MV(t,e){if(void 0!==(t=OV("field",t,e))){if(null===t)return null;if(IH(t)&&iH(t.sort)){var A=OV("field",t.sort,e);t=Object.assign(Object.assign({},t),A?{sort:A}:{})}return t}}function LV(t,e){if(fH(t))return MV(t,e);var A=OV("datum",t,e);return A===t||A.type||(A.type="nominal"),A}function _V(t,e){if(!yH(t)){if(BH(t)){var A=LV(t.condition,e);if(A)return Object.assign(Object.assign({},t),{condition:A});t.condition;return nM(t,["condition"])}return t}var n=LV(t,e);return n||(CH(t)?{condition:t.condition}:void 0)}function JV(t,e){var A={};for(var n in t)if(Object(U.v)(t,n)){var r=t[n];if(Object(U.A)(r))A[n]=r.map((function(t){return _V(t,e)})).filter((function(t){return t}));else{var i=_V(r,e);void 0!==i&&(A[n]=i)}}return A}var TV=function(){function t(){Object(F.a)(this,t),this.name="RuleForRangedLine"}return Object(w.a)(t,[{key:"hasMatchingType",value:function(t){if(SL(t)){var e=t.encoding;if("line"===t.mark){var A,n=Object(R.a)(s_);try{for(n.s();!(A=n.n()).done;){var r=A.value,i=e[c_(r)];if(e[r]&&(fH(i)&&!N_(i.bin)||QH(i)))return!0}}catch(o){n.e(o)}finally{n.f()}}}return!1}},{key:"run",value:function(t,e,A){var n=t.encoding;return aT(f.lineWithRange(!!n.x2,!!n.y2)),A(Object.assign(Object.assign({},t),{mark:"rule"}),e)}}]),t}();function jV(t){var e=t.parentEncoding,A=t.encoding;if(e&&A){var n=RM(e).reduce((function(t,e){return A[e]&&t.push(e),t}),[]);n.length>0&&aT(f.encodingOverridden(n))}var r=Object.assign(Object.assign({},null!==e&&void 0!==e?e:{}),null!==A&&void 0!==A?A:{});return DM(r)?void 0:r}function HV(t){var e=t.parentProjection,A=t.projection;return e&&A&&aT(f.projectionOverridden({parentProjection:e,projection:A})),null!==A&&void 0!==A?A:e}function YV(t,e){void 0===e&&(e=IV(t.config));var A=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return VV.map(t,{config:e})}(t,e),n=function(t,e,A){var n=e.width,r=e.height,i=SL(t)||fV(t),o={};i?"container"==n&&"container"==r?(o.type="fit",o.contains="padding"):"container"==n?(o.type="fit-x",o.contains="padding"):"container"==r&&(o.type="fit-y",o.contains="padding"):("container"==n&&(aT(f.containerSizeNonSingle("width")),n=void 0),"container"==r&&(aT(f.containerSizeNonSingle("height")),r=void 0));var a=Object.assign(Object.assign(Object.assign({type:"pad"},o),A?ZV(A.autosize):{}),ZV(t.autosize));"fit"!==a.type||i||(aT(f.FIT_NON_SINGLE),a.type="pad");"container"==n&&"fit"!=a.type&&"fit-x"!=a.type&&aT(f.containerSizeNotCompatibleWithAutosize("width"));"container"==r&&"fit"!=a.type&&"fit-y"!=a.type&&aT(f.containerSizeNotCompatibleWithAutosize("height"));if(CM(a,{type:"pad"}))return;return a}(A,{width:t.width,height:t.height,autosize:t.autosize},e);return Object.assign(Object.assign({},A),n?{autosize:n}:{})}var VV=new(function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){var t;return Object(F.a)(this,A),(t=e.apply(this,arguments)).nonFacetUnitNormalizers=[SY,GY,MY,new GV,new TV,new NV],t}return Object(w.a)(A,[{key:"map",value:function(t,e){if(SL(t)){var n=lY(t.encoding,_L),r=lY(t.encoding,JL),i=lY(t.encoding,"facet");if(n||r||i)return this.mapFacetedUnit(t,e)}return Object(QV.a)(Object(dV.a)(A.prototype),"map",this).call(this,t,e)}},{key:"mapUnit",value:function(t,e){var A=e.parentEncoding,n=e.parentProjection,r=Object.assign(Object.assign({},t),{encoding:xV(t.encoding,e.repeater)});if(A||n)return this.mapUnitWithParentEncodingOrProjection(r,e);var i,o=this.mapLayerOrUnit.bind(this),a=Object(R.a)(this.nonFacetUnitNormalizers);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(s.hasMatchingType(r,e.config))return s.run(r,e,o)}}catch(g){a.e(g)}finally{a.f()}return r}},{key:"mapRepeat",value:function(t,e){return function(t){return!Object(U.A)(t.repeat)&&t.repeat.layer}(t)?this.mapLayerRepeat(t,e):this.mapNonLayerRepeat(t,e)}},{key:"mapLayerRepeat",value:function(t,e){var A=this,n=t.repeat,r=t.spec,i=nM(t,["repeat","spec"]),o=n.row,a=n.column,s=n.layer,g=e.repeater,c=void 0===g?{}:g,I=e.repeaterPrefix,u=void 0===I?"":I;return o||a?this.mapRepeat(Object.assign(Object.assign({},t),{repeat:Object.assign(Object.assign({},o?{row:o}:{}),a?{column:a}:{}),spec:{repeat:{layer:s},spec:r}}),e):Object.assign(Object.assign({},i),{layer:s.map((function(t){var n=Object.assign(Object.assign({},c),{layer:t}),i=(r.name||"")+u+"child__layer_".concat(kM(t)),o=A.mapLayerOrUnit(r,Object.assign(Object.assign({},e),{repeater:n,repeaterPrefix:i}));return o.name=i,o}))})}},{key:"mapNonLayerRepeat",value:function(t,e){var A,n=t,r=n.repeat,i=n.spec,o=n.data,a=nM(t,["repeat","spec","data"]);!Object(U.A)(r)&&t.columns&&(t=fM(t,["columns"]),aT(f.columnsNotSupportByRowCol("repeat")));var s,g=[],c=e.repeater,I=void 0===c?{}:c,u=e.repeaterPrefix,l=void 0===u?"":u,C=!Object(U.A)(r)&&r.row||[I?I.row:null],h=!Object(U.A)(r)&&r.column||[I?I.column:null],B=Object(U.A)(r)&&r||[I?I.repeat:null],d=Object(R.a)(B);try{for(d.s();!(s=d.n()).done;){var Q,E=s.value,p=Object(R.a)(C);try{for(p.s();!(Q=p.n()).done;){var y,v=Q.value,m=Object(R.a)(h);try{for(m.s();!(y=m.n()).done;){var b=y.value,F={repeat:E,row:v,column:b,layer:I.layer},w=(i.name||"")+l+"child__"+(Object(U.A)(r)?"".concat(kM(E)):(r.row?"row_".concat(kM(v)):"")+(r.column?"column_".concat(kM(b)):"")),S=this.map(i,Object.assign(Object.assign({},e),{repeater:F,repeaterPrefix:w}));S.name=w,g.push(fM(S,["data"]))}}catch(G){m.e(G)}finally{m.f()}}}catch(G){p.e(G)}finally{p.f()}}}catch(G){d.e(G)}finally{d.f()}var D=Object(U.A)(r)?t.columns:r.column?r.column.length:1;return Object.assign(Object.assign({data:null!==(A=i.data)&&void 0!==A?A:o,align:"all"},a),{columns:D,concat:g})}},{key:"mapFacet",value:function(t,e){return aH(t.facet)&&t.columns&&(t=fM(t,["columns"]),aT(f.columnsNotSupportByRowCol("facet"))),Object(QV.a)(Object(dV.a)(A.prototype),"mapFacet",this).call(this,t,e)}},{key:"mapUnitWithParentEncodingOrProjection",value:function(t,e){var A=t.encoding,n=t.projection,r=e.parentEncoding,i=e.parentProjection,o=e.config,a=HV({parentProjection:i,projection:n}),s=jV({parentEncoding:r,encoding:xV(A,e.repeater)});return this.mapUnit(Object.assign(Object.assign(Object.assign({},t),a?{projection:a}:{}),s?{encoding:s}:{}),{config:o})}},{key:"mapFacetedUnit",value:function(t,e){var A=t.encoding,n=A.row,r=A.column,i=A.facet,o=nM(A,["row","column","facet"]),a=t.mark,s=t.width,g=t.projection,c=t.height,I=t.view,u=t.selection,l=(t.encoding,nM(t,["mark","width","projection","height","view","selection","encoding"])),C=this.getFacetMappingAndLayout({row:n,column:r,facet:i},e),h=C.facetMapping,B=C.layout,f=xV(o,e.repeater);return this.mapFacet(Object.assign(Object.assign(Object.assign({},l),B),{facet:h,spec:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},s?{width:s}:{}),c?{height:c}:{}),I?{view:I}:{}),g?{projection:g}:{}),{mark:a,encoding:f}),u?{selection:u}:{})}),e)}},{key:"getFacetMappingAndLayout",value:function(t,e){var A,n=t.row,r=t.column,i=t.facet;if(n||r){i&&aT(f.facetChannelDropped([].concat(Object(p.a)(n?[_L]:[]),Object(p.a)(r?[JL]:[]))));for(var o={},a={},s=0,g=[_L,JL];s<g.length;s++){var c=g[s],I=t[c];if(I){I.align,I.center,I.spacing,I.columns;var u=nM(I,["align","center","spacing","columns"]);o[c]=u;for(var l=0,C=["align","center","spacing"];l<C.length;l++){var h=C[l];void 0!==I[h]&&(a[h]=null!==(A=a[h])&&void 0!==A?A:{},a[h][c]=I[h])}}}return{facetMapping:o,layout:a}}var B=i.align,d=i.center,Q=i.spacing,E=i.columns;return{facetMapping:kV(nM(i,["align","center","spacing","columns"]),e.repeater),layout:Object.assign(Object.assign(Object.assign(Object.assign({},B?{align:B}:{}),d?{center:d}:{}),Q?{spacing:Q}:{}),E?{columns:E}:{})}}},{key:"mapLayer",value:function(t,e){var n=e.parentEncoding,r=e.parentProjection,i=nM(e,["parentEncoding","parentProjection"]),o=t.encoding,a=t.projection,s=nM(t,["encoding","projection"]),g=Object.assign(Object.assign({},i),{parentEncoding:jV({parentEncoding:n,encoding:o}),parentProjection:HV({parentProjection:r,projection:a})});return Object(QV.a)(Object(dV.a)(A.prototype),"mapLayer",this).call(this,s,g)}}]),A}(EV));function ZV(t){return Object(U.H)(t)?{type:t}:null!==t&&void 0!==t?t:{}}var WV=["background","padding"];function KV(t){return WV.reduce((function(e,A){return t&&void 0!==t[A]&&(e[A]=t[A]),e}),{})}var PV=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(F.a)(this,t),this.explicit=e,this.implicit=A}return Object(w.a)(t,[{key:"clone",value:function(){return new t(hM(this.explicit),hM(this.implicit))}},{key:"combine",value:function(){return Object.assign(Object.assign({},this.explicit),this.implicit)}},{key:"get",value:function(t){return VM(this.explicit[t],this.implicit[t])}},{key:"getWithExplicit",value:function(t){return void 0!==this.explicit[t]?{explicit:!0,value:this.explicit[t]}:void 0!==this.implicit[t]?{explicit:!1,value:this.implicit[t]}:{explicit:!1,value:void 0}}},{key:"setWithExplicit",value:function(t,e){void 0!==e.value&&this.set(t,e.value,e.explicit)}},{key:"set",value:function(t,e,A){return delete this[A?"implicit":"explicit"][t],this[A?"explicit":"implicit"][t]=e,this}},{key:"copyKeyFromSplit",value:function(t,e){void 0!==e.explicit[t]?this.set(t,e.explicit[t],!0):void 0!==e.implicit[t]&&this.set(t,e.implicit[t],!1)}},{key:"copyKeyFromObject",value:function(t,e){void 0!==e[t]&&this.set(t,e[t],!0)}},{key:"copyAll",value:function(t){var e,A=Object(R.a)(RM(t.combine()));try{for(A.s();!(e=A.n()).done;){var n=e.value,r=t.getWithExplicit(n);this.setWithExplicit(n,r)}}catch(i){A.e(i)}finally{A.f()}}}]),t}();function qV(t){return{explicit:!0,value:t}}function XV(t){return{explicit:!1,value:t}}function zV(t){return function(e,A,n,r){var i=t(e.value,A.value);return i>0?e:i<0?A:$V(e,A,n,r)}}function $V(t,e,A,n){return t.explicit&&e.explicit&&aT(f.mergeConflictingProperty(A,n,t.value,e.value)),t}function tZ(t,e,A,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:$V;return void 0===t||void 0===t.value?e:t.explicit&&!e.explicit?t:e.explicit&&!t.explicit?e:CM(t.value,e.value)?t:r(t,e,A,n)}var eZ=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(F.a)(this,A),(t=e.call(this,n,r)).explicit=n,t.implicit=r,t.parseNothing=i,t}return Object(w.a)(A,[{key:"clone",value:function(){var t=Object(QV.a)(Object(dV.a)(A.prototype),"clone",this).call(this);return t.parseNothing=this.parseNothing,t}}]),A}(PV);function AZ(t){return"url"in t}function nZ(t){return"values"in t}function rZ(t){return"name"in t&&!AZ(t)&&!nZ(t)&&!iZ(t)}function iZ(t){return t&&(oZ(t)||aZ(t)||sZ(t))}function oZ(t){return"sequence"in t}function aZ(t){return"sphere"in t}function sZ(t){return"graticule"in t}var gZ="main";function cZ(t){return"filter"in t}function IZ(t){return"lookup"in t}function uZ(t){return"pivot"in t}function lZ(t){return"density"in t}function CZ(t){return"quantile"in t}function hZ(t){return"regression"in t}function BZ(t){return"loess"in t}function fZ(t){return"sample"in t}function dZ(t){return"window"in t}function QZ(t){return"joinaggregate"in t}function EZ(t){return"flatten"in t}function pZ(t){return"calculate"in t}function yZ(t){return"bin"in t}function vZ(t){return"impute"in t}function mZ(t){return"timeUnit"in t}function bZ(t){return"aggregate"in t}function FZ(t){return"stack"in t}function wZ(t){return"fold"in t}function SZ(t,e,A,n){var r=CH(e)&&e.condition,i=n(e);if(r){var o=Object(U.i)(r).map((function(e){var A=n(e),r=function(t){return t.selection}(e)?_W(t,e.selection):TW(t,e.test);return Object.assign({test:r},A)}));return Object(E.a)({},A,[].concat(Object(p.a)(o),Object(p.a)(void 0!==i?[i]:[])))}return void 0!==i?Object(E.a)({},A,i):{}}function DZ(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",A=t.encoding[e];return SZ(t,A,e,(function(e){return RZ(e,t.config)}))}function RZ(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"datum";if(t){if(mH(t))return eY(t.value);if(yH(t)){var n=TH(t),r=n.format,i=n.formatType;return Wj({fieldOrDatumDef:t,format:r,formatType:i,expr:A,config:e})}}}function UZ(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=t.encoding,n=t.markDef,r=t.config,i=t.stack,o=A.tooltip;if(Object(U.A)(o))return{tooltip:NZ({tooltip:o},i,r,e)};var a=e.reactiveGeom?"datum.datum":"datum";return SZ(t,o,"tooltip",(function(t){var o=RZ(t,r,a);if(o)return o;if(null!==t){var s=iY("tooltip",n,r);return!0===s&&(s={content:"encoding"}),Object(U.H)(s)?{value:s}:Object(U.F)(s)?"encoding"===s.content?NZ(A,i,r,e):{signal:a}:void 0}}))}function GZ(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.reactiveGeom,i={},o=r?"datum.datum":"datum",a=[];function s(n,r){var s,g=c_(r),c=vH(n)?n:Object.assign(Object.assign({},n),{type:t[g].type}),I=Object(U.i)(LH(c,A,{allowDisabling:!1})).join(", ");if(d_(r)){var u="x"===r?"x2":"y2",l=jH(t[u]);if(N_(c.bin)&&l){var C=RH(c,{expr:o}),h=RH(l,{expr:o}),B=TH(c);s=eH(C,h,B.format,B.formatType,A),i[u]=!0}else if(e&&e.fieldChannel===r&&"normalize"===e.offset){var f=TH(c);s=Wj({fieldOrDatumDef:c,format:f.format,formatType:f.formatType,expr:o,config:A,normalizeStack:!0}).signal}}s=null!==s&&void 0!==s?s:RZ(c,A,o).signal,a.push({channel:r,key:I,value:s})}dY(t,(function(t,e){fH(t)?s(t,e):hH(t)&&s(t.condition,e)}));for(var g={},c=0,I=a;c<I.length;c++){var u=I[c],l=u.channel,C=u.key,h=u.value;i[l]||g[C]||(g[Object(U.Z)(C)]=h)}return g}function NZ(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n.reactiveGeom,i=GZ(t,e,A,{reactiveGeom:r}),o=GM(i).map((function(t){var e=t.key,A=t.value;return"".concat(e,": ").concat(A)}));return o.length>0?{signal:"{".concat(o.join(", "),"}")}:void 0}function kZ(t){var e=iY("aria",t.markDef,t.config);return!1===e?{}:Object.assign(Object.assign(Object.assign({},e?{aria:e}:{}),function(t){var e=t.mark,A=t.markDef,n=t.config;if(!1===n.aria)return{};var r=iY("ariaRoleDescription",A,n);if(null!=r)return{ariaRoleDescription:{value:r}};return e in UT?{}:{ariaRoleDescription:{value:e}}}(t)),function(t){var e=t.encoding,A=t.markDef,n=t.config,r=t.stack,i=e.description;if(i)return SZ(t,i,"description",(function(e){return RZ(e,t.config)}));var o=iY("description",A,n);if(null!=o)return{description:eY(o)};if(!1===n.aria)return{};var a=GZ(e,r,n);if(DM(a))return;return{description:{signal:GM(a).map((function(t){var e=t.key,A=t.value;return"".concat(e,' + ": " + (').concat(A,")")})).join(' + "; " + ')}}}(t))}function xZ(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e.markDef,r=e.encoding,i=e.config,o=A.vgChannel,a=A.defaultRef,s=A.defaultValue;void 0===a&&void 0!==(s=null!==s&&void 0!==s?s:iY(t,n,i,{vgChannel:o,ignoreVgConfig:!0}))&&(a=eY(s));var g=r[t];return SZ(e,g,null!==o&&void 0!==o?o:t,(function(A){return Hj({channel:t,channelDef:A,markDef:n,config:i,scaleName:e.scaleName(t),scale:e.getScaleComponent(t),stack:null,defaultRef:a})}))}function OZ(t){var e,A,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{filled:void 0},o=t.markDef,a=t.encoding,s=t.config,g=o.type,c=null!==(e=i.filled)&&void 0!==e?e:iY("filled",o,s),I=pM(["bar","point","circle","square","geoshape"],g)?"transparent":void 0,u=null!==(n=null!==(A=iY(!0===c?"color":void 0,o,s,{vgChannel:"fill"}))&&void 0!==A?A:s.mark[!0===c&&"color"])&&void 0!==n?n:I,l=null!==(r=iY(!1===c?"color":void 0,o,s,{vgChannel:"stroke"}))&&void 0!==r?r:s.mark[!1===c&&"color"],C=c?"fill":"stroke",h=Object.assign(Object.assign({},u?{fill:eY(u)}:{}),l?{stroke:eY(l)}:{});return o.color&&(c?o.fill:o.stroke)&&aT(f.droppingColor("property",{fill:"fill"in o,stroke:"stroke"in o})),Object.assign(Object.assign(Object.assign(Object.assign({},h),xZ("color",t,{vgChannel:C,defaultValue:c?u:l})),xZ("fill",t,{defaultValue:a.fill?u:void 0})),xZ("stroke",t,{defaultValue:a.stroke?l:void 0}))}function MZ(t,e){var A=e[function(t){switch(t){case"x":return"xOffset";case"y":return"yOffset";case"x2":return"x2Offset";case"y2":return"y2Offset";case jL:return"thetaOffset";case TL:return"radiusOffset";case HL:return"theta2Offset";case"radius2":return"radius2Offset"}}(t)];if(A)return A}function LZ(t,e,A){var n=A.defaultPos,r=A.vgChannel,i=A.isMidPoint,o=e.encoding,a=e.markDef,s=e.config,g=e.stack,c=o[t],I=o[u_(t)],u=e.scaleName(t),l=e.getScaleComponent(t),C=MZ(t,a),h=_Z({model:e,defaultPos:n,channel:t,scaleName:u,scale:l}),B=!c&&d_(t)&&(o.latitude||o.longitude)?{field:e.getName(t)}:function(t){var e=t.channel,A=t.channelDef,n=t.isMidPoint,r=t.scaleName,i=t.stack,o=t.offset,a=t.markDef,s=t.config;if(yH(A)&&i&&e===i.fieldChannel){if(fH(A)){var g=uH({channel:e,fieldDef:A,isMidPoint:n,markDef:a,stack:i,config:s});if(void 0!==g)return jj({scaleName:r,fieldOrDatumDef:A,startSuffix:"start",band:g,offset:o})}return Tj(A,r,{suffix:"end"},{offset:o})}return Mj(t)}({channel:t,channelDef:c,channel2Def:I,markDef:a,config:s,isMidPoint:i,scaleName:u,scale:l,stack:g,offset:C,defaultRef:h});return B?Object(E.a)({},r||t,B):void 0}function _Z(t){var e=t.model,A=t.defaultPos,n=t.channel,r=t.scaleName,i=t.scale,o=e.markDef,a=e.config;return function(){var t=c_(n),s=I_(n),g=iY(n,o,a,{vgChannel:s});if(void 0!==g)return Yj(n,g);switch(A){case"zeroOrMin":case"zeroOrMax":if(r){var c=i.get("type");if(pM([ej,ij,oj],c));else if(i.domainDefinitelyIncludesZero())return{scale:r,value:0}}if("zeroOrMin"===A)return"y"===t?{field:{group:"height"}}:{value:0};switch(t){case"radius":return{signal:"min(".concat(e.width.signal,",").concat(e.height.signal,")/2")};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":var I=e[l_(n)];return Object.assign(Object.assign({},I),{mult:.5})}}}var JZ={left:"x",center:"xc",right:"x2"},TZ={top:"y",middle:"yc",bottom:"y2"};function jZ(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"middle";if("radius"===t||"theta"===t)return I_(t);var r="x"===t?"align":"baseline",i=iY(r,e,A);return"x"===t?JZ[i||("top"===n?"left":"center")]:TZ[i||n]}function HZ(t,e,A){var n=A.defaultPos,r=A.defaultPos2;return A.range?YZ(t,e,{defaultPos:n,defaultPos2:r}):LZ(t,e,{defaultPos:n})}function YZ(t,e,A){var n=A.defaultPos,r=A.defaultPos2,i=e.markDef,o=e.config,a=u_(t),s=l_(t),g=function(t,e,A){var n,r=t.encoding,i=t.mark,o=t.markDef,a=t.stack,s=t.config,g=c_(A),c=l_(A),I=I_(A),u=r[g],l=t.scaleName(g),C=t.getScaleComponent(g),h=MZ(A in r||A in o?A:g,t.markDef);if(!u&&("x2"===A||"y2"===A)&&(r.latitude||r.longitude))return Object(E.a)({},I,{field:t.getName(A)});var B=function(t){var e=t.channel,A=t.channelDef,n=t.channel2Def,r=t.markDef,i=t.config,o=t.scaleName,a=t.scale,s=t.stack,g=t.offset,c=t.defaultRef;if(yH(A)&&s&&e.charAt(0)===s.fieldChannel.charAt(0))return Tj(A,o,{suffix:"start"},{offset:g});return Mj({channel:e,channelDef:n,scaleName:o,scale:a,stack:s,markDef:r,config:i,offset:g,defaultRef:c})}({channel:A,channelDef:u,channel2Def:r[A],markDef:o,config:s,scaleName:l,scale:C,stack:a,offset:h,defaultRef:void 0});if(void 0!==B)return Object(E.a)({},I,B);return VZ(A,o)||VZ(A,(n={},Object(E.a)(n,A,aY(A,o,s.style)),Object(E.a)(n,c,aY(c,o,s.style)),n))||VZ(A,s[i])||VZ(A,s.mark)||Object(E.a)({},I,_Z({model:t,defaultPos:e,channel:A,scaleName:l,scale:C})())}(e,r,a),c=g[s]?jZ(t,i,o):I_(t);return Object.assign(Object.assign({},LZ(t,e,{defaultPos:n,vgChannel:c})),g)}function VZ(t,e){var A=l_(t),n=I_(t);return void 0!==e[n]?Object(E.a)({},n,Yj(t,e[n])):void 0!==e[t]?Object(E.a)({},n,Yj(t,e[t])):e[A]?Object(E.a)({},A,Yj(t,e[A])):void 0}function ZZ(t,e,A){var n,r,i,o,a=t.config,s=t.encoding,g=t.markDef,c=t.stack,I=u_(e),u=l_(e),l=s[e],C=s[I],h=t.getScaleComponent(e),B=h?h.get("type"):void 0,d=t.scaleName(e),Q=g.orient,p=null!==(r=null!==(n=s[u])&&void 0!==n?n:s.size)&&void 0!==r?r:iY("size",g,a,{vgChannel:u}),y="bar"===A&&("x"===e?"vertical"===Q:"horizontal"===Q);if(fH(l)&&(G_(l.bin)||N_(l.bin)||l.timeUnit&&!C)&&!p&&!mj(B)){var v=uH({channel:e,fieldDef:l,stack:c,markDef:g,config:a}),m=null===(i=t.component.axes[e])||void 0===i?void 0:i[0];return function(t){var e,A=t.fieldDef,n=t.fieldDef2,r=t.channel,i=t.band,o=t.scaleName,a=t.markDef,s=t.spacing,g=void 0===s?0:s,c=t.axisTranslate,I=t.reverse,u=t.config,l=u_(r),C=I_(r),h=I_(l),B=MZ(r,a);if(G_(A.bin)||A.timeUnit)return e={},Object(E.a)(e,h,KZ({channel:r,fieldDef:A,scaleName:o,markDef:a,band:(1-i)/2,offset:WZ(l,g,I,c,B),config:u})),Object(E.a)(e,C,KZ({channel:r,fieldDef:A,scaleName:o,markDef:a,band:1-(1-i)/2,offset:WZ(r,g,I,c,B),config:u})),e;if(N_(A.bin)){var d,Q,p=Tj(A,o,{},{offset:WZ(l,g,I,c,B)});if(fH(n))return d={},Object(E.a)(d,h,p),Object(E.a)(d,C,Tj(n,o,{},{offset:WZ(r,g,I,c,B)})),d;if(k_(A.bin)&&A.bin.step)return Q={},Object(E.a)(Q,h,p),Object(E.a)(Q,C,{signal:'scale("'.concat(o,'", ').concat(RH(A,{expr:"datum"})," + ").concat(A.bin.step,")"),offset:WZ(r,g,I,c,B)}),Q}return void aT(f.channelRequiredForBinned(l))}({fieldDef:l,fieldDef2:C,channel:e,markDef:g,scaleName:d,band:v,axisTranslate:null!==(o=null===m||void 0===m?void 0:m.get("translate"))&&void 0!==o?o:.5,spacing:d_(e)?iY("binSpacing",g,a):void 0,reverse:h.get("reverse"),config:a})}return(yH(l)&&mj(B)||y)&&!C?function(t,e,A,n){var r,i,o=n.markDef,a=n.encoding,s=n.config,g=n.stack,c=o.orient,I=n.scaleName(A),u=n.getScaleComponent(A),l=l_(A),C=u_(A),h="horizontal"===c&&"y"===A||"vertical"===c&&"x"===A,B=iY(h?"size":l,o,s,{vgChannel:l});(a.size||void 0!==B)&&(h?i=xZ("size",n,{vgChannel:l,defaultValue:B}):aT(f.cannotApplySizeToNonOrientedMark(o.type)));var d=null!==(r=yH(e)?uH({channel:A,fieldDef:e,markDef:o,stack:g,config:s}):void 0)&&void 0!==r?r:1;i=i||Object(E.a)({},l,function(t,e,A,n,r,i){if(n){var o=n.get("type");if("point"===o||"band"===o){if(void 0!==r[t].discreteBandSize)return{value:r[t].discreteBandSize};if(o===cj){var a=n.get("range");return ST(a)&&Object(U.E)(a.step)?{value:a.step-2}:{value:nV-2}}return{scale:A,band:i}}return{value:r[t].continuousBandSize}}var s=eV(r.view,e),g=VM(r[t].discreteBandSize,s-2);return void 0!==g?{value:g}:void 0}(t,l,I,u,s,d));var Q="band"!==(null===u||void 0===u?void 0:u.get("type"))||!("band"in i[l]),p=jZ(A,o,s,Q?"middle":"top"),y=MZ(A,o),v=Mj({channel:A,channelDef:e,markDef:o,config:s,scaleName:I,scale:u,stack:g,offset:y,defaultRef:_Z({model:n,defaultPos:"mid",channel:A,scaleName:I,scale:u}),band:Q?.5:(1-d)/2});if(l)return Object.assign(Object(E.a)({},p,v),i);var m,b=I_(C),F=i[l],w=y?Object.assign(Object.assign({},F),{offset:y}):F;return m={},Object(E.a)(m,p,v),Object(E.a)(m,b,Object(U.A)(v)?[v[0],Object.assign(Object.assign({},v[1]),{offset:w})]:Object.assign(Object.assign({},v),{offset:w})),m}(A,l,e,t):YZ(e,t,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"})}function WZ(t,e,A,n,r){if(qL(t))return 0;var i="x"===t||"y2"===t?-e/2:e/2;if(wT(A)){var o=nY(r);return{signal:"".concat(A.signal," ? ").concat(n-i).concat(o?"-"+o:""," : ").concat(n+i).concat(o?"+"+o:"")}}if(wT(r)){var a=n+(A?-i:i);return{signal:"".concat(a||"").concat(A?" - ":a?" + ":"").concat(r.signal)}}return r=r||0,n+(A?-r-i:+r+i)}function KZ(t){var e=t.channel,A=t.fieldDef,n=t.scaleName,r=t.markDef,i=t.band,o=t.offset,a=t.config;return Lj({fieldDef:A,channel:e,markDef:r,ref:jj({scaleName:n,fieldOrDatumDef:A,band:i,offset:o}),config:a})}var PZ=new Set(["aria"]);function qZ(t,e){var A="include"===e.color?OZ(t):{},n=A.fill,r=void 0===n?void 0:n,i=A.stroke,o=void 0===i?void 0:i;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},function(t,e){return RT.reduce((function(A,n){return PZ.has(n)||void 0===t[n]||"ignore"===e[n]||(A[n]=eY(t[n])),A}),{})}(t.markDef,e)),XZ(t,"fill",r)),XZ(t,"stroke",o)),xZ("opacity",t)),xZ("fillOpacity",t)),xZ("strokeOpacity",t)),xZ("strokeWidth",t)),xZ("strokeDash",t)),UZ(t)),DZ(t,"href")),kZ(t))}function XZ(t,e,A){var n=t.config,r=t.mark;if("hide"===iY("invalid",t.markDef,n)&&A&&!QL(r)){var i=function(t,e){var A=e.invalid,n=void 0!==A&&A,r=e.channels.reduce((function(e,A){var n=t.getScaleComponent(A);if(n){var r=n.get("type"),i=t.vgField(A,{expr:"datum"});i&&bj(r)&&(e[i]=!0)}return e}),{}),i=RM(r);if(i.length>0){var o=n?"||":"&&";return i.map((function(t){return Jj(t,n)})).join(" ".concat(o," "))}return}(t,{invalid:!0,channels:b_});if(i)return Object(E.a)({},e,[{test:i,value:null}].concat(Object(p.a)(Object(U.i)(A))))}return A?Object(E.a)({},e,A):{}}function zZ(t){var e=t.config;if(iY("invalid",t.markDef,e)){var A=function(t,e){var A=e.invalid,n=void 0!==A&&A,r=e.channels.reduce((function(e,A){var n=t.getScaleComponent(A);if(n){var r=n.get("type"),i=t.vgField(A,{expr:"datum"});i&&bj(r)&&(e[i]=!0)}return e}),{}),i=RM(r);if(i.length>0){var o=n?"||":"&&";return i.map((function(t){return Jj(t,n)})).join(" ".concat(o," "))}return}(t,{channels:f_});if(A)return{defined:{signal:A}}}return{}}function $Z(t,e){if(void 0!==e)return Object(E.a)({},t,eY(e))}var tW={has:function(t){return"interval"!==t.type&&t.nearest},parse:function(t,e){if(e.events){var A,n=Object(R.a)(e.events);try{for(n.s();!(A=n.n()).done;){A.value.markname=t.getName("voronoi")}}catch(r){n.e(r)}finally{n.f()}}},marks:function(t,e,A){var n=e.project.hasChannel,r=n.x,i=n.y,o=t.mark;if(QL(o))return aT(f.nearestNotSupportForContinuous(o)),A;var a={name:t.getName("voronoi"),type:"path",interactive:!0,from:{data:t.getName("marks")},encode:{update:Object.assign({fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0}},UZ(t,{reactiveGeom:!0}))},transform:[{type:"voronoi",x:{expr:r||!i?"datum.datum.x || 0":"0"},y:{expr:i||!r?"datum.datum.y || 0":"0"},size:[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]}]},s=0,g=!1;return A.forEach((function(e,A){var n,r=null!==(n=e.name)&&void 0!==n?n:"";r===t.component.mark[0].name?s=A:r.indexOf("voronoi")>=0&&(g=!0)})),g||A.splice(s+1,0,a),A}},eW=function(){function t(e,A){Object(F.a)(this,t),this.debugName=A,this._children=[],this._parent=null,e&&(this.parent=e)}return Object(w.a)(t,[{key:"clone",value:function(){throw new Error("Cannot clone node")}},{key:"numChildren",value:function(){return this._children.length}},{key:"addChild",value:function(t,e){this._children.indexOf(t)>-1?console.warn("Attempt to add the same child twice."):void 0!==e?this._children.splice(e,0,t):this._children.push(t)}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return this._children.splice(e,1),e}},{key:"remove",value:function(){var t,e=this._parent.removeChild(this),A=Object(R.a)(this._children);try{for(A.s();!(t=A.n()).done;){var n=t.value;n._parent=this._parent,this._parent.addChild(n,e++)}}catch(r){A.e(r)}finally{A.f()}}},{key:"insertAsParentOf",value:function(t){var e=t.parent;e.removeChild(this),this.parent=e,t.parent=this}},{key:"swapWithParent",value:function(){var t,e=this._parent,A=e.parent,n=Object(R.a)(this._children);try{for(n.s();!(t=n.n()).done;){t.value.parent=e}}catch(r){n.e(r)}finally{n.f()}this._children=[],e.removeChild(this),e.parent.removeChild(e),this.parent=A,e.parent=this}},{key:"parent",get:function(){return this._parent},set:function(t){this._parent=t,t&&t.addChild(this)}},{key:"children",get:function(){return this._children}}]),t}(),AW=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r,i){var o;return Object(F.a)(this,A),(o=e.call(this,t,n)).type=r,o.refCounts=i,o._source=o._name=n,o.refCounts&&!(o._name in o.refCounts)&&(o.refCounts[o._name]=0),o}return Object(w.a)(A,[{key:"clone",value:function(){var t=new this.constructor;return t.debugName="clone_"+this.debugName,t._source=this._source,t._name="clone_"+this._name,t.type=this.type,t.refCounts=this.refCounts,t.refCounts[t._name]=0,t}},{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(WM())),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(t){this._source=t}}]),A}(eW),nW=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).formula=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.formula))}},{key:"merge",value:function(t){for(var e in this.formula=Object.assign({},this.formula),t.formula)this.formula[e]&&!t.formula[e].band||(this.formula[e]=t.formula[e]);var A,n=Object(R.a)(t.children);try{for(n.s();!(A=n.n()).done;){var r=A.value;t.removeChild(r),r.parent=this}}catch(i){n.e(i)}finally{n.f()}t.remove()}},{key:"producedFields",value:function(){return new Set(UM(this.formula).map((function(t){return t.as})))}},{key:"dependentFields",value:function(){return new Set(UM(this.formula).map((function(t){return t.field})))}},{key:"hash",value:function(){return"TimeUnit ".concat(QM(this.formula))}},{key:"assemble",value:function(){var t,e=[],A=Object(R.a)(UM(this.formula));try{for(A.s();!(t=A.n()).done;){var n=t.value,r=n.field,i=n.as,o=bT(n.timeUnit),a=o.unit,s=o.utc,g=nM(o,["unit","utc"]);e.push(Object.assign(Object.assign(Object.assign(Object.assign({field:TM(r),type:"timeunit"},a?{units:pT(a)}:{}),s?{timezone:"utc"}:{}),g),{as:[i,"".concat(i,"_end")]}))}}catch(c){A.e(c)}finally{A.f()}return e}}],[{key:"makeFromEncoding",value:function(t,e){var n=e.reduceFieldDef((function(t,A,n){var r=A.field,i=A.timeUnit,o=Bq(e)?e.encoding[u_(n)]:void 0,a=Bq(e)&&lH(n,A,o,e.stack,e.markDef,e.config);if(i){var s=RH(A,{forAs:!0});t[QM({as:s,field:r,timeUnit:i})]=Object.assign({as:s,field:r,timeUnit:i},a?{band:!0}:{})}return t}),{});return DM(n)?null:new A(t,n)}},{key:"makeFromTransform",value:function(t,e){var n=Object.assign({},e),r=n.timeUnit,i=nM(n,["timeUnit"]),o=bT(r),a=Object.assign(Object.assign({},i),{timeUnit:o});return new A(t,Object(E.a)({},QM(a),a))}}]),A}(eW),rW=function t(){Object(F.a)(this,t);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];this.items=A,this.hasChannel={},this.hasField={}},iW={has:function(t){return"single"===t.type&&"global"===t.resolve&&t.bind&&"scales"!==t.bind&&!ZY(t.bind)},parse:function(t,e,A,n){n.on||delete e.events,n.clear||delete e.clear},topLevelSignals:function(t,e,A){var n=e.name,r=e.project,i=e.bind,o=e.init&&e.init[0],a=tW.has(e)?"(item().isVoronoi ? datum.datum : datum)":"datum";return r.items.forEach((function(t,r){var s,g,c=kM("".concat(n,"_").concat(t.field));A.filter((function(t){return t.name===c})).length||A.unshift(Object.assign(Object.assign({name:c},o?{init:QW(o[r])}:{value:null}),{on:e.events?[{events:e.events,update:"datum && item().mark.marktype !== 'group' ? ".concat(a,"[").concat(Object(U.Z)(t.field),"] : null")}]:[],bind:null!==(g=null!==(s=i[t.field])&&void 0!==s?s:i[t.channel])&&void 0!==g?g:i}))})),A},signals:function(t,e,A){var n=e.name,r=e.project,i=A.filter((function(t){return t.name===n+DW}))[0],o=n+"_tuple_fields",a=r.items.map((function(t){return kM("".concat(n,"_").concat(t.field))})),s=a.map((function(t){return"".concat(t," !== null")})).join(" && ");return a.length&&(i.update="".concat(s," ? {fields: ").concat(o,", values: [").concat(a.join(", "),"]} : null")),delete i.value,delete i.on,A}},oW={has:function(t){return"multi"===t.type&&!!t.toggle},signals:function(t,e,A){return A.concat({name:e.name+"_toggle",value:!1,on:[{events:e.events,update:e.toggle}]})},modifyExpr:function(t,e){var A=e.name+DW,n=e.name+"_toggle";return"".concat(n," ? null : ").concat(A,", ")+("global"===e.resolve?"".concat(n," ? null : true, "):"".concat(n," ? null : {unit: ").concat(xW(t),"}, "))+"".concat(n," ? ").concat(A," : null")}},aW={has:function(t){return void 0!==t.clear&&!1!==t.clear},parse:function(t,e,A){A.clear&&(e.clear=Object(U.H)(A.clear)?Ek(A.clear,"scope"):A.clear)},topLevelSignals:function(t,e,A){if(iW.has(e)){var n,r=Object(R.a)(e.project.items);try{var i=function(){var t=n.value,r=A.findIndex((function(A){return A.name===kM("".concat(e.name,"_").concat(t.field))}));-1!==r&&A[r].on.push({events:e.clear,update:"null"})};for(r.s();!(n=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}}return A},signals:function(t,e,A){function n(t,n){-1!==t&&A[t].on&&A[t].on.push({events:e.clear,update:n})}if("interval"===e.type){var r,i=Object(R.a)(e.project.items);try{var o=function(){var t=r.value,e=A.findIndex((function(e){return e.name===t.signals.visual}));(n(e,"[0, 0]"),-1===e)&&n(A.findIndex((function(e){return e.name===t.signals.data})),"null")};for(i.s();!(r=i.n()).done;)o()}catch(s){i.e(s)}finally{i.f()}}else{var a=A.findIndex((function(t){return t.name===e.name+DW}));n(a,"null"),oW.has(e)&&n(a=A.findIndex((function(t){return t.name===e.name+"_toggle"})),"false")}return A}},sW={has:function(t){return"interval"===t.type&&"global"===t.resolve&&t.bind&&"scales"===t.bind},parse:function(t,e){var A,n=e.scales=[],r=Object(R.a)(e.project.items);try{for(r.s();!(A=r.n()).done;){var i=A.value,o=i.channel;if(F_(o)){var a=t.getScaleComponent(o),s=a?a.get("type"):void 0;if(a&&bj(s)){var g={selection:e.name,field:i.field};a.set("selectionExtent",g,!0),n.push(i)}else aT(f.SCALE_BINDINGS_CONTINUOUS)}}}catch(c){r.e(c)}finally{r.f()}},topLevelSignals:function(t,e,A){var n=e.scales.filter((function(t){return 0===A.filter((function(e){return e.name===t.signals.data})).length}));if(!t.parent||cW(t)||0===n.length)return A;var r=A.filter((function(t){return t.name===e.name}))[0],i=r.update;if(i.indexOf(UW)>=0)r.update="{".concat(n.map((function(t){return"".concat(Object(U.Z)(t.field),": ").concat(t.signals.data)})).join(", "),"}");else{var o,a=Object(R.a)(n);try{for(a.s();!(o=a.n()).done;){var s=o.value,g="".concat(Object(U.Z)(s.field),": ").concat(s.signals.data);i.indexOf(g)<0&&(i="".concat(i.substring(0,i.length-1),", ").concat(g,"}"))}}catch(c){a.e(c)}finally{a.f()}r.update=i}return A.concat(n.map((function(t){return{name:t.signals.data}})))},signals:function(t,e,A){if(t.parent&&!cW(t)){var n,r=Object(R.a)(e.scales);try{var i=function(){var t=n.value,e=A.filter((function(e){return e.name===t.signals.data}))[0];e.push="outer",delete e.value,delete e.update};for(r.s();!(n=r.n()).done;)i()}catch(o){r.e(o)}finally{r.f()}}return A}};function gW(t,e){var A=Object(U.Z)(t.scaleName(e));return"domain(".concat(A,")")}function cW(t){var e;return t.parent&&Qq(t.parent)&&(null!==(e=!t.parent.parent)&&void 0!==e?e:cW(t.parent.parent))}var IW={has:function(t){var e="global"===t.resolve&&t.bind&&ZY(t.bind),A=1===t.project.items.length&&"_vgsid_"!==t.project.items[0].field;return e&&!A&&aT(f.LEGEND_BINDINGS_PROJECT_LENGTH),e&&A},parse:function(t,e,A,n){var r;if(n.on||delete e.events,n.clear||delete e.clear,n.on||n.clear){var i,o='event.item && indexof(event.item.mark.role, "legend") < 0',a=Object(R.a)(e.events);try{for(a.s();!(i=a.n()).done;){var s=i.value;s.filter=Object(U.i)(null!==(r=s.filter)&&void 0!==r?r:[]),s.filter.indexOf(o)<0&&s.filter.push(o)}}catch(I){a.e(I)}finally{a.f()}}var g=WY(e.bind)?e.bind.legend:"click",c=Object(U.H)(g)?Ek(g,"view"):Object(U.i)(g);e.bind={legend:{merge:c}}},topLevelSignals:function(t,e,A){var n,r=e.name,i=WY(e.bind)&&e.bind.legend,o=function(t){return function(e){var A=hM(e);return A.markname=t,A}},a=Object(R.a)(e.project.items);try{var s=function(){var t=n.value;if(!t.hasLegend)return"continue";var a="".concat(kM(t.field),"_legend"),s="".concat(r,"_").concat(a);if(0===A.filter((function(t){return t.name===s})).length){var g=i.merge.map(o("".concat(a,"_symbols"))).concat(i.merge.map(o("".concat(a,"_labels")))).concat(i.merge.map(o("".concat(a,"_entries"))));A.unshift(Object.assign(Object.assign({name:s},e.init?{}:{value:null}),{on:[{events:g,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:i.merge,update:"!event.item || !datum ? null : ".concat(s),force:!0}]}))}};for(a.s();!(n=a.n()).done;)s()}catch(g){a.e(g)}finally{a.f()}return A},signals:function(t,e,A){var n=e.name,r=e.project,i=A.find((function(t){return t.name===n+DW})),o=n+"_tuple_fields",a=r.items.filter((function(t){return t.hasLegend})).map((function(t){return kM("".concat(n,"_").concat(kM(t.field),"_legend"))})),s=a.map((function(t){return"".concat(t," !== null")})).join(" && "),g="".concat(s," ? {fields: ").concat(o,", values: [").concat(a.join(", "),"]} : null");e.events&&a.length>0?i.on.push({events:a.map((function(t){return{signal:t}})),update:g}):a.length>0&&(i.update=g,delete i.value,delete i.on);var c=A.find((function(t){return t.name===n+"_toggle"})),I=WY(e.bind)&&e.bind.legend;return c&&(e.events?c.on.push(Object.assign(Object.assign({},c.on[0]),{events:I})):c.on[0].events=I),A}};var uW="_translate_delta",lW={has:function(t){return"interval"===t.type&&t.translate},signals:function(t,e,A){var n=e.name,r=sW.has(e),i=n+"_translate_anchor",o=e.project.hasChannel,a=o.x,s=o.y,g=Ek(e.translate,"scope");return r||(g=g.map((function(t){return t.between[0].markname=n+yW,t}))),A.push({name:i,value:{},on:[{events:g.map((function(t){return t.between[0]})),update:"{x: x(unit), y: y(unit)"+(void 0!==a?", extent_x: "+(r?gW(t,"x"):"slice(".concat(a.signals.visual,")")):"")+(void 0!==s?", extent_y: "+(r?gW(t,"y"):"slice(".concat(s.signals.visual,")")):"")+"}"}]},{name:n+uW,value:{},on:[{events:g,update:"{x: ".concat(i,".x - x(unit), y: ").concat(i,".y - y(unit)}")}]}),void 0!==a&&CW(t,e,a,"width",A),void 0!==s&&CW(t,e,s,"height",A),A}};function CW(t,e,A,n,r){var i,o=e.name,a=o+"_translate_anchor",s=o+uW,g=A.channel,c=sW.has(e),I=r.filter((function(t){return t.name===A.signals[c?"data":"visual"]}))[0],u=t.getSizeSignalRef(n).signal,l=t.getScaleComponent(g),C=l.get("type"),h=c&&"x"===g?"-":"",B="".concat(a,".extent_").concat(g),f="".concat(h).concat(s,".").concat(g," / ")+(c?"".concat(u):"span(".concat(B,")")),d="".concat(c?"log"===C?"panLog":"pow"===C?"panPow":"panLinear":"panLinear","(").concat(B,", ").concat(f)+(c&&"pow"===C?", ".concat(null!==(i=l.get("exponent"))&&void 0!==i?i:1):"")+")";I.on.push({events:{signal:s},update:c?d:"clampRange(".concat(d,", 0, ").concat(u,")")})}var hW={has:function(t){return"interval"===t.type&&t.zoom},signals:function(t,e,A){var n=e.name,r=sW.has(e),i=n+"_zoom_delta",o=e.project.hasChannel,a=o.x,s=o.y,g=Object(U.Z)(t.scaleName("x")),c=Object(U.Z)(t.scaleName("y")),I=Ek(e.zoom,"scope");return r||(I=I.map((function(t){return t.markname=n+yW,t}))),A.push({name:n+"_zoom_anchor",on:[{events:I,update:r?"{"+[g?"x: invert(".concat(g,", x(unit))"):"",c?"y: invert(".concat(c,", y(unit))"):""].filter((function(t){return!!t})).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:i,on:[{events:I,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==a&&BW(t,e,a,"width",A),void 0!==s&&BW(t,e,s,"height",A),A}};function BW(t,e,A,n,r){var i,o=e.name,a=A.channel,s=sW.has(e),g=r.filter((function(t){return t.name===A.signals[s?"data":"visual"]}))[0],c=t.getSizeSignalRef(n).signal,I=t.getScaleComponent(a),u=I.get("type"),l=s?gW(t,a):g.name,C=o+"_zoom_delta",h="".concat(o).concat("_zoom_anchor",".").concat(a),B="".concat(s?"log"===u?"zoomLog":"pow"===u?"zoomPow":"zoomLinear":"zoomLinear","(").concat(l,", ").concat(h,", ").concat(C)+(s&&"pow"===u?", ".concat(null!==(i=I.get("exponent"))&&void 0!==i?i:1):"")+")";g.on.push({events:{signal:C},update:s?B:"clampRange(".concat(B,", 0, ").concat(c,")")})}var fW=[{has:function(){return!0},parse:function(t,e,A){var n,r,i,o=e.name,a=null!==(n=e.project)&&void 0!==n?n:e.project=new rW,s={},g={},c=new Set,I=function(t,e){for(var A="visual"===e?t.channel:t.field,n=kM("".concat(o,"_").concat(A)),r=1;c.has(n);r++)n=kM("".concat(o,"_").concat(A,"_").concat(r));return c.add(n),Object(E.a)({},e,n)};if(!A.fields&&!A.encodings){var u=t.config.selection[A.type];if(A.init){var l,C=Object(R.a)(Object(U.i)(A.init));try{for(C.s();!(l=C.n()).done;){var h,B=l.value,d=Object(R.a)(RM(B));try{for(d.s();!(h=d.n()).done;){var Q=h.value;o_[Q]?(A.encodings||(A.encodings=[])).push(Q):"interval"===A.type?(aT('Interval selections should be initialized using "x" and/or "y" keys.'),A.encodings=u.encodings):(A.fields||(A.fields=[])).push(Q)}}catch(M){d.e(M)}finally{d.f()}}}catch(M){C.e(M)}finally{C.f()}}else A.encodings=u.encodings,A.fields=u.fields}var p,y=Object(R.a)(null!==(r=A.fields)&&void 0!==r?r:[]);try{for(y.s();!(p=y.n()).done;){var v=p.value,m={type:"E",field:v};m.signals=Object.assign({},I(m,"data")),a.items.push(m),a.hasField[v]=m}}catch(M){y.e(M)}finally{y.f()}var b,F=Object(R.a)(null!==(i=A.encodings)&&void 0!==i?i:[]);try{for(F.s();!(b=F.n()).done;){var w=b.value,S=t.fieldDef(w);if(S){var D=S.field;if(S.aggregate){aT(f.cannotProjectAggregate(w,S.aggregate));continue}if(!D){aT(f.cannotProjectOnChannelWithoutField(w));continue}if(S.timeUnit){D=t.vgField(w);var G={timeUnit:S.timeUnit,as:D,field:S.field};g[QM(G)]=G}if(!s[D]){var N="E";if("interval"===e.type)bj(t.getScaleComponent(w).get("type"))&&(N="R");else S.bin&&(N="R-RE");var k={field:D,channel:w,type:N};k.signals=Object.assign(Object.assign({},I(k,"data")),I(k,"visual")),a.items.push(s[D]=k),a.hasField[D]=a.hasChannel[w]=s[D]}}else aT(f.cannotProjectOnChannelWithoutField(w))}}catch(M){F.e(M)}finally{F.f()}if(A.init){var x=function(t){return a.items.map((function(e){return void 0!==t[e.channel]?t[e.channel]:t[e.field]}))};if("interval"===A.type)e.init=x(A.init);else{var O=Object(U.i)(A.init);e.init=O.map(x)}}DM(g)||(a.timeUnit=new nW(null,g))},signals:function(t,e,A){var n=e.name+"_tuple_fields";return A.filter((function(t){return t.name===n})).length>0?A:A.concat({name:n,value:e.project.items.map((function(t){t.signals,t.hasLegend;var e=nM(t,["signals","hasLegend"]);return e.field=TM(e.field),e}))})}},oW,sW,IW,lW,hW,iW,tW,aW];function dW(t,e){var A,n=Object(R.a)(fW);try{for(n.s();!(A=n.n()).done;){var r=A.value;r.has(t)&&e(r)}}catch(i){n.e(i)}finally{n.f()}}function QW(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:U.x;if(Object(U.A)(t)){var n=t.map((function(t){return QW(t,e,A)}));return e?"[".concat(n.join(", "),"]"):n}return sT(t)?A(e?CT(t):BT(t)):e?A(JSON.stringify(t)):t}function EW(t,e){return NW(t,(function(A,n){e=n.marks?n.marks(t,A,e):e,dW(A,(function(n){n.marks&&(e=n.marks(t,A,e))}))})),e}function pW(t){return t.map((function(t){return t.on&&!t.on.length&&delete t.on,t}))}var yW="_brush",vW={signals:function(t,e){var A=e.name,n=A+"_tuple_fields",r=sW.has(e),i=[],o=[],a=[];if(e.translate&&!r){var s="!event.item || event.item.mark.name !== ".concat(Object(U.Z)(A+yW));mW(e,(function(t,e){var A,n=Object(U.i)(null!==(A=e.between[0].filter)&&void 0!==A?A:e.between[0].filter=[]);return n.indexOf(s)<0&&n.push(s),t}))}e.project.items.forEach((function(A,n){var r=A.channel;if("x"===r||"y"===r){var s=e.init?e.init[n]:null,g=function(t,e,A,n){var r=A.channel,i=A.signals.visual,o=A.signals.data,a=sW.has(e),s=Object(U.Z)(t.scaleName(r)),g=t.getScaleComponent(r),c=g?g.get("type"):void 0,I=function(t){return"scale(".concat(s,", ").concat(t,")")},u=t.getSizeSignalRef("x"===r?"width":"height").signal,l="".concat(r,"(unit)"),C=mW(e,(function(t,e){return[].concat(Object(p.a)(t),[{events:e.between[0],update:"[".concat(l,", ").concat(l,"]")},{events:e,update:"[".concat(i,"[0], clamp(").concat(l,", 0, ").concat(u,")]")}])}));return C.push({events:{signal:e.name+"_scale_trigger"},update:bj(c)?"[".concat(I("".concat(o,"[0]")),", ").concat(I("".concat(o,"[1]")),"]"):"[0, 0]"}),a?[{name:o,on:[]}]:[Object.assign(Object.assign({name:i},n?{init:QW(n,!0,I)}:{value:[]}),{on:C}),Object.assign(Object.assign({name:o},n?{init:QW(n)}:{}),{on:[{events:{signal:i},update:"".concat(i,"[0] === ").concat(i,"[1] ? null : invert(").concat(s,", ").concat(i,")")}]})]}(t,e,A,s),c=A.signals.data,I=A.signals.visual,u=Object(U.Z)(t.scaleName(r)),l=bj(t.getScaleComponent(r).get("type"))?"+":"";i.push.apply(i,Object(p.a)(g)),o.push(c),a.push({scaleName:t.scaleName(r),expr:"(!isArray(".concat(c,") || ")+"(".concat(l,"invert(").concat(u,", ").concat(I,")[0] === ").concat(l).concat(c,"[0] && ")+"".concat(l,"invert(").concat(u,", ").concat(I,")[1] === ").concat(l).concat(c,"[1]))")})}else aT("Interval selections only support x and y encoding channels.")})),r||i.push({name:A+"_scale_trigger",value:{},on:[{events:a.map((function(t){return{scale:t.scaleName}})),update:a.map((function(t){return t.expr})).join(" && ")+" ? ".concat(A+"_scale_trigger"," : {}")}]});var g=e.init,c="unit: ".concat(xW(t),", fields: ").concat(n,", values");return i.concat(Object.assign(Object.assign({name:A+DW},g?{init:"{".concat(c,": ").concat(QW(g),"}")}:{}),{on:[{events:[{signal:o.join(" || ")}],update:o.join(" && ")+" ? {".concat(c,": [").concat(o,"]} : null")}]}))},modifyExpr:function(t,e){return e.name+DW+", "+("global"===e.resolve?"true":"{unit: ".concat(xW(t),"}"))},marks:function(t,e,A){var n=e.name,r=e.project.hasChannel,i=r.x,o=r.y,a=i&&i.signals.visual,s=o&&o.signals.visual,g="data(".concat(Object(U.Z)(e.name+SW),")");if(sW.has(e))return A;var c={x:void 0!==i?{signal:"".concat(a,"[0]")}:{value:0},y:void 0!==o?{signal:"".concat(s,"[0]")}:{value:0},x2:void 0!==i?{signal:"".concat(a,"[1]")}:{field:{group:"width"}},y2:void 0!==o?{signal:"".concat(s,"[1]")}:{field:{group:"height"}}};if("global"===e.resolve){var I,u=Object(R.a)(RM(c));try{for(u.s();!(I=u.n()).done;){var l=I.value;c[l]=[Object.assign({test:"".concat(g,".length && ").concat(g,"[0].unit === ").concat(xW(t))},c[l]),{value:0}]}}catch(E){u.e(E)}finally{u.f()}}var C=e.mark,h=C.fill,B=C.fillOpacity,f=C.cursor,d=nM(C,["fill","fillOpacity","cursor"]),Q=RM(d).reduce((function(t,e){return t[e]=[{test:[void 0!==i&&"".concat(a,"[0] !== ").concat(a,"[1]"),void 0!==o&&"".concat(s,"[0] !== ").concat(s,"[1]")].filter((function(t){return t})).join(" && "),value:d[e]},{value:null}],t}),{});return[{name:n+yW+"_bg",type:"rect",clip:!0,encode:{enter:{fill:{value:h},fillOpacity:{value:B}},update:c}}].concat(Object(p.a)(A),[{name:n+yW,type:"rect",clip:!0,encode:{enter:Object.assign(Object.assign({},f?{cursor:{value:f}}:{}),{fill:{value:"transparent"}}),update:Object.assign(Object.assign({},c),Q)}}])}};function mW(t,e){return t.events.reduce((function(t,A){return A.between?e(t,A):(aT("".concat(A," is not an ordered event stream for interval selections.")),t)}),[])}function bW(t,e){var A=e.name,n=A+"_tuple_fields",r=e.project,i="(item().isVoronoi ? datum.datum : datum)",o=r.items.map((function(e){var A=t.fieldDef(e.channel);return A&&A.bin?"[".concat(i,"[").concat(Object(U.Z)(t.vgField(e.channel,{})),"], ")+"".concat(i,"[").concat(Object(U.Z)(t.vgField(e.channel,{binSuffix:"end"})),"]]"):"".concat(i,"[").concat(Object(U.Z)(e.field),"]")})).join(", "),a="unit: ".concat(xW(t),", fields: ").concat(n,", values"),s=e.events;return[{name:A+DW,on:s?[{events:s,update:"datum && item().mark.marktype !== 'group' ? {".concat(a,": [").concat(o,"]} : null"),force:!0}]:[]}]}var FW={signals:bW,modifyExpr:function(t,e){return e.name+DW+", "+("global"===e.resolve?"null":"{unit: ".concat(xW(t),"}"))}},wW={signals:bW,modifyExpr:function(t,e){return e.name+DW+", "+("global"===e.resolve?"true":"{unit: ".concat(xW(t),"}"))}},SW="_store",DW="_tuple",RW="_modify",UW="vlSelectionResolve",GW={single:wW,multi:FW,interval:vW};function NW(t,e){var A=t.component.selection;if(A){var n,r=Object(R.a)(UM(A));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!0===e(i,GW[i.type]))break}}catch(o){r.e(o)}finally{r.f()}}}function kW(t){for(var e=t.parent;e&&!fq(e);)e=e.parent;return e}function xW(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{escape:!0},A=e.escape,n=A?Object(U.Z)(t.name):t.name,r=kW(t);if(r){var i,o=r.facet,a=Object(R.a)(A_);try{for(a.s();!(i=a.n()).done;){var s=i.value;o[s]&&(n+=" + '__facet_".concat(s,"_' + (facet[").concat(Object(U.Z)(r.vgField(s)),"])"))}}catch(g){a.e(g)}finally{a.f()}}return n}function OW(t){var e=!1;return NW(t,(function(t){e=e||t.project.items.some((function(t){return"_vgsid_"===t.field}))})),e}function MW(t){var e=CR(t),A=new Set;return e.visit((function(t){"MemberExpression"===t.type&&function t(e){return"MemberExpression"===e.object.type?t(e.object):"datum"===e.object.name}(t)&&A.add(function t(e){var A=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(A.push.apply(A,Object(p.a)(t(e.object))),A.push.apply(A,Object(p.a)(t(e.property)))),A)}(t).slice(1).join("."))})),A}var LW=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r){var i;return Object(F.a)(this,A),(i=e.call(this,t)).model=n,i.filter=r,i.expr=TW(i.model,i.filter,Object(x.a)(i)),i._dependentFields=MW(i.expr),i}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,this.model,hM(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)}}]),A}(eW);function _W(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"datum",r=[];function i(e){var i=kM(e),o=t.getSelectionComponent(i,e),a=Object(U.Z)(i+SW);if(o.project.timeUnit){var s=null!==A&&void 0!==A?A:t.component.data.raw,g=o.project.timeUnit.clone();s.parent?g.insertAsParentOf(s):s.parent=g}return"none"!==o.empty&&r.push(a),"vlSelectionTest(".concat(a,", ").concat(n)+("global"===o.resolve?")":", ".concat(Object(U.Z)(o.resolve),")"))}var o=xM(e,i);return(r.length?"!("+r.map((function(t){return"length(data(".concat(t,"))")})).join(" || ")+") || ":"")+"(".concat(o,")")}function JW(t,e){var A=e.encoding,n=e.field;if(A||n){if(A&&!n){var r=t.project.items.filter((function(t){return t.channel===A}));!r.length||r.length>1?(n=t.project.items[0].field,aT((r.length?"Multiple ":"No ")+"matching ".concat(Object(U.Z)(A)," encoding found for selection ").concat(Object(U.Z)(e.selection),". ")+'Using "field": '.concat(Object(U.Z)(n),"."))):n=r[0].field}}else n=t.project.items[0].field,t.project.items.length>1&&aT('A "field" or "encoding" must be specified when using a selection as a scale domain. '+'Using "field": '.concat(Object(U.Z)(n),"."));return"".concat(t.name,"[").concat(Object(U.Z)(n),"]")}function TW(t,e,A){return xM(e,(function(e){return Object(U.H)(e)?e:function(t){return null===t||void 0===t?void 0:t.selection}(e)?_W(t,e.selection,A):YT(e)}))}function jW(t,e){if(t)return Object(U.A)(t)&&!tY(t)?t.map((function(t){return JH(t,e)})).join(", "):t}function HW(t,e,A,n){var r,i,o;t.encode=null!==(r=t.encode)&&void 0!==r?r:{},t.encode[e]=null!==(i=t.encode[e])&&void 0!==i?i:{},t.encode[e].update=null!==(o=t.encode[e].update)&&void 0!==o?o:{},t.encode[e].update[A]=n}function YW(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{header:!1},r=t.combine(),i=r.disable,o=r.orient,a=r.scale,s=r.labelExpr,g=r.title,c=r.zindex,I=nM(r,["disable","orient","scale","labelExpr","title","zindex"]);if(!i){for(var u in I){var l=tL[u],C=I[u];if(l&&l!==e&&"both"!==l)delete I[u];else if(zM(C)){var h=C.condition,B=nM(C,["condition"]),f=Object(U.i)(h),d=XM[u];if(d){var Q=d.vgProp,E=d.part,y=[].concat(Object(p.a)(f.map((function(t){var e=t.test,A=nM(t,["test"]);return Object.assign({test:TW(null,e)},A)}))),[B]);HW(I,E,Q,y),delete I[u]}else if(null===d){var v={signal:f.map((function(t){var e=t.test,A=nM(t,["test"]);return"".concat(TW(null,e)," ? ").concat(AY(A)," : ")})).join("")+AY(B)};I[u]=v}}else if(wT(C)){var m=XM[u];if(m){var b=m.vgProp,F=m.part;HW(I,F,b,C),delete I[u]}}}if("grid"===e){if(!I.grid)return;if(I.encode){var w=I.encode.grid;I.encode=Object.assign({},w?{grid:w}:{}),DM(I.encode)&&delete I.encode}return Object.assign(Object.assign({scale:a,orient:o},I),{domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:VM(c,0)})}if(n.header||!t.mainExtracted){if(void 0!==s&&HW(I,"labels","text",{signal:s}),null===I.labelAlign&&delete I.labelAlign,I.encode){var S,D=Object(R.a)($M);try{for(D.s();!(S=D.n()).done;){var G=S.value;t.hasAxisPart(G)||delete I.encode[G]}}catch(k){D.e(k)}finally{D.f()}DM(I.encode)&&delete I.encode}var N=jW(g,A);return Object.assign(Object.assign(Object.assign(Object.assign({scale:a,orient:o,grid:!1},N?{title:N}:{}),I),!1===A.aria?{aria:!1}:{}),{zindex:VM(c,0)})}}}function VW(t){var e,A=t.component.axes,n=[],r=Object(R.a)(f_);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(A[i]){var o,a=Object(R.a)(A[i]);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(!s.get("disable")&&!s.get("gridScale")){var g="x"===i?"height":"width",c=t.getSizeSignalRef(g).signal;g!==c&&n.push({name:g,update:c})}}}catch(I){a.e(I)}finally{a.f()}}}}catch(I){r.e(I)}finally{r.f()}return n}var ZW={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"},WW={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"},KW=RM(ZW),PW=RM(WW);function qW(t,e,A,n){return Object.assign.apply(null,[{}].concat(Object(p.a)(t.map((function(t){if("axisOrient"===t){var r,i="x"===A?"bottom":"left",o=e["x"===A?"axisBottom":"axisLeft"]||{},a=e["x"===A?"axisTop":"axisRight"]||{},s=new Set([].concat(Object(p.a)(RM(o)),Object(p.a)(RM(a)))),g={},c=Object(R.a)(s.values());try{for(c.s();!(r=c.n()).done;){var I=r.value;g[I]={signal:"".concat(n.signal,' === "').concat(i,'" ? ').concat(nY(o[I])," : ").concat(nY(a[I]))}}}catch(u){c.e(u)}finally{c.f()}return g}return e[t]})))))}function XW(t,e,A,n){var r="band"===e?["axisDiscrete","axisBand"]:"point"===e?["axisDiscrete","axisPoint"]:e in Qj?["axisQuantitative"]:"time"===e||"utc"===e?["axisTemporal"]:[],i="x"===t?"axisX":"axisY",o=wT(A)?"axisOrient":"axis"+MM(A),a=[].concat(r,Object(p.a)(r.map((function(t){return i+t.substr(4)})))),s=["axis",o,i];return{vlOnlyAxisConfig:qW(a,n,t,A),vgAxisConfig:qW(s,n,t,A),axisConfigStyle:zW([].concat(s,Object(p.a)(a)),n)}}function zW(t,e){var A,n,r=[{}],i=Object(R.a)(t);try{for(i.s();!(n=i.n()).done;){var o=null===(A=e[n.value])||void 0===A?void 0:A.style;if(o){o=Object(U.i)(o);var a,s=Object(R.a)(o);try{for(s.s();!(a=s.n()).done;){var g=a.value;r.push(e.style[g])}}catch(c){s.e(c)}finally{s.f()}}}}catch(c){i.e(c)}finally{i.f()}return Object.assign.apply(null,r)}function $W(t,e,A){var n,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=sY(t,A,e.style);if(void 0!==i)return{configFrom:"style",configValue:i};for(var o=0,a=["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"];o<a.length;o++){var s=a[o];if(void 0!==(null===(n=r[s])||void 0===n?void 0:n[t]))return{configFrom:s,configValue:r[s][t]}}return{}}var tK={scale:function(t){var e=t.model,A=t.channel;return e.scaleName(A)},format:function(t){var e=t.fieldOrDatumDef,A=t.config,n=t.axis,r=n.format,i=n.formatType;return qj(e,e.type,r,i,A,!0)},formatType:function(t){var e=t.axis,A=t.fieldOrDatumDef,n=t.scaleType,r=e.formatType;return Xj(r,A,n)},grid:function(t){var e,A=t.fieldOrDatumDef,n=t.axis,r=t.scaleType;return(!fH(A)||!N_(A.bin))&&(null!==(e=n.grid)&&void 0!==e?e:function(t,e){return!mj(t)&&fH(e)&&!G_(null===e||void 0===e?void 0:e.bin)}(r,A))},gridScale:function(t){return function(t,e){var A="x"===e?"y":"x";if(t.getScaleComponent(A))return t.scaleName(A);return}(t.model,t.channel)},labelAlign:function(t){var e=t.axis,A=t.labelAngle,n=t.orient,r=t.channel;return e.labelAlign||nK(A,n,r)},labelAngle:function(t){return t.labelAngle},labelBaseline:function(t){var e=t.axis,A=t.labelAngle,n=t.orient,r=t.channel;return e.labelBaseline||AK(A,n,r)},labelFlush:function(t){var e,A=t.axis,n=t.fieldOrDatumDef,r=t.channel;return null!==(e=A.labelFlush)&&void 0!==e?e:function(t,e){if("x"===e&&pM(["quantitative","temporal"],t))return!0;return}(n.type,r)},labelOverlap:function(t){var e,A=t.axis,n=t.fieldOrDatumDef,r=t.scaleType;return null!==(e=A.labelOverlap)&&void 0!==e?e:function(t,e){if("nominal"!==t)return"log"!==e||"greedy";return}(n.type,r)},orient:function(t){return t.orient},tickCount:function(t){var e,A=t.channel,n=t.model,r=t.axis,i=t.fieldOrDatumDef,o=t.scaleType,a="x"===A?"width":"y"===A?"height":void 0,s=a?n.getSizeSignalRef(a):void 0;return null!==(e=r.tickCount)&&void 0!==e?e:function(t){var e,A=t.fieldOrDatumDef,n=t.scaleType,r=t.size;if(!t.values&&!mj(n)&&"log"!==n){if(fH(A)){if(G_(A.bin))return{signal:"ceil(".concat(r.signal,"/10)")};if(A.timeUnit&&pM(["month","hours","day","quarter"],null===(e=bT(A.timeUnit))||void 0===e?void 0:e.unit))return}return{signal:"ceil(".concat(r.signal,"/40)")}}return}({fieldOrDatumDef:i,scaleType:o,size:s,values:r.values})},title:function(t){var e=t.axis,A=t.model,n=t.channel;if(void 0!==e.title)return e.title;var r=rK(A,n);if(void 0!==r)return r;var i=A.typedFieldDef(n),o="x"===n?"x2":"y2",a=A.fieldDef(o);return cY(i?[cH(i)]:[],fH(a)?[cH(a)]:[])},values:function(t){return function(t,e){var A=t.values;if(Object(U.A)(A))return XH(e,A);if(wT(A))return A;return}(t.axis,t.fieldOrDatumDef)},zindex:function(t){var e,A=t.axis,n=t.fieldOrDatumDef,r=t.mark;return null!==(e=A.zindex)&&void 0!==e?e:function(t,e){if("rect"===t&&UH(e))return 1;return 0}(r,n)}};function eK(t){return"(((".concat(t.signal," % 360) + 360) % 360)")}function AK(t,e,A,n){if(void 0!==t){if("x"===A){if(wT(t)){var r=eK(t),i=wT(e)?"(".concat(e.signal,' === "top")'):"top"===e;return{signal:"(45 < ".concat(r," && ").concat(r," < 135) || (225 < ").concat(r," && ").concat(r,' < 315) ? "middle" :')+"(".concat(r," <= 45 || 315 <= ").concat(r,") === ").concat(i,' ? "bottom" : "top"')}}if(45<t&&t<135||225<t&&t<315)return"middle";if(wT(e)){var o=t<=45||315<=t?"===":"!==";return{signal:"".concat(e.signal," ").concat(o,' "top" ? "bottom" : "top"')}}return(t<=45||315<=t)===("top"===e)?"bottom":"top"}if(wT(t)){var a=eK(t),s=wT(e)?"(".concat(e.signal,' === "left")'):"left"===e,g=n?'"middle"':"null";return{signal:"".concat(a," <= 45 || 315 <= ").concat(a," || (135 <= ").concat(a," && ").concat(a," <= 225) ? ").concat(g," : (45 <= ").concat(a," && ").concat(a," <= 135) === ").concat(s,' ? "top" : "bottom"')}}if(t<=45||315<=t||135<=t&&t<=225)return n?"middle":null;if(wT(e)){var c=45<=t&&t<=135?"===":"!==";return{signal:"".concat(e.signal," ").concat(c,' "left" ? "top" : "bottom"')}}return(45<=t&&t<=135)===("left"===e)?"top":"bottom"}}function nK(t,e,A){if(void 0!==t){var n="x"===A,r=n?0:90,i=n?"bottom":"left";if(wT(t)){var o=eK(t),a=wT(e)?"(".concat(e.signal,' === "').concat(i,'")'):e===i;return{signal:"(".concat(r?"("+o+" + 90)":o," % 180 === 0) ? ").concat(n?null:'"center"'," :")+"(".concat(r," < ").concat(o," && ").concat(o," < ").concat(180+r,") === ").concat(a,' ? "left" : "right"')}}if((t+r)%180===0)return n?null:"center";if(wT(e)){var s=r<t&&t<180+r?"===":"!==",g="".concat(e.signal," ").concat(s,' "').concat(i,'"');return{signal:"".concat(g,' ? "left" : "right"')}}return(r<t&&t<180+r)===(e===i)?"left":"right"}}function rK(t,e){var A="x"===e?"x2":"y2",n=t.fieldDef(e),r=t.fieldDef(A),i=n?n.title:void 0,o=r?r.title:void 0;return i&&o?IY(i,o):i||(o||(void 0!==i?i:void 0!==o?o:void 0))}var iK=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r._dependentFields=MW(r.transform.calculate),r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(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(QM(this.transform))}}],[{key:"parseAllForSortIndex",value:function(t,e){return e.forEachFieldDef((function(e,n){if(bH(e)&&oH(e.sort)){var r=e.field,i=e.timeUnit,o=e.sort,a=o.map((function(t,e){return"".concat(YT({field:r,timeUnit:i,equal:t})," ? ").concat(e," : ")})).join("")+o.length;t=new A(t,{calculate:a,as:oK(e,n,{forAs:!0})})}})),t}}]),A}(eW);function oK(t,e,A){return RH(t,Object.assign({prefix:e,suffix:"sort_index"},null!==A&&void 0!==A?A:{}))}function aK(t,e){return pM(["top","bottom"],e)?"column":pM(["left","right"],e)||"row"===t?"row":"column"}function sK(t,e,A,n){var r="row"===n?A.headerRow:"column"===n?A.headerColumn:A.headerFacet;return VM(((null===e||void 0===e?void 0:e.header)||{})[t],r[t],A.header[t])}function gK(t,e,A,n){var r,i={},o=Object(R.a)(t);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=sK(a,e,A,n);void 0!==s&&(i[a]=s)}}catch(g){o.e(g)}finally{o.f()}return i}var cK=["row","column"],IK=["header","footer"];function uK(t,e){var A=t.component.layoutHeaders[e].title,n=t.config?t.config:void 0,r=t.component.layoutHeaders[e].facetFieldDef?t.component.layoutHeaders[e].facetFieldDef:void 0,i=gK(["titleAnchor","titleAngle","titleOrient"],r,n,e),o=i.titleAnchor,a=i.titleAngle,s=aK(e,i.titleOrient),g=PM(a);return{name:"".concat(e,"-title"),type:"group",role:"".concat(s,"-title"),title:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:A},"row"===e?{orient:"left"}:{}),{style:"guide-title"}),CK(g,s)),lK(s,g,o)),pK(n,r,e,KW,ZW))}}function lK(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"middle";switch(A){case"start":return{align:"left"};case"end":return{align:"right"}}var n=nK(e,"row"===t?"left":"top","row"===t?"y":"x");return n?{align:n}:{}}function CK(t,e){var A=AK(t,"row"===e?"left":"top","row"===e?"y":"x",!0);return A?{baseline:A}:{}}function hK(t,e){var A,n=t.component.layoutHeaders[e],r=[],i=Object(R.a)(IK);try{for(i.s();!(A=i.n()).done;){var o=A.value;if(n[o]){var a,s=Object(R.a)(n[o]);try{for(s.s();!(a=s.n()).done;){var g=dK(t,e,o,n,a.value);null!=g&&r.push(g)}}catch(c){s.e(c)}finally{s.f()}}}}catch(c){i.e(c)}finally{i.f()}return r}function BK(t,e){var A,n=t.sort;return iH(n)?{field:RH(n,{expr:"datum"}),order:null!==(A=n.order)&&void 0!==A?A:"ascending"}:Object(U.A)(n)?{field:oK(t,e,{expr:"datum"}),order:"ascending"}:{field:RH(t,{expr:"datum"}),order:null!==n&&void 0!==n?n:"ascending"}}function fK(t,e,A){var n=gK(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],t,A,e),r=n.format,i=n.formatType,o=n.labelAngle,a=n.labelAnchor,s=n.labelOrient,g=n.labelExpr,c=Wj({fieldOrDatumDef:t,format:r,formatType:i,expr:"parent",config:A}).signal,I=aK(e,s);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({text:{signal:g?jM(jM(g,"datum.label",c),"datum.value",RH(t,{expr:"parent"})):c}},"row"===e?{orient:"left"}:{}),{style:"guide-label",frame:"group"}),CK(o,I)),lK(I,o,a)),pK(A,t,e,PW,WW))}function dK(t,e,A,n,r){if(r){var i=null,o=n.facetFieldDef,a=t.config?t.config:void 0;if(o&&r.labels){var s=gK(["labelOrient"],o,a,e).labelOrient;("row"===e&&!pM(["top","bottom"],s)||"column"===e&&!pM(["left","right"],s))&&(i=fK(o,e,a))}var g=fq(t)&&!aH(t.facet),c=r.axes,I=(null===c||void 0===c?void 0:c.length)>0;if(i||I){var u="row"===e?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName("".concat(e,"_").concat(A)),type:"group",role:"".concat(e,"-").concat(A)},n.facetFieldDef?{from:{data:t.getName(e+"_domain")},sort:BK(o,e)}:{}),I&&g?{from:{data:t.getName("facet_domain_".concat(e))}}:{}),i?{title:i}:{}),r.sizeSignal?{encode:{update:Object(E.a)({},u,r.sizeSignal)}}:{}),I?{axes:c}:{})}}return null}var QK={column:{start:0,end:1},row:{start:1,end:0}};function EK(t,e){return QK[e][t]}function pK(t,e,A,n,r){var i,o={},a=Object(R.a)(n);try{for(a.s();!(i=a.n()).done;){var s=i.value;if(r[s]){var g=sK(s,e,t,A);void 0!==g&&(o[r[s]]=g)}}}catch(c){a.e(c)}finally{a.f()}return o}function yK(t){return[].concat(Object(p.a)(vK(t,"width")),Object(p.a)(vK(t,"height")),Object(p.a)(vK(t,"childWidth")),Object(p.a)(vK(t,"childHeight")))}function vK(t,e){var A="width"===e?"x":"y",n=t.component.layoutSize.get(e);if(!n||"merged"===n)return[];var r=t.getSizeSignalRef(e).signal;if("step"===n){var i=t.getScaleComponent(A);if(i){var o=i.get("type"),a=i.get("range");if(mj(o)&&ST(a)){var s=t.scaleName(A);if(fq(t.parent))if("independent"===t.parent.component.resolve.scale[A])return[mK(s,a)];return[mK(s,a),{name:r,update:bK(s,i,"domain('".concat(s,"').length"))}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==n){var g=r.endsWith("width"),c=g?"containerSize()[0]":"containerSize()[1]",I=tV(t.config.view,g?"width":"height"),u="isFinite(".concat(c,") ? ").concat(c," : ").concat(I);return[{name:r,init:u,on:[{update:u,events:"window:resize"}]}]}return[{name:r,value:n}]}function mK(t,e){return{name:t+"_step",value:e.step}}function bK(t,e,A){var n=e.get("type"),r=e.get("padding"),i=VM(e.get("paddingOuter"),r),o=e.get("paddingInner");return o="band"===n?void 0!==o?o:r:1,"bandspace(".concat(A,", ").concat(o,", ").concat(i,") * ").concat(t,"_step")}function FK(t){return"childWidth"===t?"width":"childHeight"===t?"height":t}function wK(t,e){return RM(t).reduce((function(A,n){var r=t[n];return Object.assign(Object.assign({},A),SZ(e,r,n,(function(t){return wT(t)?t:{value:t.value}})))}),{})}function SK(t,e){if(Qq(e)||fq(e))return"shared";if(dq(e))return d_(t)?"independent":"shared";throw new Error("invalid model type for resolve")}function DK(t,e){var A=t.scale[e],n=d_(e)?"axis":"legend";return"independent"===A?("shared"===t[n][e]&&aT(f.independentScaleMeansIndependentGuide(e)),"independent"):t[n][e]||"shared"}var RK=Object.assign(Object.assign({},YY),{disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1}),UK=RM(RK),GK=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return A}(PV),NK={symbols:function(t,e){var A,n,r,i,o,a=e.fieldOrDatumDef,s=e.model,g=e.channel,c=e.legendCmpt;if("symbol"!==e.legendType)return;var I=s.markDef,u=s.encoding,l=s.config,C=s.mark,h=I.filled&&"trail"!==C,B=Object.assign(Object.assign({},function(t,e,A){var n,r=Object(R.a)(A);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=oY(i,e.markDef,e.config);void 0!==o&&(t[i]=eY(o))}}catch(a){r.e(a)}finally{r.f()}return t}({},s,vL)),OZ(s,{filled:h})),f=null!==(A=kK(u.opacity))&&void 0!==A?A:I.opacity;if(B.fill)if("fill"===g||h&&g===YL)delete B.fill;else if(B.fill.field)c.get("symbolFillColor")?delete B.fill:(B.fill=eY(null!==(n=l.legend.symbolBaseFillColor)&&void 0!==n?n:"black"),B.fillOpacity=eY(null!==f&&void 0!==f?f:1));else if(Object(U.A)(B.fill)){var d=null!==(o=null!==(i=xK(null!==(r=u.fill)&&void 0!==r?r:u.color))&&void 0!==i?i:I.fill)&&void 0!==o?o:h&&I.color;d&&(B.fill=eY(d))}if(B.stroke)if("stroke"===g||!h&&g===YL)delete B.stroke;else if(B.stroke.field)delete B.stroke;else if(Object(U.A)(B.stroke)){var Q=VM(xK(u.stroke||u.color),I.stroke,h?I.color:void 0);Q&&(B.stroke={value:Q})}if("opacity"!==g){var E=fH(a)&&MK(s,c,a);E?B.opacity=[Object.assign({test:E},eY(null!==f&&void 0!==f?f:1)),eY(l.legend.unselectedOpacity)]:f&&(B.opacity=eY(f))}return DM(B=Object.assign(Object.assign({},B),t))?void 0:B},gradient:function(t,e){var A=e.model;if("gradient"!==e.legendType)return;var n={},r=kK(A.encoding.opacity)||A.markDef.opacity;r&&(n.opacity=eY(r));return DM(n=Object.assign(Object.assign({},n),t))?void 0:n},labels:function(t,e){var A=e.fieldOrDatumDef,n=e.model,r=e.channel,i=e.legendCmpt,o=n.legend(r)||{},a=n.config,s=fH(A)?MK(n,i,A):void 0,g=s?[{test:s,value:1},{value:a.legend.unselectedOpacity}]:void 0,c=o.format,I=o.formatType,u=Vj(I)?Pj({fieldOrDatumDef:A,field:"datum.value",format:c,formatType:I,config:a}):void 0,l=Object.assign(Object.assign(Object.assign({},g?{opacity:g}:{}),u?{text:u}:{}),t);return DM(l)?void 0:l},entries:function(t,e){var A=e.legendCmpt.get("selections");return(null===A||void 0===A?void 0:A.length)?Object.assign(Object.assign({},t),{fill:{value:"transparent"}}):t}};function kK(t){return OK(t,(function(t,e){return Math.max(t,e.value)}))}function xK(t){return OK(t,(function(t,e){return VM(t,e.value)}))}function OK(t,e){return function(t){var e=t&&t.condition;return!!e&&(Object(U.A)(e)||mH(e))}(t)?Object(U.i)(t.condition).reduce(e,t.value):mH(t)?t.value:void 0}function MK(t,e,A){var n=e.get("selections");if(null===n||void 0===n?void 0:n.length){var r=Object(U.Z)(A.field);return n.map((function(t){var e=Object(U.Z)(kM(t)+SW);return"(!length(data(".concat(e,")) || (").concat(t,"[").concat(r,"] && indexof(").concat(t,"[").concat(r,"], datum.value) >= 0))")})).join(" || ")}}var LK={direction:function(t){return t.direction},format:function(t){var e=t.fieldOrDatumDef,A=t.legend,n=t.config,r=A.format,i=A.formatType;return qj(e,e.type,r,i,n,!1)},formatType:function(t){var e=t.legend,A=t.fieldOrDatumDef,n=t.scaleType,r=e.formatType;return Xj(r,A,n)},gradientLength:function(t){var e,A,n=t.legend,r=t.legendConfig;return null!==(A=null!==(e=n.gradientLength)&&void 0!==e?e:r.gradientLength)&&void 0!==A?A:function(t){var e=t.legendConfig,A=t.model,n=t.direction,r=t.orient,i=t.scaleType,o=e.gradientHorizontalMaxLength,a=e.gradientHorizontalMinLength,s=e.gradientVerticalMaxLength,g=e.gradientVerticalMinLength;if(Fj(i))return"horizontal"===n?"top"===r||"bottom"===r?TK(A,"width",a,o):a:TK(A,"height",g,s);return}(t)},labelOverlap:function(t){var e,A,n=t.legend,r=t.legendConfig,i=t.scaleType;return null!==(A=null!==(e=n.labelOverlap)&&void 0!==e?e:r.labelOverlap)&&void 0!==A?A:function(t){if(pM(["quantile","threshold","log"],t))return"greedy";return}(i)},symbolType:function(t){var e,A=t.legend,n=t.markDef,r=t.channel,i=t.encoding;return null!==(e=A.symbolType)&&void 0!==e?e:function(t,e,A,n){var r;if("shape"!==e){var i=null!==(r=xK(A))&&void 0!==r?r:n;if(i)return i}switch(t){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"}}(n.type,r,i.shape,n.shape)},title:function(t){return LH(t.fieldOrDatumDef,t.config,{allowDisabling:!0})},type:function(t){var e=t.legendType,A=t.scaleType;if(t_(t.channel)&&Fj(A)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:function(t){var e=t.fieldOrDatumDef;return function(t,e){var A=t.values;if(Object(U.A)(A))return XH(e,A);if(wT(A))return A;return}(t.legend,e)}};function _K(t){return VM(t.legend.type,function(t){var e=t.channel,A=t.timeUnit,n=t.scaleType;if(t_(e)){if(pM(["quarter","month","day"],A))return"symbol";if(Fj(n))return"gradient"}return"symbol"}(t))}function JK(t){var e,A,n=t.legendConfig,r=t.legendType,i=t.orient;return null!==(A=null!==(e=t.legend.direction)&&void 0!==e?e:n[r?"gradientDirection":"symbolDirection"])&&void 0!==A?A:function(t,e){switch(t){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===e?"horizontal":void 0}}(i,r)}function TK(t,e,A,n){var r=t.getSizeSignalRef(e).signal;return{signal:"clamp(".concat(r,", ").concat(A,", ").concat(n,")")}}function jK(t){var e=Bq(t)?function(t){for(var e=t.encoding,A={},n=0,r=[YL].concat(Object(p.a)(jY));n<r.length;n++){var i=r[n],o=HH(e[i]);o&&t.getScaleComponent(i)&&(i===WL&&fH(o)&&o.type===zT||(A[i]=YK(t,i)))}return A}(t):function(t){var e,A=t.component,n=A.legends,r=A.resolve,i=Object(R.a)(t.children);try{for(i.s();!(e=i.n()).done;){var o=e.value;jK(o);var a,s=Object(R.a)(RM(o.component.legends));try{for(s.s();!(a=s.n()).done;){var g=a.value;r.legend[g]=DK(t.component.resolve,g),"shared"===r.legend[g]&&(n[g]=VK(n[g],o.component.legends[g]),n[g]||(r.legend[g]="independent",delete n[g]))}}catch(B){s.e(B)}finally{s.f()}}}catch(B){i.e(B)}finally{i.f()}var c,I=Object(R.a)(RM(n));try{for(I.s();!(c=I.n()).done;){var u,l=c.value,C=Object(R.a)(t.children);try{for(C.s();!(u=C.n()).done;){var h=u.value;h.component.legends[l]&&("shared"===r.legend[l]&&delete h.component.legends[l])}}catch(B){C.e(B)}finally{C.f()}}}catch(B){I.e(B)}finally{I.f()}return n}(t);return t.component.legends=e,e}function HK(t,e,A,n){switch(e){case"disable":return void 0!==A;case"values":return!!(null===A||void 0===A?void 0:A.values);case"title":if("title"===e&&t===(null===n||void 0===n?void 0:n.title))return!0}return t===(A||{})[e]}function YK(t,e){var A,n,r,i=t.legend(e),o=t.markDef,a=t.encoding,s=t.config,g=s.legend,c=new GK({},function(t,e){var A=t.scaleName(e);if("trail"===t.mark){if("color"===e)return{stroke:A};if("size"===e)return{strokeWidth:A}}return"color"===e?t.markDef.filled?{fill:A}:{stroke:A}:Object(E.a)({},e,A)}(t,e));!function(t,e,A){var n,r=null===(n=t.fieldDef(e))||void 0===n?void 0:n.field;NW(t,(function(t){var n,i,o=null!==(n=t.project.hasField[r])&&void 0!==n?n:t.project.hasChannel[e];if(o&&IW.has(t)){var a=null!==(i=A.get("selections"))&&void 0!==i?i:[];a.push(t.name),A.set("selections",a,!1),o.hasLegend=!0}}))}(t,e,c);var I=void 0!==i?!i:g.disable;if(c.set("disable",I,void 0!==i),I)return c;i=i||{};var u,l=t.getScaleComponent(e).get("type"),C=HH(a[e]),h=fH(C)?null===(A=bT(C.timeUnit))||void 0===A?void 0:A.unit:void 0,B=i.orient||s.legend.orient||"right",f=_K({legend:i,channel:e,timeUnit:h,scaleType:l}),d={legend:i,channel:e,model:t,markDef:o,encoding:a,fieldOrDatumDef:C,legendConfig:g,config:s,scaleType:l,orient:B,legendType:f,direction:JK({legend:i,legendType:f,orient:B,legendConfig:g})},Q=Object(R.a)(UK);try{for(Q.s();!(u=Q.n()).done;){var p=u.value,y=p in LK?LK[p](d):i[p];if(void 0!==y){var v=HK(y,p,i,t.fieldDef(e));(v||void 0===s.legend[p])&&c.set(p,y,v)}}}catch(k){Q.e(k)}finally{Q.f()}for(var m=null!==(n=null===i||void 0===i?void 0:i.encoding)&&void 0!==n?n:{},b=c.get("selections"),F={},w={fieldOrDatumDef:C,model:t,channel:e,legendCmpt:c,legendType:f},S=0,D=["labels","legend","title","symbols","gradient","entries"];S<D.length;S++){var U=D[S],G=wK(null!==(r=m[U])&&void 0!==r?r:{},t),N=U in NK?NK[U](G,w):G;void 0===N||DM(N)||(F[U]=Object.assign(Object.assign(Object.assign({},(null===b||void 0===b?void 0:b.length)&&fH(C)?{name:"".concat(kM(C.field),"_legend_").concat(U)}:{}),(null===b||void 0===b?void 0:b.length)?{interactive:!!b}:{}),{update:N}))}return DM(F)||c.set("encode",F,!!(null===i||void 0===i?void 0:i.encoding)),c}function VK(t,e){var A,n,r,i;if(!t)return e.clone();var o=t.getWithExplicit("orient"),a=e.getWithExplicit("orient");if(!o.explicit||!a.explicit||o.value===a.value){var s,g=!1,c=Object(R.a)(UK);try{var I=function(){var A=s.value,n=tZ(t.getWithExplicit(A),e.getWithExplicit(A),A,"legend",(function(t,e){switch(A){case"symbolType":return function(t,e){if("circle"===e.value)return e;return t}(t,e);case"title":return uY(t,e);case"type":return g=!0,XV("symbol")}return $V(t,e,A,"legend")}));t.setWithExplicit(A,n)};for(c.s();!(s=c.n()).done;)I()}catch(u){c.e(u)}finally{c.f()}return g&&((null===(n=null===(A=t.implicit)||void 0===A?void 0:A.encode)||void 0===n?void 0:n.gradient)&&OM(t.implicit,["encode","gradient"]),(null===(i=null===(r=t.explicit)||void 0===r?void 0:r.encode)||void 0===i?void 0:i.gradient)&&OM(t.explicit,["encode","gradient"])),t}}function ZK(t,e,A,n){var r,i,o;t.encode=null!==(r=t.encode)&&void 0!==r?r:{},t.encode[e]=null!==(i=t.encode[e])&&void 0!==i?i:{},t.encode[e].update=null!==(o=t.encode[e].update)&&void 0!==o?o:{},t.encode[e].update[A]=n}function WK(t){var e,A=t.component.legends,n={},r=Object(R.a)(RM(A));try{for(r.s();!(e=r.n()).done;){var i=e.value,o=t.getScaleComponent(i),a=dM(o.get("domains"));if(n[a]){var s,g=Object(R.a)(n[a]);try{for(g.s();!(s=g.n()).done;){VK(s.value,A[i])||n[a].push(A[i])}}catch(c){g.e(c)}finally{g.f()}}else n[a]=[A[i].clone()]}}catch(c){r.e(c)}finally{r.f()}return UM(n).flat().map((function(e){return function(t,e){var A,n=t.combine(),r=n.disable,i=n.labelExpr,o=(n.selections,nM(n,["disable","labelExpr","selections"]));if(r)return;!1===e.aria&&void 0==o.aria&&(o.aria=!1);if(null===(A=o.encode)||void 0===A?void 0:A.symbols){var a=o.encode.symbols.update;!a.fill||"transparent"===a.fill.value||a.stroke||o.stroke||(a.stroke={value:"transparent"});var s,g=Object(R.a)(jY);try{for(g.s();!(s=g.n()).done;){var I=s.value;o[I]&&delete a[I]}}catch(c){g.e(c)}finally{g.f()}}o.title||delete o.title;void 0!==i&&ZK(o,"labels","text",{signal:i});for(var u in o){var l=o[u];if(wT(l)){var C=HY[u];if(C){var h=C.vgProp,B=C.part;ZK(o,B,h,l),delete o[u]}}}return o}(e,t.config)})).filter((function(t){return void 0!==t}))}function KK(t){return Qq(t)||dq(t)?function(t){return t.children.reduce((function(t,e){return t.concat(e.assembleProjections())}),PK(t))}(t):PK(t)}function PK(t){var e=t.component.projection;if(!e||e.merged)return[];var A=e.combine(),n=A.name;if(e.data){var r={signal:"[".concat(e.size.map((function(t){return t.signal})).join(", "),"]")},i=e.data.reduce((function(e,A){var n=wT(A)?A.signal:"data('".concat(t.lookupDataSource(A),"')");return pM(e,n)||e.push(n),e}),[]);if(i.length<=0)throw new Error("Projection's fit didn't find any data sources");return[Object.assign({name:n,size:r,fit:{signal:i.length>1?"[".concat(i.join(", "),"]"):i[0]}},A)]}return[Object.assign(Object.assign({name:n},{translate:{signal:"[width / 2, height / 2]"}}),A)]}var qK=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"],XK=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r,i){var o;return Object(F.a)(this,A),(o=e.call(this,Object.assign({},n),{name:t})).specifiedProjection=n,o.size=r,o.data=i,o.merged=!1,o}return Object(w.a)(A,[{key:"isFit",get:function(){return!!this.data}}]),A}(PV);function zK(t){t.component.projection=Bq(t)?function(t){var e;if(t.hasProjection){var A=t.specifiedProjection,n=!(A&&(null!=A.scale||null!=A.translate)),r=n?[t.getSizeSignalRef("width"),t.getSizeSignalRef("height")]:void 0,i=n?function(t){for(var e=[],A=t.encoding,n=0,r=[["longitude","latitude"],["longitude2","latitude2"]];n<r.length;n++){var i=r[n];(HH(A[i[0]])||HH(A[i[1]]))&&e.push({signal:t.getName("geojson_".concat(e.length))})}t.channelHasField(WL)&&t.typedFieldDef(WL).type===zT&&e.push({signal:t.getName("geojson_".concat(e.length))});0===e.length&&e.push(t.requestDataName(gZ));return e}(t):void 0;return new XK(t.projectionName(!0),Object.assign(Object.assign({},null!==(e=t.config.projection)&&void 0!==e?e:{}),null!==A&&void 0!==A?A:{}),r,i)}return}(t):function(t){if(0===t.children.length)return;var e,A,n=Object(R.a)(t.children);try{for(n.s();!(A=n.n()).done;){zK(A.value)}}catch(u){n.e(u)}finally{n.f()}var r=vM(t.children,(function(t){var A=t.component.projection;if(A){if(e){var n=function(t,e){var A=vM(qK,(function(A){return!Object(U.v)(t.explicit,A)&&!Object(U.v)(e.explicit,A)||!(!Object(U.v)(t.explicit,A)||!Object(U.v)(e.explicit,A)||dM(t.get(A))!==dM(e.get(A)))}));if(dM(t.size)===dM(e.size)){if(A)return t;if(dM(t.explicit)===dM({}))return e;if(dM(e.explicit)===dM({}))return t}return null}(e,A);return n&&(e=n),!!n}return e=A,!0}return!0}));if(e&&r){var i,o=t.projectionName(!0),a=new XK(o,e.specifiedProjection,e.size,hM(e.data)),s=Object(R.a)(t.children);try{for(s.s();!(i=s.n()).done;){var g=i.value,c=g.component.projection;if(c){var I;if(c.isFit)(I=a.data).push.apply(I,Object(p.a)(g.component.projection.data));g.renameProjection(c.get("name"),o),c.merged=!0}}}catch(u){s.e(u)}finally{s.f()}return a}return}(t)}var $K=A(116);function tP(t,e){return"".concat(U_(t),"_").concat(e)}function eP(t,e,A){var n,r=tP(null!==(n=WH(A,void 0))&&void 0!==n?n:{},e);return t.getName("".concat(r,"_bins"))}function AP(t,e,A){var n,r;n=function(t){return"as"in t}(t)?Object(U.H)(t.as)?[t.as,"".concat(t.as,"_end")]:[t.as[0],t.as[1]]:[RH(t,{forAs:!0}),RH(t,{binSuffix:"end",forAs:!0})];var i=Object.assign({},WH(e,void 0)),o=tP(i,t.field),a=function(t,e){return{signal:t.getName("".concat(e,"_bins")),extentSignal:t.getName("".concat(e,"_extent"))}}(A,o),s=a.signal,g=a.extentSignal;if(x_(i.extent)){var c=i.extent,I=c.selection;r=JW(A.getSelectionComponent(kM(I),I),c),delete i.extent}return{key:o,binComponent:Object.assign(Object.assign(Object.assign({bin:i,field:t.field,as:[n]},s?{signal:s}:{}),g?{extentSignal:g}:{}),r?{span:r}:{})}}var nP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).bins=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.bins))}},{key:"merge",value:function(t,e){var A,n=Object(R.a)(RM(t.bins));try{for(n.s();!(A=n.n()).done;){var r=A.value;r in this.bins?(e(t.bins[r].signal,this.bins[r].signal),this.bins[r].as=bM([].concat(Object(p.a)(this.bins[r].as),Object(p.a)(t.bins[r].as)),QM)):this.bins[r]=t.bins[r]}}catch(s){n.e(s)}finally{n.f()}var i,o=Object(R.a)(t.children);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.removeChild(a),a.parent=this}}catch(s){o.e(s)}finally{o.f()}t.remove()}},{key:"producedFields",value:function(){return new Set(UM(this.bins).map((function(t){return t.as})).flat(2))}},{key:"dependentFields",value:function(){return new Set(UM(this.bins).map((function(t){return t.field})))}},{key:"hash",value:function(){return"Bin ".concat(QM(this.bins))}},{key:"assemble",value:function(){return UM(this.bins).flatMap((function(t){var e=[],A=Object($K.a)(t.as),n=A[0],r=A.slice(1),i=t.bin,o=i.extent,a=nM(i,["extent"]),s=Object.assign(Object.assign(Object.assign({type:"bin",field:TM(t.field),as:n,signal:t.signal},x_(o)?{extent:null}:{extent:o}),t.span?{span:{signal:"span(".concat(t.span,")")}}:{}),a);!o&&t.extentSignal&&(e.push({type:"extent",field:TM(t.field),signal:t.extentSignal}),s.extent={signal:t.extentSignal}),e.push(s);var g,c=Object(R.a)(r);try{for(c.s();!(g=c.n()).done;)for(var I=g.value,u=0;u<2;u++)e.push({type:"formula",expr:RH({field:n[u]},{expr:"datum"}),as:I[u]})}catch(l){c.e(l)}finally{c.f()}return t.formula&&e.push({type:"formula",expr:t.formula,as:t.formulaAs}),e}))}}],[{key:"makeFromEncoding",value:function(t,e){var n=e.reduceFieldDef((function(t,A,n){if(vH(A)&&G_(A.bin)){var r=AP(A,A.bin,e),i=r.key,o=r.binComponent;t[i]=Object.assign(Object.assign(Object.assign({},o),t[i]),function(t,e,A,n){var r,i;if(zH(e,A)){var o=Bq(t)&&null!==(i=null!==(r=t.axis(A))&&void 0!==r?r:t.legend(A))&&void 0!==i?i:{},a=RH(e,{expr:"datum"}),s=RH(e,{expr:"datum",binSuffix:"end"});return{formulaAs:RH(e,{binSuffix:"range",forAs:!0}),formula:eH(a,s,o.format,o.formatType,n)}}return{}}(e,A,n,e.config))}return t}),{});return DM(n)?null:new A(t,n)}},{key:"makeFromTransform",value:function(t,e,n){var r=AP(e,e.bin,n),i=r.key,o=r.binComponent;return new A(t,Object(E.a)({},i,o))}}]),A}(eW),rP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t){var n,r;if(Object(F.a)(this,A),n=e.call(this,null),iZ(t=null!==t&&void 0!==t?t:{name:"source"})||(r=t.format?Object.assign({},fM(t.format,["parse"])):{}),nZ(t))n._data={values:t.values};else if(AZ(t)){if(n._data={url:t.url},!r.type){var i=/(?:\.([^.]+))?$/.exec(t.url)[1];pM(["json","csv","tsv","dsv","topojson"],i)||(i="json"),r.type=i}}else aZ(t)?n._data={values:[{type:"Sphere"}]}:(rZ(t)||iZ(t))&&(n._data={});return n._generator=iZ(t),t.name&&(n._name=t.name),r&&!DM(r)&&(n._data.format=r),n}return Object(w.a)(A,[{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(t){this._name=t}},{key:"parent",set:function(t){throw new Error("Source nodes have to be roots.")}}]),A}(eW);function iP(t){var e,A=Object(R.a)(t);try{for(A.s();!(e=A.n()).done;){var n,r=e.value,i=Object(R.a)(r.children);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.parent!==r)return console.error("Dataflow graph is inconsistent.",r,o),!1}}catch(a){i.e(a)}finally{i.f()}if(!iP(r.children))return!1}}catch(a){A.e(a)}finally{A.f()}return!0}var oP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).params=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,this.params)}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){}},{key:"hash",value:function(){return"Graticule ".concat(QM(this.params))}},{key:"assemble",value:function(){return Object.assign({type:"graticule"},!0===this.params?{}:this.params)}}]),A}(eW),aP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).params=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,this.params)}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){var t;return new Set([null!==(t=this.params.as)&&void 0!==t?t:"data"])}},{key:"hash",value:function(){return"Hash ".concat(QM(this.params))}},{key:"assemble",value:function(){return Object.assign({type:"sequence"},this.params)}}]),A}(eW);function sP(t){return t instanceof rP||t instanceof oP||t instanceof aP}var gP=function(){function t(){Object(F.a)(this,t),this._mutated=!1}return Object(w.a)(t,[{key:"setMutated",value:function(){this._mutated=!0}},{key:"mutatedFlag",get:function(){return this._mutated}}]),t}(),cP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){var t;return Object(F.a)(this,A),(t=e.call(this))._continue=!1,t}return Object(w.a)(A,[{key:"setContinue",value:function(){this._continue=!0}},{key:"reset",value:function(){}},{key:"optimizeNextFromLeaves",value:function(t){if(sP(t))return!1;var e=t.parent;return this.run(t).continueFlag&&this.optimizeNextFromLeaves(e),this.mutatedFlag}},{key:"continueFlag",get:function(){return this._continue}},{key:"flags",get:function(){return{continueFlag:this.continueFlag,mutatedFlag:this.mutatedFlag}},set:function(t){var e=t.continueFlag,A=t.mutatedFlag;e&&this.setContinue(),A&&this.setMutated()}}]),A}(gP),IP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return A}(gP);function uP(t,e,A,n){var r=Bq(n)?n.encoding[u_(e)]:void 0;if(vH(A)&&Bq(n)&&lH(e,A,r,n.stack,n.markDef,n.config))t.add(RH(A,{})),t.add(RH(A,{suffix:"end"})),A.bin&&zH(A,e)&&t.add(RH(A,{binSuffix:"range"}));else if(e in XL){var i=function(t){switch(t){case"latitude":return"y";case"latitude2":return"y2";case"longitude":return"x";case"longitude2":return"x2"}}(e);t.add(n.getName(i))}else t.add(RH(A));return t}var lP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r){var i;return Object(F.a)(this,A),(i=e.call(this,t)).dimensions=n,i.measures=r,i}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,new Set(this.dimensions),hM(this.measures))}},{key:"merge",value:function(t){return function(t,e){if(t.size!==e.size)return!1;var A,n=Object(R.a)(t);try{for(n.s();!(A=n.n()).done;){var r=A.value;if(!e.has(r))return!1}}catch(i){n.e(i)}finally{n.f()}return!0}(this.dimensions,t.dimensions)?(function(t,e){var A,n,r=Object(R.a)(RM(e));try{for(r.s();!(n=r.n()).done;){var i,o=n.value,a=e[o],s=Object(R.a)(RM(a));try{for(s.s();!(i=s.n()).done;){var g=i.value;o in t?t[o][g]=new Set([].concat(Object(p.a)(null!==(A=t[o][g])&&void 0!==A?A:[]),Object(p.a)(a[g]))):t[o]=Object(E.a)({},g,a[g])}}catch(c){s.e(c)}finally{s.f()}}}catch(c){r.e(c)}finally{r.f()}}(this.measures,t.measures),!0):(function(){var t;(t=rT).debug.apply(t,arguments)}("different dimensions, cannot merge"),!1)}},{key:"addDimensions",value:function(t){t.forEach(this.dimensions.add,this.dimensions)}},{key:"dependentFields",value:function(){return new Set([].concat(Object(p.a)(this.dimensions),Object(p.a)(RM(this.measures))))}},{key:"producedFields",value:function(){var t,e=new Set,A=Object(R.a)(RM(this.measures));try{for(A.s();!(t=A.n()).done;){var n,r=t.value,i=Object(R.a)(RM(this.measures[r]));try{for(i.s();!(n=i.n()).done;){var o=n.value,a=this.measures[r][o];0===a.size?e.add("".concat(o,"_").concat(r)):a.forEach(e.add,e)}}catch(s){i.e(s)}finally{i.f()}}}catch(s){A.e(s)}finally{A.f()}return e}},{key:"hash",value:function(){return"Aggregate ".concat(QM({dimensions:this.dimensions,measures:this.measures}))}},{key:"assemble",value:function(){var t,e=[],A=[],n=[],r=Object(R.a)(RM(this.measures));try{for(r.s();!(t=r.n()).done;){var i,o=t.value,a=Object(R.a)(RM(this.measures[o]));try{for(a.s();!(i=a.n()).done;){var s,g=i.value,c=Object(R.a)(this.measures[o][g]);try{for(c.s();!(s=c.n()).done;){var I=s.value;n.push(I),e.push(g),A.push("*"===o?null:TM(o))}}catch(u){c.e(u)}finally{c.f()}}}catch(u){a.e(u)}finally{a.f()}}}catch(u){r.e(u)}finally{r.f()}return{type:"aggregate",groupby:Object(p.a)(this.dimensions).map(TM),ops:e,fields:A,as:n}}},{key:"groupBy",get:function(){return this.dimensions}}],[{key:"makeFromEncoding",value:function(t,e){var n=!1;e.forEachFieldDef((function(t){t.aggregate&&(n=!0)}));var r={},i=new Set;return n?(e.forEachFieldDef((function(t,A){var n,o,a,s,g=t.aggregate,c=t.field;if(g)if("count"===g)r["*"]=null!==(n=r["*"])&&void 0!==n?n:{},r["*"].count=new Set([RH(t,{forAs:!0})]);else{if(GL(g)||NL(g)){var I=GL(g)?"argmin":"argmax",u=g[I];r[u]=null!==(o=r[u])&&void 0!==o?o:{},r[u][I]=new Set([RH({op:I,field:u},{forAs:!0})])}else r[c]=null!==(a=r[c])&&void 0!==a?a:{},r[c][g]=new Set([RH(t,{forAs:!0})]);F_(A)&&"unaggregated"===e.scaleDomain(A)&&(r[c]=null!==(s=r[c])&&void 0!==s?s:{},r[c].min=new Set([RH({field:c,aggregate:"min"},{forAs:!0})]),r[c].max=new Set([RH({field:c,aggregate:"max"},{forAs:!0})]))}else uP(i,A,t,e)})),i.size+RM(r).length===0?null:new A(t,i,r)):null}},{key:"makeFromTransform",value:function(t,e){var n,r,i,o,a=new Set,s={},g=Object(R.a)(e.aggregate);try{for(g.s();!(o=g.n()).done;){var c=o.value,I=c.op,u=c.field,l=c.as;I&&("count"===I?(s["*"]=null!==(n=s["*"])&&void 0!==n?n:{},s["*"].count=new Set([l||RH(c,{forAs:!0})])):(s[u]=null!==(r=s[u])&&void 0!==r?r:{},s[u][I]=new Set([l||RH(c,{forAs:!0})])))}}catch(f){g.e(f)}finally{g.f()}var C,h=Object(R.a)(null!==(i=e.groupby)&&void 0!==i?i:[]);try{for(h.s();!(C=h.n()).done;){var B=C.value;a.add(B)}}catch(f){h.e(f)}finally{h.f()}return a.size+RM(s).length===0?null:new A(t,a,s)}}]),A}(eW),CP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r,i){var o;Object(F.a)(this,A),(o=e.call(this,t)).model=n,o.name=r,o.data=i;var a,s=Object(R.a)(A_);try{for(s.s();!(a=s.n()).done;){var g=a.value,c=n.facet[g];if(c){var I=c.bin,u=c.sort;o[g]=Object.assign({name:n.getName("".concat(g,"_domain")),fields:[RH(c)].concat(Object(p.a)(G_(I)?[RH(c,{binSuffix:"end"})]:[]))},iH(u)?{sortField:u}:Object(U.A)(u)?{sortIndexField:oK(c,g)}:{})}}}catch(l){s.e(l)}finally{s.f()}return o.childModel=n.child,o}return Object(w.a)(A,[{key:"hash",value:function(){var t,e="Facet",A=Object(R.a)(A_);try{for(A.s();!(t=A.n()).done;){var n=t.value;this[n]&&(e+=" ".concat(n.charAt(0),":").concat(QM(this[n])))}}catch(r){A.e(r)}finally{A.f()}return e}},{key:"dependentFields",value:function(){var t,e=new Set(this.fields),A=Object(R.a)(A_);try{for(A.s();!(t=A.n()).done;){var n=t.value;this[n]&&(this[n].sortField&&e.add(this[n].sortField.field),this[n].sortIndexField&&e.add(this[n].sortIndexField))}}catch(r){A.e(r)}finally{A.f()}return e}},{key:"producedFields",value:function(){return new Set}},{key:"getSource",value:function(){return this.name}},{key:"getChildIndependentFieldsWithStep",value:function(){var t,e={},A=Object(R.a)(f_);try{for(A.s();!(t=A.n()).done;){var n=t.value,r=this.childModel.component.scales[n];if(r&&!r.merged){var i=r.get("type"),o=r.get("range");if(mj(i)&&ST(o)){var a=XP(zP(this.childModel,n));a?e[n]=a:aT("Unknown field for ".concat(n,". Cannot calculate view size."))}}}}catch(s){A.e(s)}finally{A.f()}return e}},{key:"assembleRowColumnHeaderData",value:function(t,e,A){var n={row:"y",column:"x"}[t],r=[],i=[],o=[];A&&A[n]&&(e?(r.push("distinct_".concat(A[n])),i.push("max")):(r.push(A[n]),i.push("distinct")),o.push("distinct_".concat(A[n])));var a=this[t],s=a.sortField,g=a.sortIndexField;if(s){var c=s.op,I=void 0===c?"min":c,u=s.field;r.push(u),i.push(I),o.push(RH(s,{forAs:!0}))}else g&&(r.push(g),i.push("max"),o.push(g));return{name:this[t].name,source:null!==e&&void 0!==e?e:this.data,transform:[Object.assign({type:"aggregate",groupby:this[t].fields},r.length?{fields:r,ops:i,as:o}:{})]}}},{key:"assembleFacetHeaderData",value:function(t){var e,A,n,r=this.model.layout.columns,i=this.model.component.layoutHeaders,o=[],a={},s=Object(R.a)(cK);try{for(s.s();!(n=s.n()).done;){var g,c=n.value,I=Object(R.a)(IK);try{for(I.s();!(g=I.n()).done;){var u,l=g.value,C=null!==(e=i[c]&&i[c][l])&&void 0!==e?e:[],h=Object(R.a)(C);try{for(h.s();!(u=h.n()).done;){if((null===(A=u.value.axes)||void 0===A?void 0:A.length)>0){a[c]=!0;break}}}catch(E){h.e(E)}finally{h.f()}}}catch(E){I.e(E)}finally{I.f()}if(a[c]){var B='length(data("'.concat(this.facet.name,'"))'),f="row"===c?r?{signal:"ceil(".concat(B," / ").concat(r,")")}:1:r?{signal:"min(".concat(B,", ").concat(r,")")}:{signal:B};o.push({name:"".concat(this.facet.name,"_").concat(c),transform:[{type:"sequence",start:0,stop:f}]})}}}catch(E){s.e(E)}finally{s.f()}var d=a.row,Q=a.column;return(d||Q)&&o.unshift(this.assembleRowColumnHeaderData("facet",null,t)),o}},{key:"assemble",value:function(){var t,e,A=[],n=null,r=this.getChildIndependentFieldsWithStep(),i=this.column,o=this.row,a=this.facet;if(i&&o&&(r.x||r.y)){n="cross_".concat(this.column.name,"_").concat(this.row.name);var s=[].concat(null!==(t=r.x)&&void 0!==t?t:[],null!==(e=r.y)&&void 0!==e?e:[]),g=s.map((function(){return"distinct"}));A.push({name:n,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:s,ops:g}]})}for(var c=0,I=[JL,_L];c<I.length;c++){var u=I[c];this[u]&&A.push(this.assembleRowColumnHeaderData(u,n,r))}if(a){var l=this.assembleFacetHeaderData(r);l&&A.push.apply(A,Object(p.a)(l))}return A}},{key:"fields",get:function(){var t,e,A=[],n=Object(R.a)(A_);try{for(n.s();!(e=n.n()).done;){var r=e.value;(null===(t=this[r])||void 0===t?void 0:t.fields)&&A.push.apply(A,Object(p.a)(this[r].fields))}}catch(i){n.e(i)}finally{n.f()}return A}}]),A}(eW);function hP(t){return"'"===t[0]&&"'"===t[t.length-1]||'"'===t[0]&&'"'===t[t.length-1]?t.slice(1,-1):t}function BP(t,e){var A=LM(t);if("number"===e)return"toNumber(".concat(A,")");if("boolean"===e)return"toBoolean(".concat(A,")");if("string"===e)return"toString(".concat(A,")");if("date"===e)return"toDate(".concat(A,")");if("flatten"===e)return A;if(0===e.indexOf("date:")){var n=hP(e.slice(5,e.length));return"timeParse(".concat(A,",'").concat(n,"')")}if(0===e.indexOf("utc:")){var r=hP(e.slice(4,e.length));return"utcParse(".concat(A,",'").concat(r,"')")}return aT(f.unrecognizedParse(e)),null}function fP(t){var e={};return function t(e,A){if(uM(e))t(e.not,A);else if(IM(e)){var n,r=Object(R.a)(e.and);try{for(r.s();!(n=r.n()).done;){t(n.value,A)}}catch(a){r.e(a)}finally{r.f()}}else if(cM(e)){var i,o=Object(R.a)(e.or);try{for(o.s();!(i=o.n()).done;){t(i.value,A)}}catch(a){o.e(a)}finally{o.f()}}else A(e)}(t.filter,(function(t){var A;if(TT(t)){var n=null;NT(t)?n=t.equal:LT(t)?n=t.range[0]:_T(t)&&(n=(null!==(A=t.oneOf)&&void 0!==A?A:t.in)[0]),n&&(sT(n)?e[t.field]="date":Object(U.E)(n)?e[t.field]="number":Object(U.H)(n)&&(e[t.field]="string")),t.timeUnit&&(e[t.field]="date")}})),e}function dP(t){var e={};function A(t){var A;PH(t)?e[t.field]="date":"quantitative"===t.type&&(A=t.aggregate,Object(U.H)(A)&&pM(["min","max"],A))?e[t.field]="number":YM(t.field)>1?t.field in e||(e[t.field]="flatten"):bH(t)&&iH(t.sort)&&YM(t.sort.field)>1&&(t.sort.field in e||(e[t.sort.field]="flatten"))}if((Bq(t)||fq(t))&&t.forEachFieldDef((function(e,n){if(vH(e))A(e);else{var r=c_(n),i=t.fieldDef(r);A(Object.assign(Object.assign({},e),{type:i.type}))}})),Bq(t)){var n=t.mark,r=t.markDef,i=t.encoding;if(QL(n)&&!t.encoding.order){var o=i["horizontal"===r.orient?"y":"x"];fH(o)&&"quantitative"===o.type&&!(o.field in e)&&(e[o.field]="number")}}return e}var QP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t))._parse=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this._parse))}},{key:"hash",value:function(){return"Parse ".concat(QM(this._parse))}},{key:"merge",value:function(t){this._parse=Object.assign(Object.assign({},this._parse),t.parse),t.remove()}},{key:"assembleFormatParse",value:function(){var t,e={},A=Object(R.a)(RM(this._parse));try{for(A.s();!(t=A.n()).done;){var n=t.value,r=this._parse[n];1===YM(n)&&(e[n]=r)}}catch(i){A.e(i)}finally{A.f()}return e}},{key:"producedFields",value:function(){return new Set(RM(this._parse))}},{key:"dependentFields",value:function(){return new Set(RM(this._parse))}},{key:"assembleTransforms",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return RM(this._parse).filter((function(t){return!e||YM(t)>1})).map((function(e){var A=BP(e,t._parse[e]);return A?{type:"formula",expr:A,as:HM(e)}:null})).filter((function(t){return null!==t}))}},{key:"parse",get:function(){return this._parse}}],[{key:"makeExplicit",value:function(t,e,A){var n={},r=e.data;return!iZ(r)&&r&&r.format&&r.format.parse&&(n=r.format.parse),this.makeWithAncestors(t,n,{},A)}},{key:"makeWithAncestors",value:function(t,e,n,r){var i,o=Object(R.a)(RM(n));try{for(o.s();!(i=o.n()).done;){var a=i.value,s=r.getWithExplicit(a);void 0!==s.value&&(s.explicit||s.value===n[a]||"derived"===s.value||"flatten"===n[a]?delete n[a]:aT(f.differentParse(a,n[a],s.value)))}}catch(E){o.e(E)}finally{o.f()}var g,c=Object(R.a)(RM(e));try{for(c.s();!(g=c.n()).done;){var I=g.value,u=r.get(I);void 0!==u&&(u===e[I]?delete e[I]:aT(f.differentParse(I,e[I],u)))}}catch(E){c.e(E)}finally{c.f()}var l=new PV(e,n);r.copyAll(l);var C,h={},B=Object(R.a)(RM(l.combine()));try{for(B.s();!(C=B.n()).done;){var d=C.value,Q=l.get(d);null!==Q&&(h[d]=Q)}}catch(E){B.e(E)}finally{B.f()}return 0===RM(h).length||r.parseNothing?null:new A(t,h)}}]),A}(eW),EP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t){return Object(F.a)(this,A),e.call(this,t)}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null)}}]),Object(w.a)(A,[{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_"}}}]),A}(eW),pP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"addDimensions",value:function(t){this.transform.groupby=bM(this.transform.groupby.concat(t),(function(t){return t}))}},{key:"dependentFields",value:function(){var t=new Set;return this.transform.groupby&&this.transform.groupby.forEach(t.add,t),this.transform.joinaggregate.map((function(t){return t.field})).filter((function(t){return void 0!==t})).forEach(t.add,t),t}},{key:"producedFields",value:function(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}},{key:"getDefaultName",value:function(t){var e;return null!==(e=t.as)&&void 0!==e?e:RH(t)}},{key:"hash",value:function(){return"JoinAggregateTransform ".concat(QM(this.transform))}},{key:"assemble",value:function(){var t,e=[],A=[],n=[],r=Object(R.a)(this.transform.joinaggregate);try{for(r.s();!(t=r.n()).done;){var i=t.value;A.push(i.op),n.push(this.getDefaultName(i)),e.push(void 0===i.field?null:i.field)}}catch(a){r.e(a)}finally{r.f()}var o=this.transform.groupby;return Object.assign({type:"joinaggregate",as:n,ops:A,fields:e},void 0!==o?{groupby:o}:{})}}]),A}(eW);var yP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t))._stack=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this._stack))}},{key:"addDimensions",value:function(t){var e;(e=this._stack.facetby).push.apply(e,Object(p.a)(t))}},{key:"dependentFields",value:function(){var t=new Set;return t.add(this._stack.stackField),this.getGroupbyFields().forEach(t.add,t),this._stack.facetby.forEach(t.add,t),this._stack.sort.field.forEach(t.add,t),t}},{key:"producedFields",value:function(){return new Set(this._stack.as)}},{key:"hash",value:function(){return"Stack ".concat(QM(this._stack))}},{key:"getGroupbyFields",value:function(){var t=this._stack,e=t.dimensionFieldDef,A=t.impute,n=t.groupby;return e?e.bin?A?[RH(e,{binSuffix:"mid"})]:[RH(e,{}),RH(e,{binSuffix:"end"})]:[RH(e)]:null!==n&&void 0!==n?n:[]}},{key:"assemble",value:function(){var t=[],e=this._stack,A=e.facetby,n=e.dimensionFieldDef,r=e.stackField,i=e.stackby,o=e.sort,a=e.offset,s=e.impute,g=e.as;if(s&&n){var c=n.band,I=void 0===c?.5:c;n.bin&&t.push({type:"formula",expr:"".concat(I,"*")+RH(n,{expr:"datum"})+"+".concat(1-I,"*")+RH(n,{expr:"datum",binSuffix:"end"}),as:RH(n,{binSuffix:"mid",forAs:!0})}),t.push({type:"impute",field:r,groupby:[].concat(Object(p.a)(i),Object(p.a)(A)),key:RH(n,{binSuffix:"mid"}),method:"value",value:0})}return t.push({type:"stack",groupby:[].concat(Object(p.a)(this.getGroupbyFields()),Object(p.a)(A)),field:r,sort:o,as:g,offset:a}),t}},{key:"stack",get:function(){return this._stack}}],[{key:"makeFromTransform",value:function(t,e){var n=e.stack,r=e.groupby,i=e.as,o=e.offset,a=void 0===o?"zero":o,s=[],g=[];if(void 0!==e.sort){var c,I=Object(R.a)(e.sort);try{for(I.s();!(c=I.n()).done;){var u=c.value;s.push(u.field),g.push(VM(u.order,"ascending"))}}catch(l){I.e(l)}finally{I.f()}}return new A(t,{stackField:n,groupby:r,offset:a,sort:{field:s,order:g},facetby:[],as:function(t){return Object(U.A)(t)&&t.every((function(t){return Object(U.H)(t)}))&&t.length>1}(i)?i:Object(U.H)(i)?[i,i+"_end"]:[e.stack+"_start",e.stack+"_end"]})}},{key:"makeFromEncoding",value:function(t,e){var n=e.stack,r=e.encoding;if(!n)return null;var i,o=n.groupbyChannel,a=n.fieldChannel,s=n.offset,g=n.impute;o&&(i=jH(r[o]));var c,I=function(t){return t.stack.stackBy.reduce((function(t,e){var A=RH(e.fieldDef);return A&&t.push(A),t}),[])}(e),u=e.encoding.order;return c=Object(U.A)(u)||fH(u)?gY(u):I.reduce((function(t,e){return t.field.push(e),t.order.push("y"===a?"descending":"ascending"),t}),{field:[],order:[]}),new A(t,{dimensionFieldDef:i,stackField:e.vgField(a),facetby:[],stackby:I,sort:c,offset:s,impute:g,as:[e.vgField(a,{suffix:"start",forAs:!0}),e.vgField(a,{suffix:"end",forAs:!0})]})}}]),A}(eW),vP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"addDimensions",value:function(t){this.transform.groupby=bM(this.transform.groupby.concat(t),(function(t){return t}))}},{key:"dependentFields",value:function(){var t,e,A=new Set;return(null!==(t=this.transform.groupby)&&void 0!==t?t:[]).forEach(A.add,A),(null!==(e=this.transform.sort)&&void 0!==e?e:[]).forEach((function(t){return A.add(t.field)})),this.transform.window.map((function(t){return t.field})).filter((function(t){return void 0!==t})).forEach(A.add,A),A}},{key:"producedFields",value:function(){return new Set(this.transform.window.map(this.getDefaultName))}},{key:"getDefaultName",value:function(t){var e;return null!==(e=t.as)&&void 0!==e?e:RH(t)}},{key:"hash",value:function(){return"WindowTransform ".concat(QM(this.transform))}},{key:"assemble",value:function(){var t,e,A=[],n=[],r=[],i=[],o=Object(R.a)(this.transform.window);try{for(o.s();!(e=o.n()).done;){var a=e.value;n.push(a.op),r.push(this.getDefaultName(a)),i.push(void 0===a.param?null:a.param),A.push(void 0===a.field?null:a.field)}}catch(f){o.e(f)}finally{o.f()}var s=this.transform.frame,g=this.transform.groupby;if(s&&null===s[0]&&null===s[1]&&n.every((function(t){return kL(t)})))return Object.assign({type:"joinaggregate",as:r,ops:n,fields:A},void 0!==g?{groupby:g}:{});var c=[],I=[];if(void 0!==this.transform.sort){var u,l=Object(R.a)(this.transform.sort);try{for(l.s();!(u=l.n()).done;){var C=u.value;c.push(C.field),I.push(null!==(t=C.order)&&void 0!==t?t:"ascending")}}catch(f){l.e(f)}finally{l.f()}}var h={field:c,order:I},B=this.transform.ignorePeers;return Object.assign(Object.assign(Object.assign({type:"window",params:i,as:r,ops:n,fields:A,sort:h},void 0!==B?{ignorePeers:B}:{}),void 0!==g?{groupby:g}:{}),void 0!==s?{frame:s}:{})}}]),A}(eW),mP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"run",value:function(t){var e=t.parent;if(t instanceof QP){if(sP(e))return this.flags;if(e.numChildren()>1)return this.setContinue(),this.flags;if(e instanceof QP)this.setMutated(),e.merge(t);else{if(SM(e.producedFields(),t.dependentFields()))return this.setContinue(),this.flags;this.setMutated(),t.swapWithParent()}}return this.setContinue(),this.flags}}]),A}(cP),bP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"mergeNodes",value:function(t,e){var A,n=e.shift(),r=Object(R.a)(e);try{for(r.s();!(A=r.n()).done;){var i=A.value;t.removeChild(i),i.parent=n,i.remove()}}catch(o){r.e(o)}finally{r.f()}}},{key:"run",value:function(t){for(var e=t.children.map((function(t){return t.hash()})),A={},n=0;n<e.length;n++)void 0===A[e[n]]?A[e[n]]=[t.children[n]]:A[e[n]].push(t.children[n]);var r,i=Object(R.a)(RM(A));try{for(i.s();!(r=i.n()).done;){var o=r.value;A[o].length>1&&(this.setMutated(),this.mergeNodes(t,A[o]))}}catch(c){i.e(c)}finally{i.f()}var a,s=Object(R.a)(t.children);try{for(s.s();!(a=s.n()).done;){var g=a.value;this.run(g)}}catch(c){s.e(c)}finally{s.f()}return this.mutatedFlag}}]),A}(IP),FP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"run",value:function(t){return t instanceof AW||t.numChildren()>0||t instanceof CP||(this.setMutated(),t.remove()),this.flags}}]),A}(cP),wP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){var t;return Object(F.a)(this,A),(t=e.apply(this,arguments)).fields=new Set,t.prev=null,t}return Object(w.a)(A,[{key:"run",value:function(t){if(this.setContinue(),t instanceof nW){var e=t.producedFields();FM(e,this.fields)?(this.setMutated(),this.prev.remove()):this.fields=new Set([].concat(Object(p.a)(this.fields),Object(p.a)(e))),this.prev=t}return this.flags}},{key:"reset",value:function(){this.fields.clear()}}]),A}(cP),SP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"run",value:function(t){this.setContinue();var e,A=t.parent.children.filter((function(t){return t instanceof nW})),n=A.pop(),r=Object(R.a)(A);try{for(r.s();!(e=r.n()).done;){var i=e.value;this.setMutated(),n.merge(i)}}catch(o){r.e(o)}finally{r.f()}return this.flags}}]),A}(cP);function DP(t){if(t instanceof CP)if(1!==t.numChildren()||t.children[0]instanceof AW){var e=t.model.component.data.main;!function t(e){if(e instanceof AW&&e.type===gZ&&1===e.numChildren()){var A=e.children[0];A instanceof CP||(A.swapWithParent(),t(e))}}(e);var A,n=(a=t,function t(e){if(!(e instanceof CP)){var A=e.clone();if(A instanceof AW){var n=OP+A.getSource();A.setSource(n),a.model.component.data.outputNodes[n]=A}else(A instanceof lP||A instanceof yP||A instanceof vP||A instanceof pP)&&A.addDimensions(a.fields);var r,i=Object(R.a)(e.children.flatMap(t));try{for(i.s();!(r=i.n()).done;)r.value.parent=A}catch(o){i.e(o)}finally{i.f()}return[A]}return e.children.flatMap(t)}),r=t.children.map(n).flat(),i=Object(R.a)(r);try{for(i.s();!(A=i.n()).done;){A.value.parent=e}}catch(s){i.e(s)}finally{i.f()}}else{var o=t.children[0];(o instanceof lP||o instanceof yP||o instanceof vP||o instanceof pP)&&o.addDimensions(t.fields),o.swapWithParent(),DP(t)}else t.children.map(DP);var a}var RP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.call(this)}return Object(w.a)(A,[{key:"run",value:function(t){t instanceof AW&&!t.isRequired()&&(this.setMutated(),t.remove());var e,A=Object(R.a)(t.children);try{for(A.s();!(e=A.n()).done;){var n=e.value;this.run(n)}}catch(r){A.e(r)}finally{A.f()}return this.mutatedFlag}}]),A}(IP),UP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t){var n;return Object(F.a)(this,A),(n=e.call(this)).requiresSelectionId=t&&OW(t),n}return Object(w.a)(A,[{key:"run",value:function(t){t instanceof EP&&(this.requiresSelectionId&&(sP(t.parent)||t.parent instanceof lP||t.parent instanceof QP)||(this.setMutated(),t.remove()));var e,A=Object(R.a)(t.children);try{for(A.s();!(e=A.n()).done;){var n=e.value;this.run(n)}}catch(r){A.e(r)}finally{A.f()}return this.mutatedFlag}}]),A}(IP),GP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"run",value:function(t){var e=t.parent,A=Object(p.a)(e.children),n=e.children.filter((function(t){return t instanceof QP}));if(e.numChildren()>1&&n.length>=1){var r,i={},o=new Set,a=Object(R.a)(n);try{for(a.s();!(r=a.n()).done;){var s,g=r.value.parse,c=Object(R.a)(RM(g));try{for(c.s();!(s=c.n()).done;){var I=s.value;I in i?i[I]!==g[I]&&o.add(I):i[I]=g[I]}}catch(y){c.e(y)}finally{c.f()}}}catch(y){a.e(y)}finally{a.f()}var u,l=Object(R.a)(o);try{for(l.s();!(u=l.n()).done;){delete i[u.value]}}catch(y){l.e(y)}finally{l.f()}if(!DM(i)){this.setMutated();var C,h=new QP(e,i),B=Object(R.a)(A);try{for(B.s();!(C=B.n()).done;){var f=C.value;if(f instanceof QP){var d,Q=Object(R.a)(RM(i));try{for(Q.s();!(d=Q.n()).done;){var E=d.value;delete f.parse[E]}}catch(y){Q.e(y)}finally{Q.f()}}e.removeChild(f),f.parent=h,f instanceof QP&&0===RM(f.parse).length&&f.remove()}}catch(y){B.e(y)}finally{B.f()}}}return this.setContinue(),this.flags}}]),A}(cP),NP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"run",value:function(t){var e,A=t.parent,n=A.children.filter((function(t){return t instanceof lP})),r={},i=Object(R.a)(n);try{for(i.s();!(e=i.n()).done;){var o=e.value,a=QM(o.groupBy);a in r||(r[a]=[]),r[a].push(o)}}catch(h){i.e(h)}finally{i.f()}var s,g=Object(R.a)(RM(r));try{for(g.s();!(s=g.n()).done;){var c=r[s.value];if(c.length>1){var I,u=c.pop(),l=Object(R.a)(c);try{for(l.s();!(I=l.n()).done;){var C=I.value;u.merge(C)&&(A.removeChild(C),C.parent=u,C.remove(),this.setMutated())}}catch(h){l.e(h)}finally{l.f()}}}}catch(h){g.e(h)}finally{g.f()}return this.setContinue(),this.flags}}]),A}(cP),kP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t){var n;return Object(F.a)(this,A),(n=e.call(this)).model=t,n}return Object(w.a)(A,[{key:"run",value:function(t){var e,A=t.parent,n=!(sP(A)||A instanceof LW||A instanceof QP||A instanceof EP),r=[],i=[],o=Object(R.a)(A.children);try{for(o.s();!(e=o.n()).done;){var a=e.value;a instanceof nP&&(n&&!SM(A.producedFields(),a.dependentFields())?r.push(a):i.push(a))}}catch(B){o.e(B)}finally{o.f()}if(r.length>0){var s,g=r.pop(),c=Object(R.a)(r);try{for(c.s();!(s=c.n()).done;){var I=s.value;g.merge(I,this.model.renameSignal.bind(this.model))}}catch(B){c.e(B)}finally{c.f()}this.setMutated(),A instanceof nP?A.merge(g,this.model.renameSignal.bind(this.model)):g.swapWithParent()}if(i.length>1){var u,l=i.pop(),C=Object(R.a)(i);try{for(C.s();!(u=C.n()).done;){var h=u.value;l.merge(h,this.model.renameSignal.bind(this.model))}}catch(B){C.e(B)}finally{C.f()}this.setMutated()}return this.setContinue(),this.flags}}]),A}(cP),xP=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"run",value:function(t){var e=t.parent,A=Object(p.a)(e.children);if(!yM(A,(function(t){return t instanceof AW}))||e.numChildren()<=1)return this.setContinue(),this.flags;var n,r,i=[],o=Object(R.a)(A);try{for(o.s();!(r=o.n()).done;){var a=r.value;if(a instanceof AW){for(var s=a;1===s.numChildren();){var g=s.children[0];if(!(g instanceof AW))break;s=g}i.push.apply(i,Object(p.a)(s.children)),n?(e.removeChild(a),a.parent=n.parent,n.parent.removeChild(n),n.parent=s,this.setMutated()):n=s}else i.push(a)}}catch(l){o.e(l)}finally{o.f()}if(i.length){this.setMutated();var c,I=Object(R.a)(i);try{for(I.s();!(c=I.n()).done;){var u=c.value;u.parent.removeChild(u),u.parent=n}}catch(l){I.e(l)}finally{I.f()}}return this.setContinue(),this.flags}}]),A}(cP),OP="scale_";function MP(t){var e=[];function A(t){if(0===t.numChildren())e.push(t);else{var n,r=Object(R.a)(t.children);try{for(r.s();!(n=r.n()).done;){A(n.value)}}catch(i){r.e(i)}finally{r.f()}}}var n,r=Object(R.a)(t);try{for(r.s();!(n=r.n()).done;){A(n.value)}}catch(i){r.e(i)}finally{r.f()}return e}function LP(t){return t}function _P(t,e){return e.map((function(e){if(t instanceof cP){var A=t.optimizeNextFromLeaves(e);return t.reset(),A}return t.run(e)})).some(LP)}function JP(t,e){var A=t.sources,n=new Set;return n.add(_P(new RP,A)),n.add(_P(new UP(e),A)),A=A.filter((function(t){return t.numChildren()>0})),n.add(_P(new FP,MP(A))),A=A.filter((function(t){return t.numChildren()>0})),n.add(_P(new mP,MP(A))),n.add(_P(new kP(e),MP(A))),n.add(_P(new wP,MP(A))),n.add(_P(new GP,MP(A))),n.add(_P(new NP,MP(A))),n.add(_P(new SP,MP(A))),n.add(_P(new bP,A)),n.add(_P(new xP,MP(A))),t.sources=A,n.has(!0)}function TP(t,e){iP(t.sources);for(var A=0,n=0,r=0;r<5&&JP(t,e);r++)A++;t.sources.map(DP);for(var i=0;i<5&&JP(t,e);i++)n++;iP(t.sources),5===Math.max(A,n)&&aT("Maximum optimization runs(".concat(5,") reached."))}var jP=function(){function t(e){Object(F.a)(this,t),Object.defineProperty(this,"signal",{enumerable:!0,get:e})}return Object(w.a)(t,null,[{key:"fromName",value:function(e,A){return new t((function(){return e(A)}))}}]),t}();function HP(t){Bq(t)?function(t){var e,A=t.component.scales,n=Object(R.a)(RM(A));try{for(n.s();!(e=n.n()).done;){var r=e.value,i=YP(t,r);if(A[r].setWithExplicit("domains",i),KP(t,r),t.component.data.isFaceted){for(var o=t;!fq(o)&&o.parent;)o=o.parent;if("shared"===o.component.resolve.scale[r]){var a,s=Object(R.a)(i.value);try{for(s.s();!(a=s.n()).done;){var g=a.value;DT(g)&&(g.data=OP+g.data.replace(OP,""))}}catch(c){s.e(c)}finally{s.f()}}}}}catch(c){n.e(c)}finally{n.f()}}(t):function(t){var e,A=Object(R.a)(t.children);try{for(A.s();!(e=A.n()).done;){HP(e.value)}}catch(l){A.e(l)}finally{A.f()}var n,r=t.component.scales,i=Object(R.a)(RM(r));try{for(i.s();!(n=i.n()).done;){var o,a=n.value,s=void 0,g=null,c=Object(R.a)(t.children);try{for(c.s();!(o=c.n()).done;){var I=o.value.component.scales[a];if(I){s=void 0===s?I.getWithExplicit("domains"):tZ(s,I.getWithExplicit("domains"),"domains","scale",qP);var u=I.get("selectionExtent");g&&u&&g.selection!==u.selection&&aT("The same selection must be used to override scale domains in a layered view."),g=u}}}catch(l){c.e(l)}finally{c.f()}r[a].setWithExplicit("domains",s),g&&r[a].set("selectionExtent",g,!0)}}catch(l){i.e(l)}finally{i.f()}}(t)}function YP(t,e){var A=t.getScaleComponent(e).get("type"),n=t.encoding,r=function(t,e,A,n){if("unaggregated"===t){var r=PP(e,A),i=r.valid,o=r.reason;if(!i)return void aT(o)}else if(void 0===t&&n.useUnaggregatedDomain){if(PP(e,A).valid)return"unaggregated"}return t}(t.scaleDomain(e),t.typedFieldDef(e),A,t.config.scale);return r!==t.scaleDomain(e)&&(t.specifiedScales[e]=Object.assign(Object.assign({},t.specifiedScales[e]),{domain:r})),"x"===e&&HH(n.x2)?HH(n.x)?tZ(ZP(A,r,t,"x"),ZP(A,r,t,"x2"),"domain","scale",qP):ZP(A,r,t,"x2"):"y"===e&&HH(n.y2)?HH(n.y)?tZ(ZP(A,r,t,"y"),ZP(A,r,t,"y2"),"domain","scale",qP):ZP(A,r,t,"y2"):ZP(A,r,t,e)}function VP(t,e,A){var n,r=null===(n=bT(A))||void 0===n?void 0:n.unit;return"temporal"===e||r?function(t,e,A){return t.map((function(t){var n=qH(t,{timeUnit:A,type:e});return{signal:"{data: ".concat(n,"}")}}))}(t,e,r):[t]}function ZP(t,e,A,n){var r=HH(A.encoding[n]),i=r.type,o=r.timeUnit;if(function(t){return t&&t.unionWith}(e)){var a=ZP(t,void 0,A,n),s=VP(e.unionWith,i,o);return qV([].concat(Object(p.a)(a.value),Object(p.a)(s)))}if(wT(e))return qV([e]);if(e&&"unaggregated"!==e&&!Sj(e))return qV(VP(e,i,o));var g=A.stack;if(g&&n===g.fieldChannel){if("normalize"===g.offset)return XV([[0,1]]);var c=A.requestDataName(gZ);return XV([{data:c,field:A.vgField(n,{suffix:"start"})},{data:c,field:A.vgField(n,{suffix:"end"})}])}var I=F_(n)&&fH(r)?function(t,e,A){if(!mj(A))return;var n=t.fieldDef(e),r=n.sort;if(oH(r))return{op:"min",field:oK(n,e),order:"ascending"};var i=t.stack,o=i?[].concat(Object(p.a)(i.groupbyField?[i.groupbyField]:[]),Object(p.a)(i.stackBy.map((function(t){return t.fieldDef.field})))):void 0;if(iH(r)){var a=i&&!pM(o,r.field);return WP(r,a)}if(rH(r)){var s=r.encoding,g=r.order,c=t.fieldDef(s),I=c.aggregate,u=c.field,l=i&&!pM(o,u);if(GL(I)||NL(I))return WP({field:RH(c),order:g},l);if(kL(I)||!I)return WP({op:I,field:u,order:g},l)}else{if("descending"===r)return{op:"min",field:t.vgField(e),order:"descending"};if(pM(["ascending",void 0],r))return!0}return}(A,n,t):void 0;if(QH(r))return XV(VP([r.datum],i,o));var u=r;if("unaggregated"===e){var l=A.requestDataName(gZ),C=r.field;return XV([{data:l,field:RH({field:C,aggregate:"min"})},{data:l,field:RH({field:C,aggregate:"max"})}])}if(G_(u.bin)){if(mj(t))return XV("bin-ordinal"===t?[]:[{data:NM(I)?A.requestDataName(gZ):A.requestDataName("raw"),field:A.vgField(n,zH(u,n)?{binSuffix:"range"}:{}),sort:!0!==I&&Object(U.F)(I)?I:{field:A.vgField(n,{}),op:"min"}}]);var h=u.bin;if(G_(h)){var B=eP(A,u.field,h);return XV([new jP((function(){var t=A.getSignalName(B);return"[".concat(t,".start, ").concat(t,".stop]")}))])}return XV([{data:A.requestDataName(gZ),field:A.vgField(n,{})}])}if(u.timeUnit&&pM(["time","utc"],t)&&lH(n,u,Bq(A)?A.encoding[u_(n)]:void 0,A.stack,A.markDef,A.config)){var f=A.requestDataName(gZ);return XV([{data:f,field:A.vgField(n)},{data:f,field:A.vgField(n,{suffix:"end"})}])}return XV(I?[{data:NM(I)?A.requestDataName(gZ):A.requestDataName("raw"),field:A.vgField(n),sort:I}]:[{data:A.requestDataName(gZ),field:A.vgField(n)}])}function WP(t,e){var A=t.op,n=t.field,r=t.order;return Object.assign(Object.assign({op:null!==A&&void 0!==A?A:e?"sum":"min"},n?{field:TM(n)}:{}),r?{order:r}:{})}function KP(t,e){var A,n=t.component.scales[e],r=t.specifiedScales[e].domain,i=null===(A=t.fieldDef(e))||void 0===A?void 0:A.bin,o=Sj(r)&&r,a=k_(i)&&x_(i.extent)&&i.extent;(o||a)&&n.set("selectionExtent",null!==o&&void 0!==o?o:a,!0)}function PP(t,e){var A=t.aggregate,n=t.type;return A?Object(U.H)(A)&&!LL[A]?{valid:!1,reason:f.unaggregateDomainWithNonSharedDomainOp(A)}:"quantitative"===n&&"log"===e?{valid:!1,reason:f.unaggregatedDomainWithLogScale(t)}:{valid:!0}:{valid:!1,reason:f.unaggregateDomainHasNoEffectForRawField(t)}}function qP(t,e,A,n){return t.explicit&&e.explicit&&aT(f.mergeConflictingDomainProperty(A,n,t.value,e.value)),{explicit:t.explicit,value:[].concat(Object(p.a)(t.value),Object(p.a)(e.value))}}function XP(t){if(DT(t)&&Object(U.H)(t.field))return t.field;if(function(t){return!Object(U.A)(t)&&("fields"in t&&!("data"in t))}(t)){var e,A,n=Object(R.a)(t.fields);try{for(n.s();!(A=n.n()).done;){var r=A.value;if(DT(r)&&Object(U.H)(r.field))if(e){if(e!==r.field)return aT(f.FACETED_INDEPENDENT_DIFFERENT_SOURCES),e}else e=r.field}}catch(o){n.e(o)}finally{n.f()}return aT(f.FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES),e}if(function(t){return!Object(U.A)(t)&&("fields"in t&&"data"in t)}(t)){aT(f.FACETED_INDEPENDENT_SAME_SOURCE);var i=t.fields[0];return Object(U.H)(i)?i:void 0}}function zP(t,e){return function(t){var e=bM(t.map((function(t){if(DT(t)){t.sort;return nM(t,["sort"])}return t})),QM),A=bM(t.map((function(t){if(DT(t)){var e=t.sort;return void 0===e||NM(e)||("op"in e&&"count"===e.op&&delete e.field,"ascending"===e.order&&delete e.order),e}})).filter((function(t){return void 0!==t})),QM);if(0!==e.length){if(1===e.length){var n=t[0];if(DT(n)&&A.length>0){var r=A[0];if(A.length>1)aT(f.MORE_THAN_ONE_SORT),r=!0;else if(Object(U.F)(r)&&"field"in r){var i=r.field;n.field===i&&(r=!r.order||{order:r.order})}return Object.assign(Object.assign({},n),{sort:r})}return n}var o,a=bM(A.map((function(t){return NM(t)||!("op"in t)||t.op in UL?t:(aT(f.domainSortDropped(t)),!0)})),QM);1===a.length?o=a[0]:a.length>1&&(aT(f.MORE_THAN_ONE_SORT),o=!0);var s=bM(t.map((function(t){return DT(t)?t.data:null})),(function(t){return t}));return 1===s.length&&null!==s[0]?Object.assign({data:s[0],fields:e.map((function(t){return t.field}))},o?{sort:o}:{}):Object.assign({fields:e},o?{sort:o}:{})}}(t.component.scales[e].get("domains").map((function(e){return DT(e)&&(e.data=t.lookupDataSource(e.data)),e})))}function $P(t){return Qq(t)||dq(t)?t.children.reduce((function(t,e){return t.concat($P(e))}),tq(t)):tq(t)}function tq(t){return RM(t.component.scales).reduce((function(e,A){var n=t.component.scales[A];if(n.merged)return e;var r,i=n.combine(),o=i.name,a=i.type,s=i.selectionExtent,g=(i.domains,i.range,i.reverse),c=nM(i,["name","type","selectionExtent","domains","range","reverse"]),I=function(t,e,A){if(d_(A)&&ST(t))return{step:{signal:e+"_step"}};return t}(i.range,o,A);s&&(r=function(t,e){var A=e.selection;return{signal:JW(t.getSelectionComponent(A,kM(A)),e)}}(t,s));var u=zP(t,A);return e.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:o,type:a},u?{domain:u}:{}),r?{domainRaw:r}:{}),{range:I}),void 0!==g?{reverse:g}:{}),c)),e}),[])}var eq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,{},{name:t})).merged=!1,r.setWithExplicit("type",n),r}return Object(w.a)(A,[{key:"domainDefinitelyIncludesZero",value:function(){return!1!==this.get("zero")||yM(this.get("domains"),(function(t){return Object(U.A)(t)&&2===t.length&&t[0]<=0&&t[1]>=0}))}}]),A}(PV),Aq=["range","scheme"];function nq(t){return"x"===t?"width":"y"===t?"height":void 0}function rq(t,e){var A=t.fieldDef(e);if(A&&A.bin&&G_(A.bin)){var n=eP(t,A.field,A.bin),r=nq(e),i=t.getName(r);return new jP((function(){var e=t.getSignalName(n),A="(".concat(e,".stop - ").concat(e,".start) / ").concat(e,".step");return"".concat(t.getSignalName(i)," / (").concat(A,")")}))}}function iq(t,e){var A,n=e.specifiedScales[t],r=e.size,i=e.getScaleComponent(t).get("type"),o=Object(R.a)(Aq);try{for(o.s();!(A=o.n()).done;){var a=A.value;if(void 0!==n[a]){var s=Gj(i,a),g=Nj(t,a);if(s)if(g)aT(g);else switch(a){case"range":return Object(U.A)(n.range)&&d_(t)?qV(n.range.map((function(t){if("width"===t||"height"===t){var A=e.getName(t),n=e.getSignalName.bind(e);return jP.fromName(n,A)}return t}))):qV(n.range);case"scheme":return qV(oq(n[a]))}else aT(f.scalePropertyNotWorkWithScaleType(i,a,t))}}}catch(u){o.e(u)}finally{o.f()}if("x"===t||"y"===t){var c="x"===t?"width":"height",I=r[c];if(XY(I)){if(mj(i))return qV({step:I.step});aT(f.stepDropped(c))}}return XV(function(t,e){var A=e.size,n=e.config,r=e.mark,i=e.encoding,o=e.getSignalName.bind(e),a=HH(i[t]).type,s=e.getScaleComponent(t).get("type"),g=e.specifiedScales[t],c=g.domain,I=g.domainMid;switch(t){case"x":case"y":if(pM(["point","band"],s))if("x"!==t||A.width){if("y"===t&&!A.height){var u=AV(n.view,"height");if(XY(u))return u}}else{var l=AV(n.view,"width");if(XY(l))return l}var C=nq(t),h=e.getName(C);return"y"===t&&bj(s)?[jP.fromName(o,h),0]:[0,jP.fromName(o,h)];case KL:var B=e.component.scales[t].get("zero"),d=function t(e,A,n){if(A)return wT(A)?{signal:"".concat(A.signal," ? 0 : ").concat(t(e,!1,n))}:0;switch(e){case"bar":case"tick":return n.scale.minBandSize;case"line":case"trail":case"rule":return n.scale.minStrokeWidth;case"text":return n.scale.minFontSize;case"point":case"square":case"circle":return n.scale.minSize}throw new Error(f.incompatibleChannel("size",e))}(r,B,n),Q=function(t,e,A,n){var r={x:rq(A,"x"),y:rq(A,"y")};switch(t){case"bar":case"tick":if(void 0!==n.scale.maxBandSize)return n.scale.maxBandSize;var i=aq(e,r,n.view);return Object(U.E)(i)?i-1:new jP((function(){return"".concat(i.signal," - 1")}));case"line":case"trail":case"rule":return n.scale.maxStrokeWidth;case"text":return n.scale.maxFontSize;case"point":case"square":case"circle":if(n.scale.maxSize)return n.scale.maxSize;var o=aq(e,r,n.view);return Object(U.E)(o)?Math.pow(.95*o,2):new jP((function(){return"pow(".concat(.95," * ").concat(o.signal,", 2)")}))}throw new Error(f.incompatibleChannel("size",t))}(r,A,e,n);return wj(s)?function(t,e,A){var n=function(){var n=nY(e),r=nY(t),i="(".concat(n," - ").concat(r,") / (").concat(A," - 1)");return"sequence(".concat(r,", ").concat(n," + ").concat(i,", ").concat(i,")")};return wT(e)?new jP(n):{signal:n()}}(d,Q,function(t,e,A,n){switch(t){case"quantile":return e.scale.quantileCount;case"quantize":return e.scale.quantizeCount;case"threshold":return void 0!==A&&Object(U.A)(A)?A.length+1:(aT(f.domainRequiredForThresholdScale(n)),3)}}(s,n,c,t)):[d,Q];case jL:return[0,2*Math.PI];case"angle":return[0,360];case TL:return[0,new jP((function(){var t=e.getSignalName("width"),A=e.getSignalName("height");return"min(".concat(t,",").concat(A,")/2")}))];case"strokeWidth":return[n.scale.minStrokeWidth,n.scale.maxStrokeWidth];case"strokeDash":return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case WL:return"symbol";case YL:case VL:case ZL:return"ordinal"===s?"nominal"===a?"category":"ordinal":void 0!==I?"diverging":"rect"===r||"geoshape"===r?"heatmap":"ramp";case"opacity":case"fillOpacity":case"strokeOpacity":return[n.scale.minOpacity,n.scale.maxOpacity]}throw new Error("Scale range undefined for channel ".concat(t))}(t,e))}function oq(t){return function(t){return!Object(U.H)(t)&&!!t.name}(t)?Object.assign({scheme:t.name},fM(t,["name"])):{scheme:t}}function aq(t,e,A){var n=XY(t.width)?t.width.step:eV(A,"width"),r=XY(t.height)?t.height.step:eV(A,"height");return e.x||e.y?new jP((function(){var t=[e.x?e.x.signal:n,e.y?e.y.signal:r];return"min(".concat(t.join(", "),")")})):Math.min(n,r)}function sq(t,e){Bq(t)?function(t,e){var A,n=t.component.scales,r=t.config,i=t.encoding,o=t.markDef,a=t.specifiedScales,s=Object(R.a)(RM(n));try{for(s.s();!(A=s.n()).done;){var g=A.value,c=a[g],I=n[g],u=t.getScaleComponent(g),l=HH(i[g]),C=c[e],h=u.get("type"),B=u.get("padding"),d=u.get("paddingInner"),Q=Gj(h,e),E=Nj(g,e);if(void 0!==C&&(Q?E&&aT(E):aT(f.scalePropertyNotWorkWithScaleType(h,e,g))),Q&&void 0===E)if(void 0!==C)I.copyKeyFromObject(e,c);else{var p=e in gq?gq[e]({model:t,channel:g,fieldOrDatumDef:l,scaleType:h,scalePadding:B,scalePaddingInner:d,domain:c.domain,markDef:o,config:r}):r.scale[e];void 0!==p&&I.set(e,p,!1)}}}catch(y){s.e(y)}finally{s.f()}}(t,e):Iq(t,e)}var gq={bins:function(t){var e=t.model,A=t.fieldOrDatumDef;return fH(A)?function(t,e){var A=e.bin;if(G_(A)){var n=eP(t,e.field,A);return new jP((function(){return t.getSignalName(n)}))}if(N_(A)&&k_(A)&&void 0!==A.step)return{step:A.step};return}(e,A):void 0},interpolate:function(t){return function(t,e){if(pM([YL,VL,ZL],t)&&"nominal"!==e)return"hcl";return}(t.channel,t.fieldOrDatumDef.type)},nice:function(t){return function(t,e,A){var n;if((null===(n=jH(A))||void 0===n?void 0:n.bin)||pM([ij,oj],t))return;return e in B_||void 0}(t.scaleType,t.channel,t.fieldOrDatumDef)},padding:function(t){var e=t.channel,A=t.scaleType,n=t.fieldOrDatumDef,r=t.markDef,i=t.config;return function(t,e,A,n,r,i){if(t in B_){if(Fj(e)){if(void 0!==A.continuousPadding)return A.continuousPadding;var o=r.type,a=r.orient;if("bar"===o&&(!fH(n)||!n.bin&&!n.timeUnit)&&("vertical"===a&&"x"===t||"horizontal"===a&&"y"===t))return i.continuousBandSize}if(e===cj)return A.pointPadding}return}(e,A,i.scale,n,r,i.bar)},paddingInner:function(t){var e=t.scalePadding,A=t.channel,n=t.markDef,r=t.config;return function(t,e,A,n){if(void 0!==t)return;if(e in B_){var r=n.bandPaddingInner,i=n.barBandPaddingInner,o=n.rectBandPaddingInner;return VM(r,"bar"===A?i:o)}return}(e,A,n.type,r.scale)},paddingOuter:function(t){var e=t.scalePadding,A=t.channel,n=t.scaleType,r=t.markDef,i=t.scalePaddingInner,o=t.config;return function(t,e,A,n,r,i){if(void 0!==t)return;if(e in B_){if(A===Ij)return VM(i.bandPaddingOuter,wT(r)?{signal:"".concat(r.signal,"/2")}:r/2)}return}(e,A,n,r.type,i,o.scale)},reverse:function(t){var e=t.fieldOrDatumDef,A=t.scaleType,n=t.channel,r=t.config;return function(t,e,A,n){if("x"===A&&void 0!==n.xReverse)return bj(t)&&"descending"===e?wT(n.xReverse)?{signal:"!".concat(n.xReverse.signal)}:!n.xReverse:n.xReverse;if(bj(t)&&"descending"===e)return!0;return}(A,fH(e)?e.sort:void 0,n,r.scale)},zero:function(t){return function(t,e,A,n,r){if(A&&"unaggregated"!==A&&bj(r)){if(Object(U.A)(A)){var i=A[0],o=A[A.length-1];if(i<=0&&o>=0)return!0}return!1}if("size"===t&&"quantitative"===e.type&&!wj(r))return!0;if((!fH(e)||!e.bin)&&pM([].concat(Object(p.a)(f_),Object(p.a)(E_)),t)){var a=n.orient;return!pM(["bar","area","line","trail"],n.type)||!("horizontal"===a&&"y"===t||"vertical"===a&&"x"===t)}return!1}(t.channel,t.fieldOrDatumDef,t.domain,t.markDef,t.scaleType)}};function cq(t){Bq(t)?function(t){var e,A=t.component.scales,n=Object(R.a)(b_);try{for(n.s();!(e=n.n()).done;){var r=e.value,i=A[r];if(i){var o=iq(r,t);i.setWithExplicit("range",o)}}}catch(a){n.e(a)}finally{n.f()}}(t):Iq(t,"range")}function Iq(t,e){var A,n=t.component.scales,r=Object(R.a)(t.children);try{for(r.s();!(A=r.n()).done;){var i=A.value;"range"===e?cq(i):sq(i,e)}}catch(l){r.e(l)}finally{r.f()}var o,a=Object(R.a)(RM(n));try{for(a.s();!(o=a.n()).done;){var s,g=o.value,c=void 0,I=Object(R.a)(t.children);try{for(I.s();!(s=I.n()).done;){var u=s.value.component.scales[g];if(u)c=tZ(c,u.getWithExplicit(e),e,"scale",zV((function(t,A){switch(e){case"range":return t.step&&A.step?t.step-A.step:0}return 0})))}}catch(l){I.e(l)}finally{I.f()}n[g].setWithExplicit(e,c)}}catch(l){a.e(l)}finally{a.f()}}function uq(t,e,A,n){var r=function(t,e,A){var n;switch(e.type){case"nominal":case"ordinal":if(t_(t)||"discrete"===R_(t))return"shape"===t&&"ordinal"===e.type&&aT(f.discreteChannelCannotEncode(t,"ordinal")),"ordinal";if(t in B_){if(pM(["rect","bar","image","rule"],A))return"band"}else if("arc"===A&&t in Q_)return"band";return void 0!==e.band||FH(e)&&(null===(n=e.axis)||void 0===n?void 0:n.tickBand)?"band":"point";case"temporal":return t_(t)?"time":"discrete"===R_(t)?(aT(f.discreteChannelCannotEncode(t,"temporal")),"ordinal"):fH(e)&&e.timeUnit&&bT(e.timeUnit).utc?"utc":"time";case"quantitative":return t_(t)?fH(e)&&G_(e.bin)?"bin-ordinal":"linear":"discrete"===R_(t)?(aT(f.discreteChannelCannotEncode(t,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error(f.invalidFieldType(e.type))}(e,A,n),i=t.type;return F_(e)?void 0!==i?xj(e,i)?fH(A)&&!kj(i,A.type)?(aT(f.scaleTypeNotWorkWithFieldDef(i,r)),r):i:(aT(f.scaleTypeNotWorkWithChannel(e,i,r)),r):r:null}function lq(t){Bq(t)?t.component.scales=function(t){var e=t.encoding,A=t.mark;return b_.reduce((function(n,r){var i=HH(e[r]);if(i&&A===dL&&r===WL&&i.type===zT)return n;var o=i&&i.scale;if(i&&null!==o&&!1!==o){var a=uq(o=null!==o&&void 0!==o?o:{},r,i,A);n[r]=new eq(t.scaleName(r+"",!0),{value:a,explicit:o.type===a})}return n}),{})}(t):t.component.scales=function(t){var e,A,n=t.component.scales={},r={},i=t.component.resolve,o=Object(R.a)(t.children);try{for(o.s();!(A=o.n()).done;){var a=A.value;lq(a);var s,g=Object(R.a)(RM(a.component.scales));try{for(g.s();!(s=g.n()).done;){var c=s.value;if(i.scale[c]=null!==(e=i.scale[c])&&void 0!==e?e:SK(c,t),"shared"===i.scale[c]){var I=r[c],u=a.component.scales[c].getWithExplicit("type");I?Cj(I.value,u.value)?r[c]=tZ(I,u,"type","scale",Cq):(i.scale[c]="independent",delete r[c]):r[c]=u}}}catch(y){g.e(y)}finally{g.f()}}}catch(y){o.e(y)}finally{o.f()}var l,C=Object(R.a)(RM(r));try{for(C.s();!(l=C.n()).done;){var h=l.value,B=t.scaleName(h,!0),f=r[h];n[h]=new eq(B,f);var d,Q=Object(R.a)(t.children);try{for(Q.s();!(d=Q.n()).done;){var E=d.value,p=E.component.scales[h];p&&(E.renameScale(p.get("name"),B),p.merged=!0)}}catch(y){Q.e(y)}finally{Q.f()}}}catch(y){C.e(y)}finally{C.f()}return n}(t)}var Cq=zV((function(t,e){return Bj(t)-Bj(e)}));var hq=function(){function t(){Object(F.a)(this,t),this.nameMap={}}return Object(w.a)(t,[{key:"rename",value:function(t,e){this.nameMap[t]=e}},{key:"has",value:function(t){return void 0!==this.nameMap[t]}},{key:"get",value:function(t){for(;this.nameMap[t]&&t!==this.nameMap[t];)t=this.nameMap[t];return t}}]),t}();function Bq(t){return"unit"===(null===t||void 0===t?void 0:t.type)}function fq(t){return"facet"===(null===t||void 0===t?void 0:t.type)}function dq(t){return"concat"===(null===t||void 0===t?void 0:t.type)}function Qq(t){return"layer"===(null===t||void 0===t?void 0:t.type)}var Eq=function(){function t(e,A,n,r,i,o,a){var s,g,c=this;Object(F.a)(this,t),this.type=A,this.parent=n,this.config=i,this.view=a,this.children=[],this.correctDataNames=function(t){return t.from&&t.from.data&&(t.from.data=c.lookupDataSource(t.from.data)),t.from&&t.from.facet&&t.from.facet.data&&(t.from.facet.data=c.lookupDataSource(t.from.facet.data)),t},this.parent=n,this.config=i,this.name=null!==(s=e.name)&&void 0!==s?s:r,this.title=tY(e.title)?{text:e.title}:e.title,this.scaleNameMap=n?n.scaleNameMap:new hq,this.projectionNameMap=n?n.projectionNameMap:new hq,this.signalNameMap=n?n.signalNameMap:new hq,this.data=e.data,this.description=e.description,this.transforms=(null!==(g=e.transform)&&void 0!==g?g:[]).map((function(t){return cZ(t)?{filter:lM(t.filter,ZT)}:t})),this.layout="layer"===A||"unit"===A?{}:function(t,e,A){var n,r,i=A[e],o={},a=i.spacing,s=i.columns;void 0!==a&&(o.spacing=a),void 0!==s&&(gH(t)&&!aH(t.facet)||KY(t))&&(o.columns=s),PY(t)&&(o.columns=1);var g,c=Object(R.a)($Y);try{for(c.s();!(g=c.n()).done;){var I=g.value;if(void 0!==t[I])if("spacing"===I){var u=t[I];o[I]=Object(U.E)(u)?u:{row:null!==(n=u.row)&&void 0!==n?n:a,column:null!==(r=u.column)&&void 0!==r?r:a}}else o[I]=t[I]}}catch(l){c.e(l)}finally{c.f()}return o}(e,A,i),this.component={data:{sources:n?n.component.data.sources:[],outputNodes:n?n.component.data.outputNodes:{},outputNodeRefCounts:n?n.component.data.outputNodeRefCounts:{},isFaceted:gH(e)||n&&n.component.data.isFaceted&&void 0===e.data},layoutSize:new PV,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:Object.assign({scale:{},axis:{},legend:{}},o?hM(o):{}),selection:null,scales:null,projection:null,axes:{},legends:{}}}return Object(w.a)(t,[{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(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.ignoreRange;lq(t),HP(t);var n,r=Object(R.a)(Uj);try{for(r.s();!(n=r.n()).done;){var i=n.value;sq(t,i)}}catch(o){r.e(o)}finally{r.f()}A||cq(t)}(this)}},{key:"parseProjection",value:function(){zK(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(){jK(this)}},{key:"assembleGroupStyle",value:function(){var t,e;if("unit"===this.type||"layer"===this.type)return null!==(e=null===(t=this.view)||void 0===t?void 0:t.style)&&void 0!==e?e:"cell"}},{key:"assembleEncodeFromView",value:function(t){t.style;var e,A=nM(t,["style"]),n={},r=Object(R.a)(RM(A));try{for(r.s();!(e=r.n()).done;){var i=e.value,o=A[i];void 0!==o&&(n[i]=eY(o))}}catch(a){r.e(a)}finally{r.f()}return n}},{key:"assembleGroupEncodeEntry",value:function(t){var e={};return this.view&&(e=this.assembleEncodeFromView(this.view)),t||(this.description&&(e.description=eY(this.description)),"unit"!==this.type&&"layer"!==this.type)?DM(e)?void 0:e:Object.assign({width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height")},null!==e&&void 0!==e?e:{})}},{key:"assembleLayout",value:function(){if(this.layout){var t=this.layout,e=t.spacing,A=nM(t,["spacing"]),n=this.component,r=this.config,i=function(t,e){var A,n={},r=Object(R.a)(A_);try{for(r.s();!(A=r.n()).done;){var i=A.value,o=t[i];if(null===o||void 0===o?void 0:o.facetFieldDef){var a=gK(["titleAnchor","titleOrient"],o.facetFieldDef,e,i),s=a.titleAnchor,g=aK(i,a.titleOrient),c=EK(s,g);void 0!==c&&(n[g]=c)}}}catch(I){r.e(I)}finally{r.f()}return DM(n)?void 0:n}(n.layoutHeaders,r);return Object.assign(Object.assign(Object.assign({padding:e},this.assembleDefaultLayout()),A),i?{titleBand:i}:{})}}},{key:"assembleDefaultLayout",value:function(){return{}}},{key:"assembleHeaderMarks",value:function(){var t,e=this.component.layoutHeaders,A=[],n=Object(R.a)(A_);try{for(n.s();!(t=n.n()).done;){var r=t.value;e[r].title&&A.push(uK(this,r))}}catch(s){n.e(s)}finally{n.f()}var i,o=Object(R.a)(cK);try{for(o.s();!(i=o.n()).done;){var a=i.value;A=A.concat(hK(this,a))}}catch(s){o.e(s)}finally{o.f()}return A}},{key:"assembleAxes",value:function(){return function(t,e){var A=t.x,n=void 0===A?[]:A,r=t.y,i=void 0===r?[]:r;return[].concat(Object(p.a)(n.map((function(t){return YW(t,"grid",e)}))),Object(p.a)(i.map((function(t){return YW(t,"grid",e)}))),Object(p.a)(n.map((function(t){return YW(t,"main",e)}))),Object(p.a)(i.map((function(t){return YW(t,"main",e)})))).filter((function(t){return t}))}(this.component.axes,this.config)}},{key:"assembleLegends",value:function(){return WK(this)}},{key:"assembleProjections",value:function(){return KK(this)}},{key:"assembleTitle",value:function(){var t,e,A,n=null!==(t=this.title)&&void 0!==t?t:{},r=n.encoding,i=nM(n,["encoding"]),o=Object.assign(Object.assign(Object.assign({},$H(this.config.title).nonMark),i),r?{encode:{update:r}}:{});if(o.text)return pM(["unit","layer"],this.type)?pM(["middle",void 0],o.anchor)&&(o.frame=null!==(e=o.frame)&&void 0!==e?e:"group"):o.anchor=null!==(A=o.anchor)&&void 0!==A?A:"start",DM(o)?void 0:o}},{key:"assembleGroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e={};(t=t.concat(this.assembleSignals())).length>0&&(e.signals=t);var A=this.assembleLayout();A&&(e.layout=A),e.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());var n=!this.parent||fq(this.parent)?$P(this):[];n.length>0&&(e.scales=n);var r=this.assembleAxes();r.length>0&&(e.axes=r);var i=this.assembleLegends();return i.length>0&&(e.legends=i),e}},{key:"getName",value:function(t){return kM((this.name?this.name+"_":"")+t)}},{key:"requestDataName",value:function(t){var e,A=this.getName(t),n=this.component.data.outputNodeRefCounts;return n[A]=(null!==(e=n[A])&&void 0!==e?e:0)+1,A}},{key:"getSizeSignalRef",value:function(t){if(fq(this.parent)){var e=p_(FK(t)),A=this.component.scales[e];if(A&&!A.merged){var n=A.get("type"),r=A.get("range");if(mj(n)&&ST(r)){var i=A.get("name"),o=XP(zP(this,e));return o?{signal:bK(i,A,RH({aggregate:"distinct",field:o},{expr:"datum"}))}:(aT("Unknown field for ".concat(e,". Cannot calculate view size.")),null)}}}return{signal:this.signalNameMap.get(this.getName(t))}}},{key:"lookupDataSource",value:function(t){var e=this.component.data.outputNodes[t];return e?e.getSource():t}},{key:"getSignalName",value:function(t){return this.signalNameMap.get(t)}},{key:"renameSignal",value:function(t,e){this.signalNameMap.rename(t,e)}},{key:"renameScale",value:function(t,e){this.scaleNameMap.rename(t,e)}},{key:"renameProjection",value:function(t,e){this.projectionNameMap.rename(t,e)}},{key:"scaleName",value:function(t,e){return e?this.getName(t):a_(t)&&F_(t)&&this.component.scales[t]||this.scaleNameMap.has(this.getName(t))?this.scaleNameMap.get(this.getName(t)):void 0}},{key:"projectionName",value:function(t){return t?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(t){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");var e=this.component.scales[t];return e&&!e.merged?e:this.parent?this.parent.getScaleComponent(t):void 0}},{key:"getSelectionComponent",value:function(t,e){var A=this.component.selection[t];if(!A&&this.parent&&(A=this.parent.getSelectionComponent(t,e)),!A)throw new Error(f.selectionNotFound(e));return A}},{key:"hasAxisOrientSignalRef",value:function(){var t,e;return(null===(t=this.component.axes.x)||void 0===t?void 0:t.some((function(t){return t.hasOrientSignalRef()})))||(null===(e=this.component.axes.y)||void 0===e?void 0:e.some((function(t){return t.hasOrientSignalRef()})))}},{key:"width",get:function(){return this.getSizeSignalRef("width")}},{key:"height",get:function(){return this.getSizeSignalRef("height")}}]),t}(),pq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"vgField",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=this.fieldDef(t);if(A)return RH(A,e)}},{key:"reduceFieldDef",value:function(t,e){return QY(this.getMapping(),(function(e,A,n){var r=jH(A);return r?t(e,r,n):e}),e)}},{key:"forEachFieldDef",value:function(t,e){dY(this.getMapping(),(function(e,A){var n=jH(e);n&&t(n,A)}),e)}}]),A}(Eq),yq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r,i,o,a;Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r.transform=hM(n);var s=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=s[0])&&void 0!==o?o:"value",null!==(a=s[1])&&void 0!==a?a:"density"],r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"dependentFields",value:function(){var t;return new Set([this.transform.density].concat(Object(p.a)(null!==(t=this.transform.groupby)&&void 0!==t?t:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"DensityTransform ".concat(QM(this.transform))}},{key:"assemble",value:function(){var t=this.transform,e=t.density,A=nM(t,["density"]);return Object.assign({type:"kde",field:e},A)}}]),A}(eW),vq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).filter=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,Object.assign({},this.filter))}},{key:"dependentFields",value:function(){return new Set(RM(this.filter))}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"FilterInvalid ".concat(QM(this.filter))}},{key:"assemble",value:function(){var t=this,e=RM(this.filter).reduce((function(e,A){var n=t.filter[A],r=RH(n,{expr:"datum"});return null!==n&&("temporal"===n.type?e.push("(isDate(".concat(r,") || (isValid(").concat(r,") && isFinite(+").concat(r,")))")):"quantitative"===n.type&&(e.push("isValid(".concat(r,")")),e.push("isFinite(+".concat(r,")")))),e}),[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}],[{key:"make",value:function(t,e){var n=e.config,r=e.mark;if("filter"!==iY("invalid",e.markDef,n))return null;var i=e.reduceFieldDef((function(t,A,n){var i=F_(n)&&e.getScaleComponent(n);i&&(bj(i.get("type"))&&"count"!==A.aggregate&&!QL(r)&&(t[A.field]=A));return t}),{});return RM(i).length?new A(t,i):null}}]),A}(eW),mq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r.transform=hM(n);var i=r.transform,o=i.flatten,a=i.as,s=void 0===a?[]:a;return r.transform.as=o.map((function(t,e){var A;return null!==(A=s[e])&&void 0!==A?A:t})),r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(this.parent,hM(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(QM(this.transform))}},{key:"assemble",value:function(){var t=this.transform;return{type:"flatten",fields:t.flatten,as:t.as}}}]),A}(eW),bq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r,i,o,a;Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r.transform=hM(n);var s=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=s[0])&&void 0!==o?o:"key",null!==(a=s[1])&&void 0!==a?a:"value"],r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(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(QM(this.transform))}},{key:"assemble",value:function(){var t=this.transform;return{type:"fold",fields:t.fold,as:t.as}}}]),A}(eW),Fq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r,i){var o;return Object(F.a)(this,A),(o=e.call(this,t)).fields=n,o.geojson=r,o.signal=i,o}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.fields),this.geojson,this.signal)}},{key:"dependentFields",value:function(){var t,e=(null!==(t=this.fields)&&void 0!==t?t:[]).filter(U.H);return new Set([].concat(Object(p.a)(this.geojson?[this.geojson]:[]),Object(p.a)(e)))}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"GeoJSON ".concat(this.geojson," ").concat(this.signal," ").concat(QM(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(t,e){if(e.component.projection&&!e.component.projection.isFit)return t;for(var n=0,r=0,i=[["longitude","latitude"],["longitude2","latitude2"]];r<i.length;r++){var o=i[r].map((function(t){var A=HH(e.encoding[t]);return fH(A)?A.field:QH(A)?{expr:"".concat(A.datum)}:mH(A)?{expr:"".concat(A.value)}:void 0}));(o[0]||o[1])&&(t=new A(t,o,null,e.getName("geojson_".concat(n++))))}if(e.channelHasField(WL)){var a=e.typedFieldDef(WL);a.type===zT&&(t=new A(t,null,a.field,e.getName("geojson_".concat(n++))))}return t}}]),A}(eW),wq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r,i){var o;return Object(F.a)(this,A),(o=e.call(this,t)).projection=n,o.fields=r,o.as=i,o}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,this.projection,hM(this.fields),hM(this.as))}},{key:"dependentFields",value:function(){return new Set(this.fields.filter(U.H))}},{key:"producedFields",value:function(){return new Set(this.as)}},{key:"hash",value:function(){return"Geopoint ".concat(this.projection," ").concat(QM(this.fields)," ").concat(QM(this.as))}},{key:"assemble",value:function(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}],[{key:"parseAll",value:function(t,e){if(!e.projectionName())return t;for(var n=0,r=[["longitude","latitude"],["longitude2","latitude2"]];n<r.length;n++){var i=r[n],o=i.map((function(t){var A=HH(e.encoding[t]);return fH(A)?A.field:QH(A)?{expr:"".concat(A.datum)}:mH(A)?{expr:"".concat(A.value)}:void 0})),a="longitude2"===i[0]?"2":"";(o[0]||o[1])&&(t=new A(t,e.projectionName(),o,[e.getName("x"+a),e.getName("y"+a)]))}return t}}]),A}(eW),Sq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"dependentFields",value:function(){var t;return new Set([this.transform.impute,this.transform.key].concat(Object(p.a)(null!==(t=this.transform.groupby)&&void 0!==t?t:[])))}},{key:"producedFields",value:function(){return new Set([this.transform.impute])}},{key:"processSequence",value:function(t){var e=t.start,A=void 0===e?0:e,n=t.stop,r=t.step,i=[A,n].concat(Object(p.a)(r?[r]:[])).join(",");return{signal:"sequence(".concat(i,")")}}},{key:"hash",value:function(){return"Impute ".concat(QM(this.transform))}},{key:"assemble",value:function(){var t,e=this.transform,A=e.impute,n=e.key,r=e.keyvals,i=e.method,o=e.groupby,a=e.value,s=e.frame,g=void 0===s?[null,null]:s,c=Object.assign(Object.assign(Object.assign(Object.assign({type:"impute",field:A,key:n},r?{keyvals:(t=r,void 0!==(null===t||void 0===t?void 0:t.stop)?this.processSequence(r):r)}:{}),{method:"value"}),o?{groupby:o}:{}),{value:i&&"value"!==i?null:a});return i&&"value"!==i?[c,Object.assign({type:"window",as:["imputed_".concat(A,"_value")],ops:[i],fields:[A],frame:g,ignorePeers:!1},o?{groupby:o}:{}),{type:"formula",expr:"datum.".concat(A," === null ? datum.imputed_").concat(A,"_value : datum.").concat(A),as:A}]:[c]}}],[{key:"makeFromTransform",value:function(t,e){return new A(t,e)}},{key:"makeFromEncoding",value:function(t,e){var n=e.encoding,r=n.x,i=n.y;if(fH(r)&&fH(i)){var o=r.impute?r:i.impute?i:void 0;if(void 0===o)return;var a=r.impute?i:i.impute?r:void 0,s=o.impute,g=s.method,c=s.value,I=s.frame,u=s.keyvals,l=EY(e.mark,n);return new A(t,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({impute:o.field,key:a.field},g?{method:g}:{}),void 0!==c?{value:c}:{}),I?{frame:I}:{}),void 0!==u?{keyvals:u}:{}),l.length?{groupby:l}:{}))}return null}}]),A}(eW),Dq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r,i,o,a;Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r.transform=hM(n);var s=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=s[0])&&void 0!==o?o:n.on,null!==(a=s[1])&&void 0!==a?a:n.loess],r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"dependentFields",value:function(){var t;return new Set([this.transform.loess,this.transform.on].concat(Object(p.a)(null!==(t=this.transform.groupby)&&void 0!==t?t:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"LoessTransform ".concat(QM(this.transform))}},{key:"assemble",value:function(){var t=this.transform,e=t.loess,A=t.on,n=nM(t,["loess","on"]);return Object.assign({type:"loess",x:A,y:e},n)}}]),A}(eW),Rq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r){var i;return Object(F.a)(this,A),(i=e.call(this,t)).transform=n,i.secondary=r,i}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(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(U.i)(this.transform.as):this.transform.from.fields)}},{key:"hash",value:function(){return"Lookup ".concat(QM({transform:this.transform,secondary:this.secondary}))}},{key:"assemble",value:function(){var t;if(this.transform.from.fields)t=Object.assign({values:this.transform.from.fields},this.transform.as?{as:Object(U.i)(this.transform.as)}:{});else{var e=this.transform.as;Object(U.H)(e)||(aT(f.NO_FIELDS_NEEDS_AS),e="_lookup"),t={as:[e]}}return Object.assign(Object.assign({type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup]},t),this.transform.default?{default:this.transform.default}:{})}}],[{key:"make",value:function(t,e,n,r){var i=e.component.data.sources,o=n.from,a=null;if(function(t){return"data"in t}(o)){var s=Zq(o.data,i);s||(s=new rP(o.data),i.push(s));var g=e.getName("lookup_".concat(r));a=new AW(s,g,"lookup",e.component.data.outputNodeRefCounts),e.component.data.outputNodes[g]=a}else if(function(t){return"selection"in t}(o)){var c=o.selection;if(n=Object.assign({as:c},n),!(a=e.getSelectionComponent(kM(c),c).materialized))throw new Error(f.noSameUnitLookup(c))}return new A(t,n,a.getSource())}}]),A}(eW),Uq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r,i,o,a;Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r.transform=hM(n);var s=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=s[0])&&void 0!==o?o:"prob",null!==(a=s[1])&&void 0!==a?a:"value"],r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"dependentFields",value:function(){var t;return new Set([this.transform.quantile].concat(Object(p.a)(null!==(t=this.transform.groupby)&&void 0!==t?t:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"QuantileTransform ".concat(QM(this.transform))}},{key:"assemble",value:function(){var t=this.transform,e=t.quantile,A=nM(t,["quantile"]);return Object.assign({type:"quantile",field:e},A)}}]),A}(eW),Gq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r,i,o,a;Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r.transform=hM(n);var s=null!==(i=r.transform.as)&&void 0!==i?i:[void 0,void 0];return r.transform.as=[null!==(o=s[0])&&void 0!==o?o:n.on,null!==(a=s[1])&&void 0!==a?a:n.regression],r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"dependentFields",value:function(){var t;return new Set([this.transform.regression,this.transform.on].concat(Object(p.a)(null!==(t=this.transform.groupby)&&void 0!==t?t:[])))}},{key:"producedFields",value:function(){return new Set(this.transform.as)}},{key:"hash",value:function(){return"RegressionTransform ".concat(QM(this.transform))}},{key:"assemble",value:function(){var t=this.transform,e=t.regression,A=t.on,n=nM(t,["regression","on"]);return Object.assign({type:"regression",x:A,y:e},n)}}]),A}(eW),Nq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"addDimensions",value:function(t){var e;this.transform.groupby=bM((null!==(e=this.transform.groupby)&&void 0!==e?e:[]).concat(t),(function(t){return t}))}},{key:"producedFields",value:function(){}},{key:"dependentFields",value:function(){var t;return new Set([this.transform.pivot,this.transform.value].concat(Object(p.a)(null!==(t=this.transform.groupby)&&void 0!==t?t:[])))}},{key:"hash",value:function(){return"PivotTransform ".concat(QM(this.transform))}},{key:"assemble",value:function(){var t=this.transform,e=t.pivot,A=t.value,n=t.groupby,r=t.limit,i=t.op;return Object.assign(Object.assign(Object.assign({type:"pivot",field:e,value:A},void 0!==r?{limit:r}:{}),void 0!==i?{op:i}:{}),void 0!==n?{groupby:n}:{})}}]),A}(eW),kq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n){var r;return Object(F.a)(this,A),(r=e.call(this,t)).transform=n,r}return Object(w.a)(A,[{key:"clone",value:function(){return new A(null,hM(this.transform))}},{key:"dependentFields",value:function(){return new Set}},{key:"producedFields",value:function(){return new Set}},{key:"hash",value:function(){return"SampleTransform ".concat(QM(this.transform))}},{key:"assemble",value:function(){return{type:"sample",size:this.transform.sample}}}]),A}(eW);function xq(t){var e=0;return function A(n,r){var i,o,a;if(n instanceof rP&&(n.isGenerator||AZ(n.data)||(t.push(r),r={name:null,source:r.name,transform:[]})),n instanceof QP&&(n.parent instanceof rP&&!r.source?(r.format=Object.assign(Object.assign({},null!==(i=r.format)&&void 0!==i?i:{}),{parse:n.assembleFormatParse()}),(o=r.transform).push.apply(o,Object(p.a)(n.assembleTransforms(!0)))):(a=r.transform).push.apply(a,Object(p.a)(n.assembleTransforms()))),n instanceof CP){r.name||(r.name="data_".concat(e++)),!r.source||r.transform.length>0?(t.push(r),n.data=r.name):n.data=r.source;var s,g=Object(R.a)(n.assemble());try{for(g.s();!(s=g.n()).done;){var c=s.value;t.push(c)}}catch(h){g.e(h)}finally{g.f()}}else{var I;if((n instanceof oP||n instanceof aP||n instanceof vq||n instanceof LW||n instanceof iK||n instanceof wq||n instanceof Fq||n instanceof lP||n instanceof Rq||n instanceof vP||n instanceof pP||n instanceof bq||n instanceof mq||n instanceof yq||n instanceof Dq||n instanceof Uq||n instanceof Gq||n instanceof EP||n instanceof kq||n instanceof Nq)&&r.transform.push(n.assemble()),n instanceof nP||n instanceof nW||n instanceof Sq||n instanceof yP)(I=r.transform).push.apply(I,Object(p.a)(n.assemble()));if(n instanceof AW)if(r.source&&0===r.transform.length)n.setSource(r.source);else if(n.parent instanceof AW)n.setSource(r.name);else{if(r.name||(r.name="data_".concat(e++)),n.setSource(r.name),1===n.numChildren())t.push(r),r={name:null,source:r.name,transform:[]}}switch(n.numChildren()){case 0:n instanceof AW&&(!r.source||r.transform.length>0)&&t.push(r);break;case 1:A(n.children[0],r);break;default:r.name||(r.name="data_".concat(e++));var u=r.name;!r.source||r.transform.length>0?t.push(r):u=r.source;var l,C=Object(R.a)(n.children);try{for(C.s();!(l=C.n()).done;){A(l.value,{name:null,source:u,transform:[]})}}catch(h){C.e(h)}finally{C.f()}}}}}function Oq(t,e){var A,n,r,i=[],o=xq(i),a=0,s=Object(R.a)(t.sources);try{for(s.s();!(r=s.n()).done;){var g=r.value;g.hasName()||(g.dataName="source_".concat(a++));var c=g.assemble();o(g,c)}}catch(D){s.e(D)}finally{s.f()}for(var I=0,u=i;I<u.length;I++){var l=u[I];0===l.transform.length&&delete l.transform}var C,h=0,B=Object(R.a)(i.entries());try{for(B.s();!(C=B.n()).done;){var f=Object(ba.a)(C.value,2),d=f[0],Q=f[1];0!==(null!==(A=Q.transform)&&void 0!==A?A:[]).length||Q.source||i.splice(h++,0,i.splice(d,1)[0])}}catch(D){B.e(D)}finally{B.f()}for(var E=0,p=i;E<p.length;E++){var y,v=p[E],m=Object(R.a)(null!==(n=v.transform)&&void 0!==n?n:[]);try{for(m.s();!(y=m.n()).done;){var b=y.value;"lookup"===b.type&&(b.from=t.outputNodes[b.from].getSource())}}catch(D){m.e(D)}finally{m.f()}}for(var F=0,w=i;F<w.length;F++){var S=w[F];S.name in e&&(S.values=e[S.name])}return i}function Mq(t,e){var A,n=t.facet,r=t.config,i=t.child,o=t.component;if(t.channelHasField(e)){var a=n[e],s=sK("title",null,r,e),g=LH(a,r,{allowDisabling:!0,includeDefault:void 0===s||!!s});i.component.layoutHeaders[e].title&&(g=Object(U.A)(g)?g.join(", "):g,g+=" / "+i.component.layoutHeaders[e].title,i.component.layoutHeaders[e].title=null);var c=sK("labelOrient",a,r,e),I=VM((null!==(A=a.header)&&void 0!==A?A:{}).labels,r.header.labels,!0),u=pM(["bottom","right"],c)?"footer":"header";o.layoutHeaders[e]=Object(E.a)({title:g,facetFieldDef:a},u,"facet"===e?[]:[Lq(t,e,I)])}}function Lq(t,e,A){var n="row"===e?"height":"width";return{labels:A,sizeSignal:t.child.component.layoutSize.get(n)?t.child.getSizeSignalRef(n):void 0,axes:[]}}function _q(t,e){var A,n,r=t.child;if(r.component.axes[e]){var i=t.component,o=i.layoutHeaders,a=i.resolve;if(a.axis[e]=DK(a,e),"shared"===a.axis[e]){var s,g="x"===e?"column":"row",c=o[g],I=Object(R.a)(r.component.axes[e]);try{for(I.s();!(s=I.n()).done;){var u=s.value,l="top"===(n=u.get("orient"))||"left"===n||wT(n)?"header":"footer";c[l]=null!==(A=c[l])&&void 0!==A?A:[Lq(t,g,!1)];var C=YW(u,"main",t.config,{header:!0});C&&c[l][0].axes.push(C),u.mainExtracted=!0}}catch(h){I.e(h)}finally{I.f()}}}}function Jq(t){Tq(t);var e=1===t.layout.columns?"width":"childWidth",A=void 0===t.layout.columns?"height":"childHeight";jq(t,e),jq(t,A)}function Tq(t){var e,A=Object(R.a)(t.children);try{for(A.s();!(e=A.n()).done;){e.value.parseLayoutSize()}}catch(n){A.e(n)}finally{A.f()}}function jq(t,e){var A,n,r=FK(e),i=p_(r),o=t.component.resolve,a=t.component.layoutSize,s=Object(R.a)(t.children);try{for(s.s();!(n=s.n()).done;){var g=n.value.component.layoutSize.getWithExplicit(r),c=o.scale[i];if("independent"===c&&"step"===g.value){A=void 0;break}if(A){if("independent"===c&&A.value!==g.value){A=void 0;break}A=tZ(A,g,r,"")}else A=g}}catch(C){s.e(C)}finally{s.f()}if(A){var I,u=Object(R.a)(t.children);try{for(u.s();!(I=u.n()).done;){var l=I.value;t.renameSignal(l.getName(r),t.getName(e)),l.component.layoutSize.set(r,"merged",!1)}}catch(C){u.e(C)}finally{u.f()}a.setWithExplicit(e,A)}else a.setWithExplicit(e,{explicit:!1,value:void 0})}function Hq(t,e){var A="width"===e?"x":"y",n=t.config,r=t.getScaleComponent(A);if(r){var i=r.get("type"),o=r.get("range");if(mj(i)){var a=AV(n.view,e);return ST(o)||XY(a)?"step":a}return tV(n.view,e)}if(t.hasProjection||"arc"===t.mark)return tV(n.view,e);var s=AV(n.view,e);return XY(s)?s.step:s}function Yq(t,e,A){return RH(e,Object.assign({suffix:"by_".concat(RH(t))},null!==A&&void 0!==A?A:{}))}var Vq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r,i){var o;return Object(F.a)(this,A),(o=e.call(this,t,"facet",n,r,i,t.resolve)).child=dX(t.spec,Object(x.a)(o),o.getName("child"),void 0,i),o.children=[o.child],o.facet=o.initFacet(t.facet,i),o}return Object(w.a)(A,[{key:"initFacet",value:function(t,e){return aH(t)?QY(t,(function(t,A,n){return pM([_L,JL],n)?void 0===A.field?(aT(f.emptyFieldDef(A,n)),t):(t[n]=YH(A,n,e),t):(aT(f.incompatibleChannel(n,"facet")),t)}),{}):{facet:YH(t,"facet",e)}}},{key:"channelHasField",value:function(t){return!!this.facet[t]}},{key:"fieldDef",value:function(t){return this.facet[t]}},{key:"parseData",value:function(){this.component.data=Kq(this),this.child.parseData()}},{key:"parseLayoutSize",value:function(){Tq(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(t){var e,A=Object(R.a)(A_);try{for(A.s();!(e=A.n()).done;){Mq(t,e.value)}}catch(n){A.e(n)}finally{A.f()}_q(t,"x"),_q(t,"y")}(this)}},{key:"assembleSelectionTopLevelSignals",value:function(t){return this.child.assembleSelectionTopLevelSignals(t)}},{key:"assembleSignals",value:function(){return this.child.assembleSignals(),[]}},{key:"assembleSelectionData",value:function(t){return this.child.assembleSelectionData(t)}},{key:"getHeaderLayoutMixins",value:function(){var t,e,A,n,r={},i=Object(R.a)(A_);try{for(i.s();!(n=i.n()).done;){var o,a=n.value,s=Object(R.a)(IK);try{for(s.s();!(o=s.n()).done;){var g=o.value,c=this.component.layoutHeaders[a],I=c[g],u=c.facetFieldDef;if(u){var l=sK("titleOrient",u,this.config,a);if(pM(["right","bottom"],l)){var C=aK(a,l);r.titleAnchor=null!==(t=r.titleAnchor)&&void 0!==t?t:{},r.titleAnchor[C]="end"}}if(null===I||void 0===I?void 0:I[0]){var h="row"===a?"height":"width",B="header"===g?"headerBand":"footerBand";"facet"===a||this.child.component.layoutSize.get(h)||(r[B]=null!==(e=r[B])&&void 0!==e?e:{},r[B][a]=.5),c.title&&(r.offset=null!==(A=r.offset)&&void 0!==A?A:{},r.offset["row"===a?"rowTitle":"columnTitle"]=10)}}}catch(f){s.e(f)}finally{s.f()}}}catch(f){i.e(f)}finally{i.f()}return r}},{key:"assembleDefaultLayout",value:function(){var t=this.facet,e=t.column,A=t.row,n=e?this.columnDistinctSignal():A?1:void 0,r="all";return(A||"independent"!==this.component.resolve.scale.x)&&(e||"independent"!==this.component.resolve.scale.y)||(r="none"),Object.assign(Object.assign(Object.assign({},this.getHeaderLayoutMixins()),n?{columns:n}:{}),{bounds:"full",align:r})}},{key:"assembleLayoutSignals",value:function(){return this.child.assembleLayoutSignals()}},{key:"columnDistinctSignal",value:function(){if(!(this.parent&&this.parent instanceof A)){var t=this.getName("column_domain");return{signal:"length(data('".concat(t,"'))")}}}},{key:"assembleGroup",value:function(t){return this.parent&&this.parent instanceof A?Object.assign(Object.assign({},this.channelHasField("column")?{encode:{update:{columns:{field:RH(this.facet.column,{prefix:"distinct"})}}}}:{}),Object(QV.a)(Object(dV.a)(A.prototype),"assembleGroup",this).call(this,t)):Object(QV.a)(Object(dV.a)(A.prototype),"assembleGroup",this).call(this,t)}},{key:"getCardinalityAggregateForChild",value:function(){var t=[],e=[],n=[];if(this.child instanceof A){if(this.child.channelHasField("column")){var r=RH(this.child.facet.column);t.push(r),e.push("distinct"),n.push("distinct_".concat(r))}}else{var i,o=Object(R.a)(f_);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=this.child.component.scales[a];if(s&&!s.merged){var g=s.get("type"),c=s.get("range");if(mj(g)&&ST(c)){var I=XP(zP(this.child,a));I?(t.push(I),e.push("distinct"),n.push("distinct_".concat(I))):aT("Unknown field for ".concat(a,". Cannot calculate view size."))}}}}catch(u){o.e(u)}finally{o.f()}}return{fields:t,ops:e,as:n}}},{key:"assembleFacet",value:function(){var t,e=this.component.data.facetRoot,A=e.name,n=e.data,r=this.facet,i=r.row,o=r.column,a=this.getCardinalityAggregateForChild(),s=a.fields,g=a.ops,c=a.as,I=[],u=Object(R.a)(A_);try{for(u.s();!(t=u.n()).done;){var l=t.value,C=this.facet[l];if(C){I.push(RH(C));var h=C.bin,B=C.sort;if(G_(h)&&I.push(RH(C,{binSuffix:"end"})),iH(B)){var f=B.field,d=B.op,Q=void 0===d?"min":d,E=Yq(C,B);i&&o?(s.push(E),g.push("max"),c.push(E)):(s.push(f),g.push(Q),c.push(E))}else if(Object(U.A)(B)){var p=oK(C,l);s.push(p),g.push("max"),c.push(p)}}}}catch(v){u.e(v)}finally{u.f()}var y=!!i&&!!o;return Object.assign({name:A,data:n,groupby:I},y||s.length>0?{aggregate:Object.assign(Object.assign({},y?{cross:y}:{}),s.length?{fields:s,ops:g,as:c}:{})}:{})}},{key:"facetSortFields",value:function(t){var e=this.facet[t];return e?iH(e.sort)?[Yq(e,e.sort,{expr:"datum"})]:Object(U.A)(e.sort)?[oK(e,t,{expr:"datum"})]:[RH(e,{expr:"datum"})]:[]}},{key:"facetSortOrder",value:function(t){var e=this.facet[t];if(e){var A=e.sort;return[(iH(A)?A.order:!Object(U.A)(A)&&A)||"ascending"]}return[]}},{key:"assembleLabelTitle",value:function(){var t=this.facet,e=this.config;if(t.facet)return fK(t.facet,"facet",e);var A,n={row:["top","bottom"],column:["left","right"]},r=Object(R.a)(cK);try{for(r.s();!(A=r.n()).done;){var i=A.value;if(t[i]){var o=sK("labelOrient",t[i],e,i);if(pM(n[i],o))return fK(t[i],i,e)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"assembleMarks",value:function(){var t=this,e=this.child,A=function(t){var e,A=[],n=xq(A),r=Object(R.a)(t.children);try{for(r.s();!(e=r.n()).done;){n(e.value,{source:t.name,name:null,transform:[]})}}catch(i){r.e(i)}finally{r.f()}return A}(this.component.data.facetRoot),n=e.assembleGroupEncodeEntry(!1),r=this.assembleLabelTitle()||e.assembleTitle(),i=e.assembleGroupStyle();return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:this.getName("cell"),type:"group"},r?{title:r}:{}),i?{style:i}:{}),{from:{facet:this.assembleFacet()},sort:{field:A_.map((function(e){return t.facetSortFields(e)})).flat(),order:A_.map((function(e){return t.facetSortOrder(e)})).flat()}}),A.length>0?{data:A}:{}),n?{encode:{update:n}}:{}),e.assembleGroup(function(t,e){if(t.component.selection&&RM(t.component.selection).length){var A=Object(U.Z)(t.getName("cell"));e.unshift({name:"facet",value:{},on:[{events:Ek("mousemove","scope"),update:"isTuple(facet) ? facet : group(".concat(A,").datum")}]})}return pW(e)}(this,[])))]}},{key:"getMapping",value:function(){return this.facet}}]),A}(pq);function Zq(t,e){var A,n,r,i,o,a,s,g,c,I,u,l=Object(R.a)(e);try{for(l.s();!(u=l.n()).done;){var C=u.value,h=C.data;if((!t.name||!C.hasName()||t.name===C.dataName)&&((!(null===(A=t.format)||void 0===A?void 0:A.mesh)||!(null===(n=h.format)||void 0===n?void 0:n.feature))&&(!(null===(r=t.format)||void 0===r?void 0:r.feature)&&!(null===(i=h.format)||void 0===i?void 0:i.feature)||(null===(o=t.format)||void 0===o?void 0:o.feature)===(null===(a=h.format)||void 0===a?void 0:a.feature))&&(!(null===(s=t.format)||void 0===s?void 0:s.mesh)&&!(null===(g=h.format)||void 0===g?void 0:g.mesh)||(null===(c=t.format)||void 0===c?void 0:c.mesh)===(null===(I=h.format)||void 0===I?void 0:I.mesh))))if(nZ(t)&&nZ(h)){if(CM(t.values,h.values))return C}else if(AZ(t)&&AZ(h)){if(t.url===h.url)return C}else if(rZ(t)&&t.name===C.dataName)return C}}catch(B){l.e(B)}finally{l.f()}return null}function Wq(t,e){if(t.data||!t.parent){if(null===t.data){var A=new rP({values:[]});return e.push(A),A}var n=Zq(t.data,e);if(n)return iZ(t.data)||(n.data.format=function(t){for(var e=arguments.length,A=new Array(e>1?e-1:0),n=1;n<e;n++)A[n-1]=arguments[n];for(var r=0,i=A;r<i.length;r++){var o=i[r];mM(t,null!==o&&void 0!==o?o:{})}return t}({},t.data.format,n.data.format)),!n.hasName()&&t.data.name&&(n.dataName=t.data.name),n;var r=new rP(t.data);return e.push(r),r}return t.parent.component.data.facetRoot?t.parent.component.data.facetRoot:t.parent.component.data.main}function Kq(t){var e,A,n,r,i,o,a,s,g,c,I=Wq(t,t.component.data.sources),u=t.component.data,l=u.outputNodes,C=u.outputNodeRefCounts,h=t.parent?t.parent.component.data.ancestorParse.clone():new eZ,B=t.data;iZ(B)?(oZ(B)?I=new aP(I,B.sequence):sZ(B)&&(I=new oP(I,B.graticule)),h.parseNothing=!0):null===(null===(e=null===B||void 0===B?void 0:B.format)||void 0===e?void 0:e.parse)&&(h.parseNothing=!0),I=null!==(A=QP.makeExplicit(I,t,h))&&void 0!==A?A:I,I=new EP(I);var d=t.parent&&Qq(t.parent);(Bq(t)||fq(t))&&d&&(I=null!==(n=nP.makeFromEncoding(I,t))&&void 0!==n?n:I),t.transforms.length>0&&(I=function(t,e,A){var n,r,i,o=0,a=Object(R.a)(e.transforms);try{for(a.s();!(i=a.n()).done;){var s=i.value,g=void 0,c=void 0;if(pZ(s))c=t=new iK(t,s),g="derived";else if(cZ(s)){var I=fP(s);c=t=null!==(n=QP.makeWithAncestors(t,{},I,A))&&void 0!==n?n:t,t=new LW(t,e,s.filter)}else if(yZ(s))c=t=nP.makeFromTransform(t,s,e),g="number";else if(mZ(s)){g="date",void 0===A.getWithExplicit(s.field).value&&(t=new QP(t,Object(E.a)({},s.field,g)),A.set(s.field,g,!1)),c=t=nW.makeFromTransform(t,s)}else if(bZ(s))c=t=lP.makeFromTransform(t,s),g="number",OW(e)&&(t=new EP(t));else if(IZ(s))c=t=Rq.make(t,e,s,o++),g="derived";else if(dZ(s))c=t=new vP(t,s),g="number";else if(QZ(s))c=t=new pP(t,s),g="number";else if(FZ(s))c=t=yP.makeFromTransform(t,s),g="derived";else if(wZ(s))c=t=new bq(t,s),g="derived";else if(EZ(s))c=t=new mq(t,s),g="derived";else if(uZ(s))c=t=new Nq(t,s),g="derived";else if(fZ(s))t=new kq(t,s);else if(vZ(s))c=t=Sq.makeFromTransform(t,s),g="derived";else if(lZ(s))c=t=new yq(t,s),g="derived";else if(CZ(s))c=t=new Uq(t,s),g="derived";else if(hZ(s))c=t=new Gq(t,s),g="derived";else{if(!BZ(s)){aT(f.invalidTransformIgnored(s));continue}c=t=new Dq(t,s),g="derived"}if(c&&void 0!==g){var u,l=Object(R.a)(null!==(r=c.producedFields())&&void 0!==r?r:[]);try{for(l.s();!(u=l.n()).done;){var C=u.value;A.set(C,g,!1)}}catch(h){l.e(h)}finally{l.f()}}}}catch(h){a.e(h)}finally{a.f()}return t}(I,t,h));var Q=function(t){var e={};if(Bq(t)&&t.component.selection){var A,n=Object(R.a)(RM(t.component.selection));try{for(n.s();!(A=n.n()).done;){var r,i=A.value,o=t.component.selection[i],a=Object(R.a)(o.project.items);try{for(a.s();!(r=a.n()).done;){var s=r.value;!s.channel&&YM(s.field)>1&&(e[s.field]="flatten")}}catch(g){a.e(g)}finally{a.f()}}}catch(g){n.e(g)}finally{n.f()}}return e}(t),p=dP(t);I=null!==(r=QP.makeWithAncestors(I,{},Object.assign(Object.assign({},Q),p),h))&&void 0!==r?r:I,Bq(t)&&(I=Fq.parseAll(I,t),I=wq.parseAll(I,t)),(Bq(t)||fq(t))&&(d||(I=null!==(i=nP.makeFromEncoding(I,t))&&void 0!==i?i:I),I=null!==(o=nW.makeFromEncoding(I,t))&&void 0!==o?o:I,I=iK.parseAllForSortIndex(I,t));var y=t.getName("raw"),v=new AW(I,y,"raw",C);if(l[y]=v,I=v,Bq(t)){var m=lP.makeFromEncoding(I,t);m&&(I=m,OW(t)&&(I=new EP(I))),I=null!==(a=Sq.makeFromEncoding(I,t))&&void 0!==a?a:I,I=null!==(s=yP.makeFromEncoding(I,t))&&void 0!==s?s:I}Bq(t)&&(I=null!==(g=vq.make(I,t))&&void 0!==g?g:I);var b=t.getName(gZ),F=new AW(I,b,gZ,C);l[b]=F,I=F,Bq(t)&&function(t,e){NW(t,(function(A){var n=A.name,r=t.getName("lookup_".concat(n));t.component.data.outputNodes[r]=A.materialized=new AW(new LW(e,t,{selection:n}),r,"lookup",t.component.data.outputNodeRefCounts)}))}(t,F);var w=null;if(fq(t)){var S=t.getName("facet");I=null!==(c=function(t,e){var A=e.row,n=e.column;if(A&&n){for(var r=null,i=0,o=[A,n];i<o.length;i++){var a=o[i];if(iH(a.sort)){var s=a.sort,g=s.field,c=s.op;t=r=new pP(t,{joinaggregate:[{op:void 0===c?"min":c,field:g,as:Yq(a,a.sort,{forAs:!0})}],groupby:[RH(a)]})}}return r}return null}(I,t.facet))&&void 0!==c?c:I,w=new CP(I,t,S,F.getSource()),l[S]=w}return Object.assign(Object.assign({},t.component.data),{outputNodes:l,outputNodeRefCounts:C,raw:v,main:F,facetRoot:w,ancestorParse:h})}var Pq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r,i){var o,a,s,g,c;return Object(F.a)(this,A),o=e.call(this,t,"concat",n,r,i,t.resolve),"shared"!==(null===(s=null===(a=t.resolve)||void 0===a?void 0:a.axis)||void 0===s?void 0:s.x)&&"shared"!==(null===(c=null===(g=t.resolve)||void 0===g?void 0:g.axis)||void 0===c?void 0:c.y)||aT(f.CONCAT_CANNOT_SHARE_AXIS),o.children=o.getChildren(t).map((function(t,e){return dX(t,Object(x.a)(o),o.getName("concat_"+e),void 0,i)})),o}return Object(w.a)(A,[{key:"parseData",value:function(){this.component.data=Kq(this);var t,e=Object(R.a)(this.children);try{for(e.s();!(t=e.n()).done;){t.value.parseData()}}catch(A){e.e(A)}finally{e.f()}}},{key:"parseSelections",value:function(){this.component.selection={};var t,e=Object(R.a)(this.children);try{for(e.s();!(t=e.n()).done;){var A=t.value;A.parseSelections();var n,r=Object(R.a)(RM(A.component.selection));try{for(r.s();!(n=r.n()).done;){var i=n.value;this.component.selection[i]=A.component.selection[i]}}catch(o){r.e(o)}finally{r.f()}}}catch(o){e.e(o)}finally{e.f()}}},{key:"parseMarkGroup",value:function(){var t,e=Object(R.a)(this.children);try{for(e.s();!(t=e.n()).done;){t.value.parseMarkGroup()}}catch(A){e.e(A)}finally{e.f()}}},{key:"parseAxesAndHeaders",value:function(){var t,e=Object(R.a)(this.children);try{for(e.s();!(t=e.n()).done;){t.value.parseAxesAndHeaders()}}catch(A){e.e(A)}finally{e.f()}}},{key:"getChildren",value:function(t){return PY(t)?t.vconcat:qY(t)?t.hconcat:t.concat}},{key:"parseLayoutSize",value:function(){Jq(this)}},{key:"parseAxisGroup",value:function(){return null}},{key:"assembleSelectionTopLevelSignals",value:function(t){return this.children.reduce((function(t,e){return e.assembleSelectionTopLevelSignals(t)}),t)}},{key:"assembleSignals",value:function(){return this.children.forEach((function(t){return t.assembleSignals()})),[]}},{key:"assembleLayoutSignals",value:function(){var t,e=yK(this),A=Object(R.a)(this.children);try{for(A.s();!(t=A.n()).done;){var n=t.value;e.push.apply(e,Object(p.a)(n.assembleLayoutSignals()))}}catch(r){A.e(r)}finally{A.f()}return e}},{key:"assembleSelectionData",value:function(t){return this.children.reduce((function(t,e){return e.assembleSelectionData(t)}),t)}},{key:"assembleMarks",value:function(){return this.children.map((function(t){var e=t.assembleTitle(),A=t.assembleGroupStyle(),n=t.assembleGroupEncodeEntry(!1);return Object.assign(Object.assign(Object.assign(Object.assign({type:"group",name:t.getName("group")},e?{title:e}:{}),A?{style:A}:{}),n?{encode:{update:n}}:{}),t.assembleGroup())}))}},{key:"assembleDefaultLayout",value:function(){var t=this.layout.columns;return Object.assign(Object.assign({},null!=t?{columns:t}:{}),{bounds:"full",align:"each"})}}]),A}(Eq);var qq=Object.assign(Object.assign({disable:1,gridScale:1,scale:1},eL),{labelExpr:1,encode:1}),Xq=RM(qq),zq=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(F.a)(this,A),(t=e.call(this)).explicit=n,t.implicit=r,t.mainExtracted=i,t}return Object(w.a)(A,[{key:"clone",value:function(){return new A(hM(this.explicit),hM(this.implicit),this.mainExtracted)}},{key:"hasAxisPart",value:function(t){return"axis"===t||("grid"===t||"title"===t?!!this.get(t):!(!1===(e=this.get(t))||null===e));var e}},{key:"hasOrientSignalRef",value:function(){return wT(this.explicit.orient)}}]),A}(PV);var $q={bottom:"top",top:"bottom",left:"right",right:"left"};function tX(t,e){if(!t)return e.map((function(t){return t.clone()}));if(t.length===e.length){for(var A=t.length,n=0;n<A;n++){var r=t[n],i=e[n];if(!!r!==!!i)return;if(r&&i){var o=r.getWithExplicit("orient"),a=i.getWithExplicit("orient");if(o.explicit&&a.explicit&&o.value!==a.value)return;t[n]=eX(r,i)}}return t}}function eX(t,e){var A,n=Object(R.a)(Xq);try{var r=function(){var n=A.value,r=tZ(t.getWithExplicit(n),e.getWithExplicit(n),n,"axis",(function(t,e){switch(n){case"title":return uY(t,e);case"gridScale":return{explicit:t.explicit,value:VM(t.value,e.value)}}return $V(t,e,n,"axis")}));t.setWithExplicit(n,r)};for(n.s();!(A=n.n()).done;)r()}catch(i){n.e(i)}finally{n.f()}return t}function AX(t,e,A,n,r){if("disable"===e)return void 0!==A;switch(A=A||{},e){case"titleAngle":case"labelAngle":return t===(wT(A.labelAngle)?A.labelAngle:PM(A.labelAngle));case"values":return!!A.values;case"encode":return!!A.encoding||!!A.labelAngle;case"title":if(t===rK(n,r))return!0}return t===A[e]}var nX=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function rX(t,e){var A,n,r,i=e.axis(t),o=new zq,a=HH(e.encoding[t]),s=e.mark,g=e.config,c=(null===i||void 0===i?void 0:i.orient)||(null===(A=g["x"===t?"axisX":"axisY"])||void 0===A?void 0:A.orient)||(null===(n=g.axis)||void 0===n?void 0:n.orient)||function(t){return"x"===t?"bottom":"left"}(t),I=e.getScaleComponent(t).get("type"),u=XW(t,I,c,e.config),l=void 0!==i?!i:$W("disable",g,null===i||void 0===i?void 0:i.style,u).configValue;if(o.set("disable",l,void 0!==i),l)return o;var C,h=function(t,e,A,n,r){var i=null===e||void 0===e?void 0:e.labelAngle;if(void 0!==i)return wT(i)?i:PM(i);var o=$W("labelAngle",t.config,null===e||void 0===e?void 0:e.style,r).configValue;return void 0!==o?PM(o):"x"===A&&pM([XT,PT],n.type)?270:void 0}(e,i=i||{},t,a,u),B={fieldOrDatumDef:a,axis:i,channel:t,model:e,scaleType:I,orient:c,labelAngle:h,mark:s,config:g},f=Object(R.a)(Xq);try{for(f.s();!(C=f.n()).done;){var d=C.value,Q=d in tK?tK[d](B):nL(d)?i[d]:void 0,E=void 0!==Q,p=AX(Q,d,i,e,t);if(E&&p)o.set(d,Q,p);else{var y=nL(d)&&"values"!==d?$W(d,e.config,i.style,u):{},v=y.configValue,m=void 0===v?void 0:v,b=y.configFrom,F=void 0===b?void 0:b,w=void 0!==m;E&&!w?o.set(d,Q,p):("vgAxisConfig"!==F||nX.has(d)&&w||zM(m)||wT(m))&&o.set(d,m,!1)}}}catch(U){f.e(U)}finally{f.f()}var S=null!==(r=i.encoding)&&void 0!==r?r:{},D=$M.reduce((function(A,n){var r;if(!o.hasAxisPart(n))return A;var i=wK(null!==(r=S[n])&&void 0!==r?r:{},e),a="labels"===n?function(t,e,A){var n,r=t.encoding,i=t.config,o=null!==(n=HH(r[e]))&&void 0!==n?n:HH(r[u_(e)]),a=t.axis(e)||{},s=a.format,g=a.formatType;return Vj(g)?Object.assign({text:Pj({fieldOrDatumDef:o,field:"datum.value",format:s,formatType:g,config:i})},A):A}(e,t,i):i;return void 0===a||DM(a)||(A[n]={update:a}),A}),{});return DM(D)||o.set("encode",D,!!i.encoding||void 0!==i.labelAngle),o}function iX(t){var e,A=t.encoding,n=t.size,r=Object(R.a)(f_);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=l_(i);XY(n[o])&&EH(A[i])&&(delete n[o],aT(f.stepDropped(o)))}}catch(a){r.e(a)}finally{r.f()}return n}function oX(t,e,A,n){var r=n.graticule,i=yL(t)?Object.assign({},t):{type:t},o=iY("orient",i,A);if(i.orient=function(t,e,A){switch(t){case cL:case BL:case fL:case lL:case IL:case sL:return}var n=e.x,r=e.y,i=e.x2,o=e.y2;switch(t){case aL:if(fH(n)&&(N_(n.bin)||fH(r)&&r.aggregate&&!n.aggregate))return"vertical";if(fH(r)&&(N_(r.bin)||fH(n)&&n.aggregate&&!r.aggregate))return"horizontal";if(o||i){if(A)return A;if(!i&&(fH(n)&&n.type===KT&&!G_(n.bin)||pH(n)))return"horizontal";if(!o&&(fH(r)&&r.type===KT&&!G_(r.bin)||pH(r)))return"vertical"}case uL:if(i&&(!fH(n)||!N_(n.bin))&&o&&(!fH(r)||!N_(r.bin)))return;case oL:if(o)return fH(r)&&N_(r.bin)?"horizontal":"vertical";if(i)return fH(n)&&N_(n.bin)?"vertical":"horizontal";if(t===uL){if(n&&!r)return"vertical";if(r&&!n)return"horizontal"}case gL:case CL:var a=EH(n),s=EH(r);if(a&&!s)return"tick"!==t?"horizontal":"vertical";if(!a&&s)return"tick"!==t?"vertical":"horizontal";if(a&&s){var g=n,c=r,I=g.type===qT,u=c.type===qT;return I&&!u?"tick"!==t?"vertical":"horizontal":!I&&u?"tick"!==t?"horizontal":"vertical":!g.aggregate&&c.aggregate?"tick"!==t?"vertical":"horizontal":g.aggregate&&!c.aggregate?"tick"!==t?"horizontal":"vertical":A||"vertical"}return A||void 0}return"vertical"}(i.type,e,o),void 0!==o&&o!==i.orient&&aT(f.orientOverridden(i.orient,o)),"bar"===i.type&&i.orient){var a=iY("cornerRadiusEnd",i,A);if(void 0!==a){var s,g="horizontal"===i.orient&&e.x2||"vertical"===i.orient&&e.y2?["cornerRadius"]:bL[i.orient],c=Object(R.a)(g);try{for(c.s();!(s=c.n()).done;){i[s.value]=a}}catch(I){c.e(I)}finally{c.f()}void 0!==i.cornerRadiusEnd&&delete i.cornerRadiusEnd}}return void 0===iY("opacity",i,A)&&(i.opacity=function(t,e){if(pM([cL,CL,BL,fL],t)&&!CY(e))return.7;return}(i.type,e)),void 0===i.filled&&(i.filled=!r&&function(t,e){var A=oY("filled",t,e),n=t.type;return VM(A,n!==cL&&n!==gL&&n!==uL)}(i,A)),void 0===iY("cursor",i,A)&&(i.cursor=function(t,e,A){if(e.href||t.href||iY("href",t,A))return"pointer";return t.cursor}(i,e,A)),i}function aX(t,e){t.config;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),LZ("x",t,{defaultPos:"mid"})),LZ("y",t,{defaultPos:"mid"})),xZ("size",t)),xZ("angle",t)),function(t,e,A){if(A)return{shape:{value:A}};return xZ("shape",t)}(t,0,e))}function sX(t){var e,A=t.config,n=t.markDef,r=n.orient,i="horizontal"===r?"width":"height",o=t.getScaleComponent("horizontal"===r?"x":"y"),a=null!==(e=iY("size",n,A,{vgChannel:i}))&&void 0!==e?e:A.tick.bandSize;if(void 0!==a)return a;var s=o?o.get("range"):void 0;return s&&ST(s)&&Object(U.E)(s.step)?3*s.step/4:3*eV(A.view,i)/4}var gX={arc:{vgMark:"arc",encodeEntry:function(t){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),LZ("x",t,{defaultPos:"mid"})),LZ("y",t,{defaultPos:"mid"})),ZZ(t,"radius","arc")),ZZ(t,"theta","arc"))}},area:{vgMark:"area",encodeEntry:function(t){return Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"})),HZ("x",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===t.markDef.orient})),HZ("y",t,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===t.markDef.orient})),zZ(t))}},bar:{vgMark:"rect",encodeEntry:function(t){return Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),ZZ(t,"x","bar")),ZZ(t,"y","bar"))}},circle:{vgMark:"symbol",encodeEntry:function(t){return aX(t,"circle")}},geoshape:{vgMark:"shape",encodeEntry:function(t){return Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}))},postEncodingTransform:function(t){var e=t.encoding.shape;return[Object.assign({type:"geoshape",projection:t.projectionName()},e&&fH(e)&&e.type===zT?{field:RH(e,{expr:"datum"})}:{})]}},image:{vgMark:"image",encodeEntry:function(t){return Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"})),ZZ(t,"x","image")),ZZ(t,"y","image")),DZ(t,"url"))}},line:{vgMark:"line",encodeEntry:function(t){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})),LZ("x",t,{defaultPos:"mid"})),LZ("y",t,{defaultPos:"mid"})),xZ("size",t,{vgChannel:"strokeWidth"})),zZ(t))}},point:{vgMark:"symbol",encodeEntry:function(t){return aX(t)}},rect:{vgMark:"rect",encodeEntry:function(t){return Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),ZZ(t,"x","rect")),ZZ(t,"y","rect"))}},rule:{vgMark:"rule",encodeEntry:function(t){var e=t.markDef.orient;return t.encoding.x||t.encoding.y||t.encoding.latitude||t.encoding.longitude?Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),HZ("x",t,{defaultPos:"horizontal"===e?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==e})),HZ("y",t,{defaultPos:"vertical"===e?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==e})),xZ("size",t,{vgChannel:"strokeWidth"})):{}}},square:{vgMark:"symbol",encodeEntry:function(t){return aX(t,"square")}},text:{vgMark:"text",encodeEntry:function(t){var e=t.config;t.encoding;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"})),LZ("x",t,{defaultPos:"mid"})),LZ("y",t,{defaultPos:"mid"})),DZ(t)),xZ("size",t,{vgChannel:"fontSize"})),xZ("angle",t)),$Z("align",function(t,e,A){if(void 0===iY("align",t,A))return"center";return}(t.markDef,0,e))),$Z("baseline",function(t,e,A){if(void 0===iY("baseline",t,A))return"middle";return}(t.markDef,0,e))),LZ("radius",t,{defaultPos:null,isMidPoint:!0})),LZ("theta",t,{defaultPos:null,isMidPoint:!0}))}},tick:{vgMark:"rect",encodeEntry:function(t){var e=t.config,A=t.markDef,n=A.orient,r="horizontal"===n?"width":"height",i="horizontal"===n?"height":"width";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"})),LZ("x",t,{defaultPos:"mid",vgChannel:"xc"})),LZ("y",t,{defaultPos:"mid",vgChannel:"yc"})),xZ("size",t,{defaultValue:sX(t),vgChannel:r})),Object(E.a)({},i,eY(iY("thickness",A,e))))}},trail:{vgMark:"trail",encodeEntry:function(t){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qZ(t,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"})),LZ("x",t,{defaultPos:"mid"})),LZ("y",t,{defaultPos:"mid"})),xZ("size",t)),zZ(t))}}};function cX(t){return pM([gL,oL,hL],t.mark)?function(t){var e=EY(t.mark,t.encoding),A=uX(t,{fromPrefix:e.length>0?"faceted_path_":""});return e.length>0?[{name:t.getName("pathgroup"),type:"group",from:{facet:{name:"faceted_path_"+t.requestDataName(gZ),data:t.requestDataName(gZ),groupby:e}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:A}]:A}(t):pM([aL],t.mark)?function(t){var e=GT.some((function(e){return iY(e,t.markDef,t.config)}));if(t.stack&&!t.fieldDef("size")&&e){var A,n,r=uX(t,{fromPrefix:"stack_group_"}),i=Object(ba.a)(r,1)[0],o=t.scaleName(t.stack.fieldChannel),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.vgField(t.stack.fieldChannel,e)},s=function(t,e){var A=[a({prefix:"min",suffix:"start",expr:e}),a({prefix:"max",suffix:"start",expr:e}),a({prefix:"min",suffix:"end",expr:e}),a({prefix:"max",suffix:"end",expr:e})];return"".concat(t,"(").concat(A.map((function(t){return"scale('".concat(o,"',").concat(t,")")})).join(","),")")};"x"===t.stack.fieldChannel?(A=Object.assign(Object.assign({},BM(i.encode.update,["y","yc","y2","height"].concat(Object(p.a)(GT)))),{x:{signal:s("min","datum")},x2:{signal:s("max","datum")},clip:{value:!0}}),n={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},i.encode.update=Object.assign(Object.assign({},fM(i.encode.update,["y","yc","y2"])),{height:{field:{group:"height"}}})):(A=Object.assign(Object.assign({},BM(i.encode.update,["x","xc","x2","width"])),{y:{signal:s("min","datum")},y2:{signal:s("max","datum")},clip:{value:!0}}),n={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},i.encode.update=Object.assign(Object.assign({},fM(i.encode.update,["x","xc","x2"])),{width:{field:{group:"width"}}}));var g,c=Object(R.a)(GT);try{for(c.s();!(g=c.n()).done;){var I=g.value,u=oY(I,t.markDef,t.config);i.encode.update[I]?(A[I]=i.encode.update[I],delete i.encode.update[I]):u&&(A[I]=eY(u)),u&&(i.encode.update[I]={value:0})}}catch(h){c.e(h)}finally{c.f()}var l=t.fieldDef(t.stack.groupbyChannel),C=RH(l)?[RH(l)]:[];((null===l||void 0===l?void 0:l.bin)||(null===l||void 0===l?void 0:l.timeUnit))&&C.push(RH(l,{binSuffix:"end"}));return(A=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce((function(e,A){if(i.encode.update[A])return Object.assign(Object.assign({},e),Object(E.a)({},A,i.encode.update[A]));var n=oY(A,t.markDef,t.config);return void 0!==n?Object.assign(Object.assign({},e),Object(E.a)({},A,eY(n))):e}),A)).stroke&&(A.strokeForeground={value:!0},A.strokeOffset={value:0}),[{type:"group",from:{facet:{data:t.requestDataName(gZ),name:"stack_group_"+t.requestDataName(gZ),groupby:C,aggregate:{fields:[a({suffix:"start"}),a({suffix:"start"}),a({suffix:"end"}),a({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:A},marks:[{type:"group",encode:{update:n},marks:[i]}]}]}return uX(t)}(t):uX(t)}function IX(t){var e=t.encoding,A=t.stack,n=t.mark,r=t.markDef,i=t.config,o=e.order;if(!(!Object(U.A)(o)&&mH(o)&&EM(o.value)||!o&&EM(iY("order",r,i)))){if((Object(U.A)(o)||fH(o))&&!A)return gY(o,{expr:"datum"});if(QL(n)){var a="horizontal"===r.orient?"y":"x",s=e[a];if(fH(s)){var g=s.sort;return Object(U.A)(g)?{field:RH(s,{prefix:a,suffix:"sort_index",expr:"datum"})}:iH(g)?{field:RH({aggregate:CY(t.encoding)?g.op:void 0,field:g.field},{expr:"datum"})}:rH(g)?{field:RH(t.fieldDef(g.encoding),{expr:"datum"}),order:g.order}:null===g?void 0:{field:RH(s,{binSuffix:t.stack&&t.stack.impute?"mid":void 0,expr:"datum"})}}}else;}}function uX(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fromPrefix:""},A=t.mark,n=t.markDef,r=t.config,i=VM(n.clip,lX(t),CX(t)),o=rY(n),a=t.encoding.key,s=IX(t),g=hX(t),c=iY("aria",n,r),I=gX[A].postEncodingTransform?gX[A].postEncodingTransform(t):null;return[Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({name:t.getName("marks"),type:gX[A].vgMark},i?{clip:!0}:{}),o?{style:o}:{}),a?{key:a.field}:{}),s?{sort:s}:{}),g||{}),!1===c?{aria:c}:{}),{from:{data:e.fromPrefix+t.requestDataName(gZ)},encode:{update:gX[A].encodeEntry(t)}}),I?{transform:I}:{})]}function lX(t){var e=t.getScaleComponent("x"),A=t.getScaleComponent("y");return!!(e&&e.get("selectionExtent")||A&&A.get("selectionExtent"))||void 0}function CX(t){var e=t.component.projection;return!(!e||e.isFit)||void 0}function hX(t){if(!t.component.selection)return null;for(var e=RM(t.component.selection).length,A=e,n=t.parent;n&&0===A;)A=RM(n.component.selection).length,n=n.parent;return A?{interactive:e>0}:null}var BX=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r){var i,o,a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},g=arguments.length>4?arguments[4]:void 0;Object(F.a)(this,A),(i=e.call(this,t,"unit",n,r,g,void 0,zY(t)?t.view:void 0)).specifiedScales={},i.specifiedAxes={},i.specifiedLegends={},i.specifiedProjection={},i.selection={},i.children=[];var c=yL(t.mark)?t.mark.type:t.mark;i.markDef=oX(t.mark,null!==(o=t.encoding)&&void 0!==o?o:{},g,{graticule:t.data&&sZ(t.data)});var I=i.encoding=BY(null!==(a=t.encoding)&&void 0!==a?a:{},i.markDef,g);return i.size=iX({encoding:I,size:zY(t)?Object.assign(Object.assign(Object.assign({},s),t.width?{width:t.width}:{}),t.height?{height:t.height}:{}):s}),i.stack=wV(c,I),i.specifiedScales=i.initScales(c,I),i.specifiedAxes=i.initAxes(I),i.specifiedLegends=i.initLegend(I),i.specifiedProjection=t.projection,i.selection=t.selection,i}return Object(w.a)(A,[{key:"scaleDomain",value:function(t){var e=this.specifiedScales[t];return e?e.domain:void 0}},{key:"axis",value:function(t){return this.specifiedAxes[t]}},{key:"legend",value:function(t){return this.specifiedLegends[t]}},{key:"initScales",value:function(t,e){return b_.reduce((function(t,A){var n,r=HH(e[A]);return r&&(t[A]=null!==(n=r.scale)&&void 0!==n?n:{}),t}),{})}},{key:"initAxes",value:function(t){return f_.reduce((function(e,A){var n=t[A];if(yH(n)||"x"===A&&yH(t.x2)||"y"===A&&yH(t.y2)){var r=yH(n)?n.axis:void 0;e[A]=r?Object.assign({},r):r}return e}),{})}},{key:"initLegend",value:function(t){return v_.reduce((function(e,A){var n=HH(t[A]);if(n&&function(t){switch(t){case YL:case VL:case ZL:case KL:case WL:case"opacity":case"strokeWidth":case"strokeDash":return!0;case"fillOpacity":case"strokeOpacity":case"angle":return!1}}(A)){var r=n.legend;e[A]=r?Object.assign({},r):r}return e}),{})}},{key:"parseData",value:function(){this.component.data=Kq(this)}},{key:"parseLayoutSize",value:function(){!function(t){var e,A=t.size,n=t.component,r=Object(R.a)(f_);try{for(r.s();!(e=r.n()).done;){var i=l_(e.value);if(A[i]){var o=A[i];n.layoutSize.set(i,XY(o)?"step":o,!0)}else{var a=Hq(t,i);n.layoutSize.set(i,a,!1)}}}catch(s){r.e(s)}finally{r.f()}}(this)}},{key:"parseSelections",value:function(){this.component.selection=function(t,e){var A,n,r={},i=t.config.selection,o=Object(R.a)(RM(null!==e&&void 0!==e?e:{}));try{var a=function(){var o=n.value,a=hM(e[o]),s=i[a.type],g=(s.fields,s.encodings,nM(s,["fields","encodings"]));for(var c in g)"encodings"===c&&a.fields||"fields"===c&&a.encodings||("mark"===c&&(a[c]=Object.assign(Object.assign({},g[c]),a[c])),void 0!==a[c]&&!0!==a[c]||(a[c]=null!==(A=g[c])&&void 0!==A?A:a[c]));var I=kM(o),u=r[I]=Object.assign(Object.assign({},a),{name:I,events:Object(U.H)(a.on)?Ek(a.on,"scope"):hM(a.on)});dW(u,(function(A){A.has(u)&&A.parse&&A.parse(t,u,a,e[o])}))};for(o.s();!(n=o.n()).done;)a()}catch(s){o.e(s)}finally{o.f()}return r}(this,this.selection)}},{key:"parseMarkGroup",value:function(){this.component.mark=cX(this)}},{key:"parseAxesAndHeaders",value:function(){var t;this.component.axes=(t=this,f_.reduce((function(e,A){return t.component.scales[A]&&(e[A]=[rX(A,t)]),e}),{}))}},{key:"assembleSelectionTopLevelSignals",value:function(t){return function(t,e){var A=!1;return NW(t,(function(n,r){var i=n.name,o=Object(U.Z)(i+SW);if(0===e.filter((function(t){return t.name===i})).length){var a="global"===n.resolve?"union":n.resolve,s="multi"===n.type?", true)":")";e.push({name:n.name,update:"".concat(UW,"(").concat(o,", ").concat(Object(U.Z)(a)).concat(s)})}A=!0,r.topLevelSignals&&(e=r.topLevelSignals(t,n,e)),dW(n,(function(A){A.topLevelSignals&&(e=A.topLevelSignals(t,n,e))}))})),A&&0===e.filter((function(t){return"unit"===t.name})).length&&e.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),pW(e)}(this,t)}},{key:"assembleSignals",value:function(){return[].concat(Object(p.a)(VW(this)),Object(p.a)((e=[],NW(t=this,(function(A,n){var r,i=A.name,o=n.modifyExpr(t,A);(r=e).push.apply(r,Object(p.a)(n.signals(t,A))),dW(A,(function(n){n.signals&&(e=n.signals(t,A,e)),n.modifyExpr&&(o=n.modifyExpr(t,A,o))})),e.push({name:i+RW,on:[{events:{signal:A.name+DW},update:"modify(".concat(Object(U.Z)(A.name+SW),", ").concat(o,")")}]})})),pW(e))));var t,e}},{key:"assembleSelectionData",value:function(t){return function(t,e){var A=Object(p.a)(e);return NW(t,(function(e){var n={name:e.name+SW};if(e.init){var r=e.project.items.map((function(t){t.signals;return nM(t,["signals"])})),i=e.init.map((function(t){return QW(t,!1)}));n.values="interval"===e.type?[{unit:xW(t,{escape:!1}),fields:r,values:i}]:i.map((function(e){return{unit:xW(t,{escape:!1}),fields:r,values:e}}))}A.filter((function(t){return t.name===e.name+SW})).length||A.push(n)})),A}(this,t)}},{key:"assembleLayout",value:function(){return null}},{key:"assembleLayoutSignals",value:function(){return yK(this)}},{key:"assembleMarks",value:function(){var t,e=null!==(t=this.component.mark)&&void 0!==t?t:[];return this.parent&&Qq(this.parent)||(e=EW(this,e)),e.map(this.correctDataNames)}},{key:"getMapping",value:function(){return this.encoding}},{key:"channelHasField",value:function(t){return lY(this.encoding,t)}},{key:"fieldDef",value:function(t){return jH(this.encoding[t])}},{key:"typedFieldDef",value:function(t){var e=this.fieldDef(t);return vH(e)?e:null}},{key:"hasProjection",get:function(){var t=this.encoding,e=this.mark===dL,A=t&&zL.some((function(e){return yH(t[e])}));return e||A}},{key:"mark",get:function(){return this.markDef.type}}]),A}(pq),fX=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(t,n,r,i,o){var a;Object(F.a)(this,A),a=e.call(this,t,"layer",n,r,o,t.resolve,t.view);var s=Object.assign(Object.assign(Object.assign({},i),t.width?{width:t.width}:{}),t.height?{height:t.height}:{});return a.children=t.layer.map((function(t,e){if(fV(t))return new A(t,Object(x.a)(a),a.getName("layer_"+e),s,o);if(SL(t))return new BX(t,Object(x.a)(a),a.getName("layer_"+e),s,o);throw new Error(f.invalidSpec(t))})),a}return Object(w.a)(A,[{key:"parseData",value:function(){this.component.data=Kq(this);var t,e=Object(R.a)(this.children);try{for(e.s();!(t=e.n()).done;){t.value.parseData()}}catch(A){e.e(A)}finally{e.f()}}},{key:"parseLayoutSize",value:function(){var t;Tq(t=this),jq(t,"width"),jq(t,"height")}},{key:"parseSelections",value:function(){this.component.selection={};var t,e=Object(R.a)(this.children);try{for(e.s();!(t=e.n()).done;){var A=t.value;A.parseSelections();var n,r=Object(R.a)(RM(A.component.selection));try{for(r.s();!(n=r.n()).done;){var i=n.value;this.component.selection[i]=A.component.selection[i]}}catch(o){r.e(o)}finally{r.f()}}}catch(o){e.e(o)}finally{e.f()}}},{key:"parseMarkGroup",value:function(){var t,e=Object(R.a)(this.children);try{for(e.s();!(t=e.n()).done;){t.value.parseMarkGroup()}}catch(A){e.e(A)}finally{e.f()}}},{key:"parseAxesAndHeaders",value:function(){!function(t){var e,A,n=t.component,r=n.axes,i=n.resolve,o={top:0,bottom:0,right:0,left:0},a=Object(R.a)(t.children);try{for(a.s();!(A=a.n()).done;){var s=A.value;s.parseAxesAndHeaders();var g,c=Object(R.a)(RM(s.component.axes));try{for(c.s();!(g=c.n()).done;){var I=g.value;i.axis[I]=DK(t.component.resolve,I),"shared"===i.axis[I]&&(r[I]=tX(r[I],s.component.axes[I]),r[I]||(i.axis[I]="independent",delete r[I]))}}catch(S){c.e(S)}finally{c.f()}}}catch(S){a.e(S)}finally{a.f()}var u,l=Object(R.a)(f_);try{for(l.s();!(u=l.n()).done;){var C,h=u.value,B=Object(R.a)(t.children);try{for(B.s();!(C=B.n()).done;){var f=C.value;if(f.component.axes[h]){if("independent"===i.axis[h]){r[h]=(null!==(e=r[h])&&void 0!==e?e:[]).concat(f.component.axes[h]);var d,Q=Object(R.a)(f.component.axes[h]);try{for(Q.s();!(d=Q.n()).done;){var E=d.value,p=E.getWithExplicit("orient"),y=p.value,v=p.explicit;if(!wT(y)){if(o[y]>0&&!v){var m=$q[y];o[y]>o[m]&&E.set("orient",m,!1)}o[y]++}}}catch(S){Q.e(S)}finally{Q.f()}}delete f.component.axes[h]}}}catch(S){B.e(S)}finally{B.f()}if("independent"===i.axis[h]&&r[h]&&r[h].length>1){var b,F=Object(R.a)(r[h]);try{for(F.s();!(b=F.n()).done;){var w=b.value;w.get("grid")&&!w.explicit.grid&&(w.implicit.grid=!1)}}catch(S){F.e(S)}finally{F.f()}}}}catch(S){l.e(S)}finally{l.f()}}(this)}},{key:"assembleSelectionTopLevelSignals",value:function(t){return this.children.reduce((function(t,e){return e.assembleSelectionTopLevelSignals(t)}),t)}},{key:"assembleSignals",value:function(){return this.children.reduce((function(t,e){return t.concat(e.assembleSignals())}),VW(this))}},{key:"assembleLayoutSignals",value:function(){return this.children.reduce((function(t,e){return t.concat(e.assembleLayoutSignals())}),yK(this))}},{key:"assembleSelectionData",value:function(t){return this.children.reduce((function(t,e){return e.assembleSelectionData(t)}),t)}},{key:"assembleTitle",value:function(){var t=Object(QV.a)(Object(dV.a)(A.prototype),"assembleTitle",this).call(this);if(t)return t;var e,n=Object(R.a)(this.children);try{for(n.s();!(e=n.n()).done;){if(t=e.value.assembleTitle())return t}}catch(r){n.e(r)}finally{n.f()}}},{key:"assembleLayout",value:function(){return null}},{key:"assembleMarks",value:function(){return function(t,e){var A,n=Object(R.a)(t.children);try{for(n.s();!(A=n.n()).done;){var r=A.value;Bq(r)&&(e=EW(r,e))}}catch(i){n.e(i)}finally{n.f()}return e}(this,this.children.flatMap((function(t){return t.assembleMarks()})))}},{key:"assembleLegends",value:function(){return this.children.reduce((function(t,e){return t.concat(e.assembleLegends())}),WK(this))}}]),A}(Eq);function dX(t,e,A,n,r){if(gH(t))return new Vq(t,e,A,r);if(fV(t))return new fX(t,e,A,n,r);if(SL(t))return new BX(t,e,A,n,r);if(function(t){return PY(t)||qY(t)||KY(t)}(t))return new Pq(t,e,A,r);throw new Error(f.invalidSpec(t))}function QX(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.logger&&iT(e.logger),e.fieldTitle&&OH(e.fieldTitle);try{var A=IV(Object(U.N)(e.config,t.config)),n=YV(t,A),r=dX(n,null,"",void 0,A);r.parse(),TP(r.component.data,r);var i=pX(r,EX(t,n.autosize,A,r),t.datasets,t.usermeta);return{spec:i,normalized:n}}finally{e.logger&&oT(),e.fieldTitle&&MH()}}function EX(t,e,A,n){var r,i=n.component.layoutSize.get("width"),o=n.component.layoutSize.get("height");if(void 0===e?(e={type:"pad"},n.hasAxisOrientSignalRef()&&(e.resize=!0)):Object(U.H)(e)&&(e={type:e}),i&&o&&("fit"===(r=e.type)||"fit-x"===r||"fit-y"===r))if("step"===i&&"step"===o)aT(f.droppingFit()),e.type="pad";else if("step"===i||"step"===o){var a="step"===i?"width":"height";aT(f.droppingFit(p_(a)));var s="width"===a?"height":"width";e.type=function(t){return t?"fit-".concat(p_(t)):"fit"}(s)}return Object.assign(Object.assign(Object.assign({},1===RM(e).length&&e.type?"pad"===e.type?{}:{autosize:e.type}:{autosize:e}),KV(A)),KV(t))}function pX(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,r=t.config?hV(t.config):void 0,i=[].concat(t.assembleSelectionData([]),Oq(t.component.data,A)),o=t.assembleProjections(),a=t.assembleTitle(),s=t.assembleGroupStyle(),g=t.assembleGroupEncodeEntry(!0),c=t.assembleLayoutSignals();return c=c.filter((function(t){return"width"!==t.name&&"height"!==t.name||void 0===t.value||(e[t.name]=+t.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"},t.description?{description:t.description}:{}),e),a?{title:a}:{}),s?{style:s}:{}),g?{encode:{update:g}}:{}),{data:i}),o.length>0?{projections:o}:{}),t.assembleGroup([].concat(Object(p.a)(c),Object(p.a)(t.assembleSelectionTopLevelSignals([]))))),r?{config:r}:{}),n?{usermeta:n}:{})}var yX=new(function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(F.a)(this,A),e.apply(this,arguments)}return Object(w.a)(A,[{key:"mapUnit",value:function(t,e){var A=e.config;if(t.encoding){var n=t.encoding,r=t.transform,i=hY(n,A),o=i.bins,a=i.timeUnits,s=i.aggregate,g=i.groupby,c=i.encoding,I=[].concat(Object(p.a)(r||[]),Object(p.a)(o),Object(p.a)(a),Object(p.a)(0===s.length?[]:[{aggregate:s,groupby:g}]));return Object.assign(Object.assign(Object.assign({},t),I.length>0?{transform:I}:{}),{encoding:c})}return t}}]),A}(EV));function vX(t,e){return yX.map(t,{config:e})}var mX,bX=AM.version,FX=A(953),wX=A.n(FX),SX=A(1140),DX={background:"#333",title:{color:"#fff"},style:{"guide-label":{fill:"#fff"},"guide-title":{fill:"#fff"}},axis:{domainColor:"#fff",gridColor:"#888",tickColor:"#fff"}},RX={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"]}},UX={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}},GX={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"]}},NX="Benton Gothic Bold, sans-serif",kX={"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"]},xX={background:"#ffffff",title:{anchor:"start",color:"#000000",font:NX,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:NX,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:NX,titleFontSize:13,titleFontWeight:"normal"},range:{category:kX["category-6"],diverging:kX["fireandice-6"],heatmap:kX["fire-7"],ordinal:kX["fire-7"],ramp:kX["fire-7"]}},OX={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"]}},MX={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"]},_X={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}},JX={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"]}},TX=SX.version,jX=function(t,e,A){var n=t.open(e),r=new URL(e).origin,i=40;t.addEventListener("message",(function e(A){A.source===n&&(i=0,t.removeEventListener("message",e,!1))}),!1),setTimeout((function t(){i<=0||(n.postMessage(A,r),setTimeout(t,250),i-=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(t){for(var e=arguments.length,A=new Array(e>1?e-1:0),n=1;n<e;n++)A[n-1]=arguments[n];for(var r=0,i=A;r<i.length;r++){var o=i[r];VX(t,o)}return t}function VX(t,e){for(var A=0,n=Object.keys(e);A<n.length;A++){var r=n[A];Object(U.jb)(t,r,e[r],!0)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(!e||e<0?0:+e,t.length)===t});var ZX=B,WX=d,KX="undefined"!==typeof window?window:void 0;void 0===WX&&(null===(mX=null===KX||void 0===KX?void 0:KX.vl)||void 0===mX?void 0:mX.compile)&&(WX=KX.vl);var PX={export:{svg:!0,png:!0},source:!0,compiled:!0,editor:!0},qX={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"},XX={vega:"Vega","vega-lite":"Vega-Lite"},zX={vega:ZX.version,"vega-lite":WX?WX.version:"not available"},$X={vega:function(t){return t},"vega-lite":function(t,e){return WX.compile(t,{config:e}).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 ez(t){return"function"===typeof t}function Az(t,e,A,n){var r="<html><head>".concat(e,'</head><body><pre><code class="json">'),i="</code></pre>".concat(A,"</body></html>"),o=window.open("");o.document.write(r+t+i),o.document.title="".concat(XX[n]," JSON Source")}function nz(t,e){var A;if(t.$schema){var n=wX()(t.$schema);e&&e!==n.library&&console.warn("The given visualization spec is written in ".concat(XX[n.library],", but mode argument sets ").concat(null!==(A=XX[e])&&void 0!==A?A:e,"."));var r=n.library;return Object(yt.satisfies)(zX[r],"^".concat(n.version.slice(1)))||console.warn("The input spec uses ".concat(XX[r]," ").concat(n.version,", but the current version of ").concat(XX[r]," is v").concat(zX[r],".")),r}return"mark"in t||"encoding"in t||"layer"in t||"hconcat"in t||"vconcat"in t||"facet"in t||"repeat"in t?"vega-lite":"marks"in t||"signals"in t||"scales"in t||"axes"in t?"vega":null!==e&&void 0!==e?e:"vega"}function rz(t){return!(!t||!("load"in t))}function iz(t,e){var A;return Y(this,void 0,void 0,H.a.mark((function n(){var r,i;return H.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Object(U.H)(t.config)){n.next=8;break}return n.t1=JSON,n.next=4,e.load(t.config);case 4:n.t2=n.sent,n.t0=n.t1.parse.call(n.t1,n.t2),n.next=9;break;case 8:n.t0=null!==(A=t.config)&&void 0!==A?A:{};case 9:if(r=n.t0,!Object(U.H)(t.patch)){n.next=18;break}return n.t4=JSON,n.next=14,e.load(t.patch);case 14:n.t5=n.sent,n.t3=n.t4.parse.call(n.t4,n.t5),n.next=19;break;case 18:n.t3=t.patch;case 19:return i=n.t3,n.abrupt("return",Object.assign(Object.assign(Object.assign({},t),i?{patch:i}:{}),r?{config:r}:{}));case 21:case"end":return n.stop()}}),n)})))}function oz(t,e){var A,n,r,i,o,a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=arguments.length>3?arguments[3]:void 0;return Y(this,void 0,void 0,H.a.mark((function c(){var I,u,l,C,h,B,f,d,E,p,y,v,m,b,F,w,S,D,R,G,N,x,O,M,L,_,J,T,j,V,Z,W,K;return H.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(K=function(){N&&document.removeEventListener("click",N),F.finalize()},I=s.theme?Object(U.N)(Q[s.theme],null!==(A=s.config)&&void 0!==A?A:{}):s.config,u=Object(U.B)(s.actions)?s.actions:YX({},PX,null!==(n=s.actions)&&void 0!==n?n:{}),l=Object.assign(Object.assign({},qX),s.i18n),C=null!==(r=s.renderer)&&void 0!==r?r:"canvas",h=null!==(i=s.logLevel)&&void 0!==i?i:ZX.Warn,B=null!==(o=s.downloadFileName)&&void 0!==o?o:"visualization",!1!==s.defaultStyle&&(f="vega-embed-style",document.getElementById(f)||((d=document.createElement("style")).id=f,d.innerText=void 0===s.defaultStyle||!0===s.defaultStyle?HX.toString():s.defaultStyle,document.head.appendChild(d))),E=nz(e,s.mode),p=$X[E](e,I),"vega-lite"===E&&p.$schema&&(y=wX()(p.$schema),Object(yt.satisfies)(zX.vega,"^".concat(y.version.slice(1)))||console.warn("The compiled spec uses Vega ".concat(y.version,", but current version is v").concat(zX.vega,"."))),v="string"===typeof t?document.querySelector(t):t){c.next=14;break}throw Error("".concat(t," does not exist"));case 14:return v.classList.add("vega-embed"),u&&v.classList.add("has-actions"),v.innerHTML="",(m=s.patch)&&(p=m instanceof Function?m(p):at(p,m,!0,!1).newDocument),s.formatLocale&&ZX.formatLocale(s.formatLocale),s.timeFormatLocale&&ZX.timeFormatLocale(s.timeFormatLocale),b=ZX.parse(p,"vega-lite"===E?{}:I),F=new ZX.View(b,{loader:g,logLevel:h,renderer:C}),!1!==s.tooltip&&(w=ez(s.tooltip)?s.tooltip:new k(!0===s.tooltip?{}:s.tooltip).call,F.tooltip(w)),void 0===(S=s.hover)&&(S="vega"===E),S&&(R=(D="boolean"===typeof S?{}:S).hoverSet,G=D.updateSet,F.hover(R,G)),s&&(null!=s.width&&F.width(s.width),null!=s.height&&F.height(s.height),null!=s.padding&&F.padding(s.padding)),c.next=30,F.initialize(t).runAsync();case 30:if(!1!==u){if(x=v,!1!==s.defaultStyle&&((O=document.createElement("details")).title=l.CLICK_TO_VIEW_ACTIONS,v.append(O),x=O,(M=document.createElement("summary")).innerHTML=tz,O.append(M),N=function(t){O.contains(t.target)||O.removeAttribute("open")},document.addEventListener("click",N)),L=document.createElement("div"),x.append(L),L.classList.add("vega-actions"),!0===u||!1!==u.export)for(_=function(){var t=T[J];if(!0===u||!0===u.export||u.export[t]){var e=l["".concat(t.toUpperCase(),"_ACTION")],A=document.createElement("a");A.text=e,A.href="#",A.target="_blank",A.download="".concat(B,".").concat(t),A.addEventListener("mousedown",(function(e){return Y(this,void 0,void 0,H.a.mark((function A(){var n;return H.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return e.preventDefault(),A.next=3,F.toImageURL(t,s.scaleFactor);case 3:n=A.sent,this.href=n;case 5:case"end":return A.stop()}}),A,this)})))})),L.append(A)}},J=0,T=["svg","png"];J<T.length;J++)_();!0!==u&&!1===u.source||((j=document.createElement("a")).text=l.SOURCE_ACTION,j.href="#",j.addEventListener("click",(function(t){var A,n;Az(pt()(e),null!==(A=s.sourceHeader)&&void 0!==A?A:"",null!==(n=s.sourceFooter)&&void 0!==n?n:"",E),t.preventDefault()})),L.append(j)),"vega-lite"!==E||!0!==u&&!1===u.compiled||((V=document.createElement("a")).text=l.COMPILED_ACTION,V.href="#",V.addEventListener("click",(function(t){var e,A;Az(pt()(p),null!==(e=s.sourceHeader)&&void 0!==e?e:"",null!==(A=s.sourceFooter)&&void 0!==A?A:"","vega"),t.preventDefault()})),L.append(V)),!0!==u&&!1===u.editor||(Z=null!==(a=s.editorUrl)&&void 0!==a?a:"https://vega.github.io/editor/",(W=document.createElement("a")).text=l.EDITOR_ACTION,W.href="#",W.addEventListener("click",(function(t){jX(window,Z,{config:I,mode:E,renderer:C,spec:pt()(e)}),t.preventDefault()})),L.append(W))}return c.abrupt("return",{view:F,spec:e,vgSpec:p,finalize:K});case 32:case"end":return c.stop()}}),c)})))}function az(t,e){Object.keys(e).forEach((function(A){!function(t,e,A){var n;A&&((n=A)&&"[object Function]"==={}.toString.call(n)?A(t.data(e)):t.change(e,ZX.changeset().remove((function(){return!0})).insert(A)))}(t,A,e[A])}))}function sz(t){var e=new Set;return t.forEach((function(t){Object.keys(t).forEach((function(t){e.add(t)}))})),e}var gz=function(){};function cz(t,e){var A=Object.keys(e);return A.forEach((function(A){try{t.addSignalListener(A,e[A])}catch(n){console.warn("Cannot add invalid signal listener.",n)}})),A.length>0}function Iz(t,e){var A=Object.keys(e);return A.forEach((function(A){try{t.removeSignalListener(A,e[A])}catch(n){console.warn("Cannot remove invalid signal listener.",n)}})),A.length>0}function uz(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function lz(){return(lz=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function Cz(t){var e=t.spec,A=t.width,n=t.height;return"undefined"!==typeof A&&"undefined"!==typeof n?lz({},e,{width:A,height:n}):"undefined"!==typeof A?lz({},e,{width:A}):"undefined"!==typeof n?lz({},e,{height:n}):e}var hz=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){var t;Object(F.a)(this,A);for(var 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)),uz(Object(x.a)(t),"containerRef",m.a.createRef()),uz(Object(x.a)(t),"viewPromise",void 0),uz(Object(x.a)(t),"handleError",(function(e){var A=t.props.onError;(void 0===A?gz:A)(e),console.warn(e)})),uz(Object(x.a)(t),"modifyView",(function(e){t.viewPromise&&t.viewPromise.then((function(t){return t&&e(t),!0})).catch(t.handleError)})),t}return Object(w.a)(A,[{key:"componentDidMount",value:function(){this.createView()}},{key:"componentDidUpdate",value:function(t){var e=this,A=sz([this.props,t]);if(A.delete("className"),A.delete("signalListeners"),A.delete("spec"),A.delete("style"),A.delete("width"),A.delete("height"),!this.viewPromise||Array.from(A).some((function(A){return e.props[A]!==t[A]})))this.clearView(),this.createView();else{var n=function(t,e){if(t===e)return!1;var A={width:!1,height:!1,isExpensive:!1},n=sz([t,e]);return!n.has("width")||"width"in t&&"width"in e&&t.width===e.width||("width"in t&&"number"===typeof t.width?A.width=t.width:A.isExpensive=!0),!n.has("height")||"height"in t&&"height"in e&&t.height===e.height||("height"in t&&"number"===typeof t.height?A.height=t.height:A.isExpensive=!0),n.delete("width"),n.delete("height"),Object(p.a)(n).some((function(A){return!(A in t)||!(A in e)||!aM()(t[A],e[A])}))&&(A.isExpensive=!0),!(!1===A.width&&!1===A.height&&!A.isExpensive)&&A}(Cz(this.props),Cz(t)),r=this.props.signalListeners,i=t.signalListeners;if(n)if(n.isExpensive)this.clearView(),this.createView();else{var o=!T(r,i);this.modifyView((function(t){!1!==n.width&&t.width(n.width),!1!==n.height&&t.height(n.height),o&&(i&&Iz(t,i),r&&cz(t,r)),t.run()}))}else T(r,i)||this.modifyView((function(t){i&&Iz(t,i),r&&cz(t,r),t.run()}))}}},{key:"componentWillUnmount",value:function(){this.clearView()}},{key:"createView",value:function(){var t=this.props,e=t.onNewView,A=t.signalListeners,n=void 0===A?{}:A,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,["spec","onNewView","signalListeners"]);if(this.containerRef.current){var i=Cz(this.props);this.viewPromise=function(t,e){var A,n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Y(this,void 0,void 0,H.a.mark((function o(){var a,s,g,c,I;return H.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(a=rz(i.loader)?i.loader:ZX.loader(i.loader),!Object(U.H)(e)){o.next=9;break}return o.t1=JSON,o.next=5,a.load(e);case 5:o.t2=o.sent,o.t0=o.t1.parse.call(o.t1,o.t2),o.next=10;break;case 9:o.t0=e;case 10:return s=o.t0,o.next=13,iz(null!==(A=s.usermeta&&s.usermeta.embedOptions)&&void 0!==A?A:{},a);case 13:return g=o.sent,o.next=16,iz(i,a);case 16:return c=o.sent,I=Object.assign(Object.assign({},YX(c,g)),{config:Object(U.N)(null!==(n=c.config)&&void 0!==n?n:{},null!==(r=g.config)&&void 0!==r?r:{})}),o.next=20,oz(t,s,I,a);case 20:return o.abrupt("return",o.sent);case 21:case"end":return o.stop()}}),o)})))}(this.containerRef.current,i,r).then((function(t){var e=t.view;return cz(e,n)&&e.run(),e})).catch(this.handleError),e&&this.modifyView(e)}}},{key:"clearView",value:function(){return this.modifyView((function(t){t.finalize()})),this.viewPromise=void 0,this}},{key:"render",value:function(){var t=this.props,e=t.className,A=t.style;return m.a.createElement("div",{ref:this.containerRef,className:e,style:A})}}]),A}(m.a.PureComponent);function Bz(){return(Bz=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function fz(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}uz(hz,"propTypes",{className:_.a.string,onError:_.a.func});var dz=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){var t;Object(F.a)(this,A);for(var 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)),fz(Object(x.a)(t),"vegaEmbed",m.a.createRef()),fz(Object(x.a)(t),"handleNewView",(function(e){t.update();var A=t.props.onNewView;(void 0===A?gz:A)(e)})),t}return Object(w.a)(A,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(t){T(this.props.data,t.data)||this.update()}},{key:"update",value:function(){var t=this.props.data;t&&this.vegaEmbed.current&&Object.keys(t).length>0&&this.vegaEmbed.current.modifyView((function(e){az(e,t),e.resize().run()}))}},{key:"render",value:function(){var t=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(this.props,["data"]);return m.a.createElement(hz,Bz({ref:this.vegaEmbed},t,{onNewView:this.handleNewView}))}}]),A}(m.a.PureComponent);fz(dz,"defaultProps",{data:{}});var Qz="table";function Ez(t){return"https://vega.github.io/schema/vega/v5.json"===t.$schema}function pz(t){var e=t.spec,A=t.data,n=t.signalListeners,r=Object(y.a)({},e,{data:Ez(e)?[{name:Qz}].concat(Object(p.a)(e.data)):{name:Qz}}),i=Object(v.useMemo)((function(){return m.a.createElement(dz,{spec:r,data:Object(E.a)({},Qz,A),signalListeners:n,tooltip:(new k).call,renderer:"canvas",scaleFactor:3})}),[r,A,n]);return r&&A&&A.length>0?m.a.createElement(v.Suspense,{fallback:m.a.createElement("div",null,"Loading...")},i):null}var yz={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}};A.d(e,"c",(function(){return pz})),A.d(e,"a",(function(){return Qz})),A.d(e,"b",(function(){return yz}))},,,,function(t,e,A){"use strict";var n=A(580);function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function t(t,e,A,r,i,o){if(o!==n){var a=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 a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var A={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:r};return A.PropTypes=A,A}},function(t,e,A){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,A){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,g=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,I=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,l=n?Symbol.for("react.forward_ref"):60112,C=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,B=n?Symbol.for("react.memo"):60115,f=n?Symbol.for("react.lazy"):60116,d=n?Symbol.for("react.block"):60121,Q=n?Symbol.for("react.fundamental"):60117,E=n?Symbol.for("react.responder"):60118,p=n?Symbol.for("react.scope"):60119;function y(t){if("object"===typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case I:case u:case o:case s:case a:case C:return t;default:switch(t=t&&t.$$typeof){case c:case l:case f:case B:case g:return t;default:return e}}case i:return e}}}function v(t){return y(t)===u}e.AsyncMode=I,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=g,e.Element=r,e.ForwardRef=l,e.Fragment=o,e.Lazy=f,e.Memo=B,e.Portal=i,e.Profiler=s,e.StrictMode=a,e.Suspense=C,e.isAsyncMode=function(t){return v(t)||y(t)===I},e.isConcurrentMode=v,e.isContextConsumer=function(t){return y(t)===c},e.isContextProvider=function(t){return y(t)===g},e.isElement=function(t){return"object"===typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return y(t)===l},e.isFragment=function(t){return y(t)===o},e.isLazy=function(t){return y(t)===f},e.isMemo=function(t){return y(t)===B},e.isPortal=function(t){return y(t)===i},e.isProfiler=function(t){return y(t)===s},e.isStrictMode=function(t){return y(t)===a},e.isSuspense=function(t){return y(t)===C},e.isValidElementType=function(t){return"string"===typeof t||"function"===typeof t||t===o||t===u||t===s||t===a||t===C||t===h||"object"===typeof t&&null!==t&&(t.$$typeof===f||t.$$typeof===B||t.$$typeof===g||t.$$typeof===c||t.$$typeof===l||t.$$typeof===Q||t.$$typeof===E||t.$$typeof===p||t.$$typeof===d)},e.typeOf=y},function(t,e,A){"use strict";A.d(e,"a",(function(){return g}));var n=A(6),r=A.n(n),i=A(11),o=A(110),a=A(259),s=A(154);function g(t){return c.apply(this,arguments)}function c(){return(c=Object(i.a)(r.a.mark((function t(e){var A,n,i,g,c,I,u,l,C;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=[],n=[],i=!0,g=!1,t.prev=4,I=Object(o.a)(e);case 6:return t.next=8,I.next();case 8:return u=t.sent,i=u.done,t.next=12,u.value;case 12:if(l=t.sent,i){t.next=19;break}"string"===typeof(C=l)?n.push(C):A.push(C);case 16:i=!0,t.next=6;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(4),g=!0,c=t.t0;case 25:if(t.prev=25,t.prev=26,i||null==I.return){t.next=30;break}return t.next=30,I.return();case 30:if(t.prev=30,!g){t.next=33;break}throw c;case 33:return t.finish(30);case 34:return t.finish(25);case 35:if(!(n.length>0)){t.next=38;break}return Object(s.a)(0===A.length),t.abrupt("return",n.join(""));case 38:return t.abrupt("return",a.b.apply(void 0,A));case 39:case"end":return t.stop()}}),t,null,[[4,21,25,35],[26,,30,34]])})))).apply(this,arguments)}},function(t,e,A){var n=A(144).Uint8Array;t.exports=n},function(t,e,A){var n=A(585),r=A(554),i=A(449);t.exports=function(t){return n(t,i,r)}},function(t,e,A){var n=A(553),r=A(212);t.exports=function(t,e,A){var i=e(t);return r(t)?i:n(i,A(t))}},function(t,e){t.exports=function(){return[]}},function(t,e,A){var n=A(712),r=A(539),i=A(212),o=A(425),a=A(450),s=A(446),g=Object.prototype.hasOwnProperty;t.exports=function(t,e){var A=i(t),c=!A&&r(t),I=!A&&!c&&o(t),u=!A&&!c&&!I&&s(t),l=A||c||I||u,C=l?n(t.length,String):[],h=C.length;for(var B in t)!e&&!g.call(t,B)||l&&("length"==B||I&&("offset"==B||"parent"==B)||u&&("buffer"==B||"byteLength"==B||"byteOffset"==B)||a(B,h))||C.push(B);return C}},function(t,e){t.exports=function(t,e){return function(A){return t(e(A))}}},function(t,e,A){var n=A(208)(A(144),"Set");t.exports=n},function(t,e,A){var n=A(791),r=A(1084),i=A(915),o=Object.defineProperty;e.f=A(561)?Object.defineProperty:function(t,e,A){if(n(t),e=i(e,!0),n(A),r)try{return o(t,e,A)}catch(a){}if("get"in A||"set"in A)throw TypeError("Accessors not supported!");return"value"in A&&(t[e]=A.value),t}},function(t,e){var A={}.hasOwnProperty;t.exports=function(t,e){return A.call(t,e)}},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n,r=A(137);(n=function(t){var e=t.length-1;return function(A){var n=A<=0?A=0:A>=1?(A=1,e-1):Math.floor(A*e),r=t[n],i=t[n+1],o=n>0?t[n-1]:2*r-i,a=n<e-1?t[n+2]:2*i-r;return function(t,e,A,n,r){var i=t*t,o=i*t;return((1-3*t+3*i-o)*e+(4-6*i+3*o)*A+(1+3*t+3*i-3*o)*n+o*r)/6}((A-n/e)*e,o,r,i,a)}},function(t){var e,A,r=t.length,i=new Array(r),o=new Array(r),a=new Array(r);for(e=0;e<r;++e)A=[t[e][0],t[e][1],t[e][2]],i[e]=A[0]||0,o[e]=A[1]||0,a[e]=A[2]||0;return i=n(i),o=n(o),a=n(a),function(t){return[i(t),o(t),a(t)]}})([[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 i=function(t){var e=t.length;return function(A){return t[Math.max(0,Math.min(e-1,Math.floor(A*e)))]}}([[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(t){var e=t.cellColorEncoding,A=t.expressionData,n=t.cellSets,o=t.cellSetSelection,a=t.cellSetColor,s=t.expressionDataAttrs;if("geneSelection"===e&&A&&s){for(var g=i,c=new Map,I=0;I<A.length;I+=1){var u=g(A[I]/255);c.set(s.rows[I],u)}return c}return"cellSetSelection"===e&&o&&n?Object(r.n)(n,o,a):new Map}},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(10),r=A(26);function i(t){return t&&"object"===Object(r.a)(t)&&t.constructor===Object}function o(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=A.clone?Object(n.a)({},t):t;return i(t)&&i(e)&&Object.keys(e).forEach((function(n){"__proto__"!==n&&(i(e[n])&&n in t?r[n]=o(t[n],e[n],A):r[n]=e[n])})),r}},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=A.n(i),a=(A(25),A(68)),s=A(32),g=A(64),c=A(90),I=A(41),u="undefined"!==typeof window?i.useLayoutEffect:i.useEffect;var l=function(t){var e=t.children,A=t.defer,n=void 0!==A&&A,r=t.fallback,o=void 0===r?null:r,a=i.useState(!1),s=a[0],g=a[1];return u((function(){n||g(!0)}),[n]),i.useEffect((function(){n&&g(!0)}),[n]),i.createElement(i.Fragment,null,s?e:o)},C=A(239),h=A(29),B=A(173),f=A(56),d=A(196),Q=A(253);function E(t,e){var A=Object.create(null);return t&&i.Children.map(t,(function(t){return t})).forEach((function(t){A[t.key]=function(t){return e&&Object(i.isValidElement)(t)?e(t):t}(t)})),A}function p(t,e,A){return null!=A[e]?A[e]:t.props[e]}function y(t,e,A){var n=E(t.children),r=function(t,e){function A(A){return A in e?e[A]:t[A]}t=t||{},e=e||{};var n,r=Object.create(null),i=[];for(var o in t)o in e?i.length&&(r[o]=i,i=[]):i.push(o);var a={};for(var s in e){if(r[s])for(n=0;n<r[s].length;n++){var g=r[s][n];a[r[s][n]]=A(g)}a[s]=A(s)}for(n=0;n<i.length;n++)a[i[n]]=A(i[n]);return a}(e,n);return Object.keys(r).forEach((function(o){var a=r[o];if(Object(i.isValidElement)(a)){var s=o in e,g=o in n,c=e[o],I=Object(i.isValidElement)(c)&&!c.props.in;!g||s&&!I?g||!s||I?g&&s&&Object(i.isValidElement)(c)&&(r[o]=Object(i.cloneElement)(a,{onExited:A.bind(null,a),in:c.props.in,exit:p(a,"exit",t),enter:p(a,"enter",t)})):r[o]=Object(i.cloneElement)(a,{in:!1}):r[o]=Object(i.cloneElement)(a,{onExited:A.bind(null,a),in:!0,exit:p(a,"exit",t),enter:p(a,"enter",t)})}})),r}var v=Object.values||function(t){return Object.keys(t).map((function(e){return t[e]}))},m=function(t){function e(e,A){var n,r=(n=t.call(this,e,A)||this).handleExited.bind(Object(f.a)(n));return n.state={contextValue:{isMounting:!0},handleExited:r,firstRender:!0},n}Object(d.a)(e,t);var A=e.prototype;return A.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},A.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(t,e){var A,n,r=e.children,o=e.handleExited;return{children:e.firstRender?(A=t,n=o,E(A.children,(function(t){return Object(i.cloneElement)(t,{onExited:n.bind(null,t),in:!0,appear:p(t,"appear",A),enter:p(t,"enter",A),exit:p(t,"exit",A)})}))):y(t,r,o),firstRender:!1}},A.handleExited=function(t,e){var A=E(this.props.children);t.key in A||(t.props.onExited&&t.props.onExited(e),this.mounted&&this.setState((function(e){var A=Object(n.a)({},e.children);return delete A[t.key],{children:A}})))},A.render=function(){var t=this.props,e=t.component,A=t.childFactory,n=Object(B.a)(t,["component","childFactory"]),r=this.state.contextValue,i=v(this.state.children).map(A);return delete n.appear,delete n.enter,delete n.exit,null===e?o.a.createElement(Q.a.Provider,{value:r},i):o.a.createElement(Q.a.Provider,{value:r},o.a.createElement(e,n,i))},e}(o.a.Component);m.propTypes={},m.defaultProps={component:"div",childFactory:function(t){return t}};var b=m,F="undefined"===typeof window?i.useEffect:i.useLayoutEffect;var w=function(t){var e=t.classes,A=t.pulsate,n=void 0!==A&&A,r=t.rippleX,o=t.rippleY,a=t.rippleSize,g=t.in,I=t.onExited,u=void 0===I?function(){}:I,l=t.timeout,C=i.useState(!1),h=C[0],B=C[1],f=Object(s.a)(e.ripple,e.rippleVisible,n&&e.ripplePulsate),d={width:a,height:a,top:-a/2+o,left:-a/2+r},Q=Object(s.a)(e.child,h&&e.childLeaving,n&&e.childPulsate),E=Object(c.a)(u);return F((function(){if(!g){B(!0);var t=setTimeout(E,l);return function(){clearTimeout(t)}}}),[E,g,l]),i.createElement("span",{className:f,style:d},i.createElement("span",{className:Q}))},S=i.forwardRef((function(t,e){var A=t.center,o=void 0!==A&&A,a=t.classes,g=t.className,c=Object(r.a)(t,["center","classes","className"]),I=i.useState([]),u=I[0],l=I[1],C=i.useRef(0),B=i.useRef(null);i.useEffect((function(){B.current&&(B.current(),B.current=null)}),[u]);var f=i.useRef(!1),d=i.useRef(null),Q=i.useRef(null),E=i.useRef(null);i.useEffect((function(){return function(){clearTimeout(d.current)}}),[]);var p=i.useCallback((function(t){var e=t.pulsate,A=t.rippleX,n=t.rippleY,r=t.rippleSize,o=t.cb;l((function(t){return[].concat(Object(h.a)(t),[i.createElement(w,{key:C.current,classes:a,timeout:550,pulsate:e,rippleX:A,rippleY:n,rippleSize:r})])})),C.current+=1,B.current=o}),[a]),y=i.useCallback((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=arguments.length>2?arguments[2]:void 0,n=e.pulsate,r=void 0!==n&&n,i=e.center,a=void 0===i?o||e.pulsate:i,s=e.fakeElement,g=void 0!==s&&s;if("mousedown"===t.type&&f.current)f.current=!1;else{"touchstart"===t.type&&(f.current=!0);var c,I,u,l=g?null:E.current,C=l?l.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(a||0===t.clientX&&0===t.clientY||!t.clientX&&!t.touches)c=Math.round(C.width/2),I=Math.round(C.height/2);else{var h=t.clientX?t.clientX:t.touches[0].clientX,B=t.clientY?t.clientY:t.touches[0].clientY;c=Math.round(h-C.left),I=Math.round(B-C.top)}if(a)(u=Math.sqrt((2*Math.pow(C.width,2)+Math.pow(C.height,2))/3))%2===0&&(u+=1);else{var y=2*Math.max(Math.abs((l?l.clientWidth:0)-c),c)+2,v=2*Math.max(Math.abs((l?l.clientHeight:0)-I),I)+2;u=Math.sqrt(Math.pow(y,2)+Math.pow(v,2))}t.touches?null===Q.current&&(Q.current=function(){p({pulsate:r,rippleX:c,rippleY:I,rippleSize:u,cb:A})},d.current=setTimeout((function(){Q.current&&(Q.current(),Q.current=null)}),80)):p({pulsate:r,rippleX:c,rippleY:I,rippleSize:u,cb:A})}}),[o,p]),v=i.useCallback((function(){y({},{pulsate:!0})}),[y]),m=i.useCallback((function(t,e){if(clearTimeout(d.current),"touchend"===t.type&&Q.current)return t.persist(),Q.current(),Q.current=null,void(d.current=setTimeout((function(){m(t,e)})));Q.current=null,l((function(t){return t.length>0?t.slice(1):t})),B.current=e}),[]);return i.useImperativeHandle(e,(function(){return{pulsate:v,start:y,stop:m}}),[v,y,m]),i.createElement("span",Object(n.a)({className:Object(s.a)(a.root,g),ref:E},c),i.createElement(b,{component:null,exit:!0},u))})),D=Object(I.a)((function(t){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(t.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(t.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(t.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(t.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"})(i.memo(S)),R=i.forwardRef((function(t,e){var A=t.action,o=t.buttonRef,I=t.centerRipple,u=void 0!==I&&I,h=t.children,B=t.classes,f=t.className,d=t.component,Q=void 0===d?"button":d,E=t.disabled,p=void 0!==E&&E,y=t.disableRipple,v=void 0!==y&&y,m=t.disableTouchRipple,b=void 0!==m&&m,F=t.focusRipple,w=void 0!==F&&F,S=t.focusVisibleClassName,R=t.onBlur,U=t.onClick,G=t.onFocus,N=t.onFocusVisible,k=t.onKeyDown,x=t.onKeyUp,O=t.onMouseDown,M=t.onMouseLeave,L=t.onMouseUp,_=t.onTouchEnd,J=t.onTouchMove,T=t.onTouchStart,j=t.onDragLeave,H=t.tabIndex,Y=void 0===H?0:H,V=t.TouchRippleProps,Z=t.type,W=void 0===Z?"button":Z,K=Object(r.a)(t,["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"]),P=i.useRef(null);var q=i.useRef(null),X=i.useState(!1),z=X[0],$=X[1];p&&z&&$(!1);var tt=Object(C.a)(),et=tt.isFocusVisible,At=tt.onBlurVisible,nt=tt.ref;function rt(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;return Object(c.a)((function(n){return e&&e(n),!A&&q.current&&q.current[t](n),!0}))}i.useImperativeHandle(A,(function(){return{focusVisible:function(){$(!0),P.current.focus()}}}),[]),i.useEffect((function(){z&&w&&!v&&q.current.pulsate()}),[v,w,z]);var it=rt("start",O),ot=rt("stop",j),at=rt("stop",L),st=rt("stop",(function(t){z&&t.preventDefault(),M&&M(t)})),gt=rt("start",T),ct=rt("stop",_),It=rt("stop",J),ut=rt("stop",(function(t){z&&(At(t),$(!1)),R&&R(t)}),!1),lt=Object(c.a)((function(t){p||(P.current||(P.current=t.currentTarget),et(t)&&($(!0),N&&N(t)),G&&G(t))})),Ct=function(){var t=a.findDOMNode(P.current);return Q&&"button"!==Q&&!("A"===t.tagName&&t.href)},ht=i.useRef(!1),Bt=Object(c.a)((function(t){w&&!ht.current&&z&&q.current&&" "===t.key&&(ht.current=!0,t.persist(),q.current.stop(t,(function(){q.current.start(t)}))),t.target===t.currentTarget&&Ct()&&" "===t.key&&t.preventDefault(),k&&k(t),t.target===t.currentTarget&&Ct()&&"Enter"===t.key&&(t.preventDefault(),U&&U(t))})),ft=Object(c.a)((function(t){w&&" "===t.key&&q.current&&z&&!t.defaultPrevented&&(ht.current=!1,t.persist(),q.current.stop(t,(function(){q.current.pulsate(t)}))),x&&x(t),U&&t.target===t.currentTarget&&Ct()&&" "===t.key&&!t.defaultPrevented&&U(t)})),dt=Q;"button"===dt&&K.href&&(dt="a");var Qt={};"button"===dt?(Qt.type=W,Qt.disabled=p):("a"===dt&&K.href||(Qt.role="button"),Qt["aria-disabled"]=p);var Et=Object(g.a)(o,e),pt=Object(g.a)(nt,P),yt=Object(g.a)(Et,pt);return i.createElement(dt,Object(n.a)({className:Object(s.a)(B.root,f,z&&[B.focusVisible,S],p&&B.disabled),onBlur:ut,onClick:U,onFocus:lt,onKeyDown:Bt,onKeyUp:ft,onMouseDown:it,onMouseLeave:st,onMouseUp:at,onDragLeave:ot,onTouchEnd:ct,onTouchMove:It,onTouchStart:gt,ref:yt,tabIndex:p?-1:Y},Qt,K),h,i.createElement(l,null,v||p?null:i.createElement(D,Object(n.a)({ref:q,center:u},V))))}));e.a=Object(I.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"})(R)},function(t,e,A){"use strict";var n=A(30),r=A(10),i=A(0),o=A.n(i),a=A(91),s=A(903),g={set:function(t,e,A,n){var r=t.get(e);r||(r=new Map,t.set(e,r)),r.set(A,n)},get:function(t,e,A){var n=t.get(e);return n?n.get(A):void 0},delete:function(t,e,A){t.get(e).delete(A)}},c=A(753),I=A(940),u=-1e9;function l(){return u+=1}A(26);var C=A(593);function h(t){var e="function"===typeof t;return{create:function(A,n){var i;try{i=e?t(A):t}catch(s){throw s}if(!n||!A.overrides||!A.overrides[n])return i;var o=A.overrides[n],a=Object(r.a)({},i);return Object.keys(o).forEach((function(t){a[t]=Object(C.a)(a[t],o[t])})),a},options:{}}}var B={};function f(t,e,A){var n=t.state;if(t.stylesOptions.disableGeneration)return e||{};n.cacheClasses||(n.cacheClasses={value:null,lastProp:null,lastJSS:{}});var r=!1;return n.classes!==n.cacheClasses.lastJSS&&(n.cacheClasses.lastJSS=n.classes,r=!0),e!==n.cacheClasses.lastProp&&(n.cacheClasses.lastProp=e,r=!0),r&&(n.cacheClasses.value=Object(s.a)({baseClasses:n.cacheClasses.lastJSS,newClasses:e,Component:A})),n.cacheClasses.value}function d(t,e){var A=t.state,n=t.theme,i=t.stylesOptions,o=t.stylesCreator,c=t.name;if(!i.disableGeneration){var I=g.get(i.sheetsManager,o,n);I||(I={refs:0,staticSheet:null,dynamicStyles:null},g.set(i.sheetsManager,o,n,I));var u=Object(r.a)({},o.options,{},i,{theme:n,flip:"boolean"===typeof i.flip?i.flip:"rtl"===n.direction});u.generateId=u.serverGenerateClassName||u.generateClassName;var l=i.sheetsRegistry;if(0===I.refs){var C;i.sheetsCache&&(C=g.get(i.sheetsCache,o,n));var h=o.create(n,c);C||((C=i.jss.createStyleSheet(h,Object(r.a)({link:!1},u))).attach(),i.sheetsCache&&g.set(i.sheetsCache,o,n,C)),l&&l.add(C),I.staticSheet=C,I.dynamicStyles=Object(a.d)(h)}if(I.dynamicStyles){var B=i.jss.createStyleSheet(I.dynamicStyles,Object(r.a)({link:!0},u));B.update(e),B.attach(),A.dynamicSheet=B,A.classes=Object(s.a)({baseClasses:I.staticSheet.classes,newClasses:B.classes}),l&&l.add(B)}else A.classes=I.staticSheet.classes;I.refs+=1}}function Q(t,e){var A=t.state;A.dynamicSheet&&A.dynamicSheet.update(e)}function E(t){var e=t.state,A=t.theme,n=t.stylesOptions,r=t.stylesCreator;if(!n.disableGeneration){var i=g.get(n.sheetsManager,r,A);i.refs-=1;var o=n.sheetsRegistry;0===i.refs&&(g.delete(n.sheetsManager,r,A),n.jss.removeStyleSheet(i.staticSheet),o&&o.remove(i.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),o&&o.remove(e.dynamicSheet))}}function p(t,e){var A,n=o.a.useRef([]),r=o.a.useMemo((function(){return{}}),e);n.current!==r&&(n.current=r,A=t()),o.a.useEffect((function(){return function(){A&&A()}}),[r])}function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.name,i=e.classNamePrefix,a=e.Component,s=e.defaultTheme,g=void 0===s?B:s,u=Object(n.a)(e,["name","classNamePrefix","Component","defaultTheme"]),C=h(t),y=A||i||"makeStyles";return C.options={index:l(),name:A,meta:y,classNamePrefix:y},function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(c.a)()||g,n=Object(r.a)({},o.a.useContext(I.a),{},u),i=o.a.useRef(),s=o.a.useRef();return p((function(){var r={name:A,state:{},stylesCreator:C,stylesOptions:n,theme:e};return d(r,t),s.current=!1,i.current=r,function(){E(r)}}),[e,C]),o.a.useEffect((function(){s.current&&Q(i.current,t),s.current=!0})),f(i.current,t.classes,a)}}A.d(e,"a",(function(){return y}))},function(t,e,A){var n=A(1221);t.exports=function(t,e){if(null==t)return{};var A,r,i=n(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)A=o[r],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(i[A]=t[A])}return i}},function(t,e,A){"use strict";var n=function(){};t.exports=n},,function(t,e,A){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=A(85),i=A(153),o=n(A(839)),a=A(202),s=n(A(838));function g(t,e){var A=i.getCoords(t),n=i.getCoords(e);if(2!==A.length)throw new Error("<intersects> line1 must only contain 2 coordinates");if(2!==n.length)throw new Error("<intersects> line2 must only contain 2 coordinates");var o=A[0][0],a=A[0][1],s=A[1][0],g=A[1][1],c=n[0][0],I=n[0][1],u=n[1][0],l=n[1][1],C=(l-I)*(s-o)-(u-c)*(g-a),h=(u-c)*(a-I)-(l-I)*(o-c),B=(s-o)*(a-I)-(g-a)*(o-c);if(0===C)return null;var f=h/C,d=B/C;if(f>=0&&f<=1&&d>=0&&d<=1){var Q=o+f*(s-o),E=a+f*(g-a);return r.point([Q,E])}return null}e.default=function(t,e){var A={},n=[];if("LineString"===t.type&&(t=r.feature(t)),"LineString"===e.type&&(e=r.feature(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var c=g(t,e);return c&&n.push(c),r.featureCollection(n)}var I=s.default();return I.load(o.default(e)),a.featureEach(o.default(t),(function(t){a.featureEach(I.search(t),(function(e){var r=g(t,e);if(r){var o=i.getCoords(r).join(",");A[o]||(A[o]=!0,n.push(r))}}))})),r.featureCollection(n)}},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,A){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function a(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(){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(t){return!1}}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.TwoClickPolygonMode=void 0;var I=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(l,t);var e,A,n,I,u=(e=l,function(){var t,A=g(e);if(s()){var n=g(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return a(this,t)});function l(){return r(this,l),u.apply(this,arguments)}return A=l,(n=[{key:"handleClick",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw||(this.addClickSequence(t),this.checkAndFinishPolygon(e))}},{key:"handleStartDragging",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw&&(this.addClickSequence(t),t.cancelPan())}},{key:"handleStopDragging",value:function(t,e){e.modeConfig&&e.modeConfig.dragToDraw&&(this.addClickSequence(t),this.checkAndFinishPolygon(e))}},{key:"checkAndFinishPolygon",value:function(t){var e=this.getClickSequence(),A=this.getTentativeGuide(t);if(e.length>1&&A&&"Polygon"===A.geometry.type){var n={type:"Feature",properties:{shape:A.properties.shape},geometry:{type:"Polygon",coordinates:A.geometry.coordinates}},r=this.getAddFeatureOrBooleanPolygonAction(n,t);this.resetClickSequence(),r&&t.onEdit(r)}}},{key:"getGuides",value:function(t){var e=t.lastPointerMoveEvent,A=t.modeConfig,n=this.getClickSequence(),r={type:"FeatureCollection",features:[]};if(0===n.length)return r;var i=n[0],o=e.mapCoords,a=this.getTwoClickPolygon(i,o,A);return a&&r.features.push({type:"Feature",properties:{shape:a.properties&&a.properties.shape,guideType:"tentative"},geometry:a.geometry}),r}},{key:"getTwoClickPolygon",value:function(t,e,A){return null}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),o(g(l.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"createTentativeFeature",value:function(t){var e,A=t.lastPointerMoveEvent,n=this.getClickSequence(),r=A?[A.mapCoords]:[];return 1===n.length&&(e=this.getTwoClickPolygon(n[0],r[0],t.modeConfig)),e}}])&&i(A.prototype,n),I&&i(A,I),l}(A(172).GeoJsonEditMode);e.TwoClickPolygonMode=I},function(t,e,A){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(t))return e;return[255*t[0],255*t[1],255*t[2],255*t[3]]},e.recursivelyTraverseNestedArrays=function t(e,A,r){if(!Array.isArray(e[0]))return!0;for(var i=0;i<e.length;i++)if(t(e[i],[].concat(function(t){if(Array.isArray(t))return n(t)}(o=A)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(o)||function(t,e){if(!t)return;if("string"===typeof t)return n(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return n(t,e)}(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.")}(),[i]),r)){r(e,A);break}var o;return!1}},function(t,e,A){"use strict";A.d(e,"a",(function(){return E}));var n=A(5),r=A(4),i=A(14),o=A(16),a=A(7),s=A(43),g=A(124),c=A(393),I=A(280),u=A(241),l=A(268),C=A(324);function h(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return B(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return B(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function f(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var d=[0,0,0,255],Q={stroked:!0,filled:!0,extruded:!1,elevationScale:1,wireframe:!1,_normalize:!0,_windingOrder:"CW",lineWidthUnits:"meters",lineWidthScale:1,lineWidthMinPixels:0,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineJointRounded:!1,lineMiterLimit:4,getPolygon:{type:"accessor",value:function(t){return t.polygon}},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:d},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0},E=function(t){Object(i.a)(A,t);var e=f(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"initializeState",value:function(){this.state={paths:[]},this.props.getLineDashArray&&s.a.removed("getLineDashArray","PathStyleExtension")()}},{key:"updateState",value:function(t){var e=this,A=(t.oldProps,t.props,t.changeFlags),n=A.dataChanged||A.updateTriggersChanged&&(A.updateTriggersChanged.all||A.updateTriggersChanged.getPolygon);if(n&&Array.isArray(A.dataChanged)){var r=this.state.paths.slice(),i=A.dataChanged.map((function(t){return Object(C.a)({data:r,getIndex:function(t){return t.__source.index},dataRange:t,replace:e._getPaths(t)})}));this.setState({paths:r,pathsDiff:i})}else n&&this.setState({paths:this._getPaths(),pathsDiff:null})}},{key:"_getPaths",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=this.props,n=A.data,r=A.getPolygon,i=A.positionFormat,o=A._normalize,a=[],s="XY"===i?2:3,c=e.startRow,I=e.endRow,u=Object(g.a)(n,c,I),C=u.iterable,B=u.objectInfo,f=h(C);try{for(f.s();!(t=f.n()).done;){var d=t.value;B.index++;var Q=r(d,B);o&&(Q=l.b(Q,s));var E=Q,p=E.holeIndices,y=Q.positions||Q;if(p)for(var v=0;v<=p.length;v++){var m=y.slice(p[v-1]||0,p[v]||y.length);a.push(this.getSubLayerRow({path:m},d,B.index))}else a.push(this.getSubLayerRow({path:y},d,B.index))}}catch(b){f.e(b)}finally{f.f()}return a}},{key:"renderLayers",value:function(){var t=this.props,e=t.data,A=t._dataDiff,n=t.stroked,r=t.filled,i=t.extruded,o=t.wireframe,a=t._normalize,s=t._windingOrder,g=t.elevationScale,c=t.transitions,l=t.positionFormat,C=this.props,h=C.lineWidthUnits,B=C.lineWidthScale,f=C.lineWidthMinPixels,Q=C.lineWidthMaxPixels,E=C.lineJointRounded,p=C.lineMiterLimit,y=C.lineDashJustified,v=this.props,m=v.getFillColor,b=v.getLineColor,F=v.getLineWidth,w=v.getLineDashArray,S=v.getElevation,D=v.getPolygon,R=v.updateTriggers,U=v.material,G=this.state,N=G.paths,k=G.pathsDiff,x=this.getSubLayerClass("fill",I.a),O=this.getSubLayerClass("stroke",u.a),M=this.shouldRenderSubLayer("fill",N)&&new x({_dataDiff:A,extruded:i,elevationScale:g,filled:r,wireframe:o,_normalize:a,_windingOrder:s,getElevation:S,getFillColor:m,getLineColor:i&&o?b:d,material:U,transitions:c},this.getSubLayerProps({id:"fill",updateTriggers:{getPolygon:R.getPolygon,getElevation:R.getElevation,getFillColor:R.getFillColor,lineColors:i&&o,getLineColor:R.getLineColor}}),{data:e,positionFormat:l,getPolygon:D});return[!i&&M,!i&&n&&this.shouldRenderSubLayer("stroke",N)&&new O({_dataDiff:k&&function(){return k},widthUnits:h,widthScale:B,widthMinPixels:f,widthMaxPixels:Q,rounded:E,miterLimit:p,dashJustified:y,_pathType:"loop",transitions:c&&{getWidth:c.getLineWidth,getColor:c.getLineColor,getPath:c.getPolygon},getColor:this.getSubLayerAccessor(b),getWidth:this.getSubLayerAccessor(F),getDashArray:this.getSubLayerAccessor(w)},this.getSubLayerProps({id:"stroke",updateTriggers:{getWidth:R.getLineWidth,getColor:R.getLineColor,getDashArray:R.getLineDashArray}}),{data:N,positionFormat:l,getPath:function(t){return t.path}}),i&&M]}}]),A}(c.a);E.layerName="PolygonLayer",E.defaultProps=Q},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(479),c=A(974),I=A(480),u=A(279),l=A(412),C=A(1),h=A(43),B=A(211),f=A(255),d=A(125);function Q(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function E(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(A),!0).forEach((function(e){Object(C.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Q(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function p(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var y=function(t){Object(o.a)(A,t);var e=p(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(n.a)(this,A);var r=t.id,i=void 0===r?Object(B.c)("column-geometry"):r,o=v(t),a=o.indices,s=o.attributes;return e.call(this,E(E({},t),{},{id:i,indices:a,attributes:s}))}return A}(f.a);function v(t){var e=t.radius,A=t.height,n=void 0===A?1:A,r=t.nradial,i=void 0===r?10:r,o=t.vertices;o&&(h.a.assert(o.length>=i),o=o.flatMap((function(t){return[t[0],t[1]]})),Object(d.f)(o,d.a.COUNTER_CLOCKWISE));var a=n>0,s=i+1,g=a?3*s+1:i,c=2*Math.PI/i,I=new Uint16Array(a?3*i*2:0),u=new Float32Array(3*g),l=new Float32Array(3*g),C=0;if(a){for(var B=0;B<s;B++)for(var f=B*c,Q=B%i,E=Math.sin(f),p=Math.cos(f),y=0;y<2;y++)u[C+0]=o?o[2*Q]:p*e,u[C+1]=o?o[2*Q+1]:E*e,u[C+2]=(.5-y)*n,l[C+0]=o?o[2*Q]:p,l[C+1]=o?o[2*Q+1]:E,C+=3;u[C+0]=u[C-3],u[C+1]=u[C-2],u[C+2]=u[C-1],C+=3}for(var v=a?0:1;v<s;v++){var m=Math.floor(v/2)*Math.sign(.5-v%2),b=m*c,F=(m+i)%i,w=Math.sin(b),S=Math.cos(b);u[C+0]=o?o[2*F]:S*e,u[C+1]=o?o[2*F+1]:w*e,u[C+2]=n/2,l[C+2]=1,C+=3}if(a)for(var D=0,R=0;R<i;R++)I[D++]=2*R+0,I[D++]=2*R+2,I[D++]=2*R+0,I[D++]=2*R+1,I[D++]=2*R+1,I[D++]=2*R+3;return{indices:I,attributes:{POSITION:{size:3,value:u},NORMAL:{size:3,value:l}}}}function m(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return w}));var b=[0,0,0,255],F={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(t){return t.position}},getFillColor:{type:"accessor",value:b},getLineColor:{type:"accessor",value:b},getLineWidth:{type:"accessor",value:1},getElevation:{type:"accessor",value:1e3},material:!0,getColor:{deprecatedFor:["getFillColor","getLineColor"]}},w=function(t){Object(o.a)(A,t);var e=m(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){return Object(i.a)(Object(s.a)(A.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:[g.a,c.a,I.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:b},instanceLineColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getLineColor",defaultValue:b},instanceStrokeWidths:{size:1,accessor:"getLineWidth",transition:!0}})}},{key:"updateState",value:function(t){var e=t.props,n=t.oldProps,r=t.changeFlags;Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,{props:e,oldProps:n,changeFlags:r});var o=r.extensionsChanged;if(o){var a=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(a)}),this.getAttributeManager().invalidateAll()}(o||e.diskResolution!==n.diskResolution||e.vertices!==n.vertices||(e.extruded||e.stroked)!==(n.extruded||n.stroked))&&this._updateGeometry(e)}},{key:"getGeometry",value:function(t,e,A){var n=new y({radius:1,height:A?2:0,vertices:e,nradial:t}),r=0;if(e)for(var i=0;i<t;i++){var o=e[i];r+=Math.sqrt(o[0]*o[0]+o[1]*o[1])/t}else r=1;return this.setState({edgeDistance:Math.cos(Math.PI/t)*r}),n}},{key:"_getModel",value:function(t){return new l.a(t,Object.assign({},this.getShaders(),{id:this.props.id,isInstanced:!0}))}},{key:"_updateGeometry",value:function(t){var e=t.diskResolution,A=t.vertices,n=t.extruded,r=t.stroked,i=this.getGeometry(e,A,n||r);this.setState({fillVertexCount:i.attributes.POSITION.value.length/3,wireframeVertexCount:i.indices.value.length}),this.state.model.setProps({geometry:i})}},{key:"draw",value:function(t){var e=t.uniforms,A=this.context.viewport,n=this.props,r=n.lineWidthUnits,i=n.lineWidthScale,o=n.lineWidthMinPixels,a=n.lineWidthMaxPixels,s=n.elevationScale,g=n.extruded,c=n.filled,I=n.stroked,u=n.wireframe,l=n.offset,C=n.coverage,h=n.radius,B=n.angle,f=this.state,d=f.model,Q=f.fillVertexCount,E=f.wireframeVertexCount,p=f.edgeDistance,y="pixels"===r?A.metersPerPixel:1;d.setUniforms(Object.assign({},e,{radius:h,angle:B/180*Math.PI,offset:l,extruded:g,coverage:C,elevationScale:s,edgeDistance:p,widthScale:i*y,widthMinPixels:o,widthMaxPixels:a})),g&&u&&(d.setProps({isIndexed:!0}),d.setVertexCount(E).setDrawMode(1).setUniforms({isStroke:!0}).draw()),c&&(d.setProps({isIndexed:!1}),d.setVertexCount(Q).setDrawMode(5).setUniforms({isStroke:!1}).draw()),!g&&I&&(d.setProps({isIndexed:!1}),d.setVertexCount(2*Q/3).setDrawMode(5).setUniforms({isStroke:!0}).draw())}}]),A}(u.a);w.layerName="ColumnLayer",w.defaultProps=F},function(t,e,A){"use strict";var n=A(805),r=A(806),i=A(807),o=A(808).orient2d;function a(t,e,A){e=Math.max(0,void 0===e?2:e),A=A||0;var r=function(t){for(var e=t[0],A=t[0],n=t[0],r=t[0],o=0;o<t.length;o++){var a=t[o];a[0]<e[0]&&(e=a),a[0]>n[0]&&(n=a),a[1]<A[1]&&(A=a),a[1]>r[1]&&(r=a)}var s=[e,A,n,r],g=s.slice();for(o=0;o<t.length;o++)i(t[o],s)||g.push(t[o]);return function(t){t.sort(Q);for(var e=[],A=0;A<t.length;A++){for(;e.length>=2&&l(e[e.length-2],e[e.length-1],t[A])<=0;)e.pop();e.push(t[A])}for(var n=[],r=t.length-1;r>=0;r--){for(;n.length>=2&&l(n[n.length-2],n[n.length-1],t[r])<=0;)n.pop();n.push(t[r])}return n.pop(),e.pop(),e.concat(n)}(g)}(t),o=new n(16);o.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},o.compareMinX=function(t,e){return t[0]-e[0]},o.compareMinY=function(t,e){return t[1]-e[1]},o.load(t);for(var a,g=[],c=0;c<r.length;c++){var I=r[c];o.remove(I),a=h(I,a),g.push(a)}var u=new n(16);for(c=0;c<g.length;c++)u.insert(C(g[c]));for(var f=e*e,d=A*A;g.length;){var E=g.shift(),p=E.p,y=E.next.p,v=B(p,y);if(!(v<d)){var m=v/f;(I=s(o,E.prev.p,p,y,E.next.next.p,m,u))&&Math.min(B(I,p),B(I,y))<=m&&(g.push(E),g.push(h(I,E)),o.remove(I),u.remove(E),u.insert(C(E)),u.insert(C(E.next)))}}E=a;var b=[];do{b.push(E.p),E=E.next}while(E!==a);return b.push(E.p),b}function s(t,e,A,n,i,o,a){for(var s=new r([],g),I=t.data;I;){for(var l=0;l<I.children.length;l++){var C=I.children[l],h=I.leaf?f(C,A,n):c(A,n,C);h>o||s.push({node:C,dist:h})}for(;s.length&&!s.peek().node.children;){var B=s.pop(),d=B.node,Q=f(d,e,A),E=f(d,n,i);if(B.dist<Q&&B.dist<E&&u(A,d,a)&&u(n,d,a))return d}(I=s.pop())&&(I=I.node)}return null}function g(t,e){return t.dist-e.dist}function c(t,e,A){if(I(t,A)||I(e,A))return 0;var n=d(t[0],t[1],e[0],e[1],A.minX,A.minY,A.maxX,A.minY);if(0===n)return 0;var r=d(t[0],t[1],e[0],e[1],A.minX,A.minY,A.minX,A.maxY);if(0===r)return 0;var i=d(t[0],t[1],e[0],e[1],A.maxX,A.minY,A.maxX,A.maxY);if(0===i)return 0;var o=d(t[0],t[1],e[0],e[1],A.minX,A.maxY,A.maxX,A.maxY);return 0===o?0:Math.min(n,r,i,o)}function I(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function u(t,e,A){for(var n,r,i,o,a=Math.min(t[0],e[0]),s=Math.min(t[1],e[1]),g=Math.max(t[0],e[0]),c=Math.max(t[1],e[1]),I=A.search({minX:a,minY:s,maxX:g,maxY:c}),u=0;u<I.length;u++)if(n=I[u].p,r=I[u].next.p,i=t,n!==(o=e)&&r!==i&&l(n,r,i)>0!==l(n,r,o)>0&&l(i,o,n)>0!==l(i,o,r)>0)return!1;return!0}function l(t,e,A){return o(t[0],t[1],e[0],e[1],A[0],A[1])}function C(t){var e=t.p,A=t.next.p;return t.minX=Math.min(e[0],A[0]),t.minY=Math.min(e[1],A[1]),t.maxX=Math.max(e[0],A[0]),t.maxY=Math.max(e[1],A[1]),t}function h(t,e){var A={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(A.next=e.next,A.prev=e,e.next.prev=A,e.next=A):(A.prev=A,A.next=A),A}function B(t,e){var A=t[0]-e[0],n=t[1]-e[1];return A*A+n*n}function f(t,e,A){var n=e[0],r=e[1],i=A[0]-n,o=A[1]-r;if(0!==i||0!==o){var a=((t[0]-n)*i+(t[1]-r)*o)/(i*i+o*o);a>1?(n=A[0],r=A[1]):a>0&&(n+=i*a,r+=o*a)}return(i=t[0]-n)*i+(o=t[1]-r)*o}function d(t,e,A,n,r,i,o,a){var s,g,c,I,u=A-t,l=n-e,C=o-r,h=a-i,B=t-r,f=e-i,d=u*u+l*l,Q=u*C+l*h,E=C*C+h*h,p=u*B+l*f,y=C*B+h*f,v=d*E-Q*Q,m=v,b=v;0===v?(g=0,m=1,I=y,b=E):(I=d*y-Q*p,(g=Q*y-E*p)<0?(g=0,I=y,b=E):g>m&&(g=m,I=y+Q,b=E)),I<0?(I=0,-p<0?g=0:-p>d?g=m:(g=-p,m=d)):I>b&&(I=b,-p+Q<0?g=0:-p+Q>d?g=m:(g=-p+Q,m=d));var F=(1-(c=0===I?0:I/b))*r+c*o-((1-(s=0===g?0:g/m))*t+s*A),w=(1-c)*i+c*a-((1-s)*e+s*n);return F*F+w*w}function Q(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}t.exports=a,t.exports.default=a},function(t,e,A){"use strict";var n=A(0),r=n.createContext();e.a=r},function(t,e,A){"use strict";function n(t){if(null===t||void 0===t)throw new Error("radians is required");return 180*(t%(2*Math.PI))/Math.PI}function r(t){if(null===t||void 0===t)throw new Error("degrees is required");return t%360*Math.PI/180}function i(t){return!!t&&t.constructor===Object}function o(t){if(!t)throw new Error("coord is required");if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates;if(Array.isArray(t)&&t.length>=2&&void 0===t[0].length&&void 0===t[1].length)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function a(t,e){var A=r(t[1]),i=r(e[1]),o=r(e[0]-t[0]);o>Math.PI&&(o-=2*Math.PI),o<-Math.PI&&(o+=2*Math.PI);var a=Math.log(Math.tan(i/2+Math.PI/4)/Math.tan(A/2+Math.PI/4));return(n(Math.atan2(o,a))+360)%360}e.a=function(t,e,A){if(!i(A=A||{}))throw new Error("options is invalid");var n,r=A.final;if(!t)throw new Error("start point is required");if(!e)throw new Error("end point is required");return(n=r?a(o(e),o(t)):a(o(t),o(e)))>180?-(360-n):n}},function(t,e,A){"use strict";var n={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 r(t,e){if(void 0===t||null===t)throw new Error("distance is required");if(e&&"string"!==typeof e)throw new Error("units must be a string");var A=n[e||"kilometers"];if(!A)throw new Error(e+" units is invalid");return t/A}function i(t,e,A){if(null===t||void 0===t)throw new Error("length is required");if(!(t>=0))throw new Error("length must be a positive number");return function(t,e){if(void 0===t||null===t)throw new Error("radians is required");if(e&&"string"!==typeof e)throw new Error("units must be a string");var A=n[e||"kilometers"];if(!A)throw new Error(e+" units is invalid");return t*A}(r(t,e),A||"kilometers")}function o(t){return!!t&&t.constructor===Object}function a(t){if(!t)throw new Error("coord is required");if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates;if(Array.isArray(t)&&t.length>=2&&void 0===t[0].length&&void 0===t[1].length)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}e.a=function(t,e,A){if(!o(A=A||{}))throw new Error("options is invalid");var n=A.units;if(!t)throw new Error("from point is required");if(!e)throw new Error("to point is required");var r=a(t),s=a(e);return s[0]+=s[0]-r[0]>180?-360:r[0]-s[0]>180?360:0,i(function(t,e,A){var n=A=void 0===A?6371008.8:Number(A),r=t[1]*Math.PI/180,i=e[1]*Math.PI/180,o=i-r,a=Math.abs(e[0]-t[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var s=Math.log(Math.tan(i/2+Math.PI/4)/Math.tan(r/2+Math.PI/4)),g=Math.abs(s)>1e-11?o/s:Math.cos(r);return Math.sqrt(o*o+g*g*a*a)*n}(r,s),"meters",n)}},function(t,e,A){"use strict";var n=A(9),r=A(15),i=A(23),o=A(24),a=A(602),s=A(393),g=A(20),c=A(271),I=A(40),u=A(1),l=A(5),C=A(4),h=A(14),B=A(16),f=A(7),d=A(857),Q="\nuniform DATAFILTER_TYPE filter_min;\nuniform DATAFILTER_TYPE filter_softMin;\nuniform DATAFILTER_TYPE filter_softMax;\nuniform DATAFILTER_TYPE filter_max;\nuniform bool filter_useSoftMargin;\nuniform bool filter_enabled;\nuniform bool filter_transformSize;\n\n#ifdef NON_INSTANCED_MODEL\n  #define DATAFILTER_ATTRIB filterValues\n  #define DATAFILTER_ATTRIB_64LOW filterValues64Low\n#else\n  #define DATAFILTER_ATTRIB instanceFilterValues\n  #define DATAFILTER_ATTRIB_64LOW instanceFilterValues64Low\n#endif\n\nattribute DATAFILTER_TYPE DATAFILTER_ATTRIB;\n#ifdef DATAFILTER_DOUBLE\n  attribute DATAFILTER_TYPE DATAFILTER_ATTRIB_64LOW;\n\n  uniform DATAFILTER_TYPE filter_min64High;\n  uniform DATAFILTER_TYPE filter_max64High;\n#endif\n\nvarying float dataFilter_value;\n\nfloat dataFilter_reduceValue(float value) {\n  return value;\n}\nfloat dataFilter_reduceValue(vec2 value) {\n  return min(value.x, value.y);\n}\nfloat dataFilter_reduceValue(vec3 value) {\n  return min(min(value.x, value.y), value.z);\n}\nfloat dataFilter_reduceValue(vec4 value) {\n  return min(min(value.x, value.y), min(value.z, value.w));\n}\nvoid dataFilter_setValue(DATAFILTER_TYPE valueFromMin, DATAFILTER_TYPE valueFromMax) {\n  if (filter_enabled) {\n    if (filter_useSoftMargin) {\n      dataFilter_value = dataFilter_reduceValue(\n        smoothstep(filter_min, filter_softMin, valueFromMin) *\n        (1.0 - smoothstep(filter_softMax, filter_max, valueFromMax))\n      );\n    } else {\n      dataFilter_value = dataFilter_reduceValue(\n        step(filter_min, valueFromMin) * step(valueFromMax, filter_max)\n      );\n    }\n  } else {\n    dataFilter_value = 1.0;\n  }\n}\n",E="\nuniform bool filter_transformColor;\nvarying float dataFilter_value;\n",p=function(t){if(!t||!t.extensions)return{};var e=t.filterRange,A=void 0===e?[-1,1]:e,n=t.filterEnabled,r=void 0===n||n,i=t.filterTransformSize,o=void 0===i||i,a=t.filterTransformColor,s=void 0===a||a,g=t.filterSoftRange||A,c=Number.isFinite(A[0])?{filter_min:A[0],filter_softMin:g[0],filter_softMax:g[1],filter_max:A[1]}:{filter_min:A.map((function(t){return t[0]})),filter_softMin:g.map((function(t){return t[0]})),filter_softMax:g.map((function(t){return t[1]})),filter_max:A.map((function(t){return t[1]}))};return c.filter_enabled=r,c.filter_useSoftMargin=Boolean(t.filterSoftRange),c.filter_transformSize=r&&o,c.filter_transformColor=r&&s,c},y={"vs:#main-start":"\n    #ifdef DATAFILTER_DOUBLE\n      dataFilter_setValue(\n        DATAFILTER_ATTRIB - filter_min64High + DATAFILTER_ATTRIB_64LOW,\n        DATAFILTER_ATTRIB - filter_max64High + DATAFILTER_ATTRIB_64LOW\n      );\n    #else\n      dataFilter_setValue(DATAFILTER_ATTRIB, DATAFILTER_ATTRIB);\n    #endif\n  ","vs:DECKGL_FILTER_SIZE":"\n    if (filter_transformSize) {\n      size = size * dataFilter_value;\n    }\n  ","fs:DECKGL_FILTER_COLOR":"\n    if (dataFilter_value == 0.0) discard;\n    if (filter_transformColor) {\n      color.a *= dataFilter_value;\n    }\n  "},v={name:"data-filter",vs:Q,fs:E,inject:y,getUniforms:p},m={name:"data-filter-fp64",vs:Q,fs:E,inject:y,getUniforms:function(t){if(!t||!t.extensions)return{};var e=p(t);if(Number.isFinite(e.filter_min)){var A=Math.fround(e.filter_min);e.filter_min-=A,e.filter_softMin-=A,e.filter_min64High=A;var n=Math.fround(e.filter_max);e.filter_max-=n,e.filter_softMax-=n,e.filter_max64High=n}else{var r=e.filter_min.map(Math.fround);e.filter_min=e.filter_min.map((function(t,e){return t-r[e]})),e.filter_softMin=e.filter_softMin.map((function(t,e){return t-r[e]})),e.filter_min64High=r;var i=e.filter_max.map(Math.fround);e.filter_max=e.filter_max.map((function(t,e){return t-i[e]})),e.filter_softMax=e.filter_softMax.map((function(t,e){return t-i[e]})),e.filter_max64High=i}return e}},b=A(147),F=A(233),w=A(19),S=A(412);function D(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function R(t,e,A){return e.defines.NON_INSTANCED_MODEL=1,A&&(e.defines.FLOAT_TARGET=1),new S.a(t,function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?D(Object(A),!0).forEach((function(e){Object(u.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):D(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({id:"data-filter-aggregation-model",vertexCount:1,isInstanced:!1,drawMode:0,vs:"#define SHADER_NAME data-filter-vertex-shader\n\n#ifdef FLOAT_TARGET\n  attribute float filterIndices;\n  attribute float filterPrevIndices;\n#else\n  attribute vec2 filterIndices;\n  attribute vec2 filterPrevIndices;\n#endif\n\nvarying vec4 vColor;\nconst float component = 1.0 / 255.0;\n\nvoid main() {\n  #ifdef FLOAT_TARGET\n    dataFilter_value *= float(filterIndices != filterPrevIndices);\n    gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\n    vColor = vec4(0.0, 0.0, 0.0, 1.0);\n  #else\n    // Float texture is not supported: pack result into 4 channels x 256 px x 64px\n    dataFilter_value *= float(filterIndices.x != filterPrevIndices.x);\n    float col = filterIndices.x;\n    float row = filterIndices.y * 4.0;\n    float channel = floor(row);\n    row = fract(row);\n    vColor = component * vec4(bvec4(channel == 0.0, channel == 1.0, channel == 2.0, channel == 3.0));\n    gl_Position = vec4(col * 2.0 - 1.0, row * 2.0 - 1.0, 0.0, 1.0);\n  #endif\n  gl_PointSize = 1.0;\n}\n",fs:"#define SHADER_NAME data-filter-fragment-shader\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main() {\n  if (dataFilter_value < 0.5) {\n    discard;\n  }\n  gl_FragColor = vColor;\n}\n"},e))}var U={blend:!0,blendFunc:[1,1,1,1],blendEquation:[32774,32774],depthTest:!1},G=A(333),N=A(390);function k(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function x(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?k(Object(A),!0).forEach((function(e){Object(u.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):k(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function O(t){var e=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(t){return!1}}();return function(){var A,n=Object(f.a)(t);if(e){var r=Object(f.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(B.a)(this,A)}}var M={1:"float",2:"vec2",3:"vec3",4:"vec4"},L=function(t){Object(h.a)(A,t);var e=O(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.filterSize,r=void 0===n?1:n,i=t.fp64,o=void 0!==i&&i,a=t.countItems,s=void 0!==a&&a;if(Object(l.a)(this,A),!M[r])throw new Error("filterSize out of range");return e.call(this,{filterSize:r,fp64:o,countItems:s})}return Object(C.a)(A,[{key:"getShaders",value:function(t){var e=t.opts,A=e.filterSize,n=e.fp64;return{modules:[n?m:v],defines:{DATAFILTER_TYPE:M[A],DATAFILTER_DOUBLE:Boolean(n)}}}},{key:"initializeState",value:function(t,e){var A=this.getAttributeManager();A&&A.add({filterValues:{size:e.opts.filterSize,type:e.opts.fp64?5130:5126,accessor:"getFilterValue",shaderAttributes:{filterValues:{divisor:0},instanceFilterValues:{divisor:1}}}});var n=this.context.gl;if(A&&e.opts.countItems){var r=function(t){return t.getExtension("EXT_float_blend")&&(t.getExtension("EXT_color_buffer_float")||t.getExtension("WEBGL_color_buffer_float"))}(n);A.add({filterIndices:{size:r?1:2,vertexOffset:1,type:5121,normalized:!0,accessor:function(t,e){var A=e.index,n=t&&t.__source?t.__source.index:A;return r?(n+1)%255:[(n+1)%255,Math.floor(n/255)%255]},shaderAttributes:{filterPrevIndices:{vertexOffset:0},filterIndices:{vertexOffset:1}}}});var i=function(t,e){return e?new b.a(t,{width:1,height:1,attachments:Object(u.a)({},36064,new F.a(t,{format:Object(w.j)(t)?34836:6408,type:5126,mipmaps:!1}))}):new b.a(t,{width:256,height:64,depth:!1})}(n,r),o=R(n,e.getShaders(e),r);this.setState({filterFBO:i,filterModel:o})}}},{key:"updateState",value:function(t){var e=t.props,A=t.oldProps;if(this.state.filterModel){var n=this.getAttributeManager().attributes.filterValues.needsUpdate()||e.filterEnabled!==A.filterEnabled||e.filterRange!==A.filterRange||e.filterSoftRange!==A.filterSoftRange;n&&this.setState({filterNeedsUpdate:n})}}},{key:"draw",value:function(t,e){var A=this.state,n=A.filterFBO,r=A.filterModel,i=A.filterNeedsUpdate,o=this.props.onFilteredItemsChange;if(i&&o&&r){var a=this.getAttributeManager().attributes,s=a.filterValues,g=a.filterIndices;r.setVertexCount(this.getNumInstances());var c=this.context.gl;Object(G.a)(c,{framebuffer:n,color:[0,0,0,0]}),r.updateModuleSettings(t.moduleParameters).setAttributes(x(x({},s.getShaderAttributes()),g&&g.getShaderAttributes())).draw({framebuffer:n,parameters:x(x({},U),{},{viewport:[0,0,n.width,n.height]})});for(var I=Object(N.c)(n),u=0,l=0;l<I.length;l++)u+=I[l];o({id:this.id,count:u}),this.state.filterNeedsUpdate=!1}}},{key:"finalizeState",value:function(){var t=this.state,e=t.filterFBO,A=t.filterModel;e&&(e.color.delete(),e.delete(),A.delete())}}]),A}(d.a);L.extensionName="DataFilterExtension",L.defaultProps={getFilterValue:{type:"accessor",value:0},onFilteredItemsChange:{type:"function",value:null,compare:!1},filterEnabled:!0,filterRange:[-1,1],filterSoftRange:null,filterTransformSize:!0,filterTransformColor:!0};var _,J=A(12),T=A(85),j=A(868),H=A.n(j),Y=A(869),V=A.n(Y),Z=A(870),W=A.n(Z),K=A(563),P=A.n(K),q=A(346),X=A(409),z=function(t){Object(i.a)(A,t);var e=Object(o.a)(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"handleClick",value:function(t,e){e.onEdit({editType:"clearFeatures"})}}]),A}(X.DrawRectangleMode),$=function(t){Object(i.a)(A,t);var e=Object(o.a)(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"handleClick",value:function(t,e){e.onEdit({editType:"clearFeatures"})}}]),A}(X.DrawPolygonByDraggingMode),tt=(_={},Object(J.a)(_,q.SELECTION_TYPE.RECTANGLE,z),Object(J.a)(_,q.SELECTION_TYPE.POLYGON,$),_),et={selectionType:q.SELECTION_TYPE.RECTANGLE,layerIds:[],onSelect:function(){}},At={type:"FeatureCollection",features:[]},nt=["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"],rt=function(t){Object(i.a)(A,t);var e=Object(o.a)(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"_selectPolygonObjects",value:function(t){var e=this.props,A=e.onSelect,n=e.getCellCoords,r=e.cellsQuadTree,i=e.flipY?t.map((function(t){return t.map((function(t){return[t[0],-t[1]]}))})):t,o=Object(T.polygon)(i),a=[];r.visit((function(t,e,A,r,i){var s=[[[e,A],[r,A],[r,i],[e,i],[e,A]]],g=Object(T.polygon)(s),c=V()(g,o),I=H()(g,o),u=W()(g,o);return!(c||I||u)||(t.data&&P()(Object(T.point)(n(t.data[1])),o)&&a.push(t.data),!1)})),A({pickingInfos:a})}},{key:"renderLayers",value:function(){var t=this,e=this.props.onSelect,A=tt[this.props.selectionType]||X.ViewMode,n={};return nt.forEach((function(e){void 0!==t.props[e]&&(n[e]=t.props[e])})),[new q.EditableGeoJsonLayer(this.getSubLayerProps(Object(g.a)({id:"selection-geojson",pickable:!0,mode:A,modeConfig:{dragToDraw:!0},selectedFeatureIndexes:[],data:At,onEdit:function(A){var n=A.updatedData,r=A.editType;if("addFeature"===r){var i=n.features[0].geometry.coordinates;t._selectPolygonObjects(i)}else"clearFeatures"===r&&e({pickingInfos:[]})}},n)))]}}]),A}(s.a);function it(t){return"base-".concat(t)}function ot(t,e,A,n,r,i){var o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!t)return[];var a=it(A),s=5/(e+16);return[new rt({id:"selection",flipY:o,cellsQuadTree:i,getCellCoords:n,coordinateSystem:I.a.CARTESIAN,selectionType:t,onSelect:function(t){var e=t.pickingInfos.map((function(t){return t[0]}));r&&r(e)},layerIds:[a],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 s},editHandlePointRadiusScale:1,editHandlePointRadiusMinPixels:s,editHandlePointRadiusMaxPixels:2*s})]}function at(t){var e,A=t.id,n=t.getColor,r=t.data,i=t.isSelected,o=Object(c.a)(t,["id","getColor","data","isSelected"]);return{overlay:Object(g.a)({id:(e=A,"selected-".concat(e)),getFillColor:n,getLineColor:n,data:r,getFilterValue:i,extensions:[new L({filterSize:1})],filterRange:[1,1]},o),base:Object(g.a)({id:it(A),getLineColor:n,getFillColor:n,data:r.slice()},o)}}rt.layerName="SelectionLayer",rt.defaultProps=et;var st=function(t){Object(i.a)(A,t);var e=Object(o.a)(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"renderLayers",value:function(){var t=at(this.props);return[new a.a(t.base),new a.a(t.overlay)]}}]),A}(s.a);st.layerName="SelectablePolygonLayer";var gt=A(364),ct=function(t){Object(i.a)(A,t);var e=Object(o.a)(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"renderLayers",value:function(){var t=at(this.props);return[new gt.a(t.base),new gt.a(t.overlay)]}}]),A}(s.a);ct.layerName="SelectableScatterplotLayer";A(732),A(731),A(730);A.d(e,"a",(function(){return st})),A.d(e,"b",(function(){return ct})),A.d(e,"c",(function(){return ot}))},function(t,e,A){!function(t){"use strict";function e(){}function A(t){this.message=t||""}function n(t){this.message=t||""}function r(t){this.message=t||""}function i(){}function o(t){return null===t?kt:t.color}function a(t){return null===t?null:t.parent}function s(t,e){null!==t&&(t.color=e)}function g(t){return null===t?null:t.left}function c(t){return null===t?null:t.right}function I(){this.root_=null,this.size_=0}function u(){}function l(){this.array_=[],arguments[0]instanceof Et&&this.addAll(arguments[0])}function C(){}function h(t){this.message=t||""}function B(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+" is not an object");var e=Object(this),A=Math.max(Math.min(e.length,9007199254740991),0)||0,n=1 in arguments&&parseInt(Number(arguments[1]),10)||0;n=n<0?Math.max(A+n,0):Math.min(n,A);var r=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:A;for(r=r<0?Math.max(A+arguments[2],0):Math.min(r,A);n<r;)e[n]=t,++n;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var f=function(){};f.prototype.interfaces_=function(){return[]},f.prototype.getClass=function(){return f},f.prototype.equalsWithTolerance=function(t,e,A){return Math.abs(t-e)<=A};var d=function(t){function e(e){t.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Q=function(){},E={MAX_VALUE:{configurable:!0}};Q.isNaN=function(t){return Number.isNaN(t)},Q.doubleToLongBits=function(t){return t},Q.longBitsToDouble=function(t){return t},Q.isInfinite=function(t){return!Number.isFinite(t)},E.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(Q,E);var p=function(){},y=function(){},v=function(){},m=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},b={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};m.prototype.setOrdinate=function(t,e){switch(t){case m.X:this.x=e;break;case m.Y:this.y=e;break;case m.Z:this.z=e;break;default:throw new d("Invalid ordinate index: "+t)}},m.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],A=arguments[1];return!!f.equalsWithTolerance(this.x,e.x,A)&&!!f.equalsWithTolerance(this.y,e.y,A)}},m.prototype.getOrdinate=function(t){switch(t){case m.X:return this.x;case m.Y:return this.y;case m.Z:return this.z}throw new d("Invalid ordinate index: "+t)},m.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||Q.isNaN(this.z))&&Q.isNaN(t.z)},m.prototype.equals=function(t){return t instanceof m&&this.equals2D(t)},m.prototype.equalInZ=function(t,e){return f.equalsWithTolerance(this.z,t.z,e)},m.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},m.prototype.clone=function(){},m.prototype.copy=function(){return new m(this)},m.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},m.prototype.distance3D=function(t){var e=this.x-t.x,A=this.y-t.y,n=this.z-t.z;return Math.sqrt(e*e+A*A+n*n)},m.prototype.distance=function(t){var e=this.x-t.x,A=this.y-t.y;return Math.sqrt(e*e+A*A)},m.prototype.hashCode=function(){var t=17;return 37*(t=37*t+m.hashCode(this.x))+m.hashCode(this.y)},m.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},m.prototype.interfaces_=function(){return[p,y,e]},m.prototype.getClass=function(){return m},m.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=Q.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},b.DimensionalComparator.get=function(){return F},b.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},b.NULL_ORDINATE.get=function(){return Q.NaN},b.X.get=function(){return 0},b.Y.get=function(){return 1},b.Z.get=function(){return 2},Object.defineProperties(m,b);var F=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new d("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};F.prototype.compare=function(t,e){var A=t,n=e,r=F.compare(A.x,n.x);if(0!==r)return r;var i=F.compare(A.y,n.y);return 0!==i?i:this._dimensionsToTest<=2?0:F.compare(A.z,n.z)},F.prototype.interfaces_=function(){return[v]},F.prototype.getClass=function(){return F},F.compare=function(t,e){return t<e?-1:t>e?1:Q.isNaN(t)?Q.isNaN(e)?0:-1:Q.isNaN(e)?1:0};var w=function(){};w.prototype.create=function(){},w.prototype.interfaces_=function(){return[]},w.prototype.getClass=function(){return w};var S=function(){},D={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};S.prototype.interfaces_=function(){return[]},S.prototype.getClass=function(){return S},S.toLocationSymbol=function(t){switch(t){case S.EXTERIOR:return"e";case S.BOUNDARY:return"b";case S.INTERIOR:return"i";case S.NONE:return"-"}throw new d("Unknown location value: "+t)},D.INTERIOR.get=function(){return 0},D.BOUNDARY.get=function(){return 1},D.EXTERIOR.get=function(){return 2},D.NONE.get=function(){return-1},Object.defineProperties(S,D);var R=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},U=function(){},G={LOG_10:{configurable:!0}};U.prototype.interfaces_=function(){return[]},U.prototype.getClass=function(){return U},U.log10=function(t){var e=Math.log(t);return Q.isInfinite(e)||Q.isNaN(e)?e:e/U.LOG_10},U.min=function(t,e,A,n){var r=t;return e<r&&(r=e),A<r&&(r=A),n<r&&(r=n),r},U.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],A=arguments[2];return t<e?e:t>A?A:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var n=arguments[0],r=arguments[1],i=arguments[2];return n<r?r:n>i?i:n}},U.wrap=function(t,e){return t<0?e- -t%e:t%e},U.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],A=arguments[2],n=t;return e>n&&(n=e),A>n&&(n=A),n}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=r;return i>s&&(s=i),o>s&&(s=o),a>s&&(s=a),s}},U.average=function(t,e){return(t+e)/2},G.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(U,G);var N=function(t){this.str=t};N.prototype.append=function(t){this.str+=t},N.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},N.prototype.toString=function(t){return this.str};var k=function(t){this.value=t};k.prototype.intValue=function(){return this.value},k.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},k.isNaN=function(t){return Number.isNaN(t)};var x=function(){};x.isWhitespace=function(t){return t<=32&&t>=0||127===t},x.toUpperCase=function(t){return t.toUpperCase()};var O=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var A=arguments[0];this.init(A)}else if("string"==typeof arguments[0]){var n=arguments[0];t.call(this,t.parse(n))}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r,i)}},M={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}};O.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},O.prototype.extractSignificantDigits=function(t,e){var A=this.abs(),n=O.magnitude(A._hi),r=O.TEN.pow(n);(A=A.divide(r)).gt(O.TEN)?(A=A.divide(O.TEN),n+=1):A.lt(O.ONE)&&(A=A.multiply(O.TEN),n-=1);for(var i=n+1,o=new N,a=O.MAX_PRINT_DIGITS-1,s=0;s<=a;s++){t&&s===i&&o.append(".");var g=Math.trunc(A._hi);if(g<0)break;var c=!1,I=0;g>9?(c=!0,I="9"):I="0"+g,o.append(I),A=A.subtract(O.valueOf(g)).multiply(O.TEN),c&&A.selfAdd(O.TEN);var u=!0,l=O.magnitude(A._hi);if(l<0&&Math.abs(l)>=a-s&&(u=!1),!u)break}return e[0]=n,o.toString()},O.prototype.sqr=function(){return this.multiply(this)},O.prototype.doubleValue=function(){return this._hi+this._lo},O.prototype.subtract=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},O.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},O.prototype.isZero=function(){return 0===this._hi&&0===this._lo},O.prototype.selfSubtract=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},O.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},O.prototype.min=function(t){return this.le(t)?this:t},O.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var A=arguments[0],n=arguments[1],r=null,i=null,o=null,a=null,s=null,g=null,c=null,I=null;return s=this._hi/A,I=(r=(g=O.SPLIT*s)-(r=g-s))*(o=(I=O.SPLIT*A)-(o=I-A))-(c=s*A)+r*(a=A-o)+(i=s-r)*o+i*a,I=s+(g=(this._hi-c-I+this._lo-s*n)/A),this._hi=I,this._lo=s-I+g,this}},O.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},O.prototype.divide=function(){if(arguments[0]instanceof O){var t=arguments[0],e=null,A=null,n=null,r=null,i=null,o=null,a=null,s=null;return A=(i=this._hi/t._hi)-(e=(o=O.SPLIT*i)-(e=o-i)),s=e*(n=(s=O.SPLIT*t._hi)-(n=s-t._hi))-(a=i*t._hi)+e*(r=t._hi-n)+A*n+A*r,o=(this._hi-a-s+this._lo-i*t._lo)/t._hi,new O(s=i+o,i-s+o)}if("number"==typeof arguments[0]){var g=arguments[0];return Q.isNaN(g)?O.createNaN():O.copy(this).selfDivide(g,0)}},O.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},O.prototype.pow=function(t){if(0===t)return O.valueOf(1);var e=new O(this),A=O.valueOf(1),n=Math.abs(t);if(n>1)for(;n>0;)n%2==1&&A.selfMultiply(e),(n/=2)>0&&(e=e.sqr());else A=e;return t<0?A.reciprocal():A},O.prototype.ceil=function(){if(this.isNaN())return O.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new O(t,e)},O.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},O.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},O.prototype.setValue=function(){if(arguments[0]instanceof O){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},O.prototype.max=function(t){return this.ge(t)?this:t},O.prototype.sqrt=function(){if(this.isZero())return O.valueOf(0);if(this.isNegative())return O.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,A=O.valueOf(e),n=this.subtract(A.sqr())._hi*(.5*t);return A.add(n)},O.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],A=null,n=null,r=null,i=null,o=null,a=null;return i=(r=this._hi+e)-(o=r-this._hi),n=(a=(i=e-o+(this._hi-i))+this._lo)+(r-(A=r+a)),this._hi=A+n,this._lo=n+(A-this._hi),this}}else if(2===arguments.length){var s=arguments[0],g=arguments[1],c=null,I=null,u=null,l=null,C=null,h=null,B=null;l=this._hi+s,I=this._lo+g,C=l-(h=l-this._hi),u=I-(B=I-this._lo);var f=(c=l+(h=(C=s-h+(this._hi-C))+I))+(h=(u=g-B+(this._lo-u))+(h+(l-c))),d=h+(c-f);return this._hi=f,this._lo=d,this}},O.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof O){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var A=arguments[0],n=arguments[1],r=null,i=null,o=null,a=null,s=null,g=null;r=(s=O.SPLIT*this._hi)-this._hi,g=O.SPLIT*A,r=s-r,i=this._hi-r,o=g-A;var c=(s=this._hi*A)+(g=r*(o=g-o)-s+r*(a=A-o)+i*o+i*a+(this._hi*n+this._lo*A)),I=g+(r=s-c);return this._hi=c,this._lo=I,this}},O.prototype.selfSqr=function(){return this.selfMultiply(this)},O.prototype.floor=function(){if(this.isNaN())return O.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new O(t,e)},O.prototype.negate=function(){return this.isNaN()?this:new O(-this._hi,-this._lo)},O.prototype.clone=function(){},O.prototype.multiply=function(){if(arguments[0]instanceof O){var t=arguments[0];return t.isNaN()?O.createNaN():O.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return Q.isNaN(e)?O.createNaN():O.copy(this).selfMultiply(e,0)}},O.prototype.isNaN=function(){return Q.isNaN(this._hi)},O.prototype.intValue=function(){return Math.trunc(this._hi)},O.prototype.toString=function(){var t=O.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},O.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),A=this.extractSignificantDigits(!0,e),n=e[0]+1,r=A;if("."===A.charAt(0))r="0"+A;else if(n<0)r="0."+O.stringOfChar("0",-n)+A;else if(-1===A.indexOf(".")){var i=n-A.length;r=A+O.stringOfChar("0",i)+".0"}return this.isNegative()?"-"+r:r},O.prototype.reciprocal=function(){var t,e,A,n,r=null,i=null,o=null,a=null;t=(A=1/this._hi)-(r=(o=O.SPLIT*A)-(r=o-A)),i=(a=O.SPLIT*this._hi)-this._hi;var s=A+(o=(1-(n=A*this._hi)-(a=r*(i=a-i)-n+r*(e=this._hi-i)+t*i+t*e)-A*this._lo)/this._hi);return new O(s,A-s+o)},O.prototype.toSciNotation=function(){if(this.isZero())return O.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),A=this.extractSignificantDigits(!1,e),n=O.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===A.charAt(0))throw new Error("Found leading zero: "+A);var r="";A.length>1&&(r=A.substring(1));var i=A.charAt(0)+"."+r;return this.isNegative()?"-"+i+n:i+n},O.prototype.abs=function(){return this.isNaN()?O.NaN:this.isNegative()?this.negate():new O(this)},O.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},O.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},O.prototype.add=function(){if(arguments[0]instanceof O){var t=arguments[0];return O.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return O.copy(this).selfAdd(e)}},O.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof O){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var A=arguments[0],n=arguments[1];this._hi=A,this._lo=n}},O.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},O.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},O.prototype.trunc=function(){return this.isNaN()?O.NaN:this.isPositive()?this.floor():this.ceil()},O.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},O.prototype.interfaces_=function(){return[e,p,y]},O.prototype.getClass=function(){return O},O.sqr=function(t){return O.valueOf(t).selfMultiply(t)},O.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return O.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new O(e)}},O.sqrt=function(t){return O.valueOf(t).sqrt()},O.parse=function(t){for(var e=0,A=t.length;x.isWhitespace(t.charAt(e));)e++;var n=!1;if(e<A){var r=t.charAt(e);"-"!==r&&"+"!==r||(e++,"-"===r&&(n=!0))}for(var i=new O,o=0,a=0,s=0;!(e>=A);){var g=t.charAt(e);if(e++,x.isDigit(g)){var c=g-"0";i.selfMultiply(O.TEN),i.selfAdd(c),o++}else{if("."!==g){if("e"===g||"E"===g){var I=t.substring(e);try{s=k.parseInt(I)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+I+" in string "+t):e}break}throw new Error("Unexpected character '"+g+"' at position "+e+" in string "+t)}a=o}}var u=i,l=o-a-s;if(0===l)u=i;else if(l>0){var C=O.TEN.pow(l);u=i.divide(C)}else if(l<0){var h=O.TEN.pow(-l);u=i.multiply(h)}return n?u.negate():u},O.createNaN=function(){return new O(Q.NaN,Q.NaN)},O.copy=function(t){return new O(t)},O.magnitude=function(t){var e=Math.abs(t),A=Math.log(e)/Math.log(10),n=Math.trunc(Math.floor(A));return 10*Math.pow(10,n)<=e&&(n+=1),n},O.stringOfChar=function(t,e){for(var A=new N,n=0;n<e;n++)A.append(t);return A.toString()},M.PI.get=function(){return new O(3.141592653589793,12246467991473532e-32)},M.TWO_PI.get=function(){return new O(6.283185307179586,24492935982947064e-32)},M.PI_2.get=function(){return new O(1.5707963267948966,6123233995736766e-32)},M.E.get=function(){return new O(2.718281828459045,14456468917292502e-32)},M.NaN.get=function(){return new O(Q.NaN,Q.NaN)},M.EPS.get=function(){return 123259516440783e-46},M.SPLIT.get=function(){return 134217729},M.MAX_PRINT_DIGITS.get=function(){return 32},M.TEN.get=function(){return O.valueOf(10)},M.ONE.get=function(){return O.valueOf(1)},M.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},M.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(O,M);var L=function(){},_={DP_SAFE_EPSILON:{configurable:!0}};L.prototype.interfaces_=function(){return[]},L.prototype.getClass=function(){return L},L.orientationIndex=function(t,e,A){var n=L.orientationIndexFilter(t,e,A);if(n<=1)return n;var r=O.valueOf(e.x).selfAdd(-t.x),i=O.valueOf(e.y).selfAdd(-t.y),o=O.valueOf(A.x).selfAdd(-e.x),a=O.valueOf(A.y).selfAdd(-e.y);return r.selfMultiply(a).selfSubtract(i.selfMultiply(o)).signum()},L.signOfDet2x2=function(t,e,A,n){return t.multiply(n).selfSubtract(e.multiply(A)).signum()},L.intersection=function(t,e,A,n){var r=O.valueOf(n.y).selfSubtract(A.y).selfMultiply(O.valueOf(e.x).selfSubtract(t.x)),i=O.valueOf(n.x).selfSubtract(A.x).selfMultiply(O.valueOf(e.y).selfSubtract(t.y)),o=r.subtract(i),a=O.valueOf(n.x).selfSubtract(A.x).selfMultiply(O.valueOf(t.y).selfSubtract(A.y)),s=O.valueOf(n.y).selfSubtract(A.y).selfMultiply(O.valueOf(t.x).selfSubtract(A.x)),g=a.subtract(s).selfDivide(o).doubleValue(),c=O.valueOf(t.x).selfAdd(O.valueOf(e.x).selfSubtract(t.x).selfMultiply(g)).doubleValue(),I=O.valueOf(e.x).selfSubtract(t.x).selfMultiply(O.valueOf(t.y).selfSubtract(A.y)),u=O.valueOf(e.y).selfSubtract(t.y).selfMultiply(O.valueOf(t.x).selfSubtract(A.x)),l=I.subtract(u).selfDivide(o).doubleValue(),C=O.valueOf(A.y).selfAdd(O.valueOf(n.y).selfSubtract(A.y).selfMultiply(l)).doubleValue();return new m(c,C)},L.orientationIndexFilter=function(t,e,A){var n=null,r=(t.x-A.x)*(e.y-A.y),i=(t.y-A.y)*(e.x-A.x),o=r-i;if(r>0){if(i<=0)return L.signum(o);n=r+i}else{if(!(r<0))return L.signum(o);if(i>=0)return L.signum(o);n=-r-i}var a=L.DP_SAFE_EPSILON*n;return o>=a||-o>=a?L.signum(o):2},L.signum=function(t){return t>0?1:t<0?-1:0},_.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(L,_);var J=function(){},T={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};T.X.get=function(){return 0},T.Y.get=function(){return 1},T.Z.get=function(){return 2},T.M.get=function(){return 3},J.prototype.setOrdinate=function(t,e,A){},J.prototype.size=function(){},J.prototype.getOrdinate=function(t,e){},J.prototype.getCoordinate=function(){},J.prototype.getCoordinateCopy=function(t){},J.prototype.getDimension=function(){},J.prototype.getX=function(t){},J.prototype.clone=function(){},J.prototype.expandEnvelope=function(t){},J.prototype.copy=function(){},J.prototype.getY=function(t){},J.prototype.toCoordinateArray=function(){},J.prototype.interfaces_=function(){return[y]},J.prototype.getClass=function(){return J},Object.defineProperties(J,T);var j=function(){},H=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(j),Y=function(){};Y.arraycopy=function(t,e,A,n,r){for(var i=0,o=e;o<e+r;o++)A[n+i]=t[o],i++},Y.getProperty=function(t){return{"line.separator":"\n"}[t]};var V=function t(){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 e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var A=arguments[0],n=arguments[1];this.x=A,this.y=n,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var r=arguments[0],i=arguments[1];this.x=r.y*i.w-i.y*r.w,this.y=i.x*r.w-r.x*i.w,this.w=r.x*i.y-i.x*r.y}else if(arguments[0]instanceof m&&arguments[1]instanceof m){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(3===arguments.length){var s=arguments[0],g=arguments[1],c=arguments[2];this.x=s,this.y=g,this.w=c}else if(4===arguments.length){var I=arguments[0],u=arguments[1],l=arguments[2],C=arguments[3],h=I.y-u.y,B=u.x-I.x,f=I.x*u.y-u.x*I.y,d=l.y-C.y,Q=C.x-l.x,E=l.x*C.y-C.x*l.y;this.x=B*E-Q*f,this.y=d*f-h*E,this.w=h*Q-d*B}};V.prototype.getY=function(){var t=this.y/this.w;if(Q.isNaN(t)||Q.isInfinite(t))throw new H;return t},V.prototype.getX=function(){var t=this.x/this.w;if(Q.isNaN(t)||Q.isInfinite(t))throw new H;return t},V.prototype.getCoordinate=function(){var t=new m;return t.x=this.getX(),t.y=this.getY(),t},V.prototype.interfaces_=function(){return[]},V.prototype.getClass=function(){return V},V.intersection=function(t,e,A,n){var r=t.y-e.y,i=e.x-t.x,o=t.x*e.y-e.x*t.y,a=A.y-n.y,s=n.x-A.x,g=A.x*n.y-n.x*A.y,c=r*s-a*i,I=(i*g-s*o)/c,u=(a*o-r*g)/c;if(Q.isNaN(I)||Q.isInfinite(I)||Q.isNaN(u)||Q.isInfinite(u))throw new H;return new m(I,u)};var Z=function t(){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 m){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var A=arguments[0];this.init(A)}}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],o=arguments[1],a=arguments[2],s=arguments[3];this.init(i,o,a,s)}},W={serialVersionUID:{configurable:!0}};Z.prototype.getArea=function(){return this.getWidth()*this.getHeight()},Z.prototype.equals=function(t){if(!(t instanceof Z))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},Z.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new Z;var e=this._minx>t._minx?this._minx:t._minx,A=this._miny>t._miny?this._miny:t._miny,n=this._maxx<t._maxx?this._maxx:t._maxx,r=this._maxy<t._maxy?this._maxy:t._maxy;return new Z(e,n,A,r)},Z.prototype.isNull=function(){return this._maxx<this._minx},Z.prototype.getMaxX=function(){return this._maxx},Z.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof m){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof Z){var e=arguments[0];return!this.isNull()&&!e.isNull()&&e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var A=arguments[0],n=arguments[1];return!this.isNull()&&A>=this._minx&&A<=this._maxx&&n>=this._miny&&n<=this._maxy}},Z.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Z){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof m){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var A=arguments[0],n=arguments[1];return!this.isNull()&&!(A>this._maxx||A<this._minx||n>this._maxy||n<this._miny)}},Z.prototype.getMinY=function(){return this._miny},Z.prototype.getMinX=function(){return this._minx},Z.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof m){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof Z){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var A=arguments[0],n=arguments[1];this.isNull()?(this._minx=A,this._maxx=A,this._miny=n,this._maxy=n):(A<this._minx&&(this._minx=A),A>this._maxx&&(this._maxx=A),n<this._miny&&(this._miny=n),n>this._maxy&&(this._maxy=n))}},Z.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},Z.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},Z.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},Z.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},Z.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Z.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Z.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Z.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},Z.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],A=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=A,this._maxy+=A,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Z.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Z){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof m){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var A=arguments[0],n=arguments[1];return this.covers(A,n)}},Z.prototype.centre=function(){return this.isNull()?null:new m((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Z.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof m){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Z){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var A=arguments[0],n=arguments[1];this.init(A.x,n.x,A.y,n.y)}else if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3];r<i?(this._minx=r,this._maxx=i):(this._minx=i,this._maxx=r),o<a?(this._miny=o,this._maxy=a):(this._miny=a,this._maxy=o)}},Z.prototype.getMaxY=function(){return this._maxy},Z.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var A=0;return this._maxy<t._miny?A=t._miny-this._maxy:this._miny>t._maxy&&(A=this._miny-t._maxy),0===e?A:0===A?e:Math.sqrt(e*e+A*A)},Z.prototype.hashCode=function(){var t=17;return 37*(t=37*(t=37*(t=37*t+m.hashCode(this._minx))+m.hashCode(this._maxx))+m.hashCode(this._miny))+m.hashCode(this._maxy)},Z.prototype.interfaces_=function(){return[p,e]},Z.prototype.getClass=function(){return Z},Z.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],A=arguments[2];return A.x>=(t.x<e.x?t.x:e.x)&&A.x<=(t.x>e.x?t.x:e.x)&&A.y>=(t.y<e.y?t.y:e.y)&&A.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=arguments[3],a=Math.min(i.x,o.x),s=Math.max(i.x,o.x),g=Math.min(n.x,r.x),c=Math.max(n.x,r.x);return!(g>s)&&!(c<a)&&(a=Math.min(i.y,o.y),s=Math.max(i.y,o.y),g=Math.min(n.y,r.y),c=Math.max(n.y,r.y),!(g>s)&&!(c<a))}},W.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(Z,W);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*$/},P=function(t){this.geometryFactory=t||new fe};P.prototype.read=function(t){var e,A,n;t=t.replace(/[\n\r]/g," ");var r=K.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((r=K.emptyTypeStr.exec(t))[2]=void 0),r&&(A=r[1].toLowerCase(),n=r[2],X[A]&&(e=X[A].apply(this,[n]))),void 0===e)throw new Error("Could not parse WKT "+t);return e},P.prototype.write=function(t){return this.extractGeometry(t)},P.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!q[e])return null;var A=e.toUpperCase();return t.isEmpty()?A+" EMPTY":A+"("+q[e].apply(this,[t])+")"};var q={coordinate:function(t){return t.x+" "+t.y},point:function(t){return q.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],A=0,n=t._geometries.length;A<n;++A)e.push("("+q.point.apply(this,[t._geometries[A]])+")");return e.join(",")},linestring:function(t){for(var e=[],A=0,n=t._points._coordinates.length;A<n;++A)e.push(q.coordinate.apply(this,[t._points._coordinates[A]]));return e.join(",")},linearring:function(t){for(var e=[],A=0,n=t._points._coordinates.length;A<n;++A)e.push(q.coordinate.apply(this,[t._points._coordinates[A]]));return e.join(",")},multilinestring:function(t){for(var e=[],A=0,n=t._geometries.length;A<n;++A)e.push("("+q.linestring.apply(this,[t._geometries[A]])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+q.linestring.apply(this,[t._shell])+")");for(var A=0,n=t._holes.length;A<n;++A)e.push("("+q.linestring.apply(this,[t._holes[A]])+")");return e.join(",")},multipolygon:function(t){for(var e=[],A=0,n=t._geometries.length;A<n;++A)e.push("("+q.polygon.apply(this,[t._geometries[A]])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],A=0,n=t._geometries.length;A<n;++A)e.push(this.extractGeometry(t._geometries[A]));return e.join(",")}},X={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(K.spaces);return this.geometryFactory.createPoint(new m(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,A=t.trim().split(","),n=[],r=0,i=A.length;r<i;++r)e=A[r].replace(K.trimParens,"$1"),n.push(X.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(n)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,A=t.trim().split(","),n=[],r=0,i=A.length;r<i;++r)e=A[r].trim().split(K.spaces),n.push(new m(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(n)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,A=t.trim().split(","),n=[],r=0,i=A.length;r<i;++r)e=A[r].trim().split(K.spaces),n.push(new m(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,A=t.trim().split(K.parenComma),n=[],r=0,i=A.length;r<i;++r)e=A[r].replace(K.trimParens,"$1"),n.push(X.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(n)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,A,n,r,i=t.trim().split(K.parenComma),o=[],a=0,s=i.length;a<s;++a)e=i[a].replace(K.trimParens,"$1"),A=X.linestring.apply(this,[e]),n=this.geometryFactory.createLinearRing(A._points),0===a?r=n:o.push(n);return this.geometryFactory.createPolygon(r,o)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,A=t.trim().split(K.doubleParenComma),n=[],r=0,i=A.length;r<i;++r)e=A[r].replace(K.trimParens,"$1"),n.push(X.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(n)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),A=[],n=0,r=e.length;n<r;++n)A.push(this.read(e[n]));return this.geometryFactory.createGeometryCollection(A)}},z=function(t){this.parser=new P(t)};z.prototype.write=function(t){return this.parser.write(t)},z.toLineString=function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var $=function(t){function e(e){t.call(this,e),this.name="RuntimeException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),tt=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($),et=function(){};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.shouldNeverReachHere=function(){if(0===arguments.length)et.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new tt("Should never reach here"+(null!==t?": "+t:""))}},et.isTrue=function(){var t,e;if(1===arguments.length)t=arguments[0],et.isTrue(t,null);else if(2===arguments.length&&(t=arguments[0],e=arguments[1],!t))throw null===e?new tt:new tt(e)},et.equals=function(){var t,e,A;if(2===arguments.length)t=arguments[0],e=arguments[1],et.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],e=arguments[1],A=arguments[2],!e.equals(t)))throw new tt("Expected "+t+" but encountered "+e+(null!==A?": "+A:""))};var At=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 m,this._intPt[1]=new m,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},nt={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};At.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},At.prototype.getTopologySummary=function(){var t=new N;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},At.prototype.computeIntersection=function(t,e,A,n){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=A,this._inputLines[1][1]=n,this._result=this.computeIntersect(t,e,A,n)},At.prototype.getIntersectionNum=function(){return this._result},At.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 t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},At.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},At.prototype.setPrecisionModel=function(t){this._precisionModel=t},At.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},At.prototype.getIntersection=function(t){return this._intPt[t]},At.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},At.prototype.hasIntersection=function(){return this._result!==At.NO_INTERSECTION},At.prototype.getEdgeDistance=function(t,e){return At.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},At.prototype.isCollinear=function(){return this._result===At.COLLINEAR_INTERSECTION},At.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()},At.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},At.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},At.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},At.computeEdgeDistance=function(t,e,A){var n=Math.abs(A.x-e.x),r=Math.abs(A.y-e.y),i=-1;if(t.equals(e))i=0;else if(t.equals(A))i=n>r?n:r;else{var o=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(i=n>r?o:a)||t.equals(e)||(i=Math.max(o,a))}return et.isTrue(!(0===i&&!t.equals(e)),"Bad distance calculation"),i},At.nonRobustComputeEdgeDistance=function(t,e,A){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return et.isTrue(!(0===i&&!t.equals(e)),"Invalid distance calculation"),i},nt.DONT_INTERSECT.get=function(){return 0},nt.DO_INTERSECT.get=function(){return 1},nt.COLLINEAR.get=function(){return 2},nt.NO_INTERSECTION.get=function(){return 0},nt.POINT_INTERSECTION.get=function(){return 1},nt.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(At,nt);var rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new Z(this._inputLines[0][0],this._inputLines[0][1]),A=new Z(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&A.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],A=arguments[1],n=arguments[2];if(this._isProper=!1,Z.intersects(A,n,e)&&0===at.orientationIndex(A,n,e)&&0===at.orientationIndex(n,A,e))return this._isProper=!0,(e.equals(A)||e.equals(n))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,A,n,r){r.x=this.smallestInAbsValue(t.x,e.x,A.x,n.x),r.y=this.smallestInAbsValue(t.y,e.y,A.y,n.y),t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,A.x-=r.x,A.y-=r.y,n.x-=r.x,n.y-=r.y},e.prototype.safeHCoordinateIntersection=function(t,A,n,r){var i=null;try{i=V.intersection(t,A,n,r)}catch(o){if(!(o instanceof H))throw o;i=e.nearestEndpoint(t,A,n,r)}return i},e.prototype.intersection=function(t,A,n,r){var i=this.intersectionWithNormalization(t,A,n,r);return this.isInSegmentEnvelopes(i)||(i=new m(e.nearestEndpoint(t,A,n,r))),null!==this._precisionModel&&this._precisionModel.makePrecise(i),i},e.prototype.smallestInAbsValue=function(t,e,A,n){var r=t,i=Math.abs(r);return Math.abs(e)<i&&(r=e,i=Math.abs(e)),Math.abs(A)<i&&(r=A,i=Math.abs(A)),Math.abs(n)<i&&(r=n),r},e.prototype.checkDD=function(t,e,A,n,r){var i=L.intersection(t,e,A,n),o=this.isInSegmentEnvelopes(i);Y.out.println("DD in env = "+o+"  --------------------- "+i),r.distance(i)>1e-4&&Y.out.println("Distance = "+r.distance(i))},e.prototype.intersectionWithNormalization=function(t,e,A,n){var r=new m(t),i=new m(e),o=new m(A),a=new m(n),s=new m;this.normalizeToEnvCentre(r,i,o,a,s);var g=this.safeHCoordinateIntersection(r,i,o,a);return g.x+=s.x,g.y+=s.y,g},e.prototype.computeCollinearIntersection=function(e,A,n,r){var i=Z.intersects(e,A,n),o=Z.intersects(e,A,r),a=Z.intersects(n,r,e),s=Z.intersects(n,r,A);return i&&o?(this._intPt[0]=n,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):a&&s?(this._intPt[0]=e,this._intPt[1]=A,t.COLLINEAR_INTERSECTION):i&&a?(this._intPt[0]=n,this._intPt[1]=e,!n.equals(e)||o||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):i&&s?(this._intPt[0]=n,this._intPt[1]=A,!n.equals(A)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||i||s?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&s?(this._intPt[0]=r,this._intPt[1]=A,!r.equals(A)||i||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,A,n,r){var i=t.x<e.x?t.x:e.x,o=t.y<e.y?t.y:e.y,a=t.x>e.x?t.x:e.x,s=t.y>e.y?t.y:e.y,g=A.x<n.x?A.x:n.x,c=A.y<n.y?A.y:n.y,I=A.x>n.x?A.x:n.x,u=A.y>n.y?A.y:n.y,l=((i>g?i:g)+(a<I?a:I))/2,C=((o>c?o:c)+(s<u?s:u))/2;r.x=l,r.y=C,t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,A.x-=r.x,A.y-=r.y,n.x-=r.x,n.y-=r.y},e.prototype.computeIntersect=function(e,A,n,r){if(this._isProper=!1,!Z.intersects(e,A,n,r))return t.NO_INTERSECTION;var i=at.orientationIndex(e,A,n),o=at.orientationIndex(e,A,r);if(i>0&&o>0||i<0&&o<0)return t.NO_INTERSECTION;var a=at.orientationIndex(n,r,e),s=at.orientationIndex(n,r,A);return a>0&&s>0||a<0&&s<0?t.NO_INTERSECTION:0===i&&0===o&&0===a&&0===s?this.computeCollinearIntersection(e,A,n,r):(0===i||0===o||0===a||0===s?(this._isProper=!1,e.equals2D(n)||e.equals2D(r)?this._intPt[0]=e:A.equals2D(n)||A.equals2D(r)?this._intPt[0]=A:0===i?this._intPt[0]=new m(n):0===o?this._intPt[0]=new m(r):0===a?this._intPt[0]=new m(e):0===s&&(this._intPt[0]=new m(A))):(this._isProper=!0,this._intPt[0]=this.intersection(e,A,n,r)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,A,n){var r=t,i=at.distancePointLine(t,A,n),o=at.distancePointLine(e,A,n);return o<i&&(i=o,r=e),(o=at.distancePointLine(A,t,e))<i&&(i=o,r=A),(o=at.distancePointLine(n,t,e))<i&&(i=o,r=n),r},e}(At),it=function(){};it.prototype.interfaces_=function(){return[]},it.prototype.getClass=function(){return it},it.orientationIndex=function(t,e,A){var n=e.x-t.x,r=e.y-t.y,i=A.x-e.x,o=A.y-e.y;return it.signOfDet2x2(n,r,i,o)},it.signOfDet2x2=function(t,e,A,n){var r=null,i=null,o=null;if(r=1,0===t||0===n)return 0===e||0===A?0:e>0?A>0?-r:r:A>0?r:-r;if(0===e||0===A)return n>0?t>0?r:-r:t>0?-r:r;if(e>0?n>0?e<=n||(r=-r,i=t,t=A,A=i,i=e,e=n,n=i):e<=-n?(r=-r,A=-A,n=-n):(i=t,t=-A,A=i,i=e,e=-n,n=i):n>0?-e<=n?(r=-r,t=-t,e=-e):(i=-t,t=A,A=i,i=-e,e=n,n=i):e>=n?(t=-t,e=-e,A=-A,n=-n):(r=-r,i=-t,t=-A,A=i,i=-e,e=-n,n=i),t>0){if(!(A>0))return r;if(!(t<=A))return r}else{if(A>0)return-r;if(!(t>=A))return-r;r=-r,t=-t,A=-A}for(;;){if((n-=(o=Math.floor(A/t))*e)<0)return-r;if(n>e)return r;if(t>(A-=o*t)+A){if(e<n+n)return r}else{if(e>n+n)return-r;A=t-A,n=e-n,r=-r}if(0===n)return 0===A?0:-r;if(0===A)return r;if((e-=(o=Math.floor(t/A))*n)<0)return r;if(e>n)return-r;if(A>(t-=o*A)+t){if(n<e+e)return-r}else{if(n>e+e)return r;t=A-t,e=n-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}};var ot=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};ot.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var A=t.x,n=e.x;return A>n&&(A=e.x,n=t.x),this._p.x>=A&&this._p.x<=n&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=t.x-this._p.x,i=t.y-this._p.y,o=e.x-this._p.x,a=e.y-this._p.y,s=it.signOfDet2x2(r,i,o,a);if(0===s)return this._isPointOnSegment=!0,null;a<i&&(s=-s),s>0&&this._crossingCount++}},ot.prototype.isPointInPolygon=function(){return this.getLocation()!==S.EXTERIOR},ot.prototype.getLocation=function(){return this._isPointOnSegment?S.BOUNDARY:this._crossingCount%2==1?S.INTERIOR:S.EXTERIOR},ot.prototype.isOnSegment=function(){return this._isPointOnSegment},ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.locatePointInRing=function(){if(arguments[0]instanceof m&&R(arguments[1],J)){for(var t=arguments[0],e=arguments[1],A=new ot(t),n=new m,r=new m,i=1;i<e.size();i++)if(e.getCoordinate(i,n),e.getCoordinate(i-1,r),A.countSegment(n,r),A.isOnSegment())return A.getLocation();return A.getLocation()}if(arguments[0]instanceof m&&arguments[1]instanceof Array){for(var o=arguments[0],a=arguments[1],s=new ot(o),g=1;g<a.length;g++){var c=a[g],I=a[g-1];if(s.countSegment(c,I),s.isOnSegment())return s.getLocation()}return s.getLocation()}};var at=function(){},st={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.orientationIndex=function(t,e,A){return L.orientationIndex(t,e,A)},at.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,A=t[0].x,n=1;n<t.length-1;n++){var r=t[n].x-A,i=t[n+1].y;e+=r*(t[n-1].y-i)}return e/2}if(R(arguments[0],J)){var o=arguments[0],a=o.size();if(a<3)return 0;var s=new m,g=new m,c=new m;o.getCoordinate(0,g),o.getCoordinate(1,c);var I=g.x;c.x-=I;for(var u=0,l=1;l<a-1;l++)s.y=g.y,g.x=c.x,g.y=c.y,o.getCoordinate(l+1,c),c.x-=I,u+=g.x*(s.y-c.y);return u/2}},at.distanceLineLine=function(t,e,A,n){if(t.equals(e))return at.distancePointLine(t,A,n);if(A.equals(n))return at.distancePointLine(n,t,e);var r=!1;if(Z.intersects(t,e,A,n)){var i=(e.x-t.x)*(n.y-A.y)-(e.y-t.y)*(n.x-A.x);if(0===i)r=!0;else{var o=(t.y-A.y)*(n.x-A.x)-(t.x-A.x)*(n.y-A.y),a=((t.y-A.y)*(e.x-t.x)-(t.x-A.x)*(e.y-t.y))/i,s=o/i;(s<0||s>1||a<0||a>1)&&(r=!0)}}else r=!0;return r?U.min(at.distancePointLine(t,A,n),at.distancePointLine(e,A,n),at.distancePointLine(A,t,e),at.distancePointLine(n,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==S.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var A=0,n=new m;t.getCoordinate(0,n);for(var r=n.x,i=n.y,o=1;o<e;o++){t.getCoordinate(o,n);var a=n.x,s=n.y,g=a-r,c=s-i;A+=Math.sqrt(g*g+c*c),r=a,i=s}return A},at.isCCW=function(t){var e=t.length-1;if(e<3)throw new d("Ring has fewer than 4 points, so orientation cannot be determined");for(var A=t[0],n=0,r=1;r<=e;r++){var i=t[r];i.y>A.y&&(A=i,n=r)}var o=n;do{(o-=1)<0&&(o=e)}while(t[o].equals2D(A)&&o!==n);var a=n;do{a=(a+1)%e}while(t[a].equals2D(A)&&a!==n);var s=t[o],g=t[a];if(s.equals2D(A)||g.equals2D(A)||s.equals2D(g))return!1;var c=at.computeOrientation(s,A,g);return 0===c?s.x>g.x:c>0},at.locatePointInRing=function(t,e){return ot.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,A){var n=(A.x-e.x)*(A.x-e.x)+(A.y-e.y)*(A.y-e.y),r=((e.y-t.y)*(A.x-e.x)-(e.x-t.x)*(A.y-e.y))/n;return Math.abs(r)*Math.sqrt(n)},at.computeOrientation=function(t,e,A){return at.orientationIndex(t,e,A)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new d("Line array must contain at least one vertex");for(var A=t.distance(e[0]),n=0;n<e.length-1;n++){var r=at.distancePointLine(t,e[n],e[n+1]);r<A&&(A=r)}return A}if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];if(o.x===a.x&&o.y===a.y)return i.distance(o);var s=(a.x-o.x)*(a.x-o.x)+(a.y-o.y)*(a.y-o.y),g=((i.x-o.x)*(a.x-o.x)+(i.y-o.y)*(a.y-o.y))/s;if(g<=0)return i.distance(o);if(g>=1)return i.distance(a);var c=((o.y-i.y)*(a.x-o.x)-(o.x-i.x)*(a.y-o.y))/s;return Math.abs(c)*Math.sqrt(s)}},at.isOnLine=function(t,e){for(var A=new rt,n=1;n<e.length;n++){var r=e[n-1],i=e[n];if(A.computeIntersection(t,r,i),A.hasIntersection())return!0}return!1},st.CLOCKWISE.get=function(){return-1},st.RIGHT.get=function(){return at.CLOCKWISE},st.COUNTERCLOCKWISE.get=function(){return 1},st.LEFT.get=function(){return at.COUNTERCLOCKWISE},st.COLLINEAR.get=function(){return 0},st.STRAIGHT.get=function(){return at.COLLINEAR},Object.defineProperties(at,st);var gt=function(){};gt.prototype.filter=function(t){},gt.prototype.interfaces_=function(){return[]},gt.prototype.getClass=function(){return gt};var ct=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},It={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}};ct.prototype.isGeometryCollection=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION},ct.prototype.getFactory=function(){return this._factory},ct.prototype.getGeometryN=function(t){return this},ct.prototype.getArea=function(){return 0},ct.prototype.isRectangle=function(){return!1},ct.prototype.equals=function(){if(arguments[0]instanceof ct){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof ct))return!1;var A=e;return this.equalsExact(A)}},ct.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},ct.prototype.geometryChanged=function(){this.apply(ct.geometryChangedFilter)},ct.prototype.geometryChangedAction=function(){this._envelope=null},ct.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},ct.prototype.getLength=function(){return 0},ct.prototype.getNumGeometries=function(){return 1},ct.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var A=arguments[0],n=arguments[1];return this.getSortIndex()!==A.getSortIndex()?this.getSortIndex()-A.getSortIndex():this.isEmpty()&&A.isEmpty()?0:this.isEmpty()?-1:A.isEmpty()?1:this.compareToSameClass(A,n)}},ct.prototype.getUserData=function(){return this._userData},ct.prototype.getSRID=function(){return this._SRID},ct.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ct.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION)throw new d("This method does not support GeometryCollection arguments")},ct.prototype.equal=function(t,e,A){return 0===A?t.equals(e):t.distance(e)<=A},ct.prototype.norm=function(){var t=this.copy();return t.normalize(),t},ct.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ct.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new Z(this._envelope)},ct.prototype.setSRID=function(t){this._SRID=t},ct.prototype.setUserData=function(t){this._userData=t},ct.prototype.compare=function(t,e){for(var A=t.iterator(),n=e.iterator();A.hasNext()&&n.hasNext();){var r=A.next(),i=n.next(),o=r.compareTo(i);if(0!==o)return o}return A.hasNext()?1:n.hasNext()?-1:0},ct.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ct.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ct.SORTINDEX_MULTIPOINT||this.getSortIndex()===ct.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ct.SORTINDEX_MULTIPOLYGON},ct.prototype.interfaces_=function(){return[y,p,e]},ct.prototype.getClass=function(){return ct},ct.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},ct.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},It.serialVersionUID.get=function(){return 0x799ea46522854c00},It.SORTINDEX_POINT.get=function(){return 0},It.SORTINDEX_MULTIPOINT.get=function(){return 1},It.SORTINDEX_LINESTRING.get=function(){return 2},It.SORTINDEX_LINEARRING.get=function(){return 3},It.SORTINDEX_MULTILINESTRING.get=function(){return 4},It.SORTINDEX_POLYGON.get=function(){return 5},It.SORTINDEX_MULTIPOLYGON.get=function(){return 6},It.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},It.geometryChangedFilter.get=function(){return ut},Object.defineProperties(ct,It);var ut=function(){};ut.interfaces_=function(){return[gt]},ut.filter=function(t){t.geometryChangedAction()};var lt=function(){};lt.prototype.filter=function(t){},lt.prototype.interfaces_=function(){return[]},lt.prototype.getClass=function(){return lt};var Ct=function(){},ht={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}};Ct.prototype.isInBoundary=function(t){},Ct.prototype.interfaces_=function(){return[]},Ct.prototype.getClass=function(){return Ct},ht.Mod2BoundaryNodeRule.get=function(){return Bt},ht.EndPointBoundaryNodeRule.get=function(){return ft},ht.MultiValentEndPointBoundaryNodeRule.get=function(){return dt},ht.MonoValentEndPointBoundaryNodeRule.get=function(){return Qt},ht.MOD2_BOUNDARY_RULE.get=function(){return new Bt},ht.ENDPOINT_BOUNDARY_RULE.get=function(){return new ft},ht.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new dt},ht.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new Qt},ht.OGC_SFS_BOUNDARY_RULE.get=function(){return Ct.MOD2_BOUNDARY_RULE},Object.defineProperties(Ct,ht);var Bt=function(){};Bt.prototype.isInBoundary=function(t){return t%2==1},Bt.prototype.interfaces_=function(){return[Ct]},Bt.prototype.getClass=function(){return Bt};var ft=function(){};ft.prototype.isInBoundary=function(t){return t>0},ft.prototype.interfaces_=function(){return[Ct]},ft.prototype.getClass=function(){return ft};var dt=function(){};dt.prototype.isInBoundary=function(t){return t>1},dt.prototype.interfaces_=function(){return[Ct]},dt.prototype.getClass=function(){return dt};var Qt=function(){};Qt.prototype.isInBoundary=function(t){return 1===t},Qt.prototype.interfaces_=function(){return[Ct]},Qt.prototype.getClass=function(){return Qt};var Et=function(){};Et.prototype.add=function(){},Et.prototype.addAll=function(){},Et.prototype.isEmpty=function(){},Et.prototype.iterator=function(){},Et.prototype.size=function(){},Et.prototype.toArray=function(){},Et.prototype.remove=function(){},(A.prototype=new Error).name="IndexOutOfBoundsException";var pt=function(){};pt.prototype.hasNext=function(){},pt.prototype.next=function(){},pt.prototype.remove=function(){};var yt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(Et);(n.prototype=new Error).name="NoSuchElementException";var vt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof Et&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,Et]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var A=this.array_[t];return this.array_[t]=e,A},e.prototype.iterator=function(){return new mt(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new A;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,A=this.array_.length;e<A;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,A=0,n=this.array_.length;A<n;A++)if(this.array_[A]===t){this.array_.splice(A,1),e=!0;break}return e},e}(yt),mt=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new n;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(pt),bt=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var A=arguments[0],n=arguments[1];this.ensureCapacity(A.length),this.add(A,n)}}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={coordArrayType:{configurable:!0}};return A.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){if(2===arguments.length){for(var e=arguments[0],A=arguments[1],n=!1,r=e.iterator();r.hasNext();)this.add(r.next(),A),n=!0;return n}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),A=0;A<this.size();A++)e.add(A,this.get(A).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){if(1===arguments.length){var e=arguments[0];t.prototype.add.call(this,e)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var A=arguments[0],n=arguments[1];return this.add(A,n,!0),!0}if(arguments[0]instanceof m&&"boolean"==typeof arguments[1]){var r=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(r))return null;t.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var i=arguments[0],o=arguments[1];return this.add(i,o),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],s=arguments[1];if(arguments[2])for(var g=0;g<a.length;g++)this.add(a[g],s);else for(var c=a.length-1;c>=0;c--)this.add(a[c],s);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof m){var I=arguments[0],u=arguments[1];if(!arguments[2]){var l=this.size();if(l>0){if(I>0&&this.get(I-1).equals2D(u))return null;if(I<l&&this.get(I).equals2D(u))return null}}t.prototype.add.call(this,I,u)}}else if(4===arguments.length){var C=arguments[0],h=arguments[1],B=arguments[2],f=arguments[3],d=1;B>f&&(d=-1);for(var Q=B;Q!==f;Q+=d)this.add(C[Q],h);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new m(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,A),e}(vt),Ft=function(){},wt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};wt.ForwardComparator.get=function(){return St},wt.BidirectionalComparator.get=function(){return Dt},wt.coordArrayType.get=function(){return new Array(0).fill(null)},Ft.prototype.interfaces_=function(){return[]},Ft.prototype.getClass=function(){return Ft},Ft.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},Ft.ptNotInList=function(t,e){for(var A=0;A<t.length;A++){var n=t[A];if(Ft.indexOf(n,e)<0)return n}return null},Ft.scroll=function(t,e){var A=Ft.indexOf(e,t);if(A<0)return null;var n=new Array(t.length).fill(null);Y.arraycopy(t,A,n,0,t.length-A),Y.arraycopy(t,0,n,t.length-A,A),Y.arraycopy(n,0,t,0,t.length)},Ft.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var A=0;A<t.length;A++)if(!t[A].equals(e[A]))return!1;return!0}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(n===r)return!0;if(null===n||null===r)return!1;if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(0!==i.compare(n[o],r[o]))return!1;return!0}},Ft.intersection=function(t,e){for(var A=new bt,n=0;n<t.length;n++)e.intersects(t[n])&&A.add(t[n],!0);return A.toCoordinateArray()},Ft.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Ft.removeRepeatedPoints=function(t){return Ft.hasRepeatedPoints(t)?new bt(t,!1).toCoordinateArray():t},Ft.reverse=function(t){for(var e=t.length-1,A=Math.trunc(e/2),n=0;n<=A;n++){var r=t[n];t[n]=t[e-n],t[e-n]=r}},Ft.removeNull=function(t){for(var e=0,A=0;A<t.length;A++)null!==t[A]&&e++;var n=new Array(e).fill(null);if(0===e)return n;for(var r=0,i=0;i<t.length;i++)null!==t[i]&&(n[r++]=t[i]);return n},Ft.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),A=0;A<t.length;A++)e[A]=new m(t[A]);return e}if(5===arguments.length)for(var n=arguments[0],r=arguments[1],i=arguments[2],o=arguments[3],a=arguments[4],s=0;s<a;s++)i[o+s]=new m(n[r+s])},Ft.isEqualReversed=function(t,e){for(var A=0;A<t.length;A++){var n=t[A],r=e[t.length-A-1];if(0!==n.compareTo(r))return!1}return!0},Ft.envelope=function(t){for(var e=new Z,A=0;A<t.length;A++)e.expandToInclude(t[A]);return e},Ft.toCoordinateArray=function(t){return t.toArray(Ft.coordArrayType)},Ft.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Ft.indexOf=function(t,e){for(var A=0;A<e.length;A++)if(t.equals(e[A]))return A;return-1},Ft.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var A=t.length-1-e,n=t[e].compareTo(t[A]);if(0!==n)return n}return 1},Ft.compare=function(t,e){for(var A=0;A<t.length&&A<e.length;){var n=t[A].compareTo(e[A]);if(0!==n)return n;A++}return A<e.length?-1:A<t.length?1:0},Ft.minCoordinate=function(t){for(var e=null,A=0;A<t.length;A++)(null===e||e.compareTo(t[A])>0)&&(e=t[A]);return e},Ft.extract=function(t,e,A){e=U.clamp(e,0,t.length);var n=(A=U.clamp(A,-1,t.length))-e+1;A<0&&(n=0),e>=t.length&&(n=0),A<e&&(n=0);var r=new Array(n).fill(null);if(0===n)return r;for(var i=0,o=e;o<=A;o++)r[i++]=t[o];return r},Object.defineProperties(Ft,wt);var St=function(){};St.prototype.compare=function(t,e){return Ft.compare(t,e)},St.prototype.interfaces_=function(){return[v]},St.prototype.getClass=function(){return St};var Dt=function(){};Dt.prototype.compare=function(t,e){var A=t,n=e;if(A.length<n.length)return-1;if(A.length>n.length)return 1;if(0===A.length)return 0;var r=Ft.compare(A,n);return Ft.isEqualReversed(A,n)?0:r},Dt.prototype.OLDcompare=function(t,e){var A=t,n=e;if(A.length<n.length)return-1;if(A.length>n.length)return 1;if(0===A.length)return 0;for(var r=Ft.increasingDirection(A),i=Ft.increasingDirection(n),o=r>0?0:A.length-1,a=i>0?0:A.length-1,s=0;s<A.length;s++){var g=A[o].compareTo(n[a]);if(0!==g)return g;o+=r,a+=i}return 0},Dt.prototype.interfaces_=function(){return[v]},Dt.prototype.getClass=function(){return Dt};var Rt=function(){};Rt.prototype.get=function(){},Rt.prototype.put=function(){},Rt.prototype.size=function(){},Rt.prototype.values=function(){},Rt.prototype.entrySet=function(){};var Ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Rt);(r.prototype=new Error).name="OperationNotSupported",(i.prototype=new Et).contains=function(){};var Gt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof Et&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,A=this.array_.length;e<A;e++)if(this.array_[e]===t)return!0;return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,A=this.array_.length;e<A;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new Nt(this)},e}(i),Nt=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new n;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new r},e}(pt),kt=0;(I.prototype=new Ut).get=function(t){for(var e=this.root_;null!==e;){var A=t.compareTo(e.key);if(A<0)e=e.left;else{if(!(A>0))return e.value;e=e.right}}return null},I.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:kt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var A,n,r=this.root_;do{if(A=r,(n=t.compareTo(r.key))<0)r=r.left;else{if(!(n>0)){var i=r.value;return r.value=e,i}r=r.right}}while(null!==r);var o={key:t,left:null,right:null,value:e,parent:A,color:kt,getValue:function(){return this.value},getKey:function(){return this.key}};return n<0?A.left=o:A.right=o,this.fixAfterInsertion(o),this.size_++,null},I.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===g(a(a(t)))){var e=c(a(a(t)));1===o(e)?(s(a(t),kt),s(e,kt),s(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateLeft(t)),s(a(t),kt),s(a(a(t)),1),this.rotateRight(a(a(t))))}else{var A=g(a(a(t)));1===o(A)?(s(a(t),kt),s(A,kt),s(a(a(t)),1),t=a(a(t))):(t===g(a(t))&&(t=a(t),this.rotateRight(t)),s(a(t),kt),s(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=kt},I.prototype.values=function(){var t=new vt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=I.successor(e));)t.add(e.value);return t},I.prototype.entrySet=function(){var t=new Gt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=I.successor(e));)t.add(e);return t},I.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},I.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},I.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},I.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var A=t.parent,n=t;null!==A&&n===A.right;)n=A,A=A.parent;return A},I.prototype.size=function(){return this.size_};var xt=function(){};xt.prototype.interfaces_=function(){return[]},xt.prototype.getClass=function(){return xt},u.prototype=new i,(l.prototype=new u).contains=function(t){for(var e=0,A=this.array_.length;e<A;e++)if(0===this.array_[e].compareTo(t))return!0;return!1},l.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,A=this.array_.length;e<A;e++)if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0;return this.array_.push(t),!0},l.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},l.prototype.remove=function(t){throw new r},l.prototype.size=function(){return this.array_.length},l.prototype.isEmpty=function(){return 0===this.array_.length},l.prototype.toArray=function(){for(var t=[],e=0,A=this.array_.length;e<A;e++)t.push(this.array_[e]);return t},l.prototype.iterator=function(){return new Ot(this)};var Ot=function(t){this.treeSet_=t,this.position_=0};Ot.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new n;return this.treeSet_.array_[this.position_++]},Ot.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Ot.prototype.remove=function(){throw new r};var Mt=function(){};Mt.sort=function(){var t,e,A,n,r=arguments[0];if(1===arguments.length)n=function(t,e){return t.compareTo(e)},r.sort(n);else if(2===arguments.length)A=arguments[1],n=function(t,e){return A.compare(t,e)},r.sort(n);else if(3===arguments.length){(e=r.slice(arguments[1],arguments[2])).sort();var i=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length));for(r.splice(0,r.length),t=0;t<i.length;t++)r.push(i[t])}else if(4===arguments.length)for(e=r.slice(arguments[1],arguments[2]),A=arguments[3],n=function(t,e){return A.compare(t,e)},e.sort(n),i=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length)),r.splice(0,r.length),t=0;t<i.length;t++)r.push(i[t])},Mt.asList=function(t){for(var e=new vt,A=0,n=t.length;A<n;A++)e.add(t[A]);return e};var Lt=function(){},_t={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}};_t.P.get=function(){return 0},_t.L.get=function(){return 1},_t.A.get=function(){return 2},_t.FALSE.get=function(){return-1},_t.TRUE.get=function(){return-2},_t.DONTCARE.get=function(){return-3},_t.SYM_FALSE.get=function(){return"F"},_t.SYM_TRUE.get=function(){return"T"},_t.SYM_DONTCARE.get=function(){return"*"},_t.SYM_P.get=function(){return"0"},_t.SYM_L.get=function(){return"1"},_t.SYM_A.get=function(){return"2"},Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Lt.toDimensionSymbol=function(t){switch(t){case Lt.FALSE:return Lt.SYM_FALSE;case Lt.TRUE:return Lt.SYM_TRUE;case Lt.DONTCARE:return Lt.SYM_DONTCARE;case Lt.P:return Lt.SYM_P;case Lt.L:return Lt.SYM_L;case Lt.A:return Lt.SYM_A}throw new d("Unknown dimension value: "+t)},Lt.toDimensionValue=function(t){switch(x.toUpperCase(t)){case Lt.SYM_FALSE:return Lt.FALSE;case Lt.SYM_TRUE:return Lt.TRUE;case Lt.SYM_DONTCARE:return Lt.DONTCARE;case Lt.SYM_P:return Lt.P;case Lt.SYM_L:return Lt.L;case Lt.SYM_A:return Lt.A}throw new d("Unknown dimension symbol: "+t)},Object.defineProperties(Lt,_t);var Jt=function(){};Jt.prototype.filter=function(t){},Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt};var Tt=function(){};Tt.prototype.filter=function(t,e){},Tt.prototype.isDone=function(){},Tt.prototype.isGeometryChanged=function(){},Tt.prototype.interfaces_=function(){return[]},Tt.prototype.getClass=function(){return Tt};var jt=function(t){function e(e,A){if(t.call(this,A),this._geometries=e||[],t.hasNullElements(this._geometries))throw new d("geometries must not contain null elements")}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new Z,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,A=0;A<this._geometries.length;A++)for(var n=this._geometries[A].getCoordinates(),r=0;r<n.length;r++)t[++e]=n[r];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],A=arguments[1];if(!this.isEquivalentClass(e))return!1;var n=e;if(this._geometries.length!==n._geometries.length)return!1;for(var r=0;r<this._geometries.length;r++)if(!this._geometries[r].equalsExact(n._geometries[r],A))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Mt.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=Lt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=Lt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),A=0;A<this._geometries.length;A++)e[A]=this._geometries[A].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=new l(Mt.asList(this._geometries)),A=new l(Mt.asList(t._geometries));return this.compare(e,A)}if(2===arguments.length){for(var n=arguments[0],r=arguments[1],i=n,o=this.getNumGeometries(),a=i.getNumGeometries(),s=0;s<o&&s<a;){var g=this.getGeometryN(s),c=i.getGeometryN(s),I=g.compareToSameClass(c,r);if(0!==I)return I;s++}return s<o?1:s<a?-1:0}},e.prototype.apply=function(){if(R(arguments[0],lt))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(R(arguments[0],Tt)){var A=arguments[0];if(0===this._geometries.length)return null;for(var n=0;n<this._geometries.length&&(this._geometries[n].apply(A),!A.isDone());n++);A.isGeometryChanged()&&this.geometryChanged()}else if(R(arguments[0],Jt)){var r=arguments[0];r.filter(this);for(var i=0;i<this._geometries.length;i++)this._geometries[i].apply(r)}else if(R(arguments[0],gt)){var o=arguments[0];o.filter(this);for(var a=0;a<this._geometries.length;a++)this._geometries[a].apply(o)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),et.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var A=0;A<this._geometries.length;A++)e._geometries[A]=this._geometries[A].clone();return e},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),A=0;A<t.length;A++)t[A]=this._geometries[A].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},A.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,A),e}(ct),Ht=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],A=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,A)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Lt.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),A=0;A<this._geometries.length;A++)e[t-1-A]=this._geometries[A].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new Yt(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),A=0;A<t.length;A++)t[A]=this._geometries[A].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[xt]},e.prototype.getClass=function(){return e},A.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,A),e}(jt),Yt=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=Ct.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var A=arguments[0],n=arguments[1];this._geom=A,this._geomFact=A.getFactory(),this._bnRule=n}};Yt.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Yt.prototype.getBoundary=function(){return this._geom instanceof Pt?this.boundaryLineString(this._geom):this._geom instanceof Ht?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Yt.prototype.boundaryLineString=function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Yt.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Yt.prototype.computeBoundaryCoordinates=function(t){var e=new vt;this._endpointMap=new I;for(var A=0;A<t.getNumGeometries();A++){var n=t.getGeometryN(A);0!==n.getNumPoints()&&(this.addEndpoint(n.getCoordinateN(0)),this.addEndpoint(n.getCoordinateN(n.getNumPoints()-1)))}for(var r=this._endpointMap.entrySet().iterator();r.hasNext();){var i=r.next(),o=i.getValue().count;this._bnRule.isInBoundary(o)&&e.add(i.getKey())}return Ft.toCoordinateArray(e)},Yt.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new Vt,this._endpointMap.put(t,e)),e.count++},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.getBoundary=function(){if(1===arguments.length){var t=arguments[0];return new Yt(t).getBoundary()}if(2===arguments.length){var e=arguments[0],A=arguments[1];return new Yt(e,A).getBoundary()}};var Vt=function(){this.count=null};Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt};var Zt=function(){},Wt={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt},Zt.chars=function(t,e){for(var A=new Array(e).fill(null),n=0;n<e;n++)A[n]=t;return String(A)},Zt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},A=new function(){}(e);return t.printStackTrace(A),e.toString()}if(2===arguments.length){for(var n=arguments[0],r=arguments[1],i="",o=new function(){}(new function(){}(Zt.getStackTrace(n))),a=0;a<r;a++)try{i+=o.readLine()+Zt.NEWLINE}catch(t){if(!(t instanceof C))throw t;et.shouldNeverReachHere()}return i}},Zt.split=function(t,e){for(var A=e.length,n=new vt,r=""+t,i=r.indexOf(e);i>=0;){var o=r.substring(0,i);n.add(o),i=(r=r.substring(i+A)).indexOf(e)}r.length>0&&n.add(r);for(var a=new Array(n.size()).fill(null),s=0;s<a.length;s++)a[s]=n.get(s);return a},Zt.toString=function(){if(1===arguments.length){var t=arguments[0];return Zt.SIMPLE_ORDINATE_FORMAT.format(t)}},Zt.spaces=function(t){return Zt.chars(" ",t)},Wt.NEWLINE.get=function(){return Y.getProperty("line.separator")},Wt.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}("0.#")},Object.defineProperties(Zt,Wt);var Kt=function(){};Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt},Kt.copyCoord=function(t,e,A,n){for(var r=Math.min(t.getDimension(),A.getDimension()),i=0;i<r;i++)A.setOrdinate(n,i,t.getOrdinate(e,i))},Kt.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&t.getOrdinate(0,J.X)===t.getOrdinate(e-1,J.X)&&t.getOrdinate(0,J.Y)===t.getOrdinate(e-1,J.Y)},Kt.isEqual=function(t,e){var A=t.size();if(A!==e.size())return!1;for(var n=Math.min(t.getDimension(),e.getDimension()),r=0;r<A;r++)for(var i=0;i<n;i++){var o=t.getOrdinate(r,i),a=e.getOrdinate(r,i);if(t.getOrdinate(r,i)!==e.getOrdinate(r,i)&&(!Q.isNaN(o)||!Q.isNaN(a)))return!1}return!0},Kt.extend=function(t,e,A){var n=t.create(A,e.getDimension()),r=e.size();if(Kt.copy(e,0,n,0,r),r>0)for(var i=r;i<A;i++)Kt.copy(e,r-1,n,i,1);return n},Kt.reverse=function(t){for(var e=t.size()-1,A=Math.trunc(e/2),n=0;n<=A;n++)Kt.swap(t,n,e-n)},Kt.swap=function(t,e,A){if(e===A)return null;for(var n=0;n<t.getDimension();n++){var r=t.getOrdinate(e,n);t.setOrdinate(e,n,t.getOrdinate(A,n)),t.setOrdinate(A,n,r)}},Kt.copy=function(t,e,A,n,r){for(var i=0;i<r;i++)Kt.copyCoord(t,e+i,A,n+i)},Kt.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return"()";var A=t.getDimension(),n=new N;n.append("(");for(var r=0;r<e;r++){r>0&&n.append(" ");for(var i=0;i<A;i++)i>0&&n.append(","),n.append(Zt.toString(t.getOrdinate(r,i)))}return n.append(")"),n.toString()}},Kt.ensureValidRing=function(t,e){var A=e.size();return 0===A?e:A<=3?Kt.createClosedRing(t,e,4):e.getOrdinate(0,J.X)===e.getOrdinate(A-1,J.X)&&e.getOrdinate(0,J.Y)===e.getOrdinate(A-1,J.Y)?e:Kt.createClosedRing(t,e,A+1)},Kt.createClosedRing=function(t,e,A){var n=t.create(A,e.getDimension()),r=e.size();Kt.copy(e,0,n,0,r);for(var i=r;i<A;i++)Kt.copy(e,0,n,i,1);return n};var Pt=function(t){function e(e,A){t.call(this,A),this._points=null,this.init(e)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new Z:this._points.expandEnvelope(new Z)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],A=arguments[1];if(!this.isEquivalentClass(e))return!1;var n=e;if(this._points.size()!==n._points.size())return!1;for(var r=0;r<this._points.size();r++)if(!this.equal(this._points.getCoordinate(r),n._points.getCoordinate(r),A))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e)))return this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0&&Kt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Lt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Kt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,A=0;e<this._points.size()&&A<t._points.size();){var n=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(A));if(0!==n)return n;e++,A++}return e<this._points.size()?1:A<t._points.size()?-1:0}if(2===arguments.length){var r=arguments[0];return arguments[1].compare(this._points,r._points)}},e.prototype.apply=function(){if(R(arguments[0],lt))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(R(arguments[0],Tt)){var A=arguments[0];if(0===this._points.size())return null;for(var n=0;n<this._points.size()&&(A.filter(this._points,n),!A.isDone());n++);A.isGeometryChanged()&&this.geometryChanged()}else(R(arguments[0],Jt)||R(arguments[0],gt))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return new Yt(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new d("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[xt]},e.prototype.getClass=function(){return e},A.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,A),e}(ct),qt=function(){};qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt};var Xt=function(t){function e(e,A){t.call(this,A),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new Z;var t=new Z;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],A=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),A))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Lt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(R(arguments[0],lt)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(R(arguments[0],Tt)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else(R(arguments[0],Jt)||R(arguments[0],gt))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),et.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[qt]},e.prototype.getClass=function(){return e},A.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,A),e}(ct),zt=function(){};zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt};var $t=function(t){function e(e,A,n){if(t.call(this,n),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===A&&(A=[]),t.hasNullElements(A))throw new d("holes must not contain null elements");if(e.isEmpty()&&t.hasNonEmptyElements(A))throw new d("shell is empty but holes are not");this._shell=e,this._holes=A}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,A=this._shell.getCoordinates(),n=0;n<A.length;n++)t[++e]=A[n];for(var r=0;r<this._holes.length;r++)for(var i=this._holes[r].getCoordinates(),o=0;o<i.length;o++)t[++e]=i[o];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(at.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(at.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),A=0;A<5;A++){var n=t.getX(A);if(n!==e.getMinX()&&n!==e.getMaxX())return!1;var r=t.getY(A);if(r!==e.getMinY()&&r!==e.getMaxY())return!1}for(var i=t.getX(0),o=t.getY(0),a=1;a<=4;a++){var s=t.getX(a),g=t.getY(a);if(s!==i===(g!==o))return!1;i=s,o=g}return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],A=arguments[1];if(!this.isEquivalentClass(e))return!1;var n=e,r=this._shell,i=n._shell;if(!r.equalsExact(i,A))return!1;if(this._holes.length!==n._holes.length)return!1;for(var o=0;o<this._holes.length;o++)if(!this._holes[o].equalsExact(n._holes[o],A))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);Mt.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],A=arguments[1];if(e.isEmpty())return null;var n=new Array(e.getCoordinates().length-1).fill(null);Y.arraycopy(e.getCoordinates(),0,n,0,n.length);var r=Ft.minCoordinate(e.getCoordinates());Ft.scroll(n,r),Y.arraycopy(n,0,e.getCoordinates(),0,n.length),e.getCoordinates()[n.length]=n[0],at.isCCW(e.getCoordinates())===A&&Ft.reverse(e.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=this._shell,A=t._shell;return e.compareToSameClass(A)}if(2===arguments.length){var n=arguments[0],r=arguments[1],i=n,o=this._shell,a=i._shell,s=o.compareToSameClass(a,r);if(0!==s)return s;for(var g=this.getNumInteriorRing(),c=i.getNumInteriorRing(),I=0;I<g&&I<c;){var u=this.getInteriorRingN(I),l=i.getInteriorRingN(I),C=u.compareToSameClass(l,r);if(0!==C)return C;I++}return I<g?1:I<c?-1:0}},e.prototype.apply=function(t){if(R(t,lt)){this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(R(t,Tt)){if(this._shell.apply(t),!t.isDone())for(var A=0;A<this._holes.length&&(this._holes[A].apply(t),!t.isDone());A++);t.isGeometryChanged()&&this.geometryChanged()}else if(R(t,Jt))t.filter(this);else if(R(t,gt)){t.filter(this),this._shell.apply(t);for(var n=0;n<this._holes.length;n++)this._holes[n].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var A=0;A<this._holes.length;A++)e._holes[A]=this._holes[A].clone();return e},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var t=this._shell.copy(),A=new Array(this._holes.length).fill(null),n=0;n<A.length;n++)A[n]=this._holes[n].copy();return new e(t,A,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[zt]},e.prototype.getClass=function(){return e},A.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,A),e}(ct),te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],A=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,A)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Lt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),A=0;A<t.length;A++)t[A]=this._geometries[A].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[qt]},e.prototype.getClass=function(){return e},A.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,A),e}(jt),ee=function(t){function e(e,A){e instanceof m&&A instanceof fe&&(e=A.getCoordinateSequenceFactory().create(e)),t.call(this,e,A),this.validateConstruction()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Lt.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();return Kt.reverse(t),this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new d("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new d("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},A.MINIMUM_VALID_SIZE.get=function(){return 4},A.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,A),e}(Pt),Ae=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],A=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,A)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),A=0;A<this._geometries.length;A++)e[A]=this._geometries[A].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new vt,e=0;e<this._geometries.length;e++)for(var A=this._geometries[e].getBoundary(),n=0;n<A.getNumGeometries();n++)t.add(A.getGeometryN(n));var r=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(r))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),A=0;A<t.length;A++)t[A]=this._geometries[A].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[zt]},e.prototype.getClass=function(){return e},A.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,A),e}(jt),ne=function(t){this._factory=t||null,this._isUserDataCopied=!1},re={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};ne.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},ne.prototype.edit=function(t,e){if(null===t)return null;var A=this.editInternal(t,e);return this._isUserDataCopied&&A.setUserData(t.getUserData()),A},ne.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof jt?this.editGeometryCollection(t,e):t instanceof $t?this.editPolygon(t,e):t instanceof Xt||t instanceof Pt?e.edit(t,this._factory):(et.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},ne.prototype.editGeometryCollection=function(t,e){for(var A=e.edit(t,this._factory),n=new vt,r=0;r<A.getNumGeometries();r++){var i=this.edit(A.getGeometryN(r),e);null===i||i.isEmpty()||n.add(i)}return A.getClass()===te?this._factory.createMultiPoint(n.toArray([])):A.getClass()===Ht?this._factory.createMultiLineString(n.toArray([])):A.getClass()===Ae?this._factory.createMultiPolygon(n.toArray([])):this._factory.createGeometryCollection(n.toArray([]))},ne.prototype.editPolygon=function(t,e){var A=e.edit(t,this._factory);if(null===A&&(A=this._factory.createPolygon(null)),A.isEmpty())return A;var n=this.edit(A.getExteriorRing(),e);if(null===n||n.isEmpty())return this._factory.createPolygon();for(var r=new vt,i=0;i<A.getNumInteriorRing();i++){var o=this.edit(A.getInteriorRingN(i),e);null===o||o.isEmpty()||r.add(o)}return this._factory.createPolygon(n,r.toArray([]))},ne.prototype.interfaces_=function(){return[]},ne.prototype.getClass=function(){return ne},ne.GeometryEditorOperation=function(){},re.NoOpGeometryOperation.get=function(){return ie},re.CoordinateOperation.get=function(){return oe},re.CoordinateSequenceOperation.get=function(){return ae},Object.defineProperties(ne,re);var ie=function(){};ie.prototype.edit=function(t,e){return t},ie.prototype.interfaces_=function(){return[ne.GeometryEditorOperation]},ie.prototype.getClass=function(){return ie};var oe=function(){};oe.prototype.edit=function(t,e){var A=this.editCoordinates(t.getCoordinates(),t);return null===A?t:t instanceof ee?e.createLinearRing(A):t instanceof Pt?e.createLineString(A):t instanceof Xt?A.length>0?e.createPoint(A[0]):e.createPoint():t},oe.prototype.interfaces_=function(){return[ne.GeometryEditorOperation]},oe.prototype.getClass=function(){return oe};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Pt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Xt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[ne.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var se=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 t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e<t;e++)this._coordinates[e]=new m}else if(R(arguments[0],J)){var A=arguments[0];if(null===A)return this._coordinates=new Array(0).fill(null),null;this._dimension=A.getDimension(),this._coordinates=new Array(A.size()).fill(null);for(var n=0;n<this._coordinates.length;n++)this._coordinates[n]=A.getCoordinateCopy(n)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1];this._coordinates=r,this._dimension=i,null===r&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=new Array(o).fill(null),this._dimension=a;for(var s=0;s<o;s++)this._coordinates[s]=new m}},ge={serialVersionUID:{configurable:!0}};se.prototype.setOrdinate=function(t,e,A){switch(e){case J.X:this._coordinates[t].x=A;break;case J.Y:this._coordinates[t].y=A;break;case J.Z:this._coordinates[t].z=A;break;default:throw new d("invalid ordinateIndex")}},se.prototype.size=function(){return this._coordinates.length},se.prototype.getOrdinate=function(t,e){switch(e){case J.X:return this._coordinates[t].x;case J.Y:return this._coordinates[t].y;case J.Z:return this._coordinates[t].z}return Q.NaN},se.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],A=arguments[1];A.x=this._coordinates[e].x,A.y=this._coordinates[e].y,A.z=this._coordinates[e].z}},se.prototype.getCoordinateCopy=function(t){return new m(this._coordinates[t])},se.prototype.getDimension=function(){return this._dimension},se.prototype.getX=function(t){return this._coordinates[t].x},se.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new se(t,this._dimension)},se.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},se.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new se(t,this._dimension)},se.prototype.toString=function(){if(this._coordinates.length>0){var t=new N(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"},se.prototype.getY=function(t){return this._coordinates[t].y},se.prototype.toCoordinateArray=function(){return this._coordinates},se.prototype.interfaces_=function(){return[J,e]},se.prototype.getClass=function(){return se},ge.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(se,ge);var ce=function(){},Ie={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ce.prototype.readResolve=function(){return ce.instance()},ce.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new se(t)}if(R(arguments[0],J)){var e=arguments[0];return new se(e)}}else if(2===arguments.length){var A=arguments[0],n=arguments[1];return n>3&&(n=3),n<2?new se(A):new se(A,n)}},ce.prototype.interfaces_=function(){return[w,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},Ie.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Ie.instanceObject.get=function(){return new ce},Object.defineProperties(ce,Ie);var ue=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new vt,e=this.map_.values(),A=e.next();!A.done;)t.add(A.value),A=e.next();return t},e.prototype.entrySet=function(){var t=new Gt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(Rt),le=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof he){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var A=arguments[0];this._modelType=t.FIXED,this.setScale(A)}else if(arguments[0]instanceof t){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}},Ce={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};le.prototype.equals=function(t){if(!(t instanceof le))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},le.prototype.compareTo=function(t){var e=t,A=this.getMaximumSignificantDigits(),n=e.getMaximumSignificantDigits();return new k(A).compareTo(new k(n))},le.prototype.getScale=function(){return this._scale},le.prototype.isFloating=function(){return this._modelType===le.FLOATING||this._modelType===le.FLOATING_SINGLE},le.prototype.getType=function(){return this._modelType},le.prototype.toString=function(){var t="UNKNOWN";return this._modelType===le.FLOATING?t="Floating":this._modelType===le.FLOATING_SINGLE?t="Floating-Single":this._modelType===le.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},le.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return Q.isNaN(t)||this._modelType===le.FLOATING_SINGLE?t:this._modelType===le.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof m){var e=arguments[0];if(this._modelType===le.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},le.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===le.FLOATING?t=16:this._modelType===le.FLOATING_SINGLE?t=6:this._modelType===le.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},le.prototype.setScale=function(t){this._scale=Math.abs(t)},le.prototype.interfaces_=function(){return[e,p]},le.prototype.getClass=function(){return le},le.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},Ce.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},Ce.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(le,Ce);var he=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},Be={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};he.prototype.readResolve=function(){return he.nameToTypeMap.get(this._name)},he.prototype.toString=function(){return this._name},he.prototype.interfaces_=function(){return[e]},he.prototype.getClass=function(){return he},Be.serialVersionUID.get=function(){return-552860263173159e4},Be.nameToTypeMap.get=function(){return new ue},Object.defineProperties(he,Be),le.Type=he,le.FIXED=new he("FIXED"),le.FLOATING=new he("FLOATING"),le.FLOATING_SINGLE=new he("FLOATING SINGLE");var fe=function t(){this._precisionModel=new le,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?R(arguments[0],w)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof le&&(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]))},de={serialVersionUID:{configurable:!0}};fe.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new m(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new m(t.getMinX(),t.getMinY()),new m(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new m(t.getMinX(),t.getMinY()),new m(t.getMinX(),t.getMaxY()),new m(t.getMaxX(),t.getMaxY()),new m(t.getMaxX(),t.getMinY()),new m(t.getMinX(),t.getMinY())]),null)},fe.prototype.createLineString=function(t){return t?t instanceof Array?new Pt(this.getCoordinateSequenceFactory().create(t),this):R(t,J)?new Pt(t,this):void 0:new Pt(this.getCoordinateSequenceFactory().create([]),this)},fe.prototype.createMultiLineString=function(){if(0===arguments.length)return new Ht(null,this);if(1===arguments.length){var t=arguments[0];return new Ht(t,this)}},fe.prototype.buildGeometry=function(t){for(var e=null,A=!1,n=!1,r=t.iterator();r.hasNext();){var i=r.next(),o=i.getClass();null===e&&(e=o),o!==e&&(A=!0),i.isGeometryCollectionOrDerived()&&(n=!0)}if(null===e)return this.createGeometryCollection();if(A||n)return this.createGeometryCollection(fe.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof $t)return this.createMultiPolygon(fe.toPolygonArray(t));if(a instanceof Pt)return this.createMultiLineString(fe.toLineStringArray(t));if(a instanceof Xt)return this.createMultiPoint(fe.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},fe.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},fe.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof m){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(R(arguments[0],J)){var e=arguments[0];return new Xt(e,this)}}},fe.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},fe.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(R(arguments[0],J)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var A=arguments[0];return this.createPolygon(A,null)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return new $t(n,r,this)}},fe.prototype.getSRID=function(){return this._SRID},fe.prototype.createGeometryCollection=function(){if(0===arguments.length)return new jt(null,this);if(1===arguments.length){var t=arguments[0];return new jt(t,this)}},fe.prototype.createGeometry=function(t){return new ne(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},fe.prototype.getPrecisionModel=function(){return this._precisionModel},fe.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(R(arguments[0],J)){var e=arguments[0];return new ee(e,this)}}},fe.prototype.createMultiPolygon=function(){if(0===arguments.length)return new Ae(null,this);if(1===arguments.length){var t=arguments[0];return new Ae(t,this)}},fe.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(R(arguments[0],J)){var A=arguments[0];if(null===A)return this.createMultiPoint(new Array(0).fill(null));for(var n=new Array(A.size()).fill(null),r=0;r<A.size();r++){var i=this.getCoordinateSequenceFactory().create(1,A.getDimension());Kt.copy(A,r,i,0,1),n[r]=this.createPoint(i)}return this.createMultiPoint(n)}}},fe.prototype.interfaces_=function(){return[e]},fe.prototype.getClass=function(){return fe},fe.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},fe.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},fe.getDefaultCoordinateSequenceFactory=function(){return ce.instance()},fe.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},fe.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},fe.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},fe.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},fe.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},fe.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},fe.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},de.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(fe,de);var Qe=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],Ee=function(t){this.geometryFactory=t||new fe};Ee.prototype.read=function(t){var e,A=(e="string"==typeof t?JSON.parse(t):t).type;if(!pe[A])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==Qe.indexOf(A)?pe[A].apply(this,[e.coordinates]):"GeometryCollection"===A?pe[A].apply(this,[e.geometries]):pe[A].apply(this,[e])},Ee.prototype.write=function(t){var e=t.getGeometryType();if(!ye[e])throw new Error("Geometry is not supported");return ye[e].apply(this,[t])};var pe={Feature:function(t){var e={};for(var A in t)e[A]=t[A];if(t.geometry){var n=t.geometry.type;if(!pe[n])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=pe.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var A=0;A<t.features.length;++A)e.features.push(this.read(t.features[A]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],A=0;A<t.length;++A){var n=t[A];e.push(new m(n[0],n[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new m(t[0],t[1]),new m(t[2],t[1]),new m(t[2],t[3]),new m(t[0],t[3]),new m(t[0],t[1])])},Point:function(t){var e=new m(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],A=0;A<t.length;++A)e.push(pe.Point.apply(this,[t[A]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=pe.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],A=0;A<t.length;++A)e.push(pe.LineString.apply(this,[t[A]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=pe.coordinates.apply(this,[t[0]]),A=this.geometryFactory.createLinearRing(e),n=[],r=1;r<t.length;++r){var i=t[r],o=pe.coordinates.apply(this,[i]),a=this.geometryFactory.createLinearRing(o);n.push(a)}return this.geometryFactory.createPolygon(A,n)},MultiPolygon:function(t){for(var e=[],A=0;A<t.length;++A){var n=t[A];e.push(pe.Polygon.apply(this,[n]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],A=0;A<t.length;++A){var n=t[A];e.push(this.read(n))}return this.geometryFactory.createGeometryCollection(e)}},ye={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:ye.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],A=0;A<t._geometries.length;++A){var n=t._geometries[A],r=ye.Point.apply(this,[n]);e.push(r.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],A=t.getCoordinates(),n=0;n<A.length;++n){var r=A[n];e.push(ye.coordinate.apply(this,[r]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],A=0;A<t._geometries.length;++A){var n=t._geometries[A],r=ye.LineString.apply(this,[n]);e.push(r.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],A=ye.LineString.apply(this,[t._shell]);e.push(A.coordinates);for(var n=0;n<t._holes.length;++n){var r=t._holes[n],i=ye.LineString.apply(this,[r]);e.push(i.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],A=0;A<t._geometries.length;++A){var n=t._geometries[A],r=ye.Polygon.apply(this,[n]);e.push(r.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],A=0;A<t._geometries.length;++A){var n=t._geometries[A],r=n.getGeometryType();e.push(ye[r].apply(this,[n]))}return{type:"GeometryCollection",geometries:e}}},ve=function(t){this.geometryFactory=t||new fe,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Ee(this.geometryFactory)};ve.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===le.FIXED&&this.reducePrecision(e),e},ve.prototype.reducePrecision=function(t){var e,A;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,A=t.points.length;e<A;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,A=t.geometries.length;e<A;e++)this.reducePrecision(t.geometries[e])};var me=function(){this.parser=new Ee(this.geometryFactory)};me.prototype.write=function(t){return this.parser.write(t)};var be=function(){},Fe={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};be.prototype.interfaces_=function(){return[]},be.prototype.getClass=function(){return be},be.opposite=function(t){return t===be.LEFT?be.RIGHT:t===be.RIGHT?be.LEFT:t},Fe.ON.get=function(){return 0},Fe.LEFT.get=function(){return 1},Fe.RIGHT.get=function(){return 2},Object.defineProperties(be,Fe),(h.prototype=new Error).name="EmptyStackException",(B.prototype=new yt).add=function(t){return this.array_.push(t),!0},B.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},B.prototype.push=function(t){return this.array_.push(t),t},B.prototype.pop=function(t){if(0===this.array_.length)throw new h;return this.array_.pop()},B.prototype.peek=function(){if(0===this.array_.length)throw new h;return this.array_[this.array_.length-1]},B.prototype.empty=function(){return 0===this.array_.length},B.prototype.isEmpty=function(){return this.empty()},B.prototype.search=function(t){return this.array_.indexOf(t)},B.prototype.size=function(){return this.array_.length},B.prototype.toArray=function(){for(var t=[],e=0,A=this.array_.length;e<A;e++)t.push(this.array_[e]);return t};var we=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};we.prototype.getCoordinate=function(){return this._minCoord},we.prototype.getRightmostSide=function(t,e){var A=this.getRightmostSideOfSegment(t,e);return A<0&&(A=this.getRightmostSideOfSegment(t,e-1)),A<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),A},we.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();et.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],A=t[this._minIndex+1],n=at.computeOrientation(this._minCoord,A,e),r=!1;(e.y<this._minCoord.y&&A.y<this._minCoord.y&&n===at.COUNTERCLOCKWISE||e.y>this._minCoord.y&&A.y>this._minCoord.y&&n===at.CLOCKWISE)&&(r=!0),r&&(this._minIndex=this._minIndex-1)},we.prototype.getRightmostSideOfSegment=function(t,e){var A=t.getEdge().getCoordinates();if(e<0||e+1>=A.length)return-1;if(A[e].y===A[e+1].y)return-1;var n=be.LEFT;return A[e].y<A[e+1].y&&(n=be.RIGHT),n},we.prototype.getEdge=function(){return this._orientedDe},we.prototype.checkForRightmostCoordinate=function(t){for(var e=t.getEdge().getCoordinates(),A=0;A<e.length-1;A++)(null===this._minCoord||e[A].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=A,this._minCoord=e[A])},we.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},we.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var A=e.next();A.isForward()&&this.checkForRightmostCoordinate(A)}et.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)===be.LEFT&&(this._orientedDe=this._minDe.getSym())},we.prototype.interfaces_=function(){return[]},we.prototype.getClass=function(){return we};var Se=function(t){function e(A,n){t.call(this,e.msgWithCoord(A,n)),this.pt=n?new m(n):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}($),De=function(){this.array_=[]};De.prototype.addLast=function(t){this.array_.push(t)},De.prototype.removeFirst=function(){return this.array_.shift()},De.prototype.isEmpty=function(){return 0===this.array_.length};var Re=function(){this._finder=null,this._dirEdgeList=new vt,this._nodes=new vt,this._rightMostCoord=null,this._env=null,this._finder=new we};Re.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Re.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Re.prototype.computeNodeDepth=function(t){for(var e=null,A=t.getEdges().iterator();A.hasNext();){var n=A.next();if(n.isVisited()||n.getSym().isVisited()){e=n;break}}if(null===e)throw new Se("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var i=r.next();i.setVisited(!0),this.copySymDepths(i)}},Re.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(be.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Re.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Re.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(be.RIGHT)>=1&&e.getDepth(be.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Re.prototype.computeDepths=function(t){var e=new Gt,A=new De,n=t.getNode();for(A.addLast(n),e.add(n),t.setVisited(!0);!A.isEmpty();){var r=A.removeFirst();e.add(r),this.computeNodeDepth(r);for(var i=r.getEdges().iterator();i.hasNext();){var o=i.next().getSym();if(!o.isVisited()){var a=o.getNode();e.contains(a)||(A.addLast(a),e.add(a))}}}},Re.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Re.prototype.getEnvelope=function(){if(null===this._env){for(var t=new Z,e=this._dirEdgeList.iterator();e.hasNext();)for(var A=e.next().getEdge().getCoordinates(),n=0;n<A.length-1;n++)t.expandToInclude(A[n]);this._env=t}return this._env},Re.prototype.addReachable=function(t){var e=new B;for(e.add(t);!e.empty();){var A=e.pop();this.add(A,e)}},Re.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(be.LEFT,t.getDepth(be.RIGHT)),e.setDepth(be.RIGHT,t.getDepth(be.LEFT))},Re.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var A=t.getEdges().iterator();A.hasNext();){var n=A.next();this._dirEdgeList.add(n);var r=n.getSym().getNode();r.isVisited()||e.push(r)}},Re.prototype.getNodes=function(){return this._nodes},Re.prototype.getDirectedEdges=function(){return this._dirEdgeList},Re.prototype.interfaces_=function(){return[p]},Re.prototype.getClass=function(){return Re};var Ue=function t(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var A=arguments[0];this.init(1),this.location[be.ON]=A}else if(arguments[0]instanceof t){var n=arguments[0];if(this.init(n.location.length),null!==n)for(var r=0;r<this.location.length;r++)this.location[r]=n.location[r]}}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];this.init(3),this.location[be.ON]=i,this.location[be.LEFT]=o,this.location[be.RIGHT]=a}};Ue.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Ue.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==S.NONE)return!1;return!0},Ue.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===S.NONE&&(this.location[e]=t)},Ue.prototype.isLine=function(){return 1===this.location.length},Ue.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[be.ON]=this.location[be.ON],e[be.LEFT]=S.NONE,e[be.RIGHT]=S.NONE,this.location=e}for(var A=0;A<this.location.length;A++)this.location[A]===S.NONE&&A<t.location.length&&(this.location[A]=t.location[A])},Ue.prototype.getLocations=function(){return this.location},Ue.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[be.LEFT];this.location[be.LEFT]=this.location[be.RIGHT],this.location[be.RIGHT]=t},Ue.prototype.toString=function(){var t=new N;return this.location.length>1&&t.append(S.toLocationSymbol(this.location[be.LEFT])),t.append(S.toLocationSymbol(this.location[be.ON])),this.location.length>1&&t.append(S.toLocationSymbol(this.location[be.RIGHT])),t.toString()},Ue.prototype.setLocations=function(t,e,A){this.location[be.ON]=t,this.location[be.LEFT]=e,this.location[be.RIGHT]=A},Ue.prototype.get=function(t){return t<this.location.length?this.location[t]:S.NONE},Ue.prototype.isArea=function(){return this.location.length>1},Ue.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===S.NONE)return!0;return!1},Ue.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(be.ON,t)}else if(2===arguments.length){var e=arguments[0],A=arguments[1];this.location[e]=A}},Ue.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(S.NONE)},Ue.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Ue.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue};var Ge=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Ue(e),this.elt[1]=new Ue(e)}else if(arguments[0]instanceof t){var A=arguments[0];this.elt[0]=new Ue(A.elt[0]),this.elt[1]=new Ue(A.elt[1])}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.elt[0]=new Ue(S.NONE),this.elt[1]=new Ue(S.NONE),this.elt[n].setLocation(r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new Ue(i,o,a),this.elt[1]=new Ue(i,o,a)}else if(4===arguments.length){var s=arguments[0],g=arguments[1],c=arguments[2],I=arguments[3];this.elt[0]=new Ue(S.NONE,S.NONE,S.NONE),this.elt[1]=new Ue(S.NONE,S.NONE,S.NONE),this.elt[s].setLocations(g,c,I)}};Ge.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Ge.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Ge.prototype.isNull=function(t){return this.elt[t].isNull()},Ge.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],A=arguments[1];this.elt[e].setAllLocationsIfNull(A)}},Ge.prototype.isLine=function(t){return this.elt[t].isLine()},Ge.prototype.merge=function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Ue(t.elt[e]):this.elt[e].merge(t.elt[e])},Ge.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Ge.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(be.ON)}if(2===arguments.length){var e=arguments[0],A=arguments[1];return this.elt[e].get(A)}},Ge.prototype.toString=function(){var t=new N;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Ge.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Ge.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Ge.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(be.ON,e)}else if(3===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2];this.elt[A].setLocation(n,r)}},Ge.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Ge.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Ge.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Ue(this.elt[t].location[0]))},Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge},Ge.toLineLabel=function(t){for(var e=new Ge(S.NONE),A=0;A<2;A++)e.setLocation(A,t.getLocation(A));return e};var Ne=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new vt,this._pts=new vt,this._label=new Ge(S.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new vt,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Ne.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=at.isCCW(this._ring.getCoordinates())},Ne.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},Ne.prototype.computePoints=function(t){this._startDe=t;var e=t,A=!0;do{if(null===e)throw new Se("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new Se("Directed Edge visited twice during ring-building at "+e.getCoordinate());this._edges.add(e);var n=e.getLabel();et.isTrue(n.isArea()),this.mergeLabel(n),this.addPoints(e.getEdge(),e.isForward(),A),A=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},Ne.prototype.getLinearRing=function(){return this._ring},Ne.prototype.getCoordinate=function(t){return this._pts.get(t)},Ne.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Ne.prototype.addPoints=function(t,e,A){var n=t.getCoordinates();if(e){var r=1;A&&(r=0);for(var i=r;i<n.length;i++)this._pts.add(n[i])}else{var o=n.length-2;A&&(o=n.length-1);for(var a=o;a>=0;a--)this._pts.add(n[a])}},Ne.prototype.isHole=function(){return this._isHole},Ne.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Ne.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var A=this._holes.iterator();A.hasNext();)if(A.next().containsPoint(t))return!1;return!0},Ne.prototype.addHole=function(t){this._holes.add(t)},Ne.prototype.isShell=function(){return null===this._shell},Ne.prototype.getLabel=function(){return this._label},Ne.prototype.getEdges=function(){return this._edges},Ne.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Ne.prototype.getShell=function(){return this._shell},Ne.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],A=arguments[1],n=e.getLocation(A,be.RIGHT);if(n===S.NONE)return null;if(this._label.getLocation(A)===S.NONE)return this._label.setLocation(A,n),null}},Ne.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Ne.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),A=0;A<this._holes.size();A++)e[A]=this._holes.get(A).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne};var ke=function(t){function e(){var e=arguments[0],A=arguments[1];t.call(this,e,A)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ne),xe=function(t){function e(){var e=arguments[0],A=arguments[1];t.call(this,e,A)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new vt,e=this._startDe;do{if(null===e.getMinEdgeRing()){var A=new ke(e,this._geometryFactory);t.add(A)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ne),Oe=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 t=arguments[0];this._label=t}};Oe.prototype.setVisited=function(t){this._isVisited=t},Oe.prototype.setInResult=function(t){this._isInResult=t},Oe.prototype.isCovered=function(){return this._isCovered},Oe.prototype.isCoveredSet=function(){return this._isCoveredSet},Oe.prototype.setLabel=function(t){this._label=t},Oe.prototype.getLabel=function(){return this._label},Oe.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Oe.prototype.updateIM=function(t){et.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Oe.prototype.isInResult=function(){return this._isInResult},Oe.prototype.isVisited=function(){return this._isVisited},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe};var Me=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],A=arguments[1];this._coord=e,this._edges=A,this._label=new Ge(0,S.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var A=S.NONE;if(A=this._label.getLocation(e),!t.isNull(e)){var n=t.getLocation(e);A!==S.BOUNDARY&&(A=n)}return A},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],A=arguments[1];null===this._label?this._label=new Ge(e,A):this._label.setLocation(e,A)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Ge)for(var A=arguments[0],n=0;n<2;n++){var r=this.computeMergedLocation(A,n);this._label.getLocation(n)===S.NONE&&this._label.setLocation(n,r)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=S.NONE;null!==this._label&&(e=this._label.getLocation(t));var A=null;switch(e){case S.BOUNDARY:A=S.INTERIOR;break;case S.INTERIOR:default:A=S.BOUNDARY}this._label.setLocation(t,A)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Oe),Le=function(){this.nodeMap=new I,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Le.prototype.find=function(t){return this.nodeMap.get(t)},Le.prototype.addNode=function(){if(arguments[0]instanceof m){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Me){var A=arguments[0],n=this.nodeMap.get(A.getCoordinate());return null===n?(this.nodeMap.put(A.getCoordinate(),A),A):(n.mergeLabel(A),n)}},Le.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Le.prototype.iterator=function(){return this.nodeMap.values().iterator()},Le.prototype.values=function(){return this.nodeMap.values()},Le.prototype.getBoundaryNodes=function(t){for(var e=new vt,A=this.iterator();A.hasNext();){var n=A.next();n.getLabel().getLocation(t)===S.BOUNDARY&&e.add(n)}return e},Le.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Le.prototype.interfaces_=function(){return[]},Le.prototype.getClass=function(){return Le};var _e=function(){},Je={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};_e.prototype.interfaces_=function(){return[]},_e.prototype.getClass=function(){return _e},_e.isNorthern=function(t){return t===_e.NE||t===_e.NW},_e.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},_e.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var A=t<e?t:e;return 0===A&&3===(t>e?t:e)?3:A},_e.isInHalfPlane=function(t,e){return e===_e.SE?t===_e.SE||t===_e.SW:t===e||t===e+1},_e.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new d("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?_e.NE:_e.SE:e>=0?_e.NW:_e.SW}if(arguments[0]instanceof m&&arguments[1]instanceof m){var A=arguments[0],n=arguments[1];if(n.x===A.x&&n.y===A.y)throw new d("Cannot compute the quadrant for two identical points "+A);return n.x>=A.x?n.y>=A.y?_e.NE:_e.SE:n.y>=A.y?_e.NW:_e.SW}},Je.NE.get=function(){return 0},Je.NW.get=function(){return 1},Je.SW.get=function(){return 2},Je.SE.get=function(){return 3},Object.defineProperties(_e,Je);var Te=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 t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],A=arguments[1],n=arguments[2];this._edge=e,this.init(A,n),this._label=null}else if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3];this._edge=r,this.init(i,o),this._label=a}};Te.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:at.computeOrientation(t._p0,t._p1,this._p1)},Te.prototype.getDy=function(){return this._dy},Te.prototype.getCoordinate=function(){return this._p0},Te.prototype.setNode=function(t){this._node=t},Te.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),A=this.getClass().getName(),n=A.lastIndexOf("."),r=A.substring(n+1);t.print("  "+r+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+"   "+this._label)},Te.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Te.prototype.getDirectedCoordinate=function(){return this._p1},Te.prototype.getDx=function(){return this._dx},Te.prototype.getLabel=function(){return this._label},Te.prototype.getEdge=function(){return this._edge},Te.prototype.getQuadrant=function(){return this._quadrant},Te.prototype.getNode=function(){return this._node},Te.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),A=e.lastIndexOf(".");return"  "+e.substring(A+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+"   "+this._label},Te.prototype.computeLabel=function(t){},Te.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=_e.quadrant(this._dx,this._dy),et.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},Te.prototype.interfaces_=function(){return[p]},Te.prototype.getClass=function(){return Te};var je=function(t){function e(){var e=arguments[0],A=arguments[1];if(t.call(this,e),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=A,A)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var n=e.getNumPoints()-1;this.init(e.getCoordinate(n),e.getCoordinate(n-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Ge(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new Se("assigned depths do not match",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,be.LEFT)===S.INTERIOR&&this._label.getLocation(e,be.RIGHT)===S.INTERIOR||(t=!1);return t},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(" "+this._depth[be.LEFT]+"/"+this._depth[be.RIGHT]),e.print(" ("+this.getDepthDelta()+")"),this._isInResult&&e.print(" inResult")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,S.EXTERIOR),A=!this._label.isArea(1)||this._label.allPositionsEqual(1,S.EXTERIOR);return t&&e&&A},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var A=this.getEdge().getDepthDelta();this._isForward||(A=-A);var n=1;t===be.LEFT&&(n=-1);var r=be.opposite(t),i=e+A*n;this.setDepth(t,e),this.setDepth(r,i)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===S.EXTERIOR&&e===S.INTERIOR?1:t===S.INTERIOR&&e===S.EXTERIOR?-1:0},e}(Te),He=function(){};He.prototype.createNode=function(t){return new Me(t,null)},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var Ye=function(){if(this._edges=new vt,this._nodes=null,this._edgeEndList=new vt,0===arguments.length)this._nodes=new Le(new He);else if(1===arguments.length){var t=arguments[0];this._nodes=new Le(t)}};Ye.prototype.printEdges=function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var A=this._edges.get(e);A.print(t),A.eiList.print(t)}},Ye.prototype.find=function(t){return this._nodes.find(t)},Ye.prototype.addNode=function(){if(arguments[0]instanceof Me){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof m){var e=arguments[0];return this._nodes.addNode(e)}},Ye.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ye.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()},Ye.prototype.debugPrintln=function(t){Y.out.println(t)},Ye.prototype.isBoundaryNode=function(t,e){var A=this._nodes.find(e);if(null===A)return!1;var n=A.getLabel();return null!==n&&n.getLocation(t)===S.BOUNDARY},Ye.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkAllDirectedEdges()},Ye.prototype.matchInSameDirection=function(t,e,A,n){return!!t.equals(A)&&at.computeOrientation(t,e,n)===at.COLLINEAR&&_e.quadrant(t,e)===_e.quadrant(A,n)},Ye.prototype.getEdgeEnds=function(){return this._edgeEndList},Ye.prototype.debugPrint=function(t){Y.out.print(t)},Ye.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ye.prototype.findEdgeInSameDirection=function(t,e){for(var A=0;A<this._edges.size();A++){var n=this._edges.get(A),r=n.getCoordinates();if(this.matchInSameDirection(t,e,r[0],r[1]))return n;if(this.matchInSameDirection(t,e,r[r.length-1],r[r.length-2]))return n}return null},Ye.prototype.insertEdge=function(t){this._edges.add(t)},Ye.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var A=e.next();if(A.getEdge()===t)return A}return null},Ye.prototype.addEdges=function(t){for(var e=t.iterator();e.hasNext();){var A=e.next();this._edges.add(A);var n=new je(A,!0),r=new je(A,!1);n.setSym(r),r.setSym(n),this.add(n),this.add(r)}},Ye.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Ye.prototype.getNodes=function(){return this._nodes.values()},Ye.prototype.findEdge=function(t,e){for(var A=0;A<this._edges.size();A++){var n=this._edges.get(A),r=n.getCoordinates();if(t.equals(r[0])&&e.equals(r[1]))return n}return null},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},Ye.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()};var Ve=function(){this._geometryFactory=null,this._shellList=new vt;var t=arguments[0];this._geometryFactory=t};Ve.prototype.sortShellsAndHoles=function(t,e,A){for(var n=t.iterator();n.hasNext();){var r=n.next();r.isHole()?A.add(r):e.add(r)}},Ve.prototype.computePolygons=function(t){for(var e=new vt,A=t.iterator();A.hasNext();){var n=A.next().toPolygon(this._geometryFactory);e.add(n)}return e},Ve.prototype.placeFreeHoles=function(t,e){for(var A=e.iterator();A.hasNext();){var n=A.next();if(null===n.getShell()){var r=this.findEdgeRingContaining(n,t);if(null===r)throw new Se("unable to assign hole to a shell",n.getCoordinate(0));n.setShell(r)}}},Ve.prototype.buildMinimalEdgeRings=function(t,e,A){for(var n=new vt,r=t.iterator();r.hasNext();){var i=r.next();if(i.getMaxNodeDegree()>2){i.linkDirectedEdgesForMinimalEdgeRings();var o=i.buildMinimalRings(),a=this.findShell(o);null!==a?(this.placePolygonHoles(a,o),e.add(a)):A.addAll(o)}else n.add(i)}return n},Ve.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},Ve.prototype.buildMaximalEdgeRings=function(t){for(var e=new vt,A=t.iterator();A.hasNext();){var n=A.next();if(n.isInResult()&&n.getLabel().isArea()&&null===n.getEdgeRing()){var r=new xe(n,this._geometryFactory);e.add(r),r.setInResult()}}return e},Ve.prototype.placePolygonHoles=function(t,e){for(var A=e.iterator();A.hasNext();){var n=A.next();n.isHole()&&n.setShell(t)}},Ve.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Ve.prototype.findEdgeRingContaining=function(t,e){for(var A=t.getLinearRing(),n=A.getEnvelopeInternal(),r=A.getCoordinateN(0),i=null,o=null,a=e.iterator();a.hasNext();){var s=a.next(),g=s.getLinearRing(),c=g.getEnvelopeInternal();null!==i&&(o=i.getLinearRing().getEnvelopeInternal());var I=!1;c.contains(n)&&at.isPointInRing(r,g.getCoordinates())&&(I=!0),I&&(null===i||o.contains(c))&&(i=s)}return i},Ve.prototype.findShell=function(t){for(var e=0,A=null,n=t.iterator();n.hasNext();){var r=n.next();r.isHole()||(A=r,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),A},Ve.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],A=arguments[1];Ye.linkResultDirectedEdges(A);var n=this.buildMaximalEdgeRings(e),r=new vt,i=this.buildMinimalEdgeRings(n,this._shellList,r);this.sortShellsAndHoles(i,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve};var Ze=function(){};Ze.prototype.getBounds=function(){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var We=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};We.prototype.getItem=function(){return this._item},We.prototype.getBounds=function(){return this._bounds},We.prototype.interfaces_=function(){return[Ze,e]},We.prototype.getClass=function(){return We};var Ke=function(){this._size=null,this._items=null,this._size=0,this._items=new vt,this._items.add(null)};Ke.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Ke.prototype.size=function(){return this._size},Ke.prototype.reorder=function(t){for(var e=null,A=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(A)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,A)},Ke.prototype.clear=function(){this._size=0,this._items.clear()},Ke.prototype.isEmpty=function(){return 0===this._size},Ke.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var Pe=function(){};Pe.prototype.visitItem=function(t){},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe};var qe=function(){};qe.prototype.insert=function(t,e){},qe.prototype.remove=function(t,e){},qe.prototype.query=function(){},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe};var Xe=function(){if(this._childBoundables=new vt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},ze={serialVersionUID:{configurable:!0}};Xe.prototype.getLevel=function(){return this._level},Xe.prototype.size=function(){return this._childBoundables.size()},Xe.prototype.getChildBoundables=function(){return this._childBoundables},Xe.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Xe.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Xe.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Xe.prototype.interfaces_=function(){return[Ze,e]},Xe.prototype.getClass=function(){return Xe},ze.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Xe,ze);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var A=t.toArray();e?Mt.sort(A,e):Mt.sort(A);for(var n=t.iterator(),r=0,i=A.length;r<i;r++)n.next(),n.set(A[r])},$e.singletonList=function(t){var e=new vt;return e.add(t),e};var tA=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],A=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=A,this._distance=this.distance()};tA.prototype.expandToQueue=function(t,e){var A=tA.isComposite(this._boundable1),n=tA.isComposite(this._boundable2);if(A&&n)return tA.area(this._boundable1)>tA.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(A)return this.expand(this._boundable1,this._boundable2,t,e),null;if(n)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new d("neither boundable is composite")},tA.prototype.isLeaves=function(){return!(tA.isComposite(this._boundable1)||tA.isComposite(this._boundable2))},tA.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},tA.prototype.expand=function(t,e,A,n){for(var r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next(),o=new tA(i,e,this._itemDistance);o.getDistance()<n&&A.add(o)}},tA.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},tA.prototype.getDistance=function(){return this._distance},tA.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},tA.prototype.interfaces_=function(){return[p]},tA.prototype.getClass=function(){return tA},tA.area=function(t){return t.getBounds().getArea()},tA.isComposite=function(t){return t instanceof Xe};var eA=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new vt,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var A=arguments[0];et.isTrue(A>1,"Node capacity must be greater than 1"),this._nodeCapacity=A}},AA={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};eA.prototype.getNodeCapacity=function(){return this._nodeCapacity},eA.prototype.lastNode=function(t){return t.get(t.size()-1)},eA.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var A=e.next();A instanceof Xe?t+=this.size(A):A instanceof We&&(t+=1)}return t}},eA.prototype.removeItem=function(t,e){for(var A=null,n=t.getChildBoundables().iterator();n.hasNext();){var r=n.next();r instanceof We&&r.getItem()===e&&(A=r)}return null!==A&&(t.getChildBoundables().remove(A),!0)},eA.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new vt:t}if(1===arguments.length){for(var e=arguments[0],A=new vt,n=e.getChildBoundables().iterator();n.hasNext();){var r=n.next();if(r instanceof Xe){var i=this.itemsTree(r);null!==i&&A.add(i)}else r instanceof We?A.add(r.getItem()):et.shouldNeverReachHere()}return A.size()<=0?null:A}},eA.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new We(t,e))},eA.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new vt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2];if(et.isTrue(A>-2),n.getLevel()===A)return r.add(n),null;for(var i=n.getChildBoundables().iterator();i.hasNext();){var o=i.next();o instanceof Xe?this.boundablesAtLevel(A,o,r):(et.isTrue(o instanceof We),-1===A&&r.add(o))}return null}},eA.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new vt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var A=arguments[0],n=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),A)&&this.query(A,this._root,n)}else if(3===arguments.length)if(R(arguments[2],Pe)&&arguments[0]instanceof Object&&arguments[1]instanceof Xe)for(var r=arguments[0],i=arguments[1],o=arguments[2],a=i.getChildBoundables(),s=0;s<a.size();s++){var g=a.get(s);this.getIntersectsOp().intersects(g.getBounds(),r)&&(g instanceof Xe?this.query(r,g,o):g instanceof We?o.visitItem(g.getItem()):et.shouldNeverReachHere())}else if(R(arguments[2],yt)&&arguments[0]instanceof Object&&arguments[1]instanceof Xe)for(var c=arguments[0],I=arguments[1],u=arguments[2],l=I.getChildBoundables(),C=0;C<l.size();C++){var h=l.get(C);this.getIntersectsOp().intersects(h.getBounds(),c)&&(h instanceof Xe?this.query(c,h,u):h instanceof We?u.add(h.getItem()):et.shouldNeverReachHere())}},eA.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},eA.prototype.getRoot=function(){return this.build(),this._root},eA.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2],i=this.removeItem(n,r);if(i)return!0;for(var o=null,a=n.getChildBoundables().iterator();a.hasNext();){var s=a.next();if(this.getIntersectsOp().intersects(s.getBounds(),A)&&s instanceof Xe&&(i=this.remove(A,s,r))){o=s;break}}return null!==o&&o.getChildBoundables().isEmpty()&&n.getChildBoundables().remove(o),i}},eA.prototype.createHigherLevels=function(t,e){et.isTrue(!t.isEmpty());var A=this.createParentBoundables(t,e+1);return 1===A.size()?A.get(0):this.createHigherLevels(A,e+1)},eA.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var A=e.next();if(A instanceof Xe){var n=this.depth(A);n>t&&(t=n)}}return t+1}},eA.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var A=new vt;A.add(this.createNode(e));var n=new vt(t);$e.sort(n,this.getComparator());for(var r=n.iterator();r.hasNext();){var i=r.next();this.lastNode(A).getChildBoundables().size()===this.getNodeCapacity()&&A.add(this.createNode(e)),this.lastNode(A).addChildBoundable(i)}return A},eA.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},eA.prototype.interfaces_=function(){return[e]},eA.prototype.getClass=function(){return eA},eA.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},AA.IntersectsOp.get=function(){return nA},AA.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},AA.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(eA,AA);var nA=function(){},rA=function(){};rA.prototype.distance=function(t,e){},rA.prototype.interfaces_=function(){return[]},rA.prototype.getClass=function(){return rA};var iA=function(t){function A(e){e=e||A.DEFAULT_NODE_CAPACITY,t.call(this,e)}t&&(A.__proto__=t),(A.prototype=Object.create(t&&t.prototype)).constructor=A;var n={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return A.prototype.createParentBoundablesFromVerticalSlices=function(t,e){et.isTrue(t.length>0);for(var A=new vt,n=0;n<t.length;n++)A.addAll(this.createParentBoundablesFromVerticalSlice(t[n],e));return A},A.prototype.createNode=function(t){return new oA(t)},A.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},A.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],A=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,A)},A.prototype.getIntersectsOp=function(){return A.intersectsOp},A.prototype.verticalSlices=function(t,e){for(var A=Math.trunc(Math.ceil(t.size()/e)),n=new Array(e).fill(null),r=t.iterator(),i=0;i<e;i++){n[i]=new vt;for(var o=0;r.hasNext()&&o<A;){var a=r.next();n[i].add(a),o++}}return n},A.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var A=arguments[0],n=arguments[1];t.prototype.query.call(this,A,n)}else if(3===arguments.length)if(R(arguments[2],Pe)&&arguments[0]instanceof Object&&arguments[1]instanceof Xe){var r=arguments[0],i=arguments[1],o=arguments[2];t.prototype.query.call(this,r,i,o)}else if(R(arguments[2],yt)&&arguments[0]instanceof Object&&arguments[1]instanceof Xe){var a=arguments[0],s=arguments[1],g=arguments[2];t.prototype.query.call(this,a,s,g)}},A.prototype.getComparator=function(){return A.yComparator},A.prototype.createParentBoundablesFromVerticalSlice=function(e,A){return t.prototype.createParentBoundables.call(this,e,A)},A.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],A=arguments[1];return t.prototype.remove.call(this,e,A)}return t.prototype.remove.apply(this,arguments)},A.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},A.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),r=new vt(t);$e.sort(r,A.xComparator);var i=this.verticalSlices(r,Math.trunc(Math.ceil(Math.sqrt(n))));return this.createParentBoundablesFromVerticalSlices(i,e)},A.prototype.nearestNeighbour=function(){if(1===arguments.length){if(R(arguments[0],rA)){var t=arguments[0],e=new tA(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof tA){var n=arguments[0];return this.nearestNeighbour(n,Q.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof A&&R(arguments[1],rA)){var r=arguments[0],i=arguments[1],o=new tA(this.getRoot(),r.getRoot(),i);return this.nearestNeighbour(o)}if(arguments[0]instanceof tA&&"number"==typeof arguments[1]){var a=arguments[0],s=arguments[1],g=null,c=new Ke;for(c.add(a);!c.isEmpty()&&s>0;){var I=c.poll(),u=I.getDistance();if(u>=s)break;I.isLeaves()?(s=u,g=I):I.expandToQueue(c,s)}return[g.getBoundable(0).getItem(),g.getBoundable(1).getItem()]}}else if(3===arguments.length){var l=arguments[0],C=arguments[1],h=arguments[2],B=new We(l,C),f=new tA(this.getRoot(),B,h);return this.nearestNeighbour(f)[0]}},A.prototype.interfaces_=function(){return[qe,e]},A.prototype.getClass=function(){return A},A.centreX=function(t){return A.avg(t.getMinX(),t.getMaxX())},A.avg=function(t,e){return(t+e)/2},A.centreY=function(t){return A.avg(t.getMinY(),t.getMaxY())},n.STRtreeNode.get=function(){return oA},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[v]},compare:function(e,n){return t.compareDoubles(A.centreX(e.getBounds()),A.centreX(n.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[v]},compare:function(e,n){return t.compareDoubles(A.centreY(e.getBounds()),A.centreY(n.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(A,n),A}(eA),oA=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var A=e.next();null===t?t=new Z(A.getBounds()):t.expandToInclude(A.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xe),aA=function(){};aA.prototype.interfaces_=function(){return[]},aA.prototype.getClass=function(){return aA},aA.relativeSign=function(t,e){return t<e?-1:t>e?1:0},aA.compare=function(t,e,A){if(e.equals2D(A))return 0;var n=aA.relativeSign(e.x,A.x),r=aA.relativeSign(e.y,A.y);switch(t){case 0:return aA.compareValue(n,r);case 1:return aA.compareValue(r,n);case 2:return aA.compareValue(r,-n);case 3:return aA.compareValue(-n,r);case 4:return aA.compareValue(-n,-r);case 5:return aA.compareValue(-r,-n);case 6:return aA.compareValue(-r,n);case 7:return aA.compareValue(n,-r)}return et.shouldNeverReachHere("invalid octant value"),0},aA.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var sA=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],A=arguments[2],n=arguments[3];this._segString=t,this.coord=new m(e),this.segmentIndex=A,this._segmentOctant=n,this._isInterior=!e.equals2D(t.getCoordinate(A))};sA.prototype.getCoordinate=function(){return this.coord},sA.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},sA.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:aA.compare(this._segmentOctant,this.coord,e.coord)},sA.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},sA.prototype.isInterior=function(){return this._isInterior},sA.prototype.interfaces_=function(){return[p]},sA.prototype.getClass=function(){return sA};var gA=function(){this._nodeMap=new I,this._edge=null;var t=arguments[0];this._edge=t};gA.prototype.getSplitCoordinates=function(){var t=new bt;this.addEndpoints();for(var e=this.iterator(),A=e.next();e.hasNext();){var n=e.next();this.addEdgeCoordinates(A,n,t),A=n}return t.toCoordinateArray()},gA.prototype.addCollapsedNodes=function(){var t=new vt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var A=e.next().intValue();this.add(this._edge.getCoordinate(A),A)}},gA.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},gA.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var A=this._edge.getCoordinate(e),n=this._edge.getCoordinate(e+2);A.equals2D(n)&&t.add(new k(e+1))}},gA.prototype.addEdgeCoordinates=function(t,e,A){var n=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(n);A.add(new m(t.coord),!1);for(var i=t.segmentIndex+1;i<=e.segmentIndex;i++)A.add(this._edge.getCoordinate(i));r&&A.add(new m(e.coord))},gA.prototype.iterator=function(){return this._nodeMap.values().iterator()},gA.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),A=e.next();e.hasNext();){var n=e.next(),r=this.createSplitEdge(A,n);t.add(r),A=n}},gA.prototype.findCollapseIndex=function(t,e,A){if(!t.coord.equals2D(e.coord))return!1;var n=e.segmentIndex-t.segmentIndex;return e.isInterior()||n--,1===n&&(A[0]=t.segmentIndex+1,!0)},gA.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),A=this.iterator(),n=A.next();A.hasNext();){var r=A.next();this.findCollapseIndex(n,r,e)&&t.add(new k(e[0])),n=r}},gA.prototype.getEdge=function(){return this._edge},gA.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},gA.prototype.createSplitEdge=function(t,e){var A=e.segmentIndex-t.segmentIndex+2,n=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(n);r||A--;var i=new Array(A).fill(null),o=0;i[o++]=new m(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)i[o++]=this._edge.getCoordinate(a);return r&&(i[o]=new m(e.coord)),new lA(i,this._edge.getData())},gA.prototype.add=function(t,e){var A=new sA(this._edge,t,e,this._edge.getSegmentOctant(e)),n=this._nodeMap.get(A);return null!==n?(et.isTrue(n.coord.equals2D(t),"Found equal nodes with different coordinates"),n):(this._nodeMap.put(A,A),A)},gA.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),A=t.get(0).getCoordinate(0);if(!A.equals2D(e[0]))throw new $("bad split edge start point at "+A);var n=t.get(t.size()-1).getCoordinates(),r=n[n.length-1];if(!r.equals2D(e[e.length-1]))throw new $("bad split edge end point at "+r)},gA.prototype.interfaces_=function(){return[]},gA.prototype.getClass=function(){return gA};var cA=function(){};cA.prototype.interfaces_=function(){return[]},cA.prototype.getClass=function(){return cA},cA.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new d("Cannot compute the octant for point ( "+t+", "+e+" )");var A=Math.abs(t),n=Math.abs(e);return t>=0?e>=0?A>=n?0:1:A>=n?7:6:e>=0?A>=n?3:2:A>=n?4:5}if(arguments[0]instanceof m&&arguments[1]instanceof m){var r=arguments[0],i=arguments[1],o=i.x-r.x,a=i.y-r.y;if(0===o&&0===a)throw new d("Cannot compute the octant for two identical points "+r);return cA.octant(o,a)}};var IA=function(){};IA.prototype.getCoordinates=function(){},IA.prototype.size=function(){},IA.prototype.getCoordinate=function(t){},IA.prototype.isClosed=function(){},IA.prototype.setData=function(t){},IA.prototype.getData=function(){},IA.prototype.interfaces_=function(){return[]},IA.prototype.getClass=function(){return IA};var uA=function(){};uA.prototype.addIntersection=function(t,e){},uA.prototype.interfaces_=function(){return[IA]},uA.prototype.getClass=function(){return uA};var lA=function(){this._nodeList=new gA(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};lA.prototype.getCoordinates=function(){return this._pts},lA.prototype.size=function(){return this._pts.length},lA.prototype.getCoordinate=function(t){return this._pts[t]},lA.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},lA.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},lA.prototype.setData=function(t){this._data=t},lA.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:cA.octant(t,e)},lA.prototype.getData=function(){return this._data},lA.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[3],i=new m(A.getIntersection(r));this.addIntersection(i,n)}},lA.prototype.toString=function(){return z.toLineString(new se(this._pts))},lA.prototype.getNodeList=function(){return this._nodeList},lA.prototype.addIntersectionNode=function(t,e){var A=e,n=A+1;if(n<this._pts.length){var r=this._pts[n];t.equals2D(r)&&(A=n)}return this._nodeList.add(t,A)},lA.prototype.addIntersections=function(t,e,A){for(var n=0;n<t.getIntersectionNum();n++)this.addIntersection(t,e,A,n)},lA.prototype.interfaces_=function(){return[uA]},lA.prototype.getClass=function(){return lA},lA.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new vt;return lA.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var A=arguments[0],n=arguments[1],r=A.iterator();r.hasNext();)r.next().getNodeList().addSplitEdges(n)};var CA=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new m,this.p1=new m;else if(1===arguments.length){var t=arguments[0];this.p0=new m(t.p0),this.p1=new m(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],A=arguments[1],n=arguments[2],r=arguments[3];this.p0=new m(e,A),this.p1=new m(n,r)}},hA={serialVersionUID:{configurable:!0}};CA.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},CA.prototype.orientationIndex=function(){if(arguments[0]instanceof CA){var t=arguments[0],e=at.orientationIndex(this.p0,this.p1,t.p0),A=at.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&A>=0||e<=0&&A<=0?Math.max(e,A):0}if(arguments[0]instanceof m){var n=arguments[0];return at.orientationIndex(this.p0,this.p1,n)}},CA.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},CA.prototype.isVertical=function(){return this.p0.x===this.p1.x},CA.prototype.equals=function(t){if(!(t instanceof CA))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},CA.prototype.intersection=function(t){var e=new rt;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},CA.prototype.project=function(){if(arguments[0]instanceof m){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new m(t);var e=this.projectionFactor(t),A=new m;return A.x=this.p0.x+e*(this.p1.x-this.p0.x),A.y=this.p0.y+e*(this.p1.y-this.p0.y),A}if(arguments[0]instanceof CA){var n=arguments[0],r=this.projectionFactor(n.p0),i=this.projectionFactor(n.p1);if(r>=1&&i>=1)return null;if(r<=0&&i<=0)return null;var o=this.project(n.p0);r<0&&(o=this.p0),r>1&&(o=this.p1);var a=this.project(n.p1);return i<0&&(a=this.p0),i>1&&(a=this.p1),new CA(o,a)}},CA.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},CA.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},CA.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},CA.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},CA.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},CA.prototype.midPoint=function(){return CA.midPoint(this.p0,this.p1)},CA.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,A=this.p1.y-this.p0.y,n=e*e+A*A;return n<=0?Q.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*A)/n},CA.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var A=new Array(2).fill(null),n=Q.MAX_VALUE,r=null,i=this.closestPoint(t.p0);n=i.distance(t.p0),A[0]=i,A[1]=t.p0;var o=this.closestPoint(t.p1);(r=o.distance(t.p1))<n&&(n=r,A[0]=o,A[1]=t.p1);var a=t.closestPoint(this.p0);(r=a.distance(this.p0))<n&&(n=r,A[0]=this.p0,A[1]=a);var s=t.closestPoint(this.p1);return(r=s.distance(this.p1))<n&&(n=r,A[0]=this.p1,A[1]=s),A},CA.prototype.closestPoint=function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},CA.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},CA.prototype.getLength=function(){return this.p0.distance(this.p1)},CA.prototype.compareTo=function(t){var e=t,A=this.p0.compareTo(e.p0);return 0!==A?A:this.p1.compareTo(e.p1)},CA.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},CA.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},CA.prototype.lineIntersection=function(t){try{return V.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof H))throw t}return null},CA.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},CA.prototype.pointAlongOffset=function(t,e){var A=this.p0.x+t*(this.p1.x-this.p0.x),n=this.p0.y+t*(this.p1.y-this.p0.y),r=this.p1.x-this.p0.x,i=this.p1.y-this.p0.y,o=Math.sqrt(r*r+i*i),a=0,s=0;if(0!==e){if(o<=0)throw new Error("Cannot compute offset from zero-length line segment");a=e*r/o,s=e*i/o}return new m(A-s,n+a)},CA.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],A=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=A.x,this.p1.y=A.y}},CA.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||Q.isNaN(e))&&(e=1),e},CA.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},CA.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},CA.prototype.distance=function(){if(arguments[0]instanceof CA){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof m){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},CA.prototype.pointAlong=function(t){var e=new m;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},CA.prototype.hashCode=function(){var t=Q.doubleToLongBits(this.p0.x);t^=31*Q.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),A=Q.doubleToLongBits(this.p1.x);return A^=31*Q.doubleToLongBits(this.p1.y),e^Math.trunc(A)^Math.trunc(A>>32)},CA.prototype.interfaces_=function(){return[p,e]},CA.prototype.getClass=function(){return CA},CA.midPoint=function(t,e){return new m((t.x+e.x)/2,(t.y+e.y)/2)},hA.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(CA,hA);var BA=function(){this.tempEnv1=new Z,this.tempEnv2=new Z,this._overlapSeg1=new CA,this._overlapSeg2=new CA};BA.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],A=arguments[2],n=arguments[3];t.getLineSegment(e,this._overlapSeg1),A.getLineSegment(n,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},BA.prototype.interfaces_=function(){return[]},BA.prototype.getClass=function(){return BA};var fA=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],A=arguments[2],n=arguments[3];this._pts=t,this._start=e,this._end=A,this._context=n};fA.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},fA.prototype.computeSelect=function(t,e,A,n){var r=this._pts[e],i=this._pts[A];if(n.tempEnv1.init(r,i),A-e==1)return n.select(this,e),null;if(!t.intersects(n.tempEnv1))return null;var o=Math.trunc((e+A)/2);e<o&&this.computeSelect(t,e,o,n),o<A&&this.computeSelect(t,o,A,n)},fA.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,A=this._start;A<=this._end;A++)t[e++]=this._pts[A];return t},fA.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},fA.prototype.setId=function(t){this._id=t},fA.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},fA.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new Z(t,e)}return this._env},fA.prototype.getEndIndex=function(){return this._end},fA.prototype.getStartIndex=function(){return this._start},fA.prototype.getContext=function(){return this._context},fA.prototype.getId=function(){return this._id},fA.prototype.computeOverlapsInternal=function(t,e,A,n,r,i){var o=this._pts[t],a=this._pts[e],s=A._pts[n],g=A._pts[r];if(e-t==1&&r-n==1)return i.overlap(this,t,A,n),null;if(i.tempEnv1.init(o,a),i.tempEnv2.init(s,g),!i.tempEnv1.intersects(i.tempEnv2))return null;var c=Math.trunc((t+e)/2),I=Math.trunc((n+r)/2);t<c&&(n<I&&this.computeOverlapsInternal(t,c,A,n,I,i),I<r&&this.computeOverlapsInternal(t,c,A,I,r,i)),c<e&&(n<I&&this.computeOverlapsInternal(c,e,A,n,I,i),I<r&&this.computeOverlapsInternal(c,e,A,I,r,i))},fA.prototype.interfaces_=function(){return[]},fA.prototype.getClass=function(){return fA};var dA=function(){};dA.prototype.interfaces_=function(){return[]},dA.prototype.getClass=function(){return dA},dA.getChainStartIndices=function(t){var e=0,A=new vt;A.add(new k(e));do{var n=dA.findChainEnd(t,e);A.add(new k(n)),e=n}while(e<t.length-1);return dA.toIntArray(A)},dA.findChainEnd=function(t,e){for(var A=e;A<t.length-1&&t[A].equals2D(t[A+1]);)A++;if(A>=t.length-1)return t.length-1;for(var n=_e.quadrant(t[A],t[A+1]),r=e+1;r<t.length&&(t[r-1].equals2D(t[r])||_e.quadrant(t[r-1],t[r])===n);)r++;return r-1},dA.getChains=function(){if(1===arguments.length){var t=arguments[0];return dA.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],A=arguments[1],n=new vt,r=dA.getChainStartIndices(e),i=0;i<r.length-1;i++){var o=new fA(e,r[i],r[i+1],A);n.add(o)}return n}},dA.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),A=0;A<e.length;A++)e[A]=t.get(A).intValue();return e};var QA=function(){};QA.prototype.computeNodes=function(t){},QA.prototype.getNodedSubstrings=function(){},QA.prototype.interfaces_=function(){return[]},QA.prototype.getClass=function(){return QA};var EA=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};EA.prototype.setSegmentIntersector=function(t){this._segInt=t},EA.prototype.interfaces_=function(){return[QA]},EA.prototype.getClass=function(){return EA};var pA=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new vt,this._index=new iA,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var A={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return lA.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=dA.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var A=e.next();A.setId(this._idCounter++),this._index.insert(A.getEnvelope(),A),this._monoChains.add(A)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=new yA(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var A=e.next(),n=this._index.query(A.getEnvelope()).iterator();n.hasNext();){var r=n.next();if(r.getId()>A.getId()&&(A.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},A.SegmentOverlapAction.get=function(){return yA},Object.defineProperties(e,A),e}(EA),yA=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],A=arguments[1],n=arguments[2],r=arguments[3],i=e.getContext(),o=n.getContext();this._si.processIntersections(i,A,o,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(BA),vA=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var A=arguments[0],n=arguments[1];this.setQuadrantSegments(A),this.setEndCapStyle(n)}else if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(i),this.setJoinStyle(o),this.setMitreLimit(a)}},mA={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}};vA.prototype.getEndCapStyle=function(){return this._endCapStyle},vA.prototype.isSingleSided=function(){return this._isSingleSided},vA.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=vA.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=vA.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==vA.JOIN_ROUND&&(this._quadrantSegments=vA.DEFAULT_QUADRANT_SEGMENTS)},vA.prototype.getJoinStyle=function(){return this._joinStyle},vA.prototype.setJoinStyle=function(t){this._joinStyle=t},vA.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},vA.prototype.getSimplifyFactor=function(){return this._simplifyFactor},vA.prototype.getQuadrantSegments=function(){return this._quadrantSegments},vA.prototype.setEndCapStyle=function(t){this._endCapStyle=t},vA.prototype.getMitreLimit=function(){return this._mitreLimit},vA.prototype.setMitreLimit=function(t){this._mitreLimit=t},vA.prototype.setSingleSided=function(t){this._isSingleSided=t},vA.prototype.interfaces_=function(){return[]},vA.prototype.getClass=function(){return vA},vA.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},mA.CAP_ROUND.get=function(){return 1},mA.CAP_FLAT.get=function(){return 2},mA.CAP_SQUARE.get=function(){return 3},mA.JOIN_ROUND.get=function(){return 1},mA.JOIN_MITRE.get=function(){return 2},mA.JOIN_BEVEL.get=function(){return 3},mA.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},mA.DEFAULT_MITRE_LIMIT.get=function(){return 5},mA.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(vA,mA);var bA=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},FA={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};bA.prototype.isDeletable=function(t,e,A,n){var r=this._inputLine[t],i=this._inputLine[e],o=this._inputLine[A];return!!this.isConcave(r,i,o)&&!!this.isShallow(r,i,o,n)&&this.isShallowSampled(r,i,t,A,n)},bA.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),A=this.findNextNonDeletedIndex(e),n=!1;A<this._inputLine.length;){var r=!1;this.isDeletable(t,e,A,this._distanceTol)&&(this._isDeleted[e]=bA.DELETE,r=!0,n=!0),t=r?A:e,e=this.findNextNonDeletedIndex(t),A=this.findNextNonDeletedIndex(e)}return n},bA.prototype.isShallowConcavity=function(t,e,A,n){return at.computeOrientation(t,e,A)===this._angleOrientation&&at.distancePointLine(e,t,A)<n},bA.prototype.isShallowSampled=function(t,e,A,n,r){var i=Math.trunc((n-A)/bA.NUM_PTS_TO_CHECK);i<=0&&(i=1);for(var o=A;o<n;o+=i)if(!this.isShallow(t,e,this._inputLine[o],r))return!1;return!0},bA.prototype.isConcave=function(t,e,A){return at.computeOrientation(t,e,A)===this._angleOrientation},bA.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=at.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},bA.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===bA.DELETE;)e++;return e},bA.prototype.isShallow=function(t,e,A,n){return at.distancePointLine(e,t,A)<n},bA.prototype.collapseLine=function(){for(var t=new bt,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==bA.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},bA.prototype.interfaces_=function(){return[]},bA.prototype.getClass=function(){return bA},bA.simplify=function(t,e){return new bA(t).simplify(e)},FA.INIT.get=function(){return 0},FA.DELETE.get=function(){return 1},FA.KEEP.get=function(){return 1},FA.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(bA,FA);var wA=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new vt},SA={COORDINATE_ARRAY_TYPE:{configurable:!0}};wA.prototype.getCoordinates=function(){return this._ptList.toArray(wA.COORDINATE_ARRAY_TYPE)},wA.prototype.setPrecisionModel=function(t){this._precisionModel=t},wA.prototype.addPt=function(t){var e=new m(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},wA.prototype.revere=function(){},wA.prototype.addPts=function(t,e){if(e)for(var A=0;A<t.length;A++)this.addPt(t[A]);else for(var n=t.length-1;n>=0;n--)this.addPt(t[n])},wA.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},wA.prototype.toString=function(){return(new fe).createLineString(this.getCoordinates()).toString()},wA.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new m(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},wA.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},wA.prototype.interfaces_=function(){return[]},wA.prototype.getClass=function(){return wA},SA.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(wA,SA);var DA=function(){},RA={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};DA.prototype.interfaces_=function(){return[]},DA.prototype.getClass=function(){return DA},DA.toDegrees=function(t){return 180*t/Math.PI},DA.normalize=function(t){for(;t>Math.PI;)t-=DA.PI_TIMES_2;for(;t<=-Math.PI;)t+=DA.PI_TIMES_2;return t},DA.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],A=arguments[1],n=A.x-e.x,r=A.y-e.y;return Math.atan2(r,n)}},DA.isAcute=function(t,e,A){var n=t.x-e.x,r=t.y-e.y;return n*(A.x-e.x)+r*(A.y-e.y)>0},DA.isObtuse=function(t,e,A){var n=t.x-e.x,r=t.y-e.y;return n*(A.x-e.x)+r*(A.y-e.y)<0},DA.interiorAngle=function(t,e,A){var n=DA.angle(e,t),r=DA.angle(e,A);return Math.abs(r-n)},DA.normalizePositive=function(t){if(t<0){for(;t<0;)t+=DA.PI_TIMES_2;t>=DA.PI_TIMES_2&&(t=0)}else{for(;t>=DA.PI_TIMES_2;)t-=DA.PI_TIMES_2;t<0&&(t=0)}return t},DA.angleBetween=function(t,e,A){var n=DA.angle(e,t),r=DA.angle(e,A);return DA.diff(n,r)},DA.diff=function(t,e){var A=null;return(A=t<e?e-t:t-e)>Math.PI&&(A=2*Math.PI-A),A},DA.toRadians=function(t){return t*Math.PI/180},DA.getTurn=function(t,e){var A=Math.sin(e-t);return A>0?DA.COUNTERCLOCKWISE:A<0?DA.CLOCKWISE:DA.NONE},DA.angleBetweenOriented=function(t,e,A){var n=DA.angle(e,t),r=DA.angle(e,A)-n;return r<=-Math.PI?r+DA.PI_TIMES_2:r>Math.PI?r-DA.PI_TIMES_2:r},RA.PI_TIMES_2.get=function(){return 2*Math.PI},RA.PI_OVER_2.get=function(){return Math.PI/2},RA.PI_OVER_4.get=function(){return Math.PI/4},RA.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},RA.CLOCKWISE.get=function(){return at.CLOCKWISE},RA.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(DA,RA);var UA=function t(){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 CA,this._seg1=new CA,this._offset0=new CA,this._offset1=new CA,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],A=arguments[1],n=arguments[2];this._precisionModel=e,this._bufParams=A,this._li=new rt,this._filletAngleQuantum=Math.PI/2/A.getQuadrantSegments(),A.getQuadrantSegments()>=8&&A.getJoinStyle()===vA.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},GA={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}};UA.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,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 A=at.computeOrientation(this._s0,this._s1,this._s2),n=A===at.CLOCKWISE&&this._side===be.LEFT||A===at.COUNTERCLOCKWISE&&this._side===be.RIGHT;0===A?this.addCollinear(e):n?this.addOutsideTurn(A,e):this.addInsideTurn(A,e)},UA.prototype.addLineEndCap=function(t,e){var A=new CA(t,e),n=new CA;this.computeOffsetSegment(A,be.LEFT,this._distance,n);var r=new CA;this.computeOffsetSegment(A,be.RIGHT,this._distance,r);var i=e.x-t.x,o=e.y-t.y,a=Math.atan2(o,i);switch(this._bufParams.getEndCapStyle()){case vA.CAP_ROUND:this._segList.addPt(n.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case vA.CAP_FLAT:this._segList.addPt(n.p1),this._segList.addPt(r.p1);break;case vA.CAP_SQUARE:var s=new m;s.x=Math.abs(this._distance)*Math.cos(a),s.y=Math.abs(this._distance)*Math.sin(a);var g=new m(n.p1.x+s.x,n.p1.y+s.y),c=new m(r.p1.x+s.x,r.p1.y+s.y);this._segList.addPt(g),this._segList.addPt(c)}},UA.prototype.getCoordinates=function(){return this._segList.getCoordinates()},UA.prototype.addMitreJoin=function(t,e,A,n){var r=!0,i=null;try{i=V.intersection(e.p0,e.p1,A.p0,A.p1),(n<=0?1:i.distance(t)/Math.abs(n))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof H))throw t;i=new m(0,0),r=!1}r?this._segList.addPt(i):this.addLimitedMitreJoin(e,A,n,this._bufParams.getMitreLimit())},UA.prototype.addFilletCorner=function(t,e,A,n,r){var i=e.x-t.x,o=e.y-t.y,a=Math.atan2(o,i),s=A.x-t.x,g=A.y-t.y,c=Math.atan2(g,s);n===at.CLOCKWISE?a<=c&&(a+=2*Math.PI):a>=c&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,c,n,r),this._segList.addPt(A)},UA.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*UA.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===vA.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===vA.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},UA.prototype.createSquare=function(t){this._segList.addPt(new m(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new m(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new m(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new m(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},UA.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},UA.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},UA.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},UA.prototype.initSideSegments=function(t,e,A){this._s1=t,this._s2=e,this._side=A,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,A,this._distance,this._offset1)},UA.prototype.addLimitedMitreJoin=function(t,e,A,n){var r=this._seg0.p1,i=DA.angle(r,this._seg0.p0),o=DA.angleBetweenOriented(this._seg0.p0,r,this._seg1.p1)/2,a=DA.normalize(i+o),s=DA.normalize(a+Math.PI),g=n*A,c=A-g*Math.abs(Math.sin(o)),I=r.x+g*Math.cos(s),u=r.y+g*Math.sin(s),l=new m(I,u),C=new CA(r,l),h=C.pointAlongOffset(1,c),B=C.pointAlongOffset(1,-c);this._side===be.LEFT?(this._segList.addPt(h),this._segList.addPt(B)):(this._segList.addPt(B),this._segList.addPt(h))},UA.prototype.computeOffsetSegment=function(t,e,A,n){var r=e===be.LEFT?1:-1,i=t.p1.x-t.p0.x,o=t.p1.y-t.p0.y,a=Math.sqrt(i*i+o*o),s=r*A*i/a,g=r*A*o/a;n.p0.x=t.p0.x-g,n.p0.y=t.p0.y+s,n.p1.x=t.p1.x-g,n.p1.y=t.p1.y+s},UA.prototype.addFilletArc=function(t,e,A,n,r){var i=n===at.CLOCKWISE?-1:1,o=Math.abs(e-A),a=Math.trunc(o/this._filletAngleQuantum+.5);if(a<1)return null;for(var s=o/a,g=0,c=new m;g<o;){var I=e+i*g;c.x=t.x+r*Math.cos(I),c.y=t.y+r*Math.sin(I),this._segList.addPt(c),g+=s}},UA.prototype.addInsideTurn=function(t,e){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*UA.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var A=new m((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(A);var n=new m((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(n)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},UA.prototype.createCircle=function(t){var e=new m(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},UA.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},UA.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new wA,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*UA.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},UA.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===vA.JOIN_BEVEL||this._bufParams.getJoinStyle()===vA.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},UA.prototype.closeRing=function(){this._segList.closeRing()},UA.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},UA.prototype.interfaces_=function(){return[]},UA.prototype.getClass=function(){return UA},GA.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},GA.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},GA.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},GA.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(UA,GA);var NA=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};NA.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var A=e<0,n=Math.abs(e),r=this.getSegGen(n);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,A,r);var i=r.getCoordinates();return A&&Ft.reverse(i),i},NA.prototype.computeSingleSidedBufferCurve=function(t,e,A){var n=this.simplifyTolerance(this._distance);if(e){A.addSegments(t,!0);var r=bA.simplify(t,-n),i=r.length-1;A.initSideSegments(r[i],r[i-1],be.LEFT),A.addFirstSegment();for(var o=i-2;o>=0;o--)A.addNextSegment(r[o],!0)}else{A.addSegments(t,!1);var a=bA.simplify(t,n),s=a.length-1;A.initSideSegments(a[0],a[1],be.LEFT),A.addFirstSegment();for(var g=2;g<=s;g++)A.addNextSegment(a[g],!0)}A.addLastSegment(),A.closeRing()},NA.prototype.computeRingBufferCurve=function(t,e,A){var n=this.simplifyTolerance(this._distance);e===be.RIGHT&&(n=-n);var r=bA.simplify(t,n),i=r.length-1;A.initSideSegments(r[i-1],r[0],e);for(var o=1;o<=i;o++){var a=1!==o;A.addNextSegment(r[o],a)}A.closeRing()},NA.prototype.computeLineBufferCurve=function(t,e){var A=this.simplifyTolerance(this._distance),n=bA.simplify(t,A),r=n.length-1;e.initSideSegments(n[0],n[1],be.LEFT);for(var i=2;i<=r;i++)e.addNextSegment(n[i],!0);e.addLastSegment(),e.addLineEndCap(n[r-1],n[r]);var o=bA.simplify(t,-A),a=o.length-1;e.initSideSegments(o[a],o[a-1],be.LEFT);for(var s=a-2;s>=0;s--)e.addNextSegment(o[s],!0);e.addLastSegment(),e.addLineEndCap(o[1],o[0]),e.closeRing()},NA.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case vA.CAP_ROUND:e.createCircle(t);break;case vA.CAP_SQUARE:e.createSquare(t)}},NA.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var A=Math.abs(e),n=this.getSegGen(A);if(t.length<=1)this.computePointCurve(t[0],n);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,n)}else this.computeLineBufferCurve(t,n);return n.getCoordinates()},NA.prototype.getBufferParameters=function(){return this._bufParams},NA.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},NA.prototype.getRingCurve=function(t,e,A){if(this._distance=A,t.length<=2)return this.getLineCurve(t,A);if(0===A)return NA.copyCoordinates(t);var n=this.getSegGen(A);return this.computeRingBufferCurve(t,e,n),n.getCoordinates()},NA.prototype.computeOffsetCurve=function(t,e,A){var n=this.simplifyTolerance(this._distance);if(e){var r=bA.simplify(t,-n),i=r.length-1;A.initSideSegments(r[i],r[i-1],be.LEFT),A.addFirstSegment();for(var o=i-2;o>=0;o--)A.addNextSegment(r[o],!0)}else{var a=bA.simplify(t,n),s=a.length-1;A.initSideSegments(a[0],a[1],be.LEFT),A.addFirstSegment();for(var g=2;g<=s;g++)A.addNextSegment(a[g],!0)}A.addLastSegment()},NA.prototype.getSegGen=function(t){return new UA(this._precisionModel,this._bufParams,t)},NA.prototype.interfaces_=function(){return[]},NA.prototype.getClass=function(){return NA},NA.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),A=0;A<e.length;A++)e[A]=new m(t[A]);return e};var kA=function(){this._subgraphs=null,this._seg=new CA,this._cga=new at;var t=arguments[0];this._subgraphs=t},xA={DepthSegment:{configurable:!0}};kA.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=new vt,A=this._subgraphs.iterator();A.hasNext();){var n=A.next(),r=n.getEnvelope();t.y<r.getMinY()||t.y>r.getMaxY()||this.findStabbedSegments(t,n.getDirectedEdges(),e)}return e}if(3===arguments.length)if(R(arguments[2],yt)&&arguments[0]instanceof m&&arguments[1]instanceof je){for(var i=arguments[0],o=arguments[1],a=arguments[2],s=o.getEdge().getCoordinates(),g=0;g<s.length-1;g++)if(this._seg.p0=s[g],this._seg.p1=s[g+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<i.x)&&!(this._seg.isHorizontal()||i.y<this._seg.p0.y||i.y>this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,i)===at.RIGHT)){var c=o.getDepth(be.LEFT);this._seg.p0.equals(s[g])||(c=o.getDepth(be.RIGHT));var I=new OA(this._seg,c);a.add(I)}}else if(R(arguments[2],yt)&&arguments[0]instanceof m&&R(arguments[1],yt))for(var u=arguments[0],l=arguments[1],C=arguments[2],h=l.iterator();h.hasNext();){var B=h.next();B.isForward()&&this.findStabbedSegments(u,B,C)}},kA.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:$e.min(e)._leftDepth},kA.prototype.interfaces_=function(){return[]},kA.prototype.getClass=function(){return kA},xA.DepthSegment.get=function(){return OA},Object.defineProperties(kA,xA);var OA=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new CA(t),this._leftDepth=e};OA.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var A=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==A||0!=(A=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?A:this._upwardSeg.compareTo(e._upwardSeg)},OA.prototype.compareX=function(t,e){var A=t.p0.compareTo(e.p0);return 0!==A?A:t.p1.compareTo(e.p1)},OA.prototype.toString=function(){return this._upwardSeg.toString()},OA.prototype.interfaces_=function(){return[p]},OA.prototype.getClass=function(){return OA};var MA=function(t,e,A){this.p0=t||null,this.p1=e||null,this.p2=A||null};MA.prototype.area=function(){return MA.area(this.p0,this.p1,this.p2)},MA.prototype.signedArea=function(){return MA.signedArea(this.p0,this.p1,this.p2)},MA.prototype.interpolateZ=function(t){if(null===t)throw new d("Supplied point is null.");return MA.interpolateZ(t,this.p0,this.p1,this.p2)},MA.prototype.longestSideLength=function(){return MA.longestSideLength(this.p0,this.p1,this.p2)},MA.prototype.isAcute=function(){return MA.isAcute(this.p0,this.p1,this.p2)},MA.prototype.circumcentre=function(){return MA.circumcentre(this.p0,this.p1,this.p2)},MA.prototype.area3D=function(){return MA.area3D(this.p0,this.p1,this.p2)},MA.prototype.centroid=function(){return MA.centroid(this.p0,this.p1,this.p2)},MA.prototype.inCentre=function(){return MA.inCentre(this.p0,this.p1,this.p2)},MA.prototype.interfaces_=function(){return[]},MA.prototype.getClass=function(){return MA},MA.area=function(t,e,A){return Math.abs(((A.x-t.x)*(e.y-t.y)-(e.x-t.x)*(A.y-t.y))/2)},MA.signedArea=function(t,e,A){return((A.x-t.x)*(e.y-t.y)-(e.x-t.x)*(A.y-t.y))/2},MA.det=function(t,e,A,n){return t*n-e*A},MA.interpolateZ=function(t,e,A,n){var r=e.x,i=e.y,o=A.x-r,a=n.x-r,s=A.y-i,g=n.y-i,c=o*g-a*s,I=t.x-r,u=t.y-i,l=(g*I-a*u)/c,C=(-s*I+o*u)/c;return e.z+l*(A.z-e.z)+C*(n.z-e.z)},MA.longestSideLength=function(t,e,A){var n=t.distance(e),r=e.distance(A),i=A.distance(t),o=n;return r>o&&(o=r),i>o&&(o=i),o},MA.isAcute=function(t,e,A){return!!DA.isAcute(t,e,A)&&!!DA.isAcute(e,A,t)&&!!DA.isAcute(A,t,e)},MA.circumcentre=function(t,e,A){var n=A.x,r=A.y,i=t.x-n,o=t.y-r,a=e.x-n,s=e.y-r,g=2*MA.det(i,o,a,s),c=MA.det(o,i*i+o*o,s,a*a+s*s),I=MA.det(i,i*i+o*o,a,a*a+s*s);return new m(n-c/g,r+I/g)},MA.perpendicularBisector=function(t,e){var A=e.x-t.x,n=e.y-t.y,r=new V(t.x+A/2,t.y+n/2,1),i=new V(t.x-n+A/2,t.y+A+n/2,1);return new V(r,i)},MA.angleBisector=function(t,e,A){var n=e.distance(t),r=n/(n+e.distance(A)),i=A.x-t.x,o=A.y-t.y;return new m(t.x+r*i,t.y+r*o)},MA.area3D=function(t,e,A){var n=e.x-t.x,r=e.y-t.y,i=e.z-t.z,o=A.x-t.x,a=A.y-t.y,s=A.z-t.z,g=r*s-i*a,c=i*o-n*s,I=n*a-r*o,u=g*g+c*c+I*I;return Math.sqrt(u)/2},MA.centroid=function(t,e,A){var n=(t.x+e.x+A.x)/3,r=(t.y+e.y+A.y)/3;return new m(n,r)},MA.inCentre=function(t,e,A){var n=e.distance(A),r=t.distance(A),i=t.distance(e),o=n+r+i,a=(n*t.x+r*e.x+i*A.x)/o,s=(n*t.y+r*e.y+i*A.y)/o;return new m(a,s)};var LA=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new vt;var t=arguments[0],e=arguments[1],A=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=A};LA.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),A=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(A,S.EXTERIOR,S.INTERIOR)},LA.prototype.addPolygon=function(t){var e=this._distance,A=be.LEFT;this._distance<0&&(e=-this._distance,A=be.RIGHT);var n=t.getExteriorRing(),r=Ft.removeRepeatedPoints(n.getCoordinates());if(this._distance<0&&this.isErodedCompletely(n,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,A,S.EXTERIOR,S.INTERIOR);for(var i=0;i<t.getNumInteriorRing();i++){var o=t.getInteriorRingN(i),a=Ft.removeRepeatedPoints(o.getCoordinates());this._distance>0&&this.isErodedCompletely(o,-this._distance)||this.addPolygonRing(a,e,be.opposite(A),S.INTERIOR,S.EXTERIOR)}},LA.prototype.isTriangleErodedCompletely=function(t,e){var A=new MA(t[0],t[1],t[2]),n=A.inCentre();return at.distancePointLine(n,A.p0,A.p1)<Math.abs(e)},LA.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Ft.removeRepeatedPoints(t.getCoordinates()),A=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(A,S.EXTERIOR,S.INTERIOR)},LA.prototype.addCurve=function(t,e,A){if(null===t||t.length<2)return null;var n=new lA(t,new Ge(0,S.BOUNDARY,e,A));this._curveList.add(n)},LA.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},LA.prototype.addPolygonRing=function(t,e,A,n,r){if(0===e&&t.length<ee.MINIMUM_VALID_SIZE)return null;var i=n,o=r;t.length>=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(i=r,o=n,A=be.opposite(A));var a=this._curveBuilder.getRingCurve(t,A,e);this.addCurve(a,i,o)},LA.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Pt?this.addLineString(t):t instanceof Xt?this.addPoint(t):(t instanceof te||t instanceof Ht||t instanceof Ae||t instanceof jt)&&this.addCollection(t)},LA.prototype.isErodedCompletely=function(t,e){var A=t.getCoordinates();if(A.length<4)return e<0;if(4===A.length)return this.isTriangleErodedCompletely(A,e);var n=t.getEnvelopeInternal(),r=Math.min(n.getHeight(),n.getWidth());return e<0&&2*Math.abs(e)>r},LA.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var A=t.getGeometryN(e);this.add(A)}},LA.prototype.interfaces_=function(){return[]},LA.prototype.getClass=function(){return LA};var _A=function(){};_A.prototype.locate=function(t){},_A.prototype.interfaces_=function(){return[]},_A.prototype.getClass=function(){return _A};var JA=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};JA.prototype.next=function(){if(this._atStart)return this._atStart=!1,JA.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 n;var t=this._parent.getGeometryN(this._index++);return t instanceof jt?(this._subcollectionIterator=new JA(t),this._subcollectionIterator.next()):t},JA.prototype.remove=function(){throw new Error(this.getClass().getName())},JA.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)},JA.prototype.interfaces_=function(){return[pt]},JA.prototype.getClass=function(){return JA},JA.isAtomic=function(t){return!(t instanceof jt)};var TA=function(){this._geom=null;var t=arguments[0];this._geom=t};TA.prototype.locate=function(t){return TA.locate(t,this._geom)},TA.prototype.interfaces_=function(){return[_A]},TA.prototype.getClass=function(){return TA},TA.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},TA.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var A=e.getExteriorRing();if(!TA.isPointInRing(t,A))return!1;for(var n=0;n<e.getNumInteriorRing();n++){var r=e.getInteriorRingN(n);if(TA.isPointInRing(t,r))return!1}return!0},TA.containsPoint=function(t,e){if(e instanceof $t)return TA.containsPointInPolygon(t,e);if(e instanceof jt)for(var A=new JA(e);A.hasNext();){var n=A.next();if(n!==e&&TA.containsPoint(t,n))return!0}return!1},TA.locate=function(t,e){return e.isEmpty()?S.EXTERIOR:TA.containsPoint(t,e)?S.INTERIOR:S.EXTERIOR};var jA=function(){this._edgeMap=new I,this._edgeList=null,this._ptInAreaLocation=[S.NONE,S.NONE]};jA.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),A=e-1;return 0===e&&(A=this._edgeList.size()-1),this._edgeList.get(A)},jA.prototype.propagateSideLabels=function(t){for(var e=S.NONE,A=this.iterator();A.hasNext();){var n=A.next().getLabel();n.isArea(t)&&n.getLocation(t,be.LEFT)!==S.NONE&&(e=n.getLocation(t,be.LEFT))}if(e===S.NONE)return null;for(var r=e,i=this.iterator();i.hasNext();){var o=i.next(),a=o.getLabel();if(a.getLocation(t,be.ON)===S.NONE&&a.setLocation(t,be.ON,r),a.isArea(t)){var s=a.getLocation(t,be.LEFT),g=a.getLocation(t,be.RIGHT);if(g!==S.NONE){if(g!==r)throw new Se("side location conflict",o.getCoordinate());s===S.NONE&&et.shouldNeverReachHere("found single null side (at "+o.getCoordinate()+")"),r=s}else et.isTrue(a.getLocation(t,be.LEFT)===S.NONE,"found single null side"),a.setLocation(t,be.RIGHT,r),a.setLocation(t,be.LEFT,r)}}},jA.prototype.getCoordinate=function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},jA.prototype.print=function(t){Y.out.println("EdgeEndStar:   "+this.getCoordinate());for(var e=this.iterator();e.hasNext();)e.next().print(t)},jA.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},jA.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var A=e.size()-1,n=e.get(A).getLabel().getLocation(t,be.LEFT);et.isTrue(n!==S.NONE,"Found unlabelled area edge");for(var r=n,i=this.iterator();i.hasNext();){var o=i.next().getLabel();et.isTrue(o.isArea(t),"Found non-area edge");var a=o.getLocation(t,be.LEFT),s=o.getLocation(t,be.RIGHT);if(a===s)return!1;if(s!==r)return!1;r=a}return!0},jA.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++)if(this._edgeList.get(e)===t)return e;return-1},jA.prototype.iterator=function(){return this.getEdges().iterator()},jA.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new vt(this._edgeMap.values())),this._edgeList},jA.prototype.getLocation=function(t,e,A){return this._ptInAreaLocation[t]===S.NONE&&(this._ptInAreaLocation[t]=TA.locate(e,A[t].getGeometry())),this._ptInAreaLocation[t]},jA.prototype.toString=function(){var t=new N;t.append("EdgeEndStar:   "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var A=e.next();t.append(A),t.append("\n")}return t.toString()},jA.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();)e.next().computeLabel(t)},jA.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],A=this.iterator();A.hasNext();)for(var n=A.next().getLabel(),r=0;r<2;r++)n.isLine(r)&&n.getLocation(r)===S.BOUNDARY&&(e[r]=!0);for(var i=this.iterator();i.hasNext();)for(var o=i.next(),a=o.getLabel(),s=0;s<2;s++)if(a.isAnyNull(s)){var g=S.NONE;if(e[s])g=S.EXTERIOR;else{var c=o.getCoordinate();g=this.getLocation(s,c,t)}a.setAllLocationsIfNull(s,g)}},jA.prototype.getDegree=function(){return this._edgeMap.size()},jA.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},jA.prototype.interfaces_=function(){return[]},jA.prototype.getClass=function(){return jA};var HA=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var t=null,e=null,A=this._SCANNING_FOR_INCOMING,n=0;n<this._resultAreaEdgeList.size();n++){var r=this._resultAreaEdgeList.get(n),i=r.getSym();if(r.getLabel().isArea())switch(null===t&&r.isInResult()&&(t=r),A){case this._SCANNING_FOR_INCOMING:if(!i.isInResult())continue;e=i,A=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!r.isInResult())continue;e.setNext(r),A=this._SCANNING_FOR_INCOMING}}if(A===this._LINKING_TO_OUTGOING){if(null===t)throw new Se("no outgoing dirEdge found",this.getCoordinate());et.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var A=t.get(0);if(1===e)return A;var n=t.get(e-1),r=A.getQuadrant(),i=n.getQuadrant();return _e.isNorthern(r)&&_e.isNorthern(i)?A:_e.isNorthern(r)||_e.isNorthern(i)?0!==A.getDy()?A:0!==n.getDy()?n:(et.shouldNeverReachHere("found two horizontal edges incident on node"),null):n},e.prototype.print=function(t){Y.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var A=e.next();t.print("out "),A.print(t),t.println(),t.print("in "),A.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new vt;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var A=e.next().getLabel();A.setAllLocationsIfNull(0,t.getLocation(0)),A.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,A=this._edgeList.size()-1;A>=0;A--){var n=this._edgeList.get(A),r=n.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=n}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),A=t.getDepth(be.LEFT),n=t.getDepth(be.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),A);if(this.computeDepths(0,e,r)!==n)throw new Se("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var i=arguments[0],o=arguments[1],a=arguments[2],s=i;s<o;s++){var g=this._edgeList.get(s);g.setEdgeDepths(be.RIGHT,a),a=g.getDepth(be.LEFT)}return a}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=null,A=null,n=this._SCANNING_FOR_INCOMING,r=this._resultAreaEdgeList.size()-1;r>=0;r--){var i=this._resultAreaEdgeList.get(r),o=i.getSym();switch(null===e&&i.getEdgeRing()===t&&(e=i),n){case this._SCANNING_FOR_INCOMING:if(o.getEdgeRing()!==t)continue;A=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(i.getEdgeRing()!==t)continue;A.setNextMin(i),n=this._SCANNING_FOR_INCOMING}}n===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),A.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var A=arguments[0],n=0,r=this.iterator();r.hasNext();)r.next().getEdgeRing()===A&&n++;return n}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=S.NONE,e=this.iterator();e.hasNext();){var A=e.next(),n=A.getSym();if(!A.isLineEdge()){if(A.isInResult()){t=S.INTERIOR;break}if(n.isInResult()){t=S.EXTERIOR;break}}}if(t===S.NONE)return null;for(var r=t,i=this.iterator();i.hasNext();){var o=i.next(),a=o.getSym();o.isLineEdge()?o.getEdge().setCovered(r===S.INTERIOR):(o.isInResult()&&(r=S.EXTERIOR),a.isInResult()&&(r=S.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Ge(S.NONE);for(var A=this.iterator();A.hasNext();)for(var n=A.next().getEdge().getLabel(),r=0;r<2;r++){var i=n.getLocation(r);i!==S.INTERIOR&&i!==S.BOUNDARY||this._label.setLocation(r,S.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(jA),YA=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Me(t,new HA)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(He),VA=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};VA.prototype.compareTo=function(t){var e=t;return VA.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},VA.prototype.interfaces_=function(){return[p]},VA.prototype.getClass=function(){return VA},VA.orientation=function(t){return 1===Ft.increasingDirection(t)},VA.compareOriented=function(t,e,A,n){for(var r=e?1:-1,i=n?1:-1,o=e?t.length:-1,a=n?A.length:-1,s=e?0:t.length-1,g=n?0:A.length-1;;){var c=t[s].compareTo(A[g]);if(0!==c)return c;var I=(s+=r)===o,u=(g+=i)===a;if(I&&!u)return-1;if(!I&&u)return 1;if(I&&u)return 0}};var ZA=function(){this._edges=new vt,this._ocaMap=new I};ZA.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var A=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var n=A.getCoordinates(),r=0;r<n.length;r++)r>0&&t.print(","),t.print(n[r].x+" "+n[r].y);t.println(")")}t.print(")  ")},ZA.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},ZA.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},ZA.prototype.iterator=function(){return this._edges.iterator()},ZA.prototype.getEdges=function(){return this._edges},ZA.prototype.get=function(t){return this._edges.get(t)},ZA.prototype.findEqualEdge=function(t){var e=new VA(t.getCoordinates());return this._ocaMap.get(e)},ZA.prototype.add=function(t){this._edges.add(t);var e=new VA(t.getCoordinates());this._ocaMap.put(e,t)},ZA.prototype.interfaces_=function(){return[]},ZA.prototype.getClass=function(){return ZA};var WA=function(){};WA.prototype.processIntersections=function(t,e,A,n){},WA.prototype.isDone=function(){},WA.prototype.interfaces_=function(){return[]},WA.prototype.getClass=function(){return WA};var KA=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 t=arguments[0];this._li=t};KA.prototype.isTrivialIntersection=function(t,e,A,n){if(t===A&&1===this._li.getIntersectionNum()){if(KA.isAdjacentSegments(e,n))return!0;if(t.isClosed()){var r=t.size()-1;if(0===e&&n===r||0===n&&e===r)return!0}}return!1},KA.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},KA.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},KA.prototype.getLineIntersector=function(){return this._li},KA.prototype.hasProperIntersection=function(){return this._hasProper},KA.prototype.processIntersections=function(t,e,A,n){if(t===A&&e===n)return null;this.numTests++;var r=t.getCoordinates()[e],i=t.getCoordinates()[e+1],o=A.getCoordinates()[n],a=A.getCoordinates()[n+1];this._li.computeIntersection(r,i,o,a),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,A,n)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),A.addIntersections(this._li,n,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},KA.prototype.hasIntersection=function(){return this._hasIntersection},KA.prototype.isDone=function(){return!1},KA.prototype.hasInteriorIntersection=function(){return this._hasInterior},KA.prototype.interfaces_=function(){return[WA]},KA.prototype.getClass=function(){return KA},KA.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var PA=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],A=arguments[2];this.coord=new m(t),this.segmentIndex=e,this.dist=A};PA.prototype.getSegmentIndex=function(){return this.segmentIndex},PA.prototype.getCoordinate=function(){return this.coord},PA.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},PA.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},PA.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},PA.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},PA.prototype.getDistance=function(){return this.dist},PA.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},PA.prototype.interfaces_=function(){return[p]},PA.prototype.getClass=function(){return PA};var qA=function(){this._nodeMap=new I,this.edge=null;var t=arguments[0];this.edge=t};qA.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},qA.prototype.iterator=function(){return this._nodeMap.values().iterator()},qA.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),A=e.next();e.hasNext();){var n=e.next(),r=this.createSplitEdge(A,n);t.add(r),A=n}},qA.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},qA.prototype.createSplitEdge=function(t,e){var A=e.segmentIndex-t.segmentIndex+2,n=this.edge.pts[e.segmentIndex],r=e.dist>0||!e.coord.equals2D(n);r||A--;var i=new Array(A).fill(null),o=0;i[o++]=new m(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)i[o++]=this.edge.pts[a];return r&&(i[o]=e.coord),new en(i,new Ge(this.edge._label))},qA.prototype.add=function(t,e,A){var n=new PA(t,e,A),r=this._nodeMap.get(n);return null!==r?r:(this._nodeMap.put(n,n),n)},qA.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},qA.prototype.interfaces_=function(){return[]},qA.prototype.getClass=function(){return qA};var XA=function(){};XA.prototype.getChainStartIndices=function(t){var e=0,A=new vt;A.add(new k(e));do{var n=this.findChainEnd(t,e);A.add(new k(n)),e=n}while(e<t.length-1);return XA.toIntArray(A)},XA.prototype.findChainEnd=function(t,e){for(var A=_e.quadrant(t[e],t[e+1]),n=e+1;n<t.length&&_e.quadrant(t[n-1],t[n])===A;)n++;return n-1},XA.prototype.interfaces_=function(){return[]},XA.prototype.getClass=function(){return XA},XA.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),A=0;A<e.length;A++)e[A]=t.get(A).intValue();return e};var zA=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new Z,this.env2=new Z;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new XA;this.startIndex=e.getChainStartIndices(this.pts)};zA.prototype.getCoordinates=function(){return this.pts},zA.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,A=this.pts[this.startIndex[t+1]].x;return e>A?e:A},zA.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,A=this.pts[this.startIndex[t+1]].x;return e<A?e:A},zA.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],A=arguments[2],n=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[A],e.startIndex[A+1],n)}else if(6===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=arguments[4],g=arguments[5],c=this.pts[r],I=this.pts[i],u=o.pts[a],l=o.pts[s];if(i-r==1&&s-a==1)return g.addIntersections(this.e,r,o.e,a),null;if(this.env1.init(c,I),this.env2.init(u,l),!this.env1.intersects(this.env2))return null;var C=Math.trunc((r+i)/2),h=Math.trunc((a+s)/2);r<C&&(a<h&&this.computeIntersectsForChain(r,C,o,a,h,g),h<s&&this.computeIntersectsForChain(r,C,o,h,s,g)),C<i&&(a<h&&this.computeIntersectsForChain(C,i,o,a,h,g),h<s&&this.computeIntersectsForChain(C,i,o,h,s,g))}},zA.prototype.getStartIndexes=function(){return this.startIndex},zA.prototype.computeIntersects=function(t,e){for(var A=0;A<this.startIndex.length-1;A++)for(var n=0;n<t.startIndex.length-1;n++)this.computeIntersectsForChain(A,t,n,e)},zA.prototype.interfaces_=function(){return[]},zA.prototype.getClass=function(){return zA};var $A=function t(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var e=0;e<2;e++)for(var A=0;A<3;A++)this._depth[e][A]=t.NULL_VALUE},tn={NULL_VALUE:{configurable:!0}};$A.prototype.getDepth=function(t,e){return this._depth[t][e]},$A.prototype.setDepth=function(t,e,A){this._depth[t][e]=A},$A.prototype.isNull=function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==$A.NULL_VALUE)return!1;return!0}if(1===arguments.length){var A=arguments[0];return this._depth[A][1]===$A.NULL_VALUE}if(2===arguments.length){var n=arguments[0],r=arguments[1];return this._depth[n][r]===$A.NULL_VALUE}},$A.prototype.normalize=function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var A=1;A<3;A++){var n=0;this._depth[t][A]>e&&(n=1),this._depth[t][A]=n}}},$A.prototype.getDelta=function(t){return this._depth[t][be.RIGHT]-this._depth[t][be.LEFT]},$A.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?S.EXTERIOR:S.INTERIOR},$A.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},$A.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var A=1;A<3;A++){var n=t.getLocation(e,A);n!==S.EXTERIOR&&n!==S.INTERIOR||(this.isNull(e,A)?this._depth[e][A]=$A.depthAtLocation(n):this._depth[e][A]+=$A.depthAtLocation(n))}else if(3===arguments.length){var r=arguments[0],i=arguments[1];arguments[2]===S.INTERIOR&&this._depth[r][i]++}},$A.prototype.interfaces_=function(){return[]},$A.prototype.getClass=function(){return $A},$A.depthAtLocation=function(t){return t===S.EXTERIOR?0:t===S.INTERIOR?1:$A.NULL_VALUE},tn.NULL_VALUE.get=function(){return-1},Object.defineProperties($A,tn);var en=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new qA(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new $A,this._depthDelta=0,1===arguments.length){var A=arguments[0];e.call(this,A,null)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.pts=n,this._label=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Ge.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var A=t;if(this.pts.length!==A.pts.length)return!1;for(var n=!0,r=!0,i=this.pts.length,o=0;o<this.pts.length;o++)if(this.pts[o].equals2D(A.pts[o])||(n=!1),this.pts[o].equals2D(A.pts[--i])||(r=!1),!n&&!r)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(")  "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new zA(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new Z;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,A,n){var r=new m(t.getIntersection(n)),i=e,o=t.getEdgeDistance(A,n),a=i+1;if(a<this.pts.length){var s=this.pts[a];r.equals2D(s)&&(i=a,o=0)}this.eiList.add(r,i,o)},e.prototype.toString=function(){var t=new N;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(")  "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,A){for(var n=0;n<t.getIntersectionNum();n++)this.addIntersection(t,e,A,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],A=arguments[1];A.setAtLeastIfValid(e.getLocation(0,be.ON),e.getLocation(1,be.ON),1),e.isArea()&&(A.setAtLeastIfValid(e.getLocation(0,be.LEFT),e.getLocation(1,be.LEFT),2),A.setAtLeastIfValid(e.getLocation(0,be.RIGHT),e.getLocation(1,be.RIGHT),2))},e}(Oe),An=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new ZA,this._bufParams=t||null};An.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},An.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var A=e.getLabel(),n=t.getLabel();e.isPointwiseEqual(t)||(n=new Ge(t.getLabel())).flip(),A.merge(n);var r=An.depthDelta(n),i=e.getDepthDelta()+r;e.setDepthDelta(i)}else this._edgeList.add(t),t.setDepthDelta(An.depthDelta(t.getLabel()))},An.prototype.buildSubgraphs=function(t,e){for(var A=new vt,n=t.iterator();n.hasNext();){var r=n.next(),i=r.getRightmostCoordinate(),o=new kA(A).getDepth(i);r.computeDepth(o),r.findResultEdges(),A.add(r),e.add(r.getDirectedEdges(),r.getNodes())}},An.prototype.createSubgraphs=function(t){for(var e=new vt,A=t.getNodes().iterator();A.hasNext();){var n=A.next();if(!n.isVisited()){var r=new Re;r.create(n),e.add(r)}}return $e.sort(e,$e.reverseOrder()),e},An.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},An.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new pA,A=new rt;return A.setPrecisionModel(t),e.setSegmentIntersector(new KA(A)),e},An.prototype.buffer=function(t,e){var A=this._workingPrecisionModel;null===A&&(A=t.getPrecisionModel()),this._geomFact=t.getFactory();var n=new NA(A,this._bufParams),r=new LA(t,e,n).getCurves();if(r.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(r,A),this._graph=new Ye(new YA),this._graph.addEdges(this._edgeList.getEdges());var i=this.createSubgraphs(this._graph),o=new Ve(this._geomFact);this.buildSubgraphs(i,o);var a=o.getPolygons();return a.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(a)},An.prototype.computeNodedEdges=function(t,e){var A=this.getNoder(e);A.computeNodes(t);for(var n=A.getNodedSubstrings().iterator();n.hasNext();){var r=n.next(),i=r.getCoordinates();if(2!==i.length||!i[0].equals2D(i[1])){var o=r.getData(),a=new en(r.getCoordinates(),new Ge(o));this.insertUniqueEdge(a)}}},An.prototype.setNoder=function(t){this._workingNoder=t},An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An},An.depthDelta=function(t){var e=t.getLocation(0,be.LEFT),A=t.getLocation(0,be.RIGHT);return e===S.INTERIOR&&A===S.EXTERIOR?1:e===S.EXTERIOR&&A===S.INTERIOR?-1:0},An.convertSegStrings=function(t){for(var e=new fe,A=new vt;t.hasNext();){var n=t.next(),r=e.createLineString(n.getCoordinates());A.add(r)}return e.buildGeometry(A)};var nn=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this._noder=A,this._scaleFactor=n,this._offsetX=r,this._offsetY=i,this._isScaled=!this.isIntegerPrecision()}};nn.prototype.rescale=function(){if(R(arguments[0],Et))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var A=arguments[0],n=0;n<A.length;n++)A[n].x=A[n].x/this._scaleFactor+this._offsetX,A[n].y=A[n].y/this._scaleFactor+this._offsetY;2===A.length&&A[0].equals2D(A[1])&&Y.out.println(A)}},nn.prototype.scale=function(){if(R(arguments[0],Et)){for(var t=arguments[0],e=new vt,A=t.iterator();A.hasNext();){var n=A.next();e.add(new lA(this.scale(n.getCoordinates()),n.getData()))}return e}if(arguments[0]instanceof Array){for(var r=arguments[0],i=new Array(r.length).fill(null),o=0;o<r.length;o++)i[o]=new m(Math.round((r[o].x-this._offsetX)*this._scaleFactor),Math.round((r[o].y-this._offsetY)*this._scaleFactor),r[o].z);return Ft.removeRepeatedPoints(i)}},nn.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},nn.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},nn.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},nn.prototype.interfaces_=function(){return[QA]},nn.prototype.getClass=function(){return nn};var rn=function(){this._li=new rt,this._segStrings=null;var t=arguments[0];this._segStrings=t},on={fact:{configurable:!0}};rn.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var A=arguments[0],n=arguments[1].iterator();n.hasNext();)for(var r=n.next().getCoordinates(),i=1;i<r.length-1;i++)if(r[i].equals(A))throw new $("found endpt/interior pt intersection at index "+i+" :pt "+A)},rn.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),A=this._segStrings.iterator();A.hasNext();){var n=A.next();this.checkInteriorIntersections(e,n)}else if(2===arguments.length)for(var r=arguments[0],i=arguments[1],o=r.getCoordinates(),a=i.getCoordinates(),s=0;s<o.length-1;s++)for(var g=0;g<a.length-1;g++)this.checkInteriorIntersections(r,s,i,g);else if(4===arguments.length){var c=arguments[0],I=arguments[1],u=arguments[2],l=arguments[3];if(c===u&&I===l)return null;var C=c.getCoordinates()[I],h=c.getCoordinates()[I+1],B=u.getCoordinates()[l],f=u.getCoordinates()[l+1];if(this._li.computeIntersection(C,h,B,f),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,C,h)||this.hasInteriorIntersection(this._li,B,f)))throw new $("found non-noded intersection at "+C+"-"+h+" and "+B+"-"+f)}},rn.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},rn.prototype.checkCollapses=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var A=arguments[0].getCoordinates(),n=0;n<A.length-2;n++)this.checkCollapse(A[n],A[n+1],A[n+2])},rn.prototype.hasInteriorIntersection=function(t,e,A){for(var n=0;n<t.getIntersectionNum();n++){var r=t.getIntersection(n);if(!r.equals(e)&&!r.equals(A))return!0}return!1},rn.prototype.checkCollapse=function(t,e,A){if(t.equals(A))throw new $("found non-noded collapse at "+rn.fact.createLineString([t,e,A]))},rn.prototype.interfaces_=function(){return[]},rn.prototype.getClass=function(){return rn},on.fact.get=function(){return new fe},Object.defineProperties(rn,on);var an=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 t=arguments[0],e=arguments[1],A=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=A,e<=0)throw new d("Scale factor must be non-zero");1!==e&&(this._pt=new m(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new m,this._p1Scaled=new m),this.initCorners(this._pt)},sn={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};an.prototype.intersectsScaled=function(t,e){var A=Math.min(t.x,e.x),n=Math.max(t.x,e.x),r=Math.min(t.y,e.y),i=Math.max(t.y,e.y),o=this._maxx<A||this._minx>n||this._maxy<r||this._miny>i;if(o)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(o&&a),"Found bad envelope test"),a},an.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new m(this._maxx,this._maxy),this._corner[1]=new m(this._minx,this._maxy),this._corner[2]=new m(this._minx,this._miny),this._corner[3]=new m(this._maxx,this._miny)},an.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},an.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},an.prototype.getCoordinate=function(){return this._originalPt},an.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},an.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=an.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Z(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},an.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},an.prototype.intersectsToleranceSquare=function(t,e){var A=!1,n=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(A=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!A||!n)||!!t.equals(this._pt)||!!e.equals(this._pt))))},an.prototype.addSnappedNode=function(t,e){var A=t.getCoordinate(e),n=t.getCoordinate(e+1);return!!this.intersects(A,n)&&(t.addIntersection(this.getCoordinate(),e),!0)},an.prototype.interfaces_=function(){return[]},an.prototype.getClass=function(){return an},sn.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(an,sn);var gn=function(){this.tempEnv1=new Z,this.selectedSegment=new CA};gn.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},gn.prototype.interfaces_=function(){return[]},gn.prototype.getClass=function(){return gn};var cn=function(){this._index=null;var t=arguments[0];this._index=t},In={HotPixelSnapAction:{configurable:!0}};cn.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],A=arguments[1],n=arguments[2],r=e.getSafeEnvelope(),i=new un(e,A,n);return this._index.query(r,{interfaces_:function(){return[Pe]},visitItem:function(t){t.select(r,i)}}),i.isNodeAdded()}},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn},In.HotPixelSnapAction.get=function(){return un},Object.defineProperties(cn,In);var un=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],A=arguments[1],n=arguments[2];this._hotPixel=e,this._parentEdge=A,this._hotPixelVertexIndex=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],A=arguments[1],n=e.getContext();if(null!==this._parentEdge&&n===this._parentEdge&&A===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(n,A)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(gn),ln=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new vt};ln.prototype.processIntersections=function(t,e,A,n){if(t===A&&e===n)return null;var r=t.getCoordinates()[e],i=t.getCoordinates()[e+1],o=A.getCoordinates()[n],a=A.getCoordinates()[n+1];if(this._li.computeIntersection(r,i,o,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var s=0;s<this._li.getIntersectionNum();s++)this._interiorIntersections.add(this._li.getIntersection(s));t.addIntersections(this._li,e,0),A.addIntersections(this._li,n,1)}},ln.prototype.isDone=function(){return!1},ln.prototype.getInteriorIntersections=function(){return this._interiorIntersections},ln.prototype.interfaces_=function(){return[WA]},ln.prototype.getClass=function(){return ln};var Cn=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new rt,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};Cn.prototype.checkCorrectness=function(t){var e=lA.getNodedSubstrings(t),A=new rn(e);try{A.checkValid()}catch(t){if(!(t instanceof j))throw t;t.printStackTrace()}},Cn.prototype.getNodedSubstrings=function(){return lA.getNodedSubstrings(this._nodedSegStrings)},Cn.prototype.snapRound=function(t,e){var A=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(A),this.computeVertexSnaps(t)},Cn.prototype.findInteriorIntersections=function(t,e){var A=new ln(e);return this._noder.setSegmentIntersector(A),this._noder.computeNodes(t),A.getInteriorIntersections()},Cn.prototype.computeVertexSnaps=function(){if(R(arguments[0],Et))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof lA)for(var A=arguments[0],n=A.getCoordinates(),r=0;r<n.length;r++){var i=new an(n[r],this._scaleFactor,this._li);this._pointSnapper.snap(i,A,r)&&A.addIntersection(n[r],r)}},Cn.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new pA,this._pointSnapper=new cn(this._noder.getIndex()),this.snapRound(t,this._li)},Cn.prototype.computeIntersectionSnaps=function(t){for(var e=t.iterator();e.hasNext();){var A=e.next(),n=new an(A,this._scaleFactor,this._li);this._pointSnapper.snap(n)}},Cn.prototype.interfaces_=function(){return[QA]},Cn.prototype.getClass=function(){return Cn};var hn=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new vA,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],A=arguments[1];this._argGeom=e,this._bufParams=A}},Bn={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};hn.prototype.bufferFixedPrecision=function(t){var e=new nn(new Cn(new le(1)),t.getScale()),A=new An(this._bufParams);A.setWorkingPrecisionModel(t),A.setNoder(e),this._resultGeometry=A.buffer(this._argGeom,this._distance)},hn.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=hn.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Se))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var A=arguments[0],n=hn.precisionScaleFactor(this._argGeom,this._distance,A),r=new le(n);this.bufferFixedPrecision(r)}},hn.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===le.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},hn.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},hn.prototype.bufferOriginalPrecision=function(){try{var t=new An(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof $))throw t;this._saveException=t}},hn.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},hn.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn},hn.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new hn(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var A=arguments[0],n=arguments[1],r=arguments[2],i=new hn(A);return i.setQuadrantSegments(r),i.getResultGeometry(n)}if(arguments[2]instanceof vA&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var o=arguments[0],a=arguments[1],s=arguments[2];return new hn(o,s).getResultGeometry(a)}}else if(4===arguments.length){var g=arguments[0],c=arguments[1],I=arguments[2],u=arguments[3],l=new hn(g);return l.setQuadrantSegments(I),l.setEndCapStyle(u),l.getResultGeometry(c)}},hn.precisionScaleFactor=function(t,e,A){var n=t.getEnvelopeInternal(),r=U.max(Math.abs(n.getMaxX()),Math.abs(n.getMaxY()),Math.abs(n.getMinX()),Math.abs(n.getMinY()))+2*(e>0?e:0),i=A-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,i)},Bn.CAP_ROUND.get=function(){return vA.CAP_ROUND},Bn.CAP_BUTT.get=function(){return vA.CAP_FLAT},Bn.CAP_FLAT.get=function(){return vA.CAP_FLAT},Bn.CAP_SQUARE.get=function(){return vA.CAP_SQUARE},Bn.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(hn,Bn);var fn=function(){this._pt=[new m,new m],this._distance=Q.NaN,this._isNull=!0};fn.prototype.getCoordinates=function(){return this._pt},fn.prototype.getCoordinate=function(t){return this._pt[t]},fn.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],A=arguments[1];if(this._isNull)return this.initialize(e,A),null;var n=e.distance(A);n<this._distance&&this.initialize(e,A,n)}},fn.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2];this._pt[0].setCoordinate(A),this._pt[1].setCoordinate(n),this._distance=r,this._isNull=!1}},fn.prototype.getDistance=function(){return this._distance},fn.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],A=arguments[1];if(this._isNull)return this.initialize(e,A),null;var n=e.distance(A);n>this._distance&&this.initialize(e,A,n)}},fn.prototype.interfaces_=function(){return[]},fn.prototype.getClass=function(){return fn};var dn=function(){};dn.prototype.interfaces_=function(){return[]},dn.prototype.getClass=function(){return dn},dn.computeDistance=function(){if(arguments[2]instanceof fn&&arguments[0]instanceof Pt&&arguments[1]instanceof m)for(var t=arguments[0],e=arguments[1],A=arguments[2],n=t.getCoordinates(),r=new CA,i=0;i<n.length-1;i++){r.setCoordinates(n[i],n[i+1]);var o=r.closestPoint(e);A.setMinimum(o,e)}else if(arguments[2]instanceof fn&&arguments[0]instanceof $t&&arguments[1]instanceof m){var a=arguments[0],s=arguments[1],g=arguments[2];dn.computeDistance(a.getExteriorRing(),s,g);for(var c=0;c<a.getNumInteriorRing();c++)dn.computeDistance(a.getInteriorRingN(c),s,g)}else if(arguments[2]instanceof fn&&arguments[0]instanceof ct&&arguments[1]instanceof m){var I=arguments[0],u=arguments[1],l=arguments[2];if(I instanceof Pt)dn.computeDistance(I,u,l);else if(I instanceof $t)dn.computeDistance(I,u,l);else if(I instanceof jt)for(var C=I,h=0;h<C.getNumGeometries();h++){var B=C.getGeometryN(h);dn.computeDistance(B,u,l)}else l.setMinimum(I.getCoordinate(),u)}else if(arguments[2]instanceof fn&&arguments[0]instanceof CA&&arguments[1]instanceof m){var f=arguments[0],d=arguments[1],Q=arguments[2],E=f.closestPoint(d);Q.setMinimum(E,d)}};var Qn=function(t){this._maxPtDist=new fn,this._inputGeom=t||null},En={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};Qn.prototype.computeMaxMidpointDistance=function(t){var e=new yn(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Qn.prototype.computeMaxVertexDistance=function(t){var e=new pn(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},Qn.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},Qn.prototype.getDistancePoints=function(){return this._maxPtDist},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn},En.MaxPointDistanceFilter.get=function(){return pn},En.MaxMidpointDistanceFilter.get=function(){return yn},Object.defineProperties(Qn,En);var pn=function(t){this._maxPtDist=new fn,this._minPtDist=new fn,this._geom=t||null};pn.prototype.filter=function(t){this._minPtDist.initialize(),dn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},pn.prototype.getMaxPointDistance=function(){return this._maxPtDist},pn.prototype.interfaces_=function(){return[lt]},pn.prototype.getClass=function(){return pn};var yn=function(t){this._maxPtDist=new fn,this._minPtDist=new fn,this._geom=t||null};yn.prototype.filter=function(t,e){if(0===e)return null;var A=t.getCoordinate(e-1),n=t.getCoordinate(e),r=new m((A.x+n.x)/2,(A.y+n.y)/2);this._minPtDist.initialize(),dn.computeDistance(this._geom,r,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},yn.prototype.isDone=function(){return!1},yn.prototype.isGeometryChanged=function(){return!1},yn.prototype.getMaxPointDistance=function(){return this._maxPtDist},yn.prototype.interfaces_=function(){return[Tt]},yn.prototype.getClass=function(){return yn};var vn=function(t){this._comps=t||null};vn.prototype.filter=function(t){t instanceof $t&&this._comps.add(t)},vn.prototype.interfaces_=function(){return[Jt]},vn.prototype.getClass=function(){return vn},vn.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return vn.getPolygons(t,new vt)}if(2===arguments.length){var e=arguments[0],A=arguments[1];return e instanceof $t?A.add(e):e instanceof jt&&e.apply(new vn(A)),A}};var mn=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],A=arguments[1];this._lines=e,this._isForcedToLineString=A}};mn.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ee){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Pt&&this._lines.add(t)},mn.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},mn.prototype.interfaces_=function(){return[gt]},mn.prototype.getClass=function(){return mn},mn.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(mn.getLines(t))}if(2===arguments.length){var e=arguments[0],A=arguments[1];return e.getFactory().buildGeometry(mn.getLines(e,A))}},mn.getLines=function(){if(1===arguments.length){var t=arguments[0];return mn.getLines(t,!1)}if(2===arguments.length){if(R(arguments[0],Et)&&R(arguments[1],Et)){for(var e=arguments[0],A=arguments[1],n=e.iterator();n.hasNext();){var r=n.next();mn.getLines(r,A)}return A}if(arguments[0]instanceof ct&&"boolean"==typeof arguments[1]){var i=arguments[0],o=arguments[1],a=new vt;return i.apply(new mn(a,o)),a}if(arguments[0]instanceof ct&&R(arguments[1],Et)){var s=arguments[0],g=arguments[1];return s instanceof Pt?g.add(s):s.apply(new mn(g)),g}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&R(arguments[0],Et)&&R(arguments[1],Et)){for(var c=arguments[0],I=arguments[1],u=arguments[2],l=c.iterator();l.hasNext();){var C=l.next();mn.getLines(C,I,u)}return I}if("boolean"==typeof arguments[2]&&arguments[0]instanceof ct&&R(arguments[1],Et)){var h=arguments[0],B=arguments[1],f=arguments[2];return h.apply(new mn(B,f)),B}}};var bn=function(){if(this._boundaryRule=Ct.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new d("Rule must be non-null");this._boundaryRule=t}};bn.prototype.locateInternal=function(){if(arguments[0]instanceof m&&arguments[1]instanceof $t){var t=arguments[0],e=arguments[1];if(e.isEmpty())return S.EXTERIOR;var A=e.getExteriorRing(),n=this.locateInPolygonRing(t,A);if(n===S.EXTERIOR)return S.EXTERIOR;if(n===S.BOUNDARY)return S.BOUNDARY;for(var r=0;r<e.getNumInteriorRing();r++){var i=e.getInteriorRingN(r),o=this.locateInPolygonRing(t,i);if(o===S.INTERIOR)return S.EXTERIOR;if(o===S.BOUNDARY)return S.BOUNDARY}return S.INTERIOR}if(arguments[0]instanceof m&&arguments[1]instanceof Pt){var a=arguments[0],s=arguments[1];if(!s.getEnvelopeInternal().intersects(a))return S.EXTERIOR;var g=s.getCoordinates();return s.isClosed()||!a.equals(g[0])&&!a.equals(g[g.length-1])?at.isOnLine(a,g)?S.INTERIOR:S.EXTERIOR:S.BOUNDARY}if(arguments[0]instanceof m&&arguments[1]instanceof Xt){var c=arguments[0];return arguments[1].getCoordinate().equals2D(c)?S.INTERIOR:S.EXTERIOR}},bn.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?at.locatePointInRing(t,e.getCoordinates()):S.EXTERIOR},bn.prototype.intersects=function(t,e){return this.locate(t,e)!==S.EXTERIOR},bn.prototype.updateLocationInfo=function(t){t===S.INTERIOR&&(this._isIn=!0),t===S.BOUNDARY&&this._numBoundaries++},bn.prototype.computeLocation=function(t,e){if(e instanceof Xt&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Pt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof $t)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ht)for(var A=e,n=0;n<A.getNumGeometries();n++){var r=A.getGeometryN(n);this.updateLocationInfo(this.locateInternal(t,r))}else if(e instanceof Ae)for(var i=e,o=0;o<i.getNumGeometries();o++){var a=i.getGeometryN(o);this.updateLocationInfo(this.locateInternal(t,a))}else if(e instanceof jt)for(var s=new JA(e);s.hasNext();){var g=s.next();g!==e&&this.computeLocation(t,g)}},bn.prototype.locate=function(t,e){return e.isEmpty()?S.EXTERIOR:e instanceof Pt||e instanceof $t?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?S.BOUNDARY:this._numBoundaries>0||this._isIn?S.INTERIOR:S.EXTERIOR)},bn.prototype.interfaces_=function(){return[]},bn.prototype.getClass=function(){return bn};var Fn=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],A=arguments[1];t.call(this,e,t.INSIDE_AREA,A)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._component=n,this._segIndex=r,this._pt=i}},wn={INSIDE_AREA:{configurable:!0}};Fn.prototype.isInsideArea=function(){return this._segIndex===Fn.INSIDE_AREA},Fn.prototype.getCoordinate=function(){return this._pt},Fn.prototype.getGeometryComponent=function(){return this._component},Fn.prototype.getSegmentIndex=function(){return this._segIndex},Fn.prototype.interfaces_=function(){return[]},Fn.prototype.getClass=function(){return Fn},wn.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Fn,wn);var Sn=function(t){this._pts=t||null};Sn.prototype.filter=function(t){t instanceof Xt&&this._pts.add(t)},Sn.prototype.interfaces_=function(){return[Jt]},Sn.prototype.getClass=function(){return Sn},Sn.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Xt?$e.singletonList(t):Sn.getPoints(t,new vt)}if(2===arguments.length){var e=arguments[0],A=arguments[1];return e instanceof Xt?A.add(e):e instanceof jt&&e.apply(new Sn(A)),A}};var Dn=function(){this._locations=null;var t=arguments[0];this._locations=t};Dn.prototype.filter=function(t){(t instanceof Xt||t instanceof Pt||t instanceof $t)&&this._locations.add(new Fn(t,0,t.getCoordinate()))},Dn.prototype.interfaces_=function(){return[Jt]},Dn.prototype.getClass=function(){return Dn},Dn.getLocations=function(t){var e=new vt;return t.apply(new Dn(e)),e};var Rn=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new bn,this._minDistanceLocation=null,this._minDistance=Q.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=A,this._geom[1]=n,this._terminateDistance=r}};Rn.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],A=arguments[1],n=1-e,r=vn.getPolygons(this._geom[e]);if(r.size()>0){var i=Dn.getLocations(this._geom[n]);if(this.computeContainmentDistance(i,r,A),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[n]=A[0],this._minDistanceLocation[e]=A[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&R(arguments[0],yt)&&R(arguments[1],yt)){for(var o=arguments[0],a=arguments[1],s=arguments[2],g=0;g<o.size();g++)for(var c=o.get(g),I=0;I<a.size();I++)if(this.computeContainmentDistance(c,a.get(I),s),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Fn&&arguments[1]instanceof $t){var u=arguments[0],l=arguments[1],C=arguments[2],h=u.getCoordinate();if(S.EXTERIOR!==this._ptLocator.locate(h,l))return this._minDistance=0,C[0]=u,C[1]=new Fn(l,h),null}},Rn.prototype.computeMinDistanceLinesPoints=function(t,e,A){for(var n=0;n<t.size();n++)for(var r=t.get(n),i=0;i<e.size();i++){var o=e.get(i);if(this.computeMinDistance(r,o,A),this._minDistance<=this._terminateDistance)return null}},Rn.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=mn.getLines(this._geom[0]),A=mn.getLines(this._geom[1]),n=Sn.getPoints(this._geom[0]),r=Sn.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,A,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(A,n,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(n,r,t),void this.updateMinDistance(t,!1))))},Rn.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Rn.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Rn.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Rn.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 Pt&&arguments[1]instanceof Xt){var t=arguments[0],e=arguments[1],A=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var n=t.getCoordinates(),r=e.getCoordinate(),i=0;i<n.length-1;i++){var o=at.distancePointLine(r,n[i],n[i+1]);if(o<this._minDistance){this._minDistance=o;var a=new CA(n[i],n[i+1]).closestPoint(r);A[0]=new Fn(t,i,a),A[1]=new Fn(e,0,r)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Pt&&arguments[1]instanceof Pt){var s=arguments[0],g=arguments[1],c=arguments[2];if(s.getEnvelopeInternal().distance(g.getEnvelopeInternal())>this._minDistance)return null;for(var I=s.getCoordinates(),u=g.getCoordinates(),l=0;l<I.length-1;l++)for(var C=0;C<u.length-1;C++){var h=at.distanceLineLine(I[l],I[l+1],u[C],u[C+1]);if(h<this._minDistance){this._minDistance=h;var B=new CA(I[l],I[l+1]),f=new CA(u[C],u[C+1]),d=B.closestPoints(f);c[0]=new Fn(s,l,d[0]),c[1]=new Fn(g,C,d[1])}if(this._minDistance<=this._terminateDistance)return null}}},Rn.prototype.computeMinDistancePoints=function(t,e,A){for(var n=0;n<t.size();n++)for(var r=t.get(n),i=0;i<e.size();i++){var o=e.get(i),a=r.getCoordinate().distance(o.getCoordinate());if(a<this._minDistance&&(this._minDistance=a,A[0]=new Fn(r,0,r.getCoordinate()),A[1]=new Fn(o,0,o.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},Rn.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new d("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Rn.prototype.computeMinDistanceLines=function(t,e,A){for(var n=0;n<t.size();n++)for(var r=t.get(n),i=0;i<e.size();i++){var o=e.get(i);if(this.computeMinDistance(r,o,A),this._minDistance<=this._terminateDistance)return null}},Rn.prototype.interfaces_=function(){return[]},Rn.prototype.getClass=function(){return Rn},Rn.distance=function(t,e){return new Rn(t,e).distance()},Rn.isWithinDistance=function(t,e,A){return new Rn(t,e,A).distance()<=A},Rn.nearestPoints=function(t,e){return new Rn(t,e).nearestPoints()};var Un=function(){this._pt=[new m,new m],this._distance=Q.NaN,this._isNull=!0};Un.prototype.getCoordinates=function(){return this._pt},Un.prototype.getCoordinate=function(t){return this._pt[t]},Un.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],A=arguments[1];if(this._isNull)return this.initialize(e,A),null;var n=e.distance(A);n<this._distance&&this.initialize(e,A,n)}},Un.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2];this._pt[0].setCoordinate(A),this._pt[1].setCoordinate(n),this._distance=r,this._isNull=!1}},Un.prototype.toString=function(){return z.toLineString(this._pt[0],this._pt[1])},Un.prototype.getDistance=function(){return this._distance},Un.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],A=arguments[1];if(this._isNull)return this.initialize(e,A),null;var n=e.distance(A);n>this._distance&&this.initialize(e,A,n)}},Un.prototype.interfaces_=function(){return[]},Un.prototype.getClass=function(){return Un};var Gn=function(){};Gn.prototype.interfaces_=function(){return[]},Gn.prototype.getClass=function(){return Gn},Gn.computeDistance=function(){if(arguments[2]instanceof Un&&arguments[0]instanceof Pt&&arguments[1]instanceof m)for(var t=arguments[0],e=arguments[1],A=arguments[2],n=new CA,r=t.getCoordinates(),i=0;i<r.length-1;i++){n.setCoordinates(r[i],r[i+1]);var o=n.closestPoint(e);A.setMinimum(o,e)}else if(arguments[2]instanceof Un&&arguments[0]instanceof $t&&arguments[1]instanceof m){var a=arguments[0],s=arguments[1],g=arguments[2];Gn.computeDistance(a.getExteriorRing(),s,g);for(var c=0;c<a.getNumInteriorRing();c++)Gn.computeDistance(a.getInteriorRingN(c),s,g)}else if(arguments[2]instanceof Un&&arguments[0]instanceof ct&&arguments[1]instanceof m){var I=arguments[0],u=arguments[1],l=arguments[2];if(I instanceof Pt)Gn.computeDistance(I,u,l);else if(I instanceof $t)Gn.computeDistance(I,u,l);else if(I instanceof jt)for(var C=I,h=0;h<C.getNumGeometries();h++){var B=C.getGeometryN(h);Gn.computeDistance(B,u,l)}else l.setMinimum(I.getCoordinate(),u)}else if(arguments[2]instanceof Un&&arguments[0]instanceof CA&&arguments[1]instanceof m){var f=arguments[0],d=arguments[1],Q=arguments[2],E=f.closestPoint(d);Q.setMinimum(E,d)}};var Nn=function(){this._g0=null,this._g1=null,this._ptDist=new Un,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},kn={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Nn.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Nn.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new d("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Nn.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Nn.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Nn.prototype.computeOrientedDistance=function(t,e,A){var n=new xn(e);if(t.apply(n),A.setMaximum(n.getMaxPointDistance()),this._densifyFrac>0){var r=new On(e,this._densifyFrac);t.apply(r),A.setMaximum(r.getMaxPointDistance())}},Nn.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn},Nn.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Nn(t,e).distance()}if(3===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2],i=new Nn(A,n);return i.setDensifyFraction(r),i.distance()}},kn.MaxPointDistanceFilter.get=function(){return xn},kn.MaxDensifiedByFractionDistanceFilter.get=function(){return On},Object.defineProperties(Nn,kn);var xn=function(){this._maxPtDist=new Un,this._minPtDist=new Un,this._euclideanDist=new Gn,this._geom=null;var t=arguments[0];this._geom=t};xn.prototype.filter=function(t){this._minPtDist.initialize(),Gn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},xn.prototype.getMaxPointDistance=function(){return this._maxPtDist},xn.prototype.interfaces_=function(){return[lt]},xn.prototype.getClass=function(){return xn};var On=function(){this._maxPtDist=new Un,this._minPtDist=new Un,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};On.prototype.filter=function(t,e){if(0===e)return null;for(var A=t.getCoordinate(e-1),n=t.getCoordinate(e),r=(n.x-A.x)/this._numSubSegs,i=(n.y-A.y)/this._numSubSegs,o=0;o<this._numSubSegs;o++){var a=A.x+o*r,s=A.y+o*i,g=new m(a,s);this._minPtDist.initialize(),Gn.computeDistance(this._geom,g,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},On.prototype.isDone=function(){return!1},On.prototype.isGeometryChanged=function(){return!1},On.prototype.getMaxPointDistance=function(){return this._maxPtDist},On.prototype.interfaces_=function(){return[Tt]},On.prototype.getClass=function(){return On};var Mn=function(t,e,A){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=t||null,this._bufDistance=e||null,this._result=A||null},Ln={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Mn.prototype.checkMaximumDistance=function(t,e,A){var n=new Nn(e,t);if(n.setDensifyFraction(.25),this._maxDistanceFound=n.orientedDistance(),this._maxDistanceFound>A){this._isValid=!1;var r=n.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+z.toLineString(r[0],r[1])+")"}},Mn.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Mn.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Mn.VERBOSE&&Y.out.println("Min Dist= "+this._minDistanceFound+"  err= "+(1-this._minDistanceFound/this._bufDistance)+"  Max Dist= "+this._maxDistanceFound+"  err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Mn.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof Ae||this._input instanceof jt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Mn.prototype.getErrorIndicator=function(){return this._errorIndicator},Mn.prototype.checkMinimumDistance=function(t,e,A){var n=new Rn(t,e,A);if(this._minDistanceFound=n.distance(),this._minDistanceFound<A){this._isValid=!1;var r=n.nearestPoints();this._errorLocation=n.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+z.toLineString(r[0],r[1])+" )"}},Mn.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Mn.prototype.getErrorLocation=function(){return this._errorLocation},Mn.prototype.getPolygonLines=function(t){for(var e=new vt,A=new mn(e),n=vn.getPolygons(t).iterator();n.hasNext();)n.next().apply(A);return t.getFactory().buildGeometry(e)},Mn.prototype.getErrorMessage=function(){return this._errMsg},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Ln.VERBOSE.get=function(){return!1},Ln.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Mn,Ln);var _n=function(t,e,A){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=A||null},Jn={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};_n.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},_n.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*_n.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new Z(this._input.getEnvelopeInternal());e.expandBy(this._distance);var A=new Z(this._result.getEnvelopeInternal());A.expandBy(t),A.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(A)),this.report("Envelope")},_n.prototype.checkDistance=function(){var t=new Mn(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},_n.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},_n.prototype.checkPolygonal=function(){this._result instanceof $t||this._result instanceof Ae||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},_n.prototype.getErrorIndicator=function(){return this._errorIndicator},_n.prototype.getErrorLocation=function(){return this._errorLocation},_n.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"))},_n.prototype.report=function(t){if(!_n.VERBOSE)return null;Y.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},_n.prototype.getErrorMessage=function(){return this._errorMsg},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n},_n.isValidMsg=function(t,e,A){var n=new _n(t,e,A);return n.isValid()?null:n.getErrorMessage()},_n.isValid=function(t,e,A){return!!new _n(t,e,A).isValid()},Jn.VERBOSE.get=function(){return!1},Jn.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(_n,Jn);var Tn=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Tn.prototype.getCoordinates=function(){return this._pts},Tn.prototype.size=function(){return this._pts.length},Tn.prototype.getCoordinate=function(t){return this._pts[t]},Tn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Tn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:cA.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Tn.prototype.setData=function(t){this._data=t},Tn.prototype.getData=function(){return this._data},Tn.prototype.toString=function(){return z.toLineString(new se(this._pts))},Tn.prototype.interfaces_=function(){return[IA]},Tn.prototype.getClass=function(){return Tn};var jn=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new vt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};jn.prototype.getInteriorIntersection=function(){return this._interiorIntersection},jn.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},jn.prototype.getIntersectionSegments=function(){return this._intSegments},jn.prototype.count=function(){return this._intersectionCount},jn.prototype.getIntersections=function(){return this._intersections},jn.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},jn.prototype.setKeepIntersections=function(t){this._keepIntersections=t},jn.prototype.processIntersections=function(t,e,A,n){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===A&&e===n)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(A,n))return null;var r=t.getCoordinates()[e],i=t.getCoordinates()[e+1],o=A.getCoordinates()[n],a=A.getCoordinates()[n+1];this._li.computeIntersection(r,i,o,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=i,this._intSegments[2]=o,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},jn.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},jn.prototype.hasIntersection=function(){return null!==this._interiorIntersection},jn.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},jn.prototype.interfaces_=function(){return[WA]},jn.prototype.getClass=function(){return jn},jn.createAllIntersectionsFinder=function(t){var e=new jn(t);return e.setFindAllIntersections(!0),e},jn.createAnyIntersectionFinder=function(t){return new jn(t)},jn.createIntersectionCounter=function(t){var e=new jn(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Hn=function(){this._li=new rt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Hn.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Hn.prototype.getIntersections=function(){return this._segInt.getIntersections()},Hn.prototype.isValid=function(){return this.execute(),this._isValid},Hn.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Hn.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new jn(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new pA;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Hn.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Se(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Hn.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+z.toLineString(t[0],t[1])+" and "+z.toLineString(t[2],t[3])},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn},Hn.computeIntersections=function(t){var e=new Hn(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Yn=function t(){this._nv=null;var e=arguments[0];this._nv=new Hn(t.toSegmentStrings(e))};Yn.prototype.checkValid=function(){this._nv.checkValid()},Yn.prototype.interfaces_=function(){return[]},Yn.prototype.getClass=function(){return Yn},Yn.toSegmentStrings=function(t){for(var e=new vt,A=t.iterator();A.hasNext();){var n=A.next();e.add(new Tn(n.getCoordinates(),n))}return e},Yn.checkValid=function(t){new Yn(t).checkValid()};var Vn=function(t){this._mapOp=t};Vn.prototype.map=function(t){for(var e=new vt,A=0;A<t.getNumGeometries();A++){var n=this._mapOp.map(t.getGeometryN(A));n.isEmpty()||e.add(n)}return t.getFactory().createGeometryCollection(fe.toGeometryArray(e))},Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn},Vn.map=function(t,e){return new Vn(e).map(t)};var Zn=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new vt,this._resultLineList=new vt;var t=arguments[0],e=arguments[1],A=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=A};Zn.prototype.collectLines=function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var A=e.next();this.collectLineEdge(A,t,this._lineEdgesList),this.collectBoundaryTouchEdge(A,t,this._lineEdgesList)}},Zn.prototype.labelIsolatedLine=function(t,e){var A=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,A)},Zn.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Zn.prototype.collectLineEdge=function(t,e,A){var n=t.getLabel(),r=t.getEdge();t.isLineEdge()&&(t.isVisited()||!Fr.isResultOfOp(n,e)||r.isCovered()||(A.add(r),t.setVisitedEdge(!0)))},Zn.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();)t.next().getEdges().findCoveredLineEdges();for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var A=e.next(),n=A.getEdge();if(A.isLineEdge()&&!n.isCoveredSet()){var r=this._op.isCoveredByA(A.getCoordinate());n.setCovered(r)}}},Zn.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var A=e.next(),n=A.getLabel();A.isIsolated()&&(n.isNull(0)?this.labelIsolatedLine(A,0):this.labelIsolatedLine(A,1))}},Zn.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var A=e.next(),n=this._geometryFactory.createLineString(A.getCoordinates());this._resultLineList.add(n),A.setInResult(!0)}},Zn.prototype.collectBoundaryTouchEdge=function(t,e,A){var n=t.getLabel();return t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult()?null:(et.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(Fr.isResultOfOp(n,e)&&e===Fr.INTERSECTION&&(A.add(t.getEdge()),t.setVisitedEdge(!0))))},Zn.prototype.interfaces_=function(){return[]},Zn.prototype.getClass=function(){return Zn};var Wn=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new vt;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Wn.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var A=this._geometryFactory.createPoint(e);this._resultPointList.add(A)}},Wn.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var A=e.next();if(!A.isInResult()&&!A.isIncidentEdgeInResult()&&(0===A.getEdges().getDegree()||t===Fr.INTERSECTION)){var n=A.getLabel();Fr.isResultOfOp(n,t)&&this.filterCoveredNodeToPoint(A)}}},Wn.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn};var Kn=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Kn.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Kn.prototype.transformPolygon=function(t,e){var A=!0,n=this.transformLinearRing(t.getExteriorRing(),t);null!==n&&n instanceof ee&&!n.isEmpty()||(A=!1);for(var r=new vt,i=0;i<t.getNumInteriorRing();i++){var o=this.transformLinearRing(t.getInteriorRingN(i),t);null===o||o.isEmpty()||(o instanceof ee||(A=!1),r.add(o))}if(A)return this._factory.createPolygon(n,r.toArray([]));var a=new vt;return null!==n&&a.add(n),a.addAll(r),this._factory.buildGeometry(a)},Kn.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Kn.prototype.getInputGeometry=function(){return this._inputGeom},Kn.prototype.transformMultiLineString=function(t,e){for(var A=new vt,n=0;n<t.getNumGeometries();n++){var r=this.transformLineString(t.getGeometryN(n),t);null!==r&&(r.isEmpty()||A.add(r))}return this._factory.buildGeometry(A)},Kn.prototype.transformCoordinates=function(t,e){return this.copy(t)},Kn.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Kn.prototype.transformMultiPoint=function(t,e){for(var A=new vt,n=0;n<t.getNumGeometries();n++){var r=this.transformPoint(t.getGeometryN(n),t);null!==r&&(r.isEmpty()||A.add(r))}return this._factory.buildGeometry(A)},Kn.prototype.transformMultiPolygon=function(t,e){for(var A=new vt,n=0;n<t.getNumGeometries();n++){var r=this.transformPolygon(t.getGeometryN(n),t);null!==r&&(r.isEmpty()||A.add(r))}return this._factory.buildGeometry(A)},Kn.prototype.copy=function(t){return t.copy()},Kn.prototype.transformGeometryCollection=function(t,e){for(var A=new vt,n=0;n<t.getNumGeometries();n++){var r=this.transform(t.getGeometryN(n));null!==r&&(this._pruneEmptyGeometry&&r.isEmpty()||A.add(r))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(fe.toGeometryArray(A)):this._factory.buildGeometry(A)},Kn.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Xt)return this.transformPoint(t,null);if(t instanceof te)return this.transformMultiPoint(t,null);if(t instanceof ee)return this.transformLinearRing(t,null);if(t instanceof Pt)return this.transformLineString(t,null);if(t instanceof Ht)return this.transformMultiLineString(t,null);if(t instanceof $t)return this.transformPolygon(t,null);if(t instanceof Ae)return this.transformMultiPolygon(t,null);if(t instanceof jt)return this.transformGeometryCollection(t,null);throw new d("Unknown Geometry subtype: "+t.getClass().getName())},Kn.prototype.transformLinearRing=function(t,e){var A=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===A)return this._factory.createLinearRing(null);var n=A.size();return n>0&&n<4&&!this._preserveType?this._factory.createLineString(A):this._factory.createLinearRing(A)},Kn.prototype.interfaces_=function(){return[]},Kn.prototype.getClass=function(){return Kn};var Pn=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new CA,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Pt&&"number"==typeof arguments[1]){var e=arguments[0],A=arguments[1];t.call(this,e.getCoordinates(),A)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this._srcPts=n,this._isClosed=t.isClosed(n),this._snapTolerance=r}};Pn.prototype.snapVertices=function(t,e){for(var A=this._isClosed?t.size()-1:t.size(),n=0;n<A;n++){var r=t.get(n),i=this.findSnapForVertex(r,e);null!==i&&(t.set(n,new m(i)),0===n&&this._isClosed&&t.set(t.size()-1,new m(i)))}},Pn.prototype.findSnapForVertex=function(t,e){for(var A=0;A<e.length;A++){if(t.equals2D(e[A]))return null;if(t.distance(e[A])<this._snapTolerance)return e[A]}return null},Pn.prototype.snapTo=function(t){var e=new bt(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()},Pn.prototype.snapSegments=function(t,e){if(0===e.length)return null;var A=e.length;e[0].equals2D(e[e.length-1])&&(A=e.length-1);for(var n=0;n<A;n++){var r=e[n],i=this.findSegmentIndexToSnap(r,t);i>=0&&t.add(i+1,new m(r),!1)}},Pn.prototype.findSegmentIndexToSnap=function(t,e){for(var A=Q.MAX_VALUE,n=-1,r=0;r<e.size()-1;r++){if(this._seg.p0=e.get(r),this._seg.p1=e.get(r+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var i=this._seg.distance(t);i<this._snapTolerance&&i<A&&(A=i,n=r)}return n},Pn.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn},Pn.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var qn=function(t){this._srcGeom=t||null},Xn={SNAP_PRECISION_FACTOR:{configurable:!0}};qn.prototype.snapTo=function(t,e){var A=this.extractTargetCoordinates(t);return new zn(e,A).transform(this._srcGeom)},qn.prototype.snapToSelf=function(t,e){var A=this.extractTargetCoordinates(this._srcGeom),n=new zn(t,A,!0).transform(this._srcGeom),r=n;return e&&R(r,zt)&&(r=n.buffer(0)),r},qn.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},qn.prototype.extractTargetCoordinates=function(t){for(var e=new l,A=t.getCoordinates(),n=0;n<A.length;n++)e.add(A[n]);return e.toArray(new Array(0).fill(null))},qn.prototype.computeMinimumSegmentLength=function(t){for(var e=Q.MAX_VALUE,A=0;A<t.length-1;A++){var n=t[A].distance(t[A+1]);n<e&&(e=n)}return e},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn},qn.snap=function(t,e,A){var n=new Array(2).fill(null),r=new qn(t);n[0]=r.snapTo(e,A);var i=new qn(e);return n[1]=i.snapTo(n[0],A),n},qn.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=qn.computeSizeBasedSnapTolerance(t),A=t.getPrecisionModel();if(A.getType()===le.FIXED){var n=1/A.getScale()*2/1.415;n>e&&(e=n)}return e}if(2===arguments.length){var r=arguments[0],i=arguments[1];return Math.min(qn.computeOverlaySnapTolerance(r),qn.computeOverlaySnapTolerance(i))}},qn.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*qn.SNAP_PRECISION_FACTOR},qn.snapToSelf=function(t,e,A){return new qn(t).snapToSelf(e,A)},Xn.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(qn,Xn);var zn=function(t){function e(e,A,n){t.call(this),this._snapTolerance=e||null,this._snapPts=A||null,this._isSelfSnap=void 0!==n&&n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var A=new Pn(t,this._snapTolerance);return A.setAllowSnappingToSourceVertices(this._isSelfSnap),A.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var A=t.toCoordinateArray(),n=this.snapLine(A,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Kn),$n=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$n.prototype.getCommon=function(){return Q.longBitsToDouble(this._commonBits)},$n.prototype.add=function(t){var e=Q.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=$n.signExpBits(this._commonBits),this._isFirst=!1,null):$n.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=$n.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=$n.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},$n.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=Q.longBitsToDouble(t),A="0000000000000000000000000000000000000000000000000000000000000000"+Q.toBinaryString(t),n=A.substring(A.length-64);return n.substring(0,1)+"  "+n.substring(1,12)+"(exp) "+n.substring(12)+" [ "+e+" ]"}},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n},$n.getBit=function(t,e){return 0!=(t&1<<e)?1:0},$n.signExpBits=function(t){return t>>52},$n.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},$n.numCommonMostSigMantissaBits=function(t,e){for(var A=0,n=52;n>=0;n--){if($n.getBit(t,n)!==$n.getBit(e,n))return A;A++}return 52};var tr=function(){this._commonCoord=null,this._ccFilter=new Ar},er={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};tr.prototype.addCommonBits=function(t){var e=new nr(this._commonCoord);t.apply(e),t.geometryChanged()},tr.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new m(this._commonCoord);e.x=-e.x,e.y=-e.y;var A=new nr(e);return t.apply(A),t.geometryChanged(),t},tr.prototype.getCommonCoordinate=function(){return this._commonCoord},tr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},er.CommonCoordinateFilter.get=function(){return Ar},er.Translater.get=function(){return nr},Object.defineProperties(tr,er);var Ar=function(){this._commonBitsX=new $n,this._commonBitsY=new $n};Ar.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},Ar.prototype.getCommonCoordinate=function(){return new m(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Ar.prototype.interfaces_=function(){return[lt]},Ar.prototype.getClass=function(){return Ar};var nr=function(){this.trans=null;var t=arguments[0];this.trans=t};nr.prototype.filter=function(t,e){var A=t.getOrdinate(e,0)+this.trans.x,n=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,A),t.setOrdinate(e,1,n)},nr.prototype.isDone=function(){return!1},nr.prototype.isGeometryChanged=function(){return!0},nr.prototype.interfaces_=function(){return[Tt]},nr.prototype.getClass=function(){return nr};var rr=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};rr.prototype.selfSnap=function(t){return new qn(t).snapTo(t,this._snapTolerance)},rr.prototype.removeCommonBits=function(t){this._cbr=new tr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},rr.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},rr.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),A=Fr.overlayOp(e[0],e[1],t);return this.prepareResult(A)},rr.prototype.checkValid=function(t){t.isValid()||Y.out.println("Snapped geometry is invalid")},rr.prototype.computeSnapTolerance=function(){this._snapTolerance=qn.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},rr.prototype.snap=function(t){var e=this.removeCommonBits(t);return qn.snap(e[0],e[1],this._snapTolerance)},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.overlayOp=function(t,e,A){return new rr(t,e).getResultGeometry(A)},rr.union=function(t,e){return rr.overlayOp(t,e,Fr.UNION)},rr.intersection=function(t,e){return rr.overlayOp(t,e,Fr.INTERSECTION)},rr.symDifference=function(t,e){return rr.overlayOp(t,e,Fr.SYMDIFFERENCE)},rr.difference=function(t,e){return rr.overlayOp(t,e,Fr.DIFFERENCE)};var ir=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};ir.prototype.getResultGeometry=function(t){var e=null,A=!1,n=null;try{e=Fr.overlayOp(this._geom[0],this._geom[1],t),A=!0}catch(t){if(!(t instanceof $))throw t;n=t}if(!A)try{e=rr.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof $?n:t}return e},ir.prototype.interfaces_=function(){return[]},ir.prototype.getClass=function(){return ir},ir.overlayOp=function(t,e,A){return new ir(t,e).getResultGeometry(A)},ir.union=function(t,e){return ir.overlayOp(t,e,Fr.UNION)},ir.intersection=function(t,e){return ir.overlayOp(t,e,Fr.INTERSECTION)},ir.symDifference=function(t,e){return ir.overlayOp(t,e,Fr.SYMDIFFERENCE)},ir.difference=function(t,e){return ir.overlayOp(t,e,Fr.DIFFERENCE)};var or=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};or.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or};var ar=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],A=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=A}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._eventType=t.INSERT,this._label=n,this._xValue=r,this._obj=i}},sr={INSERT:{configurable:!0},DELETE:{configurable:!0}};ar.prototype.isDelete=function(){return this._eventType===ar.DELETE},ar.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ar.prototype.getObject=function(){return this._obj},ar.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},ar.prototype.getInsertEvent=function(){return this._insertEvent},ar.prototype.isInsert=function(){return this._eventType===ar.INSERT},ar.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ar.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ar.prototype.interfaces_=function(){return[p]},ar.prototype.getClass=function(){return ar},sr.INSERT.get=function(){return 1},sr.DELETE.get=function(){return 2},Object.defineProperties(ar,sr);var gr=function(){};gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr};var cr=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 t=arguments[0],e=arguments[1],A=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=A};cr.prototype.isTrivialIntersection=function(t,e,A,n){if(t===A&&1===this._li.getIntersectionNum()){if(cr.isAdjacentSegments(e,n))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&n===r||0===n&&e===r)return!0}}return!1},cr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},cr.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},cr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},cr.prototype.isBoundaryPointInternal=function(t,e){for(var A=e.iterator();A.hasNext();){var n=A.next().getCoordinate();if(t.isIntersection(n))return!0}return!1},cr.prototype.hasProperIntersection=function(){return this._hasProper},cr.prototype.hasIntersection=function(){return this._hasIntersection},cr.prototype.isDone=function(){return this._isDone},cr.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},cr.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},cr.prototype.addIntersections=function(t,e,A,n){if(t===A&&e===n)return null;this.numTests++;var r=t.getCoordinates()[e],i=t.getCoordinates()[e+1],o=A.getCoordinates()[n],a=A.getCoordinates()[n+1];this._li.computeIntersection(r,i,o,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),A.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,A,n)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),A.addIntersections(this._li,n,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))))},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var Ir=function(t){function e(){t.call(this),this.events=new vt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){$e.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var A=this.events.get(e);if(A.isInsert()&&this.processOverlaps(e,A.getDeleteEventIndex(),A,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof cr&&R(arguments[0],yt)&&R(arguments[1],yt)){var n=arguments[0],r=arguments[1],i=arguments[2];this.addEdges(n,n),this.addEdges(r,r),this.computeIntersections(i)}else if("boolean"==typeof arguments[2]&&R(arguments[0],yt)&&arguments[1]instanceof cr){var o=arguments[0],a=arguments[1];arguments[2]?this.addEdges(o,null):this.addEdges(o),this.computeIntersections(a)}},e.prototype.addEdge=function(t,e){for(var A=t.getMonotoneChainEdge(),n=A.getStartIndexes(),r=0;r<n.length-1;r++){var i=new or(A,r),o=new ar(e,A.getMinX(r),i);this.events.add(o),this.events.add(new ar(A.getMaxX(r),o))}},e.prototype.processOverlaps=function(t,e,A,n){for(var r=A.getObject(),i=t;i<e;i++){var o=this.events.get(i);if(o.isInsert()){var a=o.getObject();A.isSameLabel(o)||(r.computeIntersections(a,n),this.nOverlaps++)}}},e.prototype.addEdges=function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length)for(var A=arguments[0],n=arguments[1],r=A.iterator();r.hasNext();){var i=r.next();this.addEdge(i,n)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(gr),ur=function(){this._min=Q.POSITIVE_INFINITY,this._max=Q.NEGATIVE_INFINITY},lr={NodeComparator:{configurable:!0}};ur.prototype.getMin=function(){return this._min},ur.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},ur.prototype.getMax=function(){return this._max},ur.prototype.toString=function(){return z.toLineString(new m(this._min,0),new m(this._max,0))},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},lr.NodeComparator.get=function(){return Cr},Object.defineProperties(ur,lr);var Cr=function(){};Cr.prototype.compare=function(t,e){var A=t,n=e,r=(A._min+A._max)/2,i=(n._min+n._max)/2;return r<i?-1:r>i?1:0},Cr.prototype.interfaces_=function(){return[v]},Cr.prototype.getClass=function(){return Cr};var hr=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],A=arguments[1],n=arguments[2];this._min=e,this._max=A,this._item=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,A){if(!this.intersects(t,e))return null;A.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ur),Br=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],A=arguments[1];this._node1=e,this._node2=A,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,A){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,A),null!==this._node2&&this._node2.query(t,e,A)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ur),fr=function(){this._leaves=new vt,this._root=null,this._level=0};fr.prototype.buildTree=function(){$e.sort(this._leaves,new ur.NodeComparator);for(var t=this._leaves,e=null,A=new vt;;){if(this.buildLevel(t,A),1===A.size())return A.get(0);e=t,t=A,A=e}},fr.prototype.insert=function(t,e,A){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new hr(t,e,A))},fr.prototype.query=function(t,e,A){this.init(),this._root.query(t,e,A)},fr.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},fr.prototype.printNode=function(t){Y.out.println(z.toLineString(new m(t._min,this._level),new m(t._max,this._level)))},fr.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},fr.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var A=0;A<t.size();A+=2){var n=t.get(A);if(null===(A+1<t.size()?t.get(A):null))e.add(n);else{var r=new Br(t.get(A),t.get(A+1));e.add(r)}}},fr.prototype.interfaces_=function(){return[]},fr.prototype.getClass=function(){return fr};var dr=function(){this._items=new vt};dr.prototype.visitItem=function(t){this._items.add(t)},dr.prototype.getItems=function(){return this._items},dr.prototype.interfaces_=function(){return[Pe]},dr.prototype.getClass=function(){return dr};var Qr=function(){this._index=null;var t=arguments[0];if(!R(t,zt))throw new d("Argument must be Polygonal");this._index=new yr(t)},Er={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Qr.prototype.locate=function(t){var e=new ot(t),A=new pr(e);return this._index.query(t.y,t.y,A),e.getLocation()},Qr.prototype.interfaces_=function(){return[_A]},Qr.prototype.getClass=function(){return Qr},Er.SegmentVisitor.get=function(){return pr},Er.IntervalIndexedGeometry.get=function(){return yr},Object.defineProperties(Qr,Er);var pr=function(){this._counter=null;var t=arguments[0];this._counter=t};pr.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},pr.prototype.interfaces_=function(){return[Pe]},pr.prototype.getClass=function(){return pr};var yr=function(){this._index=new fr;var t=arguments[0];this.init(t)};yr.prototype.init=function(t){for(var e=mn.getLines(t).iterator();e.hasNext();){var A=e.next().getCoordinates();this.addLine(A)}},yr.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var A=new CA(t[e-1],t[e]),n=Math.min(A.p0.y,A.p1.y),r=Math.max(A.p0.y,A.p1.y);this._index.insert(n,r,A)}},yr.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],A=new dr;return this._index.query(t,e,A),A.getItems()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._index.query(n,r,i)}},yr.prototype.interfaces_=function(){return[]},yr.prototype.getClass=function(){return yr};var vr=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new ue,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new bn,2===arguments.length){var e=arguments[0],A=arguments[1],n=Ct.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=A,this._boundaryNodeRule=n,null!==A&&this.add(A)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._argIndex=r,this._parentGeom=i,this._boundaryNodeRule=o,null!==i&&this.add(i)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,A){var n=this._nodes.addNode(A).getLabel(),r=1;n.getLocation(t,be.ON)===S.BOUNDARY&&r++;var i=e.determineBoundary(this._boundaryNodeRule,r);n.setLocation(t,i)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var A=arguments[0],n=arguments[1],r=arguments[2],i=new cr(A,!0,!1);i.setIsDoneIfProperInt(r);var o=this.createEdgeSetIntersector(),a=this._parentGeom instanceof ee||this._parentGeom instanceof $t||this._parentGeom instanceof Ae,s=n||!a;return o.computeIntersections(this._edges,i,s),this.addSelfIntersectionNodes(this._argIndex),i}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();)e.next().eiList.addSplitEdges(t)},e.prototype.computeEdgeIntersections=function(t,e,A){var n=new cr(e,A,!0);return n.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,n),n},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Xt){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,S.INTERIOR)}else if(arguments[0]instanceof m){var e=arguments[0];this.insertPoint(this._argIndex,e,S.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),S.EXTERIOR,S.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var A=t.getInteriorRingN(e);this.addPolygonRing(A,S.INTERIOR,S.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],S.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],S.BOUNDARY)},e.prototype.addLineString=function(t){var e=Ft.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var A=new en(e,new Ge(this._argIndex,S.INTERIOR));this._lineEdgeMap.put(t,A),this.insertEdge(A),et.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),A=0,n=t.iterator();n.hasNext();){var r=n.next();e[A++]=r.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,A){if(this.isBoundaryNode(t,e))return null;A===S.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,A)},e.prototype.addPolygonRing=function(t,e,A){if(t.isEmpty())return null;var n=Ft.removeRepeatedPoints(t.getCoordinates());if(n.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=n[0],null;var r=e,i=A;at.isCCW(n)&&(r=A,i=e);var o=new en(n,new Ge(this._argIndex,S.BOUNDARY,r,i));this._lineEdgeMap.put(t,o),this.insertEdge(o),this.insertPoint(this._argIndex,n[0],S.BOUNDARY)},e.prototype.insertPoint=function(t,e,A){var n=this._nodes.addNode(e),r=n.getLabel();null===r?n._label=new Ge(t,A):r.setLocation(t,A)},e.prototype.createEdgeSetIntersector=function(){return new Ir},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var A=e.next(),n=A.getLabel().getLocation(t),r=A.eiList.iterator();r.hasNext();){var i=r.next();this.addSelfIntersectionNode(t,i.coord,n)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof Ae&&(this._useBoundaryDeterminationRule=!1),e instanceof $t)this.addPolygon(e);else if(e instanceof Pt)this.addLineString(e);else if(e instanceof Xt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Ht)this.addCollection(e);else if(e instanceof Ae)this.addCollection(e);else{if(!(e instanceof jt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var A=t.getGeometryN(e);this.add(A)}},e.prototype.locate=function(t){return R(this._parentGeom,zt)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new Qr(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?S.BOUNDARY:S.INTERIOR},e}(Ye),mr=function(){if(this._li=new rt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new vr(0,t)}else if(2===arguments.length){var e=arguments[0],A=arguments[1],n=Ct.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(A.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(A.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new vr(0,e,n),this._arg[1]=new vr(1,A,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];r.getPrecisionModel().compareTo(i.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(i.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new vr(0,r,o),this._arg[1]=new vr(1,i,o)}};mr.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},mr.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var br=function(){};br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br},br.map=function(){if(arguments[0]instanceof ct&&R(arguments[1],br.MapOp)){for(var t=arguments[0],e=arguments[1],A=new vt,n=0;n<t.getNumGeometries();n++){var r=e.map(t.getGeometryN(n));null!==r&&A.add(r)}return t.getFactory().buildGeometry(A)}if(R(arguments[0],Et)&&R(arguments[1],br.MapOp)){for(var i=arguments[0],o=arguments[1],a=new vt,s=i.iterator();s.hasNext();){var g=s.next(),c=o.map(g);null!==c&&a.add(c)}return a}},br.MapOp=function(){};var Fr=function(t){function e(){var e=arguments[0],A=arguments[1];t.call(this,e,A),this._ptLocator=new bn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new ZA,this._resultPolyList=new vt,this._resultLineList=new vt,this._resultPointList=new vt,this._graph=new Ye(new YA),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var A=e.getLabel(),n=t.getLabel();e.isPointwiseEqual(t)||(n=new Ge(t.getLabel())).flip();var r=e.getDepth();r.isNull()&&r.add(A),r.add(n),A.merge(n)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),A=e.getSym();e.isInResult()&&A.isInResult()&&(e.setInResult(!1),A.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,A,n,r){var i=new vt;return i.addAll(t),i.addAll(A),i.addAll(n),i.isEmpty()?e.createEmptyResult(r,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(i)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().mergeSymLabels()},e.prototype.isCovered=function(t,e){for(var A=e.iterator();A.hasNext();){var n=A.next();if(this._ptLocator.locate(t,n)!==S.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new vt,e=this._edgeList.iterator();e.hasNext();){var A=e.next();A.isCollapsed()&&(e.remove(),t.add(A.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),A=e.getEdges().getLabel();e.getLabel().merge(A)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var A=e.next();this.insertUniqueEdge(A)}},e.prototype.computeOverlay=function(t){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 e=new vt;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Yn.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var A=new Ve(this._geomFact);A.add(this._graph),this._resultPolyList=A.getPolygons();var n=new Zn(this,this._geomFact,this._ptLocator);this._resultLineList=n.build(t);var r=new Wn(this,this._geomFact,this._ptLocator);this._resultPointList=r.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var A=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,A)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var A=e.next();this._graph.addNode(A.getCoordinate()).setLabel(t,A.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var A=this._graph.getEdgeEnds().iterator();A.hasNext();){var n=A.next(),r=n.getLabel();r.isArea()&&!n.isInteriorAreaEdge()&&e.isResultOfOp(r.getLocation(0,be.RIGHT),r.getLocation(1,be.RIGHT),t)&&n.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),A=e.getLabel(),n=e.getDepth();if(!n.isNull()){n.normalize();for(var r=0;r<2;r++)A.isNull(r)||!A.isArea()||n.isNull(r)||(0===n.getDelta(r)?A.toLine(r):(et.isTrue(!n.isNull(r,be.LEFT),"depth of LEFT side has not been initialized"),A.setLocation(r,be.LEFT,n.getLocation(r,be.LEFT)),et.isTrue(!n.isNull(r,be.RIGHT),"depth of RIGHT side has not been initialized"),A.setLocation(r,be.RIGHT,n.getLocation(r,be.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),A=e.getLabel();e.isIsolated()&&(A.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(A)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(mr);Fr.overlayOp=function(t,e,A){return new Fr(t,e).getResultGeometry(A)},Fr.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Fr.createEmptyResult(Fr.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var A=e;return Vn.map(t,{interfaces_:function(){return[br.MapOp]},map:function(t){return t.intersection(A)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ir.overlayOp(t,e,Fr.INTERSECTION)},Fr.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Fr.createEmptyResult(Fr.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ir.overlayOp(t,e,Fr.SYMDIFFERENCE)},Fr.resultDimension=function(t,e,A){var n=e.getDimension(),r=A.getDimension(),i=-1;switch(t){case Fr.INTERSECTION:i=Math.min(n,r);break;case Fr.UNION:i=Math.max(n,r);break;case Fr.DIFFERENCE:i=n;break;case Fr.SYMDIFFERENCE:i=Math.max(n,r)}return i},Fr.createEmptyResult=function(t,e,A,n){var r=null;switch(Fr.resultDimension(t,e,A)){case-1:r=n.createGeometryCollection(new Array(0).fill(null));break;case 0:r=n.createPoint();break;case 1:r=n.createLineString();break;case 2:r=n.createPolygon()}return r},Fr.difference=function(t,e){return t.isEmpty()?Fr.createEmptyResult(Fr.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ir.overlayOp(t,e,Fr.DIFFERENCE))},Fr.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],A=t.getLocation(0),n=t.getLocation(1);return Fr.isResultOfOp(A,n,e)}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];switch(r===S.BOUNDARY&&(r=S.INTERIOR),i===S.BOUNDARY&&(i=S.INTERIOR),o){case Fr.INTERSECTION:return r===S.INTERIOR&&i===S.INTERIOR;case Fr.UNION:return r===S.INTERIOR||i===S.INTERIOR;case Fr.DIFFERENCE:return r===S.INTERIOR&&i!==S.INTERIOR;case Fr.SYMDIFFERENCE:return r===S.INTERIOR&&i!==S.INTERIOR||r!==S.INTERIOR&&i===S.INTERIOR}return!1}},Fr.INTERSECTION=1,Fr.UNION=2,Fr.DIFFERENCE=3,Fr.SYMDIFFERENCE=4;var wr=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new bn,this._seg=new CA;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};wr.prototype.isWithinToleranceOfBoundary=function(t){for(var e=0;e<this._linework.getNumGeometries();e++)for(var A=this._linework.getGeometryN(e).getCoordinateSequence(),n=0;n<A.size()-1;n++)if(A.getCoordinate(n,this._seg.p0),A.getCoordinate(n+1,this._seg.p1),this._seg.distance(t)<=this._boundaryDistanceTolerance)return!0;return!1},wr.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?S.BOUNDARY:this._ptLocator.locate(t,this._g)},wr.prototype.extractLinework=function(t){var e=new Sr;t.apply(e);var A=e.getLinework(),n=fe.toLineStringArray(A);return t.getFactory().createMultiLineString(n)},wr.prototype.interfaces_=function(){return[]},wr.prototype.getClass=function(){return wr};var Sr=function(){this._linework=null,this._linework=new vt};Sr.prototype.getLinework=function(){return this._linework},Sr.prototype.filter=function(t){if(t instanceof $t){var e=t;this._linework.add(e.getExteriorRing());for(var A=0;A<e.getNumInteriorRing();A++)this._linework.add(e.getInteriorRingN(A))}},Sr.prototype.interfaces_=function(){return[Jt]},Sr.prototype.getClass=function(){return Sr};var Dr=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Dr.prototype.extractPoints=function(t,e,A){for(var n=t.getCoordinates(),r=0;r<n.length-1;r++)this.computeOffsetPoints(n[r],n[r+1],e,A)},Dr.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Dr.prototype.getPoints=function(t){for(var e=new vt,A=mn.getLines(this._g).iterator();A.hasNext();){var n=A.next();this.extractPoints(n,t,e)}return e},Dr.prototype.computeOffsetPoints=function(t,e,A,n){var r=e.x-t.x,i=e.y-t.y,o=Math.sqrt(r*r+i*i),a=A*r/o,s=A*i/o,g=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var I=new m(g-s,c+a);n.add(I)}if(this._doRight){var u=new m(g+s,c-a);n.add(u)}},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr};var Rr=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new vt;var e=arguments[0],A=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,A),this._geom=[e,A,n],this._locFinder=[new wr(this._geom[0],this._boundaryDistanceTolerance),new wr(this._geom[1],this._boundaryDistanceTolerance),new wr(this._geom[2],this._boundaryDistanceTolerance)]},Ur={TOLERANCE:{configurable:!0}};Rr.prototype.reportResult=function(t,e,A){Y.out.println("Overlay result invalid - A:"+S.toLocationSymbol(e[0])+" B:"+S.toLocationSymbol(e[1])+" expected:"+(A?"i":"e")+" actual:"+S.toLocationSymbol(e[2]))},Rr.prototype.isValid=function(t){return this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]),this.checkValid(t)},Rr.prototype.checkValid=function(){if(1===arguments.length){for(var t=arguments[0],e=0;e<this._testCoords.size();e++){var A=this._testCoords.get(e);if(!this.checkValid(t,A))return this._invalidLocation=A,!1}return!0}if(2===arguments.length){var n=arguments[0],r=arguments[1];return this._location[0]=this._locFinder[0].getLocation(r),this._location[1]=this._locFinder[1].getLocation(r),this._location[2]=this._locFinder[2].getLocation(r),!!Rr.hasLocation(this._location,S.BOUNDARY)||this.isValidResult(n,this._location)}},Rr.prototype.addTestPts=function(t){var e=new Dr(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Rr.prototype.isValidResult=function(t,e){var A=Fr.isResultOfOp(e[0],e[1],t),n=!(A^e[2]===S.INTERIOR);return n||this.reportResult(t,e,A),n},Rr.prototype.getInvalidLocation=function(){return this._invalidLocation},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr},Rr.hasLocation=function(t,e){for(var A=0;A<3;A++)if(t[A]===e)return!0;return!1},Rr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(qn.computeSizeBasedSnapTolerance(t),qn.computeSizeBasedSnapTolerance(e))},Rr.isValid=function(t,e,A,n){return new Rr(t,e,n).isValid(A)},Ur.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Rr,Ur);var Gr=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Gr.prototype.extractElements=function(t,e){if(null===t)return null;for(var A=0;A<t.getNumGeometries();A++){var n=t.getGeometryN(A);this._skipEmpty&&n.isEmpty()||e.add(n)}},Gr.prototype.combine=function(){for(var t=new vt,e=this._inputGeoms.iterator();e.hasNext();){var A=e.next();this.extractElements(A,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr},Gr.combine=function(){if(1===arguments.length){var t=arguments[0];return new Gr(t).combine()}if(2===arguments.length){var e=arguments[0],A=arguments[1];return new Gr(Gr.createList(e,A)).combine()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];return new Gr(Gr.createList(n,r,i)).combine()}},Gr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Gr.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],A=new vt;return A.add(t),A.add(e),A}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new vt;return o.add(n),o.add(r),o.add(i),o}};var Nr=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new vt)},kr={STRTREE_NODE_CAPACITY:{configurable:!0}};Nr.prototype.reduceToGeometries=function(t){for(var e=new vt,A=t.iterator();A.hasNext();){var n=A.next(),r=null;R(n,yt)?r=this.unionTree(n):n instanceof ct&&(r=n),e.add(r)}return e},Nr.prototype.extractByEnvelope=function(t,e,A){for(var n=new vt,r=0;r<e.getNumGeometries();r++){var i=e.getGeometryN(r);i.getEnvelopeInternal().intersects(t)?n.add(i):A.add(i)}return this._geomFactory.buildGeometry(n)},Nr.prototype.unionOptimized=function(t,e){var A=t.getEnvelopeInternal(),n=e.getEnvelopeInternal();if(!A.intersects(n))return Gr.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var r=A.intersection(n);return this.unionUsingEnvelopeIntersection(t,e,r)},Nr.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 t=new iA(Nr.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var A=e.next();t.insert(A.getEnvelopeInternal(),A)}this._inputPolys=null;var n=t.itemsTree();return this.unionTree(n)},Nr.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],A=arguments[1],n=arguments[2];if(n-A<=1){var r=Nr.getGeometry(e,A);return this.unionSafe(r,null)}if(n-A==2)return this.unionSafe(Nr.getGeometry(e,A),Nr.getGeometry(e,A+1));var i=Math.trunc((n+A)/2),o=this.binaryUnion(e,A,i),a=this.binaryUnion(e,i,n);return this.unionSafe(o,a)}},Nr.prototype.repeatedUnion=function(t){for(var e=null,A=t.iterator();A.hasNext();){var n=A.next();e=null===e?n.copy():e.union(n)}return e},Nr.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},Nr.prototype.unionActual=function(t,e){return Nr.restrictToPolygons(t.union(e))},Nr.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},Nr.prototype.unionUsingEnvelopeIntersection=function(t,e,A){var n=new vt,r=this.extractByEnvelope(A,t,n),i=this.extractByEnvelope(A,e,n),o=this.unionActual(r,i);return n.add(o),Gr.combine(n)},Nr.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],A=arguments[1];return e.getFactory().createGeometryCollection([e,A]).buffer(0)}},Nr.prototype.interfaces_=function(){return[]},Nr.prototype.getClass=function(){return Nr},Nr.restrictToPolygons=function(t){if(R(t,zt))return t;var e=vn.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(fe.toPolygonArray(e))},Nr.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Nr.union=function(t){return new Nr(t).union()},kr.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Nr,kr);var xr=function(){};xr.prototype.interfaces_=function(){return[]},xr.prototype.getClass=function(){return xr},xr.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Fr.createEmptyResult(Fr.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ir.overlayOp(t,e,Fr.UNION)},t.GeoJSONReader=ve,t.GeoJSONWriter=me,t.OverlayOp=Fr,t.UnionOp=xr,t.BufferOp=hn,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,A){"use strict";var n=A(1169),r=A(909),i=A(1173),o=A(1060),a=A(542),s=A(1174),g=A(1175),c=A(1196),I=A(722);t.exports=f,f.prototype.validate=function(t,e){var A;if("string"==typeof t){if(!(A=this.getSchema(t)))throw new Error('no schema with key or ref "'+t+'"')}else{var n=this._addSchema(t);A=n.validate||this._compile(n)}var r=A(e);!0!==A.$async&&(this.errors=A.errors);return r},f.prototype.compile=function(t,e){var A=this._addSchema(t,void 0,e);return A.validate||this._compile(A)},f.prototype.addSchema=function(t,e,A,n){if(Array.isArray(t)){for(var i=0;i<t.length;i++)this.addSchema(t[i],void 0,A,n);return this}var o=this._getId(t);if(void 0!==o&&"string"!=typeof o)throw new Error("schema id must be string");return v(this,e=r.normalizeId(e||o)),this._schemas[e]=this._addSchema(t,A,n,!0),this},f.prototype.addMetaSchema=function(t,e,A){return this.addSchema(t,e,A,!0),this},f.prototype.validateSchema=function(t,e){var A=t.$schema;if(void 0!==A&&"string"!=typeof A)throw new Error("$schema must be a string");if(!(A=A||this._opts.defaultMeta||function(t){var e=t._opts.meta;return t._opts.defaultMeta="object"==typeof e?t._getId(e)||e:t.getSchema(C)?C:void 0,t._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(A,t);if(!n&&e){var r="schema is invalid: "+this.errorsText();if("log"!=this._opts.validateSchema)throw new Error(r);this.logger.error(r)}return n},f.prototype.getSchema=function(t){var e=d(this,t);switch(typeof e){case"object":return e.validate||this._compile(e);case"string":return this.getSchema(e);case"undefined":return function(t,e){var A=r.schema.call(t,{schema:{}},e);if(A){var i=A.schema,a=A.root,s=A.baseId,g=n.call(t,i,a,void 0,s);return t._fragments[e]=new o({ref:e,fragment:!0,schema:i,root:a,baseId:s,validate:g}),g}}(this,t)}},f.prototype.removeSchema=function(t){if(t instanceof RegExp)return Q(this,this._schemas,t),Q(this,this._refs,t),this;switch(typeof t){case"undefined":return Q(this,this._schemas),Q(this,this._refs),this._cache.clear(),this;case"string":var e=d(this,t);return e&&this._cache.del(e.cacheKey),delete this._schemas[t],delete this._refs[t],this;case"object":var A=this._opts.serialize,n=A?A(t):t;this._cache.del(n);var i=this._getId(t);i&&(i=r.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this},f.prototype.addFormat=function(t,e){"string"==typeof e&&(e=new RegExp(e));return this._formats[t]=e,this},f.prototype.errorsText=function(t,e){if(!(t=t||this.errors))return"No errors";for(var A=void 0===(e=e||{}).separator?", ":e.separator,n=void 0===e.dataVar?"data":e.dataVar,r="",i=0;i<t.length;i++){var o=t[i];o&&(r+=n+o.dataPath+" "+o.message+A)}return r.slice(0,-A.length)},f.prototype._addSchema=function(t,e,A,n){if("object"!=typeof t&&"boolean"!=typeof t)throw new Error("schema should be object or boolean");var i=this._opts.serialize,a=i?i(t):t,s=this._cache.get(a);if(s)return s;n=n||!1!==this._opts.addUsedSchema;var g=r.normalizeId(this._getId(t));g&&n&&v(this,g);var c,I=!1!==this._opts.validateSchema&&!e;I&&!(c=g&&g==r.normalizeId(t.$schema))&&this.validateSchema(t,!0);var u=r.ids.call(this,t),l=new o({id:g,schema:t,localRefs:u,cacheKey:a,meta:A});"#"!=g[0]&&n&&(this._refs[g]=l);this._cache.put(a,l),I&&c&&this.validateSchema(t,!0);return l},f.prototype._compile=function(t,e){if(t.compiling)return t.validate=i,i.schema=t.schema,i.errors=null,i.root=e||i,!0===t.schema.$async&&(i.$async=!0),i;var A,r;t.compiling=!0,t.meta&&(A=this._opts,this._opts=this._metaOpts);try{r=n.call(this,t.schema,e,t.localRefs)}catch(o){throw delete t.validate,o}finally{t.compiling=!1,t.meta&&(this._opts=A)}return t.validate=r,t.refs=r.refs,t.refVal=r.refVal,t.root=r.root,r;function i(){var e=t.validate,A=e.apply(this,arguments);return i.errors=e.errors,A}},f.prototype.compileAsync=A(1197);var u=A(1198);f.prototype.addKeyword=u.add,f.prototype.getKeyword=u.get,f.prototype.removeKeyword=u.remove,f.prototype.validateKeyword=u.validate;var l=A(910);f.ValidationError=l.Validation,f.MissingRefError=l.MissingRef,f.$dataMetaSchema=c;var C="http://json-schema.org/draft-07/schema",h=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],B=["/properties"];function f(t){if(!(this instanceof f))return new f(t);t=this._opts=I.copy(t)||{},function(t){var e=t._opts.logger;if(!1===e)t.logger={log:m,warn:m,error:m};else{if(void 0===e&&(e=console),!("object"==typeof e&&e.log&&e.warn&&e.error))throw new Error("logger must implement log, warn and error methods");t.logger=e}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=s(t.format),this._cache=t.cache||new i,this._loadingSchemas={},this._compilations=[],this.RULES=g(),this._getId=function(t){switch(t.schemaId){case"auto":return y;case"id":return E;default:return p}}(t),t.loopRequired=t.loopRequired||1/0,"property"==t.errorDataPath&&(t._errorDataPathProperty=!0),void 0===t.serialize&&(t.serialize=a),this._metaOpts=function(t){for(var e=I.copy(t._opts),A=0;A<h.length;A++)delete e[h[A]];return e}(this),t.formats&&function(t){for(var e in t._opts.formats){var A=t._opts.formats[e];t.addFormat(e,A)}}(this),t.keywords&&function(t){for(var e in t._opts.keywords){var A=t._opts.keywords[e];t.addKeyword(e,A)}}(this),function(t){var e;t._opts.$data&&(e=A(1201),t.addMetaSchema(e,e.$id,!0));if(!1===t._opts.meta)return;var n=A(1066);t._opts.$data&&(n=c(n,B));t.addMetaSchema(n,C,!0),t._refs["http://json-schema.org/schema"]=C}(this),"object"==typeof t.meta&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),function(t){var e=t._opts.schemas;if(!e)return;if(Array.isArray(e))t.addSchema(e);else for(var A in e)t.addSchema(e[A],A)}(this)}function d(t,e){return e=r.normalizeId(e),t._schemas[e]||t._refs[e]||t._fragments[e]}function Q(t,e,A){for(var n in e){var r=e[n];r.meta||A&&!A.test(n)||(t._cache.del(r.cacheKey),delete e[n])}}function E(t){return t.$id&&this.logger.warn("schema $id ignored",t.$id),t.id}function p(t){return t.id&&this.logger.warn("schema id ignored",t.id),t.$id}function y(t){if(t.$id&&t.id&&t.$id!=t.id)throw new Error("schema $id is different from id");return t.$id||t.id}function v(t,e){if(t._schemas[e]||t._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function m(){}},function(t){t.exports=JSON.parse('{"name":"vitessce","version":"1.1.12","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":{"@hms-dbmi/viv":"^0.10.4","@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/core":"^8.4.0","@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/helpers":"^6.1.4","ajv":"^6.10.0","bowser":"^2.11.0","classnames":"^2.2.6","clsx":"^1.1.1","concaveman":"^1.2.0","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.4.0","dynamic-import-polyfill":"^0.1.1","fast-deep-equal":"^3.1.3","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","mathjs":"^9.2.0","nebula.gl":"^0.21.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-tooltip":"^0.23.0","whatwg-fetch":"^3.0.0","window-pixi":"5.3.3","zarr":"^0.4.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","concurrently":"^5.3.0","css-loader":"3.4.2","cypress":"^3.6.1","cypress-fail-on-console-error":"^2.0.6","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","http-server":"^0.12.3","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","node-sass":"^5.0.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":"^10.0.1","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","start:fixtures":"http-server src/loaders/fixtures/ --cors=\\"*\\" -s","start:fixtures-concurrently":"concurrently --kill-others \\"npm run start:fixtures\\"","test":"npm run start:fixtures-concurrently -- --success first \\"karma start scripts/karma.config.js --single-run\\"","test:watch":"npm run start:fixtures-concurrently -- \\"karma start scripts/karma.config.js --auto-watch\\"","cypress:open":"npm run start:fixtures-concurrently -- \\"cypress open\\"","cypress:run":"npm run start:fixtures-concurrently -- --success first --kill-others \\"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(t,e,A){var n=A(144);t.exports=function(){return n.Date.now()}},function(t,e,A){var n=A(337),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),A=t[a];try{t[a]=void 0;var n=!0}catch(s){}var r=o.call(t);return n&&(e?t[a]=A:delete t[a]),r}},function(t,e){var A=Object.prototype.toString;t.exports=function(t){return A.call(t)}},function(t,e){},function(t,e){},function(t,e,A){(function(e){var n=A(628).Transform,r=A(117);function i(t){n.call(this,t),this._destroyed=!1}function o(t,e,A){A(null,t)}function a(t){return function(e,A,n){return"function"==typeof e&&(n=A,A=e,e={}),"function"!=typeof A&&(A=o),"function"!=typeof n&&(n=null),t(e,A,n)}}r(i,n),i.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var A=this;e.nextTick((function(){t&&A.emit("error",t),A.emit("close")}))}},t.exports=a((function(t,e,A){var n=new i(t);return n._transform=e,A&&(n._flush=A),n})),t.exports.ctor=a((function(t,e,A){function n(e){if(!(this instanceof n))return new n(e);this.options=Object.assign({},t,e),i.call(this,this.options)}return r(n,i),n.prototype._transform=e,A&&(n.prototype._flush=A),n})),t.exports.obj=a((function(t,e,A){var n=new i(Object.assign({objectMode:!0,highWaterMark:16},t));return n._transform=e,A&&(n._flush=A),n}))}).call(this,A(62))},function(t,e,A){(e=t.exports=A(458)).Stream=e,e.Readable=e,e.Writable=A(463),e.Duplex=A(218),e.Transform=A(465),e.PassThrough=A(636),e.finished=A(375),e.pipeline=A(637)},function(t,e,A){"use strict";e.byteLength=function(t){var e=g(t),A=e[0],n=e[1];return 3*(A+n)/4-n},e.toByteArray=function(t){var e,A,n=g(t),o=n[0],a=n[1],s=new i(function(t,e,A){return 3*(e+A)/4-A}(0,o,a)),c=0,I=a>0?o-4:o;for(A=0;A<I;A+=4)e=r[t.charCodeAt(A)]<<18|r[t.charCodeAt(A+1)]<<12|r[t.charCodeAt(A+2)]<<6|r[t.charCodeAt(A+3)],s[c++]=e>>16&255,s[c++]=e>>8&255,s[c++]=255&e;2===a&&(e=r[t.charCodeAt(A)]<<2|r[t.charCodeAt(A+1)]>>4,s[c++]=255&e);1===a&&(e=r[t.charCodeAt(A)]<<10|r[t.charCodeAt(A+1)]<<4|r[t.charCodeAt(A+2)]>>2,s[c++]=e>>8&255,s[c++]=255&e);return s},e.fromByteArray=function(t){for(var e,A=t.length,r=A%3,i=[],o=0,a=A-r;o<a;o+=16383)i.push(c(t,o,o+16383>a?a:o+16383));1===r?(e=t[A-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===r&&(e=(t[A-2]<<8)+t[A-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],r=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function g(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=t.indexOf("=");return-1===A&&(A=e),[A,A===e?0:4-A%4]}function c(t,e,A){for(var r,i,o=[],a=e;a<A;a+=3)r=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(n[(i=r)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(t,e){},function(t,e,A){"use strict";function n(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function r(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function i(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=A(104).Buffer,a=A(632).inspect,s=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,A,g;return e=t,(A=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,A=""+e.data;e=e.next;)A+=t+e.data;return A}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,A,n,r=o.allocUnsafe(t>>>0),i=this.head,a=0;i;)e=i.data,A=r,n=a,o.prototype.copy.call(e,A,n),a+=i.data.length,i=i.next;return r}},{key:"consume",value:function(t,e){var A;return t<this.head.data.length?(A=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):A=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),A}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,A=1,n=e.data;for(t-=n.length;e=e.next;){var r=e.data,i=t>r.length?r.length:t;if(i===r.length?n+=r:n+=r.slice(0,t),0===(t-=i)){i===r.length?(++A,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=r.slice(i));break}++A}return this.length-=A,n}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),A=this.head,n=1;for(A.data.copy(e),t-=A.data.length;A=A.next;){var r=A.data,i=t>r.length?r.length:t;if(r.copy(e,e.length-t,0,i),0===(t-=i)){i===r.length?(++n,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=r.slice(i));break}++n}return this.length-=n,e}},{key:s,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?n(Object(A),!0).forEach((function(e){r(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):n(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&i(e.prototype,A),g&&i(e,g),t}()},function(t,e){},function(t,e,A){var n=A(104),r=n.Buffer;function i(t,e){for(var A in t)e[A]=t[A]}function o(t,e,A){return r(t,e,A)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=o),o.prototype=Object.create(r.prototype),i(r,o),o.from=function(t,e,A){if("number"===typeof t)throw new TypeError("Argument must not be a number");return r(t,e,A)},o.alloc=function(t,e,A){if("number"!==typeof t)throw new TypeError("Argument must be a number");var n=r(t);return void 0!==e?"string"===typeof A?n.fill(e,A):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return r(t)},o.allocUnsafeSlow=function(t){if("number"!==typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,A){"use strict";(function(e){var n;function r(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var i=A(375),o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),g=Symbol("ended"),c=Symbol("lastPromise"),I=Symbol("handlePromise"),u=Symbol("stream");function l(t,e){return{value:t,done:e}}function C(t){var e=t[o];if(null!==e){var A=t[u].read();null!==A&&(t[c]=null,t[o]=null,t[a]=null,e(l(A,!1)))}}function h(t){e.nextTick(C,t)}var B=Object.getPrototypeOf((function(){})),f=Object.setPrototypeOf((r(n={get stream(){return this[u]},next:function(){var t=this,A=this[s];if(null!==A)return Promise.reject(A);if(this[g])return Promise.resolve(l(void 0,!0));if(this[u].destroyed)return new Promise((function(A,n){e.nextTick((function(){t[s]?n(t[s]):A(l(void 0,!0))}))}));var n,r=this[c];if(r)n=new Promise(function(t,e){return function(A,n){t.then((function(){e[g]?A(l(void 0,!0)):e[I](A,n)}),n)}}(r,this));else{var i=this[u].read();if(null!==i)return Promise.resolve(l(i,!1));n=new Promise(this[I])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),r(n,"return",(function(){var t=this;return new Promise((function(e,A){t[u].destroy(null,(function(t){t?A(t):e(l(void 0,!0))}))}))})),n),B);t.exports=function(t){var e,A=Object.create(f,(r(e={},u,{value:t,writable:!0}),r(e,o,{value:null,writable:!0}),r(e,a,{value:null,writable:!0}),r(e,s,{value:null,writable:!0}),r(e,g,{value:t._readableState.endEmitted,writable:!0}),r(e,I,{value:function(t,e){var n=A[u].read();n?(A[c]=null,A[o]=null,A[a]=null,t(l(n,!1))):(A[o]=t,A[a]=e)},writable:!0}),e));return A[c]=null,i(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=A[a];return null!==e&&(A[c]=null,A[o]=null,A[a]=null,e(t)),void(A[s]=t)}var n=A[o];null!==n&&(A[c]=null,A[o]=null,A[a]=null,n(l(void 0,!0))),A[g]=!0})),t.on("readable",h.bind(null,A)),A}}).call(this,A(62))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,A){"use strict";t.exports=r;var n=A(465);function r(t){if(!(this instanceof r))return new r(t);n.call(this,t)}A(117)(r,n),r.prototype._transform=function(t,e,A){A(null,t)}},function(t,e,A){"use strict";var n;var r=A(217).codes,i=r.ERR_MISSING_ARGS,o=r.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function s(t,e,r,i){i=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(i);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=A(375)),n(t,{readable:e,writable:r},(function(t){if(t)return i(t);a=!0,i()}));var s=!1;return function(e){if(!a&&!s)return s=!0,function(t){return t.setHeader&&"function"===typeof t.abort}(t)?t.abort():"function"===typeof t.destroy?t.destroy():void i(e||new o("pipe"))}}function g(t){t()}function c(t,e){return t.pipe(e)}function I(t){return t.length?"function"!==typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];var n,r=I(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new i("streams");var o=e.map((function(t,A){var i=A<e.length-1;return s(t,i,A>0,(function(t){n||(n=t),t&&o.forEach(g),i||(o.forEach(g),r(n))}))}));return e.reduce(c)}},function(t,e,A){"use strict";var n=A(302),r=A(639),i=A(640),o=A(641),a=A(642);function s(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function g(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function I(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,c(t)):-2}function u(t,e){var A,n;return t&&t.state?(n=t.state,e<0?(A=0,e=-e):(A=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=A,n.wbits=e,I(t))):-2}function l(t,e){var A,n;return t?(n=new g,t.state=n,n.window=null,0!==(A=u(t,e))&&(t.state=null),A):-2}var C,h,B=!0;function f(t){if(B){var e;for(C=new n.Buf32(512),h=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,C,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,h,0,t.work,{bits:5}),B=!1}t.lencode=C,t.lenbits=9,t.distcode=h,t.distbits=5}function d(t,e,A,r){var i,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),r>=o.wsize?(n.arraySet(o.window,e,A-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),n.arraySet(o.window,e,A-r,i,o.wnext),(r-=i)?(n.arraySet(o.window,e,A-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0}e.inflateReset=I,e.inflateReset2=u,e.inflateResetKeep=c,e.inflateInit=function(t){return l(t,15)},e.inflateInit2=l,e.inflate=function(t,e){var A,g,c,I,u,l,C,h,B,Q,E,p,y,v,m,b,F,w,S,D,R,U,G,N,k=0,x=new n.Buf8(4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return-2;12===(A=t.state).mode&&(A.mode=13),u=t.next_out,c=t.output,C=t.avail_out,I=t.next_in,g=t.input,l=t.avail_in,h=A.hold,B=A.bits,Q=l,E=C,U=0;t:for(;;)switch(A.mode){case 1:if(0===A.wrap){A.mode=13;break}for(;B<16;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(2&A.wrap&&35615===h){A.check=0,x[0]=255&h,x[1]=h>>>8&255,A.check=i(A.check,x,2,0),h=0,B=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",A.mode=30;break}if(8!==(15&h)){t.msg="unknown compression method",A.mode=30;break}if(B-=4,R=8+(15&(h>>>=4)),0===A.wbits)A.wbits=R;else if(R>A.wbits){t.msg="invalid window size",A.mode=30;break}A.dmax=1<<R,t.adler=A.check=1,A.mode=512&h?10:12,h=0,B=0;break;case 2:for(;B<16;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(A.flags=h,8!==(255&A.flags)){t.msg="unknown compression method",A.mode=30;break}if(57344&A.flags){t.msg="unknown header flags set",A.mode=30;break}A.head&&(A.head.text=h>>8&1),512&A.flags&&(x[0]=255&h,x[1]=h>>>8&255,A.check=i(A.check,x,2,0)),h=0,B=0,A.mode=3;case 3:for(;B<32;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}A.head&&(A.head.time=h),512&A.flags&&(x[0]=255&h,x[1]=h>>>8&255,x[2]=h>>>16&255,x[3]=h>>>24&255,A.check=i(A.check,x,4,0)),h=0,B=0,A.mode=4;case 4:for(;B<16;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}A.head&&(A.head.xflags=255&h,A.head.os=h>>8),512&A.flags&&(x[0]=255&h,x[1]=h>>>8&255,A.check=i(A.check,x,2,0)),h=0,B=0,A.mode=5;case 5:if(1024&A.flags){for(;B<16;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}A.length=h,A.head&&(A.head.extra_len=h),512&A.flags&&(x[0]=255&h,x[1]=h>>>8&255,A.check=i(A.check,x,2,0)),h=0,B=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&((p=A.length)>l&&(p=l),p&&(A.head&&(R=A.head.extra_len-A.length,A.head.extra||(A.head.extra=new Array(A.head.extra_len)),n.arraySet(A.head.extra,g,I,p,R)),512&A.flags&&(A.check=i(A.check,g,p,I)),l-=p,I+=p,A.length-=p),A.length))break t;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(0===l)break t;p=0;do{R=g[I+p++],A.head&&R&&A.length<65536&&(A.head.name+=String.fromCharCode(R))}while(R&&p<l);if(512&A.flags&&(A.check=i(A.check,g,p,I)),l-=p,I+=p,R)break t}else A.head&&(A.head.name=null);A.length=0,A.mode=8;case 8:if(4096&A.flags){if(0===l)break t;p=0;do{R=g[I+p++],A.head&&R&&A.length<65536&&(A.head.comment+=String.fromCharCode(R))}while(R&&p<l);if(512&A.flags&&(A.check=i(A.check,g,p,I)),l-=p,I+=p,R)break t}else A.head&&(A.head.comment=null);A.mode=9;case 9:if(512&A.flags){for(;B<16;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(h!==(65535&A.check)){t.msg="header crc mismatch",A.mode=30;break}h=0,B=0}A.head&&(A.head.hcrc=A.flags>>9&1,A.head.done=!0),t.adler=A.check=0,A.mode=12;break;case 10:for(;B<32;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}t.adler=A.check=s(h),h=0,B=0,A.mode=11;case 11:if(0===A.havedict)return t.next_out=u,t.avail_out=C,t.next_in=I,t.avail_in=l,A.hold=h,A.bits=B,2;t.adler=A.check=1,A.mode=12;case 12:if(5===e||6===e)break t;case 13:if(A.last){h>>>=7&B,B-=7&B,A.mode=27;break}for(;B<3;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}switch(A.last=1&h,B-=1,3&(h>>>=1)){case 0:A.mode=14;break;case 1:if(f(A),A.mode=20,6===e){h>>>=2,B-=2;break t}break;case 2:A.mode=17;break;case 3:t.msg="invalid block type",A.mode=30}h>>>=2,B-=2;break;case 14:for(h>>>=7&B,B-=7&B;B<32;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if((65535&h)!==(h>>>16^65535)){t.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&h,h=0,B=0,A.mode=15,6===e)break t;case 15:A.mode=16;case 16:if(p=A.length){if(p>l&&(p=l),p>C&&(p=C),0===p)break t;n.arraySet(c,g,I,p,u),l-=p,I+=p,C-=p,u+=p,A.length-=p;break}A.mode=12;break;case 17:for(;B<14;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(A.nlen=257+(31&h),h>>>=5,B-=5,A.ndist=1+(31&h),h>>>=5,B-=5,A.ncode=4+(15&h),h>>>=4,B-=4,A.nlen>286||A.ndist>30){t.msg="too many length or distance symbols",A.mode=30;break}A.have=0,A.mode=18;case 18:for(;A.have<A.ncode;){for(;B<3;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}A.lens[O[A.have++]]=7&h,h>>>=3,B-=3}for(;A.have<19;)A.lens[O[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,G={bits:A.lenbits},U=a(0,A.lens,0,19,A.lencode,0,A.work,G),A.lenbits=G.bits,U){t.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have<A.nlen+A.ndist;){for(;b=(k=A.lencode[h&(1<<A.lenbits)-1])>>>16&255,F=65535&k,!((m=k>>>24)<=B);){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(F<16)h>>>=m,B-=m,A.lens[A.have++]=F;else{if(16===F){for(N=m+2;B<N;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(h>>>=m,B-=m,0===A.have){t.msg="invalid bit length repeat",A.mode=30;break}R=A.lens[A.have-1],p=3+(3&h),h>>>=2,B-=2}else if(17===F){for(N=m+3;B<N;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}B-=m,R=0,p=3+(7&(h>>>=m)),h>>>=3,B-=3}else{for(N=m+7;B<N;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}B-=m,R=0,p=11+(127&(h>>>=m)),h>>>=7,B-=7}if(A.have+p>A.nlen+A.ndist){t.msg="invalid bit length repeat",A.mode=30;break}for(;p--;)A.lens[A.have++]=R}}if(30===A.mode)break;if(0===A.lens[256]){t.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,G={bits:A.lenbits},U=a(1,A.lens,0,A.nlen,A.lencode,0,A.work,G),A.lenbits=G.bits,U){t.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,G={bits:A.distbits},U=a(2,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,G),A.distbits=G.bits,U){t.msg="invalid distances set",A.mode=30;break}if(A.mode=20,6===e)break t;case 20:A.mode=21;case 21:if(l>=6&&C>=258){t.next_out=u,t.avail_out=C,t.next_in=I,t.avail_in=l,A.hold=h,A.bits=B,o(t,E),u=t.next_out,c=t.output,C=t.avail_out,I=t.next_in,g=t.input,l=t.avail_in,h=A.hold,B=A.bits,12===A.mode&&(A.back=-1);break}for(A.back=0;b=(k=A.lencode[h&(1<<A.lenbits)-1])>>>16&255,F=65535&k,!((m=k>>>24)<=B);){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(b&&0===(240&b)){for(w=m,S=b,D=F;b=(k=A.lencode[D+((h&(1<<w+S)-1)>>w)])>>>16&255,F=65535&k,!(w+(m=k>>>24)<=B);){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}h>>>=w,B-=w,A.back+=w}if(h>>>=m,B-=m,A.back+=m,A.length=F,0===b){A.mode=26;break}if(32&b){A.back=-1,A.mode=12;break}if(64&b){t.msg="invalid literal/length code",A.mode=30;break}A.extra=15&b,A.mode=22;case 22:if(A.extra){for(N=A.extra;B<N;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}A.length+=h&(1<<A.extra)-1,h>>>=A.extra,B-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;b=(k=A.distcode[h&(1<<A.distbits)-1])>>>16&255,F=65535&k,!((m=k>>>24)<=B);){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(0===(240&b)){for(w=m,S=b,D=F;b=(k=A.distcode[D+((h&(1<<w+S)-1)>>w)])>>>16&255,F=65535&k,!(w+(m=k>>>24)<=B);){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}h>>>=w,B-=w,A.back+=w}if(h>>>=m,B-=m,A.back+=m,64&b){t.msg="invalid distance code",A.mode=30;break}A.offset=F,A.extra=15&b,A.mode=24;case 24:if(A.extra){for(N=A.extra;B<N;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}A.offset+=h&(1<<A.extra)-1,h>>>=A.extra,B-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){t.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(0===C)break t;if(p=E-C,A.offset>p){if((p=A.offset-p)>A.whave&&A.sane){t.msg="invalid distance too far back",A.mode=30;break}p>A.wnext?(p-=A.wnext,y=A.wsize-p):y=A.wnext-p,p>A.length&&(p=A.length),v=A.window}else v=c,y=u-A.offset,p=A.length;p>C&&(p=C),C-=p,A.length-=p;do{c[u++]=v[y++]}while(--p);0===A.length&&(A.mode=21);break;case 26:if(0===C)break t;c[u++]=A.length,C--,A.mode=21;break;case 27:if(A.wrap){for(;B<32;){if(0===l)break t;l--,h|=g[I++]<<B,B+=8}if(E-=C,t.total_out+=E,A.total+=E,E&&(t.adler=A.check=A.flags?i(A.check,c,E,u-E):r(A.check,c,E,u-E)),E=C,(A.flags?h:s(h))!==A.check){t.msg="incorrect data check",A.mode=30;break}h=0,B=0}A.mode=28;case 28:if(A.wrap&&A.flags){for(;B<32;){if(0===l)break t;l--,h+=g[I++]<<B,B+=8}if(h!==(4294967295&A.total)){t.msg="incorrect length check",A.mode=30;break}h=0,B=0}A.mode=29;case 29:U=1;break t;case 30:U=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=u,t.avail_out=C,t.next_in=I,t.avail_in=l,A.hold=h,A.bits=B,(A.wsize||E!==t.avail_out&&A.mode<30&&(A.mode<27||4!==e))&&d(t,t.output,t.next_out,E-t.avail_out)?(A.mode=31,-4):(Q-=t.avail_in,E-=t.avail_out,t.total_in+=Q,t.total_out+=E,A.total+=E,A.wrap&&E&&(t.adler=A.check=A.flags?i(A.check,c,E,t.next_out-E):r(A.check,c,E,t.next_out-E)),t.data_type=A.bits+(A.last?64:0)+(12===A.mode?128:0)+(20===A.mode||15===A.mode?256:0),(0===Q&&0===E||4===e)&&0===U&&(U=-5),U)},e.inflateEnd=function(t){if(!t||!t.state)return-2;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var A;return t&&t.state?0===(2&(A=t.state).wrap)?-2:(A.head=e,e.done=!1,0):-2},e.inflateSetDictionary=function(t,e){var A,n=e.length;return t&&t.state?0!==(A=t.state).wrap&&11!==A.mode?-2:11===A.mode&&r(1,e,n,0)!==A.check?-3:d(t,e,n,n)?(A.mode=31,-4):(A.havedict=1,0):-2},e.inflateInfo="pako inflate (from Nodeca project)"},function(t,e,A){"use strict";t.exports=function(t,e,A,n){for(var r=65535&t|0,i=t>>>16&65535|0,o=0;0!==A;){A-=o=A>2e3?2e3:A;do{i=i+(r=r+e[n++]|0)|0}while(--o);r%=65521,i%=65521}return r|i<<16|0}},function(t,e,A){"use strict";var n=function(){for(var t,e=[],A=0;A<256;A++){t=A;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[A]=t}return e}();t.exports=function(t,e,A,r){var i=n,o=r+A;t^=-1;for(var a=r;a<o;a++)t=t>>>8^i[255&(t^e[a])];return-1^t}},function(t,e,A){"use strict";t.exports=function(t,e){var A,n,r,i,o,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F;A=t.state,n=t.next_in,b=t.input,r=n+(t.avail_in-5),i=t.next_out,F=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=A.dmax,g=A.wsize,c=A.whave,I=A.wnext,u=A.window,l=A.hold,C=A.bits,h=A.lencode,B=A.distcode,f=(1<<A.lenbits)-1,d=(1<<A.distbits)-1;t:do{C<15&&(l+=b[n++]<<C,C+=8,l+=b[n++]<<C,C+=8),Q=h[l&f];e:for(;;){if(l>>>=E=Q>>>24,C-=E,0===(E=Q>>>16&255))F[i++]=65535&Q;else{if(!(16&E)){if(0===(64&E)){Q=h[(65535&Q)+(l&(1<<E)-1)];continue e}if(32&E){A.mode=12;break t}t.msg="invalid literal/length code",A.mode=30;break t}p=65535&Q,(E&=15)&&(C<E&&(l+=b[n++]<<C,C+=8),p+=l&(1<<E)-1,l>>>=E,C-=E),C<15&&(l+=b[n++]<<C,C+=8,l+=b[n++]<<C,C+=8),Q=B[l&d];A:for(;;){if(l>>>=E=Q>>>24,C-=E,!(16&(E=Q>>>16&255))){if(0===(64&E)){Q=B[(65535&Q)+(l&(1<<E)-1)];continue A}t.msg="invalid distance code",A.mode=30;break t}if(y=65535&Q,C<(E&=15)&&(l+=b[n++]<<C,(C+=8)<E&&(l+=b[n++]<<C,C+=8)),(y+=l&(1<<E)-1)>s){t.msg="invalid distance too far back",A.mode=30;break t}if(l>>>=E,C-=E,y>(E=i-o)){if((E=y-E)>c&&A.sane){t.msg="invalid distance too far back",A.mode=30;break t}if(v=0,m=u,0===I){if(v+=g-E,E<p){p-=E;do{F[i++]=u[v++]}while(--E);v=i-y,m=F}}else if(I<E){if(v+=g+I-E,(E-=I)<p){p-=E;do{F[i++]=u[v++]}while(--E);if(v=0,I<p){p-=E=I;do{F[i++]=u[v++]}while(--E);v=i-y,m=F}}}else if(v+=I-E,E<p){p-=E;do{F[i++]=u[v++]}while(--E);v=i-y,m=F}for(;p>2;)F[i++]=m[v++],F[i++]=m[v++],F[i++]=m[v++],p-=3;p&&(F[i++]=m[v++],p>1&&(F[i++]=m[v++]))}else{v=i-y;do{F[i++]=F[v++],F[i++]=F[v++],F[i++]=F[v++],p-=3}while(p>2);p&&(F[i++]=F[v++],p>1&&(F[i++]=F[v++]))}break}}break}}while(n<r&&i<a);n-=p=C>>3,l&=(1<<(C-=p<<3))-1,t.next_in=n,t.next_out=i,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=i<a?a-i+257:257-(i-a),A.hold=l,A.bits=C}},function(t,e,A){"use strict";var n=A(302),r=[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],i=[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],a=[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];t.exports=function(t,e,A,s,g,c,I,u){var l,C,h,B,f,d,Q,E,p,y=u.bits,v=0,m=0,b=0,F=0,w=0,S=0,D=0,R=0,U=0,G=0,N=null,k=0,x=new n.Buf16(16),O=new n.Buf16(16),M=null,L=0;for(v=0;v<=15;v++)x[v]=0;for(m=0;m<s;m++)x[e[A+m]]++;for(w=y,F=15;F>=1&&0===x[F];F--);if(w>F&&(w=F),0===F)return g[c++]=20971520,g[c++]=20971520,u.bits=1,0;for(b=1;b<F&&0===x[b];b++);for(w<b&&(w=b),R=1,v=1;v<=15;v++)if(R<<=1,(R-=x[v])<0)return-1;if(R>0&&(0===t||1!==F))return-1;for(O[1]=0,v=1;v<15;v++)O[v+1]=O[v]+x[v];for(m=0;m<s;m++)0!==e[A+m]&&(I[O[e[A+m]]++]=m);if(0===t?(N=M=I,d=19):1===t?(N=r,k-=257,M=i,L-=257,d=256):(N=o,M=a,d=-1),G=0,m=0,v=b,f=c,S=w,D=0,h=-1,B=(U=1<<w)-1,1===t&&U>852||2===t&&U>592)return 1;for(;;){Q=v-D,I[m]<d?(E=0,p=I[m]):I[m]>d?(E=M[L+I[m]],p=N[k+I[m]]):(E=96,p=0),l=1<<v-D,b=C=1<<S;do{g[f+(G>>D)+(C-=l)]=Q<<24|E<<16|p|0}while(0!==C);for(l=1<<v-1;G&l;)l>>=1;if(0!==l?(G&=l-1,G+=l):G=0,m++,0===--x[v]){if(v===F)break;v=e[A+I[m]]}if(v>w&&(G&B)!==h){for(0===D&&(D=w),f+=b,R=1<<(S=v-D);S+D<F&&!((R-=x[S+D])<=0);)S++,R<<=1;if(U+=1<<S,1===t&&U>852||2===t&&U>592)return 1;g[h=G&B]=w<<24|S<<16|f-c|0}}return 0!==G&&(g[f+G]=v-D<<24|64<<16|0),u.bits=w,0}},function(t,e,A){"use strict";var n=A(302),r=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(g){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(g){i=!1}for(var o=new n.Buf8(256),a=0;a<256;a++)o[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function s(t,e){if(e<65534&&(t.subarray&&i||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var A="",o=0;o<e;o++)A+=String.fromCharCode(t[o]);return A}o[254]=o[254]=1,e.string2buf=function(t){var e,A,r,i,o,a=t.length,s=0;for(i=0;i<a;i++)55296===(64512&(A=t.charCodeAt(i)))&&i+1<a&&56320===(64512&(r=t.charCodeAt(i+1)))&&(A=65536+(A-55296<<10)+(r-56320),i++),s+=A<128?1:A<2048?2:A<65536?3:4;for(e=new n.Buf8(s),o=0,i=0;o<s;i++)55296===(64512&(A=t.charCodeAt(i)))&&i+1<a&&56320===(64512&(r=t.charCodeAt(i+1)))&&(A=65536+(A-55296<<10)+(r-56320),i++),A<128?e[o++]=A:A<2048?(e[o++]=192|A>>>6,e[o++]=128|63&A):A<65536?(e[o++]=224|A>>>12,e[o++]=128|A>>>6&63,e[o++]=128|63&A):(e[o++]=240|A>>>18,e[o++]=128|A>>>12&63,e[o++]=128|A>>>6&63,e[o++]=128|63&A);return e},e.buf2binstring=function(t){return s(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),A=0,r=e.length;A<r;A++)e[A]=t.charCodeAt(A);return e},e.buf2string=function(t,e){var A,n,r,i,a=e||t.length,g=new Array(2*a);for(n=0,A=0;A<a;)if((r=t[A++])<128)g[n++]=r;else if((i=o[r])>4)g[n++]=65533,A+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&A<a;)r=r<<6|63&t[A++],i--;i>1?g[n++]=65533:r<65536?g[n++]=r:(r-=65536,g[n++]=55296|r>>10&1023,g[n++]=56320|1023&r)}return s(g,n)},e.utf8border=function(t,e){var A;for((e=e||t.length)>t.length&&(e=t.length),A=e-1;A>=0&&128===(192&t[A]);)A--;return A<0||0===A?e:A+o[t[A]]>e?A:e}},function(t,e,A){"use strict";t.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(t,e,A){"use strict";t.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(t,e,A){"use strict";t.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(t,e,A){"use strict";t.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(t,e,A){var n=A(649);t.exports=function(t){function e(t){var A,n=null;function i(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(i.enabled){var o=i,a=Number(new Date),s=a-(A||a);o.diff=s,o.prev=A,o.curr=a,A=a,n[0]=e.coerce(n[0]),"string"!==typeof n[0]&&n.unshift("%O");var g=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,(function(t,A){if("%%"===t)return"%";g++;var r=e.formatters[A];if("function"===typeof r){var i=n[g];t=r.call(o,i),n.splice(g,1),g--}return t})),e.formatArgs.call(o,n);var c=o.log||e.log;c.apply(o,n)}}return i.namespace=t,i.useColors=e.useColors(),i.color=e.selectColor(t),i.extend=r,i.destroy=e.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:function(){return null===n?e.enabled(t):n},set:function(t){n=t}}),"function"===typeof e.init&&e.init(i),i}function r(t,A){var n=e(this.namespace+("undefined"===typeof A?":":A)+t);return n.log=this.log,n}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},e.disable=function(){var t=[].concat(n(e.names.map(i)),n(e.skips.map(i).map((function(t){return"-"+t})))).join(",");return e.enable(""),t},e.enable=function(t){var A;e.save(t),e.names=[],e.skips=[];var n=("string"===typeof t?t:"").split(/[\s,]+/),r=n.length;for(A=0;A<r;A++)n[A]&&("-"===(t=n[A].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){if("*"===t[t.length-1])return!0;var A,n;for(A=0,n=e.skips.length;A<n;A++)if(e.skips[A].test(t))return!1;for(A=0,n=e.names.length;A<n;A++)if(e.names[A].test(t))return!0;return!1},e.humanize=A(653),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((function(A){e[A]=t[A]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){for(var A=0,n=0;n<t.length;n++)A=(A<<5)-A+t.charCodeAt(n),A|=0;return e.colors[Math.abs(A)%e.colors.length]},e.enable(e.load()),e}},function(t,e,A){var n=A(650),r=A(651),i=A(548),o=A(652);t.exports=function(t){return n(t)||r(t)||i(t)||o()}},function(t,e,A){var n=A(466);t.exports=function(t){if(Array.isArray(t))return n(t)}},function(t,e){t.exports=function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e){t.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(t,e){var A=1e3,n=6e4,r=60*n,i=24*r;function o(t,e,A,n){var r=e>=1.5*A;return Math.round(t/A)+" "+n+(r?"s":"")}t.exports=function(t,e){e=e||{};var a=typeof t;if("string"===a&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var o=parseFloat(e[1]);switch((e[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*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;case"minutes":case"minute":case"mins":case"min":case"m":return o*n;case"seconds":case"second":case"secs":case"sec":case"s":return o*A;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}(t);if("number"===a&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=i)return o(t,e,i,"day");if(e>=r)return o(t,e,r,"hour");if(e>=n)return o(t,e,n,"minute");if(e>=A)return o(t,e,A,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=i)return Math.round(t/i)+"d";if(e>=r)return Math.round(t/r)+"h";if(e>=n)return Math.round(t/n)+"m";if(e>=A)return Math.round(t/A)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,A){(function(e,n,r){var i=A(468),o=A(117),a=A(469),s=A(470),g=A(661),c=a.IncomingMessage,I=a.readyStates;var u=t.exports=function(t){var A,n=this;s.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var r=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!i.abortController)r=!1,A=!0;else if("prefer-streaming"===t.mode)A=!1;else if("allow-wrong-content-type"===t.mode)A=!i.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");A=!0}n._mode=function(t,e){return i.fetch&&e?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&t?"arraybuffer":i.vbArray&&t?"text:vbarray":"text"}(A,r),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};o(u,s.Writable),u.prototype.setHeader=function(t,e){var A=t.toLowerCase();-1===l.indexOf(A)&&(this._headers[A]={name:t,value:e})},u.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},u.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},u.prototype._onFinish=function(){var t=this;if(!t._destroyed){var A=t._opts,o=t._headers,a=null;"GET"!==A.method&&"HEAD"!==A.method&&(a=i.arraybuffer?g(e.concat(t._body)):i.blobConstructor?new n.Blob(t._body.map((function(t){return g(t)})),{type:(o["content-type"]||{}).value||""}):e.concat(t._body).toString());var s=[];if(Object.keys(o).forEach((function(t){var e=o[t].name,A=o[t].value;Array.isArray(A)?A.forEach((function(t){s.push([e,t])})):s.push([e,A])})),"fetch"===t._mode){var c=null;if(i.abortController){var u=new AbortController;c=u.signal,t._fetchAbortController=u,"requestTimeout"in A&&0!==A.requestTimeout&&(t._fetchTimer=n.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),A.requestTimeout))}n.fetch(t._opts.url,{method:t._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:A.withCredentials?"include":"same-origin",signal:c}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){n.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var l=t._xhr=new n.XMLHttpRequest;try{l.open(t._opts.method,t._opts.url,!0)}catch(C){return void r.nextTick((function(){t.emit("error",C)}))}"responseType"in l&&(l.responseType=t._mode.split(":")[0]),"withCredentials"in l&&(l.withCredentials=!!A.withCredentials),"text"===t._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in A&&(l.timeout=A.requestTimeout,l.ontimeout=function(){t.emit("requestTimeout")}),s.forEach((function(t){l.setRequestHeader(t[0],t[1])})),t._response=null,l.onreadystatechange=function(){switch(l.readyState){case I.LOADING:case I.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(l.onprogress=function(){t._onXHRProgress()}),l.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{l.send(a)}catch(C){return void r.nextTick((function(){t.emit("error",C)}))}}}},u.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(A){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},u.prototype._connect=function(){var t=this;t._destroyed||(t._response=new c(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},u.prototype._write=function(t,e,A){this._body.push(t),A()},u.prototype.abort=u.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},u.prototype.end=function(t,e,A){"function"===typeof t&&(A=t,t=void 0),s.Writable.prototype.end.call(this,t,e,A)},u.prototype.flushHeaders=function(){},u.prototype.setTimeout=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){};var l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,A(104).Buffer,A(58),A(62))},function(t,e){},function(t,e,A){"use strict";var n=A(376).Buffer,r=A(657);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,A=""+e.data;e=e.next;)A+=t+e.data;return A},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,A,r,i=n.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,A=i,r=a,e.copy(A,r),a+=o.data.length,o=o.next;return i},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,A){(function(t){var n="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,r=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(r.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new i(r.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},A(659),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,A(58))},function(t,e,A){(function(t,e){!function(t,A){"use strict";if(!t.setImmediate){var n,r=1,i={},o=!1,a=t.document,s=Object.getPrototypeOf&&Object.getPrototypeOf(t);s=s&&s.setTimeout?s:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){c(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,A=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=A,e}}()?function(){var e="setImmediate$"+Math.random()+"$",A=function(A){A.source===t&&"string"===typeof A.data&&0===A.data.indexOf(e)&&c(+A.data.slice(e.length))};t.addEventListener?t.addEventListener("message",A,!1):t.attachEvent("onmessage",A),n=function(A){t.postMessage(e+A,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){c(t.data)},n=function(e){t.port2.postMessage(e)}}():a&&"onreadystatechange"in a.createElement("script")?function(){var t=a.documentElement;n=function(e){var A=a.createElement("script");A.onreadystatechange=function(){c(e),A.onreadystatechange=null,t.removeChild(A),A=null},t.appendChild(A)}}():n=function(t){setTimeout(c,0,t)},s.setImmediate=function(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),A=0;A<e.length;A++)e[A]=arguments[A+1];var o={callback:t,args:e};return i[r]=o,n(r),r++},s.clearImmediate=g}function g(t){delete i[t]}function c(t){if(o)setTimeout(c,0,t);else{var e=i[t];if(e){o=!0;try{!function(t){var e=t.callback,A=t.args;switch(A.length){case 0:e();break;case 1:e(A[0]);break;case 2:e(A[0],A[1]);break;case 3:e(A[0],A[1],A[2]);break;default:e.apply(void 0,A)}}(e)}finally{g(t),o=!1}}}}}("undefined"===typeof self?"undefined"===typeof t?this:t:self)}).call(this,A(58),A(62))},function(t,e,A){"use strict";t.exports=i;var n=A(475),r=Object.create(A(257));function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r.inherits=A(117),r.inherits(i,n),i.prototype._transform=function(t,e,A){A(null,t)}},function(t,e,A){var n=A(104).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"===typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(n.isBuffer(t)){for(var e=new Uint8Array(t.length),A=t.length,r=0;r<A;r++)e[r]=t[r];return e.buffer}throw new Error("Argument must be a Buffer")}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)A.call(n,r)&&(t[r]=n[r])}return t};var A=Object.prototype.hasOwnProperty},function(t,e){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e,A){(function(t,n){var r;!function(i){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof n&&n;o.global!==o&&o.window!==o&&o.self;var a,s=2147483647,g=/^xn--/,c=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,C=String.fromCharCode;function h(t){throw new RangeError(u[t])}function B(t,e){for(var A=t.length,n=[];A--;)n[A]=e(t[A]);return n}function f(t,e){var A=t.split("@"),n="";return A.length>1&&(n=A[0]+"@",t=A[1]),n+B((t=t.replace(I,".")).split("."),e).join(".")}function d(t){for(var e,A,n=[],r=0,i=t.length;r<i;)(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<i?56320==(64512&(A=t.charCodeAt(r++)))?n.push(((1023&e)<<10)+(1023&A)+65536):(n.push(e),r--):n.push(e);return n}function Q(t){return B(t,(function(t){var e="";return t>65535&&(e+=C((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=C(t)})).join("")}function E(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function p(t,e,A){var n=0;for(t=A?l(t/700):t>>1,t+=l(t/e);t>455;n+=36)t=l(t/35);return l(n+36*t/(t+38))}function y(t){var e,A,n,r,i,o,a,g,c,I,u,C=[],B=t.length,f=0,d=128,E=72;for((A=t.lastIndexOf("-"))<0&&(A=0),n=0;n<A;++n)t.charCodeAt(n)>=128&&h("not-basic"),C.push(t.charCodeAt(n));for(r=A>0?A+1:0;r<B;){for(i=f,o=1,a=36;r>=B&&h("invalid-input"),((g=(u=t.charCodeAt(r++))-48<10?u-22:u-65<26?u-65:u-97<26?u-97:36)>=36||g>l((s-f)/o))&&h("overflow"),f+=g*o,!(g<(c=a<=E?1:a>=E+26?26:a-E));a+=36)o>l(s/(I=36-c))&&h("overflow"),o*=I;E=p(f-i,e=C.length+1,0==i),l(f/e)>s-d&&h("overflow"),d+=l(f/e),f%=e,C.splice(f++,0,d)}return Q(C)}function v(t){var e,A,n,r,i,o,a,g,c,I,u,B,f,Q,y,v=[];for(B=(t=d(t)).length,e=128,A=0,i=72,o=0;o<B;++o)(u=t[o])<128&&v.push(C(u));for(n=r=v.length,r&&v.push("-");n<B;){for(a=s,o=0;o<B;++o)(u=t[o])>=e&&u<a&&(a=u);for(a-e>l((s-A)/(f=n+1))&&h("overflow"),A+=(a-e)*f,e=a,o=0;o<B;++o)if((u=t[o])<e&&++A>s&&h("overflow"),u==e){for(g=A,c=36;!(g<(I=c<=i?1:c>=i+26?26:c-i));c+=36)y=g-I,Q=36-I,v.push(C(E(I+y%Q,0))),g=l(y/Q);v.push(C(E(g,0))),i=p(A,f,n==r),A=0,++n}++A,++e}return v.join("")}a={version:"1.4.1",ucs2:{decode:d,encode:Q},decode:y,encode:v,toASCII:function(t){return f(t,(function(t){return c.test(t)?"xn--"+v(t):t}))},toUnicode:function(t){return f(t,(function(t){return g.test(t)?y(t.slice(4).toLowerCase()):t}))}},void 0===(r=function(){return a}.call(e,A,e,t))||(t.exports=r)}()}).call(this,A(220)(t),A(58))},function(t,e,A){"use strict";t.exports={isString:function(t){return"string"===typeof t},isObject:function(t){return"object"===typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,A){"use strict";e.decode=e.parse=A(667),e.encode=e.stringify=A(668)},function(t,e,A){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,A,i){e=e||"&",A=A||"=";var o={};if("string"!==typeof t||0===t.length)return o;var a=/\+/g;t=t.split(e);var s=1e3;i&&"number"===typeof i.maxKeys&&(s=i.maxKeys);var g=t.length;s>0&&g>s&&(g=s);for(var c=0;c<g;++c){var I,u,l,C,h=t[c].replace(a,"%20"),B=h.indexOf(A);B>=0?(I=h.substr(0,B),u=h.substr(B+1)):(I=h,u=""),l=decodeURIComponent(I),C=decodeURIComponent(u),n(o,l)?r(o[l])?o[l].push(C):o[l]=[o[l],C]:o[l]=C}return o};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,A){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,A,a){return e=e||"&",A=A||"=",null===t&&(t=void 0),"object"===typeof t?i(o(t),(function(o){var a=encodeURIComponent(n(o))+A;return r(t[o])?i(t[o],(function(t){return a+encodeURIComponent(n(t))})).join(e):a+encodeURIComponent(n(t[o]))})).join(e):a?encodeURIComponent(n(a))+A+encodeURIComponent(n(t)):""};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(t,e){if(t.map)return t.map(e);for(var A=[],n=0;n<t.length;n++)A.push(e(t[n],n));return A}var o=Object.keys||function(t){var e=[];for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&e.push(A);return e}},function(t,e,A){"use strict";var n=A(161);e.convertToJson=function t(e,A,r){var i={};if((!e.child||n.isEmptyObject(e.child))&&(!e.attrsMap||n.isEmptyObject(e.attrsMap)))return n.isExist(e.val)?e.val:"";if(n.isExist(e.val)&&("string"!==typeof e.val||""!==e.val&&e.val!==A.cdataPositionChar)){var o=n.isTagNameInArrayMode(e.tagname,A.arrayMode,r);i[A.textNodeName]=o?[e.val]:e.val}n.merge(i,e.attrsMap,A.arrayMode);for(var a=Object.keys(e.child),s=0;s<a.length;s++){var g=a[s];if(e.child[g]&&e.child[g].length>1)for(var c in i[g]=[],e.child[g])e.child[g].hasOwnProperty(c)&&i[g].push(t(e.child[g][c],A,g));else{var I=t(e.child[g][0],A,g),u=!0===A.arrayMode&&"object"===typeof I||n.isTagNameInArrayMode(g,A.arrayMode,r);i[g]=u?[I]:I}}return i}},function(t,e,A){"use strict";t.exports=function(t,e,A){this.tagname=t,this.parent=e,this.child={},this.attrsMap={},this.val=A,this.addChild=function(t){Array.isArray(this.child[t.tagname])?this.child[t.tagname].push(t):this.child[t.tagname]=[t]}}},function(t,e,A){"use strict";var n=A(161),r={allowBooleanAttributes:!1},i=["allowBooleanAttributes"];function o(t,e){for(var A=e;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{var n=t.substr(A,e-A);if(e>5&&"xml"===n)return u("InvalidXml","XML declaration allowed only at the start of the document.",C(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function a(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){var A=1;for(e+=8;e<t.length;e++)if("<"===t[e])A++;else if(">"===t[e]&&0===--A)break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=n.buildOptions(e,r,i);var A,g=[],l=!1,h=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(var B=0;B<t.length;B++)if("<"===t[B]&&"?"===t[B+1]){if((B=o(t,B+=2)).err)return B}else{if("<"!==t[B]){if(" "===t[B]||"\t"===t[B]||"\n"===t[B]||"\r"===t[B])continue;return u("InvalidChar","char '"+t[B]+"' is not expected.",C(t,B))}if("!"===t[++B]){B=a(t,B);continue}var f=!1;"/"===t[B]&&(f=!0,B++);for(var d="";B<t.length&&">"!==t[B]&&" "!==t[B]&&"\t"!==t[B]&&"\n"!==t[B]&&"\r"!==t[B];B++)d+=t[B];if("/"===(d=d.trim())[d.length-1]&&(d=d.substring(0,d.length-1),B--),A=d,!n.isName(A)){return u("InvalidTag",0===d.trim().length?"There is an unnecessary space between tag name and backward slash '</ ..'.":"Tag '"+d+"' is an invalid name.",C(t,B))}var Q=s(t,B);if(!1===Q)return u("InvalidAttr","Attributes for '"+d+"' have open quote.",C(t,B));var E=Q.value;if(B=Q.index,"/"===E[E.length-1]){var p=c(E=E.substring(0,E.length-1),e);if(!0!==p)return u(p.err.code,p.err.msg,C(t,B-E.length+p.err.line));l=!0}else if(f){if(!Q.tagClosed)return u("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",C(t,B));if(E.trim().length>0)return u("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",C(t,B));var y=g.pop();if(d!==y)return u("InvalidTag","Closing tag '"+y+"' is expected inplace of '"+d+"'.",C(t,B));0==g.length&&(h=!0)}else{var v=c(E,e);if(!0!==v)return u(v.err.code,v.err.msg,C(t,B-E.length+v.err.line));if(!0===h)return u("InvalidXml","Multiple possible root nodes found.",C(t,B));g.push(d),l=!0}for(B++;B<t.length;B++)if("<"===t[B]){if("!"===t[B+1]){B=a(t,++B);continue}if("?"!==t[B+1])break;if((B=o(t,++B)).err)return B}else if("&"===t[B]){var m=I(t,B);if(-1==m)return u("InvalidChar","char '&' is not expected.",C(t,B));B=m}"<"===t[B]&&B--}return l?!(g.length>0)||u("InvalidXml","Invalid '"+JSON.stringify(g,null,4).replace(/\r?\n/g,"")+"' found.",1):u("InvalidXml","Start tag expected.",1)};function s(t,e){for(var A="",n="",r=!1;e<t.length;e++){if('"'===t[e]||"'"===t[e])if(""===n)n=t[e];else{if(n!==t[e])continue;n=""}else if(">"===t[e]&&""===n){r=!0;break}A+=t[e]}return""===n&&{value:A,index:e,tagClosed:r}}var g=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function c(t,e){for(var A=n.getAllMatches(t,g),r={},i=0;i<A.length;i++){if(0===A[i][1].length)return u("InvalidAttr","Attribute '"+A[i][2]+"' has no space in starting.",h(t,A[i][0]));if(void 0===A[i][3]&&!e.allowBooleanAttributes)return u("InvalidAttr","boolean attribute '"+A[i][2]+"' is not allowed.",h(t,A[i][0]));var o=A[i][2];if(!l(o))return u("InvalidAttr","Attribute '"+o+"' is an invalid name.",h(t,A[i][0]));if(r.hasOwnProperty(o))return u("InvalidAttr","Attribute '"+o+"' is repeated.",h(t,A[i][0]));r[o]=1}return!0}function I(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){var A=/\d/;for("x"===t[e]&&(e++,A=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(A))break}return-1}(t,++e);for(var A=0;e<t.length;e++,A++)if(!(t[e].match(/\w/)&&A<20)){if(";"===t[e])break;return-1}return e}function u(t,e,A){return{err:{code:t,msg:e,line:A}}}function l(t){return n.isName(t)}function C(t,e){return t.substring(0,e).split(/\r?\n/).length}function h(t,e){return t.indexOf(e)+e.length}},function(t,e,A){"use strict";var n=function(t){return String.fromCharCode(t)},r={nilChar:n(176),missingChar:n(201),nilPremitive:n(175),missingPremitive:n(200),emptyChar:n(178),emptyValue:n(177),boundryChar:n(179),objStart:n(198),arrStart:n(204),arrayEnd:n(185)},i=[r.nilChar,r.nilPremitive,r.missingChar,r.missingPremitive,r.boundryChar,r.emptyChar,r.emptyValue,r.arrayEnd,r.objStart,r.arrStart],o=function t(e,A,n){if("string"===typeof A)return e&&e[0]&&void 0!==e[0].val?a(e[0].val,A):a(e,A);var i,o=void 0===(i=e)?r.missingChar:null===i?r.nilChar:!(i.child&&0===Object.keys(i.child).length&&(!i.attrsMap||0===Object.keys(i.attrsMap).length))||r.emptyChar;if(!0===o){var g="";if(Array.isArray(A)){g+=r.arrStart;var c=A[0],I=e.length;if("string"===typeof c)for(var u=0;u<I;u++){var l=a(e[u].val,c);g=s(g,l)}else for(var C=0;C<I;C++){var h=t(e[C],c,n);g=s(g,h)}g+=r.arrayEnd}else{g+=r.objStart;var B=Object.keys(A);for(var f in Array.isArray(e)&&(e=e[0]),B){var d=B[f],Q=void 0;Q=!n.ignoreAttributes&&e.attrsMap&&e.attrsMap[d]?t(e.attrsMap[d],A[d],n):d===n.textNodeName?t(e.val,A[d],n):t(e.child[d],A[d],n),g=s(g,Q)}}return g}return o},a=function(t){switch(t){case void 0:return r.missingPremitive;case null:return r.nilPremitive;case"":return r.emptyValue;default:return t}},s=function(t,e){return g(e[0])||g(t[t.length-1])||(t+=r.boundryChar),t+e},g=function(t){return-1!==i.indexOf(t)};var c=A(304),I=A(161).buildOptions;e.convert2nimn=function(t,e,A){return A=I(A,c.defaultOptions,c.props),o(t,e,A)}},function(t,e,A){"use strict";var n=A(161),r=A(161).buildOptions,i=A(304),o=function t(e,A,r){for(var i,o="{",a=Object.keys(e.child),s=0;s<a.length;s++){var g=a[s];if(e.child[g]&&e.child[g].length>1){for(var c in o+='"'+g+'" : [ ',e.child[g])o+=t(e.child[g][c],A)+" , ";o=o.substr(0,o.length-1)+" ] "}else o+='"'+g+'" : '+t(e.child[g][0],A)+" ,"}return n.merge(o,e.attrsMap),n.isEmptyObject(o)?n.isExist(e.val)?e.val:"":(n.isExist(e.val)&&("string"!==typeof e.val||""!==e.val&&e.val!==A.cdataPositionChar)&&(o+='"'+A.textNodeName+'" : '+(!0!==(i=e.val)&&!1!==i&&isNaN(i)?'"'+i+'"':i)),","===o[o.length-1]&&(o=o.substr(0,o.length-2)),o+"}")};e.convertToJsonString=function(t,e){return(e=r(e,i.defaultOptions,i.props)).indentBy=e.indentBy||"",o(t,e,0)}},function(t,e,A){"use strict";var n=A(161).buildOptions,r={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataTagName:!1,cdataPositionChar:"\\c",format:!1,indentBy:"  ",supressEmptyNode:!1,tagValueProcessor:function(t){return t},attrValueProcessor:function(t){return t}},i=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","cdataTagName","cdataPositionChar","format","indentBy","supressEmptyNode","tagValueProcessor","attrValueProcessor"];function o(t){this.options=n(t,r,i),this.options.ignoreAttributes||this.options.attrNodeName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=C),this.options.cdataTagName?this.isCDATA=h:this.isCDATA=function(){return!1},this.replaceCDATAstr=a,this.replaceCDATAarr=s,this.options.format?(this.indentate=l,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""),this.options.supressEmptyNode?(this.buildTextNode=u,this.buildObjNode=c):(this.buildTextNode=I,this.buildObjNode=g),this.buildTextValNode=I,this.buildObjectNode=g}function a(t,e){return t=this.options.tagValueProcessor(""+t),""===this.options.cdataPositionChar||""===t?t+"<![CDATA["+e+"]]"+this.tagEndChar:t.replace(this.options.cdataPositionChar,"<![CDATA["+e+"]]"+this.tagEndChar)}function s(t,e){if(t=this.options.tagValueProcessor(""+t),""===this.options.cdataPositionChar||""===t)return t+"<![CDATA["+e.join("]]><![CDATA[")+"]]"+this.tagEndChar;for(var A in e)t=t.replace(this.options.cdataPositionChar,"<![CDATA["+e[A]+"]]>");return t+this.newLine}function g(t,e,A,n){return A&&!t.includes("<")?this.indentate(n)+"<"+e+A+">"+t+"</"+e+this.tagEndChar:this.indentate(n)+"<"+e+A+this.tagEndChar+t+this.indentate(n)+"</"+e+this.tagEndChar}function c(t,e,A,n){return""!==t?this.buildObjectNode(t,e,A,n):this.indentate(n)+"<"+e+A+"/"+this.tagEndChar}function I(t,e,A,n){return this.indentate(n)+"<"+e+A+">"+this.options.tagValueProcessor(t)+"</"+e+this.tagEndChar}function u(t,e,A,n){return""!==t?this.buildTextValNode(t,e,A,n):this.indentate(n)+"<"+e+A+"/"+this.tagEndChar}function l(t){return this.options.indentBy.repeat(t)}function C(t){return!!t.startsWith(this.options.attributeNamePrefix)&&t.substr(this.attrPrefixLen)}function h(t){return t===this.options.cdataTagName}o.prototype.parse=function(t){return this.j2x(t,0).val},o.prototype.j2x=function(t,e){for(var A="",n="",r=Object.keys(t),i=r.length,o=0;o<i;o++){var a=r[o];if("undefined"===typeof t[a]);else if(null===t[a])n+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)n+=this.buildTextNode(t[a],a,"",e);else if("object"!==typeof t[a]){var s=this.isAttribute(a);s?A+=" "+s+'="'+this.options.attrValueProcessor(""+t[a])+'"':this.isCDATA(a)?t[this.options.textNodeName]?n+=this.replaceCDATAstr(t[this.options.textNodeName],t[a]):n+=this.replaceCDATAstr("",t[a]):a===this.options.textNodeName?t[this.options.cdataTagName]||(n+=this.options.tagValueProcessor(""+t[a])):n+=this.buildTextNode(t[a],a,"",e)}else if(Array.isArray(t[a]))if(this.isCDATA(a))n+=this.indentate(e),t[this.options.textNodeName]?n+=this.replaceCDATAarr(t[this.options.textNodeName],t[a]):n+=this.replaceCDATAarr("",t[a]);else for(var g=t[a].length,c=0;c<g;c++){var I=t[a][c];if("undefined"===typeof I);else if(null===I)n+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if("object"===typeof I){var u=this.j2x(I,e+1);n+=this.buildObjNode(u.val,a,u.attrStr,e)}else n+=this.buildTextNode(I,a,"",e)}else if(this.options.attrNodeName&&a===this.options.attrNodeName)for(var l=Object.keys(t[a]),C=l.length,h=0;h<C;h++)A+=" "+l[h]+'="'+this.options.attrValueProcessor(""+t[a][l[h]])+'"';else{var B=this.j2x(t[a],e+1);n+=this.buildObjNode(B.val,a,B.attrStr,e)}}return{attrStr:A,val:n}},t.exports=o},function(t,e,A){"use strict";var n=A(108),r=A(676);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"self",{enumerable:!0,get:function(){return i.self}}),Object.defineProperty(e,"window",{enumerable:!0,get:function(){return i.window}}),Object.defineProperty(e,"global",{enumerable:!0,get:function(){return i.global}}),Object.defineProperty(e,"document",{enumerable:!0,get:function(){return i.document}}),Object.defineProperty(e,"process",{enumerable:!0,get:function(){return i.process}}),Object.defineProperty(e,"console",{enumerable:!0,get:function(){return i.console}}),Object.defineProperty(e,"isBrowser",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"isBrowserMainThread",{enumerable:!0,get:function(){return o.isBrowserMainThread}}),Object.defineProperty(e,"getBrowser",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"isMobile",{enumerable:!0,get:function(){return a.isMobile}}),Object.defineProperty(e,"isElectron",{enumerable:!0,get:function(){return s.default}});var i=A(477),o=r(A(478)),a=r(A(677)),s=n(A(377))},function(t,e,A){var n=A(293);function r(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return r=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=r();if(e&&e.has(t))return e.get(t);var A={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=i?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(A,o,a):A[o]=t[o]}return A.default=t,e&&e.set(t,A),A}},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.isMobile=function(){return"undefined"!==typeof r.window.orientation},e.default=function(t){if(!t&&!(0,i.default)())return"Node";if((0,o.default)(t))return"Electron";var e="undefined"!==typeof navigator?navigator:{},A=t||e.userAgent||"";if(A.indexOf("Edge")>-1)return"Edge";var n=-1!==A.indexOf("MSIE "),a=-1!==A.indexOf("Trident/");if(n||a)return"IE";if(r.window.chrome)return"Chrome";if(r.window.safari)return"Safari";if(r.window.mozInnerScreenX)return"Firefox";return"Unknown"};var r=A(477),i=n(A(478)),o=n(A(377))},function(t,e,A){var n=A(538),r=A(496),i=A(708),o=A(710),a=A(541),s=A(212),g=A(425),c=A(446),I="[object Object]",u=Object.prototype.hasOwnProperty;t.exports=function(t,e,A,l,C,h){var B=s(t),f=s(e),d=B?"[object Array]":a(t),Q=f?"[object Array]":a(e),E=(d="[object Arguments]"==d?I:d)==I,p=(Q="[object Arguments]"==Q?I:Q)==I,y=d==Q;if(y&&g(t)){if(!g(e))return!1;B=!0,E=!1}if(y&&!E)return h||(h=new n),B||c(t)?r(t,e,A,l,C,h):i(t,e,d,A,l,C,h);if(!(1&A)){var v=E&&u.call(t,"__wrapped__"),m=p&&u.call(e,"__wrapped__");if(v||m){var b=v?t.value():t,F=m?e.value():e;return h||(h=new n),C(b,F,A,l,h)}}return!!y&&(h||(h=new n),o(t,e,A,l,C,h))}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,A){var n=A(307),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,A=n(e,t);return!(A<0)&&(A==e.length-1?e.pop():r.call(e,A,1),--this.size,!0)}},function(t,e,A){var n=A(307);t.exports=function(t){var e=this.__data__,A=n(e,t);return A<0?void 0:e[A][1]}},function(t,e,A){var n=A(307);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,A){var n=A(307);t.exports=function(t,e){var A=this.__data__,r=n(A,t);return r<0?(++this.size,A.push([t,e])):A[r][1]=e,this}},function(t,e,A){var n=A(306);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,A=e.delete(t);return this.size=e.size,A}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,A){var n=A(306),r=A(378),i=A(445);t.exports=function(t,e){var A=this.__data__;if(A instanceof n){var o=A.__data__;if(!r||o.length<199)return o.push([t,e]),this.size=++A.size,this;A=this.__data__=new i(o)}return A.set(t,e),this.size=A.size,this}},function(t,e,A){var n=A(444),r=A(690),i=A(201),o=A(495),a=/^\[object .+?Constructor\]$/,s=Function.prototype,g=Object.prototype,c=s.toString,I=g.hasOwnProperty,u=RegExp("^"+c.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||r(t))&&(n(t)?u:a).test(o(t))}},function(t,e,A){var n=A(691),r=function(){var t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!r&&r in t}},function(t,e,A){var n=A(144)["__core-js_shared__"];t.exports=n},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,A){var n=A(694),r=A(306),i=A(378);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}},function(t,e,A){var n=A(695),r=A(696),i=A(697),o=A(698),a=A(699);function s(t){var e=-1,A=null==t?0:t.length;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=o,s.prototype.set=a,t.exports=s},function(t,e,A){var n=A(308);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,A){var n=A(308),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var A=e[t];return"__lodash_hash_undefined__"===A?void 0:A}return r.call(e,t)?e[t]:void 0}},function(t,e,A){var n=A(308),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:r.call(e,t)}},function(t,e,A){var n=A(308);t.exports=function(t,e){var A=this.__data__;return this.size+=this.has(t)?0:1,A[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,A){var n=A(309);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,A){var n=A(309);t.exports=function(t){return n(this,t).get(t)}},function(t,e,A){var n=A(309);t.exports=function(t){return n(this,t).has(t)}},function(t,e,A){var n=A(309);t.exports=function(t,e){var A=n(this,t),r=A.size;return A.set(t,e),this.size+=A.size==r?0:1,this}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var A=-1,n=null==t?0:t.length;++A<n;)if(e(t[A],A,t))return!0;return!1}},function(t,e,A){var n=A(337),r=A(583),i=A(357),o=A(496),a=A(709),s=A(552),g=n?n.prototype:void 0,c=g?g.valueOf:void 0;t.exports=function(t,e,A,n,g,I,u){switch(A){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!I(new r(t),new r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=a;case"[object Set]":var C=1&n;if(l||(l=s),t.size!=e.size&&!C)return!1;var h=u.get(t);if(h)return h==e;n|=2,u.set(t,e);var B=o(l(t),l(e),n,g,I,u);return u.delete(t),B;case"[object Symbol]":if(c)return c.call(t)==c.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,A=Array(t.size);return t.forEach((function(t,n){A[++e]=[n,t]})),A}},function(t,e,A){var n=A(584),r=Object.prototype.hasOwnProperty;t.exports=function(t,e,A,i,o,a){var s=1&A,g=n(t),c=g.length;if(c!=n(e).length&&!s)return!1;for(var I=c;I--;){var u=g[I];if(!(s?u in e:r.call(e,u)))return!1}var l=a.get(t);if(l&&a.get(e))return l==e;var C=!0;a.set(t,e),a.set(e,t);for(var h=s;++I<c;){var B=t[u=g[I]],f=e[u];if(i)var d=s?i(f,B,u,e,t,a):i(B,f,u,t,e,a);if(!(void 0===d?B===f||o(B,f,A,i,a):d)){C=!1;break}h||(h="constructor"==u)}if(C&&!h){var Q=t.constructor,E=e.constructor;Q==E||!("constructor"in t)||!("constructor"in e)||"function"==typeof Q&&Q instanceof Q&&"function"==typeof E&&E instanceof E||(C=!1)}return a.delete(t),a.delete(e),C}},function(t,e){t.exports=function(t,e){for(var A=-1,n=null==t?0:t.length,r=0,i=[];++A<n;){var o=t[A];e(o,A,t)&&(i[r++]=o)}return i}},function(t,e){t.exports=function(t,e){for(var A=-1,n=Array(t);++A<t;)n[A]=e(A);return n}},function(t,e,A){var n=A(244),r=A(207);t.exports=function(t){return r(t)&&"[object Arguments]"==n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,A){var n=A(244),r=A(447),i=A(207),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,t.exports=function(t){return i(t)&&r(t.length)&&!!o[n(t)]}},function(t,e,A){var n=A(556),r=A(717),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return r(t);var e=[];for(var A in Object(t))i.call(t,A)&&"constructor"!=A&&e.push(A);return e}},function(t,e,A){var n=A(588)(Object.keys,Object);t.exports=n},function(t,e,A){var n=A(208)(A(144),"DataView");t.exports=n},function(t,e,A){var n=A(208)(A(144),"Promise");t.exports=n},function(t,e,A){var n=A(208)(A(144),"WeakMap");t.exports=n},function(t,e,A){var n=A(357),r=A(363),i=A(450),o=A(201);t.exports=function(t,e,A){if(!o(A))return!1;var a=typeof e;return!!("number"==a?r(A)&&i(e,A.length):"string"==a&&e in A)&&n(A[e],t)}},function(t,e,A){"use strict";function n(t,e,A){var n=A?" !== ":" === ",r=A?" || ":" && ",i=A?"!":"",o=A?"":"!";switch(t){case"null":return e+n+"null";case"array":return i+"Array.isArray("+e+")";case"object":return"("+i+e+r+"typeof "+e+n+'"object"'+r+o+"Array.isArray("+e+"))";case"integer":return"(typeof "+e+n+'"number"'+r+o+"("+e+" % 1)"+r+e+n+e+")";default:return"typeof "+e+n+'"'+t+'"'}}t.exports={copy:function(t,e){for(var A in e=e||{},t)e[A]=t[A];return e},checkDataType:n,checkDataTypes:function(t,e){switch(t.length){case 1:return n(t[0],e,!0);default:var A="",r=i(t);for(var o in r.array&&r.object&&(A=r.null?"(":"(!"+e+" || ",A+="typeof "+e+' !== "object")',delete r.null,delete r.array,delete r.object),r.number&&delete r.integer,r)A+=(A?" && ":"")+n(o,e,!0);return A}},coerceToTypes:function(t,e){if(Array.isArray(e)){for(var A=[],n=0;n<e.length;n++){var i=e[n];(r[i]||"array"===t&&"array"===i)&&(A[A.length]=i)}if(A.length)return A}else{if(r[e])return[e];if("array"===t&&"array"===e)return["array"]}},toHash:i,getProperty:s,escapeQuotes:g,equal:A(221),ucs2length:A(1171),varOccurences:function(t,e){e+="[^0-9]";var A=t.match(new RegExp(e,"g"));return A?A.length:0},varReplace:function(t,e,A){return e+="([^0-9])",A=A.replace(/\$/g,"$$$$"),t.replace(new RegExp(e,"g"),A+"$1")},cleanUpCode:function(t){return t.replace(c,"").replace(I,"").replace(u,"if (!($1))")},finalCleanUpCode:function(t,e){var A=t.match(l);A&&2==A.length&&(t=e?t.replace(h,"").replace(B,"return data;"):t.replace(C,"").replace("return errors === 0;","validate.errors = null; return true;"));return(A=t.match(f))&&3===A.length?t.replace(d,""):t},schemaHasRules:function(t,e){if("boolean"==typeof t)return!t;for(var A in t)if(e[A])return!0},schemaHasRulesExcept:function(t,e,A){if("boolean"==typeof t)return!t&&"not"!=A;for(var n in t)if(n!=A&&e[n])return!0},schemaUnknownRules:function(t,e){if("boolean"==typeof t)return;for(var A in t)if(!e[A])return A},toQuotedString:Q,getPathExpr:function(t,e,A,n){return y(t,A?"'/' + "+e+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+e+" + ']'":"'[\\'' + "+e+" + '\\']'")},getPath:function(t,e,A){var n=Q(A?"/"+v(e):s(e));return y(t,n)},getData:function(t,e,A){var n,r,i,o;if(""===t)return"rootData";if("/"==t[0]){if(!E.test(t))throw new Error("Invalid JSON-pointer: "+t);r=t,i="rootData"}else{if(!(o=t.match(p)))throw new Error("Invalid JSON-pointer: "+t);if(n=+o[1],"#"==(r=o[2])){if(n>=e)throw new Error("Cannot access property/index "+n+" levels up, current level is "+e);return A[e-n]}if(n>e)throw new Error("Cannot access data "+n+" levels up, current level is "+e);if(i="data"+(e-n||""),!r)return i}for(var a=i,g=r.split("/"),c=0;c<g.length;c++){var I=g[c];I&&(i+=s(m(I)),a+=" && "+i)}return a},unescapeFragment:function(t){return m(decodeURIComponent(t))},unescapeJsonPointer:m,escapeFragment:function(t){return encodeURIComponent(v(t))},escapeJsonPointer:v};var r=i(["string","number","integer","boolean","null"]);function i(t){for(var e={},A=0;A<t.length;A++)e[t[A]]=!0;return e}var o=/^[a-z$_][a-z$_0-9]*$/i,a=/'|\\/g;function s(t){return"number"==typeof t?"["+t+"]":o.test(t)?"."+t:"['"+g(t)+"']"}function g(t){return t.replace(a,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}var c=/else\s*{\s*}/g,I=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,u=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;var l=/[^v.]errors/g,C=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,h=/var errors = 0;|var vErrors = null;/g,B=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,f=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,d=/if \(rootData === undefined\) rootData = data;/;function Q(t){return"'"+g(t)+"'"}var E=/^\/(?:[^~]|~0|~1)*$/,p=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function y(t,e){return'""'==t?e:(t+" + "+e).replace(/' \+ '/g,"")}function v(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function m(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}},function(t,e,A){var n=A(559),r=A(560),i=A(1083),o=A(724),a=A(591),s=function t(e,A,s){var g,c,I,u=e&t.F,l=e&t.G,C=e&t.S,h=e&t.P,B=e&t.B,f=e&t.W,d=l?r:r[A]||(r[A]={}),Q=d.prototype,E=l?n:C?n[A]:(n[A]||{}).prototype;for(g in l&&(s=A),s)(c=!u&&E&&void 0!==E[g])&&a(d,g)||(I=c?E[g]:s[g],d[g]=l&&"function"!=typeof E[g]?s[g]:B&&c?i(I,n):f&&E[g]==I?function(t){var e=function(e,A,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,A)}return new t(e,A,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(I):h&&"function"==typeof I?i(Function.call,I):I,h&&((d.virtual||(d.virtual={}))[g]=I,e&t.R&&Q&&!Q[g]&&o(Q,g,I)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,A){var n=A(590),r=A(810);t.exports=A(561)?function(t,e,A){return n.f(t,e,r(1,A))}:function(t,e,A){return t[e]=A,t}},function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,A){var n=A(1087),r=A(916);t.exports=function(t){return n(r(t))}},function(t,e,A){var n=A(919)("wks"),r=A(813),i=A(559).Symbol,o="function"==typeof i;(t.exports=function(t){return n[t]||(n[t]=o&&i[t]||(o?i:r)("Symbol."+t))}).store=n},function(t,e,A){var n=A(816).MAX_SAFE_COMPONENT_LENGTH,r=A(817),i=(e=t.exports={}).re=[],o=e.src=[],a=e.t={},s=0,g=function(t,e,A){var n=s++;r(n,e),a[t]=n,o[n]=e,i[n]=new RegExp(e,A?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","[0-9]+"),g("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),g("MAINVERSION","(".concat(o[a.NUMERICIDENTIFIER],")\\.")+"(".concat(o[a.NUMERICIDENTIFIER],")\\.")+"(".concat(o[a.NUMERICIDENTIFIER],")")),g("MAINVERSIONLOOSE","(".concat(o[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[a.NUMERICIDENTIFIERLOOSE],")\\.")+"(".concat(o[a.NUMERICIDENTIFIERLOOSE],")")),g("PRERELEASEIDENTIFIER","(?:".concat(o[a.NUMERICIDENTIFIER],"|").concat(o[a.NONNUMERICIDENTIFIER],")")),g("PRERELEASEIDENTIFIERLOOSE","(?:".concat(o[a.NUMERICIDENTIFIERLOOSE],"|").concat(o[a.NONNUMERICIDENTIFIER],")")),g("PRERELEASE","(?:-(".concat(o[a.PRERELEASEIDENTIFIER],"(?:\\.").concat(o[a.PRERELEASEIDENTIFIER],")*))")),g("PRERELEASELOOSE","(?:-?(".concat(o[a.PRERELEASEIDENTIFIERLOOSE],"(?:\\.").concat(o[a.PRERELEASEIDENTIFIERLOOSE],")*))")),g("BUILDIDENTIFIER","[0-9A-Za-z-]+"),g("BUILD","(?:\\+(".concat(o[a.BUILDIDENTIFIER],"(?:\\.").concat(o[a.BUILDIDENTIFIER],")*))")),g("FULLPLAIN","v?".concat(o[a.MAINVERSION]).concat(o[a.PRERELEASE],"?").concat(o[a.BUILD],"?")),g("FULL","^".concat(o[a.FULLPLAIN],"$")),g("LOOSEPLAIN","[v=\\s]*".concat(o[a.MAINVERSIONLOOSE]).concat(o[a.PRERELEASELOOSE],"?").concat(o[a.BUILD],"?")),g("LOOSE","^".concat(o[a.LOOSEPLAIN],"$")),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE","".concat(o[a.NUMERICIDENTIFIERLOOSE],"|x|X|\\*")),g("XRANGEIDENTIFIER","".concat(o[a.NUMERICIDENTIFIER],"|x|X|\\*")),g("XRANGEPLAIN","[v=\\s]*(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIER],")")+"(?:".concat(o[a.PRERELEASE],")?").concat(o[a.BUILD],"?")+")?)?"),g("XRANGEPLAINLOOSE","[v=\\s]*(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:\\.(".concat(o[a.XRANGEIDENTIFIERLOOSE],")")+"(?:".concat(o[a.PRERELEASELOOSE],")?").concat(o[a.BUILD],"?")+")?)?"),g("XRANGE","^".concat(o[a.GTLT],"\\s*").concat(o[a.XRANGEPLAIN],"$")),g("XRANGELOOSE","^".concat(o[a.GTLT],"\\s*").concat(o[a.XRANGEPLAINLOOSE],"$")),g("COERCE","".concat("(^|[^\\d])(\\d{1,").concat(n,"})")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:\\.(\\d{1,".concat(n,"}))?")+"(?:$|[^\\d])"),g("COERCERTL",o[a.COERCE],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM","(\\s*)".concat(o[a.LONETILDE],"\\s+"),!0),e.tildeTrimReplace="$1~",g("TILDE","^".concat(o[a.LONETILDE]).concat(o[a.XRANGEPLAIN],"$")),g("TILDELOOSE","^".concat(o[a.LONETILDE]).concat(o[a.XRANGEPLAINLOOSE],"$")),g("LONECARET","(?:\\^)"),g("CARETTRIM","(\\s*)".concat(o[a.LONECARET],"\\s+"),!0),e.caretTrimReplace="$1^",g("CARET","^".concat(o[a.LONECARET]).concat(o[a.XRANGEPLAIN],"$")),g("CARETLOOSE","^".concat(o[a.LONECARET]).concat(o[a.XRANGEPLAINLOOSE],"$")),g("COMPARATORLOOSE","^".concat(o[a.GTLT],"\\s*(").concat(o[a.LOOSEPLAIN],")$|^$")),g("COMPARATOR","^".concat(o[a.GTLT],"\\s*(").concat(o[a.FULLPLAIN],")$|^$")),g("COMPARATORTRIM","(\\s*)".concat(o[a.GTLT],"\\s*(").concat(o[a.LOOSEPLAIN],"|").concat(o[a.XRANGEPLAIN],")"),!0),e.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE","^\\s*(".concat(o[a.XRANGEPLAIN],")")+"\\s+-\\s+"+"(".concat(o[a.XRANGEPLAIN],")")+"\\s*$"),g("HYPHENRANGELOOSE","^\\s*(".concat(o[a.XRANGEPLAINLOOSE],")")+"\\s+-\\s+"+"(".concat(o[a.XRANGEPLAINLOOSE],")")+"\\s*$"),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0.0.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(t,e,A){var n=A(816).MAX_LENGTH,r=A(728),i=r.re,o=r.t,a=A(347);t.exports=function(t,e){if(e&&"object"===typeof e||(e={loose:!!e,includePrerelease:!1}),t instanceof a)return t;if("string"!==typeof t)return null;if(t.length>n)return null;if(!(e.loose?i[o.LOOSE]:i[o.FULL]).test(t))return null;try{return new a(t,e)}catch(A){return null}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return I}));var n=A(9),r=A(15),i=A(23),o=A(24),a=A(40),s=A(393),g=A(365),c=A(76),I=function(t){Object(i.a)(A,t);var e=Object(o.a)(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"_renderAxisTopLayers",value:function(){var t=this.props,e=t.axisTopLabelData,A=t.matrixLeft,n=t.width,r=t.matrixWidth,i=t.viewWidth,o=t.theme,s=t.targetX,I=t.targetY,u=t.axisTopTitle,l=t.cellWidth,C=t.axisOffsetTop,h=t.scaleFactor,B=l>=c.b,f=I+(C-c.c)/2/h;return[new g.a({id:"axisTopLabels",coordinateSystem:a.a.CARTESIAN,data:e,getText:function(t){return t[1]},getPosition:function(t){return[A+(t[0]+.5)/n*r,f]},getTextAnchor:"start",getColor:function(){return c.k[o]},getSize:B?c.b:0,getAngle:75,fontFamily:c.a,updateTriggers:{getPosition:[f,A,r,i],getSize:[B],getColor:[o]}}),new g.a({id:"axisTopTitle",coordinateSystem:a.a.CARTESIAN,data:[{title:u}],getText:function(t){return t.title},getPosition:[s,I],getTextAnchor:"middle",getColor:function(){return c.k[o]},getSize:B?0:c.f,getAngle:0,fontFamily:c.a,updateTriggers:{getSize:[B],getColor:[o]}})]}},{key:"_renderAxisLeftLayers",value:function(){var t=this.props,e=t.axisLeftLabelData,A=t.matrixTop,n=t.height,r=t.matrixHeight,i=t.viewHeight,o=t.theme,s=t.axisLeftTitle,I=t.targetX,u=t.targetY,l=t.cellHeight,C=t.axisOffsetLeft,h=t.scaleFactor,B=l>=c.b,f=I+(C-c.c)/2/h;return[new g.a({id:"axisLeftLabels",coordinateSystem:a.a.CARTESIAN,data:e,getText:function(t){return t[1]},getPosition:function(t){return[f,A+(t[0]+.5)/n*r]},getTextAnchor:"end",getColor:function(){return c.k[o]},getSize:B?c.b:0,getAngle:0,fontFamily:c.a,updateTriggers:{getPosition:[f,A,r,i],getSize:[B],getColor:[o]}}),new g.a({id:"axisLeftTitle",coordinateSystem:a.a.CARTESIAN,data:[{title:s}],getText:function(t){return t.title},getPosition:[I,u],getTextAnchor:"middle",getColor:function(){return c.k[o]},getSize:B?0:c.f,getAngle:90,fontFamily:c.a,updateTriggers:{getSize:[B],getColor:[o]}})]}},{key:"renderLayers",value:function(){return[this._renderAxisTopLayers(),this._renderAxisLeftLayers()]}}]),A}(s.a);I.layerName="HeatmapCompositeTextLayer"},function(t,e,A){"use strict";A.d(e,"a",(function(){return u}));var n=A(9),r=A(15),i=A(23),o=A(24),a=A(20),s=A(527),g=A(393),c=A(76),I=Object(a.a)({},s.a.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]}}),u=function(t){Object(i.a)(A,t);var e=Object(o.a)(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"renderLayers",value:function(){var t=this.props.image;return new s.a(this.props,{id:"".concat(this.props.id,"-wrapped"),image:t,textureParameters:c.j})}}]),A}(g.a);u.layerName="PixelatedBitmapLayer",u.defaultProps=I},function(t,e,A){"use strict";var n=A(9),r=A(15),i=A(71),o=A(92),a=A(23),s=A(24),g=A(28),c=A(395),I=A(479),u=A(480),l=A(527),C=A(233),h=A(76);A.d(e,"a",(function(){return B}));var B=function(t){Object(a.a)(A,t);var e=Object(s.a)(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"_getShaders",value:function(t){var e=this;return this.props.extensions.forEach((function(A){t=Object(c.a)(t,A.getShaders.call(e,A))})),t}},{key:"updateState",value:function(t){Object(o.a)(Object(i.a)(A.prototype),"updateState",this).call(this,t),this.loadTexture(this.props.image)}},{key:"getShaders",value:function(){var t=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",t),modules:[I.a,u.a]})}},{key:"draw",value:function(t){var e=t.uniforms,A=this.state,n=A.bitmapTexture,r=A.model,i=this.props,o=i.aggSizeX,a=i.aggSizeY,s=i.colorScaleLo,g=i.colorScaleHi;n&&r&&r.setUniforms(Object.assign({},e,{uBitmapTexture:n,uTextureSize:[h.l,h.l],uAggSize:[o,a],uColorScaleRange:[s,g]})).draw()}},{key:"loadTexture",value:function(t){var e=this.context.gl;this.state.bitmapTexture&&this.state.bitmapTexture.delete(),t instanceof C.a?this.setState({bitmapTexture:t}):t&&this.setState({bitmapTexture:new C.a(e,{data:t,mipmaps:!1,parameters:h.j,format:g.default.LUMINANCE,dataFormat:g.default.LUMINANCE,type:g.default.UNSIGNED_BYTE,width:h.l,height:h.l})})}}]),A}(l.a);B.layerName="HeatmapBitmapLayer",B.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(t,e,A){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,A){"use strict";e.__esModule=!0;var n,r=A(1089),i=(n=r)&&n.__esModule?n:{default:n};e.default=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,i.default)(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}()},function(t,e,A){"use strict";e.__esModule=!0;var n,r=A(1090),i=(n=r)&&n.__esModule?n:{default:n};e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"===typeof e?"undefined":(0,i.default)(e))&&"function"!==typeof e?t:e}},function(t,e,A){"use strict";e.__esModule=!0;var n=o(A(1269)),r=o(A(1273)),i=o(A(1090));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof e?"undefined":(0,i.default)(e)));t.prototype=(0,r.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(n.default?(0,n.default)(t,e):t.__proto__=e)}},function(t,e,A){"use strict";A.d(e,"b",(function(){return s})),A.d(e,"c",(function(){return g})),A.d(e,"a",(function(){return c}));var n=A(385),r=A(19),i=A(49);function o(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function s(t,e){return g(t,e)}function g(t,e){return(e=Array.isArray(e)?e:[e]).every((function(e){return I(t,e)}))}function c(t){for(var e in t.luma=t.luma||{},t.luma.caps=t.luma.caps||{},n.b)void 0===t.luma.caps[e]&&(t.luma.caps[e]=I(t,e));return t.luma.caps}function I(t,e){return t.luma=t.luma||{},t.luma.caps=t.luma.caps||{},void 0===t.luma.caps[e]&&(t.luma.caps[e]=function(t,e){var A,a=n.b[e];Object(i.a)(a,e);var s=Object(r.j)(t)&&a[1]||a[0];if("function"===typeof s)A=s(t);else if(Array.isArray(s)){A=!0;var g,c=o(s);try{for(c.s();!(g=c.n()).done;){var I=g.value;A=A&&Boolean(t.getExtension(I))}}catch(u){c.e(u)}finally{c.f()}}else"string"===typeof s?A=Boolean(t.getExtension(s)):"boolean"===typeof s?A=s:Object(i.a)(!1);return A}(t,e)),t.luma.caps[e]||r.k.log(2,"Feature: ".concat(e," not supported"))(),t.luma.caps[e]}},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(19);function r(t,e,A,r){var i="See luma.gl ".concat(A," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),o=Object.getPrototypeOf(t);r.forEach((function(t){o.methodName||(o[t]=function(){throw n.k.removed("Calling removed method ".concat(e,".").concat(t,": "),i)(),new Error(t)})}))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n={pickingSelectedColor:null,pickingHighlightColor:new Uint8Array([0,255,255,255]),pickingActive:!1,pickingAttribute:!1};var r={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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,e={};if(void 0!==t.pickingSelectedColor)if(t.pickingSelectedColor){var A=t.pickingSelectedColor.slice(0,3);e.picking_uSelectedColorValid=1,e.picking_uSelectedColor=A}else e.picking_uSelectedColorValid=0;if(t.pickingHighlightColor){var r=Array.from(t.pickingHighlightColor,(function(t){return t/255}));Number.isFinite(r[3])||(r[3]=1),e.picking_uHighlightColor=r}return void 0!==t.pickingActive&&(e.picking_uActive=Boolean(t.pickingActive),e.picking_uAttribute=Boolean(t.pickingAttribute)),e}}},function(t,e,A){"use strict";var n=A(26),r=A(29),i=A(1),o=A(5),a=A(4),s=A(312),g="undefined"!==typeof __VERSION__?__VERSION__:"untranspiled source",c=Object(s.a)();function I(t){try{var e=window[t],A="__storage_test__";return e.setItem(A,A),e.removeItem(A),e}catch(n){return null}}var u=function(){function t(e,A){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";Object(o.a)(this,t),this.storage=I(n),this.id=e,this.config={},Object.assign(this.config,A),this._loadConfiguration()}return Object(a.a)(t,[{key:"getConfiguration",value:function(){return this.config}},{key:"setConfiguration",value:function(t){return this.config={},this.updateConfiguration(t)}},{key:"updateConfiguration",value:function(t){if(Object.assign(this.config,t),this.storage){var e=JSON.stringify(this.config);this.storage.setItem(this.id,e)}return this}},{key:"_loadConfiguration",value:function(){var t={};if(this.storage){var e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}]),t}();function l(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600,r=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>n&&(A=Math.min(A,n/t.width));var i=t.width*A,o=t.height*A,a=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(i/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(r,");"),"background-size:".concat(i,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),a]}var C={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 h(t){return"string"===typeof t?C[t.toUpperCase()]||C.WHITE:t}function B(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return f(t,e)}(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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 n,r,i=!0,o=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){o=!0,r=t},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw r}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function d(t){var e,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"],n=Object.getPrototypeOf(t),r=Object.getOwnPropertyNames(n),i=B(r);try{var o=function(){var n=e.value;"function"===typeof t[n]&&(A.find((function(t){return n===t}))||(t[n]=t[n].bind(t)))};for(i.s();!(e=i.n()).done;)o()}catch(a){i.e(a)}finally{i.f()}}function Q(t,e){if(!t)throw new Error(e||"Assertion failed")}var E=A(127);function p(){var t;if(c&&E.b.performance)t=E.b.performance.now();else if(E.a.hrtime){var e=E.a.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}A.d(e,"a",(function(){return S}));var y={debug:c&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},v={enabled:!0,level:0};function m(){}var b={},F={once:!0};function w(t){for(var e in t)for(var A in t[e])return A||"untitled";return"empty"}var S=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=e.id;Object(o.a)(this,t),this.id=A,this.VERSION=g,this._startTs=p(),this._deltaTs=p(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new u("__probe-".concat(this.id,"__"),v),this.userData={},this.timeStamp("".concat(this.id," started")),d(this),Object.seal(this)}return Object(a.a)(t,[{key:"isEnabled",value:function(){return this._storage.config.enabled}},{key:"getLevel",value:function(){return this._storage.config.level}},{key:"getTotal",value:function(){return Number((p()-this._startTs).toPrecision(10))}},{key:"getDelta",value:function(){return Number((p()-this._deltaTs).toPrecision(10))}},{key:"getPriority",value:function(){return this.level}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.updateConfiguration({enabled:t}),this}},{key:"setLevel",value:function(t){return this._storage.updateConfiguration({level:t}),this}},{key:"assert",value:function(t,e){Q(t,e)}},{key:"warn",value:function(t){return this._getLogFunction(0,t,y.warn,arguments,F)}},{key:"error",value:function(t){return this._getLogFunction(0,t,y.error,arguments)}},{key:"deprecated",value:function(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}},{key:"removed",value:function(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}},{key:"probe",value:function(t,e){return this._getLogFunction(t,e,y.log,arguments,{time:!0,once:!0})}},{key:"log",value:function(t,e){return this._getLogFunction(t,e,y.debug,arguments)}},{key:"info",value:function(t,e){return this._getLogFunction(t,e,console.info,arguments)}},{key:"once",value:function(t,e){return this._getLogFunction(t,e,y.debug||y.info,arguments,F)}},{key:"table",value:function(t,e,A){return e?this._getLogFunction(t,e,console.table||m,A&&[A],{tag:w(e)}):m}},{key:"image",value:function(t){var e=t.logLevel,n=t.priority,i=t.image,o=t.message,a=void 0===o?"":o,s=t.scale,g=void 0===s?1:s;return this._shouldLog(e||n)?c?function(t){var e=t.image,A=t.message,n=void 0===A?"":A,i=t.scale,o=void 0===i?1:i;if("string"===typeof e){var a=new Image;return a.onload=function(){var t,e=l(a,n,o);(t=console).log.apply(t,Object(r.a)(e))},a.src=e,m}var s=e.nodeName||"";if("img"===s.toLowerCase()){var g;return(g=console).log.apply(g,Object(r.a)(l(e,n,o))),m}if("canvas"===s.toLowerCase()){var c=new Image;return c.onload=function(){var t;return(t=console).log.apply(t,Object(r.a)(l(c,n,o)))},c.src=e.toDataURL(),m}return m}({image:i,message:a,scale:g}):function(t){var e=t.image,n=(t.message,t.scale),r=void 0===n?1:n,i=null;try{i=A(625)}catch(o){}if(i)return function(){return i(e,{fit:"box",width:"".concat(Math.round(80*r),"%")}).then((function(t){return console.log(t)}))};return m}({image:i,message:a,scale:g}):m}},{key:"settings",value:function(){console.table?console.table(this._storage.config):console.log(this._storage.config)}},{key:"get",value:function(t){return this._storage.config[t]}},{key:"set",value:function(t,e){this._storage.updateConfiguration(Object(i.a)({},t,e))}},{key:"time",value:function(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}},{key:"timeEnd",value:function(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}},{key:"timeStamp",value:function(t,e){return this._getLogFunction(t,e,console.timeStamp||m)}},{key:"group",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1},n=A=R({logLevel:t,message:e,opts:A}),r=n.collapsed;return A.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(A)}},{key:"groupCollapsed",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(t,e,Object.assign({},A,{collapsed:!0}))}},{key:"groupEnd",value:function(t){return this._getLogFunction(t,"",console.groupEnd||m)}},{key:"withGroup",value:function(t,e,A){this.group(t,e)();try{A()}finally{this.groupEnd(t)()}}},{key:"trace",value:function(){console.trace&&console.trace()}},{key:"_shouldLog",value:function(t){return this.isEnabled()&&this.getLevel()>=D(t)}},{key:"_getLogFunction",value:function(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0;if(this._shouldLog(t)){var o;i=R({logLevel:t,message:e,args:n,opts:i}),Q(A=A||i.method),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=p();var a=i.tag||i.message;if(i.once){if(b[a])return m;b[a]=p()}return e=U(this.id,i.message,i),(o=A).bind.apply(o,[console,e].concat(Object(r.a)(i.args)))}return m}},{key:"level",set:function(t){this.setLevel(t)},get:function(){return this.getLevel()}},{key:"priority",set:function(t){this.level=t},get:function(){return this.level}}]),t}();function D(t){if(!t)return 0;var e;switch(Object(n.a)(t)){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return Q(Number.isFinite(e)&&e>=0),e}function R(t){var e=t.logLevel,A=t.message;t.logLevel=D(e);for(var r=t.args?Array.from(t.args):[];r.length&&r.shift()!==A;);switch(t.args=r,Object(n.a)(e)){case"string":case"function":void 0!==A&&r.unshift(A),t.message=e;break;case"object":Object.assign(t,e)}"function"===typeof t.message&&(t.message=t.message());var i=Object(n.a)(t.message);return Q("string"===i||"object"===i),Object.assign(t,t.opts)}function U(t,e,A){if("string"===typeof e){var n=A.time?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,A=Math.max(e-t.length,0);return"".concat(" ".repeat(A)).concat(t)}((a=A.total)<10?"".concat(a.toFixed(2),"ms"):a<100?"".concat(a.toFixed(1),"ms"):a<1e3?"".concat(a.toFixed(0),"ms"):"".concat((a/1e3).toFixed(2),"s")):"";e=A.time?"".concat(t,": ").concat(n,"  ").concat(e):"".concat(t,": ").concat(e),r=e,i=A.color,o=A.background,c||"string"!==typeof r||(i&&(i=h(i),r="\x1b[".concat(i,"m").concat(r,"\x1b[39m")),o&&(i=h(o),r="\x1b[".concat(o+10,"m").concat(r,"\x1b[49m"))),e=r}var r,i,o,a;return e}S.VERSION=g},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(260),o=function(){function t(e,A){Object(n.a)(this,t),this.name=e,this.type=A,this.sampleSize=1,this.reset()}return Object(r.a)(t,[{key:"setSampleSize",value:function(t){return this.sampleSize=t,this}},{key:"incrementCount",value:function(){return this.addCount(1),this}},{key:"decrementCount",value:function(){return this.subtractCount(1),this}},{key:"addCount",value:function(t){return this._count+=t,this._samples++,this._checkSampling(),this}},{key:"subtractCount",value:function(t){return this._count-=t,this._samples++,this._checkSampling(),this}},{key:"addTime",value:function(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}},{key:"timeStart",value:function(){return this._startTime=Object(i.a)(),this._timerPending=!0,this}},{key:"timeEnd",value:function(){return this._timerPending?(this.addTime(Object(i.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)}}]),t}(),a=function(){function t(e){var A=e.id,r=e.stats;Object(n.a)(this,t),this.id=A,this.stats={},this._initializeStats(r),Object.seal(this)}return Object(r.a)(t,[{key:"get",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:t,type:e})}},{key:"reset",value:function(){for(var t in this.stats)this.stats[t].reset();return this}},{key:"forEach",value:function(t){for(var e in this.stats)t(this.stats[e])}},{key:"getTable",value:function(){var t={};return this.forEach((function(e){t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}})),t}},{key:"_initializeStats",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){return t._getOrCreate(e)}))}},{key:"_getOrCreate",value:function(t){if(!t||!t.name)return null;var e=t.name,A=t.type;return this.stats[e]||(this.stats[e]=t instanceof o?t:new o(e,A)),this.stats[e]}},{key:"size",get:function(){return Object.keys(this.stats).length}}]),t}();A.d(e,"a",(function(){return a}))},function(t,e,A){"use strict";A.d(e,"a",(function(){return I}));var n=A(5),r=A(4),i=A(124),o=A(139),a=A(55),s=A(83);function g(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return c(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return c(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var I=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(n.a)(this,t);var A=e.attributes,r=void 0===A?{}:A;this.typedArrayManager=o.a,this.indexStarts=null,this.vertexStarts=null,this.vertexCount=0,this.instanceCount=0,this.attributes={},this._attributeDefs=r,this.opts=e,this.updateGeometry(e),Object.seal(this)}return Object(r.a)(t,[{key:"updateGeometry",value:function(t){Object.assign(this.opts,t);var e=this.opts,A=e.data,n=e.buffers,r=void 0===n?{}:n,i=e.getGeometry,o=e.geometryBuffer,s=e.positionFormat,c=e.dataChanged,I=e.normalize,u=void 0===I||I;if(this.data=A,this.getGeometry=i,this.positionSize=o&&o.size||("XY"===s?2:3),this.buffers=r,this.normalize=u,o&&(Object(a.a)(A.startIndices,"binary data missing startIndices"),this.getGeometry=this.getGeometryFromBuffer(o),u||(r.positions=o)),this.geometryBuffer=r.positions,Array.isArray(c)){var l,C=g(c);try{for(C.s();!(l=C.n()).done;){var h=l.value;this._rebuildGeometry(h)}}catch(B){C.e(B)}finally{C.f()}}else this._rebuildGeometry()}},{key:"updatePartialGeometry",value:function(t){var e=t.startRow,A=t.endRow;this._rebuildGeometry({startRow:e,endRow:A})}},{key:"normalizeGeometry",value:function(t){return t}},{key:"updateGeometryAttributes",value:function(t,e,A){throw new Error("Not implemented")}},{key:"getGeometrySize",value:function(t){throw new Error("Not implemented")}},{key:"getGeometryFromBuffer",value:function(t){var e=t.value||t;return Object(a.a)(ArrayBuffer.isView(e),"cannot read geometries"),Object(i.b)(e,{size:this.positionSize,offset:t.offset,stride:t.stride,startIndices:this.data.startIndices})}},{key:"_allocate",value:function(t,e){var A=this.attributes,n=this.buffers,r=this._attributeDefs,i=this.typedArrayManager;for(var o in r)if(o in n)i.release(A[o]),A[o]=null;else{var a=r[o];a.copy=e,A[o]=i.allocate(A[o],t,a)}}},{key:"_forEachGeometry",value:function(t,e,A){var n,r=this.data,o=this.getGeometry,a=Object(i.a)(r,e,A),s=a.iterable,c=a.objectInfo,I=g(s);try{for(I.s();!(n=I.n()).done;){var u=n.value;c.index++,t(o(u,c),c.index)}}catch(l){I.e(l)}finally{I.f()}}},{key:"_rebuildGeometry",value:function(t){var e=this;if(this.data&&this.getGeometry){var A=this.indexStarts,n=this.vertexStarts,r=this.instanceCount,i=this.data,o=this.geometryBuffer,a=t||{},g=a.startRow,c=void 0===g?0:g,I=a.endRow,u=void 0===I?1/0:I,l={};if(t||(A=[0],n=[0]),this.normalize||!o)this._forEachGeometry((function(t,A){t=e.normalizeGeometry(t),l[A]=t,n[A+1]=n[A]+e.getGeometrySize(t)}),c,u),r=n[n.length-1];else if(o.buffer instanceof s.a){var C=o.stride||4*this.positionSize;n=i.startIndices,r=n[i.length]||o.buffer.byteLength/C}else{var h=o.value||o,B=o.stride/h.BYTES_PER_ELEMENT||this.positionSize;n=i.startIndices,r=n[i.length]||h.length/B}this._allocate(r,Boolean(t)),this.indexStarts=A,this.vertexStarts=n,this.instanceCount=r;var f={};this._forEachGeometry((function(t,i){t=l[i]||t,f.vertexStart=n[i],f.indexStart=A[i];var o=i<n.length-1?n[i+1]:r;f.geometrySize=o-n[i],f.geometryIndex=i,e.updateGeometryAttributes(t,f)}),c,u),this.vertexCount=A[A.length-1]}}}]),t}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return c}));var n=A(1),r=A(5),i=A(4),o=A(413);function a(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function s(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?a(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):a(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var g={id:"request-scheduler",throttleRequests:!0,maxRequests:6},c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,t),this.props=s(s({},g),e),this.requestQueue=[],this.activeRequestCount=0,this.requestMap=new Map,this.stats=new o.a({id:e.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(i.a)(t,[{key:"scheduleRequest",value:function(t){var e=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(t))return this.requestMap.get(t);var A={handle:t,getPriority:e},n=new Promise((function(t){return A.resolve=t,A}));return this.requestQueue.push(A),this.requestMap.set(t,n),this._issueNewRequests(),n}},{key:"_issueRequest",value:function(t){var e=this,A=t.handle,n=t.resolve,r=!1,i=function(){r||(r=!0,e.requestMap.delete(A),e.activeRequestCount--,e._issueNewRequests())};return this.activeRequestCount++,n?n({done:i}):Promise.resolve({done:i})}},{key:"_issueNewRequests",value:function(){var t=this;this._deferredUpdate||(this._deferredUpdate=setTimeout((function(){return t._issueNewRequestsAsync()}),0))}},{key:"_issueNewRequestsAsync",value:function(){this._deferredUpdate=null;var t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==t){this._updateAllRequests();for(var e=0;e<t;++e)if(this.requestQueue.length>0){var A=this.requestQueue.shift();this._issueRequest(A)}}}},{key:"_updateAllRequests",value:function(){for(var t=this.requestQueue,e=0;e<t.length;++e){var A=t[e];this._updateRequest(A)||(t.splice(e,1),this.requestMap.delete(A.handle),e--)}t.sort((function(t,e){return t.priority-e.priority}))}},{key:"_updateRequest",value:function(t){return t.priority=t.getPriority(t.handle),!(t.priority<0)||(t.resolve(null),!1)}}]),t}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(154);function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"2.3.13";Object(n.a)(t,"no loader provided");var A=t.version;e&&A&&(e=i(e),A=i(A))}function i(t){var e=t.split(".").map(Number);return{major:e[0],minor:e[1]}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return g}));var n=A(6),r=A.n(n),i=A(11),o=A(5),a=A(4),s=A(397),g=function(){function t(e){var A=e.maxConcurrency,n=void 0===A?5:A,r=e.onMessage,i=void 0===r?null:r,a=e.onDebug,s=void 0===a?function(){}:a,g=e.reuseWorkers,c=void 0===g||g;Object(o.a)(this,t),this.maxConcurrency=n,this.onMessage=i,this.onDebug=s,this.workerPools=new Map,this.reuseWorkers=c}return Object(a.a)(t,null,[{key:"isSupported",value:function(){return"undefined"!==typeof Worker}}]),Object(a.a)(t,[{key:"setProps",value:function(t){"maxConcurrency"in t&&(this.maxConcurrency=t.maxConcurrency),"onDebug"in t&&(this.onDebug=t.onDebug),"reuseWorkers"in t&&(this.reuseWorkers=t.reuseWorkers)}},{key:"destroy",value:function(){this.workerPools.forEach((function(t){return t.destroy()}))}},{key:"process",value:function(){var t=Object(i.a)(r.a.mark((function t(e,A,n){var i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this._getWorkerPool(e,A),t.abrupt("return",i.process(n));case 2:case"end":return t.stop()}}),t,this)})));return function(e,A,n){return t.apply(this,arguments)}}()},{key:"_getWorkerPool",value:function(t,e){var A=this.workerPools.get(e);return A||(A=new s.a({source:t,name:e,onMessage:c.bind(null,this.onMessage),maxConcurrency:this.maxConcurrency,onDebug:this.onDebug,reuseWorkers:this.reuseWorkers}),this.workerPools.set(e,A)),A}}]),t}();function c(t,e){var A=e.worker,n=e.data,r=e.resolve,i=e.reject;if(t)t({worker:A,data:n,resolve:r,reject:i});else switch(n.type){case"done":r(n.result);break;case"error":i(n.message)}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return Q}));var n=A(4),r=A(1),i=A(5),o=A(14),a=A(16),s=A(7),g=A(171),c=A(115),I=A(39),u=A(399);function l(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function C(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?l(Object(A),!0).forEach((function(e){Object(r.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):l(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function h(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var B=(new I.a).lookAt({eye:[0,0,1]});function f(t){var e=t.width,A=t.height,n=t.near,r=t.far;return e=e||1,A=A||1,(new I.a).ortho({left:-e/2,right:e/2,bottom:-A/2,top:A/2,near:n,far:r})}var d=function(t){Object(o.a)(A,t);var e=h(A);function A(t){Object(i.a)(this,A);var n=t.width,r=t.height,o=t.near,a=void 0===o?.1:o,s=t.far,g=void 0===s?1e3:s,c=t.zoom,I=void 0===c?0:c,u=t.target,l=void 0===u?[0,0,0]:u,h=t.flipY,d=void 0===h||h,Q=Math.pow(2,I);return e.call(this,C(C({},t),{},{longitude:null,position:l,viewMatrix:B.clone().scale([Q,Q*(d?-1:1),Q]),projectionMatrix:f({width:n,height:r,near:a,far:g}),zoom:I}))}return A}(c.a),Q=function(t){Object(o.a)(A,t);var e=h(A);function A(t){return Object(i.a)(this,A),e.call(this,Object.assign({},t,{type:d}))}return Object(n.a)(A,[{key:"controller",get:function(){return this._getControllerProps({type:u.a})}}]),A}(g.a);Q.displayName="OrthographicView"},function(t,e,A){"use strict";A.d(e,"a",(function(){return Q}));var n=A(4),r=A(1),i=A(5),o=A(14),a=A(16),s=A(7),g=A(171),c=A(115),I=A(39),u=A(278);function l(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function C(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?l(Object(A),!0).forEach((function(e){Object(r.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):l(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function h(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var B=Math.PI/180;function f(t){var e=t.height,A=t.fovy,n=t.orbitAxis,r=t.rotationX,i=t.rotationOrbit,o=t.zoom,a=.5/Math.tan(A*B/2),s="Z"===n?[0,0,1]:[0,1,0],g="Z"===n?[0,-a,0]:[0,0,a],c=(new I.a).lookAt({eye:g,up:s});c.rotateX(r*B),"Z"===n?c.rotateZ(i*B):c.rotateY(i*B);var u=Math.pow(2,o)/(e||1);return c.scale(u),c}var d=function(t){Object(o.a)(A,t);var e=h(A);function A(t){Object(i.a)(this,A);var n=t.height,r=t.fovy,o=void 0===r?50:r,a=t.orbitAxis,s=void 0===a?"Z":a,g=t.target,c=void 0===g?[0,0,0]:g,I=t.rotationX,u=void 0===I?0:I,l=t.rotationOrbit,h=void 0===l?0:l,B=t.zoom,d=void 0===B?0:B;return e.call(this,C(C({},t),{},{longitude:null,viewMatrix:f({height:n,fovy:o,orbitAxis:s,rotationX:u,rotationOrbit:h,zoom:d}),fovy:o,position:c,zoom:d}))}return A}(c.a),Q=function(t){Object(o.a)(A,t);var e=h(A);function A(t){return Object(i.a)(this,A),e.call(this,Object.assign({},t,{type:d}))}return Object(n.a)(A,[{key:"controller",get:function(){return this._getControllerProps({type:u.b})}}]),A}(g.a);Q.displayName="OrbitView"},function(t,e){t.exports=function(t){return t}},function(t,e,A){"use strict";A.r(e);var n={};A.r(n),A.d(n,"decode",(function(){return si})),A.d(n,"encode",(function(){return ci}));var r={};A.r(r),A.d(r,"decode",(function(){return di})),A.d(r,"encode",(function(){return Qi}));var i={};A.r(i),A.d(i,"decode",(function(){return yi})),A.d(i,"encode",(function(){return vi}));var o={};A.r(o),A.d(o,"decode",(function(){return Fi})),A.d(o,"encode",(function(){return wi}));var a=A(5),s=A(14),g=A(16),c=A(7);function I(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var u=function(t){Object(s.a)(A,t);var e=I(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return A}(A(864).a);u.layerName="GreatCircleLayer",u.defaultProps={getHeight:{type:"accessor",value:0},greatCircle:!0};var l=A(4),C=A(393),h=A(602),B=A(22),f=A(532),d=A.n(f),Q=180/Math.PI;function E(t,e,A){var n=1<<e;return[(t[0]+A[0])/n,(t[1]+A[1])/n]}function p(t){return t>=.5?1/3*(4*t*t-1):1/3*(1-4*(1-t)*(1-t))}function y(t){return[p(t[0]),p(t[1])]}function v(t,e){var A=Object(B.a)(e,2),n=A[0],r=A[1];switch(t){case 0:return[1,n,r];case 1:return[-n,1,r];case 2:return[-n,-r,1];case 3:return[-1,-r,-n];case 4:return[r,-1,-n];case 5:return[r,n,-1];default:throw new Error("Invalid face")}}function m(t){var e=Object(B.a)(t,3),A=e[0],n=e[1],r=e[2],i=Math.atan2(r,Math.sqrt(A*A+n*n));return[Math.atan2(n,A)*Q,i*Q]}function b(t,e,A,n){if(0===n){1===A&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);var r=e[0];e[0]=e[1],e[1]=r}}function F(t){if("string"===typeof t){if(t.indexOf("/")>0)return t;t=function(t){var e=t.padEnd(16,"0");return d.a.fromString(e,16)}(t)}return function(t){for(var e=d.a.fromString(t,!0,10).toString(2);e.length<64;)e="0"+e;for(var A=e.lastIndexOf("1"),n=e.substring(0,3),r=e.substring(3,A),i=r.length/2,o=d.a.fromString(n,!0,2).toString(10),a=d.a.fromString(r,!0,2).toString(4);a.length<i;)a="0"+a;return"".concat(o,"/").concat(a)}(t.toString())}function w(t){return function(t){for(var e=t.face,A=t.ij,n=t.level,r=[[0,0],[0,1],[1,1],[1,0],[0,0]],i=Math.max(1,Math.ceil(100*Math.pow(2,-n))),o=new Float64Array(4*i*2+2),a=0,s=0,g=0;g<4;g++)for(var c=r[g].slice(0),I=r[g+1],u=(I[0]-c[0])/i,l=(I[1]-c[1])/i,C=0;C<i;C++){c[0]+=u,c[1]+=l;var h=m(v(e,y(E(A,n,c))));Math.abs(h[1])>89.999&&(h[0]=s);var B=h[0]-s;h[0]+=B>180?-360:B<-180?360:0,o[a++]=h[0],o[a++]=h[1],s=h[0]}return o[a++]=o[0],o[a++]=o[1],o}(function(t){for(var e,A=t.split("/"),n=parseInt(A[0],10),r=A[1],i=r.length,o=[0,0],a=i-1;a>=0;a--){e=i-a;var s=r[a],g=0,c=0;"1"===s?c=1:"2"===s?(g=1,c=1):"3"===s&&(g=1);var I=Math.pow(2,e-1);b(I,o,g,c),o[0]+=I*g,o[1]+=I*c}if(n%2===1){var u=o[0];o[0]=o[1],o[1]=u}return{face:n,ij:o,level:e}}(F(t)))}function S(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var D=Object.assign({getS2Token:{type:"accessor",value:function(t){return t.token}}},h.a.defaultProps),R=function(t){Object(s.a)(A,t);var e=S(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"renderLayers",value:function(){var t=this.props,e=t.data,A=t.getS2Token,n=this.props,r=n.elevationScale,i=n.extruded,o=n.wireframe,a=n.filled,s=n.stroked,g=n.lineWidthUnits,c=n.lineWidthScale,I=n.lineWidthMinPixels,u=n.lineWidthMaxPixels,l=n.lineJointRounded,C=n.lineMiterLimit,B=n.lineDashJustified,f=n.getElevation,d=n.getFillColor,Q=n.getLineColor,E=n.getLineWidth,p=n.getLineDashArray,y=this.props,v=y.updateTriggers,m=y.material;return new(this.getSubLayerClass("cell",h.a))({filled:a,wireframe:o,extruded:i,elevationScale:r,stroked:s,lineWidthUnits:g,lineWidthScale:c,lineWidthMinPixels:I,lineWidthMaxPixels:u,lineJointRounded:l,lineMiterLimit:C,lineDashJustified:B,material:m,getElevation:f,getFillColor:d,getLineColor:Q,getLineWidth:E,getLineDashArray:p},this.getSubLayerProps({id:"cell",updateTriggers:{getElevation:v.getElevation,getFillColor:v.getFillColor,getLineColor:v.getLineColor,getLineWidth:v.getLineWidth,getLineDashArray:v.getLineDashArray}}),{data:e,_normalize:!1,positionFormat:"XY",getPolygon:function(t,e){return w(A(t,e))}})}}]),A}(C.a);R.layerName="S2Layer",R.defaultProps=D;var U=A(380),G=A(35);function N(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var k=function(t){Object(s.a)(A,t);var e=N(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"getShaders",value:function(){var t=Object(G.a)(Object(c.a)(A.prototype),"getShaders",this).call(this);return t.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;"},t}},{key:"initializeState",value:function(t){Object(G.a)(Object(c.a)(A.prototype),"initializeState",this).call(this,t),this.getAttributeManager().addInstanced({timestamps:{size:1,accessor:"getTimestamps",shaderAttributes:{instanceTimestamps:{vertexOffset:0},instanceNextTimestamps:{vertexOffset:1}}}})}},{key:"draw",value:function(t){var e=this.props,n=e.trailLength,r=e.currentTime;t.uniforms=Object.assign({},t.uniforms,{trailLength:n,currentTime:r}),Object(G.a)(Object(c.a)(A.prototype),"draw",this).call(this,t)}}]),A}(A(241).a);k.layerName="TripsLayer",k.defaultProps={trailLength:{type:"number",value:120,min:0},currentTime:{type:"number",value:0,min:0},getTimestamps:{type:"accessor",value:null}};var x=A(248),O=A(124);function M(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return L(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return L(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function _(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var J=Object.assign({getHexagons:{type:"accessor",value:function(t){return t.hexagons}}},h.a.defaultProps),T=function(t){Object(s.a)(A,t);var e=_(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"updateState",value:function(t){var e=t.props,A=(t.oldProps,t.changeFlags);if(A.dataChanged||A.updateTriggers&&A.updateTriggers.getHexagons){var n,r=e.data,i=e.getHexagons,o=[],a=Object(O.a)(r),s=a.iterable,g=a.objectInfo,c=M(s);try{for(c.s();!(n=c.n()).done;){var I=n.value;g.index++;var u,l=i(I,g),C=M(Object(x.h3SetToMultiPolygon)(l,!0));try{for(C.s();!(u=C.n()).done;){var h=u.value;o.push(this.getSubLayerRow({polygon:h},I,g.index))}}catch(B){C.e(B)}finally{C.f()}}}catch(B){c.e(B)}finally{c.f()}this.setState({polygons:o})}}},{key:"renderLayers",value:function(){var t=this.props,e=t.elevationScale,A=t.extruded,n=t.wireframe,r=t.filled,i=t.stroked,o=t.lineWidthScale,a=t.lineWidthMinPixels,s=t.lineWidthMaxPixels,g=t.lineJointRounded,c=t.lineMiterLimit,I=t.lineDashJustified,u=t.material,l=t.getFillColor,C=t.getLineColor,B=t.getLineWidth,f=t.getLineDashArray,d=t.getElevation,Q=t.transitions,E=t.updateTriggers;return new(this.getSubLayerClass("cluster-region",h.a))({filled:r,wireframe:n,extruded:A,elevationScale:e,stroked:i,lineWidthScale:o,lineWidthMinPixels:a,lineWidthMaxPixels:s,lineJointRounded:g,lineMiterLimit:c,lineDashJustified:I,material:u,transitions:Q,getFillColor:this.getSubLayerAccessor(l),getLineColor:this.getSubLayerAccessor(C),getLineWidth:this.getSubLayerAccessor(B),getLineDashArray:this.getSubLayerAccessor(f),getElevation:this.getSubLayerAccessor(d)},this.getSubLayerProps({id:"cluster-region",updateTriggers:E}),{data:this.state.polygons,getPolygon:function(t){return t.polygon}})}}]),A}(C.a);T.defaultProps=J,T.layerName="H3ClusterLayer";var j=A(26),H=A(191),Y=A(603);function V(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}function Z(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return W(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return W(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function K(t,e){e=void 0===e?t[0][0]:e;var A,n=Z(t);try{for(n.s();!(A=n.n()).done;){var r=A.value,i=r[0]-e;i>180?r[0]-=360:i<-180&&(r[0]+=360)}}catch(o){n.e(o)}finally{n.f()}}function P(t,e,A){var n=Object(x.h3ToGeo)(t),r=Object(B.a)(n,2),i=r[0],o=r[1],a=e.length;K(e,o);for(var s=e[0]===e[a-1]?a-1:a,g=0;g<s;g++)e[g][0]=Object(H.c)(o,e[g][0],A),e[g][1]=Object(H.c)(i,e[g][1],A)}function q(t,e,A){var n=t(e,A),r=Object(x.h3ToGeo)(n),i=Object(B.a)(r,2),o=i[0];return[i[1],o]}function X(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,A=arguments.length>2?arguments[2]:void 0,n=Object(x.h3ToGeoBoundary)(t,!0);if(1!==e?P(t,n,e):K(n),A){var r,i=new Float64Array(2*n.length),o=0,a=Z(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;i[o++]=s[0],i[o++]=s[1]}}catch(g){a.e(g)}finally{a.f()}return i}return n}var z=Object.assign({},h.a.defaultProps,{highPrecision:!1,coverage:{type:"number",min:0,max:1,value:1},centerHexagon:null,getHexagon:{type:"accessor",value:function(t){return t.hexagon}},extruded:!0});delete z.getLineDashArray;var $=function(t){Object(s.a)(A,t);var e=V(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"shouldUpdateState",value:function(t){var e=t.changeFlags;return this._shouldUseHighPrecision()?e.propsOrDataChanged:e.somethingChanged}},{key:"updateState",value:function(t){var e=t.props,A=(t.oldProps,t.changeFlags);if(A.dataChanged||A.updateTriggers&&A.updateTriggers.getHexagon){var n,r=-1,i=!1,o=!1,a=Object(O.a)(e.data),s=a.iterable,g=a.objectInfo,c=Z(s);try{for(c.s();!(n=c.n()).done;){var I=n.value;g.index++;var u=e.getHexagon(I,g),l=Object(x.h3GetResolution)(u);if(r<0)r=l;else if(r!==l){o=!0;break}if(Object(x.h3IsPentagon)(u)){i=!0;break}}}catch(C){c.e(C)}finally{c.f()}this.setState({resolution:r,edgeLengthKM:r>=0?Object(x.edgeLength)(r,x.UNITS.km):0,hasMultipleRes:o,hasPentagon:i})}this._updateVertices(this.context.viewport)}},{key:"_shouldUseHighPrecision",value:function(){var t=this.state,e=t.resolution,A=t.hasPentagon,n=t.hasMultipleRes,r=this.context.viewport;return this.props.highPrecision||r.resolution||n||A||e>=0&&e<=5}},{key:"_updateVertices",value:function(t){if(!this._shouldUseHighPrecision()){var e=this.state,A=e.resolution,n=e.edgeLengthKM,r=e.centerHex;if(!(A<0)){var i=this.props.centerHexagon||Object(x.geoToH3)(t.latitude,t.longitude,A);if(r!==i){if(r){var o=Object(x.h3Distance)(r,i);if(o>=0&&o*n<10)return}var a=t.distanceScales.unitsPerMeter,s=X(i),g=Object(x.h3ToGeo)(i),c=Object(B.a)(g,2),I=c[0],u=c[1],l=t.projectFlat([u,I]),C=Object(B.a)(l,2),h=C[0],f=C[1];s=s.map((function(e){var A=t.projectFlat(e);return[(A[0]-h)/a[0],(A[1]-f)/a[1]]})),this.setState({centerHex:i,vertices:s})}}}}},{key:"renderLayers",value:function(){return this._shouldUseHighPrecision()?this._renderPolygonLayer():this._renderColumnLayer()}},{key:"_getForwardProps",value:function(){var t=this.props,e=t.elevationScale,A=t.material,n=t.coverage,r=t.extruded,i=t.wireframe,o=t.stroked,a=t.filled,s=t.lineWidthUnits,g=t.lineWidthScale,c=t.lineWidthMinPixels,I=t.lineWidthMaxPixels,u=t.getFillColor,l=t.getElevation,C=t.getLineColor,h=t.getLineWidth,B=t.transitions,f=t.updateTriggers;return{elevationScale:e,extruded:r,coverage:n,wireframe:i,stroked:o,filled:a,lineWidthUnits:s,lineWidthScale:g,lineWidthMinPixels:c,lineWidthMaxPixels:I,material:A,getElevation:l,getFillColor:u,getLineColor:C,getLineWidth:h,transitions:B,updateTriggers:{getFillColor:f.getFillColor,getElevation:f.getElevation,getLineColor:f.getLineColor,getLineWidth:f.getLineWidth}}}},{key:"_renderPolygonLayer",value:function(){var t=this.props,e=t.data,A=t.getHexagon,n=t.updateTriggers,r=t.coverage,i=this.getSubLayerClass("hexagon-cell-hifi",h.a),o=this._getForwardProps();return o.updateTriggers.getPolygon=function(t,e){return void 0===t||null===t?e:"object"===Object(j.a)(t)?Object.assign({},t,{coverage:e}):{getHexagon:t,coverage:e}}(n.getHexagon,r),new i(o,this.getSubLayerProps({id:"hexagon-cell-hifi",updateTriggers:o.updateTriggers}),{data:e,_normalize:!1,_windingOrder:"CCW",positionFormat:"XY",getPolygon:function(t,e){return X(A(t,e),r,!0)}})}},{key:"_renderColumnLayer",value:function(){var t=this.props,e=t.data,A=t.getHexagon,n=t.updateTriggers,r=this.getSubLayerClass("hexagon-cell",Y.a),i=this._getForwardProps();return i.updateTriggers.getPosition=n.getHexagon,new r(i,this.getSubLayerProps({id:"hexagon-cell",updateTriggers:i.updateTriggers}),{data:e,diskResolution:6,radius:1,vertices:this.state.vertices,getPosition:q.bind(null,A)})}}]),A}(C.a);$.defaultProps=z,$.layerName="H3HexagonLayer";var tt=A(6),et=A.n(tt),At=A(1),nt=A(11),rt=A(255),it=A(40),ot=A(865),at=A(863),st=A(866),gt=A(43),ct=A(968),It=A(501),ut=A(491),lt=A(414),Ct=(A(205),A(29));function ht(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}var Bt=1/Math.PI*180,ft=1/180*Math.PI,dt={};function Qt(t){return Math.round(t/dt.EPSILON)*dt.EPSILON}function Et(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.precision,n=void 0===A?dt.precision||4:A;return t=Qt(t),"".concat(parseFloat(t.toPrecision(n)))}function pt(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function yt(t,e,A){if(pt(t)){A=A||((r=t).clone?r.clone():new Array(r.length));for(var n=0;n<A.length&&n<t.length;++n)A[n]=e(t[n],n,A);return A}var r;return e(t)}function vt(t){return function(t,e){return yt(t,(function(t){return t*ft}),e)}(t)}function mt(t){return function(t,e){return yt(t,(function(t){return t*Bt}),e)}(t)}function bt(t,e,A){var n=dt.EPSILON;A&&(dt.EPSILON=A);try{if(t===e)return!0;if(pt(t)&&pt(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!bt(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=dt.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{dt.EPSILON=n}}function Ft(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}dt.EPSILON=1e-12,dt.debug=!1,dt.precision=4,dt.printTypes=!1,dt.printDegrees=!1,dt.printRowMajor=!0;var wt=function(t){Object(s.a)(A,t);var e=Ft(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)this[A]=t[A+e];return this.check()}},{key:"to",value:function(t){return t===this?this:pt(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)t[e+A]=this[A];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(dt)}},{key:"formatString",value:function(t){for(var e="",A=0;A<this.ELEMENTS;++A)e+=(A>0?", ":"")+Et(this[A],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!bt(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,A){void 0===A&&(A=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var r=t[n];this[n]=r+A*(e[n]-r)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t[A]),e[A]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(dt.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 t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"ELEMENTS",get:function(){return ht(!1),0}},{key:"RANK",get:function(){return ht(!1),0}},{key:"elements",get:function(){return this}}]),A}(Object(lt.a)(Array));function St(t,e){if(t.length!==e)return!1;for(var A=0;A<t.length;++A)if(!Number.isFinite(t[A]))return!1;return!0}function Dt(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function Rt(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(dt.debug&&!St(t,e))throw new Error("math.gl: ".concat(A," some fields set to invalid numbers'"));return t}var Ut={};function Gt(t,e){Ut[t]||(Ut[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}function Nt(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var kt=function(t){Object(s.a)(A,t);var e=Nt(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"copy",value:function(t){return ht(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A){var n=this[A]-t[A];e+=n*n}return Dt(e)}},{key:"dot",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A)e+=this[A]*t[A];return Dt(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return ht(t>=0&&t<this.ELEMENTS,"index is out of range"),Dt(this[t])}},{key:"setComponent",value:function(t,e){return ht(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=Dt(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=Dt(t)}}]),A}(wt),xt=A(27);function Ot(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i||1;return t[0]=(A[0]*n+A[4]*r+A[8]*i)/o,t[1]=(A[1]*n+A[5]*r+A[9]*i)/o,t[2]=(A[2]*n+A[6]*r+A[10]*i)/o,t}function Mt(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var Lt=[0,0,0],_t={},Jt=function(t){Object(s.a)(A,t);var e=Mt(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Object(a.a)(this,A),t=e.call(this,-0,-0,-0),1===arguments.length&&pt(n)?t.copy(n):(dt.debug&&(Dt(n),Dt(r),Dt(i)),t[0]=n,t[1]=r,t[2]=i),t}return Object(l.a)(A,null,[{key:"ZERO",get:function(){return _t.ZERO=_t.ZERO||Object.freeze(new A(0,0,0,0))}}]),Object(l.a)(A,[{key:"set",value:function(t,e,A){return this[0]=t,this[1]=e,this[2]=A,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return dt.debug&&(Dt(t.x),Dt(t.y),Dt(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"angle",value:function(t){return xt.a(this,t)}},{key:"cross",value:function(t){return xt.c(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?Lt:A;return xt.k(this,this,n,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?Lt:A;return xt.l(this,this,n,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?Lt:A;return xt.m(this,this,n,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return xt.q(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return Ot(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return xt.p(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return function(t,e,A){var n=e[0],r=e[1];t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t[2]=e[2]}(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return xt.r(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=Dt(t)}}]),A}(kt),Tt=.1,jt=1e-12,Ht=1e-15;Math.PI,Math.PI,Math.PI,Math.PI;function Yt(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var Vt=function(t){Object(s.a)(A,t);var e=Yt(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"toString",value:function(){var t="[";if(dt.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var A=0;A<this.RANK;++A)t+=" ".concat(this[A*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,A){return this[e*this.RANK+t]=Dt(A),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),A=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[A+n];return e}},{key:"setColumn",value:function(t,e){for(var A=t*this.RANK,n=0;n<this.RANK;++n)this[A+n]=e[n];return this}}]),A}(wt),Zt=A(18),Wt=A(38),Kt=A(45);function Pt(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var qt=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),Xt=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),zt=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}),$t={},te=function(t){Object(s.a)(A,t);var e=Pt(A);function A(t){var n;return Object(a.a)(this,A),n=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return Object(l.a)(A,[{key:"INDICES",get:function(){return zt}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return $t.IDENTITY=$t.IDENTITY||Object.freeze(new A(qt)),$t.IDENTITY}},{key:"ZERO",get:function(){return $t.ZERO=$t.ZERO||Object.freeze(new A(Xt)),$t.ZERO}}]),Object(l.a)(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this[9]=g,this[10]=c,this[11]=I,this[12]=u,this[13]=l,this[14]=C,this[15]=h,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=r,this[2]=s,this[3]=u,this[4]=e,this[5]=i,this[6]=g,this[7]=l,this[8]=A,this[9]=o,this[10]=c,this[11]=C,this[12]=n,this[13]=a,this[14]=I,this[15]=h,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(qt)}},{key:"fromQuaternion",value:function(t){return Zt.c(this,t),this.check()}},{key:"frustum",value:function(t){var e=t.left,n=t.right,r=t.bottom,i=t.top,o=t.near,a=t.far;return a===1/0?A._computeInfinitePerspectiveOffCenter(this,e,n,r,i,o):Zt.d(this,e,n,r,i,o,a),this.check()}},{key:"lookAt",value:function(t,e,A){if(1===arguments.length){var n=t;t=n.eye,e=n.center,A=n.up}return e=e||[0,0,0],A=A||[0,1,0],Zt.g(this,t,e,A),this.check()}},{key:"ortho",value:function(t){var e=t.left,A=t.right,n=t.bottom,r=t.top,i=t.near,o=void 0===i?.1:i,a=t.far,s=void 0===a?500:a;return Zt.i(this,e,A,n,r,o,s),this.check()}},{key:"orthographic",value:function(t){var e=t.fovy,n=void 0===e?45*Math.PI/180:e,r=t.aspect,i=void 0===r?1:r,o=t.focalDistance,a=void 0===o?1:o,s=t.near,g=void 0===s?.1:s,c=t.far,I=void 0===c?500:c;if(n>2*Math.PI)throw Error("radians");var u=n/2,l=a*Math.tan(u),C=l*i;return(new A).ortho({left:-C,right:C,bottom:-l,top:l,near:g,far:I})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,A=void 0===e?void 0:e,n=t.fov,r=void 0===n?45*Math.PI/180:n,i=t.aspect,o=void 0===i?1:i,a=t.near,s=void 0===a?.1:a,g=t.far,c=void 0===g?500:g;if((A=A||r)>2*Math.PI)throw Error("radians");return Zt.j(this,A,o,s,c),this.check()}},{key:"determinant",value:function(){return Zt.a(this)}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=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],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*r,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*r,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*r,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*r,t[8]=this[10]*i,t}},{key:"transpose",value:function(){return Zt.q(this,this),this.check()}},{key:"invert",value:function(){return Zt.f(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return Zt.h(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return Zt.h(this,this,t),this.check()}},{key:"rotateX",value:function(t){return Zt.l(this,this,t),this.check()}},{key:"rotateY",value:function(t){return Zt.m(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return Zt.n(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=Object(B.a)(t,3),A=e[0],n=e[1],r=e[2];return this.rotateX(A).rotateY(n).rotateZ(r)}},{key:"rotateAxis",value:function(t,e){return Zt.k(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?Zt.o(this,this,t):Zt.o(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return Zt.p(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(Rt(e=Kt.n(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=Wt.j(e||[-0,-0],t,this);break;case 3:e=xt.q(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Rt(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=function(t,e,A){var n=e[0],r=e[1],i=A[3]*n+A[7]*r||1;return t[0]=(A[0]*n+A[4]*r)/i,t[1]=(A[1]*n+A[5]*r)/i,t}(e||[-0,-0],t,this);break;case 3:e=Ot(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Rt(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,A){return this.identity().translate([t,e,A])}},{key:"transformPoint",value:function(t,e){return Gt("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return Gt("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return Gt("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,A,n,r,i){var o=2*i/(A-e),a=2*i/(r-n),s=(A+e)/(A-e),g=(r+n)/(r-n),c=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=g,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0,t}}]),A}(Vt),ee=(Math.max(6378137,6378137,6356752.314245179),function(t){return t}),Ae=new Jt;function ne(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ee;return pt(t)?(e[0]=A(t[0]),e[1]=A(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=A(t.longitude),e[1]=A(t.latitude),e[2]=t.height):(e[0]=A(t.x),e[1]=A(t.y),e[2]=t.z),e}function re(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ae;return ne(t,e,dt._cartographicRadians?ee:vt)}function ie(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ee;return pt(e)?(e[0]=A(t[0]),e[1]=A(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=A(t[0]),e.latitude=A(t[1]),e.height=t[2]):(e.x=A(t[0]),e.y=A(t[1]),e.z=t[2]),e}function oe(t,e){return ie(t,e,dt._cartographicRadians?ee:mt)}var ae=new Jt,se=new Jt,ge=new Jt;var ce=new Jt,Ie={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"}},ue={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},le={east:new Jt,north:new Jt,up:new Jt,west:new Jt,south:new Jt,down:new Jt},Ce=new Jt,he=new Jt,Be=new Jt;function fe(t,e,A,n,r,i){var o,a,s,g=Ie[e]&&Ie[e][A];ht(g&&(!n||n===g));var c=ce.copy(r);if(bt(c.x,0,1e-14)&&bt(c.y,0,1e-14)){var I=Math.sign(c.z);o=Ce.fromArray(ue[e]),"east"!==e&&"west"!==e&&o.scale(I),a=he.fromArray(ue[A]),"east"!==A&&"west"!==A&&a.scale(I),s=Be.fromArray(ue[n]),"east"!==n&&"west"!==n&&s.scale(I)}else{var u=le.up,l=le.east,C=le.north;l.set(-c.y,c.x,0).normalize(),t.geodeticSurfaceNormal(c,u),C.copy(u).cross(l);var h=le.west,B=le.south;le.down.copy(u).scale(-1),h.copy(l).scale(-1),B.copy(C).scale(-1),o=le[e],a=le[A],s=le[n]}return i[0]=o.x,i[1]=o.y,i[2]=o.z,i[3]=0,i[4]=a.x,i[5]=a.y,i[6]=a.z,i[7]=0,i[8]=s.x,i[9]=s.y,i[10]=s.z,i[11]=0,i[12]=c.x,i[13]=c.y,i[14]=c.z,i[15]=1,i}var de,Qe=new Jt,Ee=new Jt,pe=new Jt,ye=new Jt,ve=new Jt,me=new Jt,be=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Object(a.a)(this,t),ht(e>=0),ht(A>=0),ht(n>=0),this.radii=new Jt(e,A,n),this.radiiSquared=new Jt(e*e,A*A,n*n),this.radiiToTheFourth=new Jt(e*e*e*e,A*A*A*A,n*n*n*n),this.oneOverRadii=new Jt(0===e?0:1/e,0===A?0:1/A,0===n?0:1/n),this.oneOverRadiiSquared=new Jt(0===e?0:1/(e*e),0===A?0:1/(A*A),0===n?0:1/(n*n)),this.minimumRadius=Math.min(e,A,n),this.maximumRadius=Math.max(e,A,n),this.centerToleranceSquared=Tt,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}return Object(l.a)(t,null,[{key:"WGS84",get:function(){return de=de||new t(6378137,6378137,6356752.314245179)}}]),Object(l.a)(t,[{key:"equals",value:function(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}},{key:"toString",value:function(){return this.radii.toString()}},{key:"cartographicToCartesian",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],A=Ee,n=pe,r=Object(B.a)(t,3),i=r[2];this.geodeticSurfaceNormalCartographic(t,A),n.copy(this.radiiSquared).scale(A);var o=Math.sqrt(A.dot(n));return n.scale(1/o),A.scale(i),n.add(A),n.to(e)}},{key:"cartesianToCartographic",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];me.from(t);var A=this.scaleToGeodeticSurface(me,ye);if(A){var n=this.geodeticSurfaceNormal(A,Ee),r=ve;r.copy(me).subtract(A);var i=Math.atan2(n.y,n.x),o=Math.asin(n.z),a=Math.sign(xt.d(r,me))*xt.g(r);return oe([i,o,a],e)}}},{key:"eastNorthUpToFixedFrame",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new te;return fe(this,"east","north","up",t,e)}},{key:"localFrameToFixedFrame",value:function(t,e,A,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new te;return fe(this,t,e,A,n,r)}},{key:"geocentricSurfaceNormal",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return Qe.from(t).normalize().to(e)}},{key:"geodeticSurfaceNormalCartographic",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],A=re(t),n=A[0],r=A[1],i=Math.cos(r);return Qe.set(i*Math.cos(n),i*Math.sin(n),Math.sin(r)).normalize(),Qe.to(e)}},{key:"geodeticSurfaceNormal",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return Qe.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}},{key:"scaleToGeodeticSurface",value:function(t,e){return function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Jt,n=e.oneOverRadii,r=e.oneOverRadiiSquared,i=e.centerToleranceSquared;ae.from(t);var o=t.x,a=t.y,s=t.z,g=n.x,c=n.y,I=n.z,u=o*o*g*g,l=a*a*c*c,C=s*s*I*I,h=u+l+C,B=Math.sqrt(1/h);if(Number.isFinite(B)){var f=se;if(f.copy(t).scale(B),h<i)return f.to(A);var d=r.x,Q=r.y,E=r.z,p=ge;p.set(f.x*d*2,f.y*Q*2,f.z*E*2);var y,v,m,b,F=(1-B)*t.len()/(.5*p.len()),w=0;do{var S=(y=1/(1+(F-=w)*d))*y,D=(v=1/(1+F*Q))*v,R=(m=1/(1+F*E))*m,U=S*y,G=D*v,N=R*m,k=u*U*d+l*G*Q+C*N*E,x=-2*k;w=(b=u*S+l*D+C*R-1)/x}while(Math.abs(b)>jt);return ae.scale([y,v,m]).to(A)}}(t,this,e)}},{key:"scaleToGeocentricSurface",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];ye.from(t);var A=ye.x,n=ye.y,r=ye.z,i=this.oneOverRadiiSquared,o=1/Math.sqrt(A*A*i.x+n*n*i.y+r*r*i.z);return ye.multiplyScalar(o).to(e)}},{key:"transformPositionToScaledSpace",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return ye.from(t).scale(this.oneOverRadii).to(e)}},{key:"transformPositionFromScaledSpace",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return ye.from(t).scale(this.radii).to(e)}},{key:"getSurfaceNormalIntersectionWithZAxis",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,0];ht(bt(this.radii.x,this.radii.y,Ht)),ht(this.radii.z>0),ye.from(t);var n=ye.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return ye.set(0,0,n).to(A)}}]),t}(),Fe=A(413),we=A(154),Se=A(93),De=A(743),Re=function t(e,A,n){Object(a.a)(this,t),this.item=e,this.previous=A,this.next=n},Ue=function(){function t(){Object(a.a)(this,t),this.head=null,this.tail=null,this._length=0}return Object(l.a)(t,[{key:"add",value:function(t){var e=new Re(t,this.tail,null);return this.tail?(this.tail.next=e,this.tail=e):(this.head=e,this.tail=e),++this._length,e}},{key:"remove",value:function(t){t&&(t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=null,this.tail=t.previous):t.next?(t.next.previous=null,this.head=t.next):(this.head=null,this.tail=null),t.next=null,t.previous=null,--this._length)}},{key:"splice",value:function(t,e){t!==e&&(this.remove(e),this._insert(t,e))}},{key:"_insert",value:function(t,e){var A=t.next;t.next=e,this.tail===t?this.tail=e:A.previous=e,e.next=A,e.previous=t,++this._length}},{key:"length",get:function(){return this._length}}]),t}();function Ge(t){return void 0!==t&&null!==t}var Ne=function(){function t(){Object(a.a)(this,t),this._list=new Ue,this._sentinel=this._list.add("sentinel"),this._trimTiles=!1}return Object(l.a)(t,[{key:"reset",value:function(){this._list.splice(this._list.tail,this._sentinel)}},{key:"touch",value:function(t){var e=t._cacheNode;Ge(e)&&this._list.splice(this._sentinel,e)}},{key:"add",value:function(t,e,A){Ge(e._cacheNode)||(e._cacheNode=this._list.add(e),A&&A(t,e))}},{key:"unloadTile",value:function(t,e,A){var n=e._cacheNode;Ge(n)&&(this._list.remove(n),e._cacheNode=void 0,A&&A(t,e))}},{key:"unloadTiles",value:function(t,e){var A=this._trimTiles;this._trimTiles=!1;for(var n=this._list,r=1024*t.maximumMemoryUsage*1024,i=this._sentinel,o=n.head;o!==i&&(t.gpuMemoryUsageInBytes>r||A);){var a=o.item;o=o.next,this.unloadTile(t,a,e)}}},{key:"trim",value:function(){this._trimTiles=!0}}]),t}();var ke=A(133),xe=new ut.a,Oe=new ut.a,Me=new ke.c([new ke.e,new ke.e,new ke.e,new ke.e,new ke.e,new ke.e]);function Le(t,e){var A=t.cameraDirection,n=t.cameraUp,r=t.height,i=t.distanceScales.metersPerUnit,o=[t.longitude,t.latitude,0],a=be.WGS84.cartographicToCartesian(o,new ut.a),s=be.WGS84.eastNorthUpToFixedFrame(a),g=t.unprojectPosition(t.cameraPosition),c=be.WGS84.cartographicToCartesian(g,new ut.a),I=new ut.a(s.transformAsVector(new ut.a(A).scale(i))).normalize(),u=new ut.a(s.transformAsVector(new ut.a(n).scale(i))).normalize();return function(t,e){var A=t.getFrustumPlanes(),n=0;for(var r in A){var i=A[r],o=i.normal.dot(t.center);Oe.copy(i.normal).scale(i.distance-o).add(t.center);var a=t.unprojectPosition(Oe),s=be.WGS84.cartographicToCartesian(a,new ut.a);Me.planes[n++].fromPointNormal(s,xe.copy(e).subtract(s))}}(t,a),{camera:{position:c,direction:I,up:u},viewport:t,height:r,cullingVolume:Me,frameNumber:e,sseDenominator:1.15}}var _e=new ut.a;var Je=0,Te=1,je=3,He=4,Ye=5,Ve=1,Ze=2,We="empty",Ke="scenegraph",Pe="pointcloud",qe="mesh",Xe="I3S",ze="TILES3D",$e="geometricError",tA=1,eA=A(46),AA=A(492);function nA(t){return void 0!==t&&null!==t}var rA=new ut.a,iA=new ut.a,oA=new ut.a;new It.a;function aA(t,e,A){if(Object(we.a)(t,"3D Tile: boundingVolume must be defined"),t.box)return function(t,e,A){var n=new ut.a(t[0],t[1],t[2]);e.transform(n,n);var r=e.transformAsVector(t.slice(3,6)),i=e.transformAsVector(t.slice(6,9)),o=e.transformAsVector(t.slice(9,12)),a=new AA.a([r[0],r[1],r[2],i[0],i[1],i[2],o[0],o[1],o[2]]);if(nA(A))return A.center=n,A.halfAxes=a,A;return new ke.d(n,a)}(t.box,e,A);if(t.region){var n=Object(B.a)(t.region,6),r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],g=n[5],c=be.WGS84.cartographicToCartesian([Object(eA.c)(r),Object(eA.c)(a),s],iA),I=be.WGS84.cartographicToCartesian([Object(eA.c)(o),Object(eA.c)(i),g],oA),u=(new ut.a).addVectors(c,I).multiplyScalar(.5),l=(new ut.a).subVectors(c,I).len()/2;return sA([u[0],u[1],u[2],l],new It.a)}if(t.sphere)return sA(t.sphere,e,A);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function sA(t,e,A){var n=new ut.a(t[0],t[1],t[2]);e.transform(n,n);var r=e.getScale(rA),i=Math.max(Math.max(r[0],r[1]),r[2]),o=t[3]*i;return nA(A)?(A.center=n,A.radius=o,A):new ke.b(n,o)}new ut.a,new ut.a,new It.a,new ut.a,new ut.a,new ut.a;function gA(t,e){if(t.dynamicScreenSpaceError&&t._dynamicScreenSpaceErrorComputedDensity){var A=t._dynamicScreenSpaceErrorComputedDensity,n=t.dynamicScreenSpaceErrorFactor;return function(t,e){var A=t*e;return 1-Math.exp(-A*A)}(e,A)*n}return 0}var cA=Math.PI/2;function IA(t){var e=Object(B.a)(t,3),A=e[0],n=e[1],r=e[2],i=Object(eA.h)(A),o=Object(eA.h)(n),a=1+r/6378137,s=a*Math.cos(o);return[A=s*Math.cos(i),n=s*Math.sin(i),r=a*Math.sin(o)]}function uA(t,e){var A=Object(B.a)(t,3),n=A[0],r=A[1],i=A[2],o=void 0===i?0:i,a=Object(B.a)(e,3),s=a[0],g=a[1],c=a[2],I=IA([s,g,void 0===c?0:c]),u=IA([n,r,o]),l=u[0]-I[0],C=u[1]-I[1],h=u[2]-I[2];return l*l+C*C+h*h}function lA(t,e){var A=e.viewport,n=t.header.mbs[1],r=[t.header.mbs[0],n,t.header.mbs[2]],i=t.header.mbs[3]/6378137,o=uA(A.unprojectPosition(A.cameraPosition),r)-i*i;if(o<=0)return 170141175e30;var a=function(t,e){var A=e.viewport,n=A.width,r=A.height,i=A.pixelProjectionMatrix,o=Math.tan(Math.atan(Math.sqrt(1/(i[0]*i[0])+1/(i[5]*i[5]))));return Math.sqrt(r*r+n*n)/o}(0,e);return a*=i/Math.sqrt(o)/A.scale}function CA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function hA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?CA(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):CA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var BA=new ut.a;var fA=function(){function t(e,A,n){Object(a.a)(this,t),Object(we.a)("object"===Object(j.a)(A)),this.header=A,this.tileset=e,this.id=A.id,this.url=A.url,this.parent=n,this.refine=this._getRefine(A.refine),this.type=A.type,this.contentUrl=A.contentUrl,this.lodMetricType=null,this.lodMetricValue=null,this.boundingVolume=null,this.content=null,this.contentState=Je,this.gpuMemoryUsageInBytes=0,this.children=[],this.depth=0,this._cacheNode=null,this._frameNumber=null,this._cacheNode=null,this._initializeLodMetric(A),this._initializeTransforms(A),this._initializeBoundingVolumes(A),this._initializeContent(A),this._initializeRenderingState(A),this._lodJudge=null,this._expireDate=null,this._expiredContent=null,this._getPriority=this._getPriority.bind(this),Object.seal(this)}return Object(l.a)(t,[{key:"destroy",value:function(){this.header=null}},{key:"isDestroyed",value:function(){return null===this.header}},{key:"getScreenSpaceError",value:function(t,e){switch(this.tileset.type){case Xe:return lA(this,t);case ze:return function(t,e,A){var n=t.tileset,r=t.parent&&t.parent.lodMetricValue||t.lodMetricValue,i=A?r:t.lodMetricValue;if(0===i)return 0;var o=Math.max(t._distanceToCamera,1e-7),a=i*e.height/(o*e.sseDenominator);return a-=gA(n,o)}(this,t,e);default:return console.error("Unsupported tileset type"),null}}},{key:"_getPriority",value:function(){return this.isVisible?this.contentState===Je?-1:Math.max(1e7-this._priority,0)||0:-1}},{key:"loadContent",value:function(){var t=Object(nt.a)(et.a.mark((function t(){var e,A,n,r,i;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.hasEmptyContent){t.next=2;break}return t.abrupt("return",!1);case 2:if(!this.content){t.next=4;break}return t.abrupt("return",!0);case 4:return this.contentExpired&&(this._expireDate=null),this.contentState=Te,t.next=9,this.tileset._requestScheduler.scheduleRequest(this.id,this._getPriority);case 9:if(e=t.sent){t.next=13;break}return this.contentState=Je,t.abrupt("return",!1);case 13:return t.prev=13,A=this.tileset.getTileUrl(this.contentUrl),n=this.tileset.fetchOptions,r=this.tileset.loader,i=hA(hA({},n),{},Object(At.a)({},r.id,{tile:this.header,tileset:this.tileset.tileset,isTileset:"auto",isTileHeader:!1,assetGltfUpAxis:this.tileset.asset.gltfUpAxis})),t.next=20,Object(ct.a)(A,r,i);case 20:return this.content=t.sent,this._isTileset()&&this.tileset._initializeTileHeaders(this.content,this,Se.a.dirname(this.contentUrl)),this.contentState=je,this._onContentLoaded(),t.abrupt("return",!0);case 27:throw t.prev=27,t.t0=t.catch(13),this.contentState=Ye,t.t0;case 31:return t.prev=31,e.done(),t.finish(31);case 34:case"end":return t.stop()}}),t,this,[[13,27,31,34]])})));return function(){return t.apply(this,arguments)}}()},{key:"unloadContent",value:function(){return this.content&&this.content.destroy&&this.content.destroy(),this.content=null,this.contentState=Je,!0}},{key:"updateVisibility",value:function(t){if(this._frameNumber!==t.frameNumber){var e=this.parent,A=e?e.computedTransform:this.tileset.modelMatrix,n=e?e._visibilityPlaneMask:ke.c.MASK_INDETERMINATE;this._updateTransform(A),this._distanceToCamera=this.distanceToTile(t),this._screenSpaceError=this.getScreenSpaceError(t,!1),this._visibilityPlaneMask=this.visibility(t,n),this._visible=this._visibilityPlaneMask!==ke.c.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(t),this._priority=this.lodMetricValue,this._frameNumber=t.frameNumber}}},{key:"visibility",value:function(t,e){var A=t.cullingVolume,n=this.boundingVolume;return A.computeVisibilityWithPlaneMask(n,e)}},{key:"contentVisibility",value:function(t){return!0}},{key:"distanceToTile",value:function(t){var e=this.boundingVolume;return Math.sqrt(Math.max(e.distanceSquaredTo(t.camera.position),0))}},{key:"cameraSpaceZDepth",value:function(t){var e=t.camera,A=this.boundingVolume;return BA.subVectors(A.center,e.position),e.direction.dot(BA)}},{key:"insideViewerRequestVolume",value:function(t){var e=this._viewerRequestVolume;return!e||0===e.distanceToCamera(t.camera.position)}},{key:"_initializeLodMetric",value:function(t){"lodMetricType"in t?this.lodMetricType=t.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 t?this.lodMetricValue=t.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(t){this.transform=t.transform?new It.a(t.transform):new It.a;var e=this.parent,A=this.tileset,n=e&&e.computedTransform?e.computedTransform.clone():A.modelMatrix.clone();this.computedTransform=new It.a(n).multiplyRight(this.transform);var r=e&&e._initialTransform?e._initialTransform.clone():new It.a;this._initialTransform=new It.a(r).multiplyRight(this.transform)}},{key:"_initializeBoundingVolumes",value:function(t){this._contentBoundingVolume=null,this._viewerRequestVolume=null,this._updateBoundingVolume(t)}},{key:"_initializeContent",value:function(t){this.content={_tileset:this.tileset,_tile:this},this.hasEmptyContent=!0,this.contentState=Je,this.hasTilesetContent=!1,t.contentUrl&&(this.content=null,this.hasEmptyContent=!1)}},{key:"_initializeRenderingState",value:function(t){this.depth=t.level,this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._visibilityPlaneMask=ke.c.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(t){return t||this.parent&&this.parent.refine||Ze}},{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(t){this.boundingVolume=aA(t.boundingVolume,this.computedTransform,this.boundingVolume);var e=t.content;e&&(e.boundingVolume&&(this._contentBoundingVolume=aA(e.boundingVolume,this.computedTransform,this._contentBoundingVolume)),t.viewerRequestVolume&&(this._viewerRequestVolume=aA(t.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)))}},{key:"_updateTransform",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new It.a,e=t.clone().multiplyRight(this.transform),A=!e.equals(this.computedTransform);A&&(this.computedTransform=e,this._updateBoundingVolume(this.header))}},{key:"updateExpiration",value:function(){if(void 0!==(e=this._expireDate)&&null!==e&&this.contentReady&&!this.hasEmptyContent){var t=Date.now();Date.lessThan(this._expireDate,t)&&(this.contentState=He,this._expiredContent=this.content)}var e}},{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===je||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===Je}},{key:"contentExpired",get:function(){return this.contentState===He}},{key:"contentFailed",get:function(){return this.contentState===Ye}},{key:"extras",get:function(){return this.header.extras}}]),t}(),dA=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;Object(a.a)(this,t),this._array=new Array(e),this._map=new Map,this._length=e}return Object(l.a)(t,[{key:"get",value:function(t){return Object(we.a)(t<this._array.length),this._array[t]}},{key:"set",value:function(t,e){Object(we.a)(t>=0),t>=this.length&&(this.length=t+1),this._map.has(this._array[t])&&this._map.delete(this._array[t]),this._array[t]=e,this._map.set(e,t)}},{key:"delete",value:function(t){var e=this._map.get(t);e>=0&&(this._array.splice(e,1),this._map.delete(t),this.length--)}},{key:"peek",value:function(){return this._array[this._length-1]}},{key:"push",value:function(t){if(!this._map.has(t)){var e=this.length++;this._array[e]=t,this._map.set(t,e)}}},{key:"pop",value:function(){var t=this._array[--this.length];return this._map.delete(t),t}},{key:"reserve",value:function(t){Object(we.a)(t>=0),t>this._array.length&&(this._array.length=t)}},{key:"resize",value:function(t){Object(we.a)(t>=0),this.length=t}},{key:"trim",value:function(t){null!==t&&void 0!==t||(t=this.length),this._array.length=t}},{key:"reset",value:function(){this._array=[],this._map=new Map,this._length=0}},{key:"find",value:function(t){return this._map.has(t)}},{key:"length",get:function(){return this._length},set:function(t){this._length=t,t>this._array.length&&(this._array.length=t)}},{key:"values",get:function(){return this._array}}]),t}();function QA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return EA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return EA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function EA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function pA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function yA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?pA(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):pA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var vA={loadSiblings:!1,skipLevelOfDetail:!1,maximumScreenSpaceError:2},mA=function(){function t(e){Object(a.a)(this,t),this.options=yA(yA({},vA),e),this._traversalStack=new dA,this._emptyTraversalStack=new dA,this._frameNumber=null,this.root=null,this.selectedTiles={},this.requestedTiles={},this.emptyTiles={}}return Object(l.a)(t,[{key:"traverse",value:function(t,e,A){this.root=t,this.options=yA(yA({},this.options),A),this.reset(),this.updateTile(t,e),this._frameNumber=e.frameNumber,this.executeTraversal(t,e)}},{key:"reset",value:function(){this.requestedTiles={},this.selectedTiles={},this.emptyTiles={},this._traversalStack.reset(),this._emptyTraversalStack.reset()}},{key:"executeTraversal",value:function(t,e){var A=this._traversalStack;for(A.push(t);A.length>0;){var n=A.pop(),r=!1;this.canTraverse(n,e)&&(this.updateChildTiles(n,e),r=this.updateAndPushChildren(n,e,A));var i=n.parent,o=Boolean(!i||i._shouldRefine),a=!r;n.hasRenderContent?n.refine===Ve?(this.loadTile(n,e),this.selectTile(n,e)):n.refine===Ze&&(this.loadTile(n,e),a&&this.selectTile(n,e)):(this.emptyTiles[n.id]=n,this.loadTile(n,e),a&&this.selectTile(n,e)),this.touchTile(n,e),n._shouldRefine=r&&o}this.options.onTraversalEnd&&this.options.onTraversalEnd(e)}},{key:"updateChildTiles",value:function(t,e){var A,n=QA(t.children);try{for(n.s();!(A=n.n()).done;){var r=A.value;this.updateTile(r,e)}}catch(i){n.e(i)}finally{n.f()}return!0}},{key:"updateAndPushChildren",value:function(t,e,A){var n=this.options,r=n.loadSiblings,i=n.skipLevelOfDetail,o=t.children;o.sort(this.compareDistanceToCamera);var a,s=!i&&t.refine===Ze&&t.hasRenderContent,g=!1,c=QA(o);try{for(c.s();!(a=c.n()).done;){var I=a.value;if(I.isVisibleAndInRequestVolume?(A.find(I)&&A.delete(I),A.push(I),g=!0):(s||r)&&(this.loadTile(I,e),this.touchTile(I,e)),s){var u=void 0;if(!(u=!!I._inRequestVolume&&(I.hasRenderContent?I.contentAvailable:this.executeEmptyTraversal(I,e))))return u}}}catch(l){c.e(l)}finally{c.f()}return g}},{key:"updateTile",value:function(t,e){this.updateTileVisibility(t,e)}},{key:"selectTile",value:function(t,e){this.shouldSelectTile(t,e)&&(t._selectedFrame=e.frameNumber,this.selectedTiles[t.id]=t)}},{key:"loadTile",value:function(t,e){this.shouldLoadTile(t,e)&&(t._requestedFrame=e.frameNumber,t._priority=this.getPriority(t),this.requestedTiles[t.id]=t)}},{key:"touchTile",value:function(t,e){t.tileset._cache.touch(t),t._touchedFrame=e.frameNumber}},{key:"canTraverse",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return!(!n&&!t.isVisibleAndInRequestVolume)&&(!!t.hasChildren&&(t.hasTilesetContent?!t.contentExpired:this.shouldRefine(t,e,A)))}},{key:"shouldLoadTile",value:function(t,e){return t.hasUnloadedContent||t.contentExpired}},{key:"shouldSelectTile",value:function(t,e){return t.contentAvailable&&!this.options.skipLevelOfDetail}},{key:"shouldRefine",value:function(t,e,A){var n=t._screenSpaceError;return A&&(n=t.getScreenSpaceError(e,!0)),n>this.options.maximumScreenSpaceError}},{key:"updateTileVisibility",value:function(t,e){t.updateVisibility(e)}},{key:"compareDistanceToCamera",value:function(t,e){return t._distanceToCamera-e._distanceToCamera}},{key:"getPriority",value:function(t){var e=this.options;switch(t.refine){case Ve:return t._distanceToCamera;case Ze:var A=t.parent,n=A&&(!e.skipLevelOfDetail||0===t._screenSpaceError||A.hasTilesetContent)?A._screenSpaceError:t._screenSpaceError;return this.root._screenSpaceError-n;default:return Object(we.a)(!1)}}},{key:"anyChildrenVisible",value:function(t,e){var A,n=!1,r=QA(t.children);try{for(r.s();!(A=r.n()).done;){var i=A.value;i.updateVisibility(e),n=n||i.isVisibleAndInRequestVolume}}catch(o){r.e(o)}finally{r.f()}return n}},{key:"executeEmptyTraversal",value:function(t,e){for(var A=!0,n=this._emptyTraversalStack;n.length>0;){var r=n.pop();this.updateTile(r,e),r.isVisibleAndInRequestVolume||(this.loadTile(r,e),this.touchTile(r,e));var i=!r.hasRenderContent&&this.canTraverse(r,e,!1,!0);if(i||r.contentAvailable||(A=!1),i){var o,a=QA(r.children.filter((function(t){return t})));try{for(a.s();!(o=a.n()).done;){var s=o.value;n.find(s)&&n.delete(s),n.push(s)}}catch(g){a.e(g)}finally{a.f()}}}return A}}]),t}();function bA(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var FA=function(t){Object(s.a)(A,t);var e=bA(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"compareDistanceToCamera",value:function(t,e){return 0===e._distanceToCamera&&0===t._distanceToCamera?e._centerZDepth-t._centerZDepth:e._distanceToCamera-t._distanceToCamera}},{key:"updateTileVisibility",value:function(t,e){if(t.updateVisibility(e),t.isVisibleAndInRequestVolume){var A=t.children.length>0;if(t.hasTilesetContent&&A){var n=t.children[0];return this.updateTileVisibility(n,e),void(t._visible=n._visible)}if(this.meetsScreenSpaceErrorEarly(t,e))t._visible=!1;else{var r=t.refine===Ze,i=t._optimChildrenWithinParent===tA;r&&i&&A&&!this.anyChildrenVisible(t,e)&&(t._visible=!1)}}}},{key:"meetsScreenSpaceErrorEarly",value:function(t,e){var A=t.parent;return!(!A||A.hasTilesetContent||A.refine!==Ve)&&!this.shouldRefine(t,e,!0)}}]),A}(mA),wA="REQUESTED",SA="COMPLETED",DA="ERROR",RA=function(){function t(){Object(a.a)(this,t),this._statusMap={}}return Object(l.a)(t,[{key:"add",value:function(t,e,A,n){var r=this;this._statusMap[e]||(this._statusMap[e]={request:t,callback:A,key:e,frameState:n,status:wA},t().then((function(t){r._statusMap[e].status=SA,r._statusMap[e].callback(t,n)})).catch((function(t){r._statusMap[e].status=DA,A(t)})))}},{key:"update",value:function(t,e){this._statusMap[t]&&(this._statusMap[t].frameState=e)}},{key:"find",value:function(t){return this._statusMap[t]}}]),t}();function UA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function GA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?UA(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):UA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function NA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return kA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return kA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function kA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function xA(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var OA=function(t){Object(s.a)(A,t);var e=xA(A);function A(t){var n;return Object(a.a)(this,A),(n=e.call(this,t))._tileManager=new RA,n}return Object(l.a)(A,[{key:"shouldRefine",value:function(t,e){return t._lodJudge=function(t,e){var A=e.viewport,n=A.metersPerPixel,r=t.header.mbs[1],i=t.header.mbs[0],o=t.header.mbs[2],a=t.header.mbs[3],s=A.height,g=A.width,c=A.latitude,I=A.longitude,u=[I,c],l=[i,r,o],C=[I,r],h=[i,c],B=Math.sqrt(s*s+g*g)*n[0],f=.5*s+a/6378137,d=.5*g+a/6378137;if(uA(u,l)>B+a/6378137)return"OUT";if(uA(u,C)>f)return"OUT";if(uA(u,h)>d)return"OUT";if(0===t.lodMetricValue)return"DIG";var Q=lA(t,e);return(Q*=cA)<.5?"OUT":!t.header.children||Q<=t.lodMetricValue?"DRAW":t.header.children?"DIG":"OUT"}(t,e),"DIG"===t._lodJudge}},{key:"updateChildTiles",value:function(t,e){var A,n=this,r=t.header.children||[],i=t.children,o=t.tileset,a=NA(r);try{var s=function(){var r=A.value,a=i&&i.find((function(t){return t.id===r.id}));if(a)a&&n.updateTile(a,e);else{var s=function(){return n._loadTile(r.id,o)};n._tileManager.find(r.id)?n._tileManager.update(r.id,e):(o.tileset.nodePages&&(s=function(){return o.tileset.nodePagesTile.formTileFromNodePages(r.id)}),n._tileManager.add(s,r.id,(function(e){return n._onTileLoad(e,t)}),e))}};for(a.s();!(A=a.n()).done;)s()}catch(g){a.e(g)}finally{a.f()}}},{key:"_loadTile",value:function(){var t=Object(nt.a)(et.a.mark((function t(e,A){var n,r,i;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=A.loader,r=A.getTileUrl("".concat(A.url,"/nodes/").concat(e)),i={i3s:GA(GA({},A.fetchOptions),{},{isTileHeader:!0,loadContent:!1})},t.next=5,Object(ct.a)(r,n,i);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})));return function(e,A){return t.apply(this,arguments)}}()},{key:"_onTileLoad",value:function(t,e){var A=this.options.basePath,n=new fA(e.tileset,t,e,A);e.children.push(n);var r=this._tileManager.find(n.id).frameState;this.updateTile(n,r),this._frameNumber===r.frameNumber&&this.executeTraversal(n,r)}}]),A}(mA);function MA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return LA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return LA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function LA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function _A(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function JA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?_A(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):_A(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var TA={ellipsoid:be.WGS84,modelMatrix:new It.a,throttleRequests:!1,maximumMemoryUsage:32,onTileLoad:function(){},onTileUnload:function(){},onTileError:function(t,e,A){},maximumScreenSpaceError:8},jA=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(a.a)(this,t),Object(we.a)(e),this.options=JA(JA({},TA),A),this.tileset=e,this.loader=e.loader,this.type=e.type,this.url=e.url,this.basePath=e.basePath||Se.a.dirname(this.url),this.modelMatrix=this.options.modelMatrix,this.ellipsoid=this.options.ellipsoid,this.lodMetricType=e.lodMetricType,this.lodMetricValue=e.lodMetricValue,this.refine=e.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 Ne,this._requestScheduler=new De.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 Fe.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(e,this.options)}return Object(l.a)(t,[{key:"isLoaded",value:function(){return 0===this._pendingCount}},{key:"destroy",value:function(){this._destroy()}},{key:"getTileUrl",value:function(t){return t.startsWith("data:")?t:"".concat(t).concat(this.queryParams)}},{key:"update",value:function(t){this._cache.reset(),this._frameNumber++,this._frameState=Le(t,this._frameNumber),this._traverser.traverse(this.root,this._frameState,this.options)}},{key:"_onTraversalEnd",value:function(){var t=Object.values(this._traverser.selectedTiles);this._tilesChanged(this.selectedTiles,t)&&this._updateFrameNumber++,this.selectedTiles=t;var e,A=MA(this.selectedTiles);try{for(A.s();!(e=A.n()).done;){var n=e.value;this._tiles[n.id]=n}}catch(r){A.e(r)}finally{A.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(t,e){if(t.length!==e.length)return!0;var A=new Set(t.map((function(t){return t.id}))),n=new Set(e.map((function(t){return t.id}))),r=t.filter((function(t){return!n.has(t.id)})).length>0;return r=r||e.filter((function(t){return!A.has(t.id)})).length>0}},{key:"_loadTiles",value:function(t){var e,A=MA(this._requestedTiles);try{for(A.s();!(e=A.n()).done;){var n=e.value;n.contentUnloaded&&this._loadTile(n,t)}}catch(r){A.e(r)}finally{A.f()}}},{key:"_unloadTiles",value:function(){this._cache.unloadTiles(this,(function(t,e){return t._unloadTile(e)}))}},{key:"_updateStats",value:function(){var t,e=0,A=0,n=MA(this.selectedTiles);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.contentAvailable&&(e++,r.content.pointCount&&(A+=r.content.pointCount))}}catch(i){n.e(i)}finally{n.f()}this.stats.get("Tiles In View").count=this.selectedTiles.length,this.stats.get("Tiles To Render").count=e,this.stats.get("Points").count=A}},{key:"_initializeTileSet",value:function(t){this.root=this._initializeTileHeaders(t,null,this.basePath),this.type===ze&&this._initializeCesiumTileset(t),this.type===Xe&&this._initializeI3STileset(t),this._calculateViewProps()}},{key:"_calculateViewProps",value:function(){var t=this.root,e=t.boundingVolume.center;if(!e)return console.warn("center was not pre-calculated for the root tile"),this.cartographicCenter=new ut.a,void(this.zoom=1);this.cartographicCenter=be.WGS84.cartesianToCartographic(e,new ut.a),this.cartesianCenter=e,this.zoom=function(t){var e=t.halfAxes,A=t.radius,n=t.width,r=t.height;if(e){e.getColumn(0,_e);var i=_e.len();e.getColumn(1,_e);var o=_e.len();e.getColumn(2,_e);var a=i/2,s=o/2,g=_e.len()/2;return(Math.log2(6378137/a)+Math.log2(6378137/s)+Math.log2(6356752.314245179/g))/3}return A?Math.log2(6356752.314245179/A):r&&n?(Math.log2(6378137/n)+Math.log2(6378137/r))/2:1}(t.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(t,e,A){var n=new fA(this,t.root,e,A);if(e&&(e.children.push(n),n.depth=e.depth+1),this.type===ze){var r=[];for(r.push(n);r.length>0;){var i=r.pop();this.stats.get("Tiles In Tileset(s)").incrementCount();var o,a=MA(i.header.children||[]);try{for(a.s();!(o=a.n()).done;){var s=o.value,g=new fA(this,s,i,A);i.children.push(g),g.depth=i.depth+1,r.push(g)}}catch(c){a.e(c)}finally{a.f()}}}return n}},{key:"_initializeTraverser",value:function(){var t;switch(this.type){case ze:t=FA;break;case Xe:t=OA;break;default:t=mA}return new t({basePath:this.basePath,onTraversalEnd:this._onTraversalEnd.bind(this)})}},{key:"_destroyTileHeaders",value:function(t){this._destroySubtree(t)}},{key:"_loadTile",value:function(){var t=Object(nt.a)(et.a.mark((function t(e,A){var n;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,this._onStartTileLoading(),t.next=4,e.loadContent(A);case 4:n=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),this._onTileLoadError(e,t.t0);case 10:return t.prev=10,this._onEndTileLoading(),this._onTileLoad(e,n),t.finish(10);case 14:case"end":return t.stop()}}),t,this,[[0,7,10,14]])})));return function(e,A){return t.apply(this,arguments)}}()},{key:"_onTileLoadError",value:function(t,e){this.stats.get("Failed Tile Loads").incrementCount();var A=e.message||e.toString(),n=t.url;console.error("A 3D tile failed to load: ".concat(t.url," ").concat(A)),this.options.onTileError(t,A,n)}},{key:"_onTileLoad",value:function(t,e){e&&(t&&t.content&&function(t,e){Object(we.a)(t),Object(we.a)(e);var A=e.rtcCenter,n=e.gltfUpAxis,r=t.computedTransform,i=t.boundingVolume.center,o=new It.a(r);switch(A&&o.translate(A),n){case"Z":break;case"Y":var a=(new It.a).rotateX(Math.PI/2);o=o.multiplyRight(a);break;case"X":var s=(new It.a).rotateY(-Math.PI/2);o=o.multiplyRight(s)}e.isQuantized&&o.translate(e.quantizedVolumeOffset).scale(e.quantizedVolumeScale);var g=new ut.a(i);e.cartesianModelMatrix=o,e.cartesianOrigin=g;var c=be.WGS84.cartesianToCartographic(g,new ut.a),I=be.WGS84.eastNorthUpToFixedFrame(g).invert();e.cartographicModelMatrix=I.multiplyRight(o),e.cartographicOrigin=c,e.modelMatrix=e.cartographicModelMatrix}(t,t.content),this._addTileToCache(t),this.options.onTileLoad(t))}},{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(t){this._cache.add(this,t,(function(e){return e._updateCacheStats(t)}))}},{key:"_updateCacheStats",value:function(t){this.stats.get("Tiles Loaded").incrementCount(),this.stats.get("Tiles In Memory").incrementCount(),this.gpuMemoryUsageInBytes+=t.content.byteLength||0,this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes}},{key:"_unloadTile",value:function(t){this.gpuMemoryUsageInBytes-=t.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(t),t.unloadContent()}},{key:"_destroy",value:function(){var t=[];for(this.root&&t.push(this.root);t.length>0;){var e,A=t.pop(),n=MA(A.children);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push(r)}}catch(i){n.e(i)}finally{n.f()}this._destroyTile(A)}this.root=null}},{key:"_destroySubtree",value:function(t){var e=t,A=[];for(A.push(e);A.length>0;){var n,r=MA((t=A.pop()).children);try{for(r.s();!(n=r.n()).done;){var i=n.value;A.push(i)}}catch(o){r.e(o)}finally{r.f()}t!==e&&this._destroyTile(t)}e.children=[]}},{key:"_destroyTile",value:function(t){this._cache.unloadTile(this,t),this._unloadTile(t),t.destroy()}},{key:"_initializeCesiumTileset",value:function(t){if(this.asset=t.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=t.properties,this.geometricError=t.geometricError,this._extensionsUsed=t.extensionsUsed,this.extras=t.extras}},{key:"_initializeI3STileset",value:function(t){"token"in this.options&&(this._queryParams.token=this.options.token),this._defaultGeometrySchema=t.store.defaultGeometrySchema}},{key:"hasExtension",value:function(t){return Boolean(this._extensionsUsed&&this._extensionsUsed.indexOf(t)>-1)}},{key:"tiles",get:function(){return Object.values(this._tiles)}},{key:"queryParams",get:function(){return this._queryParamsString||(this._queryParamsString=function(t){for(var e=[],A=0,n=Object.keys(t);A<n.length;A++){var r=n[A];e.push("".concat(r,"=").concat(t[r]))}switch(e.length){case 0:return"";case 1:return"?".concat(e[0]);default:return"?".concat(e.join("&"))}}(this._queryParams)),this._queryParamsString}}]),t}(),HA={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect"};Object.keys(HA);function YA(t,e,A){Object(we.a)(t instanceof ArrayBuffer);var n=new TextDecoder("utf8"),r=new Uint8Array(t,e,A);return n.decode(r)}function VA(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=new DataView(t);return"".concat(String.fromCharCode(A.getUint8(e+0))).concat(String.fromCharCode(A.getUint8(e+1))).concat(String.fromCharCode(A.getUint8(e+2))).concat(String.fromCharCode(A.getUint8(e+3)))}var ZA,WA=A(786),KA=A(203);function PA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function qA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?PA(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):PA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function XA(t){return zA.apply(this,arguments)}function zA(){return(zA=Object(nt.a)(et.a.mark((function t(e){var A;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.modules||{},ZA=A.draco3d?ZA||new Promise((function(t){var e=A.draco3d.createDecoderModule({onModuleLoaded:function(){t({draco:e})}})})):ZA||$A(e),t.next=4,ZA;case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $A(t){return tn.apply(this,arguments)}function tn(){return(tn=Object(nt.a)(et.a.mark((function t(e){var A,n,r,i;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.draco&&e.draco.decoderType,t.next="js"===t.t0?3:(t.t0,7);break;case 3:return t.next=5,Object(WA.a)("draco_decoder.js","draco",e);case 5:return A=t.sent,t.abrupt("break",21);case 7:return t.t1=Promise,t.next=10,Object(WA.a)("draco_wasm_wrapper.js","draco",e);case 10:return t.t2=t.sent,t.next=13,Object(WA.a)("draco_decoder.wasm","draco",e);case 13:return t.t3=t.sent,t.t4=[t.t2,t.t3],t.next=17,t.t1.all.call(t.t1,t.t4);case 17:r=t.sent,i=Object(B.a)(r,2),A=i[0],n=i[1];case 21:return A=A||KA.a.DracoDecoderModule,t.next=24,en(A,n);case 24:return t.abrupt("return",t.sent);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function en(t,e){var A={};return e&&(A.wasmBinary=e),new Promise((function(e){t(qA(qA({},A),{},{onModuleLoaded:function(t){return e({draco:t})}}))}))}var An=A(787),nn=0,rn=1,on={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},an={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},sn=function(){function t(e){Object(a.a)(this,t),this.draco=e,this.drawMode="TRIANGLE",this.metadataQuerier={}}return Object(l.a)(t,[{key:"destroy",value:function(){}},{key:"destroyGeometry",value:function(t){t&&this.draco.destroy(t.dracoGeometry)}},{key:"parseSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.metadataQuerier=new this.draco.MetadataQuerier;var A=new this.draco.DecoderBuffer;A.Init(new Int8Array(t),t.byteLength);var n,r,i,o=new this.draco.Decoder,a={};try{var s=o.GetEncodedGeometryType(A);switch(s){case this.draco.TRIANGULAR_MESH:r=new this.draco.Mesh,n=o.DecodeBufferToMesh(A,r),i={type:nn,faceCount:r.num_faces(),attributeCount:r.num_attributes(),vertexCount:r.num_points()};break;case this.draco.POINT_CLOUD:r=new this.draco.PointCloud,n=o.DecodeBufferToPointCloud(A,r),i={type:rn,attributeCount:r.num_attributes(),vertexCount:r.num_points()};break;default:throw new Error("Unknown DRACO geometry type.")}if(!n.ok()||!r.ptr){var g="DRACO decompression failed: ".concat(n.error_msg());throw r&&this.draco.destroy(r),new Error(g)}a.loaderData={header:i},this._extractDRACOGeometry(o,r,s,a,e);var c=this._getGeometryMetadata(o,r);a.header={vertexCount:i.vertexCount,boundingBox:Object(An.a)(a.attributes),metadata:c}}finally{this.draco.destroy(o),this.draco.destroy(A),this.draco.destroy(r),this.draco.destroy(this.metadataQuerier)}return a}},{key:"_extractDRACOGeometry",value:function(t,e,A,n,r){var i=this._getAttributes(t,e,r);if(!i.POSITION)throw new Error("DRACO decompressor: No position attribute found.");return A===this.draco.TRIANGULAR_MESH?(i.indices="TRIANGLE_STRIP"===this.drawMode?this._getMeshStripIndices(t,e):this._getMeshFaceIndices(t,e),n.mode="TRIANGLE_STRIP"===this.drawMode?5:4):n.mode=0,i.indices&&(n.indices={value:i.indices,size:1},delete i.indices),n.attributes=i,n}},{key:"getPositionAttributeMetadata",value:function(t){this.metadata=this.metadata||{},this.metadata.attributes=this.metadata.attributes||{};var e=new this.draco.AttributeQuantizationTransform;if(e.InitFromAttribute(t)){this.metadata.attributes.position.isQuantized=!0,this.metadata.attributes.position.maxRange=e.range(),this.metadata.attributes.position.numQuantizationBits=e.quantization_bits(),this.metadata.attributes.position.minValues=new Float32Array(3);for(var A=0;A<3;++A)this.metadata.attributes.position.minValues[A]=e.min_value(A)}this.draco.destroy(e)}},{key:"_getAttributes",value:function(t,e,A){for(var n={},r=e.num_points(),i=0;i<e.num_attributes();i++){var o=t.GetAttribute(e,i),a=this._getAttributeMetadata(t,e,i),s={uniqueId:o.unique_id(),attributeType:o.attribute_type(),dataType:an[o.data_type()],size:o.size(),numComponents:o.num_components(),byteOffset:o.byte_offset(),byteStride:o.byte_stride(),normalized:o.normalized(),metadata:a},g=this._deduceAttributeName(s,A),c=this._getAttributeTypedArray(t,e,o,g).typedArray;n[g]={value:c,size:c.length/r,metadata:a}}return n}},{key:"_getMeshFaceIndices",value:function(t,e){for(var A=e.num_faces(),n=new Uint32Array(3*A),r=new this.draco.DracoInt32Array,i=0;i<A;++i){t.GetFaceFromMesh(e,i,r);var o=3*i;n[o]=r.GetValue(0),n[o+1]=r.GetValue(1),n[o+2]=r.GetValue(2)}return this.draco.destroy(r),n}},{key:"_getMeshStripIndices",value:function(t,e){var A=new this.draco.DracoInt32Array;t.GetTriangleStripsFromMesh(e,A);for(var n=new Uint32Array(A.size()),r=0;r<A.size();++r)n[r]=A.GetValue(r);return this.draco.destroy(A),n}},{key:"_getAttributeTypedArray",value:function(t,e,A,n){if(0===A.ptr){var r="DRACO decode bad attribute ".concat(n);throw new Error(r)}var i,o,a=an[A.data_type()],s=A.num_components(),g=e.num_points()*s;switch(a){case Float32Array:i=new this.draco.DracoFloat32Array,t.GetAttributeFloatForAllPoints(e,A,i),o=new Float32Array(g);break;case Int8Array:i=new this.draco.DracoInt8Array,t.GetAttributeInt8ForAllPoints(e,A,i),o=new Int8Array(g);break;case Int16Array:i=new this.draco.DracoInt16Array,t.GetAttributeInt16ForAllPoints(e,A,i),o=new Int16Array(g);break;case Int32Array:i=new this.draco.DracoInt32Array,t.GetAttributeInt32ForAllPoints(e,A,i),o=new Int32Array(g);break;case Uint8Array:i=new this.draco.DracoUInt8Array,t.GetAttributeUInt8ForAllPoints(e,A,i),o=new Uint8Array(g);break;case Uint16Array:i=new this.draco.DracoUInt16Array,t.GetAttributeUInt16ForAllPoints(e,A,i),o=new Uint16Array(g);break;case Uint32Array:i=new this.draco.DracoUInt32Array,t.GetAttributeUInt32ForAllPoints(e,A,i),o=new Uint32Array(g);break;default:throw new Error("DRACO decoder: unexpected attribute type.")}for(var c=0;c<g;c++)o[c]=i.GetValue(c);return this.draco.destroy(i),{typedArray:o,components:s}}},{key:"_deduceAttributeName",value:function(t,e){var A=e.extraAttributes,n=void 0===A?{}:A;if(n&&"object"===Object(j.a)(n))for(var r=0,i=Object.entries(n);r<i.length;r++){var o=Object(B.a)(i[r],2),a=o[0];if(o[1]===t.uniqueId)return a}for(var s in on){var g=this.draco[s];if(t.attributeType===g)return on[s]}if(t.metadata){var c=e.attributeNameEntry||"name";if(t.metadata[c])return t.metadata[c].string}return"CUSTOM_ATTRIBUTE_".concat(t.uniqueId)}},{key:"_getGeometryMetadata",value:function(t,e){var A=t.GetMetadata(e);return this._queryDracoMetadata(A)}},{key:"_getAttributeMetadata",value:function(t,e,A){var n=t.GetAttributeMetadata(e,A);return this._queryDracoMetadata(n)}},{key:"_queryDracoMetadata",value:function(t){if(!t||!t.ptr)return{};for(var e={},A=this.metadataQuerier.NumEntries(t),n=0;n<A;n++){var r=this.metadataQuerier.GetEntryName(t,n);e[r]={int:this.metadataQuerier.GetIntEntry(t,r),string:this.metadataQuerier.GetStringEntry(t,r),double:this.metadataQuerier.GetDoubleEntry(t,r),intArray:this.metadataQuerier.GetIntEntryArray(t,r)}}return e}},{key:"decode",value:function(t,e){return this.parseSync(t,e)}}]),t}();function gn(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function cn(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?gn(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):gn(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var In=cn(cn({},{id:"draco",name:"Draco",version:"2.3.13",extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===("undefined"===typeof WebAssembly?"undefined":Object(j.a)(WebAssembly))?"wasm":"js",libraryPath:"libs/",workerUrl:"https://unpkg.com/@loaders.gl/draco@".concat("2.3.13","/dist/draco-loader.worker.js"),localWorkerUrl:"modules/draco/dist/draco-loader.worker.dev.js",extraAttributes:{}}}}),{},{parse:function(t,e,A,n){return un.apply(this,arguments)}});function un(){return(un=Object(nt.a)(et.a.mark((function t(e,A,n,r){var i,o,a;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,XA(A);case 2:return i=t.sent,o=i.draco,a=new sn(o),t.prev=5,t.abrupt("return",a.parseSync(e,cn({extraAttributes:A.draco&&A.draco.extraAttributes||null},A.parseOptions||{})));case 7:return t.prev=7,a.destroy(),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[5,,7,10]])})))).apply(this,arguments)}function ln(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Cn(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?ln(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):ln(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var hn,Bn={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},fn=Cn(Cn({},{POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6}),Bn),dn=(hn={},Object(At.a)(hn,Bn.DOUBLE,Float64Array),Object(At.a)(hn,Bn.FLOAT,Float32Array),Object(At.a)(hn,Bn.UNSIGNED_SHORT,Uint16Array),Object(At.a)(hn,Bn.UNSIGNED_INT,Uint32Array),Object(At.a)(hn,Bn.UNSIGNED_BYTE,Uint8Array),Object(At.a)(hn,Bn.BYTE,Int8Array),Object(At.a)(hn,Bn.SHORT,Int16Array),Object(At.a)(hn,Bn.INT,Int32Array),hn),Qn={DOUBLE:Bn.DOUBLE,FLOAT:Bn.FLOAT,UNSIGNED_SHORT:Bn.UNSIGNED_SHORT,UNSIGNED_INT:Bn.UNSIGNED_INT,UNSIGNED_BYTE:Bn.UNSIGNED_BYTE,BYTE:Bn.BYTE,SHORT:Bn.SHORT,INT:Bn.INT},En=function(){function t(){Object(a.a)(this,t)}return Object(l.a)(t,null,[{key:"fromTypedArray",value:function(t){for(var e in t=ArrayBuffer.isView(t)?t.constructor:t,dn){if(dn[e]===t)return e}throw new Error("Failed to convert GL type")}},{key:"fromName",value:function(t){var e=Qn[t];if(!e)throw new Error("Failed to convert GL type");return e}},{key:"getArrayType",value:function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(t){case Bn.UNSIGNED_SHORT_5_6_5:case Bn.UNSIGNED_SHORT_4_4_4_4:case Bn.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:var e=dn[t];if(!e)throw new Error("Failed to convert GL type");return e}}},{key:"getByteSize",value:function(e){return t.getArrayType(e).BYTES_PER_ELEMENT}},{key:"validate",value:function(e){return Boolean(t.getArrayType(e))}},{key:"createTypedArray",value:function(e,A){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;void 0===r&&(r=(A.byteLength-n)/t.getByteSize(e));var i=t.getArrayType(e);return new i(A,n,r)}}]),t}(),pn=function(){function t(e,A){Object(a.a)(this,t),this.json=e,this.buffer=A,this.featuresLength=0,this._cachedTypedArrays={}}return Object(l.a)(t,[{key:"getExtension",value:function(t){return this.json.extensions&&this.json.extensions[t]}},{key:"hasProperty",value:function(t){return Boolean(this.json[t])}},{key:"getGlobalProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fn.UNSIGNED_INT,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.json[t];return n&&Number.isFinite(n.byteOffset)?this._getTypedArrayFromBinary(t,e,A,1,n.byteOffset):n}},{key:"getPropertyArray",value:function(t,e,A){var n=this.json[t];return n&&Number.isFinite(n.byteOffset)?("componentType"in n&&(e=En.fromName(n.componentType)),this._getTypedArrayFromBinary(t,e,A,this.featuresLength,n.byteOffset)):this._getTypedArrayFromArray(t,e,n)}},{key:"getProperty",value:function(t,e,A,n,r){var i=this.json[t];if(!i)return i;var o=this.getPropertyArray(t,e,A);if(1===A)return o[n];for(var a=0;a<A;++a)r[a]=o[A*n+a];return r}},{key:"_getTypedArrayFromBinary",value:function(t,e,A,n,r){var i=this._cachedTypedArrays,o=i[t];return o||(o=En.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+r,n*A),i[t]=o),o}},{key:"_getTypedArrayFromArray",value:function(t,e,A){var n=this._cachedTypedArrays,r=n[t];return r||(r=En.createTypedArray(e,A),n[t]=r),r}}]),t}(),yn={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},vn={SCALAR:function(t,e){return t[e]},VEC2:function(t,e){return[t[2*e+0],t[2*e+1]]},VEC3:function(t,e){return[t[3*e+0],t[3*e+1],t[3*e+2]]},VEC4:function(t,e){return[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]]},MAT2:function(t,e){return[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]]},MAT3:function(t,e){return[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]]},MAT4:function(t,e){return[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]}},mn={SCALAR:function(t,e,A){e[A]=t},VEC2:function(t,e,A){e[2*A+0]=t[0],e[2*A+1]=t[1]},VEC3:function(t,e,A){e[3*A+0]=t[0],e[3*A+1]=t[1],e[3*A+2]=t[2]},VEC4:function(t,e,A){e[4*A+0]=t[0],e[4*A+1]=t[1],e[4*A+2]=t[2],e[4*A+3]=t[3]},MAT2:function(t,e,A){e[4*A+0]=t[0],e[4*A+1]=t[1],e[4*A+2]=t[2],e[4*A+3]=t[3]},MAT3:function(t,e,A){e[9*A+0]=t[0],e[9*A+1]=t[1],e[9*A+2]=t[2],e[9*A+3]=t[3],e[9*A+4]=t[4],e[9*A+5]=t[5],e[9*A+6]=t[6],e[9*A+7]=t[7],e[9*A+8]=t[8],e[9*A+9]=t[9]},MAT4:function(t,e,A){e[16*A+0]=t[0],e[16*A+1]=t[1],e[16*A+2]=t[2],e[16*A+3]=t[3],e[16*A+4]=t[4],e[16*A+5]=t[5],e[16*A+6]=t[6],e[16*A+7]=t[7],e[16*A+8]=t[8],e[16*A+9]=t[9],e[16*A+10]=t[10],e[16*A+11]=t[11],e[16*A+12]=t[12],e[16*A+13]=t[13],e[16*A+14]=t[14],e[16*A+15]=t[15]}};function bn(t){throw new Error('"'+t+'" is read-only')}var Fn=function(t){return void 0!==t};function wn(t,e,A){if(!e)return null;var n=t.getExtension("3DTILES_batch_table_hierarchy"),r=e.HIERARCHY;return r&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=r,n=r),n?function(t,e){var A,n,r,i,o=t.instancesLength,a=t.classes,s=t.classIds,g=t.parentCounts,c=t.parentIds,I=o;Fn(s.byteOffset)&&(s.componentType=defaultValue(s.componentType,GL.UNSIGNED_SHORT),s.type=AttributeType.SCALAR,r=getBinaryAccessor(s),bn("classIds"),s=r.createArrayBufferView(e.buffer,e.byteOffset+s.byteOffset,o));if(Fn(g))for(Fn(g.byteOffset)&&(g.componentType=defaultValue(g.componentType,GL.UNSIGNED_SHORT),g.type=AttributeType.SCALAR,r=getBinaryAccessor(g),bn("parentCounts"),g=r.createArrayBufferView(e.buffer,e.byteOffset+g.byteOffset,o)),i=new Uint16Array(o),bn("parentIdsLength"),I=0,A=0;A<o;++A)i[A]=I,I+=(bn("parentIdsLength"),g[A]);Fn(c)&&Fn(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,r=getBinaryAccessor(c),bn("parentIds"),c=r.createArrayBufferView(e.buffer,e.byteOffset+c.byteOffset,I));var u=a.length;for(A=0;A<u;++A){var l=a[A].length,C=a[A].instances,h=getBinaryProperties(l,C,e);a[A].instances=combine(h,C)}var B=new Array(u).fill(0),f=new Uint16Array(o);for(A=0;A<o;++A)n=s[A],f[A]=B[n],++B[n];var d={classes:a,classIds:s,classIndexes:f,parentCounts:g,parentIndexes:i,parentIds:c};return function(t){for(var e=t.classIds.length,A=0;A<e;++A)Dn(t,A,stack)}(d),d}(n,A):null}function Sn(t,e,A){if(t){var n=t.parentCounts;return t.parentIds?A(t,e):n>0?function(t,e,A){var n=t.classIds,r=t.parentCounts,i=t.parentIds,o=t.parentIndexes,a=n.length,s=scratchVisited;s.length=Math.max(s.length,a);var g=++marker,c=scratchStack;c.length=0,c.push(e);for(;c.length>0;)if(e=c.pop(),s[e]!==g){s[e]=g;var I=A(t,e);if(Fn(I))return I;for(var u=r[e],l=o[e],C=0;C<u;++C){var h=i[l+C];h!==e&&c.push(h)}}return null}(t,e,A):function(t,e,A){var n=!0;for(;n;){var r=A(t,e);if(Fn(r))return r;var i=t.parentIds[e];n=i!==e,e=i}throw new Error("traverseHierarchySingleParent")}(t,e,A)}}function Dn(t,e,A){var n=t.parentCounts,r=t.parentIds,i=t.parentIndexes,o=t.classIds.length;if(Fn(r)){assert(e<o,"Parent index ".concat(e," exceeds the total number of instances: ").concat(o)),assert(-1===A.indexOf(e),"Circular dependency detected in the batch table hierarchy."),A.push(e);for(var a=Fn(n)?n[e]:1,s=Fn(n)?i[e]:e,g=0;g<a;++g){var c=r[s+g];c!==e&&Dn(t,c,A)}A.pop(e)}}function Rn(t){return void 0!==t&&null!==t}var Un=function(t,e){return t},Gn={HIERARCHY:!0,extensions:!0,extras:!0},Nn=function(){function t(e,A,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};for(var i in Object(a.a)(this,t),Object(we.a)(n>=0),this.json=e||{},this.binary=A,this.featureCount=n,this._extensions=this.json&&this.json.extensions||{},this._properties={},this.json)Gn[i]||(this._properties[i]=this.json[i]);this._binaryProperties=this._initializeBinaryProperties(),r["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=wn(this,this.json,this.binary))}return Object(l.a)(t,[{key:"getExtension",value:function(t){return this.json&&this.json.extensions&&this.json.extensions[t]}},{key:"memorySizeInBytes",value:function(){return 0}},{key:"isClass",value:function(t,e){return this._checkBatchId(t),Object(we.a)("string"===typeof e,e),!!this._hierarchy&&Rn(Sn(this._hierarchy,t,(function(t,A){var n=t.classIds[A];return t.classes[n].name===e})))}},{key:"isExactClass",value:function(t,e){return Object(we.a)("string"===typeof e,e),this.getExactClassName(t)===e}},{key:"getExactClassName",value:function(t){if(this._checkBatchId(t),this._hierarchy){var e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}},{key:"hasProperty",value:function(t,e){return this._checkBatchId(t),Object(we.a)("string"===typeof e,e),Rn(this._properties[e])||this._hasPropertyInHierarchy(t,e)}},{key:"getPropertyNames",value:function(t,e){var A;this._checkBatchId(t),(e=Rn(e)?e:[]).length=0;var n=Object.keys(this._properties);return(A=e).push.apply(A,Object(Ct.a)(n)),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}},{key:"getProperty",value:function(t,e){if(this._checkBatchId(t),Object(we.a)("string"===typeof e,e),this._binaryProperties){var A=this._binaryProperties[e];if(Rn(A))return this._getBinaryProperty(A,t)}var n=this._properties[e];if(Rn(n))return Un(n[t]);if(this._hierarchy){var r=this._getHierarchyProperty(t,e);if(Rn(r))return r}}},{key:"setProperty",value:function(t,e,A){var n=this.featureCount;if(this._checkBatchId(t),Object(we.a)("string"===typeof e,e),this._binaryProperties){var r=this._binaryProperties[e];if(r)return void this._setBinaryProperty(r,t,A)}if(!this._hierarchy||!this._setHierarchyProperty(this,t,e,A)){var i=this._properties[e];Rn(i)||(this._properties[e]=new Array(n),i=this._properties[e]),i[t]=Un(A)}}},{key:"_checkBatchId",value:function(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}},{key:"_getBinaryProperty",value:function(t,e){return t.unpack(t.typedArray,e)}},{key:"_setBinaryProperty",value:function(t,e,A){t.pack(A,t.typedArray,e)}},{key:"_initializeBinaryProperties",value:function(){var t=null;for(var e in this._properties){var A=this._properties[e],n=this._initializeBinaryProperty(e,A);n&&((t=t||{})[e]=n)}return t}},{key:"_initializeBinaryProperty",value:function(t,e){if("byteOffset"in e){var A=e;Object(we.a)(this.binary,"Property ".concat(t," requires a batch table binary.")),Object(we.a)(A.type,"Property ".concat(t," requires a type."));var n=function(t,e,A,n){var r=t.componentType;Object(we.a)(t.componentType);var i="string"===typeof r?En.fromName(r):r,o=yn[t.type],a=vn[t.type],s=mn[t.type];return A+=t.byteOffset,{values:En.createTypedArray(i,e,A,o*n),type:i,size:o,unpacker:a,packer:s}}(A,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:n.values,componentCount:n.size,unpack:n.unpacker,pack:n.packer}}return null}},{key:"_hasPropertyInHierarchy",value:function(t,e){if(!this._hierarchy)return!1;var A=Sn(this._hierarchy,t,(function(t,A){var n=t.classIds[A];return Rn(t.classes[n].instances[e])}));return Rn(A)}},{key:"_getPropertyNamesInHierarchy",value:function(t,e){Sn(this._hierarchy,t,(function(t,A){var n=t.classIds[A],r=t.classes[n].instances;for(var i in r)r.hasOwnProperty(i)&&-1===e.indexOf(i)&&e.push(i)}))}},{key:"_getHierarchyProperty",value:function(t,e){var A=this;return Sn(this._hierarchy,t,(function(t,n){var r=t.classIds[n],i=t.classes[r],o=t.classIndexes[n],a=i.instances[e];return Rn(a)?Rn(a.typedArray)?A._getBinaryProperty(a,o):Un(a[o]):null}))}},{key:"_setHierarchyProperty",value:function(t,e,A,n){var r=this,i=Sn(this._hierarchy,e,(function(t,i){var o=t.classIds[i],a=t.classes[o],s=t.classIndexes[i],g=a.instances[A];return!!Rn(g)&&(Object(we.a)(i===e,'Inherited property "'.concat(A,'" is read-only.')),Rn(g.typedArray)?r._setBinaryProperty(g,s,n):g[s]=Un(n),!0)}));return Rn(i)}}]),t}();function kn(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new DataView(e);if(t.magic=n.getUint32(A,!0),A+=4,t.version=n.getUint32(A,!0),A+=4,t.byteLength=n.getUint32(A,!0),A+=4,1!==t.version)throw new Error("3D Tile Version ".concat(t.version," not supported"));return A}function xn(t,e,A){var n=new DataView(e);return t.header=t.header||{},t.header.featureTableJsonByteLength=n.getUint32(A,!0),A+=4,t.header.featureTableBinaryByteLength=n.getUint32(A,!0),A+=4,t.header.batchTableJsonByteLength=n.getUint32(A,!0),A+=4,t.header.batchTableBinaryByteLength=n.getUint32(A,!0),A+=4}function On(t,e,A,n){return A=function(t,e,A,n){var r=t.header,i=r.featureTableJsonByteLength,o=r.featureTableBinaryByteLength;if(t.featureTableJson={BATCH_LENGTH:0},i>0){var a=YA(e,A,i);t.featureTableJson=JSON.parse(a)}return A+=i,t.featureTableBinary=new Uint8Array(e,A,o),A+=o}(t,e,A),A=function(t,e,A,n){var r=t.header,i=r.batchTableJsonByteLength,o=r.batchTableBinaryByteLength;if(i>0){var a=YA(e,A,i);t.batchTableJson=JSON.parse(a),A+=i,o>0&&(t.batchTableBinary=new Uint8Array(e,A,o),t.batchTableBinary=new Uint8Array(t.batchTableBinary),A+=o)}return A}(t,e,A)}function Mn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],A=t>>11&31,n=t>>5&63,r=31&t;return e[0]=A<<3,e[1]=n<<2,e[2]=r<<3,e}function Ln(t,e,A){if(!e&&(!t||!t.batchIds||!A))return null;var n=t.batchIds,r=t.isRGB565,i=t.pointCount;if(n&&A){for(var o=new Uint8ClampedArray(3*i),a=0;a<i;a++){var s=n[a],g=A.getProperty(s,"dimensions").map((function(t){return 255*t}));o[3*a]=g[0],o[3*a+1]=g[1],o[3*a+2]=g[2]}return{type:fn.UNSIGNED_BYTE,value:o,size:3,normalized:!0}}if(r){for(var c=new Uint8ClampedArray(3*i),I=0;I<i;I++){var u=Mn(e[I]);c[3*I]=u[0],c[3*I+1]=u[1],c[3*I+2]=u[2]}return{type:fn.UNSIGNED_BYTE,value:c,size:3,normalized:!0}}return e&&e.length===3*i?{type:fn.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:fn.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}var _n=A(573);A(494);function Jn(t,e){if(!t)throw new Error("math.gl assertion failed. ".concat(e))}new _n.a,new ut.a,new _n.a,new _n.a,new Uint8Array(1);function Tn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:255;return Object(eA.a)(t,0,e)/e*2-1}function jn(t){return t<0?-1:1}function Hn(t,e,A,n){if(Jn(n),t<0||t>A||e<0||e>A)throw new Error("x and y must be unsigned normalized integers between 0 and ".concat(A));if(n.x=Tn(t,A),n.y=Tn(e,A),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var r=n.x;n.x=(1-Math.abs(n.y))*jn(r),n.y=(1-Math.abs(r))*jn(n.y)}return n.normalize()}function Yn(t,e,A){return Hn(t,e,255,A)}var Vn=new ut.a;function Zn(t,e,A){return t.isQuantized?A["3d-tiles"]&&A["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){for(var A=new ut.a,n=new Float32Array(3*t.pointCount),r=0;r<t.pointCount;r++)A.set(e[3*r],e[3*r+1],e[3*r+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(n,3*r);return n}(t,e)):{type:fn.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}function Wn(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Kn(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Wn(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Wn(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Pn(t,e,A,n,r){return qn.apply(this,arguments)}function qn(){return(qn=Object(nt.a)(et.a.mark((function t(e,A,n,r,i){var o,a,s;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=kn(e,A,n),n=xn(e,A,n),n=On(e,A,n),Xn(e),o=zn(e),a=o.featureTable,s=o.batchTable,t.next=7,Ar(e,a,s,r,i);case 7:return $n(e,a,r),tr(e,a,s),er(e,a),t.abrupt("return",n);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Xn(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null},t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}function zn(t){var e=new pn(t.featureTableJson,t.featureTableBinary),A=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(A))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=A,t.featuresLength=A,t.pointsLength=A,t.pointCount=A,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",fn.FLOAT,3);var n=function(t,e){var A=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",fn.UNSIGNED_SHORT,1),t.batchIds)){var n=e.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");var r=t.batchTableJson,i=t.batchTableBinary;A=new Nn(r,i,n)}return A}(t,e);return{featureTable:e,batchTable:n}}function $n(t,e,A){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",fn.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){var n=e.getPropertyArray("POSITION_QUANTIZED",fn.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",fn.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",fn.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=Zn(t,n,A)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}function tr(t,e,A){if(!t.attributes.colors){var n=null;e.hasProperty("RGBA")?(n=e.getPropertyArray("RGBA",fn.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?n=e.getPropertyArray("RGB",fn.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(n=e.getPropertyArray("RGB565",fn.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=Ln(t,n,A)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",fn.UNSIGNED_BYTE,4))}function er(t,e){if(!t.attributes.normals){var A=null;e.hasProperty("NORMAL")?A=e.getPropertyArray("NORMAL",fn.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(A=e.getPropertyArray("NORMAL_OCT16P",fn.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){for(var A=new Float32Array(3*t.pointsLength),n=0;n<t.pointsLength;n++)Yn(e[2*n],e[2*n+1],Vn),Vn.toArray(A,3*n);return{type:fn.FLOAT,size:2,value:A}}return{type:fn.FLOAT,size:2,value:e}}(t,A)}}function Ar(t,e,A,n,r){return nr.apply(this,arguments)}function nr(){return(nr=Object(nt.a)(et.a.mark((function t(e,A,n,r,i){var o,a,s,g,c,I,u,l;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((g=e.batchTableJson&&e.batchTableJson.extensions&&e.batchTableJson.extensions["3DTILES_draco_point_compression"])&&(s=g.properties),!(c=A.getExtension("3DTILES_draco_point_compression"))){t.next=15;break}if(a=c.properties,I=c.byteOffset,u=c.byteLength,a&&Number.isFinite(I)&&u){t.next=9;break}throw new Error("Draco properties, byteOffset, and byteLength must be defined");case 9:o=e.featureTableBinary.slice(I,I+u),e.hasPositions=Number.isFinite(a.POSITION),e.hasColors=Number.isFinite(a.RGB)||Number.isFinite(a.RGBA),e.hasNormals=Number.isFinite(a.NORMAL),e.hasBatchIds=Number.isFinite(a.BATCH_ID),e.isTranslucent=Number.isFinite(a.RGBA);case 15:if(o){t.next=17;break}return t.abrupt("return",!0);case 17:return l={buffer:o,properties:Kn(Kn({},a),s),featureTableProperties:a,batchTableProperties:s,dequantizeInShader:!1},t.next=20,rr(e,l,r,i);case 20:return t.abrupt("return",t.sent);case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function rr(t,e,A,n){return ir.apply(this,arguments)}function ir(){return(ir=Object(nt.a)(et.a.mark((function t(e,A,n,r){var i,o,a,s,g,c,I,u,l,C,h,B,f,d;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r.parse,t.next=3,i(A.buffer,In,{draco:{extraAttributes:A.batchTableProperties||{}}});case 3:if(o=t.sent,a=o.attributes.POSITION&&o.attributes.POSITION.value,s=o.attributes.COLOR_0&&o.attributes.COLOR_0.value,g=o.attributes.NORMAL&&o.attributes.NORMAL.value,c=o.attributes.BATCH_ID&&o.attributes.BATCH_ID.value,I=a&&o.attributes.POSITION.value.quantization,u=g&&o.attributes.NORMAL.value.quantization,I&&(l=o.POSITION.data.quantization,C=l.range,e.quantizedVolumeScale=new ut.a(C,C,C),e.quantizedVolumeOffset=new ut.a(l.minValues),e.quantizedRange=(1<<l.quantizationBits)-1,e.isQuantizedDraco=!0),u&&(e.octEncodedRange=(1<<o.NORMAL.data.quantization.quantizationBits)-1,e.isOctEncodedDraco=!0),h={},A.batchTableProperties)for(B=0,f=Object.keys(A.batchTableProperties);B<f.length;B++)d=f[B],o.attributes[d]&&o.attributes[d].value&&(h[d.toLowerCase()]=o.attributes[d].value);e.attributes=Kn({positions:a,colors:Ln(e,s),normals:g,batchIds:c},h);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function or(t,e){if(!t)throw new Error(e)}var ar=A(566),sr=ar.a._parseImageNode,gr="undefined"!==typeof Image,cr="undefined"!==typeof ImageBitmap,Ir=Boolean(sr),ur=!!ar.b||Ir;function lr(t){var e=hr(t);if(!e)throw new Error("Not an image");return e}function Cr(t){switch(lr(t)){case"data":return t;case"image":case"imagebitmap":var e=document.createElement("canvas"),A=e.getContext("2d");if(A)return e.width=t.width,e.height=t.height,A.drawImage(t,0,0),A.getImageData(0,0,t.width,t.height);default:return or(!1)}}function hr(t){return"undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&t instanceof Image?"image":t&&"object"===Object(j.a)(t)&&t.data&&t.width&&t.height?"data":null}var Br=/^data:image\/svg\+xml/,fr=/\.svg((\?|#).*)?$/;function dr(t){return t&&(Br.test(t)||fr.test(t))}function Qr(t,e){if(dr(e)){var A=(new TextDecoder).decode(t);return"data:image/svg+xml;base64,".concat(btoa(A))}return Er(t,e)}function Er(t,e){if(dr(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}function pr(t,e,A){return yr.apply(this,arguments)}function yr(){return(yr=Object(nt.a)(et.a.mark((function t(e,A,n){var r,i,o;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Qr(e,n),i=self.URL||self.webkitURL,o="string"!==typeof r&&i.createObjectURL(r),t.prev=3,t.next=6,vr(o||r,A);case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,o&&i.revokeObjectURL(o),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[3,,7,10]])})))).apply(this,arguments)}function vr(t,e){return mr.apply(this,arguments)}function mr(){return(mr=Object(nt.a)(et.a.mark((function t(e,A){var n;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=new Image).src=e,!(A.image&&A.image.decode&&n.decode)){t.next=6;break}return t.next=5,n.decode();case 5:return t.abrupt("return",n);case 6:return t.next=8,new Promise((function(t,A){try{n.onload=function(){return t(n)},n.onerror=function(t){return A(new Error("Could not load image ".concat(e,": ").concat(t)))}}catch(r){A(r)}}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var br={},Fr=!0;function wr(t,e,A){return Sr.apply(this,arguments)}function Sr(){return(Sr=Object(nt.a)(et.a.mark((function t(e,A,n){var r,i,o;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!dr(n)){t.next=7;break}return t.next=3,pr(e,A,n);case 3:i=t.sent,r=i,t.next=8;break;case 7:r=Er(e,n);case 8:return o=A&&A.imagebitmap,t.next=11,Dr(r,o);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Dr(t){return Rr.apply(this,arguments)}function Rr(){return(Rr=Object(nt.a)(et.a.mark((function t(e){var A,n=arguments;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Ur(A=n.length>1&&void 0!==n[1]?n[1]:null)&&Fr||(A=null),!A){t.next=13;break}return t.prev=3,t.next=6,createImageBitmap(e,A);case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(3),console.warn(t.t0),Fr=!1;case 13:return t.next=15,createImageBitmap(e);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function Ur(t){for(var e in t||br)return!1;return!0}function Gr(t){var e=Nr(t);return function(t){var e=Nr(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){var e=Nr(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;var A=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var A=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:A}}(),n=A.tableMarkers,r=A.sofMarkers,i=2;for(;i+9<e.byteLength;){var o=e.getUint16(i,!1);if(r.has(o))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!n.has(o))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){var e=Nr(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){var e=Nr(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function Nr(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}function kr(t,e){var A=(Gr(t)||{}).mimeType,n=ar.a._parseImageNode;return or(n),n(t,A,e)}function xr(){return(xr=Object(nt.a)(et.a.mark((function t(e,A,n){var r,i,o,a,s;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(A=A||{}).image||{},i=r.type||"auto",o=(n||{}).url,a=Or(i),t.t0=a,t.next="imagebitmap"===t.t0?8:"image"===t.t0?12:"data"===t.t0?16:20;break;case 8:return t.next=10,wr(e,A,o);case 10:return s=t.sent,t.abrupt("break",21);case 12:return t.next=14,pr(e,A,o);case 14:return s=t.sent,t.abrupt("break",21);case 16:return t.next=18,kr(e,A);case 18:return s=t.sent,t.abrupt("break",21);case 20:or(!1);case 21:return"data"===i&&(s=Cr(s)),t.abrupt("return",s);case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Or(t){switch(t){case"auto":case"data":return function(){if(cr)return"imagebitmap";if(gr)return"image";if(ur)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return cr||gr||ur;case"imagebitmap":return cr;case"image":return gr;case"data":return ur;case"html":return gr;case"ndarray":return ur;default:throw new Error("@loaders.gl/images: image ".concat(t," not supported in this environment"))}}(t),t}}var Mr={id:"image",name:"Images",version:"2.3.13",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(t,e,A){return xr.apply(this,arguments)},tests:[function(t){return Boolean(Gr(new DataView(t)))}],options:{image:{type:"auto",decode:!0}}},Lr=A(858),_r=A(498);function Jr(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function Tr(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;var A=e.baseUri||e.uri;if(!A)throw new Error("'baseUri' must be provided to resolve relative url ".concat(t));return A.substr(0,A.lastIndexOf("/")+1)+t}function jr(t,e,A){var n=t.bufferViews[A];Jr(n);var r=e[n.buffer];Jr(r);var i=(n.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,i,n.byteLength)}var Hr=["SCALAR","VEC2","VEC3","VEC4"],Yr=new Map([[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126]]),Vr={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Zr={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Wr={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Kr(t){return Hr[t-1]||Hr[0]}function Pr(t){var e=Yr.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function qr(t,e){var A=Wr[t.componentType],n=Vr[t.type],r=Zr[t.componentType],i=t.count*n,o=t.count*n*r;return Jr(o>=0&&o<=e.byteLength),{ArrayType:A,length:i,byteLength:o}}var Xr=function(){function t(e){if(Object(a.a)(this,t),e instanceof t)return e;e||(e={json:{asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},buffers:[]}),this.byteLength=0,this.gltf=e,Jr(this.gltf.json)}return Object(l.a)(t,[{key:"getApplicationData",value:function(t){return this.json[t]}},{key:"getExtraData",value:function(t){return(this.json.extras||{})[t]}},{key:"getExtension",value:function(t){var e=this.getUsedExtensions().find((function(e){return e===t})),A=this.json.extensions||{};return e?A[t]||!0:null}},{key:"getRequiredExtension",value:function(t){return this.getRequiredExtensions().find((function(e){return e===t}))?this.getExtension(t):null}},{key:"getRequiredExtensions",value:function(){return this.json.extensionsRequired||[]}},{key:"getUsedExtensions",value:function(){return this.json.extensionsUsed||[]}},{key:"getObjectExtension",value:function(t,e){return(t.extensions||{})[e]}},{key:"getScene",value:function(t){return this.getObject("scenes",t)}},{key:"getNode",value:function(t){return this.getObject("nodes",t)}},{key:"getSkin",value:function(t){return this.getObject("skins",t)}},{key:"getMesh",value:function(t){return this.getObject("meshes",t)}},{key:"getMaterial",value:function(t){return this.getObject("materials",t)}},{key:"getAccessor",value:function(t){return this.getObject("accessors",t)}},{key:"getCamera",value:function(t){return null}},{key:"getTexture",value:function(t){return this.getObject("textures",t)}},{key:"getSampler",value:function(t){return this.getObject("samplers",t)}},{key:"getImage",value:function(t){return this.getObject("images",t)}},{key:"getBufferView",value:function(t){return this.getObject("bufferViews",t)}},{key:"getBuffer",value:function(t){return this.getObject("buffers",t)}},{key:"getObject",value:function(t,e){if("object"===Object(j.a)(e))return e;var A=this.json[t]&&this.json[t][e];if(!A)throw new Error("glTF file error: Could not find ".concat(t,"[").concat(e,"]"));return A}},{key:"getTypedArrayForBufferView",value:function(t){var e=(t=this.getBufferView(t)).buffer,A=this.gltf.buffers[e];Jr(A);var n=(t.byteOffset||0)+A.byteOffset;return new Uint8Array(A.arrayBuffer,n,t.byteLength)}},{key:"getTypedArrayForAccessor",value:function(t){t=this.getAccessor(t);var e=this.getBufferView(t.bufferView),A=this.getBuffer(e.buffer).data,n=qr(t,e),r=n.ArrayType,i=n.length;return new r(A,e.byteOffset+t.byteOffset,i)}},{key:"getTypedArrayForImageData",value:function(t){t=this.getAccessor(t);var e=this.getBufferView(t.bufferView),A=this.getBuffer(e.buffer).data,n=e.byteOffset||0;return new Uint8Array(A,n,e.byteLength)}},{key:"addApplicationData",value:function(t,e){return this.json[t]=e,this}},{key:"addExtraData",value:function(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}},{key:"addObjectExtension",value:function(t,e,A){return Jr(A),t.extensions=t.extensions||{},t.extensions[e]=A,this.registerUsedExtension(e),this}},{key:"setObjectExtension",value:function(t,e,A){(t.extensions||{})[e]=A}},{key:"removeObjectExtension",value:function(t,e){var A=t.extensions||{},n=A[e];return delete A[e],n}},{key:"addExtension",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Jr(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}},{key:"addRequiredExtension",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Jr(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}},{key:"registerUsedExtension",value:function(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find((function(e){return e===t}))||this.json.extensionsUsed.push(t)}},{key:"registerRequiredExtension",value:function(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find((function(e){return e===t}))||this.json.extensionsRequired.push(t)}},{key:"removeExtension",value:function(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}},{key:"addMesh",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,n=this._addAttributes(t),r={primitives:[{attributes:n,indices:e,mode:A}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(r),this.json.meshes.length-1}},{key:"addPointCloud",value:function(t){var e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}},{key:"addImage",value:function(t,e){e=e||function(t){var e=Gr(t);return e?e.mimeType:null}(t);var A={bufferView:this.addBufferView(t),mimeType:e};return this.json.images=this.json.images||[],this.json.images.push(A),this.json.images.length-1}},{key:"addBufferView",value:function(t){var e=t.byteLength;Jr(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);var A={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=Object(_r.c)(e),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(A),this.json.bufferViews.length-1}},{key:"addAccessor",value:function(t,e){var A={bufferView:t,type:Kr(e.size),componentType:e.componentType,count:e.count};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(A),this.json.accessors.length-1}},{key:"addBinaryBuffer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3},A=this.addBufferView(t),n={size:e.size,componentType:Pr(t),count:Math.round(t.length/e.size)};return this.addAccessor(A,Object.assign(n,e))}},{key:"createBinaryChunk",value:function(){if(!this.arrayBuffer){for(var t=this.byteLength,e=new ArrayBuffer(t),A=new Uint8Array(e),n=0,r=0;r<this.sourceBuffers.length;r++){var i=this.sourceBuffers[r];n=Object(_r.a)(i,A,n)}this.json.buffers[0].byteLength=t,this.arrayBuffer=e,this.sourceBuffers=[]}}},{key:"_removeStringFromArray",value:function(t,e){for(var A=!0;A;){var n=t.indexOf(e);n>-1?t.splice(n,1):A=!1}}},{key:"json",get:function(){return this.gltf.json}}]),t}();function zr(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function $r(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?zr(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):zr(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function ti(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A={};for(var n in t){var r=t[n];if("indices"!==n){var i=ei(r,e[n]||{});A[n]=i}}return A}function ei(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=Ai(t),n=A.buffer,r=A.size,i=A.count,o=$r($r({},e),{},{value:n,size:r,bufferView:null,byteOffset:0,count:i,type:Kr(r),componentType:Pr(n)});return o}function Ai(t){var e=t,A=1,n=0;return t&&t.value&&(e=t.value,A=t.size||1),e&&(ArrayBuffer.isView(e)||(e=function(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!t)return null;if(Array.isArray(t))return new e(t);if(A&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),n=e.length/A),{buffer:e,size:A,count:n}}function ni(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function ri(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?ni(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):ni(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var ii=et.a.mark(hi);function oi(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return ai(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return ai(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function ai(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function si(t,e,A){return gi.apply(this,arguments)}function gi(){return(gi=Object(nt.a)(et.a.mark((function t(e,A,n){var r,i,o,a,s;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.gltf.decompressMeshes){t.next=2;break}return t.abrupt("return");case 2:r=new Xr(e),i=[],o=oi(hi(r));try{for(o.s();!(a=o.n()).done;)s=a.value,r.getObjectExtension(s,"KHR_draco_mesh_compression")&&i.push(Ii(s,r,A,n))}catch(g){o.e(g)}finally{o.f()}return t.next=8,Promise.all(i);case 8:r.removeExtension("KHR_draco_mesh_compression");case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ci(t){var e,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new Xr(t),r=oi(n.json.meshes||[]);try{for(r.s();!(e=r.n()).done;){var i=e.value;li(i,A),n.addRequiredExtension("KHR_draco_mesh_compression")}}catch(o){r.e(o)}finally{r.f()}}function Ii(t,e,A,n){return ui.apply(this,arguments)}function ui(){return(ui=Object(nt.a)(et.a.mark((function t(e,A,n,r){var i,o,a,s,g,c,I,u,l,C,h,f;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=A.getObjectExtension(e,"KHR_draco_mesh_compression"),o=A.getTypedArrayForBufferView(i.bufferView),a=Object(_r.b)(o.buffer,o.byteOffset),s=r.parse,delete(g=ri({},n))["3d-tiles"],t.next=8,s(a,In,g,r);case 8:for(c=t.sent,I={},u=0,l=[].concat(Object(Ct.a)(Object.entries(e.attributes)),[["indices",e.indices]]);u<l.length;u++)C=Object(B.a)(l[u],2),h=C[0],f=C[1],I[h]=A.getAccessor(f);e.attributes=ti(c.attributes,I),c.indices&&(e.indices=ei(c.indices,I.indices||{})),Ci(e);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function li(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;if(!n.DracoWriter||!n.DracoLoader)throw new Error("DracoWriter/DracoLoader not available");var i=n.DracoWriter.encodeSync({attributes:t}),o=r.parseSync,a=o({attributes:t}),s=n._addFauxAttributes(a.attributes),g=n.addBufferView(i),c={primitives:[{attributes:s,mode:A,extensions:Object(At.a)({},"KHR_draco_mesh_compression",{bufferView:g,attributes:s})}]};return c}function Ci(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("Empty glTF primitive detected: Draco decompression failure?")}function hi(t){var e,A,n,r,i,o;return et.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:e=oi(t.json.meshes||[]),a.prev=1,e.s();case 3:if((A=e.n()).done){a.next=24;break}n=A.value,r=oi(n.primitives),a.prev=6,r.s();case 8:if((i=r.n()).done){a.next=14;break}return o=i.value,a.next=12,o;case 12:a.next=8;break;case 14:a.next=19;break;case 16:a.prev=16,a.t0=a.catch(6),r.e(a.t0);case 19:return a.prev=19,r.f(),a.finish(19);case 22:a.next=3;break;case 24:a.next=29;break;case 26:a.prev=26,a.t1=a.catch(1),e.e(a.t1);case 29:return a.prev=29,e.f(),a.finish(29);case 32:case"end":return a.stop()}}),ii,null,[[1,26,29,32],[6,16,19,22]])}function Bi(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return fi(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return fi(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function fi(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function di(t,e){var A=new Xr(t),n=A.json,r=A.getExtension("KHR_lights_punctual");r&&(A.json.lights=r.lights,A.removeExtension("KHR_lights_punctual"));var i,o=Bi(n.nodes||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=A.getObjectExtension(a,"KHR_lights_punctual");s&&(a.light=s.light),A.removeObjectExtension(a,"KHR_lights_punctual")}}catch(g){o.e(g)}finally{o.f()}}function Qi(t,e){var A=new Xr(t),n=A.json;if(n.lights){var r=A.addExtension("KHR_lights_punctual");Jr(!r.lights),r.lights=n.lights,delete n.lights}if(A.json.lights){var i,o=Bi(A.json.lights);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=a.node;A.addObjectExtension(s,"KHR_lights_punctual",a)}}catch(g){o.e(g)}finally{o.f()}delete A.json.lights}}function Ei(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return pi(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return pi(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function pi(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function yi(t,e){var A=new Xr(t),n=A.json;A.removeExtension("KHR_materials_unlit");var r,i=Ei(n.materials||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),A.removeObjectExtension(o,"KHR_materials_unlit")}}catch(a){i.e(a)}finally{i.f()}}function vi(t,e){var A=new Xr(t),n=A.json;if(A.materials){var r,i=Ei(n.materials);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.unlit&&(delete o.unlit,A.addObjectExtension(o,"KHR_materials_unlit",{}),A.addExtension("KHR_materials_unlit"))}}catch(a){i.e(a)}finally{i.f()}}}function mi(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return bi(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return bi(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function bi(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Fi(t,e){var A=new Xr(t),n=A.json,r=A.getExtension("KHR_techniques_webgl");if(r){var i,o=function(t,e){var A=t.programs,n=void 0===A?[]:A,r=t.shaders,i=void 0===r?[]:r,o=t.techniques,a=void 0===o?[]:o,s=new TextDecoder;return i.forEach((function(t){if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=s.decode(e.getTypedArrayForBufferView(t.bufferView))})),n.forEach((function(t){t.fragmentShader=i[t.fragmentShader],t.vertexShader=i[t.vertexShader]})),a.forEach((function(t){t.program=n[t.program]})),a}(r,A),a=mi(n.materials||[]);try{for(a.s();!(i=a.n()).done;){var s=i.value,g=A.getObjectExtension(s,"KHR_techniques_webgl");g&&(s.technique=Object.assign({},g,o[g.technique]),s.technique.values=Si(s.technique,A)),A.removeObjectExtension(s,"KHR_techniques_webgl")}}catch(c){a.e(c)}finally{a.f()}A.removeExtension("KHR_techniques_webgl")}}function wi(t,e){}function Si(t,e){var A=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach((function(e){t.uniforms[e].value&&!(e in A)&&(A[e]=t.uniforms[e].value)})),Object.keys(A).forEach((function(t){"object"===Object(j.a)(A[t])&&void 0!==A[t].index&&(A[t].texture=e.getTexture(A[t].index))})),A}var Di={KHR_draco_mesh_compression:n,KHR_lights_punctual:r,KHR_materials_unlit:i,KHR_techniques_webgl:o};function Ri(t){return Ui.apply(this,arguments)}function Ui(){return(Ui=Object(nt.a)(et.a.mark((function t(e){var A,n,r,i,o,a=arguments;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2?a[2]:void 0,A.gltf=A.gltf||{},t.t0=et.a.keys(Di);case 4:if((t.t1=t.t0()).done){t.next=14;break}if(r=t.t1.value,i=A.gltf.excludeExtensions||{},r in i&&!i[r]){t.next=12;break}return o=Di[r],t.next=12,o.decode(e,A,n);case 12:t.next=4;break;case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Gi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"".concat(String.fromCharCode(t.getUint8(e+0))).concat(String.fromCharCode(t.getUint8(e+1))).concat(String.fromCharCode(t.getUint8(e+2))).concat(String.fromCharCode(t.getUint8(e+3)))}function Ni(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new DataView(t),r=A.magic,i=void 0===r?1735152710:r,o=n.getUint32(e,!1);return o===i||1735152710===o}function ki(t,e,A,n){Object(we.a)(t.header.byteLength>20);var r=e.getUint32(A+0,!0),i=e.getUint32(A+4,!0);return A+=8,Object(we.a)(0===i),Oi(t,e,A,r,n),A+=r,A+=Mi(t,e,A,t.header.byteLength,n)}function xi(t,e,A,n){return Object(we.a)(t.header.byteLength>20),function(t,e,A,n){for(;A+8<=t.header.byteLength;){var r=e.getUint32(A+0,!0),i=e.getUint32(A+4,!0);switch(A+=8,i){case 1313821514:Oi(t,e,A,r,n);break;case 5130562:Mi(t,e,A,r,n);break;case 0:n.glb.strict||Oi(t,e,A,r,n);break;case 1:n.glb.strict||Mi(t,e,A,r,n)}A+=Object(_r.c)(r)}}(t,e,A,n),A+t.header.byteLength}function Oi(t,e,A,n,r){var i=new Uint8Array(e.buffer,A,n),o=new TextDecoder("utf8").decode(i);return t.json=JSON.parse(o),Object(_r.c)(n)}function Mi(t,e,A,n,r){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:A,byteLength:n,arrayBuffer:e.buffer}),Object(_r.c)(n)}function Li(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return _i(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return _i(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function _i(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Ji(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Ti(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Ti(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Ti(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var ji,Hi={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},Yi={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},Vi=function(){function t(e){Object(a.a)(this,t),this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}return Object(l.a)(t,[{key:"normalize",value:function(t,e){this.json=t.json;var A=t.json;switch(A.asset&&A.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version ".concat(A.asset.version))}if(!e.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(A),this._convertTopLevelObjectsToArrays(A),function(t,e){var A,n=new Xr(t),r=n.json,i=Li(r.images||[]);try{for(i.s();!(A=i.n()).done;){var o=A.value,a=n.removeObjectExtension(o,"KHR_binary_glTF");a&&Object.assign(o,a)}}catch(s){i.e(s)}finally{i.f()}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,n.removeExtension("KHR_binary_glTF")}(t),this._convertObjectIdsToArrayIndices(A),this._updateObjects(A)}},{key:"_addAsset",value:function(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}},{key:"_convertTopLevelObjectsToArrays",value:function(t){for(var e in Hi)this._convertTopLevelObjectToArray(t,e)}},{key:"_convertTopLevelObjectToArray",value:function(t,e){var A=t[e];if(A&&!Array.isArray(A))for(var n in t[e]=[],A){var r=A[n];r.id=r.id||n;var i=t[e].length;t[e].push(r),this.idToIndexMap[e][n]=i}}},{key:"_convertObjectIdsToArrayIndices",value:function(t){for(var e in Hi)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));var A,n=Ji(t.textures);try{for(n.s();!(A=n.n()).done;){var r=A.value;this._convertTextureIds(r)}}catch(C){n.e(C)}finally{n.f()}var i,o=Ji(t.meshes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this._convertMeshIds(a)}}catch(C){o.e(C)}finally{o.f()}var s,g=Ji(t.nodes);try{for(g.s();!(s=g.n()).done;){var c=s.value;this._convertNodeIds(c)}}catch(C){g.e(C)}finally{g.f()}var I,u=Ji(t.scenes);try{for(u.s();!(I=u.n()).done;){var l=I.value;this._convertSceneIds(l)}}catch(C){u.e(C)}finally{u.f()}}},{key:"_convertTextureIds",value:function(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}},{key:"_convertMeshIds",value:function(t){var e,A=Ji(t.primitives);try{for(A.s();!(e=A.n()).done;){var n=e.value,r=n.attributes,i=n.indices,o=n.material;for(var a in r)r[a]=this._convertIdToIndex(r[a],"accessor");i&&(n.indices=this._convertIdToIndex(i,"accessor")),o&&(n.material=this._convertIdToIndex(o,"material"))}}catch(s){A.e(s)}finally{A.f()}}},{key:"_convertNodeIds",value:function(t){var e=this;t.children&&(t.children=t.children.map((function(t){return e._convertIdToIndex(t,"node")})))}},{key:"_convertSceneIds",value:function(t){var e=this;t.nodes&&(t.nodes=t.nodes.map((function(t){return e._convertIdToIndex(t,"node")})))}},{key:"_convertIdsToIndices",value:function(t,e){var A,n=Ji(t[e]);try{for(n.s();!(A=n.n()).done;){var r=A.value;for(var i in r){var o=r[i],a=this._convertIdToIndex(o,i);r[i]=a}}}catch(s){n.e(s)}finally{n.f()}}},{key:"_convertIdToIndex",value:function(t,e){var A=Yi[e];if(A in this.idToIndexMap){var n=this.idToIndexMap[A][t];if(!Number.isFinite(n))throw new Error("gltf v1: failed to resolve ".concat(e," with id ").concat(t));return n}return t}},{key:"_updateObjects",value:function(t){var e,A=Ji(this.json.buffers);try{for(A.s();!(e=A.n()).done;){delete e.value.type}}catch(n){A.e(n)}finally{A.f()}}}]),t}();function Zi(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(new Vi).normalize(t,e)}function Wi(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Ki(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Wi(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Wi(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var Pi={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},qi={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Xi={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},zi={magFilter:Xi.TEXTURE_MAG_FILTER,minFilter:Xi.TEXTURE_MIN_FILTER,wrapS:Xi.TEXTURE_WRAP_S,wrapT:Xi.TEXTURE_WRAP_T},$i=(ji={},Object(At.a)(ji,Xi.TEXTURE_MAG_FILTER,Xi.LINEAR),Object(At.a)(ji,Xi.TEXTURE_MIN_FILTER,Xi.NEAREST_MIPMAP_LINEAR),Object(At.a)(ji,Xi.TEXTURE_WRAP_S,Xi.REPEAT),Object(At.a)(ji,Xi.TEXTURE_WRAP_,Xi.REPEAT),ji);var to=function(){function t(){Object(a.a)(this,t)}return Object(l.a)(t,[{key:"postProcess",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=t.json,n=t.buffers,r=void 0===n?[]:n,i=t.images,o=void 0===i?[]:i,a=t.baseUri,s=void 0===a?"":a;return Jr(A),this.baseUri=s,this.json=A,this.buffers=r,this.images=o,this._resolveTree(this.json,e),this.json}},{key:"_resolveTree",value:function(t){var e=this;arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.bufferViews&&(t.bufferViews=t.bufferViews.map((function(t,A){return e._resolveBufferView(t,A)}))),t.images&&(t.images=t.images.map((function(t,A){return e._resolveImage(t,A)}))),t.samplers&&(t.samplers=t.samplers.map((function(t,A){return e._resolveSampler(t,A)}))),t.textures&&(t.textures=t.textures.map((function(t,A){return e._resolveTexture(t,A)}))),t.accessors&&(t.accessors=t.accessors.map((function(t,A){return e._resolveAccessor(t,A)}))),t.materials&&(t.materials=t.materials.map((function(t,A){return e._resolveMaterial(t,A)}))),t.meshes&&(t.meshes=t.meshes.map((function(t,A){return e._resolveMesh(t,A)}))),t.nodes&&(t.nodes=t.nodes.map((function(t,A){return e._resolveNode(t,A)}))),t.skins&&(t.skins=t.skins.map((function(t,A){return e._resolveSkin(t,A)}))),t.scenes&&(t.scenes=t.scenes.map((function(t,A){return e._resolveScene(t,A)}))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}},{key:"getScene",value:function(t){return this._get("scenes",t)}},{key:"getNode",value:function(t){return this._get("nodes",t)}},{key:"getSkin",value:function(t){return this._get("skins",t)}},{key:"getMesh",value:function(t){return this._get("meshes",t)}},{key:"getMaterial",value:function(t){return this._get("materials",t)}},{key:"getAccessor",value:function(t){return this._get("accessors",t)}},{key:"getCamera",value:function(t){return null}},{key:"getTexture",value:function(t){return this._get("textures",t)}},{key:"getSampler",value:function(t){return this._get("samplers",t)}},{key:"getImage",value:function(t){return this._get("images",t)}},{key:"getBufferView",value:function(t){return this._get("bufferViews",t)}},{key:"getBuffer",value:function(t){return this._get("buffers",t)}},{key:"_get",value:function(t,e){if("object"===Object(j.a)(e))return e;var A=this.json[t]&&this.json[t][e];return A||console.warn("glTF file error: Could not find ".concat(t,"[").concat(e,"]")),A}},{key:"_resolveScene",value:function(t,e){var A=this;return t.id=t.id||"scene-".concat(e),t.nodes=(t.nodes||[]).map((function(t){return A.getNode(t)})),t}},{key:"_resolveNode",value:function(t,e){var A=this;return t.id=t.id||"node-".concat(e),t.children&&(t.children=t.children.map((function(t){return A.getNode(t)}))),void 0!==t.mesh&&(t.mesh=this.getMesh(t.mesh)),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}},{key:"_resolveSkin",value:function(t,e){return t.id=t.id||"skin-".concat(e),t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}},{key:"_resolveMesh",value:function(t,e){var A=this;return t.id=t.id||"mesh-".concat(e),t.primitives&&(t.primitives=t.primitives.map((function(t){var e=(t=Ki({},t)).attributes;for(var n in t.attributes={},e)t.attributes[n]=A.getAccessor(e[n]);return void 0!==t.indices&&(t.indices=A.getAccessor(t.indices)),void 0!==t.material&&(t.material=A.getMaterial(t.material)),t}))),t}},{key:"_resolveMaterial",value:function(t,e){if(t.id=t.id||"material-".concat(e),t.normalTexture&&(t.normalTexture=Ki({},t.normalTexture),t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture=Ki({},t.occlustionTexture),t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture=Ki({},t.emmisiveTexture),t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.pbrMetallicRoughness){t.pbrMetallicRoughness=Ki({},t.pbrMetallicRoughness);var A=t.pbrMetallicRoughness;A.baseColorTexture&&(A.baseColorTexture=Ki({},A.baseColorTexture),A.baseColorTexture.texture=this.getTexture(A.baseColorTexture.index)),A.metallicRoughnessTexture&&(A.metallicRoughnessTexture=Ki({},A.metallicRoughnessTexture),A.metallicRoughnessTexture.texture=this.getTexture(A.metallicRoughnessTexture.index))}return t}},{key:"_resolveAccessor",value:function(t,e){var A,n;if(t.id=t.id||"accessor-".concat(e),void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(A=t.componentType,qi[A]),t.components=(n=t.type,Pi[n]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){var r=t.bufferView.buffer,i=qr(t,t.bufferView),o=i.ArrayType,a=i.length,s=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+r.byteOffset;t.value=new o(r.arrayBuffer,s,a)}return t}},{key:"_resolveTexture",value:function(t,e){return t.id=t.id||"texture-".concat(e),t.sampler="sampler"in t?this.getSampler(t.sampler):$i,t.source=this.getImage(t.source),t}},{key:"_resolveSampler",value:function(t,e){for(var A in t.id=t.id||"sampler-".concat(e),t.parameters={},t){var n=this._enumSamplerParameter(A);void 0!==n&&(t.parameters[n]=t[A])}return t}},{key:"_enumSamplerParameter",value:function(t){return zi[t]}},{key:"_resolveImage",value:function(t,e){t.id=t.id||"image-".concat(e),void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));var A=this.images[e];return A&&(t.image=A),t}},{key:"_resolveBufferView",value:function(t,e){t.id=t.id||"bufferView-".concat(e);var A=t.buffer;t.buffer=this.buffers[A];var n=this.buffers[A].arrayBuffer,r=this.buffers[A].byteOffset||0;return"byteOffset"in t&&(r+=t.byteOffset),t.data=new Uint8Array(n,r,t.byteLength),t}},{key:"_resolveCamera",value:function(t,e){return t.id=t.id||"camera-".concat(e),t.perspective,t.orthographic,t}}]),t}();function eo(t,e){return(new to).postProcess(t,e)}function Ao(t,e){return no.apply(this,arguments)}function no(){return(no=Object(nt.a)(et.a.mark((function t(e,A){var n,r,i,o,a,s,g=arguments;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=g.length>2&&void 0!==g[2]?g[2]:0,r=g.length>3?g[3]:void 0,i=g.length>4?g[4]:void 0,ro(e,A,n,r),Zi(e,{normalize:r.gltf.normalize}),o=[],!r.gltf.loadBuffers||!e.json.buffers){t.next=9;break}return t.next=9,io(e,r,i);case 9:return r.gltf.loadImages&&(a=ao(e,r,i),o.push(a)),s=Ri(e,r,i),o.push(s),t.next=14,Promise.all(o);case 14:return t.abrupt("return",r.gltf.postProcess?eo(e,r):e);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ro(t,e,A,n){(n.uri&&(t.baseUri=n.uri),e instanceof ArrayBuffer&&!Ni(e,A,n))&&(e=(new TextDecoder).decode(e));if("string"===typeof e)t.json=Object(Lr.a)(e);else if(e instanceof ArrayBuffer){var r={};A=function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],new DataView(e));t.type=Gi(n,A+0),t.version=n.getUint32(A+4,!0);var r=n.getUint32(A+8,!0);switch(t.header={byteOffset:A,byteLength:r},t.json={},t.binChunks=[],A+=12,t.version){case 1:return ki(t,n,A,{});case 2:return xi(t,n,A,{});default:throw new Error("Invalid GLB version ".concat(t.version,". Only supports v1 and v2."))}}(r,e,A,n),Jr("glTF"===r.type,"Invalid GLB magic string ".concat(r.type)),t._glb=r,t.json=r.json}else Jr(!1,"GLTF: must be ArrayBuffer or string");var i=t.json.buffers||[];if(t.buffers=new Array(i.length).fill(null),t._glb&&t._glb.header.hasBinChunk){var o=t._glb.binChunks;t.buffers[0]={arrayBuffer:o[0].arrayBuffer,byteOffset:o[0].byteOffset,byteLength:o[0].byteLength}}var a=t.json.images||[];t.images=new Array(a.length).fill({})}function io(t,e,A){return oo.apply(this,arguments)}function oo(){return(oo=Object(nt.a)(et.a.mark((function t(e,A,n){var r,i,o,a,s,g;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0;case 1:if(!(r<e.json.buffers.length)){t.next=18;break}if(!(i=e.json.buffers[r]).uri){t.next=15;break}return Jr(o=n.fetch),a=Tr(i.uri,A),t.next=9,o(a);case 9:return s=t.sent,t.next=12,s.arrayBuffer();case 12:g=t.sent,e.buffers[r]={arrayBuffer:g,byteOffset:0,byteLength:g.byteLength},delete i.uri;case 15:++r,t.next=1;break;case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ao(t,e,A){return so.apply(this,arguments)}function so(){return(so=Object(nt.a)(et.a.mark((function t(e,A,n){var r,i,o;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=e.json.images||[],i=[],o=0;o<r.length;++o)i.push(go(e,r[o],o,A,n));return t.next=5,Promise.all(i);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function go(t,e,A,n,r){return co.apply(this,arguments)}function co(){return(co=Object(nt.a)(et.a.mark((function t(e,A,n,r,i){var o,a,s,g,c,I,u;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=i.fetch,a=i.parse,!A.uri){t.next=9;break}return g=Tr(A.uri,r),t.next=5,o(g);case 5:return c=t.sent,t.next=8,c.arrayBuffer();case 8:s=t.sent;case 9:return Number.isFinite(A.bufferView)&&(I=jr(e.json,e.buffers,A.bufferView),s=Object(_r.b)(I.buffer,I.byteOffset,I.byteLength)),Jr(s,"glTF image has no data"),t.next=13,a(s,Mr,{},i);case 13:u=t.sent,e.images[n]=u;case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Io(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function uo(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Io(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Io(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var lo={id:"gltf",name:"glTF",version:"2.3.13",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:function(t){return ho.apply(this,arguments)},options:{gltf:{normalize:!1,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},baseUri:"",log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}},Co=lo;function ho(){return(ho=Object(nt.a)(et.a.mark((function t(e){var A,n,r,i,o,a=arguments;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2?a[2]:void 0,(A=uo(uo({},lo.options),A)).gltf=uo(uo({},lo.options.gltf),A.gltf),Bo(A),r=A.byteOffset,i=void 0===r?0:r,o={},t.next=9,Ao(o,e,i,A,n);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Bo(t){"fetchImages"in t&&(t.gltf.loadImages=t.fetchImages),"createImages"in t&&(t.gltf.loadImages=t.createImages),"fetchLinkedResources"in t&&(t.gltf.fetchBuffers=t.fetchLinkedResources),"decompress"in t&&(t.gltf.decompressMeshes=t.decompress),"decompress"in t.gltf&&(t.gltf.decompressMeshes=t.gltf.decompress),"postProcess"in t&&(t.gltf.postProcess=t.postProcess)}var fo=0,Qo=1;function Eo(t,e,A,n){t.rotateYtoZ=!0;var r=t.byteOffset+t.byteLength-A;if(0===r)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=Object(_r.b)(e,A,r),t.gltfByteOffset=0,t.gltfByteLength=r,A%4===0||console.warn("".concat(t.type,": embedded glb is not aligned to a 4-byte boundary.")),t.byteOffset+t.byteLength}function po(t,e,A,n){return yo.apply(this,arguments)}function yo(){return(yo=Object(nt.a)(et.a.mark((function t(e,A,n,r){var i,o,a;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=n["3d-tiles"]||{},vo(e,A,n),!i.loadGLTF){t.next=16;break}if(o=r.parse,a=r.fetch,!e.gltfUrl){t.next=9;break}return t.next=7,a(e.gltfUrl,n);case 7:e.gltfArrayBuffer=t.sent,e.gltfByteOffset=0;case 9:if(!e.gltfArrayBuffer){t.next=16;break}return t.next=12,o(e.gltfArrayBuffer,Co,n,r);case 12:e.gltf=t.sent,delete e.gltfArrayBuffer,delete e.gltfByteOffset,delete e.gltfByteLength;case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function vo(t,e,A){switch(e){case fo:var n=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),r=(new TextDecoder).decode(n);t.gltfUrl=r.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case Qo:break;default:throw new Error("b3dm: Illegal glTF format field")}}function mo(t,e,A,n,r){return bo.apply(this,arguments)}function bo(){return(bo=Object(nt.a)(et.a.mark((function t(e,A,n,r,i){var o,a;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Fo(e,A,n,r,i),t.next=3,po(e,Qo,r,i);case 3:return o=e.gltf||{},(a=o.extensions)&&a.CESIUM_RTC&&(e.rtcCenter=a.CESIUM_RTC.center),t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Fo(t,e,A,n,r){A=Eo(t,e,A=On(t,e,A=xn(t,e,A=kn(t,e,A))),n);var i=new pn(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=i.getGlobalProperty("RTC_CENTER",fn.FLOAT,3),A}var wo=A(493);function So(t,e,A,n,r){return Do.apply(this,arguments)}function Do(){return(Do=Object(nt.a)(et.a.mark((function t(e,A,n,r,i){return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Ro(e,A,n,r,i),t.next=3,po(e,e.gltfFormat,r,i);case 3:return t.abrupt("return",n);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Ro(t,e,A,n,r){if(A=kn(t,e,A),1!==t.version)throw new Error("Instanced 3D Model version ".concat(t.version," is not supported"));A=xn(t,e,A);var i=new DataView(e);if(t.gltfFormat=i.getUint32(A,!0),A=Eo(t,e,A=On(t,e,A+=4),n),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");var o=new pn(t.featureTableJson,t.featureTableBinary),a=o.getGlobalProperty("INSTANCES_LENGTH");if(o.featuresLength=a,!Number.isFinite(a))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");t.eastNorthUp=o.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=o.getGlobalProperty("RTC_CENTER",fn.FLOAT,3);new Nn(t.batchTableJson,t.batchTableBinary,a);return function(t,e,A,n){for(var r=[new Array(n),t._batchTable][0],i=new ut.a,o=(new ut.a,new ut.a,new ut.a,new AA.a),a=new wo.a,s=new ut.a,g={},c=new It.a,I=[],u=[],l=new ut.a,C=new ut.a,h=0;h<n;h++){var B=void 0;if(e.hasProperty("POSITION"))B=e.getProperty("POSITION",fn.FLOAT,3,h,i);else if(e.hasProperty("POSITION_QUANTIZED")){B=e.getProperty("POSITION_QUANTIZED",fn.UNSIGNED_SHORT,3,h,i);var f=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",fn.FLOAT,3,l);if(!f)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var d=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",fn.FLOAT,3,C);if(!d)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var Q=0;Q<3;Q++)B[Q]=B[Q]/65535*d[Q]+f[Q]}if(!B)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");i.copy(B),g.translation=i,t.normalUp=e.getProperty("NORMAL_UP",fn.FLOAT,3,h,I),t.normalRight=e.getProperty("NORMAL_RIGHT",fn.FLOAT,3,h,u);if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",fn.UNSIGNED_SHORT,2,I),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",fn.UNSIGNED_SHORT,2,u),t.octNormalUp){if(!t.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")}t.eastNorthUp?(be.WGS84.eastNorthUpToFixedFrame(i,c),c.getRotationMatrix3(o)):o.identity()}!1,a.fromMatrix3(o),g.rotation=a,s.set(1,1,1);var E=e.getProperty("SCALE",fn.FLOAT,1,h);Number.isFinite(E)&&s.multiplyByScalar(E);var p=e.getProperty("SCALE_NON_UNIFORM",fn.FLOAT,3,h,I);p&&s.scale(p),g.scale=s;var y=e.getProperty("BATCH_ID",fn.UNSIGNED_SHORT,1,h);void 0===y&&(y=h);var v=(new It.a).fromQuaternion(g.rotation);c.identity(),c.translate(g.translation),c.multiplyRight(v),c.scale(g.scale);var m=c.clone();r[h]={modelMatrix:m,batchId:y}}t.instances=r}(t,o,0,a),A}function Uo(t,e,A,n,r,i){return Go.apply(this,arguments)}function Go(){return(Go=Object(nt.a)(et.a.mark((function t(e,A,n,r,i,o){var a,s;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=kn(e,A,n),a=new DataView(A),e.tilesLength=a.getUint32(n,!0),n+=4,e.tiles=[];case 5:if(!(e.tiles.length<e.tilesLength&&e.byteLength-n>12)){t.next=13;break}return s={},e.tiles.push(s),t.next=10,o(A,n,r,i,s);case 10:n=t.sent,t.next=5;break;case 13:return t.abrupt("return",n);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function No(t){return ko.apply(this,arguments)}function ko(){return(ko=Object(nt.a)(et.a.mark((function t(e){var A,n,r,i,o=arguments;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=o.length>1&&void 0!==o[1]?o[1]:0,n=o.length>2?o[2]:void 0,r=o.length>3?o[3]:void 0,(i=o.length>4&&void 0!==o[4]?o[4]:{}).byteOffset=A,i.type=VA(e,A),t.t0=i.type,t.next=t.t0===HA.COMPOSITE?9:t.t0===HA.BATCHED_3D_MODEL?12:t.t0===HA.INSTANCED_3D_MODEL?15:t.t0===HA.POINT_CLOUD?18:21;break;case 9:return t.next=11,Uo(i,e,A,n,r,No);case 11:return t.abrupt("return",t.sent);case 12:return t.next=14,mo(i,e,A,n,r);case 14:return t.abrupt("return",t.sent);case 15:return t.next=17,So(i,e,A,n,r);case 17:return t.abrupt("return",t.sent);case 18:return t.next=20,Pn(i,e,A,n,r);case 20:return t.abrupt("return",t.sent);case 21:throw new Error("3DTileLoader: unknown type ".concat(i.type));case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function xo(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Oo(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Oo(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Oo(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Mo(t,e){if(t.content){var A=t.content.uri||t.content.url;t.contentUrl="".concat(e.basePath,"/").concat(A)}return t.id=t.contentUrl,t.lodMetricType=$e,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=function(t){if(!t.contentUrl)return We;var e=t.contentUrl.split(".").pop();switch(e){case"pnts":return Pe;case"i3dm":case"b3dm":return Ke;default:return e}}(t),t.refine=function(t){switch(t){case"REPLACE":case"replace":return Ze;case"ADD":case"add":return Ve;default:return t}}(t.refine),t}function Lo(t){var e=t.basePath,A=Mo(t.root,t),n=[];for(n.push(A);n.length>0;){var r,i=xo(n.pop().children||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;Mo(o,{basePath:e}),n.push(o)}}catch(a){i.e(a)}finally{i.f()}}return A}function _o(t){return Se.a.dirname(t.url)}function Jo(t,e,A){return To.apply(this,arguments)}function To(){return(To=Object(nt.a)(et.a.mark((function t(e,A,n){var r;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r={}).content=r.content||{},0,t.next=5,No(e,0,A,n,r.content);case 5:return t.abrupt("return",r.content);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function jo(t,e,A){return Ho.apply(this,arguments)}function Ho(){return(Ho=Object(nt.a)(et.a.mark((function t(e,A,n){var r;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=JSON.parse((new TextDecoder).decode(e))).loader=A.loader||Vo,r.url=n.url,r.basePath=_o(r),r.root=Lo(r),r.type=ze,r.lodMetricType=$e,r.lodMetricValue=r.root.lodMetricValue,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Yo(){return(Yo=Object(nt.a)(et.a.mark((function t(e,A,n,r){var i;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=A["3d-tiles"]||{},!("auto"===i.isTileset?n.url&&-1!==n.url.indexOf(".json"):i.isTileset)){t.next=8;break}return t.next=5,jo(e,A,n);case 5:e=t.sent,t.next=11;break;case 8:return t.next=10,Jo(e,A,n);case 10:e=t.sent;case 11:return t.abrupt("return",e);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Vo={id:"3d-tiles",name:"3D Tiles",version:"2.3.13",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:function(t,e,A,n){return Yo.apply(this,arguments)},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",tile:null,tileset:null,assetGltfUpAxis:null}}};function Zo(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Wo(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Zo(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Zo(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Ko(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var Po=[0],qo={getPointColor:{type:"accessor",value:[0,0,0,255]},pointSize:1,data:null,loader:Vo,onTilesetLoad:{type:"function",value:function(t){},compare:!1},onTileLoad:{type:"function",value:function(t){},compare:!1},onTileUnload:{type:"function",value:function(t){},compare:!1},onTileError:{type:"function",value:function(t,e,A){},compare:!1}},Xo=function(t){Object(s.a)(A,t);var e=Ko(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"initializeState",value:function(){"onTileLoadFail"in this.props&&gt.a.removed("onTileLoadFail","onTileError")(),this.state={layerMap:{},tileset3d:null}}},{key:"shouldUpdateState",value:function(t){return t.changeFlags.somethingChanged}},{key:"updateState",value:function(t){var e=t.props,A=t.oldProps,n=t.changeFlags;if(e.data&&e.data!==A.data&&this._loadTileset(e.data),n.viewportChanged){var r=this.state.tileset3d;this._updateTileset(r)}if(n.propsChanged){var i=this.state.layerMap;for(var o in i)i[o].needsUpdate=!0}}},{key:"getPickingInfo",value:function(t){var e=t.info,A=t.sourceLayer,n=this.state.layerMap,r=A&&A.id;if(r){var i=r.substring(this.id.length+1),o=i.substring(i.indexOf("-")+1);e.object=n[o]&&n[o].tile}return e}},{key:"_loadTileset",value:function(){var t=Object(nt.a)(et.a.mark((function t(e){var A,n,r,i,o,a;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=this.props.loadOptions,n=this.props.loader||this.props.loaders,Array.isArray(n)&&(n=n[0]),r=Wo({},A),!n.preload){t.next=9;break}return t.next=7,n.preload(e,A);case 7:i=t.sent,Object.assign(r,i);case 9:return t.next=11,Object(ct.a)(e,n,r);case 11:o=t.sent,a=new jA(o,Wo({onTileLoad:this._onTileLoad.bind(this),onTileUnload:this._onTileUnload.bind(this),onTileLoadFail:this.props.onTileError},r)),this.setState({tileset3d:a,layerMap:{}}),this._updateTileset(a),this.props.onTilesetLoad(a);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_onTileLoad",value:function(t){this.props.onTileLoad(t),this._updateTileset(this.state.tileset3d),this.setNeedsUpdate()}},{key:"_onTileUnload",value:function(t){delete this.state.layerMap[t.id],this.props.onTileUnload(t)}},{key:"_updateTileset",value:function(t){var e=this.context,A=e.timeline,n=e.viewport;if(A&&n&&t){var r=t.update(n);this.state.frameNumber!==r&&this.setState({frameNumber:r})}}},{key:"_getSubLayer",value:function(t,e){if(!t.content)return null;switch(t.type){case Pe:return this._makePointCloudLayer(t,e);case Ke:return this._make3DModelLayer(t,e);case qe:return this._makeSimpleMeshLayer(t,e);default:throw new Error("Tile3DLayer: Failed to render layer of type ".concat(t.content.type))}}},{key:"_makePointCloudLayer",value:function(t,e){var A=t.content,n=A.attributes,r=A.pointCount,i=A.constantRGBA,o=A.cartographicOrigin,a=A.modelMatrix,s=n.positions,g=n.normals,c=n.colors;if(!s)return null;var I=e&&e.props.data||{header:{vertexCount:r},attributes:{POSITION:s,NORMAL:g,COLOR_0:c}},u=this.props,l=u.pointSize,C=u.getPointColor;return new(this.getSubLayerClass("pointcloud",ot.a))({pointSize:l},this.getSubLayerProps({id:"pointcloud"}),{id:"".concat(this.id,"-pointcloud-").concat(t.id),data:I,coordinateSystem:it.a.METER_OFFSETS,coordinateOrigin:o,modelMatrix:a,getColor:i||C})}},{key:"_make3DModelLayer",value:function(t){var e=t.content,A=e.gltf,n=e.instances,r=e.cartographicOrigin,i=e.modelMatrix;return new(this.getSubLayerClass("scenegraph",at.a))({_lighting:"pbr"},this.getSubLayerProps({id:"scenegraph"}),{id:"".concat(this.id,"-scenegraph-").concat(t.id),data:n||Po,scenegraph:A,coordinateSystem:it.a.METER_OFFSETS,coordinateOrigin:r,modelMatrix:i,getTransformMatrix:function(t){return t.modelMatrix},getPosition:[0,0,0]})}},{key:"_makeSimpleMeshLayer",value:function(t,e){var A=t.content,n=A.attributes,r=A.modelMatrix,i=A.cartographicOrigin,o=A.texture,a=e&&e.props.mesh||new rt.a({drawMode:4,attributes:zo(n)});return new(this.getSubLayerClass("mesh",st.a))(this.getSubLayerProps({id:"mesh"}),{id:"".concat(this.id,"-mesh-").concat(t.id),mesh:a,data:Po,getPosition:[0,0,0],getColor:[255,255,255],texture:o,modelMatrix:r,coordinateOrigin:i,coordinateSystem:it.a.METER_OFFSETS})}},{key:"renderLayers",value:function(){var t=this,e=this.state,A=e.tileset3d,n=e.layerMap;return A?A.tiles.map((function(e){var A=n[e.id]=n[e.id]||{tile:e},r=A.layer;return e.selected?r?A.needsUpdate?(r=t._getSubLayer(e,r),A.needsUpdate=!1):r.props.visible||(r=r.clone({visible:!0})):r=t._getSubLayer(e):r&&r.props.visible&&(r=r.clone({visible:!1})),A.layer=r,r})).filter(Boolean):null}},{key:"isLoaded",get:function(){var t=this.state.tileset3d;return t&&t.isLoaded()}}]),A}(C.a);function zo(t){var e={};return e.positions=Wo(Wo({},t.positions),{},{value:new Float32Array(t.positions.value)}),t.normals&&(e.normals=t.normals),t.texCoords&&(e.texCoords=t.texCoords),e}Xo.layerName="Tile3DLayer",Xo.defaultProps=qo;var $o=A(277),ta=A(9),ea=A(15),Aa=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:257;Object(ta.a)(this,t),this.gridSize=e;var A=e-1;if(A&A-1)throw new Error("Expected grid size to be 2^n+1, got ".concat(e,"."));this.numTriangles=A*A*2-2,this.numParentTriangles=this.numTriangles-A*A,this.indices=new Uint32Array(this.gridSize*this.gridSize),this.coords=new Uint16Array(4*this.numTriangles);for(var n=0;n<this.numTriangles;n++){var r=n+2,i=0,o=0,a=0,s=0,g=0,c=0;for(1&r?a=s=g=A:i=o=c=A;(r>>=1)>1;){var I=i+a>>1,u=o+s>>1;1&r?(a=i,s=o,i=g,o=c):(i=a,o=s,a=g,s=c),g=I,c=u}var l=4*n;this.coords[l+0]=i,this.coords[l+1]=o,this.coords[l+2]=a,this.coords[l+3]=s}}return Object(ea.a)(t,[{key:"createTile",value:function(t){return new na(t,this)}}]),t}(),na=function(){function t(e,A){Object(ta.a)(this,t);var n=A.gridSize;if(e.length!==n*n)throw new Error("Expected terrain data of length ".concat(n*n," (").concat(n," x ").concat(n,"), got ").concat(e.length,"."));this.terrain=e,this.martini=A,this.errors=new Float32Array(e.length),this.update()}return Object(ea.a)(t,[{key:"update",value:function(){for(var t=this.martini,e=t.numTriangles,A=t.numParentTriangles,n=t.coords,r=t.gridSize,i=this.terrain,o=this.errors,a=e-1;a>=0;a--){var s=4*a,g=n[s+0],c=n[s+1],I=n[s+2],u=n[s+3],l=g+I>>1,C=c+u>>1,h=l+C-c,B=C+g-l,f=(i[c*r+g]+i[u*r+I])/2,d=C*r+l,Q=Math.abs(f-i[d]);if(o[d]=Math.max(o[d],Q),a<A){var E=(c+B>>1)*r+(g+h>>1),p=(u+B>>1)*r+(I+h>>1);o[d]=Math.max(o[d],o[E],o[p])}}}},{key:"getMesh",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.martini,A=e.gridSize,n=e.indices,r=this.errors,i=0,o=0,a=A-1;function s(e,a,g,c,I,u){var l=e+g>>1,C=a+c>>1;Math.abs(e-I)+Math.abs(a-u)>1&&r[C*A+l]>t?(s(I,u,e,a,l,C),s(g,c,I,u,l,C)):(n[a*A+e]=n[a*A+e]||++i,n[c*A+g]=n[c*A+g]||++i,n[u*A+I]=n[u*A+I]||++i,o++)}n.fill(0),s(0,0,a,a,a,0),s(a,a,0,0,0,a);var g=new Uint16Array(2*i),c=new Uint32Array(3*o),I=0;function u(e,i,o,a,s,l){var C=e+o>>1,h=i+a>>1;if(Math.abs(e-s)+Math.abs(i-l)>1&&r[h*A+C]>t)u(s,l,e,i,C,h),u(o,a,s,l,C,h);else{var B=n[i*A+e]-1,f=n[a*A+o]-1,d=n[l*A+s]-1;g[2*B]=e,g[2*B+1]=i,g[2*f]=o,g[2*f+1]=a,g[2*d]=s,g[2*d+1]=l,c[I++]=B,c[I++]=f,c[I++]=d}}return u(0,0,a,a,a,0),u(a,a,0,0,0,a),{vertices:g,triangles:c}}}]),t}();function ra(t){if(!t||!t.POSITION)return null;var e=1/0,A=1/0,n=1/0,r=-1/0,i=-1/0,o=-1/0,a=t.POSITION.value,s=a&&a.length;if(!s)return null;for(var g=0;g<s;g+=3){var c=a[g],I=a[g+1],u=a[g+2];e=c<e?c:e,A=I<A?I:A,n=u<n?u:n,r=c>r?c:r,i=I>i?I:i,o=u>o?u:o}return[[e,A,n],[r,i,o]]}function ia(t,e){if(null===t)return null;var A=e.meshMaxError,n=e.bounds,r=e.elevationDecoder,i=t.data,o=t.width,a=o+1,s=function(t,e,A){for(var n=A.rScaler,r=A.bScaler,i=A.gScaler,o=A.offset,a=e+1,s=new Float32Array(a*a),g=0,c=0;c<e;c++)for(var I=0;I<e;I++,g++){var u=4*g,l=t[u+0],C=t[u+1],h=t[u+2];s[g+c]=l*n+C*i+h*r+o}for(var B=a*(a-1),f=0;f<a-1;f++,B++)s[B]=s[B-a];for(var d=a-1,Q=0;Q<a;Q++,d+=a)s[d]=s[d-1];return s}(i,o,r),g=new Aa(a).createTile(s).getMesh(A),c=g.vertices,I=g.triangles,u=function(t,e,A,n){for(var r=A+1,i=t.length/2,o=new Float32Array(3*i),a=new Float32Array(2*i),s=n||[0,0,A,A],g=Object(B.a)(s,4),c=g[0],I=g[1],u=g[2],l=g[3],C=(u-c)/A,h=(l-I)/A,f=0;f<i;f++){var d=t[2*f],Q=t[2*f+1],E=Q*r+d;o[3*f+0]=d*C+c,o[3*f+1]=-Q*h+l,o[3*f+2]=e[E],a[2*f+0]=d/A,a[2*f+1]=Q/A}return{POSITION:{value:o,size:3},TEXCOORD_0:{value:a,size:2}}}(c,s,o,n);return{loaderData:{header:{}},header:{vertexCount:I.length,boundingBox:ra(u)},mode:4,indices:{value:I,size:1},attributes:u}}function oa(){return(oa=Object(nt.a)(et.a.mark((function t(e,A,n){var r;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A.image=A.image||{},A.image.type="data",t.next=4,n.parse(e,A,A.baseUri);case 4:return r=t.sent,t.abrupt("return",ia(r,A.terrain));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function aa(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function sa(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?aa(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):aa(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var ga=sa(sa({},{id:"terrain",name:"Terrain",version:"2.3.13",extensions:["png","pngraw"],mimeTypes:["image/png"],options:{terrain:{bounds:null,workerUrl:"https://unpkg.com/@loaders.gl/terrain@".concat("2.3.13","/dist/terrain-loader.worker.js"),meshMaxError:10,elevationDecoder:{rScaler:1,gScaler:0,bScaler:0,offset:0}}}}),{},{parse:function(t,e,A){return oa.apply(this,arguments)}}),ca=A(156);function Ia(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}function ua(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function la(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?ua(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):ua(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var Ca=[1],ha=la(la({},U.a.defaultProps),{},{elevationData:ca.f,texture:ca.f,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,loaders:[ga]});function Ba(t){return Array.isArray(t)?t.join(";"):t}var fa=function(t){Object(s.a)(A,t);var e=Ia(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"updateState",value:function(t){var e=t.props,A=t.oldProps,n=e.elevationData!==A.elevationData;if(n){var r=e.elevationData,i=r&&(Array.isArray(r)||r.includes("{x}")&&r.includes("{y}"));this.setState({isTiled:i})}var o=n||e.meshMaxError!==A.meshMaxError||e.elevationDecoder!==A.elevationDecoder||e.bounds!==A.bounds;if(!this.state.isTiled&&o){var a=this.loadTerrain(e);this.setState({terrain:a})}}},{key:"loadTerrain",value:function(t){var e=t.elevationData,A=t.bounds,n=t.elevationDecoder,r=t.meshMaxError,i=t.workerUrl;if(!e)return null;var o={terrain:{bounds:A,meshMaxError:r,elevationDecoder:n}};return null!==i&&(o.terrain.workerUrl=i),Object(ct.a)(e,this.props.loaders,o)}},{key:"getTiledTerrainData",value:function(t){var e=this.props,A=e.elevationData,n=e.texture,r=e.elevationDecoder,i=e.meshMaxError,o=e.workerUrl,a=Object(ca.b)(A,t),s=Object(ca.b)(n,t),g=t.bbox,c=t.z,I=new $o.a({longitude:(g.west+g.east)/2,latitude:(g.north+g.south)/2,zoom:c}),u=I.projectFlat([g.west,g.south]),l=I.projectFlat([g.east,g.north]),C=[u[0],u[1],l[0],l[1]],h=this.loadTerrain({elevationData:a,bounds:C,elevationDecoder:r,meshMaxError:i,workerUrl:o}),B=s?Object(ct.a)(s).catch((function(t){return null})):Promise.resolve(null);return Promise.all([h,B])}},{key:"renderSubLayers",value:function(t){var e=this.getSubLayerClass("mesh",st.a),A=t.data,n=t.color;if(!A)return null;var r=Object(B.a)(A,2),i=r[0],o=r[1];return new e(t,{data:Ca,mesh:i,texture:o,coordinateSystem:it.a.CARTESIAN,getPosition:function(t){return[0,0,0]},getColor:n})}},{key:"onViewportLoad",value:function(t){if(t){var e=this.state.zRange,A=t.map((function(t){return t.content})).filter(Boolean).map((function(t){return t[0].header.boundingBox.map((function(t){return t[2]}))}));if(0!==A.length){var n=Math.min.apply(Math,Object(Ct.a)(A.map((function(t){return t[0]})))),r=Math.max.apply(Math,Object(Ct.a)(A.map((function(t){return t[1]}))));(!e||n<e[0]||r>e[1])&&this.setState({zRange:[n,r]})}}}},{key:"renderLayers",value:function(){var t=this.props,e=t.color,A=t.material,n=t.elevationData,r=t.texture,i=t.wireframe,o=t.meshMaxError,a=t.elevationDecoder,s=t.tileSize,g=t.maxZoom,c=t.minZoom,I=t.extent,u=t.maxRequests;return this.state.isTiled?new U.a(this.getSubLayerProps({id:"tiles"}),{wireframe:i,color:e,material:A,getTileData:this.getTiledTerrainData.bind(this),renderSubLayers:this.renderSubLayers.bind(this),updateTriggers:{getTileData:{elevationData:Ba(n),texture:Ba(r),meshMaxError:o,elevationDecoder:a}},onViewportLoad:this.onViewportLoad.bind(this),zRange:this.state.zRange||null,tileSize:s,maxZoom:g,minZoom:c,extent:I,maxRequests:u}):new(this.getSubLayerClass("mesh",st.a))(this.getSubLayerProps({id:"mesh"}),{data:Ca,mesh:this.state.terrain,texture:r,_instanced:!1,getPosition:function(t){return[0,0,0]},getColor:e,material:A,wireframe:i})}}]),A}(C.a);fa.layerName="TerrainLayer",fa.defaultProps=ha;var da=A(873),Qa=A.n(da),Ea=function(){function t(e,A,n,r,i){Object(a.a)(this,t),this.properties={},this.extent=n,this.type=0,this._pbf=e,this._geometry=-1,this._keys=r,this._values=i,e.readFields(ya,this,A)}return Object(l.a)(t,null,[{key:"types",get:function(){return["Unknown","Point","LineString","Polygon"]}}]),Object(l.a)(t,[{key:"loadGeometry",value:function(){var t=this._pbf;t.pos=this._geometry;for(var e,A=t.readVarint()+t.pos,n=1,r=0,i=0,o=0,a=[];t.pos<A;){if(r<=0){var s=t.readVarint();n=7&s,r=s>>3}if(r--,1===n||2===n)i+=t.readSVarint(),o+=t.readSVarint(),1===n&&(e&&a.push(e),e=[]),e.push(new Qa.a(i,o));else{if(7!==n)throw new Error("unknown command ".concat(n));e&&e.push(e[0].clone())}}return e&&a.push(e),a}},{key:"bbox",value:function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,A=1,n=0,r=0,i=0,o=1/0,a=-1/0,s=1/0,g=-1/0;t.pos<e;){if(n<=0){var c=t.readVarint();A=7&c,n=c>>3}if(n--,1===A||2===A)(r+=t.readSVarint())<o&&(o=r),r>a&&(a=r),(i+=t.readSVarint())<s&&(s=i),i>g&&(g=i);else if(7!==A)throw new Error("unknown command ".concat(A))}return[o,s,a,g]}},{key:"toGeoJSON",value:function(e,A,n){var r,i,o=this.extent*Math.pow(2,n),a=this.extent*e,s=this.extent*A,g=this.loadGeometry(),c=t.types[this.type];function I(t){for(var e=0;e<t.length;e++){var A=t[e],n=180-360*(A.y+s)/o;t[e]=[360*(A.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90]}}switch(this.type){case 1:var u=[];for(r=0;r<g.length;r++)u[r]=g[r][0];I(g=u);break;case 2:for(r=0;r<g.length;r++)I(g[r]);break;case 3:for(g=function(t){var e=t.length;if(e<=1)return[t];for(var A,n,r=[],i=0;i<e;i++){var o=pa(t[i]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(A&&r.push(A),A=[t[i]]):A.push(t[i]))}A&&r.push(A);return r}(g),r=0;r<g.length;r++)for(i=0;i<g[r].length;i++)I(g[r][i])}return 1===g.length?g=g[0]:c="Multi".concat(c),{type:"Feature",geometry:{type:c,coordinates:g},properties:this.properties}}}]),t}();function pa(t){for(var e,A,n=0,r=0,i=t.length-1;r<t.length;i=r++)e=t[r],n+=((A=t[i]).x-e.x)*(e.y+A.y);return n}function ya(t,e,A){1===t?e.id=A.readVarint():2===t?function(t,e){var A=t.readVarint()+t.pos;for(;t.pos<A;){var n=e._keys[t.readVarint()],r=e._values[t.readVarint()];e.properties[n]=r}}(A,e):3===t?e.type=A.readVarint():4===t&&(e._geometry=A.pos)}var va=function(){function t(e,A){Object(a.a)(this,t),this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=e,this._keys=[],this._values=[],this._features=[],e.readFields(ma,this,A),this.length=this._features.length}return Object(l.a)(t,[{key:"feature",value:function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Ea(this._pbf,e,this.extent,this._keys,this._values)}}]),t}();function ma(t,e,A){15===t?e.version=A.readVarint():1===t?e.name=A.readString():5===t?e.extent=A.readVarint():2===t?e._features.push(A.pos):3===t?e._keys.push(A.readString()):4===t&&e._values.push(function(t){var e=null,A=t.readVarint()+t.pos;for(;t.pos<A;){var n=t.readVarint()>>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(A))}var ba=function t(e,A){Object(a.a)(this,t),this.layers=e.readFields(Fa,{},A)};function Fa(t,e,A){if(3===t){var n=new va(A,A.readVarint()+A.pos);n.length&&(e[n.name]=n)}}function wa(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Sa(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Sa(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Sa(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Da(t){var e,A,n=0,r=0,i=0,o=0,a=0,s=0,g=0,c=0,I=0,u=new Set,l={},C=wa(t);try{for(C.s();!(e=C.n()).done;){var h=e.value,B=h.geometry;switch(B.type){case"Point":r++,n++,u.add(B.coordinates.length);break;case"MultiPoint":r++,n+=B.coordinates.length;var f,d=wa(B.coordinates);try{for(d.s();!(f=d.n()).done;){var Q=f.value;u.add(Q.length)}}catch(J){d.e(J)}finally{d.f()}break;case"LineString":a++,i+=B.coordinates.length,o++;var E,p=wa(B.coordinates);try{for(p.s();!(E=p.n()).done;){var y=E.value;u.add(y.length)}}catch(J){p.e(J)}finally{p.f()}break;case"MultiLineString":a++;var v,m=wa(B.coordinates);try{for(m.s();!(v=m.n()).done;){var b=v.value;i+=b.length,o++;var F,w=wa(b);try{for(w.s();!(F=w.n()).done;){var S=F.value;u.add(S.length)}}catch(J){w.e(J)}finally{w.f()}}}catch(J){m.e(J)}finally{m.f()}break;case"Polygon":I++,g++,c+=B.coordinates.length,s+=Ta(B.coordinates).length;var D,R=wa(Ta(B.coordinates));try{for(R.s();!(D=R.n()).done;){var U=D.value;u.add(U.length)}}catch(J){R.e(J)}finally{R.f()}break;case"MultiPolygon":I++;var G,N=wa(B.coordinates);try{for(N.s();!(G=N.n()).done;){var k=G.value;g++,c+=k.length,s+=Ta(k).length;var x,O=wa(Ta(k));try{for(O.s();!(x=O.n()).done;){var M=x.value;u.add(M.length)}}catch(J){O.e(J)}finally{O.f()}}}catch(J){N.e(J)}finally{N.f()}break;default:throw new Error("Unsupported geometry type: ".concat(B.type))}if(h.properties)for(var L in h.properties){var _=h.properties[L];l[L]=l[L]||void 0===l[L]?(A=_,Number.isFinite(A)):l[L]}}}catch(J){C.e(J)}finally{C.f()}return{pointPositionsCount:n,pointFeaturesCount:r,linePositionsCount:i,linePathsCount:o,lineFeaturesCount:a,coordLength:u.size>0&&Math.max.apply(Math,Object(Ct.a)(u)),polygonPositionsCount:s,polygonObjectsCount:g,polygonRingsCount:c,polygonFeaturesCount:I,numericPropKeys:Object.keys(l).filter((function(t){return l[t]}))}}function Ra(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e.pointPositionsCount,r=e.pointFeaturesCount,i=e.linePositionsCount,o=e.linePathsCount,a=e.lineFeaturesCount,s=e.polygonPositionsCount,g=e.polygonObjectsCount,c=e.polygonRingsCount,I=e.polygonFeaturesCount,u=A.coordLength,l=A.numericPropKeys,C=A.PositionDataType,h=void 0===C?Float32Array:C,B=t.length>65535?Uint32Array:Uint16Array,f={positions:new h(n*u),globalFeatureIds:new B(n),featureIds:r>65535?new Uint32Array(n):new Uint16Array(n),numericProps:{},properties:[]},d={pathIndices:i>65535?new Uint32Array(o+1):new Uint16Array(o+1),positions:new h(i*u),globalFeatureIds:new B(i),featureIds:a>65535?new Uint32Array(i):new Uint16Array(i),numericProps:{},properties:[]},Q={polygonIndices:s>65535?new Uint32Array(g+1):new Uint16Array(g+1),primitivePolygonIndices:s>65535?new Uint32Array(c+1):new Uint16Array(c+1),positions:new h(s*u),globalFeatureIds:new B(s),featureIds:I>65535?new Uint32Array(s):new Uint16Array(s),numericProps:{},properties:[]},E=0,p=[f,d,Q];E<p.length;E++){var y,v=p[E],m=wa(l);try{for(m.s();!(y=m.n()).done;){var b=y.value;v.numericProps[b]=new Float32Array(v.positions.length/u)}}catch(G){m.e(G)}finally{m.f()}}d.pathIndices[o]=i,Q.polygonIndices[g]=s,Q.primitivePolygonIndices[c]=s;var F,w={pointPosition:0,pointFeature:0,linePosition:0,linePath:0,lineFeature:0,polygonPosition:0,polygonObject:0,polygonRing:0,polygonFeature:0,feature:0},S=wa(t);try{for(S.s();!(F=S.n()).done;){var D=F.value,R=D.geometry,U=D.properties||{};switch(R.type){case"Point":Ua(R.coordinates,f,w,u,U),f.properties.push(_a(U,l)),w.pointFeature++;break;case"MultiPoint":Ga(R.coordinates,f,w,u,U),f.properties.push(_a(U,l)),w.pointFeature++;break;case"LineString":Na(R.coordinates,d,w,u,U),d.properties.push(_a(U,l)),w.lineFeature++;break;case"MultiLineString":ka(R.coordinates,d,w,u,U),d.properties.push(_a(U,l)),w.lineFeature++;break;case"Polygon":xa(R.coordinates,Q,w,u,U),Q.properties.push(_a(U,l)),w.polygonFeature++;break;case"MultiPolygon":Oa(R.coordinates,Q,w,u,U),Q.properties.push(_a(U,l)),w.polygonFeature++;break;default:throw new Error("Invalid geometry type")}w.feature++}}catch(G){S.e(G)}finally{S.f()}return Ma(f,d,Q,u)}function Ua(t,e,A,n,r){e.positions.set(t,A.pointPosition*n),e.globalFeatureIds[A.pointPosition]=A.feature,e.featureIds[A.pointPosition]=A.pointFeature,La(e,r,A.pointPosition,1),A.pointPosition++}function Ga(t,e,A,n,r){var i,o=wa(t);try{for(o.s();!(i=o.n()).done;){Ua(i.value,e,A,n,r)}}catch(a){o.e(a)}finally{o.f()}}function Na(t,e,A,n,r){e.pathIndices[A.linePath]=A.linePosition,A.linePath++,Ja(e.positions,t,A.linePosition,n);var i=t.length;La(e,r,A.linePosition,i),e.globalFeatureIds.set(new Uint32Array(i).fill(A.feature),A.linePosition),e.featureIds.set(new Uint32Array(i).fill(A.lineFeature),A.linePosition),A.linePosition+=i}function ka(t,e,A,n,r){var i,o=wa(t);try{for(o.s();!(i=o.n()).done;){Na(i.value,e,A,n,r)}}catch(a){o.e(a)}finally{o.f()}}function xa(t,e,A,n,r){e.polygonIndices[A.polygonObject]=A.polygonPosition,A.polygonObject++;var i,o=wa(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;e.primitivePolygonIndices[A.polygonRing]=A.polygonPosition,A.polygonRing++,Ja(e.positions,a,A.polygonPosition,n);var s=a.length;La(e,r,A.polygonPosition,s),e.globalFeatureIds.set(new Uint32Array(s).fill(A.feature),A.polygonPosition),e.featureIds.set(new Uint32Array(s).fill(A.polygonFeature),A.polygonPosition),A.polygonPosition+=s}}catch(g){o.e(g)}finally{o.f()}}function Oa(t,e,A,n,r){var i,o=wa(t);try{for(o.s();!(i=o.n()).done;){xa(i.value,e,A,n,r)}}catch(a){o.e(a)}finally{o.f()}}function Ma(t,e,A,n){var r={points:{positions:{value:t.positions,size:n},globalFeatureIds:{value:t.globalFeatureIds,size:1},featureIds:{value:t.featureIds,size:1},numericProps:t.numericProps,properties:t.properties},lines:{pathIndices:{value:e.pathIndices,size:1},positions:{value:e.positions,size:n},globalFeatureIds:{value:e.globalFeatureIds,size:1},featureIds:{value:e.featureIds,size:1},numericProps:e.numericProps,properties:e.properties},polygons:{polygonIndices:{value:A.polygonIndices,size:1},primitivePolygonIndices:{value:A.primitivePolygonIndices,size:1},positions:{value:A.positions,size:n},globalFeatureIds:{value:A.globalFeatureIds,size:1},featureIds:{value:A.featureIds,size:1},numericProps:A.numericProps,properties:A.properties}};for(var i in r)for(var o in r[i].numericProps)r[i].numericProps[o]={value:r[i].numericProps[o],size:1};return r}function La(t,e,A,n){for(var r in t.numericProps)r in e&&t.numericProps[r].set(new Array(n).fill(e[r]),A)}function _a(t,e){var A={};for(var n in t)e.includes(n)||(A[n]=t[n]);return A}function Ja(t,e,A,n){var r,i=A*n,o=wa(e);try{for(o.s();!(r=o.n()).done;){var a=r.value;t.set(a,i),i+=n}}catch(s){o.e(s)}finally{o.f()}}function Ta(t){var e;return(e=[]).concat.apply(e,Object(Ct.a)(t))}var ja=A(872),Ha=A.n(ja),Ya=["Unknown","Point","LineString","Polygon"];function Va(t,e){for(var A=0;A<t.length;A++){var n=t[A];t[A]=[n.x/e.extent,n.y/e.extent]}}function Za(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t,e){return t},A=Ya[t.type],n=t.loadGeometry();switch(t.type){case 1:for(var r=[],i=0;i<n.length;i++)r[i]=n[i][0];e(n=r,t);break;case 2:for(var o=0;o<n.length;o++)e(n[o],t);break;case 3:n=Ka(n);for(var a=0;a<n.length;a++)for(var s=0;s<n[a].length;s++)e(n[a][s],t)}return Wa(A,t,n)}function Wa(t,e,A){var n=t;1===A.length?A=A[0]:n="Multi".concat(t);var r={type:"Feature",geometry:{type:n,coordinates:A},properties:e.properties||{}};return"id"in e&&(r.id=e.id),r}function Ka(t){var e=t.length;if(e<=1)return[t];for(var A,n,r=[],i=0;i<e;i++){var o=Pa(t[i]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(A&&r.push(A),A=[t[i]]):A&&A.push(t[i]))}return A&&r.push(A),r}function Pa(t){for(var e,A,n=t.length,r=0,i=0,o=n-1;i<n;o=i++)e=t[i],r+=((A=t[o]).x-e.x)*(e.y+A.y);return r}function qa(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Xa(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?qa(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):qa(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function za(t,e){(e=e||{}).mvt=e.mvt||{},e.gis=e.gis||{};var A=[];if(t.byteLength>0){var n=new ba(new Ha.a(t)),r=e.mvt;(Array.isArray(r.layers)?r.layers:Object.keys(n.layers)).forEach((function(t){var e=n.layers[t],i=Xa(Xa({},r),{},{layerName:t});if(e)for(var o=0;o<e.length;o++){var a=$a(e.feature(o),i);A.push(a)}}))}if("binary"===e.gis.format){var i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=Da(t);return Ra(t,A,{coordLength:e.coordLength||A.coordLength||2,numericPropKeys:e.numericPropKeys||A.numericPropKeys,PositionDataType:e.PositionDataType||Float32Array})}(A);return i.byteLength=t.byteLength,i}return A}function $a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A="wgs84"===e.coordinates,n=e.tileIndex&&Number.isFinite(e.tileIndex.x)&&Number.isFinite(e.tileIndex.y)&&Number.isFinite(e.tileIndex.z);if(A&&!n)throw new Error("MVT Loader: WGS84 coordinates need tileIndex property. Check documentation.");var r=A&&n?t.toGeoJSON(e.tileIndex.x,e.tileIndex.y,e.tileIndex.z):Za(t,Va);return e.layerProperty&&(r.properties[e.layerProperty]=e.layerName),r}function ts(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function es(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?ts(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):ts(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var As=es(es({},{id:"mvt",name:"Mapbox Vector Tile",version:"2.3.13",extensions:["mvt","pbf"],mimeTypes:["application/vnd.mapbox-vector-tile","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.13","/dist/mvt-loader.worker.js")}}}),{},{parse:function(){var t=Object(nt.a)(et.a.mark((function t(e,A){return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",za(e,A));case 1:case"end":return t.stop()}}),t)})));return function(e,A){return t.apply(this,arguments)}}(),parseSync:za,binary:!0});function ns(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return rs(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return rs(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function rs(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function is(t,e,A){if("geometry"===A)return as(t);var n=function(t,e){if(!Boolean(t.points||t.lines||t.polygons))return t.type=e||function(t){if(t.pathIndices)return"LineString";if(t.polygonIndices)return"Polygon";return"Point"}(t),[t];var A=[];t.points&&(t.points.type="Point",A.push(t.points));t.lines&&(t.lines.type="LineString",A.push(t.lines));t.polygons&&(t.polygons.type="Polygon",A.push(t.polygons));return A}(t,e);switch(function(t){if(t.length>1)return"FeatureCollection";var e=t[0];if(!(e.featureIds||e.globalFeatureIds||e.numericProps||e.properties))return"Geometry";return"FeatureCollection"}(n)){case"Geometry":return as(n[0]);case"FeatureCollection":return function(t){var e,A=[],n=ns(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(0!==r.featureIds.value.length){for(var i=0,o=r.featureIds.value[0],a=0;a<r.featureIds.value.length;a++){var s=r.featureIds.value[a];s!==o&&(A.push(os(r,i,a)),i=a,o=s)}A.push(os(r,i,r.featureIds.value.length))}}}catch(g){n.e(g)}finally{n.f()}return A}(n)}return null}function os(t,e,A){return{type:"Feature",geometry:as(t,e,A),properties:function(t,e,A){var n=Object.assign(t.properties[t.featureIds.value[e]]);for(var r in t.numericProps)n[r]=t.numericProps[r].value[e];return n}(t,e)}}function as(t,e,A){switch(t.type){case"Point":return function(t,e,A){var n=ss(t.positions,e,A);if(n.length>1)return{type:"MultiPoint",coordinates:n};return{type:"Point",coordinates:n[0]}}(t,e,A);case"LineString":return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,n=t.positions,r=t.pathIndices.value.filter((function(t){return t>=e&&t<=A})),i=r.length>2;if(!i){var o=ss(n,r[0],r[1]);return{type:"LineString",coordinates:o}}for(var a=[],s=0;s<r.length-1;s++){var g=ss(n,r[s],r[s+1]);a.push(g)}return{type:"MultiLineString",coordinates:a}}(t,e,A);case"Polygon":return function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,r=e.positions,i=e.polygonIndices.value.filter((function(t){return t>=A&&t<=n})),o=e.primitivePolygonIndices.value.filter((function(t){return t>=A&&t<=n})),a=i.length>2,s=[];if(!a){for(var g=0;g<o.length-1;g++){var c=o[g],I=o[g+1],u=ss(r,c,I);s.push(u)}return{type:"Polygon",coordinates:s}}for(var l=0;l<i.length-1;l++){var C=i[l],h=i[l+1],B=t(e,C,h).coordinates;s.push(B)}return{type:"MultiPolygon",coordinates:s}}(t,e,A);default:throw new Error("Unsupported geometry type: ".concat(t.type))}}function ss(t,e,A){e=e||0,A=A||t.value.length/t.size;for(var n=[],r=e;r<A;r++)n.push(Array.from(t.value.subarray(r*t.size,(r+1)*t.size)));return n}var gs=A(251),cs=A(857);function Is(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var us={clipBounds:[0,0,1,1]},ls="\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",Cs={name:"clip-vs",vs:ls},hs={"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"},Bs={name:"clip-fs",fs:ls},fs={"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"},ds=function(t){Object(s.a)(A,t);var e=Is(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"getShaders",value:function(){var t="instancePositions"in this.getAttributeManager().attributes;return"clipByInstance"in this.props&&(t=this.props.clipByInstance),this.state.clipByInstance=t,t?{modules:[Cs],inject:hs}:{modules:[Bs],inject:fs}}},{key:"draw",value:function(t){var e=t.uniforms,A=this.props.clipBounds,n=void 0===A?us.clipBounds:A;if(this.state.clipByInstance)e.clip_bounds=n;else{var r=this.projectPosition([n[0],n[1],0]),i=this.projectPosition([n[2],n[3],0]);e.clip_bounds=[Math.min(r[0],i[0]),Math.min(r[1],i[1]),Math.max(r[0],i[0]),Math.max(r[1],i[1])]}}}]),A}(cs.a);function Qs(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Es(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Qs(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Qs(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}ds.extensionName="ClipExtension",ds.defaultProps=us;var ps={Point:ys,MultiPoint:function(t,e,A){return vs(t,e,A)},LineString:ms,MultiLineString:function(t,e,A){return t.map((function(t){return ms(t,e,A)}))},Polygon:bs,MultiPolygon:function(t,e,A){return t.map((function(t){return bs(t,e,A)}))}};function ys(t,e,A){var n=Object(B.a)(t,2),r=n[0],i=n[1],o=Object(B.a)(e,2),a=o[0],s=o[1],g=Object(H.c)(a[0],s[0],r),c=Object(H.c)(a[1],s[1],i);return A.unprojectFlat([g,c])}function vs(t,e,A){return t.map((function(t){return ys(t,e,A)}))}function ms(t,e,A){return vs(t,e,A)}function bs(t,e,A){return t.map((function(t){return vs(t,e,A)}))}function Fs(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return ws(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return ws(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function ws(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Ss(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Ds(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Ss(Object(A),!0).forEach((function(e){Object(At.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Ss(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Rs(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var Us={uniqueIdProperty:{type:"string",value:""},highlightedFeatureId:null,loaders:[As],binary:!1};function Gs(t){return Ns.apply(this,arguments)}function Ns(){return(Ns=Object(nt.a)(et.a.mark((function t(e){return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(ct.a)(e);case 3:return t.abrupt("return",t.sent);case 6:throw t.prev=6,t.t0=t.catch(0),new Error("An error occurred fetching TileJSON: ".concat(t.t0));case 9:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}var ks=function(t){Object(s.a)(A,t);var e=Rs(A);function A(){return Object(a.a)(this,A),e.apply(this,arguments)}return Object(l.a)(A,[{key:"initializeState",value:function(){Object(G.a)(Object(c.a)(A.prototype),"initializeState",this).call(this),this.setState({data:null,tileJSON:null})}},{key:"updateState",value:function(t){var e=t.props,n=t.oldProps,r=t.context,i=t.changeFlags;i.dataChanged&&this._updateTileData({props:e}),this.state.data&&(Object(G.a)(Object(c.a)(A.prototype),"updateState",this).call(this,{props:e,oldProps:n,context:r,changeFlags:i}),this._setWGS84PropertyForTiles())}},{key:"_updateTileData",value:function(){var t=Object(nt.a)(et.a.mark((function t(e){var A,n,r,i,o,a;return et.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=e.props,n=this.props.onDataLoad,r=A.data,i=null,o=A.minZoom,a=A.maxZoom,"string"!==typeof r||Object(ca.c)(r)){t.next=13;break}return this.setState({data:null,tileJSON:null}),t.next=9,Gs(r);case 9:i=t.sent,n&&n(i),t.next=14;break;case 13:r.tilejson&&(i=r);case 14:i&&(r=i.tiles,Number.isFinite(i.minzoom)&&i.minzoom>o&&(o=i.minzoom),Number.isFinite(i.maxzoom)&&(!Number.isFinite(a)||i.maxzoom<a)&&(a=i.maxzoom)),this.setState({data:r,tileJSON:i,minZoom:o,maxZoom:a});case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"renderLayers",value:function(){return this.state.data?Object(G.a)(Object(c.a)(A.prototype),"renderLayers",this).call(this):null}},{key:"getTileData",value:function(t){var e=Object(ca.b)(this.state.data,t);if(!e)return Promise.reject("Invalid URL");var A=this.getLoadOptions();return A=Ds(Ds({},A),{},{mvt:Ds(Ds({},A&&A.mvt),{},{coordinates:this.context.viewport.resolution?"wgs84":"local",tileIndex:{x:t.x,y:t.y,z:t.z}}),gis:this.props.binary?{format:"binary"}:{}}),Object(ct.a)(e,this.props.loaders[0],A)}},{key:"renderSubLayers",value:function(t){var e=t.tile,n=Math.pow(2,e.z),r=512/n,i=-r,o=512*e.x/n,a=512*(1-e.y/n),s=(new H.a).scale([r,i,1]);return t.autoHighlight=!1,this.context.viewport.resolution||(t.modelMatrix=s,t.coordinateOrigin=[o,a,0],t.coordinateSystem=it.a.CARTESIAN,t.extensions=[].concat(Object(Ct.a)(t.extensions||[]),[new ds])),Object(G.a)(Object(c.a)(A.prototype),"renderSubLayers",this).call(this,t)}},{key:"onHover",value:function(t,e){var n=this.props,r=n.uniqueIdProperty;if(n.autoHighlight){var i,o=this.state.hoveredFeatureId,a=t.object;a&&(i=xs(a,r)),o!==i&&-1!==i&&this.setState({hoveredFeatureId:i})}return Object(G.a)(Object(c.a)(A.prototype),"onHover",this).call(this,t,e)}},{key:"getPickingInfo",value:function(t){var e=Object(G.a)(Object(c.a)(A.prototype),"getPickingInfo",this).call(this,t),n=this.context.viewport.resolution;if(e.object&&!n)e.object=Ms(e.object,e.tile.bbox,this.context.viewport);else if(this.props.binary&&-1!==e.index){var r=t.sourceLayer.props.data;e.object=Object(gs.a)(r.points,e.index)||Object(gs.a)(r.lines,e.index)||Object(gs.a)(r.polygons,e.index)}return e}},{key:"getHighlightedObjectIndex",value:function(t){var e=this.state.hoveredFeatureId,A=this.props,n=A.uniqueIdProperty,r=A.highlightedFeatureId,i=A.binary,o=t.data;if(!(Os(e)||Os(r)))return-1;var a=Os(r)?r:e;if(Array.isArray(o))return o.findIndex((function(t){return xs(t,n)===a}));if(o&&i)for(var s=Object(gs.d)(o,n,a),g=0,c=["points","lines","polygons"];g<c.length;g++){var I=c[g],u=o[I]&&o[I].featureIds.value[s];if(void 0!==u)return u}return-1}},{key:"_pickObjects",value:function(t){var e=this.context,A=e.deck,n=e.viewport,r=n.width,i=n.height,o=n.x,a=n.y,s=[this.id];return A.pickObjects({x:o,y:a,width:r,height:i,layerIds:s,maxObjects:t})}},{key:"getRenderedFeatures",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,A=this._pickObjects(e),n=new Set,r=[],i=Fs(A);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=xs(o.object,this.props.uniqueIdProperty);-1===a?r.push(o.object):n.has(a)||(n.add(a),r.push(o.object))}}catch(s){i.e(s)}finally{i.f()}return r}},{key:"_setWGS84PropertyForTiles",value:function(){var t=this;this.state.tileset.selectedTiles.forEach((function(e){e.hasOwnProperty("dataInWGS84")||Object.defineProperty(e,"dataInWGS84",{get:function(){if(!e.content)return null;if(t.props.binary&&Array.isArray(e.content)&&!e.content.length)return[];if(void 0===e._contentWGS84){var A=t.props.binary?is(e.content):e.content;e._contentWGS84=A.map((function(A){return Ms(A,e.bbox,t.context.viewport)}))}return e._contentWGS84}})}))}},{key:"isLoaded",get:function(){return this.state.data&&this.state.tileset&&Object(G.a)(Object(c.a)(A.prototype),"isLoaded",this)}}]),A}(U.a);function xs(t,e){return e?t.properties[e]:"id"in t?t.id:-1}function Os(t){return void 0!==t&&null!==t&&""!==t}function Ms(t,e,A){var n=Ds(Ds({},t),{},{geometry:{type:t.geometry.type}});return Object.defineProperty(n.geometry,"coordinates",{get:function(){return function(t,e,A){var n=[A.projectFlat([e.west,e.north]),A.projectFlat([e.east,e.south])];return Es(Es({},t),{},{coordinates:ps[t.type](t.coordinates,n,A)})}(t.geometry,e,A).coordinates}}),n}ks.layerName="MVTLayer",ks.defaultProps=Us,A.d(e,"GreatCircleLayer",(function(){return u})),A.d(e,"S2Layer",(function(){return R})),A.d(e,"TileLayer",(function(){return U.a})),A.d(e,"TripsLayer",(function(){return k})),A.d(e,"H3ClusterLayer",(function(){return T})),A.d(e,"H3HexagonLayer",(function(){return $})),A.d(e,"Tile3DLayer",(function(){return Xo})),A.d(e,"TerrainLayer",(function(){return fa})),A.d(e,"MVTLayer",(function(){return ks}))},function(t,e,A){"use strict";var n=A(1),r=A(5),i=A(4),o=A(404),a=A(55),s=A(168),g=A(43),c=A(157);function I(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function u(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?I(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):I(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,t),this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=e.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="Initial render",this._needsUpdate=!0,this._eventManager=e.eventManager,this._eventCallbacks={onViewStateChange:e.onViewStateChange,onInteractionStateChange:e.onInteractionStateChange},Object.seal(this),this.setProps(e)}return Object(i.a)(t,[{key:"finalize",value:function(){for(var t in this.controllers)this.controllers[t]&&this.controllers[t].finalize();this.controllers={}}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"setNeedsUpdate",value:function(t){this._needsUpdate=this._needsUpdate||t,this._needsRedraw=this._needsRedraw||t}},{key:"updateViewStates",value:function(){for(var t in this.controllers){var e=this.controllers[t];e&&e.updateTransition()}}},{key:"getViewports",value:function(t){return t?this._viewports.filter((function(e){return e.containsPixel(t)})):this._viewports}},{key:"getViews",value:function(){var t={};return this.views.forEach((function(e){t[e.id]=e})),t}},{key:"getView",value:function(t){return"string"===typeof t?this.views.find((function(e){return e.id===t})):t}},{key:"getViewState",value:function(t){var e=this.getView(t),A=e&&this.viewState[e.getViewStateId()]||this.viewState;return e?e.filterViewState(A):A}},{key:"getViewport",value:function(t){return this._viewportMap[t]}},{key:"unproject",value:function(t,e){for(var A=this.getViewports(),n={x:t[0],y:t[1]},r=A.length-1;r>=0;--r){var i=A[r];if(i.containsPixel(n)){var o=t.slice();return o[0]-=i.x,o[1]-=i.y,i.unproject(o,e)}}return null}},{key:"setProps",value:function(t){"views"in t&&this._setViews(t.views),"viewState"in t&&this._setViewState(t.viewState),("width"in t||"height"in t)&&this._setSize(t.width,t.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(t,e){Object(a.a)(Number.isFinite(t)&&Number.isFinite(e)),t===this.width&&e===this.height||(this.width=t,this.height=e,this.setNeedsUpdate("Size changed"))}},{key:"_setViews",value:function(t){t=Object(c.b)(t,Boolean),this._diffViews(t,this.views)&&this.setNeedsUpdate("views changed"),this.views=t}},{key:"_setViewState",value:function(t){t?(!Object(s.a)(t,this.viewState)&&this.setNeedsUpdate("viewState changed"),this.viewState=t):g.a.warn("missing `viewState` or `initialViewState`")()}},{key:"_onViewStateChange",value:function(t,e){e.viewId=t,this._eventCallbacks.onViewStateChange(e)}},{key:"_createController",value:function(t,e){return new(0,e.type)(u({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,e.id),onStateChange:this._eventCallbacks.onInteractionStateChange,makeViewport:function(e){return t._getViewport(e,{width:e.width,height:e.height})}},e))}},{key:"_updateController",value:function(t,e,A,n){var r=t.controller;return r?(r=u(u(u(u({},e),t.props),r),{},{id:t.id,x:A.x,y:A.y,width:A.width,height:A.height}),n?n.setProps(r):n=this._createController(t,r),n):null}},{key:"_rebuildViewports",value:function(){var t=this.width,e=this.height,A=this.views,n=this.controllers;this._viewports=[],this.controllers={};for(var r=A.length;r--;){var i=A[r],o=this.getViewState(i),a=i.makeViewport({width:t,height:e,viewState:o});this.controllers[i.id]=this._updateController(i,o,a,n[i.id]),this._viewports.unshift(a)}for(var s in n)n[s]&&!this.controllers[s]&&n[s].finalize();this._buildViewportMap()}},{key:"_buildViewportMap",value:function(){var t=this;this._viewportMap={},this._viewports.forEach((function(e){e.id&&(t._viewportMap[e.id]=t._viewportMap[e.id]||e)}))}},{key:"_diffViews",value:function(t,e){return t.length!==e.length||t.some((function(A,n){return!t[n].equals(e[n])}))}}]),t}(),C=A(400),h=A(339);function B(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return f(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return f(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var d=new h.a,Q=function(){function t(){Object(r.a)(this,t),this.effects=[],this._internalEffects=[],this._needsRedraw="Initial render",this.setEffects()}return Object(i.a)(t,[{key:"setProps",value:function(t){"effects"in t&&(t.effects.length===this.effects.length&&Object(s.a)(t.effects,this.effects)||(this.setEffects(t.effects),this._needsRedraw="effects changed"))}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1},e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}},{key:"getEffects",value:function(){return this._internalEffects}},{key:"finalize",value:function(){this.cleanup()}},{key:"setEffects",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.cleanup(),this.effects=t,this._createInternalEffects()}},{key:"cleanup",value:function(){var t,e=B(this.effects);try{for(e.s();!(t=e.n()).done;){t.value.cleanup()}}catch(r){e.e(r)}finally{e.f()}var A,n=B(this._internalEffects);try{for(n.s();!(A=n.n()).done;){A.value.cleanup()}}catch(r){n.e(r)}finally{n.f()}this.effects.length=0,this._internalEffects.length=0}},{key:"_createInternalEffects",value:function(){this._internalEffects=this.effects.slice(),this.effects.some((function(t){return t instanceof h.a}))||this._internalEffects.push(d)}}]),t}(),E=A(243),p=A(407),y=A(147),v=A(233),m=A(19),b=A(390),F=A(325),w={pickedColor:null,pickedLayer:null,pickedObjectIndex:-1};function S(t){var e=t.pickedColors,A=t.layers,n=t.deviceX,r=t.deviceY,i=t.deviceRadius,o=t.deviceRect;if(e){for(var a=o.x,s=o.y,c=o.width,I=o.height,u=i*i,l=-1,C=0,h=0;h<I;h++){var B=h+s-r,f=B*B;if(f>u)C+=4*c;else for(var d=0;d<c;d++){if(e[C+3]-1>=0){var Q=d+a-n,E=Q*Q+f;E<=u&&(u=E,l=C)}C+=4}}if(l>=0){var p=e[l+3]-1,y=e.slice(l,l+4),v=A[p];if(v){var m=v.decodePickingColor(y),b=Math.floor(l/4/c);return{pickedColor:y,pickedLayer:v,pickedObjectIndex:m,pickedX:a+(l/4-b*c),pickedY:s+b}}g.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return w}function D(t){var e=t.pickInfo,A=t.mode,n=t.viewports,r=t.layerFilter,i=t.pixelRatio,o=t.x,a=t.y,s=t.z,g=e&&e.pickedLayer,c=function(t,e,A){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.containsPixel(e)&&(!A||A(r)))return r}return t[0]}(n,{x:o,y:a},r&&g&&function(t){return r({layer:g,viewport:t,isPicking:!0,renderPass:"picking:".concat(A)})}),I=c&&c.unproject([o-c.x,a-c.y],{targetZ:s});return{color:null,layer:null,viewport:c,index:-1,picked:!1,x:o,y:a,pixel:[o,a],coordinate:I,devicePixel:e&&[e.pickedX,e.pickedY],pixelRatio:i}}function R(t){var e=t.pickInfo,A=t.lastPickedInfo,n=t.mode,r=t.layers,i=e.pickedColor,o=e.pickedLayer,a=e.pickedObjectIndex,s=o?[o]:[];if("hover"===n){var g=A.index,c=A.layerId,I=o&&o.props.id;if(I!==c||a!==g){if(I!==c){var u=r.find((function(t){return t.props.id===c}));u&&s.unshift(u)}A.layerId=I,A.index=a,A.info=null}}var l=D(t),C=new Map;return C.set(null,l),s.forEach((function(t){var e=Object.assign({},l);if(t===o&&(e.color=i,e.index=a,e.picked=!0),e=U({layer:t,info:e,mode:n}),t===o&&"hover"===n&&(A.info=e),e&&C.set(e.layer.id,e),"hover"===n&&t.props.autoHighlight){var r={pickingSelectedColor:o===t?i:null},s=t.props.highlightColor;o===t&&"function"===typeof s&&(r.pickingHighlightColor=s(e)),t.setModuleParameters(r),t.setNeedsRedraw()}})),C}function U(t){for(var e=t.layer,A=t.info,n=t.mode;e&&A;){var r=A.layer||e;A.layer=e,A=e.getPickingInfo({info:A,mode:n,sourceLayer:r}),e=e.parent}return A}function G(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return N(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return N(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var k=function(){function t(e){Object(r.a)(this,t),this.gl=e,this.pickingFBO=null,this.pickLayersPass=new F.a(e),this.layerFilter=null,this.lastPickedInfo={index:-1,layerId:null,info:null},this._onError=null}return Object(i.a)(t,[{key:"setProps",value:function(t){"layerFilter"in t&&(this.layerFilter=t.layerFilter),"onError"in t&&(this._onError=t.onError),"_pickable"in t&&(this._pickable=t._pickable)}},{key:"finalize",value:function(){this.pickingFBO&&this.pickingFBO.delete(),this.depthFBO&&(this.depthFBO.color.delete(),this.depthFBO.delete())}},{key:"pickObject",value:function(t){return this._pickClosestObject(t)}},{key:"pickObjects",value:function(t){return this._pickVisibleObjects(t)}},{key:"getLastPickedObject",value:function(t){var e=t.x,A=t.y,n=t.layers,r=t.viewports,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.lastPickedInfo.info,o=i&&i.layer&&i.layer.id,a=i&&i.viewport&&i.viewport.id,s=o?n.find((function(t){return t.id===o})):null,g=a&&r.find((function(t){return t.id===a}))||r[0],c=g&&g.unproject([e-g.x,A-g.y]),I={x:e,y:A,viewport:g,coordinate:c,layer:s};return s?Object.assign({},i,I):Object.assign(I,{color:null,object:null,index:-1})}},{key:"_resizeBuffer",value:function(){var t=this.gl;return this.pickingFBO||(this.pickingFBO=new y.a(t),y.a.isSupported(t,{colorBufferFloat:!0})&&(this.depthFBO=new y.a(t),this.depthFBO.attach(Object(n.a)({},36064,new v.a(t,{format:Object(m.j)(t)?34836:6408,type:5126}))))),this.pickingFBO.resize({width:t.canvas.width,height:t.canvas.height}),this.depthFBO&&this.depthFBO.resize({width:t.canvas.width,height:t.canvas.height}),this.pickingFBO}},{key:"_getPickable",value:function(t){if(!1===this._pickable)return null;var e=t.filter((function(t){return t.isPickable()&&!t.isComposite}));return e.length>255?(g.a.warn("Too many pickable layers, only picking the first 255")(),e.slice(0,255)):e.length?e:null}},{key:"_pickClosestObject",value:function(t){var e=t.layers,A=t.views,n=t.viewports,r=t.x,i=t.y,o=t.radius,a=void 0===o?0:o,s=t.depth,g=void 0===s?1:s,c=t.mode,I=void 0===c?"query":c,u=t.unproject3D,l=t.onViewportActive;if(!(e=this._getPickable(e)))return{result:[],emptyInfo:D({viewports:n,x:r,y:i})};this._resizeBuffer();for(var C,h=Object(m.e)(this.gl),B=Object(m.d)(this.gl,[r,i],!0),f=[B.x+Math.floor(B.width/2),B.y+Math.floor(B.height/2)],d=Math.round(a*h),Q=this.pickingFBO,E=Q.width,p=Q.height,y=this._getPickingRect({deviceX:f[0],deviceY:f[1],deviceRadius:d,deviceWidth:E,deviceHeight:p}),v=[],b={},F=0;F<g;F++){var w=S({pickedColors:y&&this._drawAndSample({layers:e,views:A,viewports:n,onViewportActive:l,deviceRect:y,pass:"picking:".concat(I),redrawReason:I}),layers:e,deviceX:f[0],deviceY:f[1],deviceRadius:d,deviceRect:y}),U=void 0;if(w.pickedLayer&&u&&this.depthFBO)U=this._drawAndSample({layers:[w.pickedLayer],views:A,viewports:n,onViewportActive:l,deviceRect:{x:w.pickedX,y:w.pickedY,width:1,height:1},pass:"picking:".concat(I),redrawReason:"pick-z",pickZ:!0})[0]*n[0].distanceScales.metersPerUnit[2]+n[0].position[2];if(w.pickedColor&&F+1<g){var N=w.pickedColor[3]-1;b[N]=!0,e[N].disablePickingIndex(w.pickedObjectIndex)}var k,x=G((C=R({pickInfo:w,lastPickedInfo:this.lastPickedInfo,mode:I,layers:e,layerFilter:this.layerFilter,viewports:n,x:r,y:i,z:U,pixelRatio:h})).values());try{for(x.s();!(k=x.n()).done;){var O=k.value;O.layer&&v.push(O)}}catch(L){x.e(L)}finally{x.f()}if(!w.pickedColor)break}for(var M in b)e[M].restorePickingColors();return{result:v,emptyInfo:C&&C.get(null)}}},{key:"_pickVisibleObjects",value:function(t){var e=t.layers,A=t.views,n=t.viewports,r=t.x,i=t.y,o=t.width,a=void 0===o?1:o,s=t.height,c=void 0===s?1:s,I=t.mode,u=void 0===I?"query":I,l=t.maxObjects,C=void 0===l?null:l,h=t.onViewportActive;if(!(e=this._getPickable(e)))return[];this._resizeBuffer();for(var B=Object(m.e)(this.gl),f=Object(m.d)(this.gl,[r,i],!0),d=f.x,Q=f.y+f.height,E=Object(m.d)(this.gl,[r+a,i+c],!0),p=E.x+E.width,y=E.y,v={x:d,y:y,width:p-d,height:Q-y},b=function(t){var e=t.pickedColors,A=t.layers,n=new Map;if(e)for(var r=0;r<e.length;r+=4){var i=e[r+3]-1;if(i>=0){var o=e.slice(r,r+4),a=o.join(",");if(!n.has(a)){var s=A[i];s?n.set(a,{pickedColor:o,pickedLayer:s,pickedObjectIndex:s.decodePickingColor(o)}):g.a.error("Picked non-existent layer. Is picking buffer corrupt?")()}}}return Array.from(n.values())}({pickedColors:this._drawAndSample({layers:e,views:A,viewports:n,onViewportActive:h,deviceRect:v,pass:"picking:".concat(u),redrawReason:u}),layers:e}),F=new Map,w=Number.isFinite(C),S=0;S<b.length&&!(w&&F.size>=C);S++){var D=b[S],R={color:D.pickedColor,layer:null,index:D.pickedObjectIndex,picked:!0,x:r,y:i,width:a,height:c,pixelRatio:B};R=U({layer:D.pickedLayer,info:R,mode:u}),F.has(R.object)||F.set(R.object,R)}return Array.from(F.values())}},{key:"_drawAndSample",value:function(t){var e=t.layers,A=t.views,n=t.viewports,r=t.onViewportActive,i=t.deviceRect,o=t.pass,s=t.redrawReason,g=t.pickZ;if(Object(a.a)(i.width>0&&i.height>0),e.length<1)return null;var c=g?this.depthFBO:this.pickingFBO;this.pickLayersPass.render({layers:e,layerFilter:this.layerFilter,onError:this._onError,views:A,viewports:n,onViewportActive:r,pickingFBO:c,deviceRect:i,pass:o,redrawReason:s,pickZ:g});var I=i.x,u=i.y,l=i.width,C=i.height,h=new(g?Float32Array:Uint8Array)(l*C*4);return Object(b.c)(c,{sourceX:I,sourceY:u,sourceWidth:l,sourceHeight:C,target:h}),h}},{key:"_getPickingRect",value:function(t){var e=t.deviceX,A=t.deviceY,n=t.deviceRadius,r=t.deviceWidth,i=t.deviceHeight,o=Math.max(0,e-n),a=Math.max(0,A-n),s=Math.min(r,e+n+1)-o,g=Math.min(i,A+n+1)-a;return s<=0||g<=0?null:{x:o,y:a,width:s,height:g}}}]),t}(),x={zIndex:1,position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:0,left:0,display:"none"},O=function(){function t(e){Object(r.a)(this,t);var A=e.parentElement;A&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,x),A.appendChild(this.el))}return Object(i.a)(t,[{key:"setTooltip",value:function(t,e,A){var n=this.el;if("string"===typeof t)n.innerText=t;else{if(!t)return void(n.style.display="none");"text"in t&&(n.innerText=t.text),"html"in t&&(n.innerHTML=t.html),"className"in t&&(n.className=t.className),Object.assign(n.style,t.style)}n.style.display="block",n.style.transform="translate(".concat(e,"px, ").concat(A,"px)")}},{key:"remove",value:function(){this.el&&this.el.remove()}}]),t}(),M=A(139),L=A(436),_=A(60),J=A(973),T=A(966),j=A(274),H=A(741),Y=A(22),V=A(275),Z=A.n(V),W={mousedown:1,mousemove:2,mouseup:4};!function(t){var e=t.prototype.handler;t.prototype.handler=function(t){var A=this.store;t.button>0&&(function(t,e){for(var A=0;A<t.length;A++)if(e(t[A]))return!0;return!1}(A,(function(e){return e.pointerId===t.pointerId}))||A.push(t)),e.call(this,t)}}(Z.a.PointerEventInput),Z.a.MouseInput.prototype.handler=function(t){var e=W[t.type];1&e&&t.button>=0&&(this.pressed=!0),2&e&&0===t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};var K=Z.a.Manager,P=Z.a,q=P?[[P.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[P.Rotate,{enable:!1}],[P.Pinch,{enable:!1}],[P.Swipe,{enable:!1}],[P.Pan,{threshold:0,enable:!1}],[P.Press,{enable:!1}],[P.Tap,{event:"doubletap",taps:2,enable:!1}],[P.Tap,{event:"anytap",enable:!1}],[P.Tap,{enable:!1}]]:null,X={tripan:["rotate","pinch","pan"],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"},tt=["keydown","keyup"],et=["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],At=["wheel","mousewheel","DOMMouseScroll"],nt={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",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",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"},rt={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},it=A(200),ot=-1!==it.b.indexOf("firefox"),at=At,st=function(){function t(e,A){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(r.a)(this,t),this.element=e,this.callback=A,this.options=Object.assign({enable:!0},i),this.events=at.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(t){return e.addEventListener(t,n.handleEvent,!!it.a&&{passive:!1})}))}return Object(i.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"wheel"===t&&(this.options.enable=e)}},{key:"handleEvent",value:function(t){if(this.options.enable){var e=t.deltaY;it.c.WheelEvent&&(ot&&t.deltaMode===it.c.WheelEvent.DOM_DELTA_PIXEL&&(e/=it.c.devicePixelRatio),t.deltaMode===it.c.WheelEvent.DOM_DELTA_LINE&&(e*=40));var A={x:t.clientX,y:t.clientY};0!==e&&e%4.000244140625===0&&(e=Math.floor(e/4.000244140625)),t.shiftKey&&e&&(e*=.25),this._onWheel(t,-e,A)}}},{key:"_onWheel",value:function(t,e,A){this.callback({type:"wheel",center:A,delta:e,srcEvent:t,pointerType:"mouse",target:t.target})}}]),t}(),gt=et,ct=function(){function t(e,A){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(r.a)(this,t),this.element=e,this.callback=A,this.pressed=!1,this.options=Object.assign({enable:!0},i),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=gt.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((function(t){return e.addEventListener(t,n.handleEvent)}))}return Object(i.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"pointermove"===t&&(this.enableMoveEvent=e),"pointerover"===t&&(this.enableOverEvent=e),"pointerout"===t&&(this.enableOutEvent=e),"pointerleave"===t&&(this.enableLeaveEvent=e)}},{key:"handleEvent",value:function(t){this.handleOverEvent(t),this.handleOutEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)}},{key:"handleOverEvent",value:function(t){this.enableOverEvent&&"mouseover"===t.type&&this.callback({type:"pointerover",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleOutEvent",value:function(t){this.enableOutEvent&&"mouseout"===t.type&&this.callback({type:"pointerout",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleLeaveEvent",value:function(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this.callback({type:"pointerleave",srcEvent:t,pointerType:"mouse",target:t.target})}},{key:"handleMoveEvent",value:function(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this.callback({type:"pointermove",srcEvent:t,pointerType:"mouse",target:t.target});break;case"mouseup":this.pressed=!1}}}]),t}(),It=tt,ut=function(){function t(e,A){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(r.a)(this,t),this.element=e,this.callback=A,this.options=Object.assign({enable:!0},i),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=It.concat(i.events||[]),this.handleEvent=this.handleEvent.bind(this),e.tabIndex=i.tabIndex||0,e.style.outline="none",this.events.forEach((function(t){return e.addEventListener(t,n.handleEvent)}))}return Object(i.a)(t,[{key:"destroy",value:function(){var t=this;this.events.forEach((function(e){return t.element.removeEventListener(e,t.handleEvent)}))}},{key:"enableEventType",value:function(t,e){"keydown"===t&&(this.enableDownEvent=e),"keyup"===t&&(this.enableUpEvent=e)}},{key:"handleEvent",value:function(t){var e=t.target||t.srcElement;"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName||(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:"keydown",srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:"keyup",srcEvent:t,key:t.key,target:t.target}))}}]),t}(),lt=function(){function t(e,A){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(r.a)(this,t),this.element=e,this.callback=A,this.options=Object.assign({enable:!0},n),this.handleEvent=this.handleEvent.bind(this),e.addEventListener("contextmenu",this.handleEvent)}return Object(i.a)(t,[{key:"destroy",value:function(){this.element.removeEventListener("contextmenu",this.handleEvent)}},{key:"enableEventType",value:function(t,e){"contextmenu"===t&&(this.options.enable=e)}},{key:"handleEvent",value:function(t){this.options.enable&&this.callback({type:"contextmenu",center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}]),t}(),Ct=A(26),ht={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};var Bt={srcElement:"root",priority:0},ft=function(){function t(e){Object(r.a)(this,t),this.eventManager=e,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this),this._active=!1}return Object(i.a)(t,[{key:"isEmpty",value:function(){return!this._active}},{key:"add",value:function(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=this.handlers,o=this.handlersByElement;A&&("object"!==Object(Ct.a)(A)||A.addEventListener)&&(A={srcElement:A}),A=A?Object.assign({},Bt,A):Bt;var a=o.get(A.srcElement);a||(a=[],o.set(A.srcElement,a));var s={type:t,handler:e,srcElement:A.srcElement,priority:A.priority};n&&(s.once=!0),r&&(s.passive=!0),i.push(s),this._active=this._active||!s.passive;for(var g=a.length-1;g>=0&&!(a[g].priority>=s.priority);)g--;a.splice(g+1,0,s)}},{key:"remove",value:function(t,e){for(var A=this.handlers,n=this.handlersByElement,r=A.length-1;r>=0;r--){var i=A[r];if(i.type===t&&i.handler===e){A.splice(r,1);var o=n.get(i.srcElement);o.splice(o.indexOf(i),1),0===o.length&&n.delete(i.srcElement)}}this._active=A.some((function(t){return!t.passive}))}},{key:"handleEvent",value:function(t){if(!this.isEmpty()){for(var e=this._normalizeEvent(t),A=t.srcEvent.target;A&&A!==e.rootElement;){if(this._emit(e,A),e.handled)return;A=A.parentNode}this._emit(e,"root")}}},{key:"_emit",value:function(t,e){var A=this.handlersByElement.get(e);if(A){for(var n=!1,r=function(){t.handled=!0},i=function(){t.handled=!0,n=!0},o=[],a=0;a<A.length;a++){var s=A[a],g=s.type,c=s.handler,I=s.once;if(c(Object.assign({},t,{type:g,stopPropagation:r,stopImmediatePropagation:i})),I&&o.push(A[a]),n)break}for(var u=0;u<o.length;u++){var l=o[u],C=l.type,h=l.handler;this.remove(C,h)}}}},{key:"_normalizeEvent",value:function(t){var e=this.eventManager.element;return Object.assign({},t,function(t){var e=ht[t.srcEvent.type];if(!e)return null;var A=t.srcEvent,n=A.buttons,r=A.button,i=A.which,o=!1,a=!1,s=!1;return 4===e||2===e&&!Number.isFinite(n)?(o=1===i,a=2===i,s=3===i):2===e?(o=Boolean(1&n),a=Boolean(4&n),s=Boolean(2&n)):1===e&&(o=0===r,a=1===r,s=2===r),{leftButton:o,middleButton:a,rightButton:s}}(t),function(t,e){var A=t.srcEvent;if(!t.center&&!Number.isFinite(A.clientX))return null;var n=t.center||{x:A.clientX,y:A.clientY},r=e.getBoundingClientRect(),i=r.width/e.offsetWidth,o=r.height/e.offsetHeight;return{center:n,offsetCenter:{x:(n.x-r.left-e.clientLeft)/i,y:(n.y-r.top-e.clientTop)/o}}}(t,e),{handled:!1,rootElement:e})}}]),t}();function dt(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Qt(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Qt(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var Et={events:null,recognizers:null,recognizerOptions:{},Manager:K,touchAction:"none",tabIndex:0},pt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,t),this.options=Object.assign({},Et,A),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(e);var n=A.events;n&&this.on(n)}return Object(i.a)(t,[{key:"setElement",value:function(t){var e=this;if(this.element&&this.destroy(),this.element=t,t){var A=this.options,n=A.Manager;for(var r in this.manager=new n(t,{touchAction:A.touchAction,recognizers:A.recognizers||q}).on("hammer.input",this._onBasicInput),A.recognizers||Object.keys(X).forEach((function(t){var A=e.manager.get(t);A&&X[t].forEach((function(t){A.recognizeWith(t)}))})),A.recognizerOptions){var i=this.manager.get(r);if(i){var o=A.recognizerOptions[r];delete o.enable,i.set(o)}}this.wheelInput=new st(t,this._onOtherEvent,{enable:!1}),this.moveInput=new ct(t,this._onOtherEvent,{enable:!1}),this.keyInput=new ut(t,this._onOtherEvent,{enable:!1,tabIndex:A.tabIndex}),this.contextmenuInput=new lt(t,this._onOtherEvent,{enable:!1});var a,s=dt(this.events);try{for(s.s();!(a=s.n()).done;){var g=Object(Y.a)(a.value,2),c=g[0],I=g[1];I.isEmpty()||(this._toggleRecognizer(I.recognizerName,!0),this.manager.on(c,I.handleEvent))}}catch(u){s.e(u)}finally{s.f()}}}},{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(t,e,A){this._addEventHandler(t,e,A,!1)}},{key:"once",value:function(t,e,A){this._addEventHandler(t,e,A,!0)}},{key:"watch",value:function(t,e,A){this._addEventHandler(t,e,A,!1,!0)}},{key:"off",value:function(t,e){this._removeEventHandler(t,e)}},{key:"_toggleRecognizer",value:function(t,e){var A=this.manager;if(A){var n=A.get(t);if(n&&n.options.enable!==e){n.set({enable:e});var r=z[t];r&&!this.options.recognizers&&r.forEach((function(r){var i=A.get(r);e?(i.requireFailure(t),n.dropRequireFailure(r)):i.dropRequireFailure(t)}))}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}}},{key:"_addEventHandler",value:function(t,e,A,n,r){if("string"===typeof t){var i=this.manager,o=this.events,a=rt[t]||t,s=o.get(a);s||(s=new ft(this),o.set(a,s),s.recognizerName=nt[a]||a,i&&i.on(a,s.handleEvent)),s.add(t,e,A,n,r),s.isEmpty()||this._toggleRecognizer(s.recognizerName,!0)}else for(var g in A=e,t)this._addEventHandler(g,t[g],A,n,r)}},{key:"_removeEventHandler",value:function(t,e){if("string"===typeof t){var A=this.events,n=rt[t]||t,r=A.get(n);if(r&&(r.remove(t,e),r.isEmpty())){var i,o=r.recognizerName,a=!1,s=dt(A.values());try{for(s.s();!(i=s.n()).done;){var g=i.value;if(g.recognizerName===o&&!g.isEmpty()){a=!0;break}}}catch(I){s.e(I)}finally{s.f()}a||this._toggleRecognizer(o,!1)}}else for(var c in t)this._removeEventHandler(c,t[c])}},{key:"_onBasicInput",value:function(t){var e=t.srcEvent,A=$[e.type];A&&this.manager.emit(A,t)}},{key:"_onOtherEvent",value:function(t){this.manager.emit(t.type,t)}}]),t}(),yt=A(40);function vt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function mt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?vt(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):vt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function bt(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Ft(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Ft(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Ft(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function wt(){}A.d(e,"a",(function(){return Dt}));var St={id:"deckgl-overlay",width:"100%",height:"100%",pickingRadius:0,layerFilter:null,glOptions:{},gl:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",eventRecognizerOptions:{},_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},onWebGLInitialized:wt,onResize:wt,onViewStateChange:wt,onInteractionStateChange:wt,onBeforeRender:wt,onAfterRender:wt,onLoad:wt,onError:null,_onMetrics:null,getCursor:function(t){return t.isDragging?"grabbing":"grab"},debug:!1,drawPickingColors:!1},Dt=function(){function t(e){Object(r.a)(this,t),e=Object.assign({},St,e),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={isHovering:!1,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._onInteractionStateChange=this._onInteractionStateChange.bind(this),e.viewState&&e.initialViewState&&g.a.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===Object(_.getBrowser)()&&g.a.warn("IE 11 support will be deprecated in v8.0")(),e.gl||"undefined"!==typeof document&&(this.canvas=this._createCanvas(e)),this.animationLoop=this._createAnimationLoop(e),this.stats=new H.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(e),e._typedArrayManagerProps&&M.a.setProps(e._typedArrayManagerProps),this.animationLoop.start()}return Object(i.a)(t,[{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(t){this.stats.get("setProps Time").timeStart(),"onLayerHover"in t&&g.a.removed("onLayerHover","onHover")(),"onLayerClick"in t&&g.a.removed("onLayerClick","onClick")(),t.initialViewState&&!Object(s.a)(this.props.initialViewState,t.initialViewState)&&(this.viewState=t.initialViewState),Object.assign(this.props,t),this._setCanvasSize(this.props);var e=Object.create(this.props);Object.assign(e,{views:this._getViews(),width:this.width,height:this.height,viewState:this._getViewState()}),this.animationLoop.setProps(e),this.layerManager&&(this.viewManager.setProps(e),this.layerManager.activateViewport(this.getViewports()[0]),this.layerManager.setProps(e),this.effectManager.setProps(e),this.deckRenderer.setProps(e),this.deckPicker.setProps(e)),this.stats.get("setProps Time").timeEnd()}},{key:"needsRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clearRedrawFlags:!1};if(this.props._animate)return"Deck._animate";var e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);var A=this.viewManager.needsRedraw(t),n=this.layerManager.needsRedraw(t),r=this.effectManager.needsRedraw(t),i=this.deckRenderer.needsRedraw(t);return e=e||A||n||r||i}},{key:"redraw",value:function(t){if(this.layerManager){var e=t||this.needsRedraw({clearRedrawFlags:!0});e&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(e):this._drawLayers(e))}}},{key:"getViews",value:function(){return this.viewManager.views}},{key:"getViewports",value:function(t){return this.viewManager.getViewports(t)}},{key:"pickObject",value:function(t){var e=this._pick("pickObject","pickObject Time",t).result;return e.length?e[0]:null}},{key:"pickMultipleObjects",value:function(t){return t.depth=t.depth||10,this._pick("pickObject","pickMultipleObjects Time",t).result}},{key:"pickObjects",value:function(t){return this._pick("pickObjects","pickObjects Time",t)}},{key:"_addResources",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];for(var A in t)this.layerManager.resourceManager.add({resourceId:A,data:t[A],forceUpdate:e})}},{key:"_removeResources",value:function(t){var e,A=bt(t);try{for(A.s();!(e=A.n()).done;){var n=e.value;this.layerManager.resourceManager.remove(n)}}catch(r){A.e(r)}finally{A.f()}}},{key:"_pick",value:function(t,e,A){var n=this.stats;n.get("Pick Count").incrementCount(),n.get(e).timeStart();var r=this.deckPicker[t](Object.assign({layers:this.layerManager.getLayers(A),views:this.viewManager.getViews(),viewports:this.getViewports(A),onViewportActive:this.layerManager.activateViewport},A));return n.get(e).timeEnd(),r}},{key:"_createCanvas",value:function(t){var e=t.canvas;("string"===typeof e&&(e=document.getElementById(e),Object(a.a)(e)),e)||(e=document.createElement("canvas"),(t.parent||document.body).appendChild(e));var A=t.id,n=t.style;return e.id=A,Object.assign(e.style,n),e}},{key:"_setCanvasSize",value:function(t){if(this.canvas){var e=t.width,A=t.height;(e||0===e)&&(e=Number.isFinite(e)?"".concat(e,"px"):e,this.canvas.style.width=e),(A||0===A)&&(A=Number.isFinite(A)?"".concat(A,"px"):A,this.canvas.style.position="absolute",this.canvas.style.height=A)}}},{key:"_updateCanvasSize",value:function(){if(this._checkForCanvasSizeChange()){var t=this.width,e=this.height;this.viewManager.setProps({width:t,height:e}),this.props.onResize({width:this.width,height:this.height})}}},{key:"_checkForCanvasSizeChange",value:function(){var t=this.canvas;if(!t)return!1;var e=t.clientWidth||t.width,A=t.clientHeight||t.height;return(e!==this.width||A!==this.height)&&(this.width=e,this.height=A,!0)}},{key:"_createAnimationLoop",value:function(t){var e=this,A=t.width,n=t.height,r=t.gl,i=t.glOptions,o=t.debug,a=t.useDevicePixels,s=t.autoResizeDrawingBuffer;return new J.a({width:A,height:n,useDevicePixels:a,autoResizeDrawingBuffer:s,autoResizeViewport:!1,gl:r,onCreateContext:function(t){return Object(m.c)(Object.assign({},i,t,{canvas:e.canvas,debug:o}))},onInitialize:this._onRendererInitialized,onRender:this._onRenderFrame,onBeforeRender:t.onBeforeRender,onAfterRender:t.onAfterRender,onError:t.onError})}},{key:"_getViewState",value:function(){return this.props.viewState||this.viewState}},{key:"_getViews",value:function(){var t=this.props.views||[new C.a({id:"default-view"})];return(t=Array.isArray(t)?t:[t]).length&&this.props.controller&&(t[0].props.controller=this.props.controller),t}},{key:"_onPointerMove",value:function(t){var e=this._pickRequest;if("pointerleave"===t.type)e.x=-1,e.y=-1,e.radius=0;else{if(t.leftButton||t.rightButton)return;var A=t.offsetCenter;if(!A)return;e.x=A.x,e.y=A.y,e.radius=this.props.pickingRadius}this.layerManager&&(this.layerManager.context.mousePosition={x:e.x,y:e.y}),e.event=t,e.mode="hover"}},{key:"_pickAndCallback",value:function(){var t=this._pickRequest;if(t.event){var e=this._pick("pickObject","pickObject Time",t),A=e.result,n=e.emptyInfo;this.interactiveState.isHovering=A.length>0;var r,i=n,o=!1,a=bt(A);try{for(a.s();!(r=a.n()).done;){var s=r.value;i=s,o=s.layer.onHover(s,t.event)}}catch(c){a.e(c)}finally{a.f()}if(!o&&this.props.onHover&&this.props.onHover(i,t.event),this.props.getTooltip){var g=this.props.getTooltip(i);this.tooltip.setTooltip(g,i.x,i.y)}t.event=null}}},{key:"_updateCursor",value:function(){var t=this.props.parent||this.canvas;t&&(t.style.cursor=this.props.getCursor(this.interactiveState))}},{key:"_setGLContext",value:function(t){if(!this.layerManager){this.canvas||(this.canvas=t.canvas,Object(m.h)(t,{enable:!0,copyState:!0})),this.tooltip=new O(this.canvas),Object(m.n)(t,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(t);var e=new T.a;for(var A in e.play(),this.animationLoop.attachTimeline(e),this.eventManager=new pt(this.props.parent||t.canvas,{touchAction:this.props.touchAction,recognizerOptions:this.props.eventRecognizerOptions,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}}),yt.b)this.eventManager.on(A,this._onEvent);this.viewManager=new l({timeline:e,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange,onInteractionStateChange:this._onInteractionStateChange,views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});var n=this.viewManager.getViewports()[0];this.layerManager=new o.a(t,{deck:this,stats:this.stats,viewport:n,timeline:e}),this.effectManager=new Q,this.deckRenderer=new p.a(t),this.deckPicker=new k(t),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}}},{key:"_drawLayers",value:function(t,e){var A=this.layerManager.context.gl;Object(m.n)(A,this.props.parameters),this.props.onBeforeRender({gl:A}),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:t,effects:this.effectManager.getEffects()},e)),this.props.onAfterRender({gl:A})}},{key:"_onRendererInitialized",value:function(t){var e=t.gl;this._setGLContext(e)}},{key:"_onRenderFrame",value:function(t){this._getFrameStats(),this._metricsCounter++%60===0&&(this._getMetrics(),this.stats.reset(),g.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(t){var e=this.props.onViewStateChange(t)||t.viewState;this.viewState&&(this.viewState=mt(mt({},this.viewState),{},Object(n.a)({},t.viewId,e)),this.props.viewState||this.viewManager.setProps({viewState:this.viewState}))}},{key:"_onInteractionStateChange",value:function(t){this.interactiveState.isDragging=t.isDragging,this.props.onInteractionStateChange(t)}},{key:"_onEvent",value:function(t){var e=yt.b[t.type],A=t.offsetCenter;if(e&&A){var n=this.layerManager.getLayers(),r=this.deckPicker.getLastPickedObject({x:A.x,y:A.y,layers:n,viewports:this.getViewports(A)},this._lastPointerDownInfo),i=r.layer,o=i&&(i[e.handler]||i.props[e.handler]),a=this.props[e.handler],s=!1;o&&(s=o.call(i,r,t)),!s&&a&&a(r,t)}}},{key:"_onPointerDown",value:function(t){var e=t.offsetCenter;this._lastPointerDownInfo=this.pickObject({x:e.x,y:e.y,radius:this.props.pickingRadius})}},{key:"_getFrameStats",value:function(){var t=this.stats;t.get("frameRate").timeEnd(),t.get("frameRate").timeStart();var e=this.animationLoop.stats;t.get("GPU Time").addTime(e.get("GPU Time").lastTiming),t.get("CPU Time").addTime(e.get("CPU Time").lastTiming)}},{key:"_getMetrics",value:function(){var t=this.metrics,e=this.stats;t.fps=e.get("frameRate").getHz(),t.setPropsTime=e.get("setProps Time").time,t.updateAttributesTime=e.get("Update Attributes").time,t.framesRedrawn=e.get("Redraw Count").count,t.pickTime=e.get("pickObject Time").time+e.get("pickMultipleObjects Time").time+e.get("pickObjects Time").time,t.pickCount=e.get("Pick Count").count,t.gpuTime=e.get("GPU Time").time,t.cpuTime=e.get("CPU Time").time,t.gpuTimePerFrame=e.get("GPU Time").getAverageTime(),t.cpuTimePerFrame=e.get("CPU Time").getAverageTime();var A=j.a.get("Memory Usage");t.bufferMemory=A.get("Buffer Memory").count,t.textureMemory=A.get("Texture Memory").count,t.renderbufferMemory=A.get("Renderbuffer Memory").count,t.gpuMemory=A.get("GPU Memory").count}}]),t}();Dt.getPropTypes=function(t){return{id:t.string,width:t.oneOfType([t.number,t.string]),height:t.oneOfType([t.number,t.string]),layers:t.oneOfType([t.object,t.array]),layerFilter:t.func,views:t.oneOfType([t.object,t.array]),viewState:t.object,effects:t.arrayOf(t.instanceOf(E.a)),controller:t.oneOfType([t.func,t.bool,t.object]),gl:t.object,glOptions:t.object,parameters:t.object,pickingRadius:t.number,useDevicePixels:t.oneOfType([t.bool,t.number]),touchAction:t.string,eventRecognizerOptions:t.object,onWebGLInitialized:t.func,onResize:t.func,onViewStateChange:t.func,onInteractionStateChange:t.func,onBeforeRender:t.func,onAfterRender:t.func,onLoad:t.func,onError:t.func,debug:t.bool,drawPickingColors:t.bool,_framebuffer:t.object,_animate:t.bool,_pickable:t.bool,_typedArrayManagerProps:t.object}},Dt.defaultProps=St,Dt.VERSION=L.a.VERSION},function(t,e,A){"use strict";var n=A(1),r=A(5),i=A(4),o=A(35),a=A(14),s=A(16),g=A(7),c=A(43),I=A(393),u=A(364),l=A(241),C=A(280),h=A(324),B=A(251);function f(t,e){for(var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={pointFeatures:[],lineFeatures:[],polygonFeatures:[],polygonOutlineFeatures:[]},r=A.startRow,i=void 0===r?0:r,o=A.endRow,a=void 0===o?t.length:o,s=i;s<a;s++){var g=t[s];c.a.assert(g&&g.geometry,"GeoJSON does not have geometry");var I=g.geometry;if("GeometryCollection"===I.type){c.a.assert(Array.isArray(I.geometries),"GeoJSON does not have geometries array");for(var u=I.geometries,l=0;l<u.length;l++){var C=u[l];d(C,n,e,g,s)}}else d(I,n,e,g,s)}return n}function d(t,e,A,n,r){var i=t.type,o=t.coordinates,a=e.pointFeatures,s=e.lineFeatures,g=e.polygonFeatures,I=e.polygonOutlineFeatures;if(function(t,e){var A=Q[t];c.a.assert(A,"Unknown GeoJSON type ".concat(t));for(;e&&--A>0;)e=e[0];return e&&Number.isFinite(e[0])}(i,o))switch(i){case"Point":a.push(A({geometry:t},n,r));break;case"MultiPoint":o.forEach((function(t){a.push(A({geometry:{type:"Point",coordinates:t}},n,r))}));break;case"LineString":s.push(A({geometry:t},n,r));break;case"MultiLineString":o.forEach((function(t){s.push(A({geometry:{type:"LineString",coordinates:t}},n,r))}));break;case"Polygon":g.push(A({geometry:t},n,r)),o.forEach((function(t){I.push(A({geometry:{type:"LineString",coordinates:t}},n,r))}));break;case"MultiPolygon":o.forEach((function(t){g.push(A({geometry:{type:"Polygon",coordinates:t}},n,r)),t.forEach((function(t){I.push(A({geometry:{type:"LineString",coordinates:t}},n,r))}))}))}else c.a.warn("".concat(i," coordinates are malformed"))()}var Q={Point:1,MultiPoint:2,LineString:2,MultiLineString:3,Polygon:3,MultiPolygon:4};function E(t){return t.geometry.coordinates}function p(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function y(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?p(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):p(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function v(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return m(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return m(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function b(t){var e=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(t){return!1}}();return function(){var A,n=Object(g.a)(t);if(e){var r=Object(g.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(s.a)(this,A)}}A.d(e,"a",(function(){return S}));var F=[0,0,0,255],w={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:F},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},S=function(t){Object(a.a)(A,t);var e=b(A);function A(){return Object(r.a)(this,A),e.apply(this,arguments)}return Object(i.a)(A,[{key:"initializeState",value:function(){this.state={layerProps:{},features:{}},this.props.getLineDashArray&&c.a.removed("getLineDashArray","PathStyleExtension")()}},{key:"updateState",value:function(t){var e=t.props,A=t.changeFlags;if(A.dataChanged){var n=this.props.data,r=n&&"points"in n&&"polygons"in n&&"lines"in n;this.setState({binary:r}),r?this._updateStateBinary({props:e,changeFlags:A}):this._updateStateJSON({props:e,changeFlags:A})}}},{key:"_updateStateBinary",value:function(t){var e=t.props,A=(t.changeFlags,function(t,e,A){var n={points:{},lines:{},polygons:{},polygonsOutline:{}},r=t.points,i=t.lines,o=t.polygons,a=Object(B.c)(t,e,A);return n.points.data={length:r.positions.value.length/r.positions.size,attributes:{getPosition:r.positions,pickingColors:{size:3,value:a.points}},properties:r.properties,numericProps:r.numericProps,featureIds:r.featureIds},n.lines.data={length:i.pathIndices.value.length-1,startIndices:i.pathIndices.value,attributes:{getPath:i.positions,pickingColors:{size:3,value:a.lines}},properties:i.properties,numericProps:i.numericProps,featureIds:i.featureIds},n.lines._pathType="open",n.polygons.data={length:o.primitivePolygonIndices.value.length,startIndices:o.primitivePolygonIndices.value,attributes:{getPolygon:o.positions,pickingColors:{size:3,value:a.polygons}},properties:o.properties,numericProps:o.numericProps,featureIds:o.featureIds},n.polygons._normalize=!1,n.polygonsOutline.data={length:o.primitivePolygonIndices.value.length,startIndices:o.primitivePolygonIndices.value,attributes:{getPath:o.positions,instancePickingColors:{size:3,value:a.polygons}},properties:o.properties,numericProps:o.numericProps,featureIds:o.featureIds},n.polygonsOutline._pathType="open",n}(e.data,this.encodePickingColor));this.setState({layerProps:A})}},{key:"_updateStateJSON",value:function(t){var e=t.props,A=t.changeFlags,n=function(t){if(Array.isArray(t))return t;switch(c.a.assert(t.type,"GeoJSON does not have type"),t.type){case"Feature":return[t];case"FeatureCollection":return c.a.assert(Array.isArray(t.features),"GeoJSON does not have features array"),t.features;default:return[{geometry:t}]}}(e.data),r=this.getSubLayerRow.bind(this),i={},o={};if(Array.isArray(A.dataChanged)){var a=this.state.features;for(var s in a)i[s]=a[s].slice(),o[s]=[];var g,I=v(A.dataChanged);try{for(I.s();!(g=I.n()).done;){var u=g.value,l=f(n,r,u);for(var C in a)o[C].push(Object(h.a)({data:i[C],getIndex:function(t){return t.__source.index},dataRange:u,replace:l[C]}))}}catch(d){I.e(d)}finally{I.f()}}else i=f(n,r);var B=function(t,e){var A={points:{},lines:{},polygons:{},polygonsOutline:{}},n=t.pointFeatures,r=t.lineFeatures,i=t.polygonFeatures,o=t.polygonOutlineFeatures;return A.points.data=n,A.points._dataDiff=e.pointFeatures&&function(){return e.pointFeatures},A.points.getPosition=E,A.lines.data=r,A.lines._dataDiff=e.lineFeatures&&function(){return e.lineFeatures},A.lines.getPath=E,A.polygons.data=i,A.polygons._dataDiff=e.polygonFeatures&&function(){return e.polygonFeatures},A.polygons.getPolygon=E,A.polygonsOutline.data=o,A.polygonsOutline._dataDiff=e.polygonOutlineFeatures&&function(){return e.polygonOutlineFeatures},A.polygonsOutline.getPath=E,A}(i,o);this.setState({features:i,featuresDiff:o,layerProps:B})}},{key:"renderLayers",value:function(){var t=this.props,e=t.stroked,A=t.filled,n=t.extruded,r=t.wireframe,i=t.material,o=t.transitions,a=this.props,s=a.lineWidthUnits,g=a.lineWidthScale,c=a.lineWidthMinPixels,I=a.lineWidthMaxPixels,h=a.lineJointRounded,B=a.lineMiterLimit,f=a.pointRadiusUnits,d=a.pointRadiusScale,Q=a.pointRadiusMinPixels,E=a.pointRadiusMaxPixels,p=a.elevationScale,v=a.lineDashJustified,m=this.props,b=m.getLineColor,w=m.getFillColor,S=m.getRadius,D=m.getLineWidth,R=m.getLineDashArray,U=m.getElevation,G=m.updateTriggers,N=this.getSubLayerClass("polygons-fill",C.a),k=this.getSubLayerClass("polygons-stroke",l.a),x=this.getSubLayerClass("line-strings",l.a),O=this.getSubLayerClass("points",u.a),M=this.state.layerProps,L=this.shouldRenderSubLayer("polygons-fill",M.polygons.data)&&new N({extruded:n,elevationScale:p,filled:A,wireframe:r,material:i,getElevation:this.getSubLayerAccessor(U),getFillColor:this.getSubLayerAccessor(w),getLineColor:this.getSubLayerAccessor(n&&r?b:F),transitions:o&&{getPolygon:o.geometry,getElevation:o.getElevation,getFillColor:o.getFillColor,getLineColor:o.getLineColor}},this.getSubLayerProps({id:"polygons-fill",updateTriggers:{getElevation:G.getElevation,getFillColor:G.getFillColor,lineColors:n&&r,getLineColor:G.getLineColor}}),M.polygons);return[!n&&L,!n&&e&&this.shouldRenderSubLayer("polygons-stroke",M.polygonsOutline.data)&&new k({widthUnits:s,widthScale:g,widthMinPixels:c,widthMaxPixels:I,rounded:h,miterLimit:B,dashJustified:v,getColor:this.getSubLayerAccessor(b),getWidth:this.getSubLayerAccessor(D),getDashArray:this.getSubLayerAccessor(R),transitions:o&&{getPath:o.geometry,getColor:o.getLineColor,getWidth:o.getLineWidth}},this.getSubLayerProps({id:"polygons-stroke",updateTriggers:{getColor:G.getLineColor,getWidth:G.getLineWidth,getDashArray:G.getLineDashArray}}),M.polygonsOutline),this.shouldRenderSubLayer("linestrings",M.lines.data)&&new x({widthUnits:s,widthScale:g,widthMinPixels:c,widthMaxPixels:I,rounded:h,miterLimit:B,dashJustified:v,getColor:this.getSubLayerAccessor(b),getWidth:this.getSubLayerAccessor(D),getDashArray:this.getSubLayerAccessor(R),transitions:o&&{getPath:o.geometry,getColor:o.getLineColor,getWidth:o.getLineWidth}},this.getSubLayerProps({id:"line-strings",updateTriggers:{getColor:G.getLineColor,getWidth:G.getLineWidth,getDashArray:G.getLineDashArray}}),M.lines),this.shouldRenderSubLayer("points",M.points.data)&&new O({stroked:e,filled:A,radiusUnits:f,radiusScale:d,radiusMinPixels:Q,radiusMaxPixels:E,lineWidthUnits:s,lineWidthScale:g,lineWidthMinPixels:c,lineWidthMaxPixels:I,getFillColor:this.getSubLayerAccessor(w),getLineColor:this.getSubLayerAccessor(b),getRadius:this.getSubLayerAccessor(S),getLineWidth:this.getSubLayerAccessor(D),transitions:o&&{getPosition:o.geometry,getFillColor:o.getFillColor,getLineColor:o.getLineColor,getRadius:o.getRadius,getLineWidth:o.getLineWidth}},this.getSubLayerProps({id:"points",updateTriggers:{getFillColor:G.getFillColor,getLineColor:G.getLineColor,getRadius:G.getRadius,getLineWidth:G.getLineWidth}}),y(y({},M.points),{},{highlightedObjectIndex:this._getHighlightedIndex(M.points.data)})),n&&L]}},{key:"_getHighlightedIndex",value:function(t){var e=this.props.highlightedObjectIndex;return this.state.binary?e:Number.isFinite(e)?t.findIndex((function(t){return t.__source.index===e})):null}},{key:"getSubLayerAccessor",value:function(t){return this.state.binary&&"function"===typeof t?function(e,A){var n=A.data,r=A.index,i=Object(B.b)(n,r);return t(i,A)}:Object(o.a)(Object(g.a)(A.prototype),"getSubLayerAccessor",this).call(this,t)}}]),A}(I.a);S.layerName="GeoJsonLayer",S.defaultProps=w},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(479),c=A(480),I=A(279),u=A(412),l=A(255);function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return B}));var h={getSourcePosition:{type:"accessor",value:function(t){return t.sourcePosition}},getTargetPosition:{type:"accessor",value:function(t){return t.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}},B=function(t){Object(o.a)(A,t);var e=C(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){return Object(i.a)(Object(s.a)(A.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;\nuniform float useShortestPath;\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\nvec3 splitLine(vec3 a, vec3 b, float x) {\n  float t = (x - a.x) / (b.x - a.x);\n  return vec3(x, mix(a.yz, b.yz, t));\n}\n\nvoid main(void) {\n  geometry.worldPosition = instanceSourcePositions;\n  geometry.worldPositionAlt = instanceTargetPositions;\n\n  vec3 source_world = instanceSourcePositions;\n  vec3 target_world = instanceTargetPositions;\n  vec3 source_world_64low = instanceSourcePositions64Low;\n  vec3 target_world_64low = instanceTargetPositions64Low;\n\n  if (useShortestPath > 0.5 || useShortestPath < -0.5) {\n    source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n    target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n    float deltaLng = target_world.x - source_world.x;\n\n    if (deltaLng * useShortestPath > 180.) {\n      source_world.x += 360. * useShortestPath;\n      source_world = splitLine(source_world, target_world, 180. * useShortestPath);\n      source_world_64low = vec3(0.0);\n    } else if (deltaLng * useShortestPath < -180.) {\n      target_world.x += 360. * useShortestPath;\n      target_world = splitLine(source_world, target_world, 180. * useShortestPath);\n      target_world_64low = vec3(0.0);\n    } else if (useShortestPath < 0.) {\n      gl_Position = vec4(0.);\n      return;\n    }\n  }\n  vec4 source_commonspace;\n  vec4 target_commonspace;\n  vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\n  vec4 target = project_position_to_clipspace(target_world, target_world_64low, 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:[g.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"},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(t){var e=t.props,n=t.oldProps,r=t.changeFlags;if(Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,{props:e,oldProps:n,changeFlags:r}),r.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(t){var e=t.uniforms,A=this.context.viewport,n=this.props,r=n.widthUnits,i=n.widthScale,o=n.widthMinPixels,a=n.widthMaxPixels,s=n.wrapLongitude,g="pixels"===r?A.metersPerPixel:1;this.state.model.setUniforms(e).setUniforms({widthScale:i*g,widthMinPixels:o,widthMaxPixels:a,useShortestPath:s?1:0}).draw(),s&&this.state.model.setUniforms({useShortestPath:-1}).draw()}},{key:"_getModel",value:function(t){return new u.a(t,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new l.a({drawMode:5,attributes:{positions:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}),isInstanced:!0}))}},{key:"wrapLongitude",get:function(){return!1}}]),A}(I.a);B.layerName="LineLayer",B.defaultProps=h},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(0),r=A.n(n),i=A(417);function o(){return r.a.useContext(i.a)}},function(t,e,A){"use strict";var n=A(0),r=A.n(n),i=A(1390),o=A(30),a=A(10),s=(A(25),A(32)),g=A(41),c=A(605),I=n.forwardRef((function(t,e){var A=t.classes,r=t.className,i=t.component,g=void 0===i?"table":i,I=t.padding,u=void 0===I?"default":I,l=t.size,C=void 0===l?"medium":l,h=t.stickyHeader,B=void 0!==h&&h,f=Object(o.a)(t,["classes","className","component","padding","size","stickyHeader"]),d=n.useMemo((function(){return{padding:u,size:C,stickyHeader:B}}),[u,C,B]);return n.createElement(c.a.Provider,{value:d},n.createElement(g,Object(a.a)({ref:e,className:Object(s.a)(A.root,r,B&&A.stickyHeader)},f)))})),u=Object(g.a)((function(t){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Object(a.a)({},t.typography.body2,{padding:t.spacing(2),color:t.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(I),l=A(531),C={variant:"body"},h=n.forwardRef((function(t,e){var A=t.classes,r=t.className,i=t.component,g=void 0===i?"tbody":i,c=Object(o.a)(t,["classes","className","component"]);return n.createElement(l.a.Provider,{value:C},n.createElement(g,Object(a.a)({className:Object(s.a)(A.root,r),ref:e},c)))})),B=Object(g.a)({root:{display:"table-row-group"}},{name:"MuiTableBody"})(h),f=n.forwardRef((function(t,e){var A=t.classes,r=t.className,i=t.component,g=void 0===i?"div":i,c=Object(o.a)(t,["classes","className","component"]);return n.createElement(g,Object(a.a)({ref:e,className:Object(s.a)(A.root,r)},c))})),d=Object(g.a)({root:{width:"100%",overflowX:"auto"}},{name:"MuiTableContainer"})(f),Q=A(530);function E(t){var e=t.children,A=Object(Q.a)();return r.a.createElement(i.a,{className:A.box},r.a.createElement(d,{className:A.tableContainer},r.a.createElement(u,{className:A.table,size:"small"},r.a.createElement(B,null,e))))}A.d(e,"a",(function(){return E}))},,,,,,,,,,,,,,,,function(t,e){var A="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(A){var n=new Uint8Array(16);t.exports=function(){return A(n),n}}else{var r=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),r[e]=t>>>((3&e)<<3)&255;return r}}},function(t,e){for(var A=[],n=0;n<256;++n)A[n]=(n+256).toString(16).substr(1);t.exports=function(t,e){var n=e||0,r=A;return[r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],"-",r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]],r[t[n++]]].join("")}},function(t,e,A){var n=A(773),r=A(721),i=A(774);t.exports=function(t){return function(e,A,o){return o&&"number"!=typeof o&&r(e,A,o)&&(A=o=void 0),e=i(e),void 0===A?(A=e,e=0):A=i(A),o=void 0===o?e<A?1:-1:i(o),n(e,A,o,t)}}},function(t,e){var A=Math.ceil,n=Math.max;t.exports=function(t,e,r,i){for(var o=-1,a=n(A((e-t)/(r||1)),0),s=Array(a);a--;)s[i?a:++o]=t,t+=r;return s}},function(t,e,A){var n=A(430);t.exports=function(t){return t?(t=n(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(153);function r(t,e,A,n){var r=A[0],i=A[1],o=t[0],a=t[1],s=e[0],g=e[1],c=s-o,I=g-a;return 0===(A[0]-o)*I-(A[1]-a)*c&&(n?"start"===n?Math.abs(c)>=Math.abs(I)?c>0?o<r&&r<=s:s<=r&&r<o:I>0?a<i&&i<=g:g<=i&&i<a:"end"===n?Math.abs(c)>=Math.abs(I)?c>0?o<=r&&r<s:s<r&&r<=o:I>0?a<=i&&i<g:g<i&&i<=a:"both"===n&&(Math.abs(c)>=Math.abs(I)?c>0?o<r&&r<s:s<r&&r<o:I>0?a<i&&i<g:g<i&&i<a):Math.abs(c)>=Math.abs(I)?c>0?o<=r&&r<=s:s<=r&&r<=o:I>0?a<=i&&i<=g:g<=i&&i<=a)}e.default=function(t,e,A){void 0===A&&(A={});for(var i=n.getCoord(t),o=n.getCoords(e),a=0;a<o.length-1;a++){var s=!1;if(A.ignoreEndVertices&&(0===a&&(s="start"),a===o.length-2&&(s="end"),0===a&&a+1===o.length-1&&(s="both")),r(o[a],o[a+1],i,s))return!0}return!1}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(294),r=A(258),i=A(497),o=A(599),a=A(202),s=A(85),g=A(153);e.default=function(t,e,A){void 0===A&&(A={});var c=s.point([1/0,1/0],{dist:1/0}),I=0;return a.flattenEach(t,(function(t){for(var a=g.getCoords(t),u=0;u<a.length-1;u++){var l=s.point(a[u]);l.properties.dist=r.default(e,l,A);var C=s.point(a[u+1]);C.properties.dist=r.default(e,C,A);var h=r.default(l,C,A),B=Math.max(l.properties.dist,C.properties.dist),f=n.default(l,C),d=i.default(e,B,f+90,A),Q=i.default(e,B,f-90,A),E=o.default(s.lineString([d.geometry.coordinates,Q.geometry.coordinates]),s.lineString([l.geometry.coordinates,C.geometry.coordinates])),p=null;E.features.length>0&&((p=E.features[0]).properties.dist=r.default(e,p,A),p.properties.location=I+r.default(l,p,A)),l.properties.dist<c.properties.dist&&((c=l).properties.index=u,c.properties.location=I),C.properties.dist<c.properties.dist&&((c=C).properties.index=u+1,c.properties.location=I+h),p&&p.properties.dist<c.properties.dist&&((c=p).properties.index=u),I+=h}})),c}},function(t,e,A){"use strict";var n=A(997);t.exports=Function.prototype.bind||n},function(t,e,A){"use strict";var n=A(841),r="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),i=Object.prototype.toString,o=Array.prototype.concat,a=Object.defineProperty,s=a&&function(){var t={};try{for(var e in a(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(A){return!1}}(),g=function(t,e,A,n){var r;(!(e in t)||"function"===typeof(r=n)&&"[object Function]"===i.call(r)&&n())&&(s?a(t,e,{configurable:!0,enumerable:!1,value:A,writable:!0}):t[e]=A)},c=function(t,e){var A=arguments.length>2?arguments[2]:{},i=n(e);r&&(i=o.call(i,Object.getOwnPropertySymbols(e)));for(var a=0;a<i.length;a+=1)g(t,i[a],e[i[a]],A[i[a]])};c.supportsDescriptors=!!s,t.exports=c},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ArrowStyles",{enumerable:!0,get:function(){return n.ArrowStyles}}),Object.defineProperty(e,"DEFAULT_ARROWS",{enumerable:!0,get:function(){return n.DEFAULT_ARROWS}}),Object.defineProperty(e,"MAX_ARROWS",{enumerable:!0,get:function(){return n.MAX_ARROWS}}),Object.defineProperty(e,"EditableGeoJsonLayer",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"EditableH3ClusterLayer",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"SelectionLayer",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ElevatedEditHandleLayer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"PathOutlineLayer",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"PathMarkerLayer",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"JunctionScatterplotLayer",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"toDeckColor",{enumerable:!0,get:function(){return I.toDeckColor}});var n=A(1009),r=u(A(780)),i=u(A(1036)),o=u(A(1037)),a=u(A(1039)),s=u(A(859)),g=u(A(1041)),c=u(A(1045)),I=A(1046);function u(t){return t&&t.__esModule?t:{default:t}}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=A(152),i=A(409),o=(n=A(856))&&n.__esModule?n:{default:n};function a(t){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e,A){return(c="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function I(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var B=[0,0,0,153],f=[0,0,0,144],d=[0,0,0,255],Q=[0,0,144,144],E=[144,144,144,255],p=[144,144,144,144],y=[192,0,0,255],v=[0,0,0,128],m=[124,0,192,255],b=[255,255,255,255],F=i.DrawPolygonMode;function w(t){return t&&"function"===typeof t?function(e){return t(function(t){if(t.__source)return t.__source.object;if(t.sourceFeature)return t.sourceFeature.feature;return t}(e))}:t}function S(t){switch(t.properties.editHandleType){case"existing":return y;case"snap-source":return m;case"intermediate":default:return v}}var D={mode:F,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(t,e,A){return e?d:B},getFillColor:function(t,e,A){return e?Q:f},getRadius:function(t){return t&&t.properties&&t.properties.radius||t&&t.properties&&t.properties.size||1},getLineWidth:function(t){return t&&t.properties&&t.properties.lineWidth||3},getTentativeLineColor:function(t){return E},getTentativeFillColor:function(t){return p},getTentativeLineWidth:function(t){return t&&t.properties&&t.properties.lineWidth||3},editHandleType:"point",editHandlePointRadiusScale:1,editHandlePointOutline:!0,editHandlePointStrokeWidth:2,editHandlePointRadiusMinPixels:4,editHandlePointRadiusMaxPixels:8,getEditHandlePointColor:S,getEditHandlePointOutlineColor:function(t){return b},getEditHandlePointRadius:function(t){switch(t.properties.editHandleType){case"existing":return 5;case"snap":return 7;case"intermediate":default:return 3}},editHandleIconAtlas:null,editHandleIconMapping:null,editHandleIconSizeScale:1,getEditHandleIcon:function(t){return t.properties.editHandleType},getEditHandleIconSize:10,getEditHandleIconColor:S,getEditHandleIconAngle:0,billboard:!0},R={view:i.ViewMode,modify:i.ModifyMode,translate:new i.SnappableMode(new i.TranslateMode),transform:new i.SnappableMode(new i.TransformMode),scale:i.ScaleMode,rotate:i.RotateMode,duplicate:i.DuplicateMode,split:i.SplitPolygonMode,extrude:i.ExtrudeMode,elevation:i.ElevationMode,drawPoint:i.DrawPointMode,drawLineString:i.DrawLineStringMode,drawPolygon:i.DrawPolygonMode,drawRectangle:i.DrawRectangleMode,drawCircleFromCenter:i.DrawCircleFromCenterMode,drawCircleByBoundingBox:i.DrawCircleByDiameterMode,drawEllipseByBoundingBox:i.DrawEllipseByBoundingBoxMode,drawRectangleUsing3Points:i.DrawRectangleUsingThreePointsMode,drawEllipseUsing3Points:i.DrawEllipseUsingThreePointsMode,draw90DegreePolygon:i.Draw90DegreePolygonMode,drawPolygonByDragging:i.DrawPolygonByDraggingMode},U=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(a,t);var e,A,n,i,o=(e=a,function(){var t,A=l(e);if(u()){var n=l(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return I(this,t)});function a(){return s(this,a),o.apply(this,arguments)}return A=a,(n=[{key:"renderLayers",value:function(){var t=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]}}),e=[new r.GeoJsonLayer(t)];return e=e.concat(this.createGuidesLayers(),this.createTooltipsLayers())}},{key:"initializeState",value:function(){c(l(a.prototype),"initializeState",this).call(this),this.setState({selectedFeatures:[],editHandles:[]})}},{key:"shouldUpdateState",value:function(t){return c(l(a.prototype),"shouldUpdateState",this).call(this,t)||t.changeFlags.stateChanged}},{key:"updateState",value:function(t){var e,A=t.props,n=t.oldProps,r=t.changeFlags;(c(l(a.prototype),"updateState",this).call(this,{oldProps:n,props:A,changeFlags:r}),!r.propsOrDataChanged||0!==Object.keys(n).length&&A.mode===n.mode)||("function"===typeof A.mode?e=new(0,A.mode):"string"===typeof A.mode?(e=R[A.mode],console.warn("Deprecated use of passing `mode` as a string. Pass the mode's class constructor instead.")):e=A.mode,e||(console.warn("No mode configured for ".concat(String(A.mode))),e=new F),e!==this.state.mode&&this.setState({mode:e,cursor:null}));var i=[];Array.isArray(A.selectedFeatureIndexes)&&(i=A.selectedFeatureIndexes.map((function(t){return A.data.features[t]}))),this.setState({selectedFeatures:i})}},{key:"getModeProps",value:function(t){var e=this;return{modeConfig:t.modeConfig,data:t.data,selectedIndexes:t.selectedFeatureIndexes,lastPointerMoveEvent:this.state.lastPointerMoveEvent,cursor:this.state.cursor,onEdit:function(A){e.setNeedsUpdate(),t.onEdit(A)},onUpdateCursor:function(t){e.setState({cursor:t})}}}},{key:"selectionAwareAccessor",value:function(t){var e=this;return"function"!==typeof t?t:function(A){return t(A,e.isFeatureSelected(A),e.props.mode)}}},{key:"isFeatureSelected",value:function(t){if(!this.props.data||!this.props.selectedFeatureIndexes)return!1;if(!this.props.selectedFeatureIndexes.length)return!1;var e=this.props.data.features.indexOf(t);return this.props.selectedFeatureIndexes.includes(e)}},{key:"getPickingInfo",value:function(t){var e=t.info;return t.sourceLayer.id.endsWith("guides")&&(e.isGuide=!0),e}},{key:"createGuidesLayers",value:function(){var t,e=this.getActiveMode().getGuides(this.getModeProps(this.props));return e&&e.features.length?(t="icon"===this.props.editHandleType?{type:r.IconLayer,iconAtlas:this.props.editHandleIconAtlas,iconMapping:this.props.editHandleIconMapping,sizeScale:this.props.editHandleIconSizeScale,getIcon:w(this.props.getEditHandleIcon),getSize:w(this.props.getEditHandleIconSize),getColor:w(this.props.getEditHandleIconColor),getAngle:w(this.props.getEditHandleIconAngle)}:{type:r.ScatterplotLayer,radiusScale:this.props.editHandlePointRadiusScale,stroked:this.props.editHandlePointOutline,getLineWidth:this.props.editHandlePointStrokeWidth,radiusMinPixels:this.props.editHandlePointRadiusMinPixels,radiusMaxPixels:this.props.editHandlePointRadiusMaxPixels,getRadius:w(this.props.getEditHandlePointRadius),getFillColor:w(this.props.getEditHandlePointColor),getLineColor:w(this.props.getEditHandlePointOutlineColor)},[new r.GeoJsonLayer(this.getSubLayerProps({id:"guides",data:e,fp64:this.props.fp64,_subLayerProps:{points:t},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:w(this.props.getTentativeLineColor),getLineWidth:w(this.props.getTentativeLineWidth),getFillColor:w(this.props.getTentativeFillColor)}))]):[]}},{key:"createTooltipsLayers",value:function(){var t=this.getActiveMode().getTooltips(this.getModeProps(this.props));return[new r.TextLayer(this.getSubLayerProps({id:"tooltips",data:t}))]}},{key:"onLayerClick",value:function(t){this.getActiveMode().handleClick(t,this.getModeProps(this.props))}},{key:"onLayerKeyUp",value:function(t){this.getActiveMode().handleKeyUp(t,this.getModeProps(this.props))}},{key:"onStartDragging",value:function(t){this.getActiveMode().handleStartDragging(t,this.getModeProps(this.props))}},{key:"onDragging",value:function(t){this.getActiveMode().handleDragging(t,this.getModeProps(this.props))}},{key:"onStopDragging",value:function(t){this.getActiveMode().handleStopDragging(t,this.getModeProps(this.props))}},{key:"onPointerMove",value:function(t){this.setState({lastPointerMoveEvent:t}),this.getActiveMode().handlePointerMove(t,this.getModeProps(this.props))}},{key:"getCursor",value:function(t){var e=t.isDragging,A=this.state.cursor;return A||(A=e?"grabbing":"grab"),A}},{key:"getActiveMode",value:function(){return this.state.mode}}])&&g(A.prototype,n),i&&g(A,i),a}(o.default);e.default=U,h(U,"layerName","EditableGeoJsonLayer"),h(U,"defaultProps",D)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModifyMode=void 0;var n,r=(n=A(776))&&n.__esModule?n:{default:n},i=A(85),o=A(245),a=A(172),s=A(359);function g(t){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||I(t)||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(t,e){if(t){if("string"===typeof t)return u(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return!e||"object"!==g(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):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(t){return!1}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Q=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(u,t);var e,A,n,a,g=(e=u,function(){var t,A=f(e);if(B()){var n=f(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return h(this,t)});function u(){return l(this,u),g.apply(this,arguments)}return A=u,(n=[{key:"getGuides",value:function(t){var e,A=this,n=[],r=t.data,a=t.lastPointerMoveEvent,s=r.features,g=a&&a.picks,u=a&&a.mapCoords,l=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=I(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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 n,r,i=!0,o=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){o=!0,r=t},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw r}}}}(t.selectedIndexes);try{for(l.s();!(e=l.n()).done;){var C=e.value;if(C<s.length){var h=s[C].geometry;n.push.apply(n,c((0,o.getEditHandlesForGeometry)(h,C)))}else console.warn("selectedFeatureIndexes out of range ".concat(C))}}catch(v){l.e(v)}finally{l.f()}if(g&&g.length&&u){var B=!(0,o.getPickedExistingEditHandle)(g)&&g.find((function(t){return!t.isGuide}));if(B&&!B.object.geometry.type.includes("Point")&&t.selectedIndexes.includes(B.index)){var f=null,d=[],Q=(0,i.point)(u);if((0,o.recursivelyTraverseNestedArrays)(B.object.geometry.coordinates,[],(function(e,n){var r=(0,i.lineString)(e),o=A.nearestPointOnLine(r,Q,t.modeConfig&&t.modeConfig.viewport);(!f||o.properties.dist<f.properties.dist)&&(f=o,d=n)})),f){var E=f,p=E.geometry.coordinates,y=E.properties.index;n.push({type:"Feature",properties:{guideType:"editHandle",editHandleType:"intermediate",featureIndex:B.index,positionIndexes:[].concat(c(d),[y+1])},geometry:{type:"Point",coordinates:p}})}}}return{type:"FeatureCollection",features:n}}},{key:"nearestPointOnLine",value:function(t,e,A){if(t.geometry.coordinates.some((function(t){return t.length>2}))){if(A)return(0,o.nearestPointOnProjectedLine)(t,e,A);console.log("Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.")}return(0,r.default)(t,e)}},{key:"handleClick",value:function(t,e){var A=(0,o.getPickedExistingEditHandle)(t.picks),n=(0,o.getPickedIntermediateEditHandle)(t.picks);if(A){var r,i=A.properties,a=i.featureIndex,g=i.positionIndexes;try{r=new s.ImmutableFeatureCollection(e.data).removePosition(a,g).getObject()}catch(C){}r&&e.onEdit({updatedData:r,editType:"removePosition",editContext:{featureIndexes:[a],positionIndexes:g,position:A.geometry.coordinates}})}else if(n){var c=n.properties,I=c.featureIndex,u=c.positionIndexes,l=new s.ImmutableFeatureCollection(e.data).addPosition(I,u,n.geometry.coordinates).getObject();l&&e.onEdit({updatedData:l,editType:"addPosition",editContext:{featureIndexes:[I],positionIndexes:u,position:n.geometry.coordinates}})}}},{key:"handleDragging",value:function(t,e){var A=(0,o.getPickedEditHandle)(t.pointerDownPicks);if(A){t.cancelPan();var n=A.properties,r=new s.ImmutableFeatureCollection(e.data).replacePosition(n.featureIndex,n.positionIndexes,t.mapCoords).getObject();e.onEdit({updatedData:r,editType:"movePosition",editContext:{featureIndexes:[n.featureIndex],positionIndexes:n.positionIndexes,position:t.mapCoords}})}}},{key:"handlePointerMove",value:function(t,e){var A=this.getCursor(t);e.onUpdateCursor(A)}},{key:"handleStartDragging",value:function(t,e){var A=e.selectedIndexes,n=(0,o.getPickedIntermediateEditHandle)(t.picks);if(A.length&&n){var r=n.properties,i=new s.ImmutableFeatureCollection(e.data).addPosition(r.featureIndex,r.positionIndexes,t.mapCoords).getObject();e.onEdit({updatedData:i,editType:"addPosition",editContext:{featureIndexes:[r.featureIndex],positionIndexes:r.positionIndexes,position:t.mapCoords}})}}},{key:"handleStopDragging",value:function(t,e){var A=e.selectedIndexes,n=(0,o.getPickedEditHandle)(t.picks);if(A.length&&n){var r=n.properties,i=new s.ImmutableFeatureCollection(e.data).replacePosition(r.featureIndex,r.positionIndexes,t.mapCoords).getObject();e.onEdit({updatedData:i,editType:"finishMovePosition",editContext:{featureIndexes:[r.featureIndex],positionIndexes:r.positionIndexes,position:t.mapCoords}})}}},{key:"getCursor",value:function(t){var e=t&&t.picks||[];return(0,o.getPickedEditHandles)(e).length?"cell":null}}])&&C(A.prototype,n),a&&C(A,a),u}(a.GeoJsonEditMode);e.ModifyMode=Q},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TranslateMode=void 0;var n=g(A(294)),r=g(A(258)),i=g(A(1115)),o=A(85),a=A(172),s=A(359);function g(t){return t&&t.__esModule?t:{default:t}}function c(t){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return!e||"object"!==c(e)&&"function"!==typeof e?C(t):e}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var Q=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(Q,t);var e,A,a,g,c=(e=Q,function(){var t,A=B(e);if(h()){var n=B(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return l(this,t)});function Q(){var t;I(this,Q);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return d(C(t=c.call.apply(c,[this].concat(A))),"_geometryBeforeTranslate",void 0),d(C(t),"_isTranslatable",void 0),t}return A=Q,(a=[{key:"handleDragging",value:function(t,e){if(this._isTranslatable){if(this._geometryBeforeTranslate){var A=this.getTranslateAction(t.pointerDownMapCoords,t.mapCoords,"translating",e);A&&e.onEdit(A)}t.cancelPan()}}},{key:"handlePointerMove",value:function(t,e){this._isTranslatable=this.isSelectionPicked(t.pointerDownPicks||t.picks,e),this.updateCursor(e)}},{key:"handleStartDragging",value:function(t,e){this._isTranslatable&&(this._geometryBeforeTranslate=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleStopDragging",value:function(t,e){if(this._geometryBeforeTranslate){var A=this.getTranslateAction(t.pointerDownMapCoords,t.mapCoords,"translated",e);A&&e.onEdit(A),this._geometryBeforeTranslate=null}}},{key:"updateCursor",value:function(t){this._isTranslatable?t.onUpdateCursor("move"):t.onUpdateCursor(null)}},{key:"getTranslateAction",value:function(t,e,A,a){if(!this._geometryBeforeTranslate)return null;for(var g=(0,o.point)(t),c=(0,o.point)(e),I=(0,r.default)(g,c),u=(0,n.default)(g,c),l=(0,i.default)(this._geometryBeforeTranslate,I,u),C=new s.ImmutableFeatureCollection(a.data),h=a.selectedIndexes,B=0;B<h.length;B++){var f=h[B],d=l.features[B];C=C.replaceGeometry(f,d.geometry)}return{updatedData:C.getObject(),editType:A,editContext:{featureIndexes:h}}}}])&&u(A.prototype,a),g&&u(A,g),Q}(a.GeoJsonEditMode);e.TranslateMode=Q},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(85),r=A(153);function i(t,e){void 0===e&&(e={});var A=r.getGeom(t);A.type;return a(A.coordinates,e.properties?e.properties:"Feature"===t.type?t.properties:{})}function o(t,e){void 0===e&&(e={});var A=r.getGeom(t),i=(A.type,A.coordinates),o=e.properties?e.properties:"Feature"===t.type?t.properties:{},s=[];return i.forEach((function(t){s.push(a(t,o))})),n.featureCollection(s)}function a(t,e){return t.length>1?n.multiLineString(t,e):n.lineString(t[0],e)}e.default=function(t,e){void 0===e&&(e={});var A=r.getGeom(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),A.type){case"Polygon":return i(A,e);case"MultiPolygon":return o(A,e);default:throw new Error("invalid poly")}},e.polygonToLine=i,e.multiPolygonToLine=o,e.coordsToLine=a},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPolygonMode=void 0;var n=A(245);function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return o(t,e)}(t)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e,A){return(g="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function c(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var C=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(h,t);var e,A,r,o,C=(e=h,function(){var t,A=u(e);if(I()){var n=u(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return c(this,t)});function h(){return a(this,h),C.apply(this,arguments)}return A=h,(r=[{key:"createTentativeFeature",value:function(t){var e,A=t.lastPointerMoveEvent,n=this.getClickSequence(),r=A?[A.mapCoords]:[];return 1===n.length||2===n.length?e={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(i(n),r)}}:n.length>2&&(e={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(i(n),r,[n[0]])]}}),e}},{key:"getGuides",value:function(t){var e,A=this.getClickSequence(),n={type:"FeatureCollection",features:[]},r=this.createTentativeFeature(t);r&&n.features.push(r);var o=A.map((function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}}));return(e=n.features).push.apply(e,i(o)),n}},{key:"handleClick",value:function(t,e){var A=t.picks,r=(0,n.getPickedEditHandle)(A),o=!1;r||(this.addClickSequence(t),o=!0);var a=this.getClickSequence();if(a.length>2&&r&&Array.isArray(r.properties.positionIndexes)&&(0===r.properties.positionIndexes[0]||r.properties.positionIndexes[0]===a.length-1)){var s={type:"Polygon",coordinates:[[].concat(i(a),[a[0]])]};this.resetClickSequence();var g=this.getAddFeatureOrBooleanPolygonAction(s,e);g&&e.onEdit(g)}else o&&e.onEdit({updatedData:e.data,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}},{key:"handleKeyUp",value:function(t,e){if("Enter"===t.key){var A=this.getClickSequence();if(A.length>2){var n={type:"Polygon",coordinates:[[].concat(i(A),[A[0]])]};this.resetClickSequence();var r=this.getAddFeatureOrBooleanPolygonAction(n,e);r&&e.onEdit(r)}}}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),g(u(h.prototype),"handlePointerMove",this).call(this,t,e)}}])&&s(A.prototype,r),o&&s(A,o),h}(A(172).GeoJsonEditMode);e.DrawPolygonMode=C},function(t,e,A){"use strict";function n(t,e){if(t===e)return!0;if(Array.isArray(t)){var A=t.length;if(!e||e.length!==A)return!1;for(var n=0;n<A;n++)if(t[n]!==e[n])return!1;return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,A={};return function(r){for(var i in r)if(!n(r[i],A[i])){e=t(r),A=r;break}return e}}},function(t,e,A){"use strict";A.d(e,"a",(function(){return c}));var n=A(6),r=A.n(n),i=A(11),o=A(203),a=A(569),s=A(154),g={};function c(t){return I.apply(this,arguments)}function I(){return(I=Object(i.a)(r.a.mark((function t(e){var A,n,i=arguments;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=i.length>1&&void 0!==i[1]?i[1]:null,n=i.length>2&&void 0!==i[2]?i[2]:{},A&&(e=u(e,A,n)),g[e]=g[e]||l(e),t.next=6,g[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function u(t,e,A){var n=A.modules||{};return n[t]?n[t]:o.b?A.CDN?(Object(s.a)(A.CDN.startsWith("http")),"".concat(A.CDN,"/").concat(e,"@").concat("2.3.13","/dist/libs/").concat(t)):o.c?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function l(t){return C.apply(this,arguments)}function C(){return(C=Object(i.a)(r.a.mark((function t(e){var A,n,i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return A=t.sent,t.next=6,A.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(o.b){t.next=9;break}return t.abrupt("return",a.requireFromFile&&a.requireFromFile(e));case 9:if(!o.c){t.next=11;break}return t.abrupt("return",importScripts(e));case 11:return t.next=13,fetch(e);case 13:return n=t.sent,t.next=16,n.text();case 16:return i=t.sent,t.abrupt("return",h(i,e));case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t,e){if(!o.b)return a.requireFromString&&a.requireFromString(t,e);if(o.c)return eval.call(o.a,t),null;var A=document.createElement("script");A.id=e;try{A.appendChild(document.createTextNode(t))}catch(n){A.text=t}return document.body.appendChild(A),null}},function(t,e,A){"use strict";function n(t){if(!t||!t.POSITION)return null;var e=1/0,A=1/0,n=1/0,r=-1/0,i=-1/0,o=-1/0,a=t.POSITION.value,s=a&&a.length;if(!s)return null;for(var g=0;g<s;g+=3){var c=a[g],I=a[g+1],u=a[g+2];e=c<e?c:e,A=I<A?I:A,n=u<n?u:n,r=c>r?c:r,i=I>i?I:i,o=u>o?u:o}return[[e,A,n],[r,i,o]]}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";A.r(e);var n=A(866);A.d(e,"SimpleMeshLayer",(function(){return n.a}));var r=A(863);A.d(e,"ScenegraphLayer",(function(){return r.a}))},function(t,e,A){"use strict";function n(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(e,A){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r(this,"objects",void 0),r(this,"originals",void 0),r(this,"updateTrigger",void 0),r(this,"_idToPosition",void 0),r(this,"_getData",void 0),r(this,"_convert",void 0),this.objects=[],this.originals=[],this.updateTrigger=0,this._idToPosition=new Map,this._getData=e,this._convert=A}var e,A,i;return e=t,(A=[{key:"updateAllDeckObjects",value:function(){var t=this;this._getData&&this._convert&&(this.originals.length=0,this.objects.length=0,this._idToPosition.clear(),this._getData().forEach((function(e){t._idToPosition.set(e.id,t.objects.length),t.originals.push(e),t.objects.push(t._convert(e))})),this.triggerUpdate())}},{key:"updateDeckObjectsByIds",value:function(t){var e=this;this._getData&&this._convert&&(t.forEach((function(t){var A=e._idToPosition.get(t);void 0!==A&&(e.objects[A]=e._convert(e.originals[A]))})),this.triggerUpdate())}},{key:"triggerUpdate",value:function(){this.updateTrigger++}},{key:"getDeckObjectById",value:function(t){var e=this._idToPosition.get(t);return void 0!==e?this.objects[e]:null}},{key:"getOriginalById",value:function(t){var e=this._idToPosition.get(t);return void 0!==e?this.originals[e]:null}}])&&n(e.prototype,A),i&&n(e,i),t}();e.default=i},function(t,e,A){var n=A(1068),r=A(911);t.exports=function(t,e,A,i){var o=!A;A||(A={});for(var a=-1,s=e.length;++a<s;){var g=e[a],c=i?i(A[g],t[g],g,A,t):void 0;void 0===c&&(c=t[g]),o?r(A,g,c):n(A,g,c)}return A}},function(t,e,A){var n=A(725);t.exports=function(t){if(!n(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,A){"use strict";A.r(e);var n={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 r(t,e,A){if(!c(A=A||{}))throw new Error("options is invalid");var n=A.bbox,r=A.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");n&&I(n),r&&u(r);var i={type:"Feature"};return r&&(i.id=r),n&&(i.bbox=n),i.properties=e||{},i.geometry=t,i}function i(t,e,A){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!g(t[0])||!g(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,A)}function o(t,e){if(!c(e=e||{}))throw new Error("options is invalid");var A=e.bbox,n=e.id;if(!t)throw new Error("No features passed");if(!Array.isArray(t))throw new Error("features must be an Array");A&&I(A),n&&u(n);var r={type:"FeatureCollection"};return n&&(r.id=n),A&&(r.bbox=A),r.features=t,r}function a(t,e){if(void 0===t||null===t)throw new Error("radians is required");if(e&&"string"!==typeof e)throw new Error("units must be a string");var A=n[e||"kilometers"];if(!A)throw new Error(e+" units is invalid");return t*A}function s(t,e){if(void 0===t||null===t)throw new Error("distance is required");if(e&&"string"!==typeof e)throw new Error("units must be a string");var A=n[e||"kilometers"];if(!A)throw new Error(e+" units is invalid");return t/A}function g(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function c(t){return!!t&&t.constructor===Object}function I(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!g(t))throw new Error("bbox must only contain numbers")}))}function u(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}function l(t,e,A){if(null!==t)for(var n,r,i,o,a,s,g,c,I=0,u=0,C=t.type,h="FeatureCollection"===C,B="Feature"===C,f=h?t.features.length:1,d=0;d<f;d++){a=(c=!!(g=h?t.features[d].geometry:B?t.geometry:t)&&"GeometryCollection"===g.type)?g.geometries.length:1;for(var Q=0;Q<a;Q++){var E=0,p=0;if(null!==(o=c?g.geometries[Q]:g)){s=o.coordinates;var y=o.type;switch(I=!A||"Polygon"!==y&&"MultiPolygon"!==y?0:1,y){case null:break;case"Point":if(!1===e(s,u,d,E,p))return!1;u++,E++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===e(s[n],u,d,E,p))return!1;u++,"MultiPoint"===y&&E++}"LineString"===y&&E++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(r=0;r<s[n].length-I;r++){if(!1===e(s[n][r],u,d,E,p))return!1;u++}"MultiLineString"===y&&E++,"Polygon"===y&&p++}"Polygon"===y&&E++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for("MultiPolygon"===y&&(p=0),r=0;r<s[n].length;r++){for(i=0;i<s[n][r].length-I;i++){if(!1===e(s[n][r][i],u,d,E,p))return!1;u++}p++}E++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===l(o.geometries[n],e,A))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function C(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var A=0;A<t.features.length&&!1!==e(t.features[A],A);A++);}function h(t,e){var A,n,r,i,o,a,s,g,c,I,u=0,l="FeatureCollection"===t.type,C="Feature"===t.type,h=l?t.features.length:1;for(A=0;A<h;A++){for(a=l?t.features[A].geometry:C?t.geometry:t,g=l?t.features[A].properties:C?t.properties:{},c=l?t.features[A].bbox:C?t.bbox:void 0,I=l?t.features[A].id:C?t.id:void 0,o=(s=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,r=0;r<o;r++)if(null!==(i=s?a.geometries[r]:a))switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(i,u,g,c,I))return!1;break;case"GeometryCollection":for(n=0;n<i.geometries.length;n++)if(!1===e(i.geometries[n],u,g,c,I))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,u,g,c,I))return!1;u++}}var B=function(t){var e=[1/0,1/0,-1/0,-1/0];return l(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e};var f=function(t,e){if(!c(e=e||{}))throw new Error("options is invalid");var A=e.properties;if(!t)throw new Error("geojson is required");var n=B(t);return i([(n[0]+n[2])/2,(n[1]+n[3])/2],A)},d=A(609);function Q(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function E(t){return!!t&&t.constructor===Object}function p(t,e,A){if(null!==t)for(var n,r,i,o,a,s,g,c,I=0,u=0,l=t.type,C="FeatureCollection"===l,h="Feature"===l,B=C?t.features.length:1,f=0;f<B;f++){a=(c=!!(g=C?t.features[f].geometry:h?t.geometry:t)&&"GeometryCollection"===g.type)?g.geometries.length:1;for(var d=0;d<a;d++){var Q=0,E=0;if(null!==(o=c?g.geometries[d]:g)){s=o.coordinates;var y=o.type;switch(I=!A||"Polygon"!==y&&"MultiPolygon"!==y?0:1,y){case null:break;case"Point":if(!1===e(s,u,f,Q,E))return!1;u++,Q++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===e(s[n],u,f,Q,E))return!1;u++,"MultiPoint"===y&&Q++}"LineString"===y&&Q++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(r=0;r<s[n].length-I;r++){if(!1===e(s[n][r],u,f,Q,E))return!1;u++}"MultiLineString"===y&&Q++,"Polygon"===y&&E++}"Polygon"===y&&Q++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for("MultiPolygon"===y&&(E=0),r=0;r<s[n].length;r++){for(i=0;i<s[n][r].length-I;i++){if(!1===e(s[n][r][i],u,f,Q,E))return!1;u++}E++}Q++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===p(o.geometries[n],e,A))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}var y=A(345);function v(t,e,A){if(!E(A=A||{}))throw new Error("options is invalid");var n=A.mutate;if(!t)throw new Error("geojson is required");return Array.isArray(t)&&Q(t[0])?t="mercator"===e?m(t):b(t):(!0!==n&&(t=Object(y.a)(t)),p(t,(function(t){var A="mercator"===e?m(t):b(t);t[0]=A[0],t[1]=A[1]}))),t}function m(t){var e,A=Math.PI/180,n=6378137,r=20037508.342789244,i=[n*(Math.abs(t[0])<=180?t[0]:t[0]-360*((e=t[0])<0?-1:e>0?1:0))*A,n*Math.log(Math.tan(.25*Math.PI+.5*t[1]*A))];return i[0]>r&&(i[0]=r),i[0]<-r&&(i[0]=-r),i[1]>r&&(i[1]=r),i[1]<-r&&(i[1]=-r),i}function b(t){var e=180/Math.PI,A=6378137;return[t[0]*e/A,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/A)))*e]}var F=function(){return new w};function w(){this.reset()}w.prototype={constructor:w,reset:function(){this.s=this.t=0},add:function(t){D(S,t,this.t),D(this,S.s,this.s),this.s?this.t+=S.t:this.s=S.t},valueOf:function(){return this.s}};var S=new w;function D(t,e,A){var n=t.s=e+A,r=n-e,i=n-r;t.t=e-i+(A-r)}var R=1e-6,U=Math.PI,G=U/2,N=U/4,k=2*U,x=180/U,O=U/180,M=Math.abs,L=Math.atan,_=Math.atan2,J=Math.cos,T=(Math.ceil,Math.exp),j=(Math.floor,Math.log),H=(Math.pow,Math.sin),Y=(Math.sign,Math.sqrt),V=Math.tan;function Z(t){return t>1?0:t<-1?U:Math.acos(t)}function W(t){return t>1?G:t<-1?-G:Math.asin(t)}function K(){}function P(t,e){t&&X.hasOwnProperty(t.type)&&X[t.type](t,e)}var q={Feature:function(t,e){P(t.geometry,e)},FeatureCollection:function(t,e){for(var A=t.features,n=-1,r=A.length;++n<r;)P(A[n].geometry,e)}},X={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)t=A[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){z(t.coordinates,e,0)},MultiLineString:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)z(A[n],e,0)},Polygon:function(t,e){$(t.coordinates,e)},MultiPolygon:function(t,e){for(var A=t.coordinates,n=-1,r=A.length;++n<r;)$(A[n],e)},GeometryCollection:function(t,e){for(var A=t.geometries,n=-1,r=A.length;++n<r;)P(A[n],e)}};function z(t,e,A){var n,r=-1,i=t.length-A;for(e.lineStart();++r<i;)n=t[r],e.point(n[0],n[1],n[2]);e.lineEnd()}function $(t,e){var A=-1,n=t.length;for(e.polygonStart();++A<n;)z(t[A],e,1);e.polygonEnd()}var tt=function(t,e){t&&q.hasOwnProperty(t.type)?q[t.type](t,e):P(t,e)};F(),F();function et(t){return[_(t[1],t[0]),W(t[2])]}function At(t){var e=t[0],A=t[1],n=J(A);return[n*J(e),n*H(e),H(A)]}function nt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function rt(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function it(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ot(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function at(t){var e=Y(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}F();var st=function(t,e){function A(A,n){return A=t(A,n),e(A[0],A[1])}return t.invert&&e.invert&&(A.invert=function(A,n){return(A=e.invert(A,n))&&t.invert(A[0],A[1])}),A};function gt(t,e){return[t>U?t-k:t<-U?t+k:t,e]}function ct(t,e,A){return(t%=k)?e||A?st(ut(t),lt(e,A)):ut(t):e||A?lt(e,A):gt}function It(t){return function(e,A){return[(e+=t)>U?e-k:e<-U?e+k:e,A]}}function ut(t){var e=It(t);return e.invert=It(-t),e}function lt(t,e){var A=J(t),n=H(t),r=J(e),i=H(e);function o(t,e){var o=J(e),a=J(t)*o,s=H(t)*o,g=H(e),c=g*A+a*n;return[_(s*r-c*i,a*A-g*n),W(c*r+s*i)]}return o.invert=function(t,e){var o=J(e),a=J(t)*o,s=H(t)*o,g=H(e),c=g*r-s*i;return[_(s*r+g*i,a*A+c*n),W(c*A-a*n)]},o}gt.invert=gt;function Ct(t,e,A,n,r,i){if(A){var o=J(e),a=H(e),s=n*A;null==r?(r=e+n*k,i=e-s/2):(r=ht(o,r),i=ht(o,i),(n>0?r<i:r>i)&&(r+=n*k));for(var g,c=r;n>0?c>i:c<i;c-=s)g=et([o,-a*J(c),-a*H(c)]),t.point(g[0],g[1])}}function ht(t,e){(e=At(e))[0]-=t,at(e);var A=Z(-e[1]);return((-e[2]<0?-A:A)+k-R)%k}var Bt=function(){var t,e=[];return{point:function(e,A){t.push([e,A])},lineStart:function(){e.push(t=[])},lineEnd:K,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var A=e;return e=[],t=null,A}}},ft=function(t,e){return M(t[0]-e[0])<R&&M(t[1]-e[1])<R};function dt(t,e,A,n){this.x=t,this.z=e,this.o=A,this.e=n,this.v=!1,this.n=this.p=null}var Qt=function(t,e,A,n,r){var i,o,a=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,A,n=t[0],o=t[e];if(ft(n,o)){for(r.lineStart(),i=0;i<e;++i)r.point((n=t[i])[0],n[1]);r.lineEnd()}else a.push(A=new dt(n,t,null,!0)),s.push(A.o=new dt(n,null,A,!1)),a.push(A=new dt(o,t,null,!1)),s.push(A.o=new dt(o,null,A,!0))}})),a.length){for(s.sort(e),Et(a),Et(s),i=0,o=s.length;i<o;++i)s[i].e=A=!A;for(var g,c,I=a[0];;){for(var u=I,l=!0;u.v;)if((u=u.n)===I)return;g=u.z,r.lineStart();do{if(u.v=u.o.v=!0,u.e){if(l)for(i=0,o=g.length;i<o;++i)r.point((c=g[i])[0],c[1]);else n(u.x,u.n.x,1,r);u=u.n}else{if(l)for(g=u.p.z,i=g.length-1;i>=0;--i)r.point((c=g[i])[0],c[1]);else n(u.x,u.p.x,-1,r);u=u.p}g=(u=u.o).z,l=!l}while(!u.v);r.lineEnd()}}};function Et(t){if(e=t.length){for(var e,A,n=0,r=t[0];++n<e;)r.n=A=t[n],A.p=r,r=A;r.n=A=t[0],A.p=r}}var pt=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var yt=function(t){var e;return 1===t.length&&(e=t,t=function(t,A){return pt(e(t),A)}),{left:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)<0?n=i+1:r=i}return n},right:function(e,A,n,r){for(null==n&&(n=0),null==r&&(r=e.length);n<r;){var i=n+r>>>1;t(e[i],A)>0?r=i:n=i+1}return n}}}(pt);yt.right,yt.left;var vt=Array.prototype;vt.slice,vt.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var mt=function(t){for(var e,A,n,r=t.length,i=-1,o=0;++i<r;)o+=t[i].length;for(A=new Array(o);--r>=0;)for(e=(n=t[r]).length;--e>=0;)A[--o]=n[e];return A};function bt(t,e,A,n){function r(r,i){return t<=r&&r<=A&&e<=i&&i<=n}function i(r,i,a,g){var c=0,I=0;if(null==r||(c=o(r,a))!==(I=o(i,a))||s(r,i)<0^a>0)do{g.point(0===c||3===c?t:A,c>1?n:e)}while((c=(c+a+4)%4)!==I);else g.point(i[0],i[1])}function o(n,r){return M(n[0]-t)<R?r>0?0:3:M(n[0]-A)<R?r>0?2:1:M(n[1]-e)<R?r>0?1:0:r>0?3:2}function a(t,e){return s(t.x,e.x)}function s(t,e){var A=o(t,1),n=o(e,1);return A!==n?A-n:0===A?e[1]-t[1]:1===A?t[0]-e[0]:2===A?t[1]-e[1]:e[0]-t[0]}return function(o){var s,g,c,I,u,l,C,h,B,f,d,Q=o,E=Bt(),p={point:y,lineStart:function(){p.point=v,g&&g.push(c=[]);f=!0,B=!1,C=h=NaN},lineEnd:function(){s&&(v(I,u),l&&B&&E.rejoin(),s.push(E.result()));p.point=y,B&&Q.lineEnd()},polygonStart:function(){Q=E,s=[],g=[],d=!0},polygonEnd:function(){var e=function(){for(var e=0,A=0,r=g.length;A<r;++A)for(var i,o,a=g[A],s=1,c=a.length,I=a[0],u=I[0],l=I[1];s<c;++s)i=u,o=l,I=a[s],u=I[0],l=I[1],o<=n?l>n&&(u-i)*(n-o)>(l-o)*(t-i)&&++e:l<=n&&(u-i)*(n-o)<(l-o)*(t-i)&&--e;return e}(),A=d&&e,r=(s=mt(s)).length;(A||r)&&(o.polygonStart(),A&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),r&&Qt(s,a,e,i,o),o.polygonEnd());Q=o,s=g=c=null}};function y(t,e){r(t,e)&&Q.point(t,e)}function v(i,o){var a=r(i,o);if(g&&c.push([i,o]),f)I=i,u=o,l=a,f=!1,a&&(Q.lineStart(),Q.point(i,o));else if(a&&B)Q.point(i,o);else{var s=[C=Math.max(-1e9,Math.min(1e9,C)),h=Math.max(-1e9,Math.min(1e9,h))],E=[i=Math.max(-1e9,Math.min(1e9,i)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,A,n,r,i){var o,a=t[0],s=t[1],g=0,c=1,I=e[0]-a,u=e[1]-s;if(o=A-a,I||!(o>0)){if(o/=I,I<0){if(o<g)return;o<c&&(c=o)}else if(I>0){if(o>c)return;o>g&&(g=o)}if(o=r-a,I||!(o<0)){if(o/=I,I<0){if(o>c)return;o>g&&(g=o)}else if(I>0){if(o<g)return;o<c&&(c=o)}if(o=n-s,u||!(o>0)){if(o/=u,u<0){if(o<g)return;o<c&&(c=o)}else if(u>0){if(o>c)return;o>g&&(g=o)}if(o=i-s,u||!(o<0)){if(o/=u,u<0){if(o>c)return;o>g&&(g=o)}else if(u>0){if(o<g)return;o<c&&(c=o)}return g>0&&(t[0]=a+g*I,t[1]=s+g*u),c<1&&(e[0]=a+c*I,e[1]=s+c*u),!0}}}}}(s,E,t,e,A,n)?a&&(Q.lineStart(),Q.point(i,o),d=!1):(B||(Q.lineStart(),Q.point(s[0],s[1])),Q.point(E[0],E[1]),a||Q.lineEnd(),d=!1)}C=i,h=o,B=a}return p}}var Ft=F(),wt=function(t,e){var A=e[0],n=e[1],r=[H(A),-J(A),0],i=0,o=0;Ft.reset();for(var a=0,s=t.length;a<s;++a)if(c=(g=t[a]).length)for(var g,c,I=g[c-1],u=I[0],l=I[1]/2+N,C=H(l),h=J(l),B=0;B<c;++B,u=d,C=E,h=p,I=f){var f=g[B],d=f[0],Q=f[1]/2+N,E=H(Q),p=J(Q),y=d-u,v=y>=0?1:-1,m=v*y,b=m>U,F=C*E;if(Ft.add(_(F*v*H(m),h*p+F*J(m))),i+=b?y+v*k:y,b^u>=A^d>=A){var w=rt(At(I),At(f));at(w);var S=rt(r,w);at(S);var D=(b^y>=0?-1:1)*W(S[2]);(n>D||n===D&&(w[0]||w[1]))&&(o+=b^y>=0?1:-1)}}return(i<-R||i<R&&Ft<-R)^1&o};F();var St=function(t){return t};F(),F();var Dt=1/0,Rt=Dt,Ut=-Dt,Gt=Ut;var Nt={point:function(t,e){t<Dt&&(Dt=t);t>Ut&&(Ut=t);e<Rt&&(Rt=e);e>Gt&&(Gt=e)},lineStart:K,lineEnd:K,polygonStart:K,polygonEnd:K,result:function(){var t=[[Dt,Rt],[Ut,Gt]];return Ut=Gt=-(Rt=Dt=1/0),t}};function kt(t){this._context=t}kt.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,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(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,k)}},result:K};F();function xt(){this._string=[]}function Ot(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}xt.prototype={_radius:4.5,_circle:Ot(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,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(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ot(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Mt=function(t,e,A,n){return function(r,i){var o,a,s,g=e(i),c=r.invert(n[0],n[1]),I=Bt(),u=e(I),l=!1,C={point:h,lineStart:f,lineEnd:d,polygonStart:function(){C.point=Q,C.lineStart=E,C.lineEnd=p,a=[],o=[]},polygonEnd:function(){C.point=h,C.lineStart=f,C.lineEnd=d,a=mt(a);var t=wt(o,c);a.length?(l||(i.polygonStart(),l=!0),Qt(a,_t,t,A,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),A(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),A(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(e,A){var n=r(e,A);t(e=n[0],A=n[1])&&i.point(e,A)}function B(t,e){var A=r(t,e);g.point(A[0],A[1])}function f(){C.point=B,g.lineStart()}function d(){C.point=h,g.lineEnd()}function Q(t,e){s.push([t,e]);var A=r(t,e);u.point(A[0],A[1])}function E(){u.lineStart(),s=[]}function p(){Q(s[0][0],s[0][1]),u.lineEnd();var t,e,A,n,r=u.clean(),g=I.result(),c=g.length;if(s.pop(),o.push(s),s=null,c)if(1&r){if((e=(A=g[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t<e;++t)i.point((n=A[t])[0],n[1]);i.lineEnd()}}else c>1&&2&r&&g.push(g.pop().concat(g.shift())),a.push(g.filter(Lt))}return C}};function Lt(t){return t.length>1}function _t(t,e){return((t=t.x)[0]<0?t[1]-G-R:G-t[1])-((e=e.x)[0]<0?e[1]-G-R:G-e[1])}var Jt=Mt((function(){return!0}),(function(t){var e,A=NaN,n=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,o){var a=i>0?U:-U,s=M(i-A);M(s-U)<R?(t.point(A,n=(n+o)/2>0?G:-G),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(a,n),t.point(i,n),e=0):r!==a&&s>=U&&(M(A-r)<R&&(A-=r*R),M(i-a)<R&&(i-=a*R),n=function(t,e,A,n){var r,i,o=H(t-A);return M(o)>R?L((H(e)*(i=J(n))*H(A)-H(n)*(r=J(e))*H(t))/(r*i*o)):(e+n)/2}(A,n,i,o),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(a,n),e=0),t.point(A=i,n=o),r=a},lineEnd:function(){t.lineEnd(),A=n=NaN},clean:function(){return 2-e}}}),(function(t,e,A,n){var r;if(null==t)r=A*G,n.point(-U,r),n.point(0,r),n.point(U,r),n.point(U,0),n.point(U,-r),n.point(0,-r),n.point(-U,-r),n.point(-U,0),n.point(-U,r);else if(M(t[0]-e[0])>R){var i=t[0]<e[0]?U:-U;r=A*i/2,n.point(-i,r),n.point(0,r),n.point(i,r)}else n.point(e[0],e[1])}),[-U,-G]);var Tt=function(t,e){var A=J(t),n=A>0,r=M(A)>R;function i(t,e){return J(t)*J(e)>A}function o(t,e,n){var r=[1,0,0],i=rt(At(t),At(e)),o=nt(i,i),a=i[0],s=o-a*a;if(!s)return!n&&t;var g=A*o/s,c=-A*a/s,I=rt(r,i),u=ot(r,g);it(u,ot(i,c));var l=I,C=nt(u,l),h=nt(l,l),B=C*C-h*(nt(u,u)-1);if(!(B<0)){var f=Y(B),d=ot(l,(-C-f)/h);if(it(d,u),d=et(d),!n)return d;var Q,E=t[0],p=e[0],y=t[1],v=e[1];p<E&&(Q=E,E=p,p=Q);var m=p-E,b=M(m-U)<R;if(!b&&v<y&&(Q=y,y=v,v=Q),b||m<R?b?y+v>0^d[1]<(M(d[0]-E)<R?y:v):y<=d[1]&&d[1]<=v:m>U^(E<=d[0]&&d[0]<=p)){var F=ot(l,(-C+f)/h);return it(F,u),[d,et(F)]}}}function a(e,A){var r=n?t:U-t,i=0;return e<-r?i|=1:e>r&&(i|=2),A<-r?i|=4:A>r&&(i|=8),i}return Mt(i,(function(t){var e,A,s,g,c;return{lineStart:function(){g=s=!1,c=1},point:function(I,u){var l,C=[I,u],h=i(I,u),B=n?h?0:a(I,u):h?a(I+(I<0?U:-U),u):0;if(!e&&(g=s=h)&&t.lineStart(),h!==s&&(!(l=o(e,C))||ft(e,l)||ft(C,l))&&(C[0]+=R,C[1]+=R,h=i(C[0],C[1])),h!==s)c=0,h?(t.lineStart(),l=o(C,e),t.point(l[0],l[1])):(l=o(e,C),t.point(l[0],l[1]),t.lineEnd()),e=l;else if(r&&e&&n^h){var f;B&A||!(f=o(C,e,!0))||(c=0,n?(t.lineStart(),t.point(f[0][0],f[0][1]),t.point(f[1][0],f[1][1]),t.lineEnd()):(t.point(f[1][0],f[1][1]),t.lineEnd(),t.lineStart(),t.point(f[0][0],f[0][1])))}!h||e&&ft(e,C)||t.point(C[0],C[1]),e=C,s=h,A=B},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(g&&s)<<1}}}),(function(A,n,r,i){Ct(i,t,e,r,A,n)}),n?[0,-t]:[-U,t-U])};function jt(t){return function(e){var A=new Ht;for(var n in t)A[n]=t[n];return A.stream=e,A}}function Ht(){}function Yt(t,e,A){var n=e[1][0]-e[0][0],r=e[1][1]-e[0][1],i=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),tt(A,t.stream(Nt));var o=Nt.result(),a=Math.min(n/(o[1][0]-o[0][0]),r/(o[1][1]-o[0][1])),s=+e[0][0]+(n-a*(o[1][0]+o[0][0]))/2,g=+e[0][1]+(r-a*(o[1][1]+o[0][1]))/2;return null!=i&&t.clipExtent(i),t.scale(150*a).translate([s,g])}function Vt(t,e,A){return Yt(t,[[0,0],e],A)}Ht.prototype={constructor:Ht,point:function(t,e){this.stream.point(t,e)},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 Zt=J(30*O),Wt=function(t,e){return+e?function(t,e){function A(n,r,i,o,a,s,g,c,I,u,l,C,h,B){var f=g-n,d=c-r,Q=f*f+d*d;if(Q>4*e&&h--){var E=o+u,p=a+l,y=s+C,v=Y(E*E+p*p+y*y),m=W(y/=v),b=M(M(y)-1)<R||M(i-I)<R?(i+I)/2:_(p,E),F=t(b,m),w=F[0],S=F[1],D=w-n,U=S-r,G=d*D-f*U;(G*G/Q>e||M((f*D+d*U)/Q-.5)>.3||o*u+a*l+s*C<Zt)&&(A(n,r,i,o,a,s,w,S,b,E/=v,p/=v,y,h,B),B.point(w,S),A(w,S,b,E,p,y,g,c,I,u,l,C,h,B))}}return function(e){var n,r,i,o,a,s,g,c,I,u,l,C,h={point:B,lineStart:f,lineEnd:Q,polygonStart:function(){e.polygonStart(),h.lineStart=E},polygonEnd:function(){e.polygonEnd(),h.lineStart=f}};function B(A,n){A=t(A,n),e.point(A[0],A[1])}function f(){c=NaN,h.point=d,e.lineStart()}function d(n,r){var i=At([n,r]),o=t(n,r);A(c,I,g,u,l,C,c=o[0],I=o[1],g=n,u=i[0],l=i[1],C=i[2],16,e),e.point(c,I)}function Q(){h.point=B,e.lineEnd()}function E(){f(),h.point=p,h.lineEnd=y}function p(t,e){d(n=t,e),r=c,i=I,o=u,a=l,s=C,h.point=d}function y(){A(c,I,g,u,l,C,r,i,n,o,a,s,16,e),h.lineEnd=Q,Q()}return h}}(t,e):function(t){return jt({point:function(e,A){e=t(e,A),this.stream.point(e[0],e[1])}})}(t)};var Kt=jt({point:function(t,e){this.stream.point(t*O,e*O)}});function Pt(t){return qt((function(){return t}))()}function qt(t){var e,A,n,r,i,o,a,s,g,c,I=150,u=480,l=250,C=0,h=0,B=0,f=0,d=0,Q=null,E=Jt,p=null,y=St,v=.5,m=Wt(w,v);function b(t){return[(t=i(t[0]*O,t[1]*O))[0]*I+A,n-t[1]*I]}function F(t){return(t=i.invert((t[0]-A)/I,(n-t[1])/I))&&[t[0]*x,t[1]*x]}function w(t,r){return[(t=e(t,r))[0]*I+A,n-t[1]*I]}function S(){i=st(r=ct(B,f,d),e);var t=e(C,h);return A=u-t[0]*I,n=l+t[1]*I,D()}function D(){return g=c=null,b}return b.stream=function(t){return g&&c===t?g:g=Kt(E(r,m(y(c=t))))},b.clipAngle=function(t){return arguments.length?(E=+t?Tt(Q=t*O,6*O):(Q=null,Jt),D()):Q*x},b.clipExtent=function(t){return arguments.length?(y=null==t?(p=o=a=s=null,St):bt(p=+t[0][0],o=+t[0][1],a=+t[1][0],s=+t[1][1]),D()):null==p?null:[[p,o],[a,s]]},b.scale=function(t){return arguments.length?(I=+t,S()):I},b.translate=function(t){return arguments.length?(u=+t[0],l=+t[1],S()):[u,l]},b.center=function(t){return arguments.length?(C=t[0]%360*O,h=t[1]%360*O,S()):[C*x,h*x]},b.rotate=function(t){return arguments.length?(B=t[0]%360*O,f=t[1]%360*O,d=t.length>2?t[2]%360*O:0,S()):[B*x,f*x,d*x]},b.precision=function(t){return arguments.length?(m=Wt(w,v=t*t),D()):Y(v)},b.fitExtent=function(t,e){return Yt(b,t,e)},b.fitSize=function(t,e){return Vt(b,t,e)},function(){return e=t.apply(this,arguments),b.invert=e.invert&&F,S()}}function Xt(t){return function(e,A){var n=J(e),r=J(A),i=t(n*r);return[i*r*H(e),i*H(A)]}}function zt(t){return function(e,A){var n=Y(e*e+A*A),r=t(n),i=H(r),o=J(r);return[_(e*i,n*o),W(n&&A*i/n)]}}var $t=Xt((function(t){return Y(2/(1+t))}));$t.invert=zt((function(t){return 2*W(t/2)}));var te=Xt((function(t){return(t=Z(t))&&t/H(t)}));te.invert=zt((function(t){return t}));function ee(t,e){return[t,j(V((G+e)/2))]}ee.invert=function(t,e){return[t,2*L(T(e))-G]};function Ae(t){var e,A,n,r=Pt(t),i=r.center,o=r.scale,a=r.translate,s=r.clipExtent,g=null;function c(){var i=U*o(),a=r(function(t){function e(e){return(e=t(e[0]*O,e[1]*O))[0]*=x,e[1]*=x,e}return t=ct(t[0]*O,t[1]*O,t.length>2?t[2]*O:0),e.invert=function(e){return(e=t.invert(e[0]*O,e[1]*O))[0]*=x,e[1]*=x,e},e}(r.rotate()).invert([0,0]));return s(null==g?[[a[0]-i,a[1]-i],[a[0]+i,a[1]+i]]:t===ee?[[Math.max(a[0]-i,g),e],[Math.min(a[0]+i,A),n]]:[[g,Math.max(a[1]-i,e)],[A,Math.min(a[1]+i,n)]])}return r.scale=function(t){return arguments.length?(o(t),c()):o()},r.translate=function(t){return arguments.length?(a(t),c()):a()},r.center=function(t){return arguments.length?(i(t),c()):i()},r.clipExtent=function(t){return arguments.length?(null==t?g=e=A=n=null:(g=+t[0][0],e=+t[0][1],A=+t[1][0],n=+t[1][1]),c()):null==g?null:[[g,e],[A,n]]},c()}function ne(t,e){return[t,e]}ne.invert=ne;function re(t,e){var A=J(e),n=J(t)*A;return[A*H(t)/n,H(e)/n]}re.invert=zt(L);function ie(t,e){var A=e*e,n=A*A;return[t*(.8707-.131979*A+n*(n*(.003971*A-.001529*n)-.013791)),e*(1.007226+A*(.015085+n*(.028874*A-.044475-.005916*n)))]}ie.invert=function(t,e){var A,n=e,r=25;do{var i=n*n,o=i*i;n-=A=(n*(1.007226+i*(.015085+o*(.028874*i-.044475-.005916*o)))-e)/(1.007226+i*(.045255+o*(.259866*i-.311325-.005916*11*o)))}while(M(A)>R&&--r>0);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]};function oe(t,e){return[J(e)*H(t),H(e)]}oe.invert=zt(W);function ae(t,e){var A=J(e),n=1+J(t)*A;return[A*H(t)/n,H(e)/n]}ae.invert=zt((function(t){return 2*L(t)}));function se(t,e){return[j(V((G+e)/2)),-t]}se.invert=function(t,e){return[-e,2*L(T(t))-G]};function ge(t,e,A,n){var i,g=t.properties||{},c="Feature"===t.type?t.geometry:t;if("GeometryCollection"===c.type){var I=[];return h(t,(function(t){var r=ge(t,e,A,n);r&&I.push(r)})),o(I)}var u=B(t),l=u[1]>50&&u[3]>50;i=l?{type:c.type,coordinates:ce(c.coordinates,ue(c))}:function(t,e){return v(t,"mercator",e)}(c);var C,f=(new d.GeoJSONReader).read(i),Q=a(s(e,A),"meters"),E=d.BufferOp.bufferOp(f,Q);if(!function t(e){return Array.isArray(e[0])?t(e[0]):isNaN(e[0])}((E=(new d.GeoJSONWriter).write(E)).coordinates))return(C=l?{type:E.type,coordinates:Ie(E.coordinates,ue(c))}:function(t,e){return v(t,"wgs84",e)}(E)).geometry?C:r(C,g)}function ce(t,e){return"object"!==typeof t[0]?e(t):t.map((function(t){return ce(t,e)}))}function Ie(t,e){return"object"!==typeof t[0]?e.invert(t):t.map((function(t){return Ie(t,e)}))}function ue(t){var e=f(t).geometry.coordinates.reverse(),A=e.map((function(t){return-t}));return function(){var t=Ae(se),e=t.center,A=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?A([t[0],t[1],t.length>2?t[2]+90:90]):[(t=A())[0],t[1],t[2]-90]},A([0,0,90]).scale(159.155)}().center(e).rotate(A).scale(6371008.8)}e.default=function(t,e,A){var n=(A=A||{}).units,r=A.steps||64;if(!t)throw new Error("geojson is required");if("object"!==typeof A)throw new Error("options must be an object");if("number"!==typeof r)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(r<=0)throw new Error("steps must be greater than 0");r=r||64,n=n||"kilometers";var i=[];switch(t.type){case"GeometryCollection":return h(t,(function(t){var A=ge(t,e,n,r);A&&i.push(A)})),o(i);case"FeatureCollection":return C(t,(function(t){var A=ge(t,e,n,r);A&&C(A,(function(t){t&&i.push(t)}))})),o(i)}return ge(t,e,n,r)}},function(t,e,A){"use strict";A.r(e);function n(t,e,A){if(!o(A=A||{}))throw new Error("options is invalid");var n=A.bbox,r=A.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");n&&a(n),r&&s(r);var i={type:"Feature"};return r&&(i.id=r),n&&(i.bbox=n),i.properties=e||{},i.geometry=t,i}function r(t,e,A){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!i(t[0])||!i(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,A)}function i(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function o(t){return!!t&&t.constructor===Object}function a(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!i(t))throw new Error("bbox must only contain numbers")}))}function s(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}function g(t,e,A){if(null!==t)for(var n,r,i,o,a,s,c,I,u=0,l=0,C=t.type,h="FeatureCollection"===C,B="Feature"===C,f=h?t.features.length:1,d=0;d<f;d++){a=(I=!!(c=h?t.features[d].geometry:B?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var Q=0;Q<a;Q++){var E=0,p=0;if(null!==(o=I?c.geometries[Q]:c)){s=o.coordinates;var y=o.type;switch(u=!A||"Polygon"!==y&&"MultiPolygon"!==y?0:1,y){case null:break;case"Point":if(!1===e(s,l,d,E,p))return!1;l++,E++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===e(s[n],l,d,E,p))return!1;l++,"MultiPoint"===y&&E++}"LineString"===y&&E++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(r=0;r<s[n].length-u;r++){if(!1===e(s[n][r],l,d,E,p))return!1;l++}"MultiLineString"===y&&E++,"Polygon"===y&&p++}"Polygon"===y&&E++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for("MultiPolygon"===y&&(p=0),r=0;r<s[n].length;r++){for(i=0;i<s[n][r].length-u;i++){if(!1===e(s[n][r][i],l,d,E,p))return!1;l++}p++}E++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===g(o.geometries[n],e,A))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}var c=function(t,e){var A=0,n=0,i=0;return g(t,(function(t){A+=t[0],n+=t[1],i++}),!0),r([A/i,n/i],e)},I=A(606),u=A(607),l=A(362),C=A(345);e.default=function(t,e,A){if(!o(A=A||{}))throw new Error("options is invalid");var n=A.pivot,r=A.mutate;if(!t)throw new Error("geojson is required");if(void 0===e||null===e||isNaN(e))throw new Error("angle is required");return 0===e||(n||(n=c(t)),!1!==r&&void 0!==r||(t=Object(C.a)(t)),g(t,(function(t){var A=Object(I.a)(n,t)+e,r=Object(u.a)(n,t),i=function(t){if(!t)throw new Error("coords is required");if("Feature"===t.type&&null!==t.geometry)return t.geometry.coordinates;if(t.coordinates)return t.coordinates;if(Array.isArray(t))return t;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(Object(l.a)(n,r,A));t[0]=i[0],t[1]=i[1]}))),t}},function(t,e){},function(t,e,A){"use strict";var n,r,i;r=[],void 0===(i="function"===typeof(n=function(){function t(){return!0}function e(){return!1}function A(){}return function n(){var r=[{name:"number",test:function(t){return"number"===typeof t}},{name:"string",test:function(t){return"string"===typeof t}},{name:"boolean",test:function(t){return"boolean"===typeof t}},{name:"Function",test:function(t){return"function"===typeof t}},{name:"Array",test:Array.isArray},{name:"Date",test:function(t){return t instanceof Date}},{name:"RegExp",test:function(t){return t instanceof RegExp}},{name:"Object",test:function(t){return"object"===typeof t&&null!==t&&t.constructor===Object}},{name:"null",test:function(t){return null===t}},{name:"undefined",test:function(t){return void 0===t}}],i={name:"any",test:t},o=[],a=[],s={types:r,conversions:a,ignore:o};function g(t){var e=_(s.types,(function(e){return e.name===t}));if(e)return e;if("any"===t)return i;var A=_(s.types,(function(e){return e.name.toLowerCase()===t.toLowerCase()}));throw new TypeError('Unknown type "'+t+'"'+(A?'. Did you mean "'+A.name+'"?':""))}function c(t){return t===i?999:s.types.indexOf(t)}function I(t){var e=_(s.types,(function(e){return e.test(t)}));if(e)return e.name;throw new TypeError("Value has unknown type. Value: "+t)}function u(t){return t.map((function(t){var e=t.types.map(E);return(t.restParam?"...":"")+e.join("|")})).join(",")}function l(t,e){var A=0===t.indexOf("..."),n=(A?t.length>3?t.slice(3):"any":t).split("|").map(G).filter(N).filter(U),r=function(t,e){var A={};return t.forEach((function(t){-1!==e.indexOf(t.from)||-1===e.indexOf(t.to)||A[t.from]||(A[t.from]=t)})),Object.keys(A).map((function(t){return A[t]}))}(e,n),i=n.map((function(t){var e=g(t);return{name:t,typeIndex:c(e),test:e.test,conversion:null,conversionIndex:-1}})),o=r.map((function(t){var A=g(t.from);return{name:t.from,typeIndex:c(A),test:A.test,conversion:t,conversionIndex:e.indexOf(t)}}));return{types:i.concat(o),restParam:A}}function C(t){var e=O(t);return!!e&&e.restParam}function h(t){return t.types.some((function(t){return null!=t.conversion}))}function B(e){if(e&&0!==e.types.length){if(1===e.types.length)return g(e.types[0].name).test;if(2===e.types.length){var A=g(e.types[0].name).test,n=g(e.types[1].name).test;return function(t){return A(t)||n(t)}}var r=e.types.map((function(t){return g(t.name).test}));return function(t){for(var e=0;e<r.length;e++)if(r[e](t))return!0;return!1}}return t}function f(t){var e,A,n,r;if(C(t)){var i=(e=(r=t,r.slice(0,r.length-1)).map(B)).length,o=B(O(t));return function(t){for(var A=0;A<e.length;A++)if(!e[A](t[A]))return!1;return function(t){for(var e=i;e<t.length;e++)if(!o(t[e]))return!1;return!0}(t)&&t.length>=i+1}}return 0===t.length?function(t){return 0===t.length}:1===t.length?(A=B(t[0]),function(t){return A(t[0])&&1===t.length}):2===t.length?(A=B(t[0]),n=B(t[1]),function(t){return A(t[0])&&n(t[1])&&2===t.length}):(e=t.map(B),function(t){for(var A=0;A<e.length;A++)if(!e[A](t[A]))return!1;return t.length===e.length})}function d(t,e){return e<t.params.length?t.params[e]:C(t.params)?O(t.params):null}function Q(t,e,A){var n=d(t,e);return(n?A?n.types.filter(p):n.types:[]).map(E)}function E(t){return t.name}function p(t){return null===t.conversion||void 0===t.conversion}function y(t,e){var A=function(t){for(var e={},A=0;A<t.length;A++)e[t[A]]=!0;return Object.keys(e)}(J(t,(function(t){return Q(t,e,!1)})));return-1!==A.indexOf("any")?["any"]:A}function v(t,e,A){var n,r,i,o=t||"unnamed",a=A;for(i=0;i<e.length;i++){var s=a.filter((function(t){var A=B(d(t,i));return(i<t.params.length||C(t.params))&&A(e[i])}));if(0===s.length){if((r=y(a,i)).length>0){var g=I(e[i]);return(n=new TypeError("Unexpected type of argument in function "+o+" (expected: "+r.join(" or ")+", actual: "+g+", index: "+i+")")).data={category:"wrongType",fn:o,index:i,actual:g,expected:r},n}}else a=s}var c=a.map((function(t){return C(t.params)?1/0:t.params.length}));if(e.length<Math.min.apply(null,c))return r=y(a,i),(n=new TypeError("Too few arguments in function "+o+" (expected: "+r.join(" or ")+", index: "+e.length+")")).data={category:"tooFewArgs",fn:o,index:e.length,expected:r},n;var u=Math.max.apply(null,c);return e.length>u?((n=new TypeError("Too many arguments in function "+o+" (expected: "+u+", actual: "+e.length+")")).data={category:"tooManyArgs",fn:o,index:e.length,expectedLength:u},n):((n=new TypeError('Arguments of type "'+e.join(", ")+'" do not match any of the defined signatures of function '+o+".")).data={category:"mismatch",actual:e.map(I)},n)}function m(t){for(var e=999,A=0;A<t.types.length;A++)p(t.types[A])&&(e=Math.min(e,t.types[A].typeIndex));return e}function b(t){for(var e=999,A=0;A<t.types.length;A++)p(t.types[A])||(e=Math.min(e,t.types[A].conversionIndex));return e}function F(t,e){var A;return 0!==(A=t.restParam-e.restParam)||0!==(A=h(t)-h(e))||0!==(A=m(t)-m(e))?A:b(t)-b(e)}function w(t,e){var A,n,r=Math.min(t.params.length,e.params.length);if(0!==(n=t.params.some(h)-e.params.some(h)))return n;for(A=0;A<r;A++)if(0!==(n=h(t.params[A])-h(e.params[A])))return n;for(A=0;A<r;A++)if(0!==(n=F(t.params[A],e.params[A])))return n;return t.params.length-e.params.length}function S(t){var e,A,n,r,i=[],o=[];switch(t.types.forEach((function(t){t.conversion&&(i.push(g(t.conversion.from).test),o.push(t.conversion.convert))})),o.length){case 0:return function(t){return t};case 1:return e=i[0],n=o[0],function(t){return e(t)?n(t):t};case 2:return e=i[0],A=i[1],n=o[0],r=o[1],function(t){return e(t)?n(t):A(t)?r(t):t};default:return function(t){for(var e=0;e<o.length;e++)if(i[e](t))return o[e](t);return t}}}function D(t,e){return function t(A,n,r){if(n<A.length){var i,o=A[n],a=e?o.types.filter(p):o.types;if(o.restParam){var s=a.filter(p);i=s.length<a.length?[s,a]:[a]}else i=a.map((function(t){return[t]}));return J(i,(function(e){return t(A,n+1,r.concat([e]))}))}return[r.map((function(t,e){return{types:t,restParam:e===A.length-1&&C(A)}}))]}(t,0,[])}function R(t,n){if(0===Object.keys(n).length)throw new SyntaxError("No signatures provided");var r=[];Object.keys(n).map((function(t){return function(t,e,A){var n=[];return""!==t.trim()&&(n=t.split(",").map(G).map((function(t,e,n){var r=l(t,A);if(r.restParam&&e!==n.length-1)throw new SyntaxError('Unexpected rest parameter "'+t+'": only allowed for the last parameter');return r}))),n.some(x)?null:{params:n,fn:e}}(t,n[t],s.conversions)})).filter(k).forEach((function(t){var e=_(r,(function(e){return function(t,e){for(var A=Math.max(t.params.length,e.params.length),n=0;n<A;n++)if(!L(Q(t,n,!0),Q(e,n,!0)))return!1;var r=t.params.length,i=e.params.length,o=C(t.params),a=C(e.params);return o?a?r===i:i>=r:a?r>=i:r===i}(e,t)}));if(e)throw new TypeError('Conflicting signatures "'+u(e.params)+'" and "'+u(t.params)+'".');r.push(t)}));var i=J(r,(function(t){return(t?D(t.params,!1):[]).map((function(e){return{params:e,fn:t.fn}}))})).filter(k);i.sort(w);var o=i[0]&&i[0].params.length<=2&&!C(i[0].params),a=i[1]&&i[1].params.length<=2&&!C(i[1].params),g=i[2]&&i[2].params.length<=2&&!C(i[2].params),c=i[3]&&i[3].params.length<=2&&!C(i[3].params),I=i[4]&&i[4].params.length<=2&&!C(i[4].params),d=i[5]&&i[5].params.length<=2&&!C(i[5].params),E=o&&a&&g&&c&&I&&d,p=i.map((function(t){return f(t.params)})),y=o?B(i[0].params[0]):e,m=a?B(i[1].params[0]):e,b=g?B(i[2].params[0]):e,F=c?B(i[3].params[0]):e,R=I?B(i[4].params[0]):e,U=d?B(i[5].params[0]):e,N=o?B(i[0].params[1]):e,O=a?B(i[1].params[1]):e,T=g?B(i[2].params[1]):e,j=c?B(i[3].params[1]):e,H=I?B(i[4].params[1]):e,Y=d?B(i[5].params[1]):e,V=i.map((function(t){return function(t,e){var A=e;if(t.some(h)){var n=C(t),r=t.map(S);A=function(){for(var t=[],A=n?arguments.length-1:arguments.length,i=0;i<A;i++)t[i]=r[i](arguments[i]);return n&&(t[A]=arguments[A].map(r[A])),e.apply(this,t)}}var i=A;if(C(t)){var o=t.length-1;i=function(){return A.apply(this,M(arguments,0,o).concat([M(arguments,o)]))}}return i}(t.params,t.fn)})),Z=o?V[0]:A,W=a?V[1]:A,K=g?V[2]:A,P=c?V[3]:A,q=I?V[4]:A,X=d?V[5]:A,z=o?i[0].params.length:-1,$=a?i[1].params.length:-1,tt=g?i[2].params.length:-1,et=c?i[3].params.length:-1,At=I?i[4].params.length:-1,nt=d?i[5].params.length:-1,rt=E?6:0,it=i.length,ot=function(){for(var e=rt;e<it;e++)if(p[e](arguments))return V[e].apply(this,arguments);throw v(t,arguments,i)},at=function t(e,A){return arguments.length===z&&y(e)&&N(A)?Z.apply(t,arguments):arguments.length===$&&m(e)&&O(A)?W.apply(t,arguments):arguments.length===tt&&b(e)&&T(A)?K.apply(t,arguments):arguments.length===et&&F(e)&&j(A)?P.apply(t,arguments):arguments.length===At&&R(e)&&H(A)?q.apply(t,arguments):arguments.length===nt&&U(e)&&Y(A)?X.apply(t,arguments):ot.apply(t,arguments)};try{Object.defineProperty(at,"name",{value:t})}catch(st){}return at.signatures=function(t){var e={};return t.forEach((function(t){t.params.some(h)||D(t.params,!0).forEach((function(A){e[u(A)]=t.fn}))})),e}(i),at}function U(t){return-1===s.ignore.indexOf(t)}function G(t){return t.trim()}function N(t){return!!t}function k(t){return null!==t}function x(t){return 0===t.types.length}function O(t){return t[t.length-1]}function M(t,e,A){return Array.prototype.slice.call(t,e,A)}function L(t,e){for(var A=0;A<t.length;A++)if(n=e,r=t[A],-1!==n.indexOf(r))return!0;var n,r;return!1}function _(t,e){for(var A=0;A<t.length;A++)if(e(t[A]))return t[A]}function J(t,e){return Array.prototype.concat.apply([],t.map(e))}function T(t){for(var e="",A=0;A<t.length;A++){var n=t[A];if(("object"===typeof n.signatures||"string"===typeof n.signature)&&""!==n.name)if(""===e)e=n.name;else if(e!==n.name){var r=new Error("Function names do not match (expected: "+e+", actual: "+n.name+")");throw r.data={actual:n.name,expected:e},r}}return e}function j(t){var e,A={};function n(t,n){if(A.hasOwnProperty(t)&&n!==A[t])throw(e=new Error('Signature "'+t+'" is defined twice')).data={signature:t},e}for(var r=0;r<t.length;r++){var i=t[r];if("object"===typeof i.signatures)for(var o in i.signatures)i.signatures.hasOwnProperty(o)&&(n(o,i.signatures[o]),A[o]=i.signatures[o]);else{if("string"!==typeof i.signature)throw(e=new TypeError("Function is no typed-function (index: "+r+")")).data={index:r},e;n(i.signature,i),A[i.signature]=i}}return A}return(s=R("typed",{"string, Object":R,Object:function(t){var e=[];for(var A in t)t.hasOwnProperty(A)&&e.push(t[A]);return R(T(e),t)},"...Function":function(t){return R(T(t),j(t))},"string, ...Function":function(t,e){return R(t,j(e))}})).create=n,s.types=r,s.conversions=a,s.ignore=o,s.convert=function(t,e){var A=I(t);if(e===A)return t;for(var n=0;n<s.conversions.length;n++){var r=s.conversions[n];if(r.from===A&&r.to===e)return r.convert(t)}throw new Error("Cannot convert from "+A+" to "+e)},s.find=function(t,e){if(!t.signatures)throw new TypeError("Function is no typed-function");var A;if("string"===typeof e){A=e.split(",");for(var n=0;n<A.length;n++)A[n]=A[n].trim()}else{if(!Array.isArray(e))throw new TypeError("String array or a comma separated string expected");A=e}var r=A.join(","),i=t.signatures[r];if(i)return i;throw new TypeError("Signature not found (signature: "+(t.name||"unnamed")+"("+A.join(", ")+"))")},s.addType=function(t,e){if(!t||"string"!==typeof t.name||"function"!==typeof t.test)throw new TypeError("Object with properties {name: string, test: function} expected");if(!1!==e)for(var A=0;A<s.types.length;A++)if("Object"===s.types[A].name)return void s.types.splice(A,0,t);s.types.push(t)},s.addConversion=function(t){if(!t||"string"!==typeof t.from||"string"!==typeof t.to||"function"!==typeof t.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");s.conversions.push(t)},s}()})?n.apply(e,r):n)||(t.exports=i)},function(t,e,A){var n=A(1052),r=A(1053),i=A(1054),o=A(1055),a=A(1056),s=A(1057),g=A(1058);g.alea=n,g.xor128=r,g.xorwow=i,g.xorshift7=o,g.xor4096=a,g.tychei=s,t.exports=g},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(123);var r=function(){var t={},e=["Int8","Int16","Int32"];return Object.keys(n.a).forEach((function(A){var r=n.a[A].max,i=e.includes(A)?-(r+1):0;t[A]=[i,r]})),t}()},,,function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(977);function r(t,e){return t&&t.length&&e(t[0][1])?Object(n.a)().x((function(t){return e(t[1])[0]})).y((function(t){return e(t[1])[1]})).addAll(t):null}},function(t,e,A){"use strict";A.d(e,"a",(function(){return c}));var n=A(0),r=A.n(n),i=A(976),o=A(881),a=A(1143),s=A(73),g=A(530);function c(t){var e=t.observationsLabel,A=t.cellColorEncoding,n=t.setCellColorEncoding,c=Object(g.a)(),I=Object(s.a)(e);return r.a.createElement(a.a,null,r.a.createElement(o.a,{className:c.labelCell,htmlFor:"cell-color-encoding-select"},I," Color Encoding"),r.a.createElement(o.a,{className:c.inputCell},r.a.createElement(i.a,{native:!0,className:c.select,value:A,onChange:function(t){n(t.target.value)},inputProps:{id:"cell-color-encoding-select"}},r.a.createElement("option",{value:"cellSetSelection"},"Cell Sets"),r.a.createElement("option",{value:"geneSelection"},"Gene Expression"))))}},function(t,e,A){"use strict";var n=A(13),r=A(20),i=A(9),o=A(15),a=A(54),s=A(23),g=A(24),c=A(0),I=A.n(c),u=A(972),l=A(747),C=A(746),h=A(346);function B(){return(B=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function f(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}var d=c.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Q=c.createElement("path",{d:"M21 3L3 10.53v.98l6.84 2.65L12.48 21h.98L21 3z"});function E(t){var e=t.svgRef,A=t.title,n=t.titleId,r=f(t,["svgRef","title","titleId"]);return c.createElement("svg",B({width:24,height:24,viewBox:"0 0 24 24",ref:e,"aria-labelledby":n},r),A?c.createElement("title",{id:n},A):null,d,Q)}var p=c.forwardRef((function(t,e){return c.createElement(E,B({svgRef:e},t))}));A.p;function y(){return(y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function v(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}var m=c.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 b(t){var e=t.svgRef,A=t.title,n=t.titleId,r=v(t,["svgRef","title","titleId"]);return c.createElement("svg",y({width:24,height:24,viewBox:"0 0 24 24",ref:e,"aria-labelledby":n},r),A?c.createElement("title",{id:n},A):null,m)}var F=c.forwardRef((function(t,e){return c.createElement(b,y({svgRef:e},t))}));A.p;function w(){return(w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function S(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}function D(t){var e=t.svgRef,A=t.title,n=t.titleId,r=S(t,["svgRef","title","titleId"]);return c.createElement("svg",w({width:24,height:24,viewBox:"0 0 24 24",ref:e,"aria-labelledby":n},r),A?c.createElement("title",{id:n},A):null,c.createElement("g",{transform:"translate(0,3)"},c.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 R=c.forwardRef((function(t,e){return c.createElement(D,w({svgRef:e},t))}));A.p;function U(t){var e=t.alt,A=t.onClick,n=t.isActive,r=t.children,i="btn btn-outline-secondary mr-2 icon",o="".concat(i," active");return I.a.createElement("button",{className:n?o:i,onClick:A,type:"button",title:e},r)}function G(t){var e=t.setActiveTool,A=t.activeTool,n=t.visibleTools,r=void 0===n?{pan:!0,selectRectangle:!0,selectLasso:!0}:n;return I.a.createElement("div",{className:"tool"},r.pan&&I.a.createElement(U,{alt:"pointer tool",onClick:function(){return e(null)},isActive:null===A},I.a.createElement(p,null)),r.selectRectangle?I.a.createElement(U,{alt:"select rectangle",onClick:function(){return e(h.SELECTION_TYPE.RECTANGLE)},isActive:A===h.SELECTION_TYPE.RECTANGLE},I.a.createElement(F,null)):null,r.selectLasso?I.a.createElement(U,{alt:"select lasso",onClick:function(){return e(h.SELECTION_TYPE.POLYGON)},isActive:A===h.SELECTION_TYPE.POLYGON},I.a.createElement(R,null)):null)}var N=A(87),k=function(){return"crosshair"},x=function(t){return t.isDragging?"grabbing":"default"};A.d(e,"a",(function(){return O}));var O=function(t){Object(s.a)(A,t);var e=Object(g.a)(A);function A(t){var n;return Object(i.a)(this,A),(n=e.call(this,t)).state={gl:null,tool:null},n.viewport=null,n.onViewStateChange=n.onViewStateChange.bind(Object(a.a)(n)),n.onInitializeViewInfo=n.onInitializeViewInfo.bind(Object(a.a)(n)),n.onWebGLInitialized=n.onWebGLInitialized.bind(Object(a.a)(n)),n.onToolChange=n.onToolChange.bind(Object(a.a)(n)),n.onHover=n.onHover.bind(Object(a.a)(n)),n}return Object(o.a)(A,[{key:"onViewStateChange",value:function(t){var e=t.viewState,A=this.props,n=A.setViewState,i=A.viewState,o=A.layers,a=A.spatialAxisFixed,s=null===o||void 0===o?void 0:o.some((function(t){return t.use3d}));n(Object(r.a)({},e,{target:a&&s?i.target:e.target}))}},{key:"onInitializeViewInfo",value:function(t){var e=t.viewport;this.viewport=e}},{key:"onWebGLInitialized",value:function(t){this.setState({gl:t})}},{key:"onToolChange",value:function(t){var e=this.props.onToolChange;this.setState({tool:t}),e&&e(t)}},{key:"getLayers",value:function(){return[]}},{key:"onHover",value:function(t){var e=t.coordinate,A=t.layer,n=t.sourceLayer,r=this.props,i=r.setCellHighlight,o=r.cellHighlight,a=r.setComponentHover,s=(r.layers||[]).some((function(t){return"bitmask"===t.type}));if(!i)return null;if(!n||!e)return o&&s&&i(null),null;var g=n.props,c=g.channelData,I=g.bounds;if(!c)return o&&s&&i(null),null;var u=c.data,l=c.width;if(!u)return o&&s&&i(null),null;if(n.id.includes("bitmask")){var C=A.props.loader[0].tileSize,h=n.props.tileId.z,B=Math.max(1,Math.pow(2,Math.round(-h+Math.log2(512/C)))),f=[Math.floor((e[0]-I[0])/B),Math.floor((e[1]-I[3])/B)],d=f[1]*l+f[0],Q=u.map((function(t){return t[d]})).find((function(t){return t>0}));Q!==Number(o)&&(a&&a(),i(Q?String(Q):null))}}},{key:"viewInfoDidUpdate",value:function(t){var e=this.props,A=e.updateViewInfo,r=e.cells,i=e.uuid,o=this.viewport;A&&o&&A({uuid:i,project:function(e){var A=r[e];try{var i=t(A),a=Object(n.a)(i,2),s=a[0],g=a[1];return o.project([s,g])}catch(c){return[null,null]}}})}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){var t=this.props,e=t.deckRef,A=t.viewState,n=t.uuid,r=t.layers,i=this.state,o=i.gl,a=i.tool,s=this.getLayers(),g=(r||[]).some((function(t){return t.use3d})),c=null!==this.cellsLayer||this.cellsEntries.length&&this.cellsEntries[0][1].xy,h=null!==this.cellsLayer||r.findIndex((function(t){return"bitmask"===t.type||"raster"===t.type}))>=0,B=this.cellsEntries.length<1e5&&!g;return I.a.createElement(I.a.Fragment,null,I.a.createElement(G,{activeTool:a,setActiveTool:this.onToolChange,visibleTools:{pan:h,selectRectangle:c,selectLasso:c}}),I.a.createElement(u.a,{id:"deckgl-overlay-".concat(n),ref:e,views:[g?new l.a({id:"orbit",controller:!0,orbitAxis:"Y"}):new C.a({id:"ortho"})],layers:o&&A.target.slice(0,2).every((function(t){return"number"===typeof t}))?s:[],glOptions:N.c,onWebGLInitialized:this.onWebGLInitialized,onViewStateChange:this.onViewStateChange,viewState:A,useDevicePixels:B,controller:!a||{dragPan:!1},getCursor:a?k:x,onHover:this.onHover},this.onInitializeViewInfo))}}]),A}(c.PureComponent)},,function(t,e,A){t.exports=function(){"use strict";function t(t,n,r,i,o){!function t(A,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,s=n-r+1,g=Math.log(a),c=.5*Math.exp(2*g/3),I=.5*Math.sqrt(g*c*(a-c)/a)*(s-a/2<0?-1:1);t(A,n,Math.max(r,Math.floor(n-s*c/a+I)),Math.min(i,Math.floor(n+(a-s)*c/a+I)),o)}var u=A[n],l=r,C=i;for(e(A,r,n),o(A[i],u)>0&&e(A,r,i);l<C;){for(e(A,l,C),l++,C--;o(A[l],u)<0;)l++;for(;o(A[C],u)>0;)C--}0===o(A[r],u)?e(A,r,C):e(A,++C,i),C<=n&&(r=C+1),n<=C&&(i=C-1)}}(t,n,r||0,i||t.length-1,o||A)}function e(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function A(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,A){if(!A)return e.indexOf(t);for(var n=0;n<e.length;n++)if(A(t,e[n]))return n;return-1}function i(t,e){o(t,0,t.children.length,e,t)}function o(t,e,A,n,r){r||(r=C(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var i=e;i<A;i++){var o=t.children[i];a(r,t.leaf?n(o):o)}return r}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function s(t,e){return t.minX-e.minX}function g(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function I(t){return t.maxX-t.minX+(t.maxY-t.minY)}function u(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function l(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function C(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function h(e,A,n,r,i){for(var o=[A,n];o.length;)if(!((n=o.pop())-(A=o.pop())<=r)){var a=A+Math.ceil((n-A)/r/2)*r;t(e,a,A,n,i),o.push(A,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,A=[];if(!l(t,e))return A;for(var n=this.toBBox,r=[];e;){for(var i=0;i<e.children.length;i++){var o=e.children[i],a=e.leaf?n(o):o;l(t,a)&&(e.leaf?A.push(o):u(t,a)?this._all(o,A):r.push(o))}e=r.pop()}return A},n.prototype.collides=function(t){var e=this.data;if(!l(t,e))return!1;for(var A=[];e;){for(var n=0;n<e.children.length;n++){var r=e.children[n],i=e.leaf?this.toBBox(r):r;if(l(t,i)){if(e.leaf||u(t,i))return!0;A.push(r)}}e=A.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var A=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===A.height)this._splitRoot(this.data,A);else{if(this.data.height<A.height){var n=this.data;this.data=A,A=n}this._insert(A,this.data.height-A.height-1,!0)}else this.data=A;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=C([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var A,n,i,o=this.data,a=this.toBBox(t),s=[],g=[];o||s.length;){if(o||(o=s.pop(),n=s[s.length-1],A=g.pop(),i=!0),o.leaf){var c=r(t,o.children,e);if(-1!==c)return o.children.splice(c,1),s.push(o),this._condense(s),this}i||o.leaf||!u(o,a)?n?(A++,o=n.children[A],i=!1):o=null:(s.push(o),g.push(A),A=0,n=o,o=o.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var A=[];t;)t.leaf?e.push.apply(e,t.children):A.push.apply(A,t.children),t=A.pop();return e},n.prototype._build=function(t,e,A,n){var r,o=A-e+1,a=this._maxEntries;if(o<=a)return i(r=C(t.slice(e,A+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,n-1))),(r=C([])).leaf=!1,r.height=n;var s=Math.ceil(o/a),g=s*Math.ceil(Math.sqrt(a));h(t,e,A,g,this.compareMinX);for(var c=e;c<=A;c+=g){var I=Math.min(c+g-1,A);h(t,c,I,s,this.compareMinY);for(var u=c;u<=I;u+=s){var l=Math.min(u+s-1,I);r.children.push(this._build(t,u,l,n-1))}}return i(r,this.toBBox),r},n.prototype._chooseSubtree=function(t,e,A,n){for(;n.push(e),!e.leaf&&n.length-1!==A;){for(var r=1/0,i=1/0,o=void 0,a=0;a<e.children.length;a++){var s=e.children[a],g=c(s),I=(u=t,l=s,(Math.max(l.maxX,u.maxX)-Math.min(l.minX,u.minX))*(Math.max(l.maxY,u.maxY)-Math.min(l.minY,u.minY))-g);I<i?(i=I,r=g<r?g:r,o=s):I===i&&g<r&&(r=g,o=s)}e=o||e.children[0]}var u,l;return e},n.prototype._insert=function(t,e,A){var n=A?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),a(i,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var A=t[e],n=A.children.length,r=this._minEntries;this._chooseSplitAxis(A,r,n);var o=this._chooseSplitIndex(A,r,n),a=C(A.children.splice(o,A.children.length-o));a.height=A.height,a.leaf=A.leaf,i(A,this.toBBox),i(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(A,a)},n.prototype._splitRoot=function(t,e){this.data=C([t,e]),this.data.height=t.height+1,this.data.leaf=!1,i(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,A){for(var n,r,i,a,s,g,I,u=1/0,l=1/0,C=e;C<=A-e;C++){var h=o(t,0,C,this.toBBox),B=o(t,C,A,this.toBBox),f=(r=h,i=B,a=Math.max(r.minX,i.minX),s=Math.max(r.minY,i.minY),g=Math.min(r.maxX,i.maxX),I=Math.min(r.maxY,i.maxY),Math.max(0,g-a)*Math.max(0,I-s)),d=c(h)+c(B);f<u?(u=f,n=C,l=d<l?d:l):f===u&&d<l&&(l=d,n=C)}return n||A-e},n.prototype._chooseSplitAxis=function(t,e,A){var n=t.leaf?this.compareMinX:s,r=t.leaf?this.compareMinY:g;this._allDistMargin(t,e,A,n)<this._allDistMargin(t,e,A,r)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,A,n){t.children.sort(n);for(var r=this.toBBox,i=o(t,0,e,r),s=o(t,A-e,A,r),g=I(i)+I(s),c=e;c<A-e;c++){var u=t.children[c];a(i,t.leaf?r(u):u),g+=I(i)}for(var l=A-e-1;l>=e;l--){var C=t.children[l];a(s,t.leaf?r(C):C),g+=I(s)}return g},n.prototype._adjustParentBBoxes=function(t,e,A){for(var n=A;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,A=void 0;e>=0;e--)0===t[e].children.length?e>0?(A=t[e-1].children).splice(A.indexOf(t[e]),1):this.clear():i(t[e],this.toBBox)},n}()},function(t,e,A){"use strict";function n(t,e){if(!(this instanceof n))return new n(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||r,this.length>0)for(var A=(this.length>>1)-1;A>=0;A--)this._down(A)}function r(t,e){return t<e?-1:t>e?1:0}t.exports=n,t.exports.default=n,n.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,A=this.compare,n=e[t];t>0;){var r=t-1>>1,i=e[r];if(A(n,i)>=0)break;e[t]=i,t=r}e[t]=n},_down:function(t){for(var e=this.data,A=this.compare,n=this.length>>1,r=e[t];t<n;){var i=1+(t<<1),o=i+1,a=e[i];if(o<this.length&&A(e[o],a)<0&&(i=o,a=e[o]),A(a,r)>=0)break;e[t]=a,t=i}e[t]=r}}},function(t,e){t.exports=function(t,e){for(var A=t[0],n=t[1],r=!1,i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],g=e[o][0],c=e[o][1];s>n!=c>n&&A<(g-a)*(n-s)/(c-s)+a&&(r=!r)}return r}},function(t,e,A){!function(t){"use strict";var e=134217729;function A(t,e,A,n,r){var i,o,a,s,g=e[0],c=n[0],I=0,u=0;c>g==c>-g?(i=g,g=e[++I]):(i=c,c=n[++u]);var l=0;if(I<t&&u<A)for(c>g==c>-g?(a=i-((o=g+i)-g),g=e[++I]):(a=i-((o=c+i)-c),c=n[++u]),i=o,0!==a&&(r[l++]=a);I<t&&u<A;)c>g==c>-g?(a=i-((o=i+g)-(s=o-i))+(g-s),g=e[++I]):(a=i-((o=i+c)-(s=o-i))+(c-s),c=n[++u]),i=o,0!==a&&(r[l++]=a);for(;I<t;)a=i-((o=i+g)-(s=o-i))+(g-s),g=e[++I],i=o,0!==a&&(r[l++]=a);for(;u<A;)a=i-((o=i+c)-(s=o-i))+(c-s),c=n[++u],i=o,0!==a&&(r[l++]=a);return 0===i&&0!==l||(r[l++]=i),l}function n(t){return new Float64Array(t)}var r=n(4),i=n(8),o=n(12),a=n(16),s=n(4);t.orient2d=function(t,n,g,c,I,u){var l=(n-u)*(g-I),C=(t-I)*(c-u),h=l-C;if(0===l||0===C||l>0!=C>0)return h;var B=Math.abs(l+C);return Math.abs(h)>=33306690738754716e-32*B?h:-function(t,n,g,c,I,u,l){var C,h,B,f,d,Q,E,p,y,v,m,b,F,w,S,D,R,U,G=t-I,N=g-I,k=n-u,x=c-u;d=(S=(p=G-(E=(Q=e*G)-(Q-G)))*(v=x-(y=(Q=e*x)-(Q-x)))-((w=G*x)-E*y-p*y-E*v))-(m=S-(R=(p=k-(E=(Q=e*k)-(Q-k)))*(v=N-(y=(Q=e*N)-(Q-N)))-((D=k*N)-E*y-p*y-E*v))),r[0]=S-(m+d)+(d-R),d=(F=w-((b=w+m)-(d=b-w))+(m-d))-(m=F-D),r[1]=F-(m+d)+(d-D),d=(U=b+m)-b,r[2]=b-(U-d)+(m-d),r[3]=U;var O=function(t,e){for(var A=e[0],n=1;n<4;n++)A+=e[n];return A}(0,r),M=22204460492503146e-32*l;if(O>=M||-O>=M)return O;if(C=t-(G+(d=t-G))+(d-I),B=g-(N+(d=g-N))+(d-I),h=n-(k+(d=n-k))+(d-u),f=c-(x+(d=c-x))+(d-u),0===C&&0===h&&0===B&&0===f)return O;if(M=11093356479670487e-47*l+33306690738754706e-32*Math.abs(O),(O+=G*f+x*C-(k*B+N*h))>=M||-O>=M)return O;d=(S=(p=C-(E=(Q=e*C)-(Q-C)))*(v=x-(y=(Q=e*x)-(Q-x)))-((w=C*x)-E*y-p*y-E*v))-(m=S-(R=(p=h-(E=(Q=e*h)-(Q-h)))*(v=N-(y=(Q=e*N)-(Q-N)))-((D=h*N)-E*y-p*y-E*v))),s[0]=S-(m+d)+(d-R),d=(F=w-((b=w+m)-(d=b-w))+(m-d))-(m=F-D),s[1]=F-(m+d)+(d-D),d=(U=b+m)-b,s[2]=b-(U-d)+(m-d),s[3]=U;var L=A(4,r,4,s,i);d=(S=(p=G-(E=(Q=e*G)-(Q-G)))*(v=f-(y=(Q=e*f)-(Q-f)))-((w=G*f)-E*y-p*y-E*v))-(m=S-(R=(p=k-(E=(Q=e*k)-(Q-k)))*(v=B-(y=(Q=e*B)-(Q-B)))-((D=k*B)-E*y-p*y-E*v))),s[0]=S-(m+d)+(d-R),d=(F=w-((b=w+m)-(d=b-w))+(m-d))-(m=F-D),s[1]=F-(m+d)+(d-D),d=(U=b+m)-b,s[2]=b-(U-d)+(m-d),s[3]=U;var _=A(L,i,4,s,o);d=(S=(p=C-(E=(Q=e*C)-(Q-C)))*(v=f-(y=(Q=e*f)-(Q-f)))-((w=C*f)-E*y-p*y-E*v))-(m=S-(R=(p=h-(E=(Q=e*h)-(Q-h)))*(v=B-(y=(Q=e*B)-(Q-B)))-((D=h*B)-E*y-p*y-E*v))),s[0]=S-(m+d)+(d-R),d=(F=w-((b=w+m)-(d=b-w))+(m-d))-(m=F-D),s[1]=F-(m+d)+(d-D),d=(U=b+m)-b,s[2]=b-(U-d)+(m-d),s[3]=U;var J=A(_,o,4,s,a);return a[J-1]}(t,n,g,c,I,u,B)},t.orient2dfast=function(t,e,A,n,r,i){return(e-i)*(A-r)-(t-r)*(n-i)},Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,A){var n=A(587),r=A(1205),i=A(363);t.exports=function(t){return i(t)?n(t,!0):r(t)}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,A){var n=A(1086),r=A(920);t.exports=Object.keys||function(t){return n(t,r)}},function(t,e){t.exports=!0},function(t,e){var A=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++A+n).toString(36))}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,A){var n=A(537);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e){var A=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:A,MAX_SAFE_COMPONENT_LENGTH:16}},function(t,e,A){(function(e){var A="object"===typeof e&&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 t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=console).error.apply(t,["SEMVER"].concat(A))}:function(){};t.exports=A}).call(this,A(62))},function(t,e,A){var n=A(433);t.exports=function(t,e,A){return n(t,e,A)>0}},function(t,e,A){var n=A(931),r=A(932),i=Symbol("SemVer ANY"),o=function(){"use strict";function t(e,A){if(n(this,t),A&&"object"===typeof A||(A={loose:!!A,includePrerelease:!1}),e instanceof t){if(e.loose===!!A.loose)return e;e=e.value}I("comparator",e,A),this.options=A,this.loose=!!A.loose,this.parse(e),this.semver===i?this.value="":this.value=this.operator+this.semver.version,I("comp",this)}return r(t,null,[{key:"ANY",get:function(){return i}}]),r(t,[{key:"parse",value:function(t){var e=this.options.loose?s[g.COMPARATORLOOSE]:s[g.COMPARATOR],A=t.match(e);if(!A)throw new TypeError("Invalid comparator: ".concat(t));this.operator=void 0!==A[1]?A[1]:"","="===this.operator&&(this.operator=""),A[2]?this.semver=new u(A[2],this.options.loose):this.semver=i}},{key:"toString",value:function(){return this.value}},{key:"test",value:function(t){if(I("Comparator.test",t,this.options.loose),this.semver===i||t===i)return!0;if("string"===typeof t)try{t=new u(t,this.options)}catch(e){return!1}return c(t,this.operator,this.semver,this.options)}},{key:"intersects",value:function(e,A){if(!(e instanceof t))throw new TypeError("a Comparator is required");if(A&&"object"===typeof A||(A={loose:!!A,includePrerelease:!1}),""===this.operator)return""===this.value||new l(e.value,A).test(this.value);if(""===e.operator)return""===e.value||new l(this.value,A).test(e.semver);var n=(">="===this.operator||">"===this.operator)&&(">="===e.operator||">"===e.operator),r=("<="===this.operator||"<"===this.operator)&&("<="===e.operator||"<"===e.operator),i=this.semver.version===e.semver.version,o=(">="===this.operator||"<="===this.operator)&&(">="===e.operator||"<="===e.operator),a=c(this.semver,"<",e.semver,A)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),s=c(this.semver,">",e.semver,A)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||r||i&&o||a||s}}]),t}();t.exports=o;var a=A(728),s=a.re,g=a.t,c=A(1109),I=A(817),u=A(347),l=A(434)},function(t,e,A){var n=A(434);t.exports=function(t,e,A){try{e=new n(e,A)}catch(r){return!1}return e.test(t)}},function(t,e,A){"use strict";var n=A(30),r=A(10),i=A(0),o=(A(25),A(32)),a=A(41),s=i.forwardRef((function(t,e){var A=t.classes,a=t.className,s=t.component,g=void 0===s?"div":s,c=t.square,I=void 0!==c&&c,u=t.elevation,l=void 0===u?1:u,C=t.variant,h=void 0===C?"elevation":C,B=Object(n.a)(t,["classes","className","component","square","elevation","variant"]);return i.createElement(g,Object(r.a)({className:Object(o.a)(A.root,a,"outlined"===h?A.outlined:A["elevation".concat(l)],!I&&A.rounded),ref:e},B))}));e.a=Object(a.a)((function(t){var e={};return t.shadows.forEach((function(t,A){e["elevation".concat(A)]={boxShadow:t}})),Object(r.a)({root:{backgroundColor:t.palette.background.paper,color:t.palette.text.primary,transition:t.transitions.create("box-shadow")},rounded:{borderRadius:t.shape.borderRadius},outlined:{border:"1px solid ".concat(t.palette.divider)}},e)}),{name:"MuiPaper"})(s)},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=(A(25),A(32)),a=A(41),s=A(66),g={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},c=i.forwardRef((function(t,e){var A=t.align,a=void 0===A?"inherit":A,c=t.classes,I=t.className,u=t.color,l=void 0===u?"initial":u,C=t.component,h=t.display,B=void 0===h?"initial":h,f=t.gutterBottom,d=void 0!==f&&f,Q=t.noWrap,E=void 0!==Q&&Q,p=t.paragraph,y=void 0!==p&&p,v=t.variant,m=void 0===v?"body1":v,b=t.variantMapping,F=void 0===b?g:b,w=Object(r.a)(t,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),S=C||(y?"p":F[m]||g[m])||"span";return i.createElement(S,Object(n.a)({className:Object(o.a)(c.root,I,"inherit"!==m&&c[m],"initial"!==l&&c["color".concat(Object(s.a)(l))],E&&c.noWrap,d&&c.gutterBottom,y&&c.paragraph,"inherit"!==a&&c["align".concat(Object(s.a)(a))],"initial"!==B&&c["display".concat(Object(s.a)(B))]),ref:e},w))}));e.a=Object(a.a)((function(t){return{root:{margin:0},body2:t.typography.body2,body1:t.typography.body1,caption:t.typography.caption,button:t.typography.button,h1:t.typography.h1,h2:t.typography.h2,h3:t.typography.h3,h4:t.typography.h4,h5:t.typography.h5,h6:t.typography.h6,subtitle1:t.typography.subtitle1,subtitle2:t.typography.subtitle2,overline:t.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:t.palette.primary.main},colorSecondary:{color:t.palette.secondary.main},colorTextPrimary:{color:t.palette.text.primary},colorTextSecondary:{color:t.palette.text.secondary},colorError:{color:t.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(c)},function(t,e,A){"use strict";var n=A(17),r=A(21),i=A(13),o=A(20),a=A(9),s=A(15),g=A(71),c=A(92),I=A(23),u=A(24),l=A(0),C=A.n(l),h=A(89),B=A.n(h),f=A(364),d=A(40),Q=A(602),E=A(136),p=A(123),y=A(608),v=A(87),m=A(73),b=A(427),F=A(803),w=A(801),S=function(t){return t.xy},D=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(t){var n;return Object(a.a)(this,A),(n=e.call(this,t)).cellsEntries=[],n.moleculesEntries=[],n.cellsQuadTree=null,n.cellsLayer=null,n.moleculesLayer=null,n.neighborhoodsLayer=null,n.imageLayers=[],n.layerLoaderSelections={},n.randomColorData={data:new Uint8Array(12582912).map((function(t,e){return e<4?0:Math.round(255*Math.random())})),height:2048,width:2048},n.color=Object(o.a)({},n.randomColorData),n.onUpdateCellsData(),n.onUpdateCellsLayer(),n.onUpdateMoleculesData(),n.onUpdateMoleculesLayer(),n.onUpdateNeighborhoodsData(),n.onUpdateNeighborhoodsLayer(),n.onUpdateImages(),n}return Object(s.a)(A,[{key:"createCellsLayer",value:function(t){var e=t.radius,A=t.stroked,n=t.visible,r=t.opacity,i=this.cellsEntries,a=this.props,s=a.cellFilter,g=a.cellSelection,c=a.setCellHighlight,I=a.setComponentHover,u=a.getCellIsSelected,l=void 0===u?function(t){return function(e){return!t||t.includes(e[0])}}(i.length===g.length?null:g):u,C=a.cellColors,h=a.getCellColor,B=void 0===h?function(t){return function(e){return t&&t.get(e[0])||v.b}}(C):h,f=a.getCellPolygon,d=void 0===f?function(t){return function(e){var A,n=e[1];return(null===(A=n.poly)||void 0===A?void 0:A.length)?n.poly:Object(b.g)(n.xy[0],n.xy[1],t)}}(e):f,Q=a.onCellClick,E=a.lineWidthScale,p=void 0===E?10:E,m=a.lineWidthMaxPixels,F=void 0===m?2:m,w=s?i.filter((function(t){return s.includes(t[0])})):i;return new y.a(Object(o.a)({id:"cells-layer",backgroundColor:[0,0,0],isSelected:l,getPolygon:d,updateTriggers:{getFillColor:[r],getLineWidth:[A]},getFillColor:function(t){var e=B(t);return e[3]=255*r,e},getLineColor:function(t){var e=B(t);return e[3]=255,e},onClick:function(t){Q&&Q(t)},visible:n,getLineWidth:A?1:0,lineWidthScale:p,lineWidthMaxPixels:F},Object(v.g)(w,void 0,c,I,!0)))}},{key:"createMoleculesLayer",value:function(t){var e=this.props,A=e.setMoleculeHighlight,n=e.getMoleculeColor,r=void 0===n?function(t){return v.d[t[2]%v.d.length]}:n,i=e.getMoleculePosition,o=void 0===i?function(t){return[t[0],t[1],0]}:i,a=this.moleculesEntries;return new f.a({id:"molecules-layer",coordinateSystem:d.a.CARTESIAN,data:a,pickable:!0,autoHighlight:!0,radiusMaxPixels:3,opacity:t.opacity,visible:t.visible,getRadius:t.radius,getPosition:o,getLineColor:r,getFillColor:r,onHover:function(t){A&&(t.object?A(t.object[3]):A(null))}})}},{key:"createNeighborhoodsLayer",value:function(t){var e=this.props.getNeighborhoodPolygon,A=void 0===e?function(t){return t[1].poly}:e,n=this.neighborhoodsEntries;return new Q.a({id:"neighborhoods-layer",getPolygon:A,coordinateSystem:d.a.CARTESIAN,data:n,pickable:!0,autoHighlight:!0,stroked:!0,filled:!1,getElevation:0,getLineWidth:10,visible:t.visible})}},{key:"createSelectionLayers",value:function(){var t=this.props,e=t.viewState,A=t.getCellCoords,n=void 0===A?S:A,r=t.setCellSelection,i=this.state.tool,o=this.cellsQuadTree;return Object(y.c)(i,e.zoom,"cells-layer",n,r,o)}},{key:"createScaleBarLayer",value:function(){var t=this.props,e=t.viewState,A=t.width,n=t.height,r=t.imageLayerLoaders,i=void 0===r?{}:r,a=(t.layers||[]).some((function(t){return t.use3d})),s=Object.values(i);if(!e||!A||!n||s.length<1)return null;var g=s[0];if(!g)return null;var c=Object(m.d)(g);if(!c.meta)return null;var I=c.meta.physicalSizes;if(I&&!a){var u=I.x,l=u.unit,C=u.size;return l&&C?new p.f({id:"scalebar-layer",loader:g,unit:l,size:C,viewState:Object(o.a)({},e,{width:A,height:n})}):null}return null}},{key:"createImageLayer",value:function(t,e,A){var n,r=Object(o.a)({},t,{channels:t.channels.filter((function(t){return t.selection&&t.color&&t.slider}))}),a=r.channels.map((function(t){return t.selection})),s=this.layerLoaderSelections[r.index];B()(s,a)?n=s:(n=a,this.layerLoaderSelections[r.index]=a);var g={colormap:r.colormap,opacity:r.opacity,transparentColor:r.transparentColor,colors:r.channels.map((function(t){return t.color})),sliders:r.channels.map((function(t){return t.slider})),resolution:r.resolution,renderingMode:r.renderingMode,xSlice:r.xSlice,ySlice:r.ySlice,zSlice:r.zSlice,callback:r.callback,visibilities:r.channels.map((function(t){return!(!r.visible&&"boolean"===typeof r.visible)&&t.visible}))};if(!e||!g)return null;var c,I=e.metadata.transform,u=e.data;if(I){var l=I.scale,C=I.translate;c=(new E.Matrix4).translate([C.x,C.y,0]).scale(l)}else r.modelMatrix&&(c=new E.Matrix4(r.modelMatrix));if("bitmask"===t.type)return new p.d({id:"bitmask-layer-".concat(r.index,"-").concat(A),channelIsOn:g.visibilities,opacity:g.opacity,modelMatrix:c,hoveredCell:Number(this.props.cellHighlight),renderSubLayers:b.f,loader:u,loaderSelection:n,cellColorData:this.color.data,cellColorHeight:this.color.height,cellColorWidth:this.color.width,excludeBackground:!0,onViewportLoad:g.callback});var h=Object(b.b)(u,r.use3d),f=Object(i.a)(h,2);return new(0,f[0])({loader:f[1],id:"".concat(r.use3d?"volume":"image","-layer-").concat(r.index,"-").concat(A),colorValues:g.colors,sliderValues:g.sliders,loaderSelection:n,channelIsOn:g.visibilities,opacity:g.opacity,colormap:g.colormap,modelMatrix:c,transparentColor:g.transparentColor,resolution:g.resolution,renderingMode:g.renderingMode,pickable:!1,xSlice:g.xSlice,ySlice:g.ySlice,zSlice:g.zSlice,onViewportLoad:g.callback})}},{key:"createImageLayers",value:function(){var t=this,e=this.props,A=e.layers,n=e.imageLayerLoaders,r=void 0===n?{}:n,i=e.rasterLayersCallbacks,a=void 0===i?[]:i,s=(A||[]).some((function(t){return t.use3d})),g=(A||[]).findIndex((function(t){return t.use3d}));return(A||[]).filter((function(t){return"raster"===t.type||"bitmask"===t.type})).filter((function(t){return!s||t.use3d===s})).map((function(e,A){return t.createImageLayer(Object(o.a)({},e,{callback:a[s?g:A]}),r[e.index],A)}))}},{key:"getLayers",value:function(){var t=this.imageLayers,e=this.cellsLayer,A=this.neighborhoodsLayer,n=this.moleculesLayer;return[].concat(Object(r.a)(t),[e,A,n,this.createScaleBarLayer()],Object(r.a)(this.createSelectionLayers()))}},{key:"onUpdateCellsData",value:function(){var t=this.props,e=t.cells,A=void 0===e?{}:e,n=t.getCellCoords,r=void 0===n?S:n,i=Object.entries(A);this.cellsEntries=i,this.cellsQuadTree=Object(w.a)(i,r)}},{key:"onUpdateCellsLayer",value:function(){var t=(this.props.layers||[]).find((function(t){return"cells"===t.type}));this.cellsLayer=t?this.createCellsLayer(t):null}},{key:"onUpdateCellColors",value:function(){var t=this.randomColorData;if("number"===typeof this.props.cellColors.size){var e=this.props.cellColors.keys();t.data=new Uint8Array(t.height*t.width*3).fill(128),t.data[0]=0,t.data[1]=0,t.data[2]=0;var A,r=Object(n.a)(e);try{for(r.s();!(A=r.n()).done;){var i=A.value;if(i>0){var o=this.props.cellColors.get(i);o&&t.data.set(o.slice(0,3),3*Number(i))}}}catch(a){r.e(a)}finally{r.f()}}this.color=t}},{key:"onUpdateMoleculesData",value:function(){var t=this.props.molecules,e=void 0===t?{}:t,A=Object.entries(e).flatMap((function(t,e){var A=Object(i.a)(t,2),n=A[0];return A[1].map((function(t){var A=Object(i.a)(t,2);return[A[0],A[1],e,n]}))}));this.moleculesEntries=A}},{key:"onUpdateMoleculesLayer",value:function(){var t=(this.props.layers||[]).find((function(t){return"molecules"===t.type}));this.moleculesLayer=t?this.createMoleculesLayer(t):null}},{key:"onUpdateNeighborhoodsData",value:function(){var t=this.props.neighborhoods,e=void 0===t?{}:t,A=Object.entries(e);this.neighborhoodsEntries=A}},{key:"onUpdateNeighborhoodsLayer",value:function(){var t=(this.props.layers||[]).find((function(t){return"neighborhoods"===t.type}));this.neighborhoodsLayer=t?this.createNeighborhoodsLayer(t):null}},{key:"onUpdateImages",value:function(){this.imageLayers=this.createImageLayers()}},{key:"viewInfoDidUpdate",value:function(){var t=this.props.getCellCoords,e=void 0===t?S:t;Object(c.a)(Object(g.a)(A.prototype),"viewInfoDidUpdate",this).call(this,e)}},{key:"componentDidUpdate",value:function(t){var e=this;this.viewInfoDidUpdate();var A=function(A){return t[A]!==e.props[A]};["cells"].some(A)&&(this.onUpdateCellsData(),this.forceUpdate()),["layers","cells","cellFilter","cellSelection","cellColors"].some(A)&&(this.onUpdateCellsLayer(),this.forceUpdate()),["cellColors"].some(A)&&(this.onUpdateCellColors(),this.forceUpdate()),["molecules"].some(A)&&(this.onUpdateMoleculesData(),this.forceUpdate()),["layers","molecules"].some(A)&&(this.onUpdateMoleculesLayer(),this.forceUpdate()),["neighborhoods"].some(A)&&(this.onUpdateNeighborhoodsData(),this.forceUpdate()),["layers","neighborhoods"].some(A)&&(this.onUpdateNeighborhoodsLayer(),this.forceUpdate()),["layers","imageLayerLoaders","cellColors","cellHighlight","rasterLayersCallbacks"].some(A)&&(this.onUpdateImages(),this.forceUpdate())}}]),A}(F.a),R=Object(l.forwardRef)((function(t,e){return C.a.createElement(D,Object.assign({},t,{deckRef:e}))}));e.a=R},function(t,e,A){"use strict";var n=A(2),r=A.n(n),i=A(8),o=A(21),a=A(13),s=A(20),g=A(0),c=A.n(g),I=A(360),u=A.n(I),l=A(972),C=A(746),h=A(247),B=A.n(h),f=A(298),d=A.n(f),Q=A(89),E=A.n(Q),p=A(17);function y(t,e){var A;if(void 0===e){var n,r=Object(p.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;null!=i&&(A<i||void 0===A&&i>=i)&&(A=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(p.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;null!=(g=e(g,++a,t))&&(A<g||void 0===A&&g>=g)&&(A=g)}}catch(c){s.e(c)}finally{s.f()}}return A}var v=A(1390),m=A(1142),b=A(546),F=Object(b.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 w(t){var e=t.colorScaleLo,A=t.colorScaleHi,n=t.onColorScaleChange,r=F();return c.a.createElement(v.a,{component:"div",m:1,className:r.box},c.a.createElement(m.a,{orientation:"vertical",value:[e,A],onChange:n,"aria-labelledby":"colorscale-slider",min:0,max:1,step:.005}))}var S=A(730),D=A(731),R=A(732),U=A(87),G=A(76);function N(t){var e=t.layer,A=t.viewport;return"axisLeft"===A.id?e.id.startsWith("axisLeft"):"axisTop"===A.id?e.id.startsWith("axisTop"):"heatmap"===A.id?e.id.startsWith("heatmap"):"colorsLeft"===A.id?e.id.startsWith("colorsLeft"):"colorsTop"===A.id&&e.id.startsWith("colorsTop")}var k=A(9),x=A(15),O=A(23),M=A(24),L=A(1122),_=A.n(L),J="undefined"!==typeof navigator?navigator.hardwareConcurrency||4:null,T=function(t){Object(O.a)(A,t);var e=Object(M.a)(A);function A(){return Object(k.a)(this,A),e.call(this,_.a)}return Object(x.a)(A,[{key:"process",value:function(){var t=Object(i.a)(r.a.mark((function t(e){var A,n=this;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForWorker();case 2:return A=t.sent,t.abrupt("return",new Promise((function(t,r){A.onmessage=function(e){n.finishTask(A),t(e.data)},A.onerror=function(t){n.finishTask(A),r(t)},A.postMessage(["getTile",e],[e.data])})));case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),A}(function(){function t(e){Object(k.a)(this,t),this.workers=[],this.idleWorkers=[],this.waitQueue=[],this.decoder=null;for(var A=0;A<J;++A){var n=new e;this.workers.push(n),this.idleWorkers.push(n)}}return Object(x.a)(t,[{key:"process",value:function(){var t=Object(i.a)(r.a.mark((function t(){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error('Pool needs to implement "process" method');case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"waitForWorker",value:function(){var t=Object(i.a)(r.a.mark((function t(){var e,A,n;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=this.idleWorkers.pop())){t.next=3;break}return t.abrupt("return",e);case 3:return A={},n=new Promise((function(t){A.resolve=t})),this.waitQueue.push(A),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"finishTask",value:function(){var t=Object(i.a)(r.a.mark((function t(e){var A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(A=this.waitQueue.pop())?A.resolve(e):this.idleWorkers.push(e);case 2:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"destroy",value:function(){for(var t=0;t<this.workers.length;++t)this.workers[t].terminate()}}]),t}()),j=Object(g.forwardRef)((function(t,e){var A=t.uuid,n=t.theme,I=t.viewState,h=t.setViewState,f=t.setHeatmapControls,Q=t.heatmapControls,p=void 0===Q?[0,1]:Q,v=t.width,m=t.height,b=t.expressionMatrix,F=t.cellColors,k=t.clearPleaseWait,x=t.setComponentHover,O=t.setCellHighlight,M=void 0===O?Object(U.i)("Heatmap"):O,L=t.setGeneHighlight,_=void 0===L?Object(U.j)("Heatmap"):L,J=t.updateViewInfo,j=void 0===J?Object(U.k)("Heatmap"):J,H=t.setIsRendering,Y=void 0===H?function(){}:H,V=t.transpose,Z=void 0!==V&&V,W=t.variablesTitle,K=void 0===W?"Genes":W,P=t.observationsTitle,q=void 0===P?"Cells":P,X=Object(s.a)({},I,{target:Z?[I.target[1],I.target[0]]:I.target,minZoom:0}),z=Z?K:q,$=Z?q:K,tt=Object(g.useMemo)((function(){return new T}),[]);Object(g.useEffect)((function(){k&&b&&k("expression-matrix")}),[k,b]);var et=Object(g.useRef)(),At=Object(g.useRef)(),nt=Object(g.useState)([]),rt=Object(a.a)(nt,2),it=rt[0],ot=rt[1],at=Object(g.useState)([]),st=Object(a.a)(at,2),gt=st[0],ct=st[1],It=Object(g.useState)(p[0]),ut=Object(a.a)(It,2),lt=ut[0],Ct=ut[1],ht=Object(g.useState)(p[1]),Bt=Object(a.a)(ht,2),ft=Bt[0],dt=Bt[1],Qt=Object(g.useCallback)((function(t,e){Ct(e[0]),dt(e[1]),f(e)}),[f]),Et=Object(g.useReducer)((function(t){return t+1}),0),pt=Object(a.a)(Et,2),yt=pt[0],vt=pt[1],mt=Object(g.useState)([]),bt=Object(a.a)(mt,2),Ft=bt[0],wt=bt[1];Object(g.useEffect)((function(){b&&b.matrix&&(At.current=Object(U.h)(b.matrix))}),[At,b]),Object(g.useEffect)((function(){if(b){var t=F&&0!==F.size?Array.from(F.keys()):b.rows,e=Z?gt:it;E()(e,t)||(Z?ct(t):ot(t))}}),[b,F,gt,it,Z]),Object(g.useEffect)((function(){b&&(Z?ot(b.cols):ct(b.cols))}),[b,Z]);var St=Object(g.useMemo)((function(){return b?[y(b.rows.map((function(t){return t.length}))),y(b.cols.map((function(t){return t.length})))]:[0,0]}),[b]),Dt=Object(a.a)(St,2),Rt=Dt[0],Ut=Dt[1],Gt=gt.length,Nt=it.length,kt=function(t,e,A){return[d()((t?e:A)*G.b,G.e,G.d),d()((t?A:e)*G.b,G.e,G.d)]}(Z,Ut,Rt),xt=Object(a.a)(kt,2),Ot=xt[0],Mt=xt[1],Lt=Mt+G.g,_t=Ot+G.g,Jt=v-_t,Tt=m-Lt,jt=-Jt/2,Ht=Jt/2,Yt=-Tt/2,Vt=Tt/2,Zt=Math.ceil(Gt/G.l),Wt=Math.ceil(Nt/G.l),Kt=1-(G.l-Gt%G.l)/(Zt*G.l),Pt=1-(G.l-Nt%G.l)/(Wt*G.l),qt=Jt/Kt/Zt,Xt=Tt/Pt/Wt,zt=Math.pow(2,X.zoom),$t=Tt*zt/Nt,te=Jt*zt/Gt,ee=d()(Math.pow(2,Math.ceil(Math.log2(1/te))),G.i,G.h),Ae=d()(Math.pow(2,Math.ceil(Math.log2(1/$t))),G.i,G.h),ne=Object(a.a)(X.target,2),re=ne[0],ie=ne[1];Object(g.useEffect)((function(){j({uuid:A,project:function(t,e){return function(t,e,A){var n=A.offsetLeft,r=A.offsetTop,i=A.targetX,o=A.targetY,a=A.scaleFactor,s=A.matrixWidth,g=A.matrixHeight,c=A.numRows,I=A.numCols,u=null,l=null;if(null!==e){var C=-g*a/2,h=o*a-g/2,B=o*a+g/2,f=C+(e+.5)/c*(g*a/2-C);h<=f&&f<=B&&(u=r+(f-h)/(B-h)*g)}if(null!==t){var d=-s*a/2,Q=i*a-s/2,E=i*a+s/2,p=d+(t+.5)/I*(s*a/2-d);Q<=p&&p<=E&&(l=n+(p-Q)/(E-Q)*s)}return[l,u]}(Z?gt.indexOf(t):gt.indexOf(e),Z?it.indexOf(e):it.indexOf(t),{offsetLeft:_t,offsetTop:Lt,targetX:X.target[0],targetY:X.target[1],scaleFactor:zt,matrixWidth:Jt,matrixHeight:Tt,numRows:Nt,numCols:Gt})}})}),[A,j,Z,gt,it,_t,Lt,X,zt,Jt,Tt,Nt,Gt]);var oe=Object(g.useCallback)((function(t){var e=t.viewState,A=e.zoom,n=Math.pow(2,A),r=0===A?0:-(Ht-Ht/n),i=-1*r,o=0===A?0:-(Vt-Vt/n),a=-1*o,s=[d()(e.target[0],r,i),d()(e.target[1],o,a)];h({zoom:A,target:Z?[s[1],s[0]]:s})}),[Ht,Vt,Z,h]);Object(g.useEffect)((function(){b&&gt&&it&&Zt&&Wt&&wt((function(t){return[].concat(Object(o.a)(t),[u()()])}))}),[At,b,gt,it,Zt,Wt]),Object(g.useEffect)((function(){if(!(Ft.length<1)){var t=Ft[Ft.length-1];if(At.current&&At.current.buffer.byteLength){var e=b.rows,A=b.cols,n=b.matrix,o=B()(Wt).map((function(o){return B()(Zt).map(function(){var a=Object(i.a)(r.a.mark((function i(a){return r.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",tt.process({curr:t,tileI:o,tileJ:a,tileSize:G.l,cellOrdering:Z?gt:it,rows:e,cols:A,transpose:Z,data:n.buffer.slice()}));case 1:case"end":return r.stop()}}),i)})));return function(t){return a.apply(this,arguments)}}())}));(function(){var t=Object(i.a)(r.a.mark((function t(){var e,A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(o.flat());case 2:e=t.sent,et.current=e.map((function(t){return t.tile})),vt(),At.current=new Uint8Array(e[0].buffer),A=e[0].curr,wt((function(t){var e=t.indexOf(A);return t.slice(e+1,t.length)}));case 8:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}})()()}}}),[it,gt,Ft,b,Z,Zt,Wt,tt]),Object(g.useEffect)((function(){Y(Ft.length>0)}),[Ft,Y]);var ae=Object(g.useMemo)((function(){if(!et.current||Ft.length)return[];return et.current.map((function(t,e){return function(t,e,A){return new R.a({id:"heatmapLayer-".concat(yt,"-").concat(t,"-").concat(e),image:A,bounds:[jt+e*qt,Yt+t*Xt,jt+(e+1)*qt,Yt+(t+1)*Xt],aggSizeX:ee,aggSizeY:Ae,colorScaleLo:lt,colorScaleHi:ft,updateTriggers:{image:[it,gt],bounds:[Xt,qt]}})}(Math.floor(e/Zt),e%Zt,t)}))}),[Ft,yt,jt,qt,Yt,Xt,ee,Ae,lt,ft,it,gt,Zt]),se=Object(g.useMemo)((function(){return gt.map((function(t,e){return[e,t]}))}),[gt]),ge=Object(g.useMemo)((function(){return it.map((function(t,e){return[e,t]}))}),[it]),ce=[new S.a({targetX:re,targetY:ie,scaleFactor:zt,axisLeftLabelData:ge,matrixTop:Yt,height:Nt,matrixHeight:Tt,cellHeight:$t,cellWidth:te,axisTopLabelData:se,matrixLeft:jt,width:Gt,matrixWidth:Jt,viewHeight:m,viewWidth:v,theme:n,axisLeftTitle:z,axisTopTitle:$,axisOffsetLeft:Ot,axisOffsetTop:Mt})],Ie=Object(g.useMemo)((function(){if(!F)return null;var t,e,A,n,r=Z?gt:it,i=Z?G.l:1,o=Z?1:G.l;return B()(Z?Zt:Wt).map((function(s){var g=new Uint8ClampedArray(1*G.l*4);return B()(G.l).forEach((function(i){if((n=s*G.l+i)<r.length&&(t=r[n],A=F.get(t),e=4*(Z?i:G.l-i-1),A)){var o=A,c=Object(a.a)(o,3),I=c[0],u=c[1],l=c[2];g[e+0]=I,g[e+1]=u,g[e+2]=l,g[e+3]=255}})),new ImageData(g,i,o)}))}),[F,Z,gt,it,Zt,Wt]),ue=Object(g.useMemo)((function(){return Ie?Ie.map((function(t,e){return new D.a({id:"".concat(Z?"colorsTopLayer":"colorsLeftLayer","-").concat(e,"-").concat(u()()),image:t,bounds:Z?[jt+e*qt,-Tt/2,jt+(e+1)*qt,Tt/2]:[-Jt/2,Yt+e*Xt,Jt/2,Yt+(e+1)*Xt]})})):[]}),[Ie,Yt,jt,Tt,Jt,qt,Xt,Z]),le=ae.concat(ce).concat(ue);return c.a.createElement(c.a.Fragment,null,c.a.createElement(l.a,{id:"deckgl-overlay-".concat(A),ref:e,views:[new C.a({id:"heatmap",controller:!0,x:_t,y:Lt,width:Jt,height:Tt}),new C.a({id:"axisLeft",controller:!1,x:Z?G.g:0,y:Lt,width:Ot,height:Tt}),new C.a({id:"axisTop",controller:!1,x:_t,y:Z?0:G.g,width:Jt,height:Mt}),new C.a({id:"colorsLeft",controller:!1,x:Ot,y:Lt,width:G.g-G.c,height:Tt}),new C.a({id:"colorsTop",controller:!1,x:_t,y:Mt,width:Jt,height:G.g-G.c})],layers:le,layerFilter:N,getCursor:function(t){return t.isDragging?"grabbing":"default"},glOptions:U.c,onViewStateChange:oe,viewState:X,onHover:function(t,e){if(b){var A=e.offsetCenter,n=function(t,e,A){var n=A.offsetLeft,r=A.offsetTop,i=A.targetX,o=A.targetY,a=A.scaleFactor,s=A.matrixWidth,g=A.matrixHeight,c=A.numRows,I=A.numCols,u=t-n,l=e-r;if(u<0||l<0)return[null,null];var C=(i*a+s*a/2-s/2)/(s*a)+u/(s*a),h=(o*a+g*a/2-g/2)/(g*a)+l/(g*a),B=Math.floor(h*c);return[Math.floor(C*I),B]}(A.x,A.y,{offsetLeft:_t,offsetTop:Lt,targetX:re,targetY:ie,scaleFactor:zt,matrixWidth:Jt,matrixHeight:Tt,numRows:Nt,numCols:Gt}),r=Object(a.a)(n,2),i=r[0],o=r[1];null===i&&(Z?M(null):_(null)),null===o&&(Z?_(null):M(null));var s=b.rows.indexOf(Z?gt[i]:it[o]),g=b.cols.indexOf(Z?it[o]:gt[i]),c=b.rows[s],I=b.cols[g];x&&x(),M(c||null),_(I||null)}}}),c.a.createElement(w,{colorScaleLo:lt,colorScaleHi:ft,onColorScaleChange:Qt}))}));e.a=j},function(t,e,A){"use strict";var n=A(21),r=A(20),i=A(9),o=A(15),a=A(71),s=A(92),g=A(23),c=A(24),I=A(0),u=A.n(I),l=A(602),C=A(365),h=A(879),B=A(608),f=A(87),d=A(801),Q=A(803),E=A(977);function p(t){return function(){return t}}function y(t){return t+1e-6*(Math.random()-.5)}var v=function(t){return function(e){var A=e[1].mappings;if(!(t in A)){var n=Object.keys(A).map((function(t){return'"'.concat(t,'"')})).join(", ");throw new Error('Expected to find "'.concat(t,'", but available mappings are: ').concat(n))}var r=A[t];return[r[0],-r[1],0]}},m=function(t){return function(e){return e.mappings[t]}},b=function(t){Object(g.a)(A,t);var e=Object(c.a)(A);function A(t){var n;return Object(i.a)(this,A),(n=e.call(this,t)).cellsEntries=[],n.cellsQuadTree=null,n.cellsLayer=null,n.cellSetsForceSimulation=function(){var t,e,A,n=1,r=1,i=p([0,0]);function o(t){return t.x+t.vx+A[t.index][0]/2}function a(t){return t.y+t.vy+A[t.index][1]/2}function s(t){if(t.data)t.size=A[t.data.index];else{t.size=[0,0];for(var e=0;e<4;e++)t[e]&&t[e].size&&(t.size[0]=Math.max(t.size[0],t[e].size[0]),t.size[1]=Math.max(t.size[1],t[e].size[1]))}}function g(){var i,g,c,I,u,l=Object(E.a)(t,o,a).visitAfter(s);function C(t,A,r,s,l){var C=t.data,h=(g[0]+t.size[0])/2,B=(g[1]+t.size[1])/2;if(C&&C.index>i.index){var f=y(I-o(C)),d=y(u-a(C)),Q=Math.abs(f)-h,E=Math.abs(d)-B;if(Q<0&&E<0){var p=Math.sqrt(f*f+d*d),v=e[C.index]/(c+e[C.index]);Math.abs(Q)<Math.abs(E)?(i.vx-=(f*=Q/p*n)*v,C.vx+=f*(1-v)):(i.vy-=(d*=E/p*n)*v,C.vy+=d*(1-v))}return A>I+h||s<I-h||r>u+B||l<u-B}return!1}function h(){for(var n=0;n<t.length;n++)i=t[n],g=A[n],c=e[n],I=o(i),u=a(i),l.visit(C)}for(var B=0;B<r;B++)h()}return g.initialize=function(n){A=(t=n).map(i),e=A.map((function(t){return t[0]+t[1]}))},g.iterations=function(){return arguments.length?(r=+(arguments.length<=0?void 0:arguments[0]),g):r},g.strength=function(){return arguments.length?(n=+(arguments.length<=0?void 0:arguments[0]),g):n},g.size=function(){return arguments.length?(i="function"===typeof(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:p(arguments.length<=0?void 0:arguments[0]),g):i},g}(),n.cellSetsLabelPrevZoom=null,n.cellSetsLayers=[],n.onUpdateCellsData(),n.onUpdateCellsLayer(),n.onUpdateCellSetsLayers(),n}return Object(o.a)(A,[{key:"createCellsLayer",value:function(){var t=this.cellsEntries,e=this.props,A=e.theme,n=e.mapping,i=e.getCellPosition,o=void 0===i?v(n):i,a=e.cellRadiusScale,s=void 0===a?.2:a,g=e.cellOpacity,c=void 0===g?1:g,I=e.cellFilter,u=e.cellSelection,l=e.setCellHighlight,C=e.setComponentHover,h=e.getCellIsSelected,d=void 0===h?function(t){return function(e){return!t||t.includes(e[0])}}(t.length===u.length?null:u):h,Q=e.cellColors,E=e.getCellColor,p=void 0===E?function(t){return function(e){return t&&t.get(e[0])||f.b}}(Q):E,y=e.onCellClick,m=I?t.filter((function(t){return I.includes(t[0])})):t;return new B.b(Object(r.a)({id:"scatterplot",backgroundColor:"dark"===A?[0,0,0]:[241,241,241],isSelected:d,opacity:c,radiusScale:s,radiusMinPixels:1,radiusMaxPixels:10,getPosition:o,getColor:p,getLineWidth:0,onClick:function(t){y&&y(t)}},Object(f.g)(m,void 0,l,C)))}},{key:"createCellSetsLayers",value:function(){var t=this.props,e=t.theme,A=t.cellSetPolygons,n=t.viewState,r=t.cellSetPolygonsVisible,i=t.cellSetLabelsVisible,o=t.cellSetLabelSize,a=[];if(r&&a.push(new l.a({id:"cell-sets-polygon-layer",data:A,stroked:!0,filled:!1,wireframe:!0,lineWidthMaxPixels:1,getPolygon:function(t){return t.hull},getLineColor:function(t){return t.color},getLineWidth:1})),i){var s=n.zoom,g=A.map((function(t){return{x:t.centroid[0],y:t.centroid[1],label:t.name}})),c=this.cellSetsForceSimulation.size((function(t){return[1*o/Math.pow(2,s)*4*t.label.length,1*o/Math.pow(2,s)*1.5]}));Object(h.a)().nodes(g).force("collision",c).tick(100),a.push(new C.a({id:"cell-sets-text-layer",data:g,getPosition:function(t){return[t.x,t.y]},getText:function(t){return t.label},getColor:"dark"===e?[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 a}},{key:"createSelectionLayers",value:function(){var t=this.props,e=t.viewState,A=t.mapping,n=t.getCellCoords,r=void 0===n?m(A):n,i=t.setCellSelection,o=this.state.tool,a=this.cellsQuadTree;return Object(B.c)(o,e.zoom,"scatterplot",r,i,a,!0)}},{key:"getLayers",value:function(){var t=this.cellsLayer,e=this.cellSetsLayers;return[t].concat(Object(n.a)(e),Object(n.a)(this.createSelectionLayers()))}},{key:"onUpdateCellsData",value:function(){var t=this.props,e=t.cells,A=void 0===e?{}:e,n=t.mapping,r=t.getCellCoords,i=void 0===r?m(n):r,o=Object.entries(A);this.cellsEntries=o,this.cellsQuadTree=Object(d.a)(o,i)}},{key:"onUpdateCellsLayer",value:function(){this.cellsLayer=this.createCellsLayer()}},{key:"onUpdateCellSetsLayers",value:function(t){if(t){var e=this.props,A=e.viewState,n=e.cellSetLabelsVisible,r=A.zoom,i=this.cellSetsLabelPrevZoom;n&&(null===i||Math.abs(i-r)>.25)&&(this.cellSetsLayers=this.createCellSetsLayers(),this.cellSetsLabelPrevZoom=r)}else this.cellSetsLayers=this.createCellSetsLayers()}},{key:"viewInfoDidUpdate",value:function(){var t=this.props,e=t.mapping,n=t.getCellPosition,r=void 0===n?v(e):n;Object(s.a)(Object(a.a)(A.prototype),"viewInfoDidUpdate",this).call(this,(function(t){return r([null,t])}))}},{key:"componentDidUpdate",value:function(t){var e=this;this.viewInfoDidUpdate();var A=function(A){return t[A]!==e.props[A]};["cells"].some(A)&&(this.onUpdateCellsData(),this.forceUpdate()),["cells","cellFilter","cellSelection","cellColors","cellRadiusScale"].some(A)&&(this.onUpdateCellsLayer(),this.forceUpdate()),["cellSetPolygons","cellSetPolygonsVisible","cellSetLabelsVisible","cellSetLabelSize"].some(A)&&(this.onUpdateCellSetsLayers(!1),this.forceUpdate()),A("viewState")&&(this.onUpdateCellSetsLayers(!0),this.forceUpdate())}}]),A}(Q.a),F=Object(I.forwardRef)((function(t,e){return u.a.createElement(b,Object.assign({},t,{deckRef:e}))}));e.a=F},function(t,e,A){"use strict";(function(t){function n(e,A){var n,r="undefined"!==typeof(n="undefined"!==typeof A?A:"undefined"!==typeof window?window:"undefined"!==typeof self?self:t).document&&n.document.attachEvent;if(!r){var i=function(){var t=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(t){return n.setTimeout(t,20)};return function(e){return t(e)}}(),o=function(){var t=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||n.clearTimeout;return function(e){return t(e)}}(),a=function(t){var e=t.__resizeTriggers__,A=e.firstElementChild,n=e.lastElementChild,r=A.firstElementChild;n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,r.style.width=A.offsetWidth+1+"px",r.style.height=A.offsetHeight+1+"px",A.scrollLeft=A.scrollWidth,A.scrollTop=A.scrollHeight},s=function(t){if(!(t.target.className&&"function"===typeof t.target.className.indexOf&&t.target.className.indexOf("contract-trigger")<0&&t.target.className.indexOf("expand-trigger")<0)){var e=this;a(this),this.__resizeRAF__&&o(this.__resizeRAF__),this.__resizeRAF__=i((function(){(function(t){return t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height})(e)&&(e.__resizeLast__.width=e.offsetWidth,e.__resizeLast__.height=e.offsetHeight,e.__resizeListeners__.forEach((function(A){A.call(e,t)})))}))}},g=!1,c="",I="animationstart",u="Webkit Moz O ms".split(" "),l="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),C=n.document.createElement("fakeelement");if(void 0!==C.style.animationName&&(g=!0),!1===g)for(var h=0;h<u.length;h++)if(void 0!==C.style[u[h]+"AnimationName"]){c="-"+u[h].toLowerCase()+"-",I=l[h],g=!0;break}var B="resizeanim",f="@"+c+"keyframes "+B+" { from { opacity: 0; } to { opacity: 0; } } ",d=c+"animation: 1ms "+B+"; "}return{addResizeListener:function(t,A){if(r)t.attachEvent("onresize",A);else{if(!t.__resizeTriggers__){var i=t.ownerDocument,o=n.getComputedStyle(t);o&&"static"==o.position&&(t.style.position="relative"),function(t){if(!t.getElementById("detectElementResize")){var A=(f||"")+".resize-triggers { "+(d||"")+'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%; }',n=t.head||t.getElementsByTagName("head")[0],r=t.createElement("style");r.id="detectElementResize",r.type="text/css",null!=e&&r.setAttribute("nonce",e),r.styleSheet?r.styleSheet.cssText=A:r.appendChild(t.createTextNode(A)),n.appendChild(r)}}(i),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=i.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),a(t),t.addEventListener("scroll",s,!0),I&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==B&&a(t)},t.__resizeTriggers__.addEventListener(I,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(A)}},removeResizeListener:function(t,e){if(r)t.detachEvent("onresize",e);else if(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),!t.__resizeListeners__.length){t.removeEventListener("scroll",s,!0),t.__resizeTriggers__.__animationListener__&&(t.__resizeTriggers__.removeEventListener(I,t.__resizeTriggers__.__animationListener__),t.__resizeTriggers__.__animationListener__=null);try{t.__resizeTriggers__=!t.removeChild(t.__resizeTriggers__)}catch(A){}}}}}A.d(e,"a",(function(){return n}))}).call(this,A(58))},function(t,e,A){"use strict";e.__esModule=!0,e.default=function(t,e){var A={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(A[n]=t[n]);return A}},function(t,e,A){"use strict";A.d(e,"a",(function(){return u}));var n=A(20),r=A(0),i=A.n(r),o=A(833),a=A(1141),s=A(821),g=A(822),c=A(1142),I=A(452);function u(t){var e=t.label,A=t.layer,r=t.layerType,u=t.handleLayerChange,l=A.opacity,C=A.visible;var h=Object(I.f)();return i.a.createElement(o.a,{item:!0,style:{marginTop:"10px"}},i.a.createElement(s.a,{className:h.root},i.a.createElement(g.a,{style:{padding:"15px 8px 0px 8px",marginBottom:"-5px"}},e),i.a.createElement(o.a,{container:!0,direction:"row",justify:"space-between"},i.a.createElement(o.a,{item:!0,xs:2},i.a.createElement(a.a,{color:"primary",checked:C,onChange:function(t,e){return function(t){u(Object(n.a)({},A,{visible:t}))}(e)}})),i.a.createElement(o.a,{item:!0,xs:9,style:{paddingRight:"8px"}},i.a.createElement(c.a,{value:l,min:0,max:1,step:.001,onChange:function(t,e){return function(t){if("cells"===r){var e=t<.7;u(Object(n.a)({},A,{opacity:t,stroked:e}))}else u(Object(n.a)({},A,{opacity:t}))}(e)},style:{marginTop:"7px"},orientation:"horizontal"})))))}},function(t,e,A){"use strict";var n=A(0),r=n.createContext({});e.a=r},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.default.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");e.default=i},function(t,e,A){"use strict";(function(t){A.d(e,"a",(function(){return r}));var n=A(3);function r(e,A){var r,i=A&&A.property?Object(n.t)(A.property):n.x;return!Object(n.F)(e)||(r=e,"function"===typeof t&&Object(n.D)(t.isBuffer)&&t.isBuffer(r))?i(JSON.parse(e)):function(t,e){return e&&e.copy?JSON.parse(JSON.stringify(t)):t}(i(e))}r.responseType="json"}).call(this,A(104).Buffer)},function(t,e,A){"use strict";var n=/("(?:[^\\"]|\\.)*")|[:,]/g;t.exports=function(t,e){var A,r,i;return e=e||{},A=JSON.stringify([1],void 0,void 0===e.indent?2:e.indent).slice(2,-3),r=""===A?1/0:void 0===e.maxLength?80:e.maxLength,i=e.replacer,function t(e,o,a){var s,g,c,I,u,l,C,h,B,f,d,Q;if(e&&"function"===typeof e.toJSON&&(e=e.toJSON()),void 0===(d=JSON.stringify(e,i)))return d;if(C=r-o.length-a,d.length<=C&&(B=d.replace(n,(function(t,e){return e||t+" "}))).length<=C)return B;if(null!=i&&(e=JSON.parse(d),i=void 0),"object"===typeof e&&null!==e){if(h=o+A,c=[],g=0,Array.isArray(e))for(f="[",s="]",C=e.length;g<C;g++)c.push(t(e[g],h,g===C-1?0:1)||"null");else for(f="{",s="}",C=(l=Object.keys(e)).length;g<C;g++)I=l[g],u=JSON.stringify(I)+": ",void 0!==(Q=t(e[I],h,u.length+(g===C-1?0:1)))&&c.push(u+Q);if(c.length>0)return[f,A+c.join(",\n"+h),s].join("\n"+o)}return d}(t,"",0)}},function(t,e,A){"use strict";var n=A(30),r=A(10),i=A(0),o=(A(25),A(32)),a=A(41),s=[0,1,2,3,4,5,6,7,8,9,10],g=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,A=parseFloat(t);return"".concat(A/e).concat(String(t).replace(String(A),"")||"px")}var I=i.forwardRef((function(t,e){var A=t.alignContent,a=void 0===A?"stretch":A,s=t.alignItems,g=void 0===s?"stretch":s,c=t.classes,I=t.className,u=t.component,l=void 0===u?"div":u,C=t.container,h=void 0!==C&&C,B=t.direction,f=void 0===B?"row":B,d=t.item,Q=void 0!==d&&d,E=t.justify,p=void 0===E?"flex-start":E,y=t.lg,v=void 0!==y&&y,m=t.md,b=void 0!==m&&m,F=t.sm,w=void 0!==F&&F,S=t.spacing,D=void 0===S?0:S,R=t.wrap,U=void 0===R?"wrap":R,G=t.xl,N=void 0!==G&&G,k=t.xs,x=void 0!==k&&k,O=t.zeroMinWidth,M=void 0!==O&&O,L=Object(n.a)(t,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),_=Object(o.a)(c.root,I,h&&[c.container,0!==D&&c["spacing-xs-".concat(String(D))]],Q&&c.item,M&&c.zeroMinWidth,"row"!==f&&c["direction-xs-".concat(String(f))],"wrap"!==U&&c["wrap-xs-".concat(String(U))],"stretch"!==g&&c["align-items-xs-".concat(String(g))],"stretch"!==a&&c["align-content-xs-".concat(String(a))],"flex-start"!==p&&c["justify-xs-".concat(String(p))],!1!==x&&c["grid-xs-".concat(String(x))],!1!==w&&c["grid-sm-".concat(String(w))],!1!==b&&c["grid-md-".concat(String(b))],!1!==v&&c["grid-lg-".concat(String(v))],!1!==N&&c["grid-xl-".concat(String(N))]);return i.createElement(l,Object(r.a)({className:_,ref:e},L))})),u=Object(a.a)((function(t){return Object(r.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(t,e){var A={};return s.forEach((function(n){var r=t.spacing(n);0!==r&&(A["spacing-".concat(e,"-").concat(n)]={margin:"-".concat(c(r,2)),width:"calc(100% + ".concat(c(r),")"),"& > $item":{padding:c(r,2)}})})),A}(t,"xs"),{},t.breakpoints.keys.reduce((function(e,A){return function(t,e,A){var n={};g.forEach((function(t){var e="grid-".concat(A,"-").concat(t);if(!0!==t)if("auto"!==t){var r="".concat(Math.round(t/12*1e8)/1e6,"%");n[e]={flexBasis:r,flexGrow:0,maxWidth:r}}else n[e]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else n[e]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===A?Object(r.a)(t,n):t[e.breakpoints.up(A)]=n}(e,t,A),e}),{}))}),{name:"MuiGrid"})(I);e.a=u},,,,,function(t,e,A){var n=A(990),r=A(85),i=A(202),o=A(431).default,a=i.featureEach,s=(i.coordEach,r.polygon,r.featureCollection);function g(t){var e=n(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),n.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:o(t),e.push(t)})),n.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:o(t),n.prototype.remove.call(this,t,e)},e.clear=function(){return n.prototype.clear.call(this)},e.search=function(t){var e=n.prototype.search.call(this,this.toBBox(t));return s(e)},e.collides=function(t){return n.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=n.prototype.all.call(this);return s(t)},e.toJSON=function(){return n.prototype.toJSON.call(this)},e.fromJSON=function(t){return n.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=o(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=o(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=g,t.exports.default=g},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(85),r=A(153),i=A(202);e.default=function(t){if(!t)throw new Error("geojson is required");var e=[];return i.flattenEach(t,(function(t){!function(t,e){var A=[],i=t.geometry;if(null!==i){switch(i.type){case"Polygon":A=r.getCoords(i);break;case"LineString":A=[r.getCoords(i)]}A.forEach((function(A){(function(t,e){var A=[];return t.reduce((function(t,r){var i=n.lineString([t,r],e);return i.bbox=function(t,e){var A=t[0],n=t[1],r=e[0],i=e[1];return[A<r?A:r,n<i?n:i,A>r?A:r,n>i?n:i]}(t,r),A.push(i),r})),A})(A,t.properties).forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),n.featureCollection(e)}},function(t,e,A){var n=A(841),r=A(993),i=A(994),o=A(995),a=A(998),s=A(1004),g=Date.prototype.getTime;function c(t,e,A){var l=A||{};return!!(l.strict?i(t,e):t===e)||(!t||!e||"object"!==typeof t&&"object"!==typeof e?l.strict?i(t,e):t==e:function(t,e,A){var i,l;if(typeof t!==typeof e)return!1;if(I(t)||I(e))return!1;if(t.prototype!==e.prototype)return!1;if(r(t)!==r(e))return!1;var C=o(t),h=o(e);if(C!==h)return!1;if(C||h)return t.source===e.source&&a(t)===a(e);if(s(t)&&s(e))return g.call(t)===g.call(e);var B=u(t),f=u(e);if(B!==f)return!1;if(B||f){if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0}if(typeof t!==typeof e)return!1;try{var d=n(t),Q=n(e)}catch(E){return!1}if(d.length!==Q.length)return!1;for(d.sort(),Q.sort(),i=d.length-1;i>=0;i--)if(d[i]!=Q[i])return!1;for(i=d.length-1;i>=0;i--)if(l=d[i],!c(t[l],e[l],A))return!1;return!0}(t,e,l))}function I(t){return null===t||void 0===t}function u(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&("function"===typeof t.copy&&"function"===typeof t.slice&&!(t.length>0&&"number"!==typeof t[0]))}t.exports=c},function(t,e,A){"use strict";var n=Array.prototype.slice,r=A(842),i=Object.keys,o=i?function(t){return i(t)}:A(992),a=Object.keys;o.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return r(t)?a(n.call(t)):a(t)}):Object.keys=o;return Object.keys||o},t.exports=o},function(t,e,A){"use strict";var n=Object.prototype.toString;t.exports=function(t){var e=n.call(t),A="[object Arguments]"===e;return A||(A="[object Array]"!==e&&null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),A}},function(t,e,A){"use strict";var n=Object,r=TypeError;t.exports=function(){if(null!=this&&this!==n(this))throw new r("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t}},function(t,e,A){"use strict";var n=A(843),r=A(778).supportsDescriptors,i=Object.getOwnPropertyDescriptor,o=TypeError;t.exports=function(){if(!r)throw new o("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"===typeof t.get&&"boolean"===typeof/a/.dotAll)return t.get}return n}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_STYLE=e.MAX_ARROWS=e.DEFAULT_ARROWS=e.ArrowStyles=void 0;var n={NONE:0,FORWARD:1,BACKWARD:2,BOTH:3};e.ArrowStyles=n;e.DEFAULT_ARROWS=1;e.MAX_ARROWS=3;var r={arrowColor:[0,0,0,1],arrowCount:1,arrowStyle:n.NONE,fillColor:[0,0,0,1],lineColor:[0,0,0,1],lineWidthMeters:5,outlineRadiusMeters:0,opacity:1,zLevel:0};e.DEFAULT_STYLE=r},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SELECTION_TYPE=void 0;var n=A(152),r=A(85),i=c(A(431)),o=c(A(557)),a=c(A(793)),s=c(A(1006)),g=c(A(258));function c(t){return t&&t.__esModule?t:{default:t}}function I(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||C(t,e)||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(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||C(t)||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(t,e){if(t){if("string"===typeof t)return h(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function B(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var d=[0,255,0,255],Q=[255,255,255,90],E=[20,20],p="DeckDrawerPick",y={NONE:null,RECTANGLE:"rectangle",POLYGON:"polygon"};e.SELECTION_TYPE=y;var v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),f(this,"nebula",void 0),f(this,"usePolygon",void 0),f(this,"validPolygon",void 0),f(this,"landPoints",void 0),f(this,"mousePoints",void 0),this.nebula=e,this.usePolygon=!1,this.landPoints=[],this.mousePoints=[]}var e,A,c;return e=t,(A=[{key:"_getLayerIds",value:function(){return this.nebula.deckgl.props.layers.filter((function(t){return t&&t.props&&t.props.nebulaLayer&&t.props.nebulaLayer.enableSelection})).map((function(t){return t.id}))}},{key:"_selectFromPickingInfos",value:function(t){var e=t.map((function(t){var e=t.layer,A=t.index;return t.object.original||e.props.nebulaLayer.deckCache.originals[A]}));this.nebula.props.onSelection(e)}},{key:"_getBoundingBox",value:function(){var t=this.mousePoints,e=t.map((function(t){return t[0]})),A=t.map((function(t){return t[1]})),n=Math.min.apply(Math,l(e)),r=Math.min.apply(Math,l(A));return{x:n,y:r,width:Math.max.apply(Math,l(e))-n,height:Math.max.apply(Math,l(A))-r}}},{key:"_selectRectangleObjects",value:function(){if(2===this.landPoints.length){var t=u(this.mousePoints[0],2),e=t[0],A=t[1],n=u(this.mousePoints[1],2),r=n[0],i=n[1],o=this.nebula.deckgl.pickObjects({x:Math.min(e,r),y:Math.min(A,i),width:Math.abs(r-e),height:Math.abs(i-A),layerIds:this._getLayerIds()});this._selectFromPickingInfos(o)}}},{key:"_selectPolygonObjects",value:function(){var t=this.nebula.deckgl.pickObjects(function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?I(Object(A),!0).forEach((function(e){f(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):I(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},this._getBoundingBox(),{layerIds:[p].concat(l(this._getLayerIds()))}));this._selectFromPickingInfos(t.filter((function(t){return t.layer.id!==p})))}},{key:"_getMousePosFromEvent",value:function(t){return[t.offsetX,t.offsetY]}},{key:"handleEvent",value:function(t,e,A){"mouseup"!==t.type&&t.stopPropagation(),this.usePolygon=A===y.POLYGON;var n=!1,r=!1,i=this.usePolygon,o=this.landPoints,a=this.mousePoints;if("mousedown"===t.type){if(i&&o.length)(this.landPoints.length<3||this.validPolygon)&&(o.push(e),a.push(this._getMousePosFromEvent(t)));else{this.landPoints=[e,e];var s=this._getMousePosFromEvent(t);this.mousePoints=[s,s]}n=!0}else"mousemove"===t.type&&o.length?(o[o.length-1]=e,a[a.length-1]=this._getMousePosFromEvent(t),n=!0):"mouseup"===t.type&&(i?o.length>4&&(0,g.default)(o[0],o[o.length-1])<.01&&this.validPolygon&&(this._selectPolygonObjects(),this.reset(),n=!0,r=!0):(this._selectRectangleObjects(),this.reset(),n=!0,r=!0));return{redraw:n,deactivate:r}}},{key:"reset",value:function(){this.landPoints=[],this.mousePoints=[]}},{key:"_makeStartPointHighlight",value:function(t){var e=(0,a.default)((0,r.point)(t),.0025);return(0,o.default)((0,i.default)(e)).geometry.coordinates}},{key:"render",value:function(){var t=this,e=[],A=[];if(this.usePolygon||2!==this.landPoints.length){if(this.usePolygon&&this.landPoints.length&&(e.push({polygon:this.landPoints,lineColor:d,fillColor:Q}),this.landPoints.length>=3)){var i,o=(0,r.polygon)([[].concat(l(this.landPoints),[this.landPoints[0]])]),g=(0,a.default)((0,r.point)(this.landPoints[0]),10);try{i=(0,s.default)(g,o),A.push({polygon:i.geometry.coordinates,fillColor:[0,0,0,1]}),this.validPolygon=!0}catch(m){this.validPolygon=!1}}}else{var c=u(this.mousePoints,2),I=u(c[0],2),C=I[0],h=I[1],B=u(c[1],2),f=B[0],y=B[1],v=[[C,h],[C,y],[f,y],[f,h],[C,h]].map((function(e){return t.nebula.unprojectMousePosition(e)}));e.push({polygon:v,lineColor:d,fillColor:Q})}return this.landPoints.length&&e.push({polygon:this._makeStartPointHighlight(this.landPoints[0]),lineColor:[0,0,0,0],fillColor:d}),e.push({polygon:[[0,0]]}),A.push({polygon:[[0,0]]}),[new n.PolygonLayer({id:"DeckDrawerView",data:e,fp64:!1,opacity:1,pickable:!1,lineWidthMinPixels:2,lineWidthMaxPixels:2,lineDashJustified:!0,getLineDashArray:function(t){return E},getLineColor:function(t){return t.lineColor||[0,0,0,255]},getFillColor:function(t){return t.fillColor||[0,0,0,255]},getPolygon:function(t){return t.polygon}}),new n.PolygonLayer({id:p,data:A,getLineColor:function(t){return t.lineColor||[0,0,0,255]},getFillColor:function(t){return t.fillColor||[0,0,0,255]},fp64:!1,opacity:1,stroked:!1,pickable:!0,getPolygon:function(t){return t.polygon}})]}}])&&B(e.prototype,A),c&&B(e,c),t}();e.default=v},function(t,e,A){"use strict";function n(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){function t(e,A){var n=A.data,i=A.groundPoint,o=A.nebula,a=A.metadata;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r(this,"canceled",void 0),r(this,"data",void 0),r(this,"metadata",void 0),r(this,"groundPoint",void 0),r(this,"nativeEvent",void 0),r(this,"nebula",void 0),this.nativeEvent=e,this.data=n,this.groundPoint=i,this.nebula=o,this.metadata=a}var e,A,i;return e=t,(A=[{key:"stopPropagation",value:function(){this.nativeEvent.stopPropagation(),this.canceled=!0}}])&&n(e.prototype,A),i&&n(e,i),t}();e.default=i},function(t,e,A){"use strict";function n(t){return t&&"object"===typeof t&&"default"in t?t.default:t}var r=n(A(504)),i=n(A(505)),o=A(85),a=A(153),s=A(202);function g(t){switch(t.type){case"Polygon":return i(t)>1?t:null;case"MultiPolygon":var e=[];if(s.flattenEach(t,(function(t){i(t)>1&&e.push(t.geometry.coordinates)})),e.length)return{type:"MultiPolygon",coordinates:e}}}t.exports=function(t,e){var A=a.getGeom(t),n=a.getGeom(e),i=t.properties||{};if(A=g(A),n=g(n),!A)return null;if(!n)return o.feature(A,i);var s=r.diff(A.coordinates,n.coordinates);return 0===s.length?null:1===s.length?o.polygon(s[0],i):o.multiPolygon(s,i)}},function(t,e,A){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(A(258)),i=A(85),o=A(153),a=A(202),s=n(A(1012));function g(t,e){return t[0]*e[0]+t[1]*e[1]}function c(t,e,A){return"planar"===A.method?s.default(t,e,A):r.default(t,e,A)}e.default=function(t,e,A){if(void 0===A&&(A={}),A.method||(A.method="geodesic"),A.units||(A.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=i.point(t):"Point"===t.type?t=i.feature(t):o.featureOf(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=i.lineString(e):"LineString"===e.type?e=i.feature(e):o.featureOf(e,"LineString","line");var n=1/0,r=t.geometry.coordinates;return a.segmentEach(e,(function(t){var e=t.geometry.coordinates[0],i=t.geometry.coordinates[1],o=function(t,e,A,n){var r=[A[0]-e[0],A[1]-e[1]],i=g([t[0]-e[0],t[1]-e[1]],r);if(i<=0)return c(t,e,{method:n.method,units:"degrees"});var o=g(r,r);if(o<=i)return c(t,A,{method:n.method,units:"degrees"});var a=i/o,s=[e[0]+a*r[0],e[1]+a*r[1]];return c(t,s,{method:n.method,units:"degrees"})}(r,e,i,A);o<n&&(n=o)})),i.convertLength(n,"degrees",A.units)}},function(t,e,A){"use strict";A.r(e);var n=A(286);A.d(e,"default",(function(){return n.a})),A.d(e,"WebMercatorViewport",(function(){return n.a})),A.d(e,"getBounds",(function(){return n.e})),A.d(e,"fitBounds",(function(){return n.c})),A.d(e,"normalizeViewportProps",(function(){return n.m})),A.d(e,"flyToViewport",(function(){return n.d})),A.d(e,"getFlyToDuration",(function(){return n.g})),A.d(e,"lngLatToWorld",(function(){return n.l})),A.d(e,"worldToLngLat",(function(){return n.p})),A.d(e,"worldToPixels",(function(){return n.q})),A.d(e,"pixelsToWorld",(function(){return n.n})),A.d(e,"zoomToScale",(function(){return n.r})),A.d(e,"scaleToZoom",(function(){return n.o})),A.d(e,"getMeterZoom",(function(){return n.h})),A.d(e,"getDistanceScales",(function(){return n.f})),A.d(e,"addMetersToLngLat",(function(){return n.b})),A.d(e,"getViewMatrix",(function(){return n.k})),A.d(e,"getProjectionMatrix",(function(){return n.i})),A.d(e,"getProjectionParameters",(function(){return n.j}))},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScaleMode=void 0;var n=B(A(431)),r=B(A(435)),i=B(A(294)),o=B(A(557)),a=A(85),s=B(A(783)),g=A(202),c=B(A(258)),I=B(A(1114)),u=A(153),l=A(245),C=A(172),h=A(359);function B(t){return t&&t.__esModule?t:{default:t}}function f(t){return(f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t){return function(t){if(Array.isArray(t))return Q(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return Q(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Q(t,e)}(t)||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 Q(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function y(t,e){return!e||"object"!==f(e)&&"function"!==typeof e?v(t):e}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function F(t,e){return(F=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function w(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var S=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&F(t,e)}(f,t);var e,A,c,C,B=(e=f,function(){var t,A=b(e);if(m()){var n=b(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return y(this,t)});function f(){var t;E(this,f);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return w(v(t=B.call.apply(B,[this].concat(A))),"_geometryBeingScaled",void 0),w(v(t),"_selectedEditHandle",void 0),w(v(t),"_cornerGuidePoints",void 0),w(v(t),"_cursor",void 0),w(v(t),"_isScaling",!1),w(v(t),"_isSinglePointGeometrySelected",(function(t){var e=(t||{}).features;return!(!Array.isArray(e)||1!==e.length)&&"Point"===(0,u.getGeom)(e[0]).type})),w(v(t),"_getOppositeScaleHandle",(function(e){var A=e&&e.properties&&Array.isArray(e.properties.positionIndexes)&&e.properties.positionIndexes[0];if("number"!==typeof A)return null;var n=t._cornerGuidePoints.length,r=(A+n/2)%n;return t._cornerGuidePoints.find((function(t){return!!Array.isArray(t.properties.positionIndexes)&&t.properties.positionIndexes[0]===r}))})),w(v(t),"_getUpdatedData",(function(t,e){for(var A=new h.ImmutableFeatureCollection(t.data),n=t.selectedIndexes,r=0;r<n.length;r++){var i=n[r],o=e.features[r];A=A.replaceGeometry(i,o.geometry)}return A.getObject()})),w(v(t),"isEditHandleSelected",(function(){return Boolean(t._selectedEditHandle)})),w(v(t),"getScaleAction",(function(e,A,n,r){if(!t._selectedEditHandle)return null;var i=t._getOppositeScaleHandle(t._selectedEditHandle),o=(0,u.getCoord)(i),a=D(o,e,A),s=(0,I.default)(t._geometryBeingScaled,a,{origin:o});return{updatedData:t._getUpdatedData(r,s),editType:n,editContext:{featureIndexes:r.selectedIndexes}}})),w(v(t),"updateCursor",(function(e){if(t._selectedEditHandle){t._cursor&&e.onUpdateCursor(t._cursor);var A=t.getSelectedFeaturesAsFeatureCollection(e),n=(0,r.default)(A),o=(0,i.default)(n,t._selectedEditHandle),a=o<0?o+180:o;a>=0&&a<=90||a>=180&&a<=270?(t._cursor="nesw-resize",e.onUpdateCursor("nesw-resize")):(t._cursor="nwse-resize",e.onUpdateCursor("nwse-resize"))}else e.onUpdateCursor(null),t._cursor=null})),t}return A=f,(c=[{key:"handlePointerMove",value:function(t,e){if(!this._isScaling){var A=(0,l.getPickedEditHandle)(t.picks);this._selectedEditHandle=A&&"scale"===A.properties.editHandleType?A:null,A&&this.updateCursor(e)}}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isScaling=!0,this._geometryBeingScaled=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleDragging",value:function(t,e){if(this._isScaling){e.onUpdateCursor(this._cursor);var A=this.getScaleAction(t.pointerDownMapCoords,t.mapCoords,"scaling",e);A&&e.onEdit(A),t.cancelPan()}}},{key:"handleStopDragging",value:function(t,e){if(this._isScaling){var A=this.getScaleAction(t.pointerDownMapCoords,t.mapCoords,"scaled",e);A&&e.onEdit(A),e.onUpdateCursor(null),this._geometryBeingScaled=null,this._selectedEditHandle=null,this._cursor=null,this._isScaling=!1}}},{key:"getGuides",value:function(t){this._cornerGuidePoints=[];var e=this.getSelectedFeaturesAsFeatureCollection(t);if(this._isSinglePointGeometrySelected(e))return{type:"FeatureCollection",features:[]};var A=(0,o.default)((0,n.default)(e));A.properties.mode="scale";var r=[];return(0,g.coordEach)(A,(function(t,e){if(e<4){var A=(0,a.point)(t,{guideType:"editHandle",editHandleType:"scale",positionIndexes:[e]});r.push(A)}})),this._cornerGuidePoints=r,(0,a.featureCollection)([(0,s.default)(A)].concat(d(this._cornerGuidePoints)))}}])&&p(A.prototype,c),C&&p(A,C),f}(C.GeoJsonEditMode);function D(t,e,A){var n=(0,c.default)(t,e);return(0,c.default)(t,A)/n}e.ScaleMode=S},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RotateMode=void 0;var n=B(A(431)),r=B(A(435)),i=B(A(294)),o=B(A(557)),a=B(A(258)),s=A(202),g=A(153),c=A(85),I=B(A(794)),u=B(A(783)),l=A(245),C=A(172),h=A(359);function B(t){return t&&t.__esModule?t:{default:t}}function f(t){return(f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function E(t,e){return!e||"object"!==f(e)&&"function"!==typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(){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(t){return!1}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var F=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(w,t);var e,A,B,f,F=(e=w,function(){var t,A=v(e);if(y()){var n=v(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return E(this,t)});function w(){var t;d(this,w);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return b(p(t=F.call.apply(F,[this].concat(A))),"_selectedEditHandle",void 0),b(p(t),"_geometryBeingRotated",void 0),b(p(t),"_isRotating",!1),b(p(t),"_isSinglePointGeometrySelected",(function(t){var e=(t||{}).features;return!(!Array.isArray(e)||1!==e.length)&&"Point"===(0,g.getGeom)(e[0]).type})),b(p(t),"getIsRotating",(function(){return t._isRotating})),t}return A=w,(B=[{key:"getGuides",value:function(t){var e=this._geometryBeingRotated||this.getSelectedFeaturesAsFeatureCollection(t);if(this._isSinglePointGeometrySelected(e))return{type:"FeatureCollection",features:[]};if(this._isRotating)return(0,c.featureCollection)([(0,r.default)(e)]);var A=(0,o.default)((0,n.default)(e)),i=null,g=null,I=0;(0,s.coordEach)(A,(function(t){if(i){var e=(0,C.getIntermediatePosition)(t,i);(!g||e[1]>g[1])&&(g=e);var A=(0,a.default)(t,i);I=Math.max(I,A)}i=t}));var l=g&&[g[0],g[1]+I/1e3],h=(0,c.lineString)([g,l]),B=(0,c.point)(l,{guideType:"editHandle",editHandleType:"rotate"});return(0,c.featureCollection)([(0,u.default)(A),B,h])}},{key:"handleDragging",value:function(t,e){if(this._isRotating){var A=this.getRotateAction(t.pointerDownMapCoords,t.mapCoords,"rotating",e);A&&e.onEdit(A),t.cancelPan()}}},{key:"handlePointerMove",value:function(t,e){if(!this._isRotating){var A=(0,l.getPickedEditHandle)(t.picks);this._selectedEditHandle=A&&"rotate"===A.properties.editHandleType?A:null}this.updateCursor(e)}},{key:"handleStartDragging",value:function(t,e){this._selectedEditHandle&&(this._isRotating=!0,this._geometryBeingRotated=this.getSelectedFeaturesAsFeatureCollection(e))}},{key:"handleStopDragging",value:function(t,e){if(this._isRotating){var A=this.getRotateAction(t.pointerDownMapCoords,t.mapCoords,"rotated",e);A&&e.onEdit(A),this._geometryBeingRotated=null,this._selectedEditHandle=null,this._isRotating=!1}}},{key:"updateCursor",value:function(t){this._selectedEditHandle?t.onUpdateCursor("crosshair"):t.onUpdateCursor(null)}},{key:"getRotateAction",value:function(t,e,A,n){if(!this._geometryBeingRotated)return null;for(var o=(0,r.default)(this._geometryBeingRotated),a=function(t,e,A){var n=(0,i.default)(t,e);return(0,i.default)(t,A)-n}(o,t,e),s=(0,I.default)(this._geometryBeingRotated,a,{pivot:o}),g=new h.ImmutableFeatureCollection(n.data),c=n.selectedIndexes,u=0;u<c.length;u++){var l=c[u],C=s.features[u];g=g.replaceGeometry(l,C.geometry)}return{updatedData:g.getObject(),editType:A,editContext:{featureIndexes:c}}}}])&&Q(A.prototype,B),f&&Q(A,f),w}(C.GeoJsonEditMode);e.RotateMode=F},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||i(t)||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(t,e){if(t){if("string"===typeof t)return o(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function a(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?g(t):e}function g(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeMode=void 0;var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(C,t);var e,A,n,o,l=(e=C,function(){var t,A=I(e);if(c()){var n=I(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return s(this,t)});function C(t){var e,A,n,r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,C),e=l.call(this),A=g(e),r=void 0,(n="_modes")in A?Object.defineProperty(A,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):A[n]=r,e._modes=t,e}return A=C,(n=[{key:"_coalesce",value:function(t){for(var e,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=0;n<this._modes.length&&(e=t(this._modes[n]),!(A?A(e):e));n++);return e}},{key:"handleClick",value:function(t,e){this._coalesce((function(A){return A.handleClick(t,e)}))}},{key:"handlePointerMove",value:function(t,e){return this._coalesce((function(A){return A.handlePointerMove(t,e)}))}},{key:"handleStartDragging",value:function(t,e){return this._coalesce((function(A){return A.handleStartDragging(t,e)}))}},{key:"handleStopDragging",value:function(t,e){return this._coalesce((function(A){return A.handleStopDragging(t,e)}))}},{key:"handleDragging",value:function(t,e){return this._coalesce((function(A){return A.handleDragging(t,e)}))}},{key:"getGuides",value:function(t){var e,A=[],n=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=i(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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 n,r,o=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}(this._modes);try{for(n.s();!(e=n.n()).done;){var o=e.value;A.push.apply(A,r(o.getGuides(t).features))}}catch(a){n.e(a)}finally{n.f()}return{type:"FeatureCollection",features:A}}}])&&a(A.prototype,n),o&&a(A,o),C}(A(172).GeoJsonEditMode);e.CompositeMode=l},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(497),r=A(85);e.default=function(t,e,A){void 0===A&&(A={});for(var i=A.steps||64,o=A.properties?A.properties:!Array.isArray(t)&&"Feature"===t.type&&t.properties?t.properties:{},a=[],s=0;s<i;s++)a.push(n.default(t,e,-360*s/i,A).geometry.coordinates);return a.push(a[0]),r.polygon([a],o)}},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,A){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function a(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(){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(t){return!1}}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ThreeClickPolygonMode=void 0;var I=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(l,t);var e,A,n,I,u=(e=l,function(){var t,A=g(e);if(s()){var n=g(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return a(this,t)});function l(){return r(this,l),u.apply(this,arguments)}return A=l,(n=[{key:"handleClick",value:function(t,e){this.addClickSequence(t);var A=this.getClickSequence(),n=this.getTentativeGuide(e);if(A.length>2&&n&&"Polygon"===n.geometry.type){var r=this.getAddFeatureOrBooleanPolygonAction(n.geometry,e);this.resetClickSequence(),r&&e.onEdit(r)}}},{key:"getGuides",value:function(t){var e=t.lastPointerMoveEvent,A=t.modeConfig,n=this.getClickSequence(),r={type:"FeatureCollection",features:[]};if(0===n.length)return r;var i=e.mapCoords;if(1===n.length)r.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[n[0],i]}});else{var o=this.getThreeClickPolygon(n[0],n[1],i,A);o&&r.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:o.geometry})}return r}},{key:"getThreeClickPolygon",value:function(t,e,A,n){return null}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),o(g(l.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"createTentativeFeature",value:function(t){var e,A=t.lastPointerMoveEvent,n=this.getClickSequence(),r=A?[A.mapCoords]:[];return 2===n.length&&(e=this.getThreeClickPolygon(n[0],n[1],r[0],t.modeConfig)),e}}])&&i(A.prototype,n),I&&i(A,I),l}(A(172).GeoJsonEditMode);e.ThreeClickPolygonMode=I},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(61);function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function o(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?i(Object(A),!0).forEach((function(e){h(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):i(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function a(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return s(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return s(t,e)}(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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 n,r,i=!0,o=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){o=!0,r=t},f:function(){try{i||null==n.return||n.return()}finally{if(o)throw r}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function I(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var B=["anyclick","pointermove","panstart","panmove","panend","keyup"],f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(s,t);var e,A,n,r,i=(e=s,function(){var t,A=l(e);if(u()){var n=l(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return I(this,t)});function s(){return g(this,s),i.apply(this,arguments)}return A=s,(n=[{key:"onLayerClick",value:function(t){}},{key:"onStartDragging",value:function(t){}},{key:"onStopDragging",value:function(t){}},{key:"onDragging",value:function(t){}},{key:"onPointerMove",value:function(t){}},{key:"onLayerKeyUp",value:function(t){}},{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 t,e=this.context.deck.eventManager,A=this.state._editableLayerState.eventHandler,n=a(B);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.on(r,A,{priority:100})}}catch(i){n.e(i)}finally{n.f()}}},{key:"_removeEventHandlers",value:function(){var t,e=this.context.deck.eventManager,A=this.state._editableLayerState.eventHandler,n=a(B);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.off(r,A)}}catch(i){n.e(i)}finally{n.f()}}},{key:"_forwardEventToCurrentLayer",value:function(t){var e=this.getCurrentLayer(),A=e["_on".concat(t.type)].bind(e);A?A(t):console.warn("no handler for mjolnir.js event ".concat(t.type))}},{key:"_onanyclick",value:function(t){var e=t.srcEvent,A=this.getScreenCoords(e),n=this.getMapCoords(A),r=this.getPicks(A);this.onLayerClick({mapCoords:n,screenCoords:A,picks:r,sourceEvent:e})}},{key:"_onkeyup",value:function(t){var e=t.srcEvent;this.onLayerKeyUp(e)}},{key:"_onpanstart",value:function(t){var e=this.getScreenCoords(t.srcEvent),A=this.getMapCoords(e),n=this.getPicks(e);this.setState({_editableLayerState:o({},this.state._editableLayerState,{pointerDownScreenCoords:e,pointerDownMapCoords:A,pointerDownPicks:n})}),this.onStartDragging({picks:n,screenCoords:e,mapCoords:A,pointerDownScreenCoords:e,pointerDownMapCoords:A,cancelPan:t.stopImmediatePropagation,sourceEvent:t.srcEvent})}},{key:"_onpanmove",value:function(t){var e=t.srcEvent,A=this.getScreenCoords(e),n=this.getMapCoords(A),r=this.state._editableLayerState,i=r.pointerDownPicks,o=r.pointerDownScreenCoords,a=r.pointerDownMapCoords,s=this.getPicks(A);this.onDragging({screenCoords:A,mapCoords:n,picks:s,pointerDownPicks:i,pointerDownScreenCoords:o,pointerDownMapCoords:a,sourceEvent:e,cancelPan:t.stopImmediatePropagation})}},{key:"_onpanend",value:function(t){var e=t.srcEvent,A=this.getScreenCoords(e),n=this.getMapCoords(A),r=this.state._editableLayerState,i=r.pointerDownPicks,a=r.pointerDownScreenCoords,s=r.pointerDownMapCoords,g=this.getPicks(A);this.onStopDragging({picks:g,screenCoords:A,mapCoords:n,pointerDownPicks:i,pointerDownScreenCoords:a,pointerDownMapCoords:s,sourceEvent:e}),this.setState({_editableLayerState:o({},this.state._editableLayerState,{pointerDownScreenCoords:null,pointerDownMapCoords:null,pointerDownPicks:null})})}},{key:"_onpointermove",value:function(t){var e=t.srcEvent,A=this.getScreenCoords(e),n=this.getMapCoords(A),r=this.state._editableLayerState,i=r.pointerDownPicks,o=r.pointerDownScreenCoords,a=r.pointerDownMapCoords,s=this.getPicks(A);this.onPointerMove({screenCoords:A,mapCoords:n,picks:s,pointerDownPicks:i,pointerDownScreenCoords:o,pointerDownMapCoords:a,sourceEvent:e})}},{key:"getPicks",value:function(t){return this.context.deck.pickMultipleObjects({x:t[0],y:t[1],layerIds:[this.props.id],radius:this.props.pickingRadius,depth:this.props.pickingDepth})}},{key:"getScreenCoords",value:function(t){return[t.clientX-this.context.gl.canvas.getBoundingClientRect().left,t.clientY-this.context.gl.canvas.getBoundingClientRect().top]}},{key:"getMapCoords",value:function(t){return this.context.viewport.unproject([t[0],t[1]])}}])&&c(A.prototype,n),r&&c(A,r),s}(n.CompositeLayer);e.default=f,h(f,"layerName","EditableLayer")},function(t,e,A){"use strict";A.d(e,"a",(function(){return o}));var n=A(5),r=A(4),i=A(168),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(n.a)(this,t),this.opts=e}return Object(r.a)(t,[{key:"equals",value:function(t){return this===t||this.constructor===t.constructor&&Object(i.a)(this.opts,t.opts)}},{key:"getShaders",value:function(t){return null}},{key:"getSubLayerProps",value:function(t){var e=t.constructor.defaultProps,A=void 0===e?{}:e,n={updateTriggers:{}};for(var r in A)if(r in this.props){var i=A[r],o=this.props[r];n[r]=o,i&&"accessor"===i.type&&(n.updateTriggers[r]=this.props.updateTriggers[r],"function"===typeof o&&(n[r]=this.getSubLayerAccessor(o,!0)))}return n}},{key:"initializeState",value:function(t,e){}},{key:"updateState",value:function(t,e){}},{key:"draw",value:function(t,e){}},{key:"finalizeState",value:function(t){}}]),t}()},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(564);function r(t){try{return JSON.parse(t)}catch(e){throw new Error('Failed to parse JSON from data starting with "'.concat(Object(n.a)(t),'"'))}}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(152),r=a(A(28)),i=A(57),o=a(A(1040));function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function I(t,e,A){return(I="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function u(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function B(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function f(t){var e=t.source,A=t.code,n=void 0===A?"":A;return e.replace(/}[^{}]*$/,n.concat("\n}\n"))}var d=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(B,t);var e,A,n,a,s=(e=B,function(){var t,A=C(e);if(l()){var n=C(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return u(this,t)});function B(){return g(this,B),s.apply(this,arguments)}return A=B,(n=[{key:"getShaders",value:function(){var t=I(C(B.prototype),"getShaders",this).call(this);return Object.assign({},t,{modules:t.modules.concat([o.default]),vs:f({source:t.vs,code:"  outline_setUV(gl_Position);\n  outline_setZLevel(instanceZLevel);\n"}),fs:f({source:t.fs,code:"  gl_FragColor = outline_filterColor(gl_FragColor);\n"})})}},{key:"initializeState",value:function(t){I(C(B.prototype),"initializeState",this).call(this,t),this.setState({outlineFramebuffer:new i.Framebuffer(t.gl),dummyTexture:new i.Texture2D(t.gl)}),this.state.attributeManager.addInstanced({instanceZLevel:{size:1,type:r.default.UNSIGNED_BYTE,update:this.calculateZLevels,accessor:"getZLevel"}})}},{key:"draw",value:function(t){t.moduleParameters,t.parameters;var e=t.uniforms,A=(t.context,this.props),n=A.rounded,i=A.miterLimit,o=A.widthScale,a=A.widthMinPixels,s=A.widthMaxPixels,g=A.dashJustified;e=Object.assign({},e,{jointType:Number(n),alignMode:Number(g),widthScale:o,miterLimit:i,widthMinPixels:a,widthMaxPixels:s});var c=this.state,I=c.outlineFramebuffer,u=c.dummyTexture;I.resize(),I.clear({color:!0,depth:!0}),this.state.model.updateModuleSettings({outlineEnabled:!0,outlineRenderShadowmap:!0,outlineShadowmap:u}),this.state.model.draw({uniforms:Object.assign({},e,{jointType:0,widthScale:1.3*this.props.widthScale}),parameters:{depthTest:!1,blendEquation:r.default.MAX},framebuffer:I}),this.state.model.updateModuleSettings({outlineEnabled:!0,outlineRenderShadowmap:!1,outlineShadowmap:I}),this.state.model.draw({uniforms:Object.assign({},e,{jointType:Number(n),widthScale:this.props.widthScale}),parameters:{depthTest:!1}})}},{key:"calculateZLevels",value:function(t){var e=this.props.getZLevel,A=this.state.pathTesselator;t.value=A._updateAttribute({target:t.value,size:1,getValue:function(t,A){return[e(t,A)||0]}})}}])&&c(A.prototype,n),a&&c(A,a),B}(n.PathLayer);e.default=d,B(d,"layerName","PathOutlineLayer"),B(d,"defaultProps",{getZLevel:{type:"accessor",value:0}})},function(t,e,A){var n=A(748),r=A(1075),i=A(1077);t.exports=function(t,e){return i(r(t,e,n),t+"")}},function(t,e,A){var n=A(363),r=A(207);t.exports=function(t){return r(t)&&n(t)}},function(t,e){t.exports=function(t,e){for(var A=-1,n=null==t?0:t.length,r=Array(n);++A<n;)r[A]=e(t[A],A,t);return r}},function(t,e,A){"use strict";var n={};A.r(n),A.d(n,"decode",(function(){return NA})),A.d(n,"encode",(function(){return xA}));var r={};A.r(r),A.d(r,"decode",(function(){return HA})),A.d(r,"encode",(function(){return YA}));var i={};A.r(i),A.d(i,"decode",(function(){return WA})),A.d(i,"encode",(function(){return KA}));var o={};A.r(o),A.d(o,"decode",(function(){return XA})),A.d(o,"encode",(function(){return zA}));var a=A(1),s=A(5),g=A(4),c=A(35),I=A(14),u=A(16),l=A(7),C=A(26),h=A(479),B=A(480),f=A(43),d=A(279),Q=A(19),E=A(1421);function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function v(t,e,A){return e&&y(t.prototype,e),A&&y(t,A),t}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}var F=A(871),w=A.n(F);function S(t,e){return!e||"object"!==w()(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function D(t){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function R(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function U(t,e,A){return(U=R()?Reflect.construct:function(t,e,A){var n=[null];n.push.apply(n,e);var r=new(Function.bind.apply(t,n));return A&&m(r,A.prototype),r}).apply(null,arguments)}function G(t){var e="function"===typeof Map?new Map:void 0;return(G=function(t){if(null===t||(A=t,-1===Function.toString.call(A).indexOf("[native code]")))return t;var A;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return U(t,arguments,D(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),m(n,t)})(t)}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function k(t,e){if(t){if("string"===typeof t)return N(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?N(t,e):void 0}}function x(t){return function(t){if(Array.isArray(t))return N(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||k(t)||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(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}Math.PI,Math.PI;var M={};function L(t){return Math.round(t/M.EPSILON)*M.EPSILON}function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.precision,n=void 0===A?M.precision||4:A;return t=L(t),"".concat(parseFloat(t.toPrecision(n)))}function J(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function T(t,e,A){var n=M.EPSILON;A&&(M.EPSILON=A);try{if(t===e)return!0;if(J(t)&&J(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!T(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=M.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{M.EPSILON=n}}function j(t){var e=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(t){return!1}}();return function(){var A,n=D(t);if(e){var r=D(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return S(this,A)}}M.EPSILON=1e-12,M.debug=!1,M.precision=4,M.printTypes=!1,M.printDegrees=!1,M.printRowMajor=!0;var H=function(t){b(A,t);var e=j(A);function A(){return p(this,A),e.apply(this,arguments)}return v(A,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"from",value:function(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}},{key:"fromArray",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)this[A]=t[A+e];return this.check()}},{key:"to",value:function(t){return t===this?this:J(t)?this.toArray(t):this.toObject(t)}},{key:"toTarget",value:function(t){return t?this.to(t):this}},{key:"toArray",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=0;A<this.ELEMENTS;++A)t[e+A]=this[A];return t}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(M)}},{key:"formatString",value:function(t){for(var e="",A=0;A<this.ELEMENTS;++A)e+=(A>0?", ":"")+_(this[A],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}},{key:"equals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(!T(this[e],t[e]))return!1;return!0}},{key:"exactEquals",value:function(t){if(!t||this.length!==t.length)return!1;for(var e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}},{key:"negate",value:function(){for(var t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}},{key:"lerp",value:function(t,e,A){void 0===A&&(A=e,e=t,t=this);for(var n=0;n<this.ELEMENTS;++n){var r=t[n];this[n]=r+A*(e[n]-r)}return this.check()}},{key:"min",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}},{key:"max",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}},{key:"clamp",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t[A]),e[A]);return this.check()}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]+=i[o];return this.check()}},{key:"subtract",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]-=i[o];return this.check()}},{key:"scale",value:function(t){if(Array.isArray(t))return this.multiply(t);for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"sub",value:function(t){return this.subtract(t)}},{key:"setScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}},{key:"addScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}},{key:"subScalar",value:function(t){return this.addScalar(-t)}},{key:"multiplyScalar",value:function(t){for(var e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}},{key:"divideScalar",value:function(t){return this.scale(1/t)}},{key:"clampScalar",value:function(t,e){for(var A=0;A<this.ELEMENTS;++A)this[A]=Math.min(Math.max(this[A],t),e);return this.check()}},{key:"multiplyByScalar",value:function(t){return this.scale(t)}},{key:"check",value:function(){if(M.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 t=this.length===this.ELEMENTS,e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}},{key:"ELEMENTS",get:function(){return O(!1),0}},{key:"RANK",get:function(){return O(!1),0}},{key:"elements",get:function(){return this}}]),A}(G(Array));function Y(t,e){if(t.length!==e)return!1;for(var A=0;A<t.length;++A)if(!Number.isFinite(t[A]))return!1;return!0}function V(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function Z(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(M.debug&&!Y(t,e))throw new Error("math.gl: ".concat(A," some fields set to invalid numbers'"));return t}var W={};function K(t,e){W[t]||(W[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}function P(t){var e=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(t){return!1}}();return function(){var A,n=D(t);if(e){var r=D(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return S(this,A)}}var q=function(t){b(A,t);var e=P(A);function A(){return p(this,A),e.apply(this,arguments)}return v(A,[{key:"copy",value:function(t){return O(!1),this}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var t=0,e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(t){return Math.sqrt(this.distanceSquared(t))}},{key:"distanceSquared",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A){var n=this[A]-t[A];e+=n*n}return V(e)}},{key:"dot",value:function(t){for(var e=0,A=0;A<this.ELEMENTS;++A)e+=this[A]*t[A];return V(e)}},{key:"normalize",value:function(){var t=this.magnitude();if(0!==t)for(var e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}},{key:"multiply",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]*=i[o];return this.check()}},{key:"divide",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++)for(var i=r[n],o=0;o<this.ELEMENTS;++o)this[o]/=i[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(t){return this.distance(t)}},{key:"distanceToSquared",value:function(t){return this.distanceSquared(t)}},{key:"getComponent",value:function(t){return O(t>=0&&t<this.ELEMENTS,"index is out of range"),V(this[t])}},{key:"setComponent",value:function(t,e){return O(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}},{key:"addVectors",value:function(t,e){return this.copy(t).add(e)}},{key:"subVectors",value:function(t,e){return this.copy(t).subtract(e)}},{key:"multiplyVectors",value:function(t,e){return this.copy(t).multiply(e)}},{key:"addScaledVector",value:function(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=V(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=V(t)}}]),A}(H),X=A(27);function z(t,e,A){var n=e[0],r=e[1],i=e[2],o=A[3]*n+A[7]*r+A[11]*i||1;return t[0]=(A[0]*n+A[4]*r+A[8]*i)/o,t[1]=(A[1]*n+A[5]*r+A[9]*i)/o,t[2]=(A[2]*n+A[6]*r+A[10]*i)/o,t}function $(t){var e=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(t){return!1}}();return function(){var A,n=D(t);if(e){var r=D(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return S(this,A)}}var tt=[0,0,0],et={},At=function(t){b(A,t);var e=$(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(this,A),t=e.call(this,-0,-0,-0),1===arguments.length&&J(n)?t.copy(n):(M.debug&&(V(n),V(r),V(i)),t[0]=n,t[1]=r,t[2]=i),t}return v(A,null,[{key:"ZERO",get:function(){return et.ZERO=et.ZERO||Object.freeze(new A(0,0,0,0))}}]),v(A,[{key:"set",value:function(t,e,A){return this[0]=t,this[1]=e,this[2]=A,this.check()}},{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}},{key:"fromObject",value:function(t){return M.debug&&(V(t.x),V(t.y),V(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}},{key:"toObject",value:function(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}},{key:"angle",value:function(t){return X.a(this,t)}},{key:"cross",value:function(t){return X.c(this,this,t),this.check()}},{key:"rotateX",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?tt:A;return X.k(this,this,n,e),this.check()}},{key:"rotateY",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?tt:A;return X.l(this,this,n,e),this.check()}},{key:"rotateZ",value:function(t){var e=t.radians,A=t.origin,n=void 0===A?tt:A;return X.m(this,this,n,e),this.check()}},{key:"transform",value:function(t){return this.transformAsPoint(t)}},{key:"transformAsPoint",value:function(t){return X.q(this,this,t),this.check()}},{key:"transformAsVector",value:function(t){return z(this,this,t),this.check()}},{key:"transformByMatrix3",value:function(t){return X.p(this,this,t),this.check()}},{key:"transformByMatrix2",value:function(t){return function(t,e,A){var n=e[0],r=e[1];t[0]=A[0]*n+A[2]*r,t[1]=A[1]*n+A[3]*r,t[2]=e[2]}(this,this,t),this.check()}},{key:"transformByQuaternion",value:function(t){return X.r(this,this,t),this.check()}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=V(t)}}]),A}(q);function nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}(t,e)||k(t,e)||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 rt(t){var e=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(t){return!1}}();return function(){var A,n=D(t);if(e){var r=D(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return S(this,A)}}var it=function(t){b(A,t);var e=rt(A);function A(){return p(this,A),e.apply(this,arguments)}return v(A,[{key:"toString",value:function(){var t="[";if(M.printRowMajor){t+="row-major:";for(var e=0;e<this.RANK;++e)for(var A=0;A<this.RANK;++A)t+=" ".concat(this[A*this.RANK+e])}else{t+="column-major:";for(var n=0;n<this.ELEMENTS;++n)t+=" ".concat(this[n])}return t+="]"}},{key:"getElementIndex",value:function(t,e){return e*this.RANK+t}},{key:"getElement",value:function(t,e){return this[e*this.RANK+t]}},{key:"setElement",value:function(t,e,A){return this[e*this.RANK+t]=V(A),this}},{key:"getColumn",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),A=t*this.RANK,n=0;n<this.RANK;++n)e[n]=this[A+n];return e}},{key:"setColumn",value:function(t,e){for(var A=t*this.RANK,n=0;n<this.RANK;++n)this[A+n]=e[n];return this}}]),A}(H),ot=A(18),at=A(38),st=A(45);function gt(t){var e=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(t){return!1}}();return function(){var A,n=D(t);if(e){var r=D(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return S(this,A)}}var ct=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),It=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),ut=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}),lt={},Ct=function(t){b(A,t);var e=gt(A);function A(t){var n;return p(this,A),n=e.call(this,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?n.copy(t):n.identity(),n}return v(A,[{key:"INDICES",get:function(){return ut}},{key:"ELEMENTS",get:function(){return 16}},{key:"RANK",get:function(){return 4}}],[{key:"IDENTITY",get:function(){return lt.IDENTITY=lt.IDENTITY||Object.freeze(new A(ct)),lt.IDENTITY}},{key:"ZERO",get:function(){return lt.ZERO=lt.ZERO||Object.freeze(new A(It)),lt.ZERO}}]),v(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}},{key:"set",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this[4]=r,this[5]=i,this[6]=o,this[7]=a,this[8]=s,this[9]=g,this[10]=c,this[11]=I,this[12]=u,this[13]=l,this[14]=C,this[15]=h,this.check()}},{key:"setRowMajor",value:function(t,e,A,n,r,i,o,a,s,g,c,I,u,l,C,h){return this[0]=t,this[1]=r,this[2]=s,this[3]=u,this[4]=e,this[5]=i,this[6]=g,this[7]=l,this[8]=A,this[9]=o,this[10]=c,this[11]=C,this[12]=n,this[13]=a,this[14]=I,this[15]=h,this.check()}},{key:"toRowMajor",value:function(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}},{key:"identity",value:function(){return this.copy(ct)}},{key:"fromQuaternion",value:function(t){return ot.c(this,t),this.check()}},{key:"frustum",value:function(t){var e=t.left,n=t.right,r=t.bottom,i=t.top,o=t.near,a=t.far;return a===1/0?A._computeInfinitePerspectiveOffCenter(this,e,n,r,i,o):ot.d(this,e,n,r,i,o,a),this.check()}},{key:"lookAt",value:function(t,e,A){if(1===arguments.length){var n=t;t=n.eye,e=n.center,A=n.up}return e=e||[0,0,0],A=A||[0,1,0],ot.g(this,t,e,A),this.check()}},{key:"ortho",value:function(t){var e=t.left,A=t.right,n=t.bottom,r=t.top,i=t.near,o=void 0===i?.1:i,a=t.far,s=void 0===a?500:a;return ot.i(this,e,A,n,r,o,s),this.check()}},{key:"orthographic",value:function(t){var e=t.fovy,n=void 0===e?45*Math.PI/180:e,r=t.aspect,i=void 0===r?1:r,o=t.focalDistance,a=void 0===o?1:o,s=t.near,g=void 0===s?.1:s,c=t.far,I=void 0===c?500:c;if(n>2*Math.PI)throw Error("radians");var u=n/2,l=a*Math.tan(u),C=l*i;return(new A).ortho({left:-C,right:C,bottom:-l,top:l,near:g,far:I})}},{key:"perspective",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.fovy,A=void 0===e?void 0:e,n=t.fov,r=void 0===n?45*Math.PI/180:n,i=t.aspect,o=void 0===i?1:i,a=t.near,s=void 0===a?.1:a,g=t.far,c=void 0===g?500:g;if((A=A||r)>2*Math.PI)throw Error("radians");return ot.j(this,A,o,s,c),this.check()}},{key:"determinant",value:function(){return ot.a(this)}},{key:"getScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}},{key:"getTranslation",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0];return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}},{key:"getRotation",value:function(){var t=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],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*r,t[6]=this[6]*i,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*r,t[10]=this[10]*i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},{key:"getRotationMatrix3",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=this.getScale(e||[-0,-0,-0]),n=1/A[0],r=1/A[1],i=1/A[2];return t[0]=this[0]*n,t[1]=this[1]*r,t[2]=this[2]*i,t[3]=this[4]*n,t[4]=this[5]*r,t[5]=this[6]*i,t[6]=this[8]*n,t[7]=this[9]*r,t[8]=this[10]*i,t}},{key:"transpose",value:function(){return ot.q(this,this),this.check()}},{key:"invert",value:function(){return ot.f(this,this),this.check()}},{key:"multiplyLeft",value:function(t){return ot.h(this,t,this),this.check()}},{key:"multiplyRight",value:function(t){return ot.h(this,this,t),this.check()}},{key:"rotateX",value:function(t){return ot.l(this,this,t),this.check()}},{key:"rotateY",value:function(t){return ot.m(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return ot.n(this,this,t),this.check()}},{key:"rotateXYZ",value:function(t){var e=nt(t,3),A=e[0],n=e[1],r=e[2];return this.rotateX(A).rotateY(n).rotateZ(r)}},{key:"rotateAxis",value:function(t,e){return ot.k(this,this,t,e),this.check()}},{key:"scale",value:function(t){return Array.isArray(t)?ot.o(this,this,t):ot.o(this,this,[t,t,t]),this.check()}},{key:"translate",value:function(t){return ot.p(this,this,t),this.check()}},{key:"transform",value:function(t,e){return 4===t.length?(Z(e=st.n(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}},{key:"transformAsPoint",value:function(t,e){switch(t.length){case 2:e=at.j(e||[-0,-0],t,this);break;case 3:e=X.q(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Z(e,t.length),e}},{key:"transformAsVector",value:function(t,e){switch(t.length){case 2:e=function(t,e,A){var n=e[0],r=e[1],i=A[3]*n+A[7]*r||1;return t[0]=(A[0]*n+A[4]*r)/i,t[1]=(A[1]*n+A[5]*r)/i,t}(e||[-0,-0],t,this);break;case 3:e=z(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return Z(e,t.length),e}},{key:"makeRotationX",value:function(t){return this.identity().rotateX(t)}},{key:"makeTranslation",value:function(t,e,A){return this.identity().translate([t,e,A])}},{key:"transformPoint",value:function(t,e){return K("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}},{key:"transformVector",value:function(t,e){return K("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}},{key:"transformDirection",value:function(t,e){return K("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}],[{key:"_computeInfinitePerspectiveOffCenter",value:function(t,e,A,n,r,i){var o=2*i/(A-e),a=2*i/(r-n),s=(A+e)/(A-e),g=(r+n)/(r-n),c=-2*i;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=s,t[9]=g,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=c,t[15]=0,t}}]),A}(it),ht=A(211),Bt=A(49),ft=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,t);var A=e.id;this.id=A||Object(ht.c)(this.constructor.name),this.display=!0,this.position=new At,this.rotation=new At,this.scale=new At(1,1,1),this.matrix=new Ct,this.userData={},this.props={},this._setScenegraphNodeProps(e)}return v(t,[{key:"delete",value:function(){}},{key:"setProps",value:function(t){return this._setScenegraphNodeProps(t),this}},{key:"toString",value:function(){return"{type: ScenegraphNode, id: ".concat(this.id,")}")}},{key:"setPosition",value:function(t){return Object(Bt.a)(3===t.length,"setPosition requires vector argument"),this.position=t,this}},{key:"setRotation",value:function(t){return Object(Bt.a)(3===t.length,"setRotation requires vector argument"),this.rotation=t,this}},{key:"setScale",value:function(t){return Object(Bt.a)(3===t.length,"setScale requires vector argument"),this.scale=t,this}},{key:"setMatrix",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e?this.matrix.copy(t):this.matrix=t}},{key:"setMatrixComponents",value:function(t){var e=t.position,A=t.rotation,n=t.scale,r=t.update,i=void 0===r||r;return e&&this.setPosition(e),A&&this.setRotation(A),n&&this.setScale(n),i&&this.updateMatrix(),this}},{key:"updateMatrix",value:function(){var t=this.position,e=this.rotation,A=this.scale;return this.matrix.identity(),this.matrix.translate(t),this.matrix.rotateXYZ(e),this.matrix.scale(A),this}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.position,A=t.rotation,n=t.scale;return e&&this.setPosition(e),A&&this.setRotation(A),n&&this.setScale(n),this.updateMatrix(),this}},{key:"getCoordinateUniforms",value:function(t,e){Object(Bt.a)(t),e=e||this.matrix;var A=new Ct(t).multiplyRight(e),n=A.invert(),r=n.transpose();return{viewMatrix:t,modelMatrix:e,objectMatrix:e,worldMatrix:A,worldInverseMatrix:n,worldInverseTransposeMatrix:r}}},{key:"_setScenegraphNodeProps",value:function(t){"display"in t&&(this.display=t.display),"position"in t&&this.setPosition(t.position),"rotation"in t&&this.setRotation(t.rotation),"scale"in t&&this.setScale(t.scale),"matrix"in t&&this.setMatrix(t.matrix),Object.assign(this.props,t)}}]),t}(),dt=A(83),Qt=A(130);function Et(t,e,A){return(Et="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=D(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function pt(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return yt(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return yt(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function vt(t){var e=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(t){return!1}}();return function(){var A,n=D(t);if(e){var r=D(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return S(this,A)}}var mt=function(t){b(A,t);var e=vt(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(this,A);var r=n=Array.isArray(n)?{children:n}:n,i=r.children,o=void 0===i?[]:i;return Q.k.assert(o.every((function(t){return t instanceof ft})),"every child must an instance of ScenegraphNode"),(t=e.call(this,n)).children=o,t}return v(A,[{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];for(var n=0,r=e;n<r.length;n++){var i=r[n];Array.isArray(i)?this.add.apply(this,x(i)):this.children.push(i)}return this}},{key:"remove",value:function(t){var e=this.children,A=e.indexOf(t);return A>-1&&e.splice(A,1),this}},{key:"removeAll",value:function(){return this.children=[],this}},{key:"delete",value:function(){this.children.forEach((function(t){return t.delete()})),this.removeAll(),Et(D(A.prototype),"delete",this).call(this)}},{key:"traverse",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.worldMatrix,i=void 0===r?new Ct:r,o=new Ct(i).multiplyRight(this.matrix),a=pt(this.children);try{for(a.s();!(e=a.n()).done;){var s=e.value;s instanceof A?s.traverse(t,{worldMatrix:o}):t(s,{worldMatrix:o})}}catch(g){a.e(g)}finally{a.f()}}}]),A}(ft),bt=A(34);function Ft(t){var e=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(t){return!1}}();return function(){var A,n=D(t);if(e){var r=D(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return S(this,A)}}var wt=[0,0,0,1],St=function(t){b(A,t);var e=Ft(A);function A(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return p(this,A),t=e.call(this,-0,-0,-0,-0),Array.isArray(n)&&1===arguments.length?t.copy(n):t.set(n,r,i,o),t}return v(A,[{key:"copy",value:function(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}},{key:"set",value:function(t,e,A,n){return this[0]=t,this[1]=e,this[2]=A,this[3]=n,this.check()}},{key:"fromMatrix3",value:function(t){return bt.e(this,t),this.check()}},{key:"identity",value:function(){return bt.f(this),this.check()}},{key:"fromAxisRotation",value:function(t,e){return bt.p(this,t,e),this.check()}},{key:"setAxisAngle",value:function(t,e){return this.fromAxisRotation(t,e)}},{key:"len",value:function(){return bt.h(this)}},{key:"lengthSquared",value:function(){return bt.r(this)}},{key:"dot",value:function(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return bt.d(this,t)}},{key:"rotationTo",value:function(t,e){return bt.n(this,t,e),this.check()}},{key:"add",value:function(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return bt.a(this,this,t),this.check()}},{key:"calculateW",value:function(){return bt.b(this,this),this.check()}},{key:"conjugate",value:function(){return bt.c(this,this),this.check()}},{key:"invert",value:function(){return bt.g(this,this),this.check()}},{key:"lerp",value:function(t,e,A){return bt.i(this,t,e,A),this.check()}},{key:"multiplyRight",value:function(t,e){return O(!e),bt.j(this,this,t),this.check()}},{key:"multiplyLeft",value:function(t,e){return O(!e),bt.j(this,t,this),this.check()}},{key:"normalize",value:function(){var t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}},{key:"rotateX",value:function(t){return bt.k(this,this,t),this.check()}},{key:"rotateY",value:function(t){return bt.l(this,this,t),this.check()}},{key:"rotateZ",value:function(t){return bt.m(this,this,t),this.check()}},{key:"scale",value:function(t){return bt.o(this,this,t),this.check()}},{key:"slerp",value:function(t,e,A){switch(arguments.length){case 1:var n=arguments[0],r=n.start;t=void 0===r?wt:r,e=n.target,A=n.ratio;break;case 2:var i=Array.prototype.slice.call(arguments);e=i[0],A=i[1],t=this}return bt.q(this,t,e,A),this.check()}},{key:"transformVector4",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return st.o(e,t,this),Z(e,4)}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"setFromAxisAngle",value:function(t,e){return this.setAxisAngle(t,e)}},{key:"premultiply",value:function(t,e){return this.multiplyLeft(t,e)}},{key:"multiply",value:function(t,e){return this.multiplyRight(t,e)}},{key:"ELEMENTS",get:function(){return 4}},{key:"x",get:function(){return this[0]},set:function(t){this[0]=V(t)}},{key:"y",get:function(){return this[1]},set:function(t){this[1]=V(t)}},{key:"z",get:function(){return this[2]},set:function(t){this[2]=V(t)}},{key:"w",get:function(){return this[3]},set:function(t){this[3]=V(t)}}]),A}(H),Dt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Rt={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Ut(t){if(!t._animation){var e=Rt[t.componentType],A=Dt[t.type],n=A*t.count,r=t.bufferView.data,i=new e(r.buffer,r.byteOffset+(t.byteOffset||0),n);if(1===A)t._animation=Array.from(i);else{for(var o=[],a=0;a<i.length;a+=A)o.push(Array.from(i.slice(a,a+A)));t._animation=o}}return t._animation}var Gt=new Ct;var Nt=new St;function kt(t,e,A,n){var r=e.input,i=e.interpolation,o=e.output,a=t%r[r.length-1],s=r.findIndex((function(t){return t>=a})),g=Math.max(0,s-1);if(!Array.isArray(A[n]))switch(n){case"translation":A[n]=[0,0,0];break;case"rotation":A[n]=[0,0,0,1];break;case"scale":A[n]=[1,1,1];break;default:Q.k.warn("Bad animation path ".concat(n))()}Object(Bt.a)(A[n].length===o[g].length);var c=r[g],I=r[s];switch(i){case"STEP":!function(t,e,A){for(var n=0;n<A.length;n++)t[e][n]=A[n]}(A,n,o[g]);break;case"LINEAR":if(I>c){var u=(a-c)/(I-c);!function(t,e,A,n,r){if("rotation"===e){Nt.slerp({start:A,target:n,ratio:r});for(var i=0;i<Nt.length;i++)t[e][i]=Nt[i]}else for(var o=0;o<A.length;o++)t[e][o]=r*n[o]+(1-r)*A[o]}(A,n,o[g],o[s],u)}break;case"CUBICSPLINE":if(I>c){var l=(a-c)/(I-c),C=I-c;!function(t,e,A){for(var n=A.p0,r=A.outTangent0,i=A.inTangent1,o=A.p1,a=A.tDiff,s=A.ratio,g=0;g<t[e].length;g++){var c=r[g]*a,I=i[g]*a;t[e][g]=(2*Math.pow(s,3)-3*Math.pow(s,2)+1)*n[g]+(Math.pow(s,3)-2*Math.pow(s,2)+s)*c+(-2*Math.pow(s,3)+3*Math.pow(s,2))*o[g]+(Math.pow(s,3)-Math.pow(s,2))*I}}(A,n,{p0:o[3*g+1],outTangent0:o[3*g+2],inTangent1:o[3*s+0],p1:o[3*s+1],tDiff:C,ratio:l})}break;default:Q.k.warn("Interpolation ".concat(i," not supported"))()}}var xt=function(){function t(e){p(this,t),this.startTime=0,this.playing=!0,this.speed=1,this.channels=[],Object.assign(this,e)}return v(t,[{key:"animate",value:function(t){if(this.playing){var e=(t/1e3-this.startTime)*this.speed;this.channels.forEach((function(t){var A=t.sampler,n=t.target,r=t.path;kt(e,A,n,r),function(t,e){if(e.matrix.identity(),t.translation&&e.matrix.translate(t.translation),t.rotation){var A=Gt.fromQuaternion(t.rotation);e.matrix.multiplyRight(A)}t.scale&&e.matrix.scale(t.scale)}(n,n._node)}))}}}]),t}(),Ot=function(){function t(e){p(this,t),this.animations=e.animations.map((function(t,A){var n=t.name||"Animation-".concat(A),r=t.samplers.map((function(t){var A=t.input,n=t.interpolation,r=void 0===n?"LINEAR":n,i=t.output;return{input:Ut(e.accessors[A]),interpolation:r,output:Ut(e.accessors[i])}})),i=t.channels.map((function(t){var A=t.sampler,n=t.target;return{sampler:r[A],target:e.nodes[n.node],path:n.path}}));return new xt({name:n,channels:i})}))}return v(t,[{key:"animate",value:function(t){this.setTime(t)}},{key:"setTime",value:function(t){this.animations.forEach((function(e){return e.animate(t)}))}},{key:"getAnimations",value:function(){return this.animations}}]),t}(),Mt=A(412);function Lt(t){var e=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(t){return!1}}();return function(){var A,n=D(t);if(e){var r=D(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return S(this,A)}}var _t=function(t){b(A,t);var e=Lt(A);function A(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return p(this,A),(n=e.call(this,r)).onBeforeRender=null,n.AfterRender=null,t instanceof Mt.a?(n.model=t,n._setModelNodeProps(r)):n.model=new Mt.a(t,r),n.managedResources=r.managedResources||[],n}return v(A,[{key:"setProps",value:function(t){return Et(D(A.prototype),"setProps",this).call(this,t),this._setModelNodeProps(t),this}},{key:"delete",value:function(){this.model&&(this.model.delete(),this.model=null),this.managedResources.forEach((function(t){return t.delete()})),this.managedResources=[]}},{key:"draw",value:function(){var t;return(t=this.model).draw.apply(t,arguments)}},{key:"setUniforms",value:function(){var t;return(t=this.model).setUniforms.apply(t,arguments),this}},{key:"setAttributes",value:function(){var t;return(t=this.model).setAttributes.apply(t,arguments),this}},{key:"updateModuleSettings",value:function(){var t;return(t=this.model).updateModuleSettings.apply(t,arguments),this}},{key:"_setModelNodeProps",value:function(t){this.model.setProps(t)}}]),A}(ft);function Jt(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var Tt=A(737),jt=A(385),Ht=A(233),Yt=function(){function t(e,A){var n=A.attributes,r=A.material,i=A.pbrDebug,o=A.imageBasedLightingEnvironment,a=A.lights,s=A.useTangents;p(this,t),this.gl=e,this.defines={MANUAL_SRGB:1,SRGB_FAST_APPROXIMATION:1},Object(Tt.b)(e,jt.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=[],o&&(this.uniforms.u_DiffuseEnvSampler=o.getDiffuseEnvSampler(),this.uniforms.u_SpecularEnvSampler=o.getSpecularEnvSampler(),this.uniforms.u_brdfLUT=o.getBrdfTexture(),this.uniforms.u_ScaleIBLAmbient=[1,1]),i&&(this.uniforms.u_ScaleDiffBaseMR=[0,0,0,0],this.uniforms.u_ScaleFGDSpec=[0,0,0,0]),this.defineIfPresent(n.NORMAL,"HAS_NORMALS"),this.defineIfPresent(n.TANGENT&&s,"HAS_TANGENTS"),this.defineIfPresent(n.TEXCOORD_0,"HAS_UV"),this.defineIfPresent(o,"USE_IBL"),this.defineIfPresent(a,"USE_LIGHTS"),this.defineIfPresent(i,"PBR_DEBUG"),r&&this.parseMaterial(r)}return v(t,[{key:"defineIfPresent",value:function(t,e){t&&(this.defines[e]=1)}},{key:"parseTexture",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=t.texture&&t.texture.sampler&&t.texture.sampler.parameters||{},r=new Ht.a(this.gl,{id:t.name||t.id,parameters:n,pixelStore:Jt({},this.gl.UNPACK_FLIP_Y_WEBGL,!1),data:t.texture.source.image});this.uniforms[e]=r,this.defineIfPresent(A,A),this.generatedTextures.push(r)}},{key:"parsePbrMetallicRoughness",value:function(t){t.baseColorTexture&&this.parseTexture(t.baseColorTexture,"u_BaseColorSampler","HAS_BASECOLORMAP"),this.uniforms.u_BaseColorFactor=t.baseColorFactor||[1,1,1,1],t.metallicRoughnessTexture&&this.parseTexture(t.metallicRoughnessTexture,"u_MetallicRoughnessSampler","HAS_METALROUGHNESSMAP");var e=t.metallicFactor,A=void 0===e?1:e,n=t.roughnessFactor,r=void 0===n?1:n;this.uniforms.u_MetallicRoughnessValues=[A,r]}},{key:"parseMaterial",value:function(t){if(this.uniforms.pbr_uUnlit=Boolean(t.unlit),t.pbrMetallicRoughness&&this.parsePbrMetallicRoughness(t.pbrMetallicRoughness),t.normalTexture){this.parseTexture(t.normalTexture,"u_NormalSampler","HAS_NORMALMAP");var e=t.normalTexture.scale,A=void 0===e?1:e;this.uniforms.u_NormalScale=A}if(t.occlusionTexture){this.parseTexture(t.occlusionTexture,"u_OcclusionSampler","HAS_OCCLUSIONMAP");var n=t.occlusionTexture.strength,r=void 0===n?1:n;this.uniforms.u_OcclusionStrength=r}if(t.emissiveTexture&&(this.parseTexture(t.emissiveTexture,"u_EmissiveSampler","HAS_EMISSIVEMAP"),this.uniforms.u_EmissiveFactor=t.emissiveFactor||[0,0,0]),"MASK"===t.alphaMode){var i=t.alphaCutoff,o=void 0===i?.5:i;this.defines.ALPHA_CUTOFF=1,this.uniforms.u_AlphaCutoff=o}else"BLEND"===t.alphaMode&&(Q.k.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]}))}}]),t}();function Vt(t,e){return Object(Q.j)(t)?"#version 300 es\n".concat(e):e}var Zt={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Wt={modelOptions:{},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1},Kt=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p(this,t),this.gl=e,this.options=Object.assign({},Wt,A)}return v(t,[{key:"instantiate",value:function(t){var e=this;return this.gltf=t,(t.scenes||[]).map((function(t){return e.createScene(t)}))}},{key:"createAnimator",value:function(){return Array.isArray(this.gltf.animations)?new Ot(this.gltf):null}},{key:"createScene",value:function(t){var e=this,A=(t.nodes||[]).map((function(t){return e.createNode(t)}));return new mt({id:t.name||t.id,children:A})}},{key:"createNode",value:function(t){var e=this;if(!t._node){var A=(t.children||[]).map((function(t){return e.createNode(t)}));t.mesh&&A.push(this.createMesh(t.mesh));var n=new mt({id:t.name||t.id,children:A});if(t.matrix)n.setMatrix(t.matrix);else{if(n.matrix.identity(),t.translation&&n.matrix.translate(t.translation),t.rotation){var r=(new Ct).fromQuaternion(t.rotation);n.matrix.multiplyRight(r)}t.scale&&n.matrix.scale(t.scale)}t._node=n}return t._node}},{key:"createMesh",value:function(t){var e=this;if(!t._mesh){var A=(t.primitives||[]).map((function(A,n){return e.createPrimitive(A,n,t)})),n=new mt({id:t.name||t.id,children:A});t._mesh=n}return t._mesh}},{key:"getVertexCount",value:function(t){Q.k.warn("getVertexCount() not found")()}},{key:"createPrimitive",value:function(t,e,A){return function(t,e){var A=e.id,n=e.drawMode,r=e.vertexCount,i=e.attributes,o=e.modelOptions,a=new Yt(t,e);Q.k.info(4,"createGLTFModel defines: ",a.defines)();var s=[];s.push.apply(s,x(a.generatedTextures)),s.push.apply(s,x(Object.values(i).map((function(t){return t.buffer}))));var g=new _t(t,Object.assign({id:A,drawMode:n,vertexCount:r,modules:[E.a],defines:a.defines,parameters:a.parameters,vs:Vt(t,"\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:Vt(t,"\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:s},o));return g.setProps({attributes:i}),g.setUniforms(a.uniforms),g}(this.gl,Object.assign({id:t.name||"".concat(A.name||A.id,"-primitive-").concat(e),drawMode:t.mode||4,vertexCount:t.indices?t.indices.count:this.getVertexCount(t.attributes),attributes:this.createAttributes(t.attributes,t.indices),material:t.material},this.options))}},{key:"createAttributes",value:function(t,e){var A=this,n={};return Object.keys(t).forEach((function(e){n[e]=A.createAccessor(t[e],A.createBuffer(t[e],A.gl.ARRAY_BUFFER))})),e&&(n.indices=this.createAccessor(e,this.createBuffer(e,this.gl.ELEMENT_ARRAY_BUFFER))),Q.k.info(4,"glTF Attributes",{attributes:t,indices:e,generated:n})(),n}},{key:"createBuffer",value:function(t,e){t.bufferView||(t.bufferView={});var A=t.bufferView;return A.lumaBuffers||(A.lumaBuffers={}),A.lumaBuffers[e]||(A.lumaBuffers[e]=new dt.a(this.gl,{id:"from-".concat(A.id),data:A.data||t.value,target:e})),A.lumaBuffers[e]}},{key:"createAccessor",value:function(t,e){return new Qt.a({buffer:e,offset:t.byteOffset||0,stride:t.bufferView.byteStride||0,type:t.componentType,size:Zt[t.type]})}},{key:"createSampler",value:function(t){return t}},{key:"needsPOT",value:function(){return!1}}]),t}();var Pt=A(6),qt=A.n(Pt),Xt=A(11);function zt(t,e){if(!t)throw new Error(e)}var $t=A(567),te=$t.a._parseImageNode,ee="undefined"!==typeof Image,Ae="undefined"!==typeof ImageBitmap,ne=Boolean(te),re=!!$t.b||ne;function ie(t){var e=ae(t);if(!e)throw new Error("Not an image");return e}function oe(t){switch(ie(t)){case"data":return t;case"image":case"imagebitmap":var e=document.createElement("canvas"),A=e.getContext("2d");if(A)return e.width=t.width,e.height=t.height,A.drawImage(t,0,0),A.getImageData(0,0,t.width,t.height);default:return zt(!1)}}function ae(t){return"undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&t instanceof Image?"image":t&&"object"===Object(C.a)(t)&&t.data&&t.width&&t.height?"data":null}var se=/^data:image\/svg\+xml/,ge=/\.svg((\?|#).*)?$/;function ce(t){return t&&(se.test(t)||ge.test(t))}function Ie(t,e){if(ce(e)){var A=(new TextDecoder).decode(t);return"data:image/svg+xml;base64,".concat(btoa(A))}return ue(t,e)}function ue(t,e){if(ce(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}function le(t,e,A){return Ce.apply(this,arguments)}function Ce(){return(Ce=Object(Xt.a)(qt.a.mark((function t(e,A,n){var r,i,o;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Ie(e,n),i=self.URL||self.webkitURL,o="string"!==typeof r&&i.createObjectURL(r),t.prev=3,t.next=6,he(o||r,A);case 6:return t.abrupt("return",t.sent);case 7:return t.prev=7,o&&i.revokeObjectURL(o),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[3,,7,10]])})))).apply(this,arguments)}function he(t,e){return Be.apply(this,arguments)}function Be(){return(Be=Object(Xt.a)(qt.a.mark((function t(e,A){var n;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=new Image).src=e,!(A.image&&A.image.decode&&n.decode)){t.next=6;break}return t.next=5,n.decode();case 5:return t.abrupt("return",n);case 6:return t.next=8,new Promise((function(t,A){try{n.onload=function(){return t(n)},n.onerror=function(t){return A(new Error("Could not load image ".concat(e,": ").concat(t)))}}catch(r){A(r)}}));case 8:return t.abrupt("return",t.sent);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var fe={},de=!0;function Qe(t,e,A){return Ee.apply(this,arguments)}function Ee(){return(Ee=Object(Xt.a)(qt.a.mark((function t(e,A,n){var r,i,o;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!ce(n)){t.next=7;break}return t.next=3,le(e,A,n);case 3:i=t.sent,r=i,t.next=8;break;case 7:r=ue(e,n);case 8:return o=A&&A.imagebitmap,t.next=11,pe(r,o);case 11:return t.abrupt("return",t.sent);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function pe(t){return ye.apply(this,arguments)}function ye(){return(ye=Object(Xt.a)(qt.a.mark((function t(e){var A,n=arguments;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!ve(A=n.length>1&&void 0!==n[1]?n[1]:null)&&de||(A=null),!A){t.next=13;break}return t.prev=3,t.next=6,createImageBitmap(e,A);case 6:return t.abrupt("return",t.sent);case 9:t.prev=9,t.t0=t.catch(3),console.warn(t.t0),de=!1;case 13:return t.next=15,createImageBitmap(e);case 15:return t.abrupt("return",t.sent);case 16:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function ve(t){for(var e in t||fe)return!1;return!0}function me(t){var e=be(t);return function(t){var e=be(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){var e=be(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;var A=function(){for(var t=new Set([65499,65476,65484,65501,65534]),e=65504;e<65520;++e)t.add(e);var A=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:A}}(),n=A.tableMarkers,r=A.sofMarkers,i=2;for(;i+9<e.byteLength;){var o=e.getUint16(i,!1);if(r.has(o))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!n.has(o))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){var e=be(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){var e=be(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function be(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}function Fe(t,e){var A=(me(t)||{}).mimeType,n=$t.a._parseImageNode;return zt(n),n(t,A,e)}function we(){return(we=Object(Xt.a)(qt.a.mark((function t(e,A,n){var r,i,o,a,s;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(A=A||{}).image||{},i=r.type||"auto",o=(n||{}).url,a=Se(i),t.t0=a,t.next="imagebitmap"===t.t0?8:"image"===t.t0?12:"data"===t.t0?16:20;break;case 8:return t.next=10,Qe(e,A,o);case 10:return s=t.sent,t.abrupt("break",21);case 12:return t.next=14,le(e,A,o);case 14:return s=t.sent,t.abrupt("break",21);case 16:return t.next=18,Fe(e,A);case 18:return s=t.sent,t.abrupt("break",21);case 20:zt(!1);case 21:return"data"===i&&(s=oe(s)),t.abrupt("return",s);case 23:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Se(t){switch(t){case"auto":case"data":return function(){if(Ae)return"imagebitmap";if(ee)return"image";if(re)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return Ae||ee||re;case"imagebitmap":return Ae;case"image":return ee;case"data":return re;case"html":return ee;case"ndarray":return re;default:throw new Error("@loaders.gl/images: image ".concat(t," not supported in this environment"))}}(t),t}}var De={id:"image",name:"Images",version:"2.3.13",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(t,e,A){return we.apply(this,arguments)},tests:[function(t){return Boolean(me(new DataView(t)))}],options:{image:{type:"auto",decode:!0}}};function Re(t,e,A){if(t.byteLength<=e+A)return"";for(var n=new DataView(t),r="",i=0;i<A;i++)r+=String.fromCharCode(n.getUint8(e+i));return r}function Ue(t){try{return JSON.parse(t)}catch(e){throw new Error('Failed to parse JSON from data starting with "'.concat(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return Re(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var A=0;return Re(t,A,e)}return""}(t),'"'))}}function Ge(t,e){if(!t)throw new Error(e||"loader assertion failed.")}A(795);function Ne(t){return t+3&-4}function ke(t,e,A){return function(t,e,A){var n=void 0!==A?new Uint8Array(t).subarray(e,e+A):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}(t,e,A)}function xe(t,e,A){var n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{var r=t.byteOffset,i=t.byteLength;n=new Uint8Array(t.buffer,r,i)}return e.set(n,A),A+Ne(n.byteLength)}function Oe(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function Me(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;var A=e.baseUri||e.uri;if(!A)throw new Error("'baseUri' must be provided to resolve relative url ".concat(t));return A.substr(0,A.lastIndexOf("/")+1)+t}function Le(t,e,A){var n=t.bufferViews[A];Oe(n);var r=e[n.buffer];Oe(r);var i=(n.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,i,n.byteLength)}var _e,Je=A(22),Te=A(29),je=A(415),He=A(570),Ye={};function Ve(t){return Ze.apply(this,arguments)}function Ze(){return(Ze=Object(Xt.a)(qt.a.mark((function t(e){var A,n,r=arguments;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=r.length>1&&void 0!==r[1]?r[1]:null,n=r.length>2&&void 0!==r[2]?r[2]:{},A&&(e=We(e,A,n)),Ye[e]=Ye[e]||Ke(e),t.next=6,Ye[e];case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function We(t,e,A){var n=A.modules||{};return n[t]?n[t]:je.b?A.CDN?(Ge(A.CDN.startsWith("http")),"".concat(A.CDN,"/").concat(e,"@").concat("2.3.13","/dist/libs/").concat(t)):je.c?"../src/libs/".concat(t):"modules/".concat(e,"/src/libs/").concat(t):"modules/".concat(e,"/dist/libs/").concat(t)}function Ke(t){return Pe.apply(this,arguments)}function Pe(){return(Pe=Object(Xt.a)(qt.a.mark((function t(e){var A,n,r;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.endsWith("wasm")){t.next=7;break}return t.next=3,fetch(e);case 3:return A=t.sent,t.next=6,A.arrayBuffer();case 6:return t.abrupt("return",t.sent);case 7:if(je.b){t.next=9;break}return t.abrupt("return",He.requireFromFile&&He.requireFromFile(e));case 9:if(!je.c){t.next=11;break}return t.abrupt("return",importScripts(e));case 11:return t.next=13,fetch(e);case 13:return n=t.sent,t.next=16,n.text();case 16:return r=t.sent,t.abrupt("return",qe(r,e));case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function qe(t,e){if(!je.b)return He.requireFromString&&He.requireFromString(t,e);if(je.c)return eval.call(je.a,t),null;var A=document.createElement("script");A.id=e;try{A.appendChild(document.createTextNode(t))}catch(n){A.text=t}return document.body.appendChild(A),null}function Xe(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function ze(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Xe(Object(A),!0).forEach((function(e){Object(a.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Xe(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function $e(t){return tA.apply(this,arguments)}function tA(){return(tA=Object(Xt.a)(qt.a.mark((function t(e){var A;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=e.modules||{},_e=A.draco3d?_e||new Promise((function(t){var e=A.draco3d.createDecoderModule({onModuleLoaded:function(){t({draco:e})}})})):_e||eA(e),t.next=4,_e;case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function eA(t){return AA.apply(this,arguments)}function AA(){return(AA=Object(Xt.a)(qt.a.mark((function t(e){var A,n,r,i;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.draco&&e.draco.decoderType,t.next="js"===t.t0?3:(t.t0,7);break;case 3:return t.next=5,Ve("draco_decoder.js","draco",e);case 5:return A=t.sent,t.abrupt("break",21);case 7:return t.t1=Promise,t.next=10,Ve("draco_wasm_wrapper.js","draco",e);case 10:return t.t2=t.sent,t.next=13,Ve("draco_decoder.wasm","draco",e);case 13:return t.t3=t.sent,t.t4=[t.t2,t.t3],t.next=17,t.t1.all.call(t.t1,t.t4);case 17:r=t.sent,i=Object(Je.a)(r,2),A=i[0],n=i[1];case 21:return A=A||je.a.DracoDecoderModule,t.next=24,nA(A,n);case 24:return t.abrupt("return",t.sent);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nA(t,e){var A={};return e&&(A.wasmBinary=e),new Promise((function(e){t(ze(ze({},A),{},{onModuleLoaded:function(t){return e({draco:t})}}))}))}function rA(t){if(!t||!t.POSITION)return null;var e=1/0,A=1/0,n=1/0,r=-1/0,i=-1/0,o=-1/0,a=t.POSITION.value,s=a&&a.length;if(!s)return null;for(var g=0;g<s;g+=3){var c=a[g],I=a[g+1],u=a[g+2];e=c<e?c:e,A=I<A?I:A,n=u<n?u:n,r=c>r?c:r,i=I>i?I:i,o=u>o?u:o}return[[e,A,n],[r,i,o]]}var iA=0,oA=1,aA={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},sA={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},gA=function(){function t(e){Object(s.a)(this,t),this.draco=e,this.drawMode="TRIANGLE",this.metadataQuerier={}}return Object(g.a)(t,[{key:"destroy",value:function(){}},{key:"destroyGeometry",value:function(t){t&&this.draco.destroy(t.dracoGeometry)}},{key:"parseSync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.metadataQuerier=new this.draco.MetadataQuerier;var A=new this.draco.DecoderBuffer;A.Init(new Int8Array(t),t.byteLength);var n,r,i,o=new this.draco.Decoder,a={};try{var s=o.GetEncodedGeometryType(A);switch(s){case this.draco.TRIANGULAR_MESH:r=new this.draco.Mesh,n=o.DecodeBufferToMesh(A,r),i={type:iA,faceCount:r.num_faces(),attributeCount:r.num_attributes(),vertexCount:r.num_points()};break;case this.draco.POINT_CLOUD:r=new this.draco.PointCloud,n=o.DecodeBufferToPointCloud(A,r),i={type:oA,attributeCount:r.num_attributes(),vertexCount:r.num_points()};break;default:throw new Error("Unknown DRACO geometry type.")}if(!n.ok()||!r.ptr){var g="DRACO decompression failed: ".concat(n.error_msg());throw r&&this.draco.destroy(r),new Error(g)}a.loaderData={header:i},this._extractDRACOGeometry(o,r,s,a,e);var c=this._getGeometryMetadata(o,r);a.header={vertexCount:i.vertexCount,boundingBox:rA(a.attributes),metadata:c}}finally{this.draco.destroy(o),this.draco.destroy(A),this.draco.destroy(r),this.draco.destroy(this.metadataQuerier)}return a}},{key:"_extractDRACOGeometry",value:function(t,e,A,n,r){var i=this._getAttributes(t,e,r);if(!i.POSITION)throw new Error("DRACO decompressor: No position attribute found.");return A===this.draco.TRIANGULAR_MESH?(i.indices="TRIANGLE_STRIP"===this.drawMode?this._getMeshStripIndices(t,e):this._getMeshFaceIndices(t,e),n.mode="TRIANGLE_STRIP"===this.drawMode?5:4):n.mode=0,i.indices&&(n.indices={value:i.indices,size:1},delete i.indices),n.attributes=i,n}},{key:"getPositionAttributeMetadata",value:function(t){this.metadata=this.metadata||{},this.metadata.attributes=this.metadata.attributes||{};var e=new this.draco.AttributeQuantizationTransform;if(e.InitFromAttribute(t)){this.metadata.attributes.position.isQuantized=!0,this.metadata.attributes.position.maxRange=e.range(),this.metadata.attributes.position.numQuantizationBits=e.quantization_bits(),this.metadata.attributes.position.minValues=new Float32Array(3);for(var A=0;A<3;++A)this.metadata.attributes.position.minValues[A]=e.min_value(A)}this.draco.destroy(e)}},{key:"_getAttributes",value:function(t,e,A){for(var n={},r=e.num_points(),i=0;i<e.num_attributes();i++){var o=t.GetAttribute(e,i),a=this._getAttributeMetadata(t,e,i),s={uniqueId:o.unique_id(),attributeType:o.attribute_type(),dataType:sA[o.data_type()],size:o.size(),numComponents:o.num_components(),byteOffset:o.byte_offset(),byteStride:o.byte_stride(),normalized:o.normalized(),metadata:a},g=this._deduceAttributeName(s,A),c=this._getAttributeTypedArray(t,e,o,g).typedArray;n[g]={value:c,size:c.length/r,metadata:a}}return n}},{key:"_getMeshFaceIndices",value:function(t,e){for(var A=e.num_faces(),n=new Uint32Array(3*A),r=new this.draco.DracoInt32Array,i=0;i<A;++i){t.GetFaceFromMesh(e,i,r);var o=3*i;n[o]=r.GetValue(0),n[o+1]=r.GetValue(1),n[o+2]=r.GetValue(2)}return this.draco.destroy(r),n}},{key:"_getMeshStripIndices",value:function(t,e){var A=new this.draco.DracoInt32Array;t.GetTriangleStripsFromMesh(e,A);for(var n=new Uint32Array(A.size()),r=0;r<A.size();++r)n[r]=A.GetValue(r);return this.draco.destroy(A),n}},{key:"_getAttributeTypedArray",value:function(t,e,A,n){if(0===A.ptr){var r="DRACO decode bad attribute ".concat(n);throw new Error(r)}var i,o,a=sA[A.data_type()],s=A.num_components(),g=e.num_points()*s;switch(a){case Float32Array:i=new this.draco.DracoFloat32Array,t.GetAttributeFloatForAllPoints(e,A,i),o=new Float32Array(g);break;case Int8Array:i=new this.draco.DracoInt8Array,t.GetAttributeInt8ForAllPoints(e,A,i),o=new Int8Array(g);break;case Int16Array:i=new this.draco.DracoInt16Array,t.GetAttributeInt16ForAllPoints(e,A,i),o=new Int16Array(g);break;case Int32Array:i=new this.draco.DracoInt32Array,t.GetAttributeInt32ForAllPoints(e,A,i),o=new Int32Array(g);break;case Uint8Array:i=new this.draco.DracoUInt8Array,t.GetAttributeUInt8ForAllPoints(e,A,i),o=new Uint8Array(g);break;case Uint16Array:i=new this.draco.DracoUInt16Array,t.GetAttributeUInt16ForAllPoints(e,A,i),o=new Uint16Array(g);break;case Uint32Array:i=new this.draco.DracoUInt32Array,t.GetAttributeUInt32ForAllPoints(e,A,i),o=new Uint32Array(g);break;default:throw new Error("DRACO decoder: unexpected attribute type.")}for(var c=0;c<g;c++)o[c]=i.GetValue(c);return this.draco.destroy(i),{typedArray:o,components:s}}},{key:"_deduceAttributeName",value:function(t,e){var A=e.extraAttributes,n=void 0===A?{}:A;if(n&&"object"===Object(C.a)(n))for(var r=0,i=Object.entries(n);r<i.length;r++){var o=Object(Je.a)(i[r],2),a=o[0];if(o[1]===t.uniqueId)return a}for(var s in aA){var g=this.draco[s];if(t.attributeType===g)return aA[s]}if(t.metadata){var c=e.attributeNameEntry||"name";if(t.metadata[c])return t.metadata[c].string}return"CUSTOM_ATTRIBUTE_".concat(t.uniqueId)}},{key:"_getGeometryMetadata",value:function(t,e){var A=t.GetMetadata(e);return this._queryDracoMetadata(A)}},{key:"_getAttributeMetadata",value:function(t,e,A){var n=t.GetAttributeMetadata(e,A);return this._queryDracoMetadata(n)}},{key:"_queryDracoMetadata",value:function(t){if(!t||!t.ptr)return{};for(var e={},A=this.metadataQuerier.NumEntries(t),n=0;n<A;n++){var r=this.metadataQuerier.GetEntryName(t,n);e[r]={int:this.metadataQuerier.GetIntEntry(t,r),string:this.metadataQuerier.GetStringEntry(t,r),double:this.metadataQuerier.GetDoubleEntry(t,r),intArray:this.metadataQuerier.GetIntEntryArray(t,r)}}return e}},{key:"decode",value:function(t,e){return this.parseSync(t,e)}}]),t}();function cA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function IA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?cA(Object(A),!0).forEach((function(e){Object(a.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):cA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var uA=IA(IA({},{id:"draco",name:"Draco",version:"2.3.13",extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===("undefined"===typeof WebAssembly?"undefined":Object(C.a)(WebAssembly))?"wasm":"js",libraryPath:"libs/",workerUrl:"https://unpkg.com/@loaders.gl/draco@".concat("2.3.13","/dist/draco-loader.worker.js"),localWorkerUrl:"modules/draco/dist/draco-loader.worker.dev.js",extraAttributes:{}}}}),{},{parse:function(t,e,A,n){return lA.apply(this,arguments)}});function lA(){return(lA=Object(Xt.a)(qt.a.mark((function t(e,A,n,r){var i,o,a;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$e(A);case 2:return i=t.sent,o=i.draco,a=new gA(o),t.prev=5,t.abrupt("return",a.parseSync(e,IA({extraAttributes:A.draco&&A.draco.extraAttributes||null},A.parseOptions||{})));case 7:return t.prev=7,a.destroy(),t.finish(7);case 10:case"end":return t.stop()}}),t,null,[[5,,7,10]])})))).apply(this,arguments)}var CA=["SCALAR","VEC2","VEC3","VEC4"],hA=new Map([[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126]]),BA={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},fA={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},dA={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function QA(t){return CA[t-1]||CA[0]}function EA(t){var e=hA.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function pA(t,e){var A=dA[t.componentType],n=BA[t.type],r=fA[t.componentType],i=t.count*n,o=t.count*n*r;return Oe(o>=0&&o<=e.byteLength),{ArrayType:A,length:i,byteLength:o}}var yA=function(){function t(e){if(Object(s.a)(this,t),e instanceof t)return e;e||(e={json:{asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},buffers:[]}),this.byteLength=0,this.gltf=e,Oe(this.gltf.json)}return Object(g.a)(t,[{key:"getApplicationData",value:function(t){return this.json[t]}},{key:"getExtraData",value:function(t){return(this.json.extras||{})[t]}},{key:"getExtension",value:function(t){var e=this.getUsedExtensions().find((function(e){return e===t})),A=this.json.extensions||{};return e?A[t]||!0:null}},{key:"getRequiredExtension",value:function(t){return this.getRequiredExtensions().find((function(e){return e===t}))?this.getExtension(t):null}},{key:"getRequiredExtensions",value:function(){return this.json.extensionsRequired||[]}},{key:"getUsedExtensions",value:function(){return this.json.extensionsUsed||[]}},{key:"getObjectExtension",value:function(t,e){return(t.extensions||{})[e]}},{key:"getScene",value:function(t){return this.getObject("scenes",t)}},{key:"getNode",value:function(t){return this.getObject("nodes",t)}},{key:"getSkin",value:function(t){return this.getObject("skins",t)}},{key:"getMesh",value:function(t){return this.getObject("meshes",t)}},{key:"getMaterial",value:function(t){return this.getObject("materials",t)}},{key:"getAccessor",value:function(t){return this.getObject("accessors",t)}},{key:"getCamera",value:function(t){return null}},{key:"getTexture",value:function(t){return this.getObject("textures",t)}},{key:"getSampler",value:function(t){return this.getObject("samplers",t)}},{key:"getImage",value:function(t){return this.getObject("images",t)}},{key:"getBufferView",value:function(t){return this.getObject("bufferViews",t)}},{key:"getBuffer",value:function(t){return this.getObject("buffers",t)}},{key:"getObject",value:function(t,e){if("object"===Object(C.a)(e))return e;var A=this.json[t]&&this.json[t][e];if(!A)throw new Error("glTF file error: Could not find ".concat(t,"[").concat(e,"]"));return A}},{key:"getTypedArrayForBufferView",value:function(t){var e=(t=this.getBufferView(t)).buffer,A=this.gltf.buffers[e];Oe(A);var n=(t.byteOffset||0)+A.byteOffset;return new Uint8Array(A.arrayBuffer,n,t.byteLength)}},{key:"getTypedArrayForAccessor",value:function(t){t=this.getAccessor(t);var e=this.getBufferView(t.bufferView),A=this.getBuffer(e.buffer).data,n=pA(t,e),r=n.ArrayType,i=n.length;return new r(A,e.byteOffset+t.byteOffset,i)}},{key:"getTypedArrayForImageData",value:function(t){t=this.getAccessor(t);var e=this.getBufferView(t.bufferView),A=this.getBuffer(e.buffer).data,n=e.byteOffset||0;return new Uint8Array(A,n,e.byteLength)}},{key:"addApplicationData",value:function(t,e){return this.json[t]=e,this}},{key:"addExtraData",value:function(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}},{key:"addObjectExtension",value:function(t,e,A){return Oe(A),t.extensions=t.extensions||{},t.extensions[e]=A,this.registerUsedExtension(e),this}},{key:"setObjectExtension",value:function(t,e,A){(t.extensions||{})[e]=A}},{key:"removeObjectExtension",value:function(t,e){var A=t.extensions||{},n=A[e];return delete A[e],n}},{key:"addExtension",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Oe(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}},{key:"addRequiredExtension",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Oe(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}},{key:"registerUsedExtension",value:function(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find((function(e){return e===t}))||this.json.extensionsUsed.push(t)}},{key:"registerRequiredExtension",value:function(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find((function(e){return e===t}))||this.json.extensionsRequired.push(t)}},{key:"removeExtension",value:function(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}},{key:"addMesh",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,n=this._addAttributes(t),r={primitives:[{attributes:n,indices:e,mode:A}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(r),this.json.meshes.length-1}},{key:"addPointCloud",value:function(t){var e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}},{key:"addImage",value:function(t,e){e=e||function(t){var e=me(t);return e?e.mimeType:null}(t);var A={bufferView:this.addBufferView(t),mimeType:e};return this.json.images=this.json.images||[],this.json.images.push(A),this.json.images.length-1}},{key:"addBufferView",value:function(t){var e=t.byteLength;Oe(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);var A={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=Ne(e),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(A),this.json.bufferViews.length-1}},{key:"addAccessor",value:function(t,e){var A={bufferView:t,type:QA(e.size),componentType:e.componentType,count:e.count};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(A),this.json.accessors.length-1}},{key:"addBinaryBuffer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3},A=this.addBufferView(t),n={size:e.size,componentType:EA(t),count:Math.round(t.length/e.size)};return this.addAccessor(A,Object.assign(n,e))}},{key:"createBinaryChunk",value:function(){if(!this.arrayBuffer){for(var t=this.byteLength,e=new ArrayBuffer(t),A=new Uint8Array(e),n=0,r=0;r<this.sourceBuffers.length;r++){n=xe(this.sourceBuffers[r],A,n)}this.json.buffers[0].byteLength=t,this.arrayBuffer=e,this.sourceBuffers=[]}}},{key:"_removeStringFromArray",value:function(t,e){for(var A=!0;A;){var n=t.indexOf(e);n>-1?t.splice(n,1):A=!1}}},{key:"json",get:function(){return this.gltf.json}}]),t}();function vA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function mA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?vA(Object(A),!0).forEach((function(e){Object(a.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):vA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function bA(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A={};for(var n in t){var r=t[n];if("indices"!==n){var i=FA(r,e[n]||{});A[n]=i}}return A}function FA(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=wA(t),n=A.buffer,r=A.size,i=A.count,o=mA(mA({},e),{},{value:n,size:r,bufferView:null,byteOffset:0,count:i,type:QA(r),componentType:EA(n)});return o}function wA(t){var e=t,A=1,n=0;return t&&t.value&&(e=t.value,A=t.size||1),e&&(ArrayBuffer.isView(e)||(e=function(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!t)return null;if(Array.isArray(t))return new e(t);if(A&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),n=e.length/A),{buffer:e,size:A,count:n}}function SA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function DA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?SA(Object(A),!0).forEach((function(e){Object(a.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):SA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var RA=qt.a.mark(JA);function UA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return GA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return GA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function GA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function NA(t,e,A){return kA.apply(this,arguments)}function kA(){return(kA=Object(Xt.a)(qt.a.mark((function t(e,A,n){var r,i,o,a,s;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.gltf.decompressMeshes){t.next=2;break}return t.abrupt("return");case 2:r=new yA(e),i=[],o=UA(JA(r));try{for(o.s();!(a=o.n()).done;)s=a.value,r.getObjectExtension(s,"KHR_draco_mesh_compression")&&i.push(OA(s,r,A,n))}catch(g){o.e(g)}finally{o.f()}return t.next=8,Promise.all(i);case 8:r.removeExtension("KHR_draco_mesh_compression");case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function xA(t){var e,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new yA(t),r=UA(n.json.meshes||[]);try{for(r.s();!(e=r.n()).done;){var i=e.value;LA(i,A),n.addRequiredExtension("KHR_draco_mesh_compression")}}catch(o){r.e(o)}finally{r.f()}}function OA(t,e,A,n){return MA.apply(this,arguments)}function MA(){return(MA=Object(Xt.a)(qt.a.mark((function t(e,A,n,r){var i,o,a,s,g,c,I,u,l,C,h,B;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=A.getObjectExtension(e,"KHR_draco_mesh_compression"),o=A.getTypedArrayForBufferView(i.bufferView),a=ke(o.buffer,o.byteOffset),s=r.parse,delete(g=DA({},n))["3d-tiles"],t.next=8,s(a,uA,g,r);case 8:for(c=t.sent,I={},u=0,l=[].concat(Object(Te.a)(Object.entries(e.attributes)),[["indices",e.indices]]);u<l.length;u++)C=Object(Je.a)(l[u],2),h=C[0],B=C[1],I[h]=A.getAccessor(B);e.attributes=bA(c.attributes,I),c.indices&&(e.indices=FA(c.indices,I.indices||{})),_A(e);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function LA(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;if(!n.DracoWriter||!n.DracoLoader)throw new Error("DracoWriter/DracoLoader not available");var i=n.DracoWriter.encodeSync({attributes:t}),o=r.parseSync,s=o({attributes:t}),g=n._addFauxAttributes(s.attributes),c=n.addBufferView(i),I={primitives:[{attributes:g,mode:A,extensions:Object(a.a)({},"KHR_draco_mesh_compression",{bufferView:c,attributes:g})}]};return I}function _A(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("Empty glTF primitive detected: Draco decompression failure?")}function JA(t){var e,A,n,r,i,o;return qt.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:e=UA(t.json.meshes||[]),a.prev=1,e.s();case 3:if((A=e.n()).done){a.next=24;break}n=A.value,r=UA(n.primitives),a.prev=6,r.s();case 8:if((i=r.n()).done){a.next=14;break}return o=i.value,a.next=12,o;case 12:a.next=8;break;case 14:a.next=19;break;case 16:a.prev=16,a.t0=a.catch(6),r.e(a.t0);case 19:return a.prev=19,r.f(),a.finish(19);case 22:a.next=3;break;case 24:a.next=29;break;case 26:a.prev=26,a.t1=a.catch(1),e.e(a.t1);case 29:return a.prev=29,e.f(),a.finish(29);case 32:case"end":return a.stop()}}),RA,null,[[1,26,29,32],[6,16,19,22]])}function TA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return jA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return jA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function jA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function HA(t,e){var A=new yA(t),n=A.json,r=A.getExtension("KHR_lights_punctual");r&&(A.json.lights=r.lights,A.removeExtension("KHR_lights_punctual"));var i,o=TA(n.nodes||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=A.getObjectExtension(a,"KHR_lights_punctual");s&&(a.light=s.light),A.removeObjectExtension(a,"KHR_lights_punctual")}}catch(g){o.e(g)}finally{o.f()}}function YA(t,e){var A=new yA(t),n=A.json;if(n.lights){var r=A.addExtension("KHR_lights_punctual");Oe(!r.lights),r.lights=n.lights,delete n.lights}if(A.json.lights){var i,o=TA(A.json.lights);try{for(o.s();!(i=o.n()).done;){var a=i.value,s=a.node;A.addObjectExtension(s,"KHR_lights_punctual",a)}}catch(g){o.e(g)}finally{o.f()}delete A.json.lights}}function VA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return ZA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return ZA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function ZA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function WA(t,e){var A=new yA(t),n=A.json;A.removeExtension("KHR_materials_unlit");var r,i=VA(n.materials||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.extensions&&o.extensions.KHR_materials_unlit&&(o.unlit=!0),A.removeObjectExtension(o,"KHR_materials_unlit")}}catch(a){i.e(a)}finally{i.f()}}function KA(t,e){var A=new yA(t),n=A.json;if(A.materials){var r,i=VA(n.materials);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.unlit&&(delete o.unlit,A.addObjectExtension(o,"KHR_materials_unlit",{}),A.addExtension("KHR_materials_unlit"))}}catch(a){i.e(a)}finally{i.f()}}}function PA(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return qA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return qA(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function qA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function XA(t,e){var A=new yA(t),n=A.json,r=A.getExtension("KHR_techniques_webgl");if(r){var i,o=function(t,e){var A=t.programs,n=void 0===A?[]:A,r=t.shaders,i=void 0===r?[]:r,o=t.techniques,a=void 0===o?[]:o,s=new TextDecoder;return i.forEach((function(t){if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=s.decode(e.getTypedArrayForBufferView(t.bufferView))})),n.forEach((function(t){t.fragmentShader=i[t.fragmentShader],t.vertexShader=i[t.vertexShader]})),a.forEach((function(t){t.program=n[t.program]})),a}(r,A),a=PA(n.materials||[]);try{for(a.s();!(i=a.n()).done;){var s=i.value,g=A.getObjectExtension(s,"KHR_techniques_webgl");g&&(s.technique=Object.assign({},g,o[g.technique]),s.technique.values=$A(s.technique,A)),A.removeObjectExtension(s,"KHR_techniques_webgl")}}catch(c){a.e(c)}finally{a.f()}A.removeExtension("KHR_techniques_webgl")}}function zA(t,e){}function $A(t,e){var A=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach((function(e){t.uniforms[e].value&&!(e in A)&&(A[e]=t.uniforms[e].value)})),Object.keys(A).forEach((function(t){"object"===Object(C.a)(A[t])&&void 0!==A[t].index&&(A[t].texture=e.getTexture(A[t].index))})),A}var tn={KHR_draco_mesh_compression:n,KHR_lights_punctual:r,KHR_materials_unlit:i,KHR_techniques_webgl:o};function en(t){return An.apply(this,arguments)}function An(){return(An=Object(Xt.a)(qt.a.mark((function t(e){var A,n,r,i,o,a=arguments;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2?a[2]:void 0,A.gltf=A.gltf||{},t.t0=qt.a.keys(tn);case 4:if((t.t1=t.t0()).done){t.next=14;break}if(r=t.t1.value,i=A.gltf.excludeExtensions||{},r in i&&!i[r]){t.next=12;break}return o=tn[r],t.next=12,o.decode(e,A,n);case 12:t.next=4;break;case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function nn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"".concat(String.fromCharCode(t.getUint8(e+0))).concat(String.fromCharCode(t.getUint8(e+1))).concat(String.fromCharCode(t.getUint8(e+2))).concat(String.fromCharCode(t.getUint8(e+3)))}function rn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=new DataView(t),r=A.magic,i=void 0===r?1735152710:r,o=n.getUint32(e,!1);return o===i||1735152710===o}function on(t,e,A,n){Ge(t.header.byteLength>20);var r=e.getUint32(A+0,!0),i=e.getUint32(A+4,!0);return A+=8,Ge(0===i),sn(t,e,A,r,n),A+=r,A+=gn(t,e,A,t.header.byteLength,n)}function an(t,e,A,n){return Ge(t.header.byteLength>20),function(t,e,A,n){for(;A+8<=t.header.byteLength;){var r=e.getUint32(A+0,!0),i=e.getUint32(A+4,!0);switch(A+=8,i){case 1313821514:sn(t,e,A,r,n);break;case 5130562:gn(t,e,A,r,n);break;case 0:n.glb.strict||sn(t,e,A,r,n);break;case 1:n.glb.strict||gn(t,e,A,r,n)}A+=Ne(r)}}(t,e,A,n),A+t.header.byteLength}function sn(t,e,A,n,r){var i=new Uint8Array(e.buffer,A,n),o=new TextDecoder("utf8").decode(i);return t.json=JSON.parse(o),Ne(n)}function gn(t,e,A,n,r){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:A,byteLength:n,arrayBuffer:e.buffer}),Ne(n)}function cn(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return In(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return In(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function In(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function un(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return ln(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return ln(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function ln(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var Cn,hn={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},Bn={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},fn=function(){function t(e){Object(s.a)(this,t),this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}return Object(g.a)(t,[{key:"normalize",value:function(t,e){this.json=t.json;var A=t.json;switch(A.asset&&A.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version ".concat(A.asset.version))}if(!e.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(A),this._convertTopLevelObjectsToArrays(A),function(t,e){var A,n=new yA(t),r=n.json,i=cn(r.images||[]);try{for(i.s();!(A=i.n()).done;){var o=A.value,a=n.removeObjectExtension(o,"KHR_binary_glTF");a&&Object.assign(o,a)}}catch(s){i.e(s)}finally{i.f()}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,n.removeExtension("KHR_binary_glTF")}(t),this._convertObjectIdsToArrayIndices(A),this._updateObjects(A)}},{key:"_addAsset",value:function(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}},{key:"_convertTopLevelObjectsToArrays",value:function(t){for(var e in hn)this._convertTopLevelObjectToArray(t,e)}},{key:"_convertTopLevelObjectToArray",value:function(t,e){var A=t[e];if(A&&!Array.isArray(A))for(var n in t[e]=[],A){var r=A[n];r.id=r.id||n;var i=t[e].length;t[e].push(r),this.idToIndexMap[e][n]=i}}},{key:"_convertObjectIdsToArrayIndices",value:function(t){for(var e in hn)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));var A,n=un(t.textures);try{for(n.s();!(A=n.n()).done;){var r=A.value;this._convertTextureIds(r)}}catch(C){n.e(C)}finally{n.f()}var i,o=un(t.meshes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this._convertMeshIds(a)}}catch(C){o.e(C)}finally{o.f()}var s,g=un(t.nodes);try{for(g.s();!(s=g.n()).done;){var c=s.value;this._convertNodeIds(c)}}catch(C){g.e(C)}finally{g.f()}var I,u=un(t.scenes);try{for(u.s();!(I=u.n()).done;){var l=I.value;this._convertSceneIds(l)}}catch(C){u.e(C)}finally{u.f()}}},{key:"_convertTextureIds",value:function(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}},{key:"_convertMeshIds",value:function(t){var e,A=un(t.primitives);try{for(A.s();!(e=A.n()).done;){var n=e.value,r=n.attributes,i=n.indices,o=n.material;for(var a in r)r[a]=this._convertIdToIndex(r[a],"accessor");i&&(n.indices=this._convertIdToIndex(i,"accessor")),o&&(n.material=this._convertIdToIndex(o,"material"))}}catch(s){A.e(s)}finally{A.f()}}},{key:"_convertNodeIds",value:function(t){var e=this;t.children&&(t.children=t.children.map((function(t){return e._convertIdToIndex(t,"node")})))}},{key:"_convertSceneIds",value:function(t){var e=this;t.nodes&&(t.nodes=t.nodes.map((function(t){return e._convertIdToIndex(t,"node")})))}},{key:"_convertIdsToIndices",value:function(t,e){var A,n=un(t[e]);try{for(n.s();!(A=n.n()).done;){var r=A.value;for(var i in r){var o=r[i],a=this._convertIdToIndex(o,i);r[i]=a}}}catch(s){n.e(s)}finally{n.f()}}},{key:"_convertIdToIndex",value:function(t,e){var A=Bn[e];if(A in this.idToIndexMap){var n=this.idToIndexMap[A][t];if(!Number.isFinite(n))throw new Error("gltf v1: failed to resolve ".concat(e," with id ").concat(t));return n}return t}},{key:"_updateObjects",value:function(t){var e,A=un(this.json.buffers);try{for(A.s();!(e=A.n()).done;){delete e.value.type}}catch(n){A.e(n)}finally{A.f()}}}]),t}();function dn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(new fn).normalize(t,e)}function Qn(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function En(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Qn(Object(A),!0).forEach((function(e){Object(a.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Qn(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var pn={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},yn={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},vn={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},mn={magFilter:vn.TEXTURE_MAG_FILTER,minFilter:vn.TEXTURE_MIN_FILTER,wrapS:vn.TEXTURE_WRAP_S,wrapT:vn.TEXTURE_WRAP_T},bn=(Cn={},Object(a.a)(Cn,vn.TEXTURE_MAG_FILTER,vn.LINEAR),Object(a.a)(Cn,vn.TEXTURE_MIN_FILTER,vn.NEAREST_MIPMAP_LINEAR),Object(a.a)(Cn,vn.TEXTURE_WRAP_S,vn.REPEAT),Object(a.a)(Cn,vn.TEXTURE_WRAP_,vn.REPEAT),Cn);var Fn=function(){function t(){Object(s.a)(this,t)}return Object(g.a)(t,[{key:"postProcess",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=t.json,n=t.buffers,r=void 0===n?[]:n,i=t.images,o=void 0===i?[]:i,a=t.baseUri,s=void 0===a?"":a;return Oe(A),this.baseUri=s,this.json=A,this.buffers=r,this.images=o,this._resolveTree(this.json,e),this.json}},{key:"_resolveTree",value:function(t){var e=this;arguments.length>1&&void 0!==arguments[1]&&arguments[1];t.bufferViews&&(t.bufferViews=t.bufferViews.map((function(t,A){return e._resolveBufferView(t,A)}))),t.images&&(t.images=t.images.map((function(t,A){return e._resolveImage(t,A)}))),t.samplers&&(t.samplers=t.samplers.map((function(t,A){return e._resolveSampler(t,A)}))),t.textures&&(t.textures=t.textures.map((function(t,A){return e._resolveTexture(t,A)}))),t.accessors&&(t.accessors=t.accessors.map((function(t,A){return e._resolveAccessor(t,A)}))),t.materials&&(t.materials=t.materials.map((function(t,A){return e._resolveMaterial(t,A)}))),t.meshes&&(t.meshes=t.meshes.map((function(t,A){return e._resolveMesh(t,A)}))),t.nodes&&(t.nodes=t.nodes.map((function(t,A){return e._resolveNode(t,A)}))),t.skins&&(t.skins=t.skins.map((function(t,A){return e._resolveSkin(t,A)}))),t.scenes&&(t.scenes=t.scenes.map((function(t,A){return e._resolveScene(t,A)}))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}},{key:"getScene",value:function(t){return this._get("scenes",t)}},{key:"getNode",value:function(t){return this._get("nodes",t)}},{key:"getSkin",value:function(t){return this._get("skins",t)}},{key:"getMesh",value:function(t){return this._get("meshes",t)}},{key:"getMaterial",value:function(t){return this._get("materials",t)}},{key:"getAccessor",value:function(t){return this._get("accessors",t)}},{key:"getCamera",value:function(t){return null}},{key:"getTexture",value:function(t){return this._get("textures",t)}},{key:"getSampler",value:function(t){return this._get("samplers",t)}},{key:"getImage",value:function(t){return this._get("images",t)}},{key:"getBufferView",value:function(t){return this._get("bufferViews",t)}},{key:"getBuffer",value:function(t){return this._get("buffers",t)}},{key:"_get",value:function(t,e){if("object"===Object(C.a)(e))return e;var A=this.json[t]&&this.json[t][e];return A||console.warn("glTF file error: Could not find ".concat(t,"[").concat(e,"]")),A}},{key:"_resolveScene",value:function(t,e){var A=this;return t.id=t.id||"scene-".concat(e),t.nodes=(t.nodes||[]).map((function(t){return A.getNode(t)})),t}},{key:"_resolveNode",value:function(t,e){var A=this;return t.id=t.id||"node-".concat(e),t.children&&(t.children=t.children.map((function(t){return A.getNode(t)}))),void 0!==t.mesh&&(t.mesh=this.getMesh(t.mesh)),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}},{key:"_resolveSkin",value:function(t,e){return t.id=t.id||"skin-".concat(e),t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}},{key:"_resolveMesh",value:function(t,e){var A=this;return t.id=t.id||"mesh-".concat(e),t.primitives&&(t.primitives=t.primitives.map((function(t){var e=(t=En({},t)).attributes;for(var n in t.attributes={},e)t.attributes[n]=A.getAccessor(e[n]);return void 0!==t.indices&&(t.indices=A.getAccessor(t.indices)),void 0!==t.material&&(t.material=A.getMaterial(t.material)),t}))),t}},{key:"_resolveMaterial",value:function(t,e){if(t.id=t.id||"material-".concat(e),t.normalTexture&&(t.normalTexture=En({},t.normalTexture),t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture=En({},t.occlustionTexture),t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture=En({},t.emmisiveTexture),t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.pbrMetallicRoughness){t.pbrMetallicRoughness=En({},t.pbrMetallicRoughness);var A=t.pbrMetallicRoughness;A.baseColorTexture&&(A.baseColorTexture=En({},A.baseColorTexture),A.baseColorTexture.texture=this.getTexture(A.baseColorTexture.index)),A.metallicRoughnessTexture&&(A.metallicRoughnessTexture=En({},A.metallicRoughnessTexture),A.metallicRoughnessTexture.texture=this.getTexture(A.metallicRoughnessTexture.index))}return t}},{key:"_resolveAccessor",value:function(t,e){var A,n;if(t.id=t.id||"accessor-".concat(e),void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(A=t.componentType,yn[A]),t.components=(n=t.type,pn[n]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){var r=t.bufferView.buffer,i=pA(t,t.bufferView),o=i.ArrayType,a=i.length,s=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+r.byteOffset;t.value=new o(r.arrayBuffer,s,a)}return t}},{key:"_resolveTexture",value:function(t,e){return t.id=t.id||"texture-".concat(e),t.sampler="sampler"in t?this.getSampler(t.sampler):bn,t.source=this.getImage(t.source),t}},{key:"_resolveSampler",value:function(t,e){for(var A in t.id=t.id||"sampler-".concat(e),t.parameters={},t){var n=this._enumSamplerParameter(A);void 0!==n&&(t.parameters[n]=t[A])}return t}},{key:"_enumSamplerParameter",value:function(t){return mn[t]}},{key:"_resolveImage",value:function(t,e){t.id=t.id||"image-".concat(e),void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));var A=this.images[e];return A&&(t.image=A),t}},{key:"_resolveBufferView",value:function(t,e){t.id=t.id||"bufferView-".concat(e);var A=t.buffer;t.buffer=this.buffers[A];var n=this.buffers[A].arrayBuffer,r=this.buffers[A].byteOffset||0;return"byteOffset"in t&&(r+=t.byteOffset),t.data=new Uint8Array(n,r,t.byteLength),t}},{key:"_resolveCamera",value:function(t,e){return t.id=t.id||"camera-".concat(e),t.perspective,t.orthographic,t}}]),t}();function wn(t,e){return(new Fn).postProcess(t,e)}function Sn(t,e){return Dn.apply(this,arguments)}function Dn(){return(Dn=Object(Xt.a)(qt.a.mark((function t(e,A){var n,r,i,o,a,s,g=arguments;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=g.length>2&&void 0!==g[2]?g[2]:0,r=g.length>3?g[3]:void 0,i=g.length>4?g[4]:void 0,Rn(e,A,n,r),dn(e,{normalize:r.gltf.normalize}),o=[],!r.gltf.loadBuffers||!e.json.buffers){t.next=9;break}return t.next=9,Un(e,r,i);case 9:return r.gltf.loadImages&&(a=Nn(e,r,i),o.push(a)),s=en(e,r,i),o.push(s),t.next=14,Promise.all(o);case 14:return t.abrupt("return",r.gltf.postProcess?wn(e,r):e);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Rn(t,e,A,n){(n.uri&&(t.baseUri=n.uri),e instanceof ArrayBuffer&&!rn(e,A,n))&&(e=(new TextDecoder).decode(e));if("string"===typeof e)t.json=Ue(e);else if(e instanceof ArrayBuffer){var r={};A=function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],new DataView(e));t.type=nn(n,A+0),t.version=n.getUint32(A+4,!0);var r=n.getUint32(A+8,!0);switch(t.header={byteOffset:A,byteLength:r},t.json={},t.binChunks=[],A+=12,t.version){case 1:return on(t,n,A,{});case 2:return an(t,n,A,{});default:throw new Error("Invalid GLB version ".concat(t.version,". Only supports v1 and v2."))}}(r,e,A,n),Oe("glTF"===r.type,"Invalid GLB magic string ".concat(r.type)),t._glb=r,t.json=r.json}else Oe(!1,"GLTF: must be ArrayBuffer or string");var i=t.json.buffers||[];if(t.buffers=new Array(i.length).fill(null),t._glb&&t._glb.header.hasBinChunk){var o=t._glb.binChunks;t.buffers[0]={arrayBuffer:o[0].arrayBuffer,byteOffset:o[0].byteOffset,byteLength:o[0].byteLength}}var a=t.json.images||[];t.images=new Array(a.length).fill({})}function Un(t,e,A){return Gn.apply(this,arguments)}function Gn(){return(Gn=Object(Xt.a)(qt.a.mark((function t(e,A,n){var r,i,o,a,s,g;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=0;case 1:if(!(r<e.json.buffers.length)){t.next=18;break}if(!(i=e.json.buffers[r]).uri){t.next=15;break}return Oe(o=n.fetch),a=Me(i.uri,A),t.next=9,o(a);case 9:return s=t.sent,t.next=12,s.arrayBuffer();case 12:g=t.sent,e.buffers[r]={arrayBuffer:g,byteOffset:0,byteLength:g.byteLength},delete i.uri;case 15:++r,t.next=1;break;case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Nn(t,e,A){return kn.apply(this,arguments)}function kn(){return(kn=Object(Xt.a)(qt.a.mark((function t(e,A,n){var r,i,o;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=e.json.images||[],i=[],o=0;o<r.length;++o)i.push(xn(e,r[o],o,A,n));return t.next=5,Promise.all(i);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function xn(t,e,A,n,r){return On.apply(this,arguments)}function On(){return(On=Object(Xt.a)(qt.a.mark((function t(e,A,n,r,i){var o,a,s,g,c,I,u;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=i.fetch,a=i.parse,!A.uri){t.next=9;break}return g=Me(A.uri,r),t.next=5,o(g);case 5:return c=t.sent,t.next=8,c.arrayBuffer();case 8:s=t.sent;case 9:return Number.isFinite(A.bufferView)&&(I=Le(e.json,e.buffers,A.bufferView),s=ke(I.buffer,I.byteOffset,I.byteLength)),Oe(s,"glTF image has no data"),t.next=13,a(s,De,{},i);case 13:u=t.sent,e.images[n]=u;case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Mn(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Ln(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Mn(Object(A),!0).forEach((function(e){Object(a.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Mn(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var _n={id:"gltf",name:"glTF",version:"2.3.13",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:function(t){return Tn.apply(this,arguments)},options:{gltf:{normalize:!1,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},baseUri:"",log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}},Jn=_n;function Tn(){return(Tn=Object(Xt.a)(qt.a.mark((function t(e){var A,n,r,i,o,a=arguments;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=a.length>1&&void 0!==a[1]?a[1]:{},n=a.length>2?a[2]:void 0,(A=Ln(Ln({},_n.options),A)).gltf=Ln(Ln({},_n.options.gltf),A.gltf),jn(A),r=A.byteOffset,i=void 0===r?0:r,o={},t.next=9,Sn(o,e,i,A,n);case 9:return t.abrupt("return",t.sent);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function jn(t){"fetchImages"in t&&(t.gltf.loadImages=t.fetchImages),"createImages"in t&&(t.gltf.loadImages=t.createImages),"fetchLinkedResources"in t&&(t.gltf.fetchBuffers=t.fetchLinkedResources),"decompress"in t&&(t.gltf.decompressMeshes=t.decompress),"decompress"in t.gltf&&(t.gltf.decompressMeshes=t.gltf.decompress),"postProcess"in t&&(t.gltf.postProcess=t.postProcess)}function Hn(){return(Hn=Object(Xt.a)(qt.a.mark((function t(e){var A;return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=[],e.scenes.forEach((function(t){t.traverse((function(t){Object.values(t.model.getUniforms()).forEach((function(t){!1===t.loaded&&A.push(t)}))}))})),t.next=4,Yn((function(){return A.some((function(t){return!t.loaded}))}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Yn(t){return Vn.apply(this,arguments)}function Vn(){return(Vn=Object(Xt.a)(qt.a.mark((function t(e){return qt.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e()){t.next=5;break}return t.next=3,new Promise((function(t){return requestAnimationFrame(t)}));case 3:t.next=0;break;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Zn=A(533);function Wn(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Kn(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Wn(Object(A),!0).forEach((function(e){Object(a.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Wn(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Pn(t){var e=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(t){return!1}}();return function(){var A,n=Object(l.a)(t);if(e){var r=Object(l.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(u.a)(this,A)}}A.d(e,"a",(function(){return zn}));var qn=[255,255,255,255],Xn={scenegraph:{type:"object",value:null,async:!0},getScene:function(t){return t&&t.scenes?"object"===Object(C.a)(t.scene)?t.scene:t.scenes[t.scene||0]:t},getAnimator:function(t){return t&&t.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(t){return t.position}},getColor:{type:"accessor",value:qn},_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:[]},loaders:[Jn]},zn=function(t){Object(I.a)(A,t);var e=Pn(A);function A(){return Object(s.a)(this,A),e.apply(this,arguments)}return Object(g.a)(A,[{key:"getShaders",value:function(){var t=[h.a,B.a];return"pbr"===this.props._lighting&&t.push(E.a),{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:t}}},{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:qn,transition:!0},instanceModelMatrix:Zn.a})}},{key:"updateState",value:function(t){Object(c.a)(Object(l.a)(A.prototype),"updateState",this).call(this,t);var e=t.props,n=t.oldProps;e.scenegraph!==n.scenegraph?this._updateScenegraph(e):e._animations!==n._animations&&this._applyAnimationsProp(this.state.scenegraph,this.state.animator,e._animations)}},{key:"finalizeState",value:function(){Object(c.a)(Object(l.a)(A.prototype),"finalizeState",this).call(this),this._deleteScenegraph()}},{key:"_updateScenegraph",value:function(t){var e=this,A=this.context.gl,n=null;if(t.scenegraph instanceof ft)n={scenes:[t.scenegraph]};else if(t.scenegraph&&!t.scenegraph.gltf){var r=t.scenegraph,i=function(t,e,A){var n=new Kt(t,A);return{scenes:n.instantiate(e),animator:n.createAnimator()}}(A,r,this._getModelOptions());n=Object.assign({gltf:r},i),function(t){return Hn.apply(this,arguments)}(i).then((function(){return e.setNeedsRedraw()}))}else t.scenegraph&&(f.a.deprecated("ScenegraphLayer.props.scenegraph","Use GLTFLoader instead of GLTFScenegraphLoader")(),n=t.scenegraph);var o={layer:this,gl:A},a=t.getScene(n,o),s=t.getAnimator(n,o);a instanceof ft?(this._deleteScenegraph(),this._applyAllAttributes(a),this._applyAnimationsProp(a,s,t._animations),this.setState({scenegraph:a,animator:s})):null!==a&&f.a.warn("invalid scenegraph:",a)()}},{key:"_applyAllAttributes",value:function(t){var e=this;if(this.state.attributesAvailable){var A=this.getAttributeManager().getAttributes();t.traverse((function(t){e._setModelAttributes(t.model,A)}))}}},{key:"_applyAnimationsProp",value:function(t,e,A){if(t&&e&&A){var n=e.getAnimations();Object.keys(A).sort().forEach((function(t){var e=A[t];if("*"===t)n.forEach((function(t){Object.assign(t,e)}));else if(Number.isFinite(Number(t))){var r=Number(t);r>=0&&r<n.length?Object.assign(n[r],e):f.a.warn("animation ".concat(t," not found"))()}else{var i=n.find((function(e){return e.name===t}));i?Object.assign(i,e):f.a.warn("animation ".concat(t," not found"))()}}))}}},{key:"_deleteScenegraph",value:function(){var t=this.state.scenegraph;t instanceof ft&&t.delete()}},{key:"_getModelOptions",value:function(){var t=this.props._imageBasedLightingEnvironment,e=null;return t&&(e="function"===typeof t?t({gl:this.context.gl,layer:this}):t),{gl:this.context.gl,waitForFullLoad:!0,imageBasedLightingEnvironment:e,modelOptions:Kn({isInstanced:!0,transpileToGLSL100:!Object(Q.j)(this.context.gl)},this.getShaders()),useTangents:!1}}},{key:"updateAttributes",value:function(t){var e=this;this.setState({attributesAvailable:!0}),this.state.scenegraph&&this.state.scenegraph.traverse((function(A){e._setModelAttributes(A.model,t)}))}},{key:"draw",value:function(t){var e=t.moduleParameters,A=void 0===e?null:e,n=t.parameters,r=void 0===n?{}:n,i=t.context;if(this.state.scenegraph){this.props._animations&&this.state.animator&&(this.state.animator.animate(i.timeline.getTime()),this.setNeedsRedraw());var o=this.context.viewport,a=this.props,s=a.sizeScale,g=a.sizeMinPixels,c=a.sizeMaxPixels,I=a.opacity,u=a.coordinateSystem,l=this.getNumInstances();this.state.scenegraph.traverse((function(t,e){var n=e.worldMatrix;t.model.setInstanceCount(l),t.updateModuleSettings(A),t.draw({parameters:r,uniforms:{sizeScale:s,opacity:I,sizeMinPixels:g,sizeMaxPixels:c,composeModelMatrix:Object(Zn.b)(o,u),sceneModelMatrix:n,u_Camera:t.model.getUniforms().project_uCameraPosition}})}))}}}]),A}(d.a);zn.layerName="ScenegraphLayer",zn.defaultProps=Xn},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(479),c=A(480),I=A(279),u=A(412),l=A(255);function C(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return f}));var h=[0,0,0,255],B={getSourcePosition:{type:"accessor",value:function(t){return t.sourcePosition}},getTargetPosition:{type:"accessor",value:function(t){return t.targetPosition}},getSourceColor:{type:"accessor",value:h},getTargetColor:{type:"accessor",value:h},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}},f=function(t){Object(o.a)(A,t);var e=C(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){return Object(i.a)(Object(s.a)(A.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 bool useShortestPath;\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  if (dh == 0.0) {\n    return sourceZ + deltaZ * ratio;\n  }\n  float unitZ = 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 prevSegmentRatio = getSegmentRatio(max(0.0, segmentIndex - 1.0));\n  float nextSegmentRatio = getSegmentRatio(min(numSegments - 1.0, segmentIndex + 1.0));\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    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    vec3 source_world = instanceSourcePositions;\n    vec3 target_world = instanceTargetPositions;\n    if (useShortestPath) {\n      source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n      target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n\n      float deltaLng = target_world.x - source_world.x;\n      if (deltaLng > 180.) target_world.x -= 360.;\n      if (deltaLng < -180.) source_world.x -= 360.;\n    }\n    source = project_position(source_world, instanceSourcePositions64Low);\n    target = project_position(target_world, instanceTargetPositions64Low);\n    float antiMeridianX = 0.0;\n\n    if (useShortestPath) {\n      if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n        antiMeridianX = -(project_uCoordinateOrigin.x + 180.) / 360. * TILE_SIZE;\n      }\n      float thresholdRatio = (antiMeridianX - source.x) / (target.x - source.x);\n\n      if (prevSegmentRatio <= thresholdRatio && nextSegmentRatio > thresholdRatio) {\n        isValid = 0.0;\n        indexDir = sign(segmentRatio - thresholdRatio);\n        segmentRatio = thresholdRatio;\n      }\n    }\n\n    nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n    vec3 currPos = interpolateFlat(source, target, segmentRatio);\n    vec3 nextPos = interpolateFlat(source, target, nextSegmentRatio);\n\n    if (useShortestPath) {\n      if (nextPos.x < antiMeridianX) {\n        currPos.x += TILE_SIZE;\n        nextPos.x += TILE_SIZE;\n      }\n    }\n\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:[g.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:h},instanceTargetColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getTargetColor",defaultValue:h},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(t){var e=t.props,n=t.oldProps,r=t.changeFlags;if(Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,{props:e,oldProps:n,changeFlags:r}),r.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(t){var e=t.uniforms,A=this.context.viewport,n=this.props,r=n.widthUnits,i=n.widthScale,o=n.widthMinPixels,a=n.widthMaxPixels,s=n.greatCircle,g=n.wrapLongitude,c="pixels"===r?A.metersPerPixel:1;this.state.model.setUniforms(e).setUniforms({greatCircle:s,widthScale:i*c,widthMinPixels:o,widthMaxPixels:a,useShortestPath:g}).draw()}},{key:"_getModel",value:function(t){for(var e=[],A=0;A<50;A++)e=e.concat([A,1,0,A,-1,0]);var n=new u.a(t,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new l.a({drawMode:5,attributes:{positions:new Float32Array(e)}}),isInstanced:!0}));return n.setUniforms({numSegments:50}),n}},{key:"wrapLongitude",get:function(){return!1}}]),A}(I.a);f.layerName="ArcLayer",f.defaultProps=B},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(479),c=A(974),I=A(480),u=A(279),l=A(412),C=A(255);function h(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return Q}));var B=[0,0,0,255],f=[0,0,1],d={sizeUnits:"pixels",pointSize:{type:"number",min:0,value:10},getPosition:{type:"accessor",value:function(t){return t.position}},getNormal:{type:"accessor",value:f},getColor:{type:"accessor",value:B},material:!0,radiusPixels:{deprecatedFor:"pointSize"}};var Q=function(t){Object(o.a)(A,t);var e=h(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){return Object(i.a)(Object(s.a)(A.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:[g.a,c.a,I.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:f},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,transition:!0,accessor:"getColor",defaultValue:B}})}},{key:"updateState",value:function(t){var e=t.props,n=t.oldProps,r=t.changeFlags;if(Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,{props:e,oldProps:n,changeFlags:r}),r.extensionsChanged){var o=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(o)}),this.getAttributeManager().invalidateAll()}r.dataChanged&&function(t){var e=t.header,A=t.attributes;e&&A&&(t.length=e.vertexCount,A.POSITION&&(A.instancePositions=A.POSITION),A.NORMAL&&(A.instanceNormals=A.NORMAL),A.COLOR_0&&(A.instanceColors=A.COLOR_0))}(e.data)}},{key:"draw",value:function(t){var e=t.uniforms,A=this.context.viewport,n=this.props,r=n.pointSize,i="meters"===n.sizeUnits?1/A.metersPerPixel:1;this.state.model.setUniforms(Object.assign({},e,{radiusPixels:r*i})).draw()}},{key:"_getModel",value:function(t){for(var e=[],A=0;A<3;A++){var n=A/3*Math.PI*2;e.push(2*Math.cos(n),2*Math.sin(n),0)}return new l.a(t,Object.assign({},this.getShaders(),{id:this.props.id,geometry:new C.a({drawMode:4,attributes:{positions:new Float32Array(e)}}),isInstanced:!0}))}}]),A}(u.a);Q.layerName="PointCloudLayer",Q.defaultProps=d},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(35),o=A(14),a=A(16),s=A(7),g=A(43),c=A(479),I=A(974),u=A(480),l=A(279),C=A(255),h=A(19),B=A(233),f=A(412),d=A(737),Q=A(385),E=A(533);function p(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}function y(t,e){(t.COLOR_0||t.colors)&&e||(t.colors={constant:!0,value:new Float32Array([1,1,1])}),g.a.assert(t.positions||t.POSITION,'SimpleMeshLayer requires "postions" or "POSITION" attribute in mesh property.')}function v(t,e){if(t.attributes)return y(t.attributes,e),t instanceof C.a?t:new C.a(t);if(t.positions||t.POSITION)return y(t,e),new C.a({attributes:t});throw Error("Invalid mesh")}A.d(e,"a",(function(){return b}));var m={mesh:{value:null,type:"object",async:!0},texture:{type:"image",value:null,async:!0},sizeScale:{type:"number",value:1,min:0},_useMeshColors:{type:"boolean",value:!1},_instanced:!0,wireframe:!1,material:!0,getPosition:{type:"accessor",value:function(t){return t.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:[]}},b=function(t){Object(o.a)(A,t);var e=p(A);function A(){return Object(n.a)(this,A),e.apply(this,arguments)}return Object(r.a)(A,[{key:"getShaders",value:function(){var t=!Object(h.j)(this.context.gl),e={};return Object(d.b)(this.context.gl,Q.a.GLSL_DERIVATIVES)&&(e.DERIVATIVES_AVAILABLE=1),Object(i.a)(Object(s.a)(A.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,I.b,u.a],transpileToGLSL100:t,defines:e})}},{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:E.a}),this.setState({emptyTexture:new B.a(this.context.gl,{data:new Uint8Array(4),width:1,height:1})})}},{key:"updateState",value:function(t){var e=t.props,n=t.oldProps,r=t.changeFlags;if(Object(i.a)(Object(s.a)(A.prototype),"updateState",this).call(this,{props:e,oldProps:n,changeFlags:r}),e.mesh!==n.mesh||r.extensionsChanged){if(this.state.model&&this.state.model.delete(),e.mesh){this.setState({model:this.getModel(e.mesh)});var o=e.mesh.attributes||e.mesh;this.setState({hasNormals:Boolean(o.NORMAL||o.normals)})}this.getAttributeManager().invalidateAll()}e.texture!==n.texture&&this.setTexture(e.texture),this.state.model&&this.state.model.setDrawMode(this.props.wireframe?3:4)}},{key:"finalizeState",value:function(){Object(i.a)(Object(s.a)(A.prototype),"finalizeState",this).call(this),this.state.emptyTexture.delete()}},{key:"draw",value:function(t){var e=t.uniforms;if(this.state.model){var A=this.context.viewport,n=this.props,r=n.sizeScale,i=n.coordinateSystem,o=n._instanced;this.state.model.draw({uniforms:Object.assign({},e,{sizeScale:r,composeModelMatrix:!o||Object(E.b)(A,i),flatShading:!this.state.hasNormals})})}}},{key:"getModel",value:function(t){var e=new f.a(this.context.gl,Object.assign({},this.getShaders(),{id:this.props.id,geometry:v(t,this.props._useMeshColors),isInstanced:!0})),A=this.props.texture,n=this.state.emptyTexture;return e.setUniforms({sampler:A||n,hasTexture:Boolean(A)}),e}},{key:"setTexture",value:function(t){this.context.gl;var e=this.state,A=e.emptyTexture,n=e.model;n&&n.setUniforms({sampler:t||A,hasTexture:Boolean(t)})}}]),A}(l.a);b.layerName="SimpleMeshLayer",b.defaultProps=m},function(t,e,A){"use strict";A.r(e);function n(t,e,A){if(!o(A=A||{}))throw new Error("options is invalid");var n=A.bbox,r=A.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");n&&a(n),r&&s(r);var i={type:"Feature"};return r&&(i.id=r),n&&(i.bbox=n),i.properties=e||{},i.geometry=t,i}function r(t,e,A){if(!t)throw new Error("coordinates is required");for(var r=0;r<t.length;r++){var o=t[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++){if(0===r&&0===a&&!i(o[0][0])||!i(o[0][1]))throw new Error("coordinates must contain numbers");if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}}return n({type:"Polygon",coordinates:t},e,A)}function i(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function o(t){return!!t&&t.constructor===Object}function a(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!i(t))throw new Error("bbox must only contain numbers")}))}function s(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}var g=A(362),c=A(794);function I(t){if(!t)throw new Error("coord is required");if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates;if(Array.isArray(t)&&t.length>=2&&void 0===t[0].length&&void 0===t[1].length)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function u(t){var e=t*Math.PI/180;return Math.tan(e)}e.default=function(t,e,A,n){var a=(n=n||{}).steps||64,s=n.units||"kilometers",l=n.angle||0,C=n.pivot||t,h=n.properties||t.properties||{};if(!t)throw new Error("center is required");if(!e)throw new Error("xSemiAxis is required");if(!A)throw new Error("ySemiAxis is required");if(!o(n))throw new Error("options must be an object");if(!i(a))throw new Error("steps must be a number");if(!i(l))throw new Error("angle must be a number");var B=I(t);if("degrees"===s)var f=function(t){if(null===t||void 0===t)throw new Error("degrees is required");return t%360*Math.PI/180}(l);else e=Object(g.a)(t,e,90,{units:s}),A=Object(g.a)(t,A,0,{units:s}),e=I(e)[0]-B[0],A=I(A)[1]-B[1];for(var d=[],Q=0;Q<a;Q+=1){var E=-360*Q/a,p=e*A/Math.sqrt(Math.pow(A,2)+Math.pow(e,2)*Math.pow(u(E),2)),y=e*A/Math.sqrt(Math.pow(e,2)+Math.pow(A,2)/Math.pow(u(E),2));if(E<-90&&E>=-270&&(p=-p),E<-180&&E>=-360&&(y=-y),"degrees"===s){var v=p*Math.cos(f)+y*Math.sin(f),m=y*Math.cos(f)-p*Math.sin(f);p=v,y=m}d.push([p+B[0],y+B[1]])}return d.push(d[0]),"degrees"===s?r([d],h):Object(c.default)(r([d],h),l,{pivot:C})}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(431),r=A(775),i=A(563),o=A(153);function a(t,e){return!(t[0]>e[0])&&(!(t[2]<e[2])&&(!(t[1]>e[1])&&!(t[3]<e[3])))}function s(t,e){return t[0]===e[0]&&t[1]===e[1]}e.default=function(t,e){var A=o.getType(t),g=o.getType(e),c=o.getGeom(t),I=o.getGeom(e);switch(A){case"Point":switch(g){case"MultiPoint":return function(t,e){var A,n=!1;for(A=0;A<e.coordinates.length;A++)if(s(e.coordinates[A],t.coordinates)){n=!0;break}return n}(c,I);case"LineString":return r.default(c,I,{ignoreEndVertices:!0});case"Polygon":case"MultiPolygon":return i.default(c,I,{ignoreBoundary:!0});default:throw new Error("feature2 "+g+" geometry not supported")}case"MultiPoint":switch(g){case"MultiPoint":return function(t,e){for(var A=0;A<t.coordinates.length;A++){for(var n=!1,r=0;r<e.coordinates.length;r++)s(t.coordinates[A],e.coordinates[r])&&(n=!0);if(!n)return!1}return!0}(c,I);case"LineString":return function(t,e){for(var A=!1,n=0;n<t.coordinates.length;n++){if(!r.default(t.coordinates[n],e))return!1;A||(A=r.default(t.coordinates[n],e,{ignoreEndVertices:!0}))}return A}(c,I);case"Polygon":case"MultiPolygon":return function(t,e){for(var A=!0,n=0;n<t.coordinates.length;n++){var r=i.default(t.coordinates[1],e);if(!r){A=!1;break}r=i.default(t.coordinates[1],e,{ignoreBoundary:!0})}return A&&r}(c,I);default:throw new Error("feature2 "+g+" geometry not supported")}case"LineString":switch(g){case"LineString":return function(t,e){for(var A=0;A<t.coordinates.length;A++)if(!r.default(t.coordinates[A],e))return!1;return!0}(c,I);case"Polygon":case"MultiPolygon":return function(t,e){var A=n.default(e),r=n.default(t);if(!a(A,r))return!1;for(var o=!1,s=0;s<t.coordinates.length-1;s++){if(!i.default(t.coordinates[s],e))return!1;if(o||(o=i.default(t.coordinates[s],e,{ignoreBoundary:!0})),!o){var g=(c=t.coordinates[s],I=t.coordinates[s+1],[(c[0]+I[0])/2,(c[1]+I[1])/2]);o=i.default(g,e,{ignoreBoundary:!0})}}var c,I;return o}(c,I);default:throw new Error("feature2 "+g+" geometry not supported")}case"Polygon":switch(g){case"Polygon":case"MultiPolygon":return function(t,e){var A=n.default(t);if(!a(n.default(e),A))return!1;for(var r=0;r<t.coordinates[0].length;r++)if(!i.default(t.coordinates[0][r],e))return!1;return!0}(c,I);default:throw new Error("feature2 "+g+" geometry not supported")}default:throw new Error("feature1 "+A+" geometry not supported")}}},function(t,e,A){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(A(431)),i=n(A(563)),o=n(A(775)),a=A(153);function s(t,e){var A,n=!1;for(A=0;A<t.coordinates.length;A++)if(B(t.coordinates[A],e.coordinates)){n=!0;break}return n}function g(t,e){for(var A=0,n=e.coordinates;A<n.length;A++){for(var r=n[A],i=!1,o=0,a=t.coordinates;o<a.length;o++){if(B(r,a[o])){i=!0;break}}if(!i)return!1}return!0}function c(t,e){for(var A=!1,n=0,r=e.coordinates;n<r.length;n++){var i=r[n];if(o.default(i,t,{ignoreEndVertices:!0})&&(A=!0),!o.default(i,t))return!1}return!!A}function I(t,e){for(var A=0,n=e.coordinates;A<n.length;A++){var r=n[A];if(!i.default(r,t,{ignoreBoundary:!0}))return!1}return!0}function u(t,e){for(var A=!1,n=0,r=e.coordinates;n<r.length;n++){var i=r[n];if(o.default({type:"Point",coordinates:i},t,{ignoreEndVertices:!0})&&(A=!0),!o.default({type:"Point",coordinates:i},t,{ignoreEndVertices:!1}))return!1}return A}function l(t,e){var A=!1,n=0;if(!h(r.default(t),r.default(e)))return!1;for(;n<e.coordinates.length-1;n++){var o=f(e.coordinates[n],e.coordinates[n+1]);if(i.default({type:"Point",coordinates:o},t,{ignoreBoundary:!0})){A=!0;break}}return A}function C(t,e){if("Feature"===t.type&&null===t.geometry)return!1;if("Feature"===e.type&&null===e.geometry)return!1;if(!h(r.default(t),r.default(e)))return!1;for(var A=0,n=a.getGeom(e).coordinates;A<n.length;A++)for(var o=0,s=n[A];o<s.length;o++){var g=s[o];if(!i.default(g,t))return!1}return!0}function h(t,e){return!(t[0]>e[0])&&(!(t[2]<e[2])&&(!(t[1]>e[1])&&!(t[3]<e[3])))}function B(t,e){return t[0]===e[0]&&t[1]===e[1]}function f(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}e.default=function(t,e){var A=a.getGeom(t),n=a.getGeom(e),r=a.getType(t),h=a.getType(e),f=a.getCoords(t),d=a.getCoords(e);switch(r){case"Point":switch(h){case"Point":return B(f,d);default:throw new Error("feature2 "+h+" geometry not supported")}case"MultiPoint":switch(h){case"Point":return s(A,n);case"MultiPoint":return g(A,n);default:throw new Error("feature2 "+h+" geometry not supported")}case"LineString":switch(h){case"Point":return o.default(n,A,{ignoreEndVertices:!0});case"LineString":return u(A,n);case"MultiPoint":return c(A,n);default:throw new Error("feature2 "+h+" geometry not supported")}case"Polygon":switch(h){case"Point":return i.default(n,A,{ignoreBoundary:!0});case"LineString":return l(A,n);case"Polygon":return C(A,n);case"MultiPoint":return I(A,n);default:throw new Error("feature2 "+h+" geometry not supported")}default:throw new Error("feature1 "+r+" geometry not supported")}},e.isPointInMultiPoint=s,e.isMultiPointInMultiPoint=g,e.isMultiPointOnLine=c,e.isMultiPointInPoly=I,e.isLineOnLine=u,e.isLineInPoly=l,e.isPolyInPoly=C,e.doBBoxOverlap=h,e.compareCoords=B,e.getMidpoint=f},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(202),r=A(153),i=A(989),o=A(599),a=A(1005);e.default=function(t,e){if(!t)throw new Error("feature1 is required");if(!e)throw new Error("feature2 is required");var A=r.getType(t);if(A!==r.getType(e))throw new Error("features must be of the same type");if("Point"===A)throw new Error("Point geometry not supported");if(new a({precision:6}).compare(t,e))return!1;var s=0;switch(A){case"MultiPoint":var g=n.coordAll(t),c=n.coordAll(e);g.forEach((function(t){c.forEach((function(e){t[0]===e[0]&&t[1]===e[1]&&s++}))}));break;case"LineString":case"MultiLineString":n.segmentEach(t,(function(t){n.segmentEach(e,(function(e){i.default(t,e).features.length&&s++}))}));break;case"Polygon":case"MultiPolygon":n.segmentEach(t,(function(t){n.segmentEach(e,(function(e){o.default(t,e).features.length&&s++}))}))}return s>0}},function(t,e){function A(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=A=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=A=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),A(e)}t.exports=A,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,A){"use strict";t.exports=r;var n=A(572);function r(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var i="undefined"===typeof TextDecoder?null:new TextDecoder("utf8");function o(t){return t.type===r.Bytes?t.readVarint()+t.pos:t.pos+1}function a(t,e,A){return A?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function s(t,e,A){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));A.realloc(n);for(var r=A.pos-1;r>=t;r--)A.buf[r+n]=A.buf[r]}function g(t,e){for(var A=0;A<t.length;A++)e.writeVarint(t[A])}function c(t,e){for(var A=0;A<t.length;A++)e.writeSVarint(t[A])}function I(t,e){for(var A=0;A<t.length;A++)e.writeFloat(t[A])}function u(t,e){for(var A=0;A<t.length;A++)e.writeDouble(t[A])}function l(t,e){for(var A=0;A<t.length;A++)e.writeBoolean(t[A])}function C(t,e){for(var A=0;A<t.length;A++)e.writeFixed32(t[A])}function h(t,e){for(var A=0;A<t.length;A++)e.writeSFixed32(t[A])}function B(t,e){for(var A=0;A<t.length;A++)e.writeFixed64(t[A])}function f(t,e){for(var A=0;A<t.length;A++)e.writeSFixed64(t[A])}function d(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Q(t,e,A){t[A]=e,t[A+1]=e>>>8,t[A+2]=e>>>16,t[A+3]=e>>>24}function E(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,e,A){for(A=A||this.length;this.pos<A;){var n=this.readVarint(),r=n>>3,i=this.pos;this.type=7&n,t(r,e,this),this.pos===i&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=d(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=E(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=d(this.buf,this.pos)+4294967296*d(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=d(this.buf,this.pos)+4294967296*E(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,A,n=this.buf;return e=127&(A=n[this.pos++]),A<128?e:(e|=(127&(A=n[this.pos++]))<<7,A<128?e:(e|=(127&(A=n[this.pos++]))<<14,A<128?e:(e|=(127&(A=n[this.pos++]))<<21,A<128?e:function(t,e,A){var n,r,i=A.buf;if(r=i[A.pos++],n=(112&r)>>4,r<128)return a(t,n,e);if(r=i[A.pos++],n|=(127&r)<<3,r<128)return a(t,n,e);if(r=i[A.pos++],n|=(127&r)<<10,r<128)return a(t,n,e);if(r=i[A.pos++],n|=(127&r)<<17,r<128)return a(t,n,e);if(r=i[A.pos++],n|=(127&r)<<24,r<128)return a(t,n,e);if(r=i[A.pos++],n|=(1&r)<<31,r<128)return a(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(A=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2===1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&i?function(t,e,A){return i.decode(t.subarray(e,A))}(this.buf,e,t):function(t,e,A){var n="",r=e;for(;r<A;){var i,o,a,s=t[r],g=null,c=s>239?4:s>223?3:s>191?2:1;if(r+c>A)break;1===c?s<128&&(g=s):2===c?128===(192&(i=t[r+1]))&&(g=(31&s)<<6|63&i)<=127&&(g=null):3===c?(i=t[r+1],o=t[r+2],128===(192&i)&&128===(192&o)&&((g=(15&s)<<12|(63&i)<<6|63&o)<=2047||g>=55296&&g<=57343)&&(g=null)):4===c&&(i=t[r+1],o=t[r+2],a=t[r+3],128===(192&i)&&128===(192&o)&&128===(192&a)&&((g=(15&s)<<18|(63&i)<<12|(63&o)<<6|63&a)<=65535||g>=1114112)&&(g=null)),null===g?(g=65533,c=1):g>65535&&(g-=65536,n+=String.fromCharCode(g>>>10&1023|55296),g=56320|1023&g),n+=String.fromCharCode(g),r+=c}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==r.Bytes)return t.push(this.readVarint(e));var A=o(this);for(t=t||[];this.pos<A;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==r.Bytes)return t.push(this.readSVarint());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==r.Bytes)return t.push(this.readBoolean());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==r.Bytes)return t.push(this.readFloat());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==r.Bytes)return t.push(this.readDouble());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed32());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed32());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readFixed64());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==r.Bytes)return t.push(this.readSFixed64());var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===r.Varint)for(;this.buf[this.pos++]>127;);else if(e===r.Bytes)this.pos=this.readVarint()+this.pos;else if(e===r.Fixed32)this.pos+=4;else{if(e!==r.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var A=new Uint8Array(e);A.set(this.buf),this.buf=A,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Q(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Q(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Q(this.buf,-1&t,this.pos),Q(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Q(this.buf,-1&t,this.pos),Q(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var A,n;t>=0?(A=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(A=~(-t%4294967296))?A=A+1|0:(A=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,A){A.buf[A.pos++]=127&t|128,t>>>=7,A.buf[A.pos++]=127&t|128,t>>>=7,A.buf[A.pos++]=127&t|128,t>>>=7,A.buf[A.pos++]=127&t|128,t>>>=7,A.buf[A.pos]=127&t}(A,0,e),function(t,e){var A=(7&t)<<4;if(e.buf[e.pos++]|=A|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,A){for(var n,r,i=0;i<e.length;i++){if((n=e.charCodeAt(i))>55295&&n<57344){if(!r){n>56319||i+1===e.length?(t[A++]=239,t[A++]=191,t[A++]=189):r=n;continue}if(n<56320){t[A++]=239,t[A++]=191,t[A++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[A++]=239,t[A++]=191,t[A++]=189,r=null);n<128?t[A++]=n:(n<2048?t[A++]=n>>6|192:(n<65536?t[A++]=n>>12|224:(t[A++]=n>>18|240,t[A++]=n>>12&63|128),t[A++]=n>>6&63|128),t[A++]=63&n|128)}return A}(this.buf,t,this.pos);var A=this.pos-e;A>=128&&s(e,A,this),this.pos=e-1,this.writeVarint(A),this.pos+=A},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var A=0;A<e;A++)this.buf[this.pos++]=t[A]},writeRawMessage:function(t,e){this.pos++;var A=this.pos;t(e,this);var n=this.pos-A;n>=128&&s(A,n,this),this.pos=A-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,A){this.writeTag(t,r.Bytes),this.writeRawMessage(e,A)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,g,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,c,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,l,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,I,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,u,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,C,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,h,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,B,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,f,e)},writeBytesField:function(t,e){this.writeTag(t,r.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,r.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,r.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,r.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,r.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,r.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,r.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e,A){"use strict";function n(t,e){this.x=t,this.y=e}t.exports=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,A=t.y-this.y;return e*e+A*A},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,A=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=A,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),A=Math.sin(t),n=e*this.x-A*this.y,r=A*this.x+e*this.y;return this.x=n,this.y=r,this},_rotateAround:function(t,e){var A=Math.cos(t),n=Math.sin(t),r=e.x+A*(this.x-e.x)-n*(this.y-e.y),i=e.y+n*(this.x-e.x)+A*(this.y-e.y);return this.x=r,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t}},function(t,e){function A(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=A=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=A=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),A(e)}t.exports=A,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(568);function r(t,e){if(t){if("string"===typeof t)return Object(n.a)(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Object(n.a)(t,e):void 0}}},function(t,e){function A(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=A=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=A=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),A(e)}t.exports=A,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,A){t.exports=function(t){"use strict";return function(t){if("number"!==typeof t)throw new TypeError("Expected a number");if(t>1e19)throw new RangeError("Input expected to be < 1e19");if(t<-1e19)throw new RangeError("Input expected to be > 1e19");if(Math.abs(t)<1e3)return t;var e,A,n,r=t<0?"-":"",i={K:6,M:9,B:12,T:16};for(var o in t=Math.abs(t),A=(n=Math.floor(t).toString().length)%3===0?n-3:n-n%3,e=Math.round(t/Math.pow(10,A)*10)/10,i)if(A<i[o]){e+=o;break}return r+e}}()},function(t,e,A){"use strict";A.d(e,"b",(function(){return l})),A.d(e,"a",(function(){return h})),A.d(e,"c",(function(){return B}));var n,r,i=0,o=0,a=0,s=0,g=0,c=0,I="object"===typeof performance&&performance.now?performance:Date,u="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function l(){return g||(u(C),g=I.now()+c)}function C(){g=0}function h(){this._call=this._time=this._next=null}function B(t,e,A){var n=new h;return n.restart(t,e,A),n}function f(){g=(s=I.now())+c,i=o=0;try{!function(){l(),++i;for(var t,e=n;e;)(t=g-e._time)>=0&&e._call.call(null,t),e=e._next;--i}()}finally{i=0,function(){var t,e,A=n,i=1/0;for(;A;)A._call?(i>A._time&&(i=A._time),t=A,A=A._next):(e=A._next,A._next=null,A=t?t._next=e:n=e);r=t,Q(i)}(),g=0}}function d(){var t=I.now(),e=t-s;e>1e3&&(c-=e,s=t)}function Q(t){i||(o&&(o=clearTimeout(o)),t-g>24?(t<1/0&&(o=setTimeout(f,t-I.now()-c)),a&&(a=clearInterval(a))):(a||(s=I.now(),a=setInterval(d,1e3)),i=1,u(f)))}h.prototype=B.prototype={constructor:h,restart:function(t,e,A){if("function"!==typeof t)throw new TypeError("callback is not a function");A=(null==A?l():+A)+(null==e?0:+e),this._next||r===this||(r?r._next=this:n=this,r=this),this._call=t,this._time=A,Q()},stop:function(){this._call&&(this._call=null,this._time=1/0,Q())}}},function(t,e,A){"use strict";var n={value:function(){}};function r(){for(var t,e=0,A=arguments.length,n={};e<A;++e){if(!(t=arguments[e]+"")||t in n||/[\s.]/.test(t))throw new Error("illegal type: "+t);n[t]=[]}return new i(n)}function i(t){this._=t}function o(t,e){return t.trim().split(/^|\s+/).map((function(t){var A="",n=t.indexOf(".");if(n>=0&&(A=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:A}}))}function a(t,e){for(var A,n=0,r=t.length;n<r;++n)if((A=t[n]).name===e)return A.value}function s(t,e,A){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=n,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=A&&t.push({name:e,value:A}),t}i.prototype=r.prototype={constructor:i,on:function(t,e){var A,n=this._,r=o(t+"",n),i=-1,g=r.length;if(!(arguments.length<2)){if(null!=e&&"function"!==typeof e)throw new Error("invalid callback: "+e);for(;++i<g;)if(A=(t=r[i]).type)n[A]=s(n[A],t.name,e);else if(null==e)for(A in n)n[A]=s(n[A],t.name,null);return this}for(;++i<g;)if((A=(t=r[i]).type)&&(A=a(n[A],t.name)))return A},copy:function(){var t={},e=this._;for(var A in e)t[A]=e[A].slice();return new i(t)},call:function(t,e){if((A=arguments.length-2)>0)for(var A,n,r=new Array(A),i=0;i<A;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,A=(n=this._[t]).length;i<A;++i)n[i].value.apply(e,r)},apply:function(t,e,A){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],r=0,i=n.length;r<i;++r)n[r].value.apply(e,A)}};var g=r,c=A(878),I=4294967296;function u(t){return t.x}function l(t){return t.y}A.d(e,"b",(function(){return u})),A.d(e,"c",(function(){return l}));var C=Math.PI*(3-Math.sqrt(5));e.a=function(t){var e,A=1,n=.001,r=1-Math.pow(n,1/300),i=0,o=.6,a=new Map,s=Object(c.c)(h),u=g("tick","end"),l=function(){var t=1;return function(){return(t=(1664525*t+1013904223)%I)/I}}();function h(){B(),u.call("tick",e),A<n&&(s.stop(),u.call("end",e))}function B(n){var s,g,c=t.length;void 0===n&&(n=1);for(var I=0;I<n;++I)for(A+=(i-A)*r,a.forEach((function(t){t(A)})),s=0;s<c;++s)null==(g=t[s]).fx?g.x+=g.vx*=o:(g.x=g.fx,g.vx=0),null==g.fy?g.y+=g.vy*=o:(g.y=g.fy,g.vy=0);return e}function f(){for(var e,A=0,n=t.length;A<n;++A){if((e=t[A]).index=A,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var r=10*Math.sqrt(.5+A),i=A*C;e.x=r*Math.cos(i),e.y=r*Math.sin(i)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t,l),e}return null==t&&(t=[]),f(),e={tick:B,restart:function(){return s.restart(h),e},stop:function(){return s.stop(),e},nodes:function(A){return arguments.length?(t=A,f(),a.forEach(d),e):t},alpha:function(t){return arguments.length?(A=+t,e):A},alphaMin:function(t){return arguments.length?(n=+t,e):n},alphaDecay:function(t){return arguments.length?(r=+t,e):+r},alphaTarget:function(t){return arguments.length?(i=+t,e):i},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},randomSource:function(t){return arguments.length?(l=t,a.forEach(d),e):l},force:function(t,A){return arguments.length>1?(null==A?a.delete(t):a.set(t,d(A)),e):a.get(t)},find:function(e,A,n){var r,i,o,a,s,g=0,c=t.length;for(null==n?n=1/0:n*=n,g=0;g<c;++g)(o=(r=e-(a=t[g]).x)*r+(i=A-a.y)*i)<n&&(s=a,n=o);return s},on:function(t,A){return arguments.length>1?(u.on(t,A),e):u.on(t)}}}},function(t){t.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,"oneOf":[{"required":["scale","translate"]},{"required":["matrix"]}],"properties":{"scale":{"type":"number"},"translate":{"type":"object","additionalProperties":false,"required":["y","x"],"properties":{"y":{"type":"number"},"x":{"type":"number"}}},"matrix":{"type":"array","items":{"type":"number"},"minItems":16,"maxItems":16}}},"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,"anyOf":[{"required":["dimensions","isPyramid"]},{"required":["transform"]},{"required":["omeTiffOffsetsUrl"]},{"required":["isBitmask"]}],"properties":{"dimensions":{"$ref":"#/definitions/dimensions"},"isPyramid":{"type":"boolean"},"transform":{"$ref":"#/definitions/transform"},"isBitmask":{"type":"boolean"},"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"},"usePhysicalSizeScaling":{"type":"boolean","description":"Default is false: passing true in will infer scaling from the reported physcial size"},"renderLayers":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"$ref":"#/definitions/image"}}}}')},function(t,e,A){"use strict";var n=A(30),r=A(10),i=A(0),o=(A(25),A(32)),a=A(41),s=A(66),g=A(86),c=A(605),I=A(531),u=i.forwardRef((function(t,e){var A,a=t.align,g=void 0===a?"inherit":a,u=t.classes,l=t.className,C=t.component,h=t.padding,B=t.scope,f=t.size,d=t.sortDirection,Q=t.variant,E=Object(n.a)(t,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),p=i.useContext(c.a),y=i.useContext(I.a);A=C||(y&&"head"===y.variant?"th":"td");var v=B;!v&&y&&"head"===y.variant&&(v="col");var m=h||(p&&p.padding?p.padding:"default"),b=f||(p&&p.size?p.size:"medium"),F=Q||y&&y.variant,w=null;return d&&(w="asc"===d?"ascending":"descending"),i.createElement(A,Object(r.a)({ref:e,className:Object(o.a)(u.root,u[F],l,"inherit"!==g&&u["align".concat(Object(s.a)(g))],"default"!==m&&u["padding".concat(Object(s.a)(m))],"medium"!==b&&u["size".concat(Object(s.a)(b))],"head"===F&&p&&p.stickyHeader&&u.stickyHeader),"aria-sort":w,scope:v},E))}));e.a=Object(a.a)((function(t){return{root:Object(r.a)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n    ".concat("light"===t.palette.type?Object(g.d)(Object(g.b)(t.palette.divider,1),.88):Object(g.a)(Object(g.b)(t.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:t.palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},body:{color:t.palette.text.primary},footer:{color:t.palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.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:t.palette.background.default}}}),{name:"MuiTableCell"})(u)},,,,,,,,,,,,,,,,,,,,,,function(t,e,A){"use strict";A.d(e,"a",(function(){return r}));var n=A(10);function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.baseClasses,A=t.newClasses;t.Component;if(!A)return e;var r=Object(n.a)({},e);return Object.keys(A).forEach((function(t){A[t]&&(r[t]="".concat(e[t]," ").concat(A[t]))})),r}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(418),r=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.disableGlobal,A=void 0!==e&&e,i=t.productionPrefix,o=void 0===i?"jss":i,a=t.seed,s=void 0===a?"":a,g=""===s?"":"".concat(s,"-"),c=0;return function(t,e){c+=1;var i=e.options.name;if(i&&0===i.indexOf("Mui")&&!e.options.link&&!A){if(-1!==r.indexOf(t.key))return"Mui-".concat(t.key);var a="".concat(g).concat(i,"-").concat(t.key);return e.options.theme[n.a]&&""===s?"".concat(a,"-").concat(c):a}return"".concat(g).concat(o).concat(c)}}},function(t,e,A){"use strict";function n(t){var e=t.theme,A=t.name,n=t.props;if(!e||!e.props||!e.props[A])return n;var r,i=e.props[A];for(r in i)void 0===n[r]&&(n[r]=i[r]);return n}A.d(e,"a",(function(){return n}))},function(t,e,A){"use strict";var n=A(0),r=A(68),i=(A(25),A(122)),o=A(64);var a="undefined"!==typeof window?n.useLayoutEffect:n.useEffect,s=n.forwardRef((function(t,e){var A=t.children,s=t.container,g=t.disablePortal,c=void 0!==g&&g,I=t.onRendered,u=n.useState(null),l=u[0],C=u[1],h=Object(o.a)(n.isValidElement(A)?A.ref:null,e);return a((function(){c||C(function(t){return t="function"===typeof t?t():t,r.findDOMNode(t)}(s)||document.body)}),[s,c]),a((function(){if(l&&!c)return Object(i.a)(e,l),function(){Object(i.a)(e,null)}}),[e,l,c]),a((function(){I&&(l||c)&&I()}),[I,l,c]),c?n.isValidElement(A)?n.cloneElement(A,{ref:h}):A:l?r.createPortal(A,l):l}));e.a=s},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=(A(25),A(32)),a=A(41),s=A(86),g=A(594),c=A(66),I=i.forwardRef((function(t,e){var A=t.edge,a=void 0!==A&&A,s=t.children,I=t.classes,u=t.className,l=t.color,C=void 0===l?"default":l,h=t.disabled,B=void 0!==h&&h,f=t.disableFocusRipple,d=void 0!==f&&f,Q=t.size,E=void 0===Q?"medium":Q,p=Object(r.a)(t,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return i.createElement(g.a,Object(n.a)({className:Object(o.a)(I.root,u,"default"!==C&&I["color".concat(Object(c.a)(C))],B&&I.disabled,"small"===E&&I["size".concat(Object(c.a)(E))],{start:I.edgeStart,end:I.edgeEnd}[a]),centerRipple:!0,focusRipple:!d,disabled:B,ref:e},p),i.createElement("span",{className:I.label},s))}));e.a=Object(a.a)((function(t){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(s.b)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:t.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:Object(s.b)(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:Object(s.b)(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:t.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(I)},function(t,e){t.exports=function(t,e,A){return t===t&&(void 0!==A&&(t=t<=A?t:A),void 0!==e&&(t=t>=e?t:e)),t}},function(t,e,A){"use strict";var n=A(1170),r=A(221),i=A(722),o=A(1060),a=A(1172);function s(t,e,A){var n=this._refs[A];if("string"==typeof n){if(!this._refs[n])return s.call(this,t,e,n);n=this._refs[n]}if((n=n||this._schemas[A])instanceof o)return C(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var r,i,a,c=g.call(this,e,A);return c&&(r=c.schema,e=c.root,a=c.baseId),r instanceof o?i=r.validate||t.call(this,r.schema,e,void 0,a):void 0!==r&&(i=C(r,this._opts.inlineRefs)?r:t.call(this,r,e,void 0,a)),i}function g(t,e){var A=n.parse(e),r=B(A),i=h(this._getId(t.schema));if(0===Object.keys(t.schema).length||r!==i){var a=d(r),s=this._refs[a];if("string"==typeof s)return c.call(this,t,s,A);if(s instanceof o)s.validate||this._compile(s),t=s;else{if(!((s=this._schemas[a])instanceof o))return;if(s.validate||this._compile(s),a==d(e))return{schema:s,root:t,baseId:i};t=s}if(!t.schema)return;i=h(this._getId(t.schema))}return u.call(this,A,i,t.schema,t)}function c(t,e,A){var n=g.call(this,t,e);if(n){var r=n.schema,i=n.baseId;t=n.root;var o=this._getId(r);return o&&(i=Q(i,o)),u.call(this,A,i,r,t)}}t.exports=s,s.normalizeId=d,s.fullPath=h,s.url=Q,s.ids=function(t){var e=d(this._getId(t)),A={"":e},o={"":h(e,!1)},s={},g=this;return a(t,{allKeys:!0},(function(t,e,a,c,I,u,l){if(""!==e){var C=g._getId(t),h=A[c],B=o[c]+"/"+I;if(void 0!==l&&(B+="/"+("number"==typeof l?l:i.escapeFragment(l))),"string"==typeof C){C=h=d(h?n.resolve(h,C):C);var f=g._refs[C];if("string"==typeof f&&(f=g._refs[f]),f&&f.schema){if(!r(t,f.schema))throw new Error('id "'+C+'" resolves to more than one schema')}else if(C!=d(B))if("#"==C[0]){if(s[C]&&!r(t,s[C]))throw new Error('id "'+C+'" resolves to more than one schema');s[C]=t}else g._refs[C]=B}A[e]=h,o[e]=B}})),s},s.inlineRef=C,s.schema=g;var I=i.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function u(t,e,A,n){if(t.fragment=t.fragment||"","/"==t.fragment.slice(0,1)){for(var r=t.fragment.split("/"),o=1;o<r.length;o++){var a=r[o];if(a){if(void 0===(A=A[a=i.unescapeFragment(a)]))break;var s;if(!I[a]&&((s=this._getId(A))&&(e=Q(e,s)),A.$ref)){var c=Q(e,A.$ref),u=g.call(this,n,c);u&&(A=u.schema,n=u.root,e=u.baseId)}}}return void 0!==A&&A!==n.schema?{schema:A,root:n,baseId:e}:void 0}}var l=i.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function C(t,e){return!1!==e&&(void 0===e||!0===e?function t(e){var A;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if("object"==typeof(A=e[n])&&!t(A))return!1}else for(var r in e){if("$ref"==r)return!1;if("object"==typeof(A=e[r])&&!t(A))return!1}return!0}(t):e?function t(e){var A,n=0;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if("object"==typeof(A=e[r])&&(n+=t(A)),n==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if(l[i])n++;else if("object"==typeof(A=e[i])&&(n+=t(A)+1),n==1/0)return 1/0}return n}(t)<=e:void 0)}function h(t,e){return!1!==e&&(t=d(t)),B(n.parse(t))}function B(t){return n.serialize(t).split("#")[0]+"#"}var f=/#\/?$/;function d(t){return t?t.replace(f,""):""}function Q(t,e){return e=d(e),n.resolve(t,e)}},function(t,e,A){"use strict";var n=A(909);function r(t,e,A){this.message=A||r.message(t,e),this.missingRef=n.url(t,e),this.missingSchema=n.normalizeId(n.fullPath(this.missingRef))}function i(t){return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}t.exports={Validation:i((function(t){this.message="validation failed",this.errors=t,this.ajv=this.validation=!0})),MissingRef:i(r)},r.message=function(t,e){return"can't resolve reference "+e+" from id "+t}},function(t,e,A){var n=A(912);t.exports=function(t,e,A){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:A,writable:!0}):t[e]=A}},function(t,e,A){var n=A(208),r=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();t.exports=r},function(t,e,A){var n=A(588)(Object.getPrototypeOf,Object);t.exports=n},function(t,e,A){var n=A(583);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,A){var n=A(725);t.exports=function(t,e){if(!n(t))return t;var A,r;if(e&&"function"==typeof(A=t.toString)&&!n(r=A.call(t)))return r;if("function"==typeof(A=t.valueOf)&&!n(r=A.call(t)))return r;if(!e&&"function"==typeof(A=t.toString)&&!n(r=A.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},function(t,e){var A=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:A)(t)}},function(t,e,A){var n=A(919)("keys"),r=A(813);t.exports=function(t){return n[t]||(n[t]=r(t))}},function(t,e,A){var n=A(560),r=A(559),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:n.version,mode:A(812)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,A){var n=A(916);t.exports=function(t){return Object(n(t))}},function(t,e){t.exports={}},function(t,e,A){var n=A(791),r=A(1252),i=A(920),o=A(918)("IE_PROTO"),a=function(){},s=function(){var t,e=A(1085)("iframe"),n=i.length;for(e.style.display="none",A(1253).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;n--;)delete s.prototype[i[n]];return s()};t.exports=Object.create||function(t,e){var A;return null!==t?(a.prototype=n(t),A=new a,a.prototype=null,A[o]=t):A=s(),void 0===e?A:r(A,e)}},function(t,e,A){var n=A(590).f,r=A(591),i=A(727)("toStringTag");t.exports=function(t,e,A){t&&!r(t=A?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,A){e.f=A(727)},function(t,e,A){var n=A(559),r=A(560),i=A(812),o=A(926),a=A(590).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=i?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:o.f(t)})}},function(t,e,A){var n=A(1095),r=A(1097);t.exports=function(t,e){return t&&n(t,r(e))}},function(t,e,A){var n=A(212),r=A(537),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var A=typeof t;return!("number"!=A&&"symbol"!=A&&"boolean"!=A&&null!=t&&!r(t))||(o.test(t)||!i.test(t)||null!=e&&t in Object(e))}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkboard=void 0;var n=o(A(0)),r=o(A(134)),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}(A(1307));function o(t){return t&&t.__esModule?t:{default:t}}var a=e.Checkboard=function(t){var e=t.white,A=t.grey,o=t.size,a=t.renderers,s=t.borderRadius,g=t.boxShadow,c=(0,r.default)({default:{grid:{borderRadius:s,boxShadow:g,absolute:"0px 0px 0px 0px",background:"url("+i.get(e,A,o,a.canvas)+") center left"}}});return n.default.createElement("div",{style:c.grid})};a.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},e.default=a},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function A(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&A(t.prototype,e),n&&A(t,n),t}},function(t,e){var A=/^[0-9]+$/,n=function(t,e){var n=A.test(t),r=A.test(e);return n&&r&&(t=+t,e=+e),t===e?0:n&&!r?-1:r&&!n?1:t<e?-1:1};t.exports={compareIdentifiers:n,rcompareIdentifiers:function(t,e){return n(e,t)}}},function(t,e,A){var n=A(433);t.exports=function(t,e,A){return 0===n(t,e,A)}},function(t,e,A){var n=A(347);t.exports=function(t,e,A){var r=new n(t,A),i=new n(e,A);return r.compare(i)||r.compareBuild(i)}},function(t,e,A){var n=A(433);t.exports=function(t,e,A){return n(t,e,A)<0}},function(t,e,A){var n=A(433);t.exports=function(t,e,A){return n(t,e,A)>=0}},function(t,e,A){var n=A(433);t.exports=function(t,e,A){return n(t,e,A)<=0}},function(t,e,A){var n=A(347),r=A(819),i=r.ANY,o=A(434),a=A(820),s=A(818),g=A(936),c=A(938),I=A(937);t.exports=function(t,e,A,u){var l,C,h,B,f;switch(t=new n(t,u),e=new o(e,u),A){case">":l=s,C=c,h=g,B=">",f=">=";break;case"<":l=g,C=I,h=s,B="<",f="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(t,e,u))return!1;for(var d=function(A){var n=e.set[A],o=null,a=null;return n.forEach((function(t){t.semver===i&&(t=new r(">=0.0.0")),o=o||t,a=a||t,l(t.semver,o.semver,u)?o=t:h(t.semver,a.semver,u)&&(a=t)})),o.operator===B||o.operator===f?{v:!1}:a.operator&&a.operator!==B||!C(t,a.semver)?a.operator===f&&h(t,a.semver)?{v:!1}:void 0:{v:!1}},Q=0;Q<e.set.length;++Q){var E=d(Q);if("object"===typeof E)return E.v}return!0}},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=A.n(i),a=(A(25),A(904)),s=A(91),g=Date.now(),c="fnValues"+g,I="fnStyle"+ ++g;var u=function(){return{onCreateRule:function(t,e,A){if("function"!==typeof e)return null;var n=Object(s.c)(t,{},A);return n[I]=e,n},onProcessStyle:function(t,e){if(c in e||I in e)return t;var A={};for(var n in t){var r=t[n];"function"===typeof r&&(delete t[n],A[n]=r)}return e[c]=A,t},onUpdate:function(t,e,A,n){var r=e,i=r[I];i&&(r.style=i(t)||{});var o=r[c];if(o)for(var a in o)r.prop(a,o[a](t),n)}}},l="@global",C=function(){function t(t,e,A){for(var r in this.type="global",this.at=l,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=t,this.options=A,this.rules=new s.a(Object(n.a)({},A,{parent:this})),e)this.rules.add(r,e[r]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.addRule=function(t,e,A){var n=this.rules.add(t,e,A);return this.options.jss.plugins.onProcessRule(n),n},e.indexOf=function(t){return this.rules.indexOf(t)},e.toString=function(){return this.rules.toString()},t}(),h=function(){function t(t,e,A){this.type="global",this.at=l,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=t,this.options=A;var r=t.substr("@global ".length);this.rule=A.jss.createRule(r,e,Object(n.a)({},A,{parent:this}))}return t.prototype.toString=function(t){return this.rule?this.rule.toString(t):""},t}(),B=/\s*,\s*/g;function f(t,e){for(var A=t.split(B),n="",r=0;r<A.length;r++)n+=e+" "+A[r].trim(),A[r+1]&&(n+=", ");return n}var d=function(){return{onCreateRule:function(t,e,A){if(!t)return null;if(t===l)return new C(t,e,A);if("@"===t[0]&&"@global "===t.substr(0,"@global ".length))return new h(t,e,A);var n=A.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(A.scoped=!1),!1===A.scoped&&(A.selector=t),null},onProcessRule:function(t){"style"===t.type&&(function(t){var e=t.options,A=t.style,r=A?A[l]:null;if(r){for(var i in r)e.sheet.addRule(i,r[i],Object(n.a)({},e,{selector:f(i,t.selector)}));delete A[l]}}(t),function(t){var e=t.options,A=t.style;for(var r in A)if("@"===r[0]&&r.substr(0,l.length)===l){var i=f(r.substr(l.length),t.selector);e.sheet.addRule(i,A[r],Object(n.a)({},e,{selector:i})),delete A[r]}}(t))}}},Q=/\s*,\s*/g,E=/&/g,p=/\$([\w-]+)/g;var y=function(){function t(t,e){return function(A,n){var r=t.getRule(n)||e&&e.getRule(n);return r?(r=r).selector:n}}function e(t,e){for(var A=e.split(Q),n=t.split(Q),r="",i=0;i<A.length;i++)for(var o=A[i],a=0;a<n.length;a++){var s=n[a];r&&(r+=", "),r+=-1!==s.indexOf("&")?s.replace(E,o):o+" "+s}return r}function A(t,e,A){if(A)return Object(n.a)({},A,{index:A.index+1});var r=t.options.nestingLevel;r=void 0===r?1:r+1;var i=Object(n.a)({},t.options,{nestingLevel:r,index:e.indexOf(t)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,g=i,c=g.options.parent;for(var I in r){var u=-1!==I.indexOf("&"),l="@"===I[0];if(u||l){if(a=A(g,c,a),u){var C=e(I,g.selector);s||(s=t(c,o)),C=C.replace(p,s),c.addRule(C,r[I],Object(n.a)({},a,{selector:C}))}else l&&c.addRule(I,{},a).addRule(g.key,r[I],{selector:g.selector});delete r[I]}}return r}}},v=/[A-Z]/g,m=/^ms-/,b={};function F(t){return"-"+t.toLowerCase()}var w=function(t){if(b.hasOwnProperty(t))return b[t];var e=t.replace(v,F);return b[t]=m.test(e)?"-"+e:e};function S(t){var e={};for(var A in t){e[0===A.indexOf("--")?A:w(A)]=t[A]}return t.fallbacks&&(Array.isArray(t.fallbacks)?e.fallbacks=t.fallbacks.map(S):e.fallbacks=S(t.fallbacks)),e}var D=function(){return{onProcessStyle:function(t){if(Array.isArray(t)){for(var e=0;e<t.length;e++)t[e]=S(t[e]);return t}return S(t)},onChangeValue:function(t,e,A){if(0===e.indexOf("--"))return t;var n=w(e);return e===n?t:(A.prop(n,t),null)}}},R=s.e&&CSS?CSS.px:"px",U=s.e&&CSS?CSS.ms:"ms",G=s.e&&CSS?CSS.percent:"%";function N(t){var e=/(-[a-z])/g,A=function(t){return t[1].toUpperCase()},n={};for(var r in t)n[r]=t[r],n[r.replace(e,A)]=t[r];return n}var k=N({"animation-delay":U,"animation-duration":U,"background-position":R,"background-position-x":R,"background-position-y":R,"background-size":R,border:R,"border-bottom":R,"border-bottom-left-radius":R,"border-bottom-right-radius":R,"border-bottom-width":R,"border-left":R,"border-left-width":R,"border-radius":R,"border-right":R,"border-right-width":R,"border-top":R,"border-top-left-radius":R,"border-top-right-radius":R,"border-top-width":R,"border-width":R,margin:R,"margin-bottom":R,"margin-left":R,"margin-right":R,"margin-top":R,padding:R,"padding-bottom":R,"padding-left":R,"padding-right":R,"padding-top":R,"mask-position-x":R,"mask-position-y":R,"mask-size":R,height:R,width:R,"min-height":R,"max-height":R,"min-width":R,"max-width":R,bottom:R,left:R,top:R,right:R,"box-shadow":R,"text-shadow":R,"column-gap":R,"column-rule":R,"column-rule-width":R,"column-width":R,"font-size":R,"font-size-delta":R,"letter-spacing":R,"text-indent":R,"text-stroke":R,"text-stroke-width":R,"word-spacing":R,motion:R,"motion-offset":R,outline:R,"outline-offset":R,"outline-width":R,perspective:R,"perspective-origin-x":G,"perspective-origin-y":G,"transform-origin":G,"transform-origin-x":G,"transform-origin-y":G,"transform-origin-z":G,"transition-delay":U,"transition-duration":U,"vertical-align":R,"flex-basis":R,"shape-margin":R,size:R,grid:R,"grid-gap":R,"grid-row-gap":R,"grid-column-gap":R,"grid-template-rows":R,"grid-template-columns":R,"grid-auto-rows":R,"grid-auto-columns":R,"box-shadow-x":R,"box-shadow-y":R,"box-shadow-blur":R,"box-shadow-spread":R,"font-line-height":R,"text-shadow-x":R,"text-shadow-y":R,"text-shadow-blur":R});function x(t,e,A){if(!e)return e;if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=x(t,e[n],A);else if("object"===typeof e)if("fallbacks"===t)for(var r in e)e[r]=x(r,e[r],A);else for(var i in e)e[i]=x(t+"-"+i,e[i],A);else if("number"===typeof e){var o=A[t]||k[t];return o?"function"===typeof o?o(e).toString():""+e+o:e.toString()}return e}var O=function(t){void 0===t&&(t={});var e=N(t);return{onProcessStyle:function(t,A){if("style"!==A.type)return t;for(var n in t)t[n]=x(n,t[n],e);return t},onChangeValue:function(t,A){return x(A,t,e)}}},M=A(174),L=A(29),_="",J="",T="",j=M.a&&"ontouchstart"in document.documentElement;if(M.a){var H={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Y=document.createElement("p").style;for(var V in H)if(V+"Transform"in Y){_=V,J=H[V];break}"Webkit"===_&&"msHyphens"in Y&&(_="ms",J=H.ms,"edge"),"Webkit"===_&&"-apple-trailing-word"in Y&&(T="apple")}var Z=_,W=J,K=T,P=j;var q={noPrefill:["appearance"],supportedProperty:function(t){return"appearance"===t&&("ms"===Z?"-webkit-"+t:W+t)}},X={noPrefill:["color-adjust"],supportedProperty:function(t){return"color-adjust"===t&&("Webkit"===Z?W+"print-"+t:t)}},z=/[-\s]+(.)?/g;function $(t,e){return e?e.toUpperCase():""}function tt(t){return t.replace(z,$)}function et(t){return tt("-"+t)}var At,nt={noPrefill:["mask"],supportedProperty:function(t,e){if(!/^mask/.test(t))return!1;if("Webkit"===Z){if(tt("mask-image")in e)return t;if(Z+et("mask-image")in e)return W+t}return t}},rt={noPrefill:["text-orientation"],supportedProperty:function(t){return"text-orientation"===t&&("apple"!==K||P?t:W+t)}},it={noPrefill:["transform"],supportedProperty:function(t,e,A){return"transform"===t&&(A.transform?t:W+t)}},ot={noPrefill:["transition"],supportedProperty:function(t,e,A){return"transition"===t&&(A.transition?t:W+t)}},at={noPrefill:["writing-mode"],supportedProperty:function(t){return"writing-mode"===t&&("Webkit"===Z||"ms"===Z?W+t:t)}},st={noPrefill:["user-select"],supportedProperty:function(t){return"user-select"===t&&("Moz"===Z||"ms"===Z||"apple"===K?W+t:t)}},gt={supportedProperty:function(t,e){return!!/^break-/.test(t)&&("Webkit"===Z?"WebkitColumn"+et(t)in e&&W+"column-"+t:"Moz"===Z&&("page"+et(t)in e&&"page-"+t))}},ct={supportedProperty:function(t,e){if(!/^(border|margin|padding)-inline/.test(t))return!1;if("Moz"===Z)return t;var A=t.replace("-inline","");return Z+et(A)in e&&W+A}},It={supportedProperty:function(t,e){return tt(t)in e&&t}},ut={supportedProperty:function(t,e){var A=et(t);return"-"===t[0]||"-"===t[0]&&"-"===t[1]?t:Z+A in e?W+t:"Webkit"!==Z&&"Webkit"+A in e&&"-webkit-"+t}},lt={supportedProperty:function(t){return"scroll-snap"===t.substring(0,11)&&("ms"===Z?""+W+t:t)}},Ct={supportedProperty:function(t){return"overscroll-behavior"===t&&("ms"===Z?W+"scroll-chaining":t)}},ht={"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"},Bt={supportedProperty:function(t,e){var A=ht[t];return!!A&&(Z+et(A)in e&&W+A)}},ft={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"},dt=Object.keys(ft),Qt=function(t){return W+t},Et=[q,X,nt,rt,it,ot,at,st,gt,ct,It,ut,lt,Ct,Bt,{supportedProperty:function(t,e,A){var n=A.multiple;if(dt.indexOf(t)>-1){var r=ft[t];if(!Array.isArray(r))return Z+et(r)in e&&W+r;if(!n)return!1;for(var i=0;i<r.length;i++)if(!(Z+et(r[0])in e))return!1;return r.map(Qt)}return!1}}],pt=Et.filter((function(t){return t.supportedProperty})).map((function(t){return t.supportedProperty})),yt=Et.filter((function(t){return t.noPrefill})).reduce((function(t,e){return t.push.apply(t,Object(L.a)(e.noPrefill)),t}),[]),vt={};if(M.a){At=document.createElement("p");var mt=window.getComputedStyle(document.documentElement,"");for(var bt in mt)isNaN(bt)||(vt[mt[bt]]=mt[bt]);yt.forEach((function(t){return delete vt[t]}))}function Ft(t,e){if(void 0===e&&(e={}),!At)return t;if(null!=vt[t])return vt[t];"transition"!==t&&"transform"!==t||(e[t]=t in At.style);for(var A=0;A<pt.length&&(vt[t]=pt[A](t,At.style,e),!vt[t]);A++);try{At.style[t]=""}catch(n){return!1}return vt[t]}var wt,St={},Dt={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Rt=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Ut(t,e,A){if("var"===e)return"var";if("all"===e)return"all";if("all"===A)return", all";var n=e?Ft(e):", "+Ft(A);return n||(e||A)}function Gt(t,e){var A=e;if(!wt||"content"===t)return e;if("string"!==typeof A||!isNaN(parseInt(A,10)))return A;var n=t+A;if(null!=St[n])return St[n];try{wt.style[t]=A}catch(r){return St[n]=!1,!1}if(Dt[t])A=A.replace(Rt,Ut);else if(""===wt.style[t]&&("-ms-flex"===(A=W+A)&&(wt.style[t]="-ms-flexbox"),wt.style[t]=A,""===wt.style[t]))return St[n]=!1,!1;return wt.style[t]="",St[n]=A,St[n]}M.a&&(wt=document.createElement("p"));var Nt=function(){function t(e){for(var A in e){var n=e[A];if("fallbacks"===A&&Array.isArray(n))e[A]=n.map(t);else{var r=!1,i=Ft(A);i&&i!==A&&(r=!0);var o=!1,a=Gt(i,Object(s.f)(n));a&&a!==n&&(o=!0),(r||o)&&(r&&delete e[A],e[i||A]=a||n)}}return e}return{onProcessRule:function(t){if("keyframes"===t.type){var e=t;e.at="-"===(A=e.at)[1]||"ms"===Z?A:"@"+W+"keyframes"+A.substr(10)}var A},onProcessStyle:function(e,A){return"style"!==A.type?e:t(e)},onChangeValue:function(t,e){return Gt(e,Object(s.f)(t))||t}}};var kt=function(){var t=function(t,e){return t.length===e.length?t>e?1:-1:t.length-e.length};return{onProcessStyle:function(e,A){if("style"!==A.type)return e;for(var n={},r=Object.keys(e).sort(t),i=0;i<r.length;i++)n[r[i]]=e[r[i]];return n}}};function xt(){return{plugins:[u(),d(),y(),D(),O(),"undefined"===typeof window?null:Nt(),kt()]}}A.d(e,"a",(function(){return _t})),A.d(e,"b",(function(){return Jt}));var Ot,Mt=Object(s.b)(xt()),Lt={disableGeneration:!1,generateClassName:Object(a.a)(),jss:Mt,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},_t=o.a.createContext(Lt);function Jt(t){var e=t.children,A=t.injectFirst,i=void 0!==A&&A,a=t.disableGeneration,g=void 0!==a&&a,c=Object(r.a)(t,["children","injectFirst","disableGeneration"]),I=o.a.useContext(_t),u=Object(n.a)({},I,{disableGeneration:g},c);if(!u.jss.options.insertionPoint&&i&&"undefined"!==typeof window){if(!Ot){var l=document.head;Ot=document.createComment("mui-inject-first"),l.insertBefore(Ot,l.firstChild)}u.jss=Object(s.b)({plugins:xt().plugins,insertionPoint:Ot})}return o.a.createElement(_t.Provider,{value:u},e)}},function(t,e,A){"use strict";var n=A(30),r=A(1),i=A(10),o=A(0),a=(A(25),A(32)),s=A(41),g=A(594),c=A(353),I=A(64),u=A(197),l=A(68),C="undefined"===typeof window?o.useEffect:o.useLayoutEffect,h=o.forwardRef((function(t,e){var A=t.alignItems,r=void 0===A?"center":A,s=t.autoFocus,h=void 0!==s&&s,B=t.button,f=void 0!==B&&B,d=t.children,Q=t.classes,E=t.className,p=t.component,y=t.ContainerComponent,v=void 0===y?"li":y,m=t.ContainerProps,b=(m=void 0===m?{}:m).className,F=Object(n.a)(m,["className"]),w=t.dense,S=void 0!==w&&w,D=t.disabled,R=void 0!==D&&D,U=t.disableGutters,G=void 0!==U&&U,N=t.divider,k=void 0!==N&&N,x=t.focusVisibleClassName,O=t.selected,M=void 0!==O&&O,L=Object(n.a)(t,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),_=o.useContext(u.a),J={dense:S||_.dense||!1,alignItems:r},T=o.useRef(null);C((function(){h&&T.current&&T.current.focus()}),[h]);var j=o.Children.toArray(d),H=j.length&&Object(c.a)(j[j.length-1],["ListItemSecondaryAction"]),Y=o.useCallback((function(t){T.current=l.findDOMNode(t)}),[]),V=Object(I.a)(Y,e),Z=Object(i.a)({className:Object(a.a)(Q.root,E,J.dense&&Q.dense,!G&&Q.gutters,k&&Q.divider,R&&Q.disabled,f&&Q.button,"center"!==r&&Q.alignItemsFlexStart,H&&Q.secondaryAction,M&&Q.selected),disabled:R},L),W=p||"li";return f&&(Z.component=p||"div",Z.focusVisibleClassName=Object(a.a)(Q.focusVisible,x),W=g.a),H?(W=Z.component||p?W:"div","li"===v&&("li"===W?W="div":"li"===Z.component&&(Z.component="div")),o.createElement(u.a.Provider,{value:J},o.createElement(v,Object(i.a)({className:Object(a.a)(Q.container,b),ref:V},F),o.createElement(W,Z,j),j.pop()))):o.createElement(u.a.Provider,{value:J},o.createElement(W,Object(i.a)({ref:V},Z),j))})),B=Object(s.a)((function(t){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:t.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:t.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(t.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:t.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(h),f=o.forwardRef((function(t,e){var A,r=t.classes,s=t.className,g=t.component,c=void 0===g?"li":g,I=t.disableGutters,u=void 0!==I&&I,l=t.role,C=void 0===l?"menuitem":l,h=t.selected,f=t.tabIndex,d=Object(n.a)(t,["classes","className","component","disableGutters","role","selected","tabIndex"]);return t.disabled||(A=void 0!==f?f:-1),o.createElement(B,Object(i.a)({button:!0,role:C,tabIndex:A,component:c,selected:h,disableGutters:u,classes:{dense:r.dense},className:Object(a.a)(r.root,s,h&&r.selected,!u&&r.gutters),ref:e},d))}));e.a=Object(s.a)((function(t){return{root:Object(i.a)({},t.typography.body1,Object(r.a)({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},t.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Object(i.a)({},t.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(f)},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=(A(285),A(25),A(68)),a=A(100),s=A(32),g=A(41),c=A(197),I=i.forwardRef((function(t,e){var A=t.children,o=t.classes,a=t.className,g=t.component,I=void 0===g?"ul":g,u=t.dense,l=void 0!==u&&u,C=t.disablePadding,h=void 0!==C&&C,B=t.subheader,f=Object(r.a)(t,["children","classes","className","component","dense","disablePadding","subheader"]),d=i.useMemo((function(){return{dense:l}}),[l]);return i.createElement(c.a.Provider,{value:d},i.createElement(I,Object(n.a)({className:Object(s.a)(o.root,a,l&&o.dense,!h&&o.padding,B&&o.subheader),ref:e},f),B,A))})),u=Object(g.a)({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(I),l=A(352),C=A(64);function h(t,e,A){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:A?null:t.firstChild}function B(t,e,A){return t===e?A?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:A?null:t.lastChild}function f(t,e){if(void 0===e)return!0;var A=t.innerText;return void 0===A&&(A=t.textContent),0!==(A=A.trim().toLowerCase()).length&&(e.repeating?A[0]===e.keys[0]:0===A.indexOf(e.keys.join("")))}function d(t,e,A,n,r){for(var i=!1,o=n(t,e,!!e&&A);o;){if(o===t.firstChild){if(i)return!1;i=!0}if(o.hasAttribute("tabindex")&&!o.disabled&&"true"!==o.getAttribute("aria-disabled")&&f(o,r))return o.focus(),!0;o=n(t,o,A)}return!1}var Q="undefined"===typeof window?i.useEffect:i.useLayoutEffect,E=i.forwardRef((function(t,e){var A=t.actions,s=t.autoFocus,g=void 0!==s&&s,c=t.autoFocusItem,I=void 0!==c&&c,E=t.children,p=t.className,y=t.onKeyDown,v=t.disableListWrap,m=void 0!==v&&v,b=t.variant,F=void 0===b?"selectedMenu":b,w=Object(r.a)(t,["actions","autoFocus","autoFocusItem","children","className","onKeyDown","disableListWrap","variant"]),S=i.useRef(null),D=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Q((function(){g&&S.current.focus()}),[g]),i.useImperativeHandle(A,(function(){return{adjustStyleForScrollbar:function(t,e){var A=!S.current.style.width;if(t.clientHeight<S.current.clientHeight&&A){var n="".concat(Object(l.a)(!0),"px");S.current.style["rtl"===e.direction?"paddingLeft":"paddingRight"]=n,S.current.style.width="calc(100% + ".concat(n,")")}return S.current}}}),[]);var R=i.useCallback((function(t){S.current=o.findDOMNode(t)}),[]),U=Object(C.a)(R,e),G=-1;i.Children.forEach(E,(function(t,e){i.isValidElement(t)&&(t.props.disabled||("selectedMenu"===F&&t.props.selected||-1===G)&&(G=e))}));var N=i.Children.map(E,(function(t,e){if(e===G){var A={};if(I&&(A.autoFocus=!0),void 0===t.props.tabIndex&&"selectedMenu"===F&&(A.tabIndex=0),null!==A)return i.cloneElement(t,A)}return t}));return i.createElement(u,Object(n.a)({role:"menu",ref:U,className:p,onKeyDown:function(t){var e=S.current,A=t.key,n=Object(a.a)(e).activeElement;if("ArrowDown"===A)t.preventDefault(),d(e,n,m,h);else if("ArrowUp"===A)t.preventDefault(),d(e,n,m,B);else if("Home"===A)t.preventDefault(),d(e,null,m,h);else if("End"===A)t.preventDefault(),d(e,null,m,B);else if(1===A.length){var r=D.current,i=A.toLowerCase(),o=performance.now();r.keys.length>0&&(o-r.lastTime>500?(r.keys=[],r.repeating=!0,r.previousKeyMatched=!0):r.repeating&&i!==r.keys[0]&&(r.repeating=!1)),r.lastTime=o,r.keys.push(i);var s=n&&!r.repeating&&f(n,r);r.previousKeyMatched&&(s||d(e,n,!1,h,r))?t.preventDefault():r.previousKeyMatched=!1}y&&y(t)},tabIndex:g?0:-1},w),N)}));e.a=E},function(t,e,A){"use strict";var n=A(22),r=A(350),i=A(195);A.d(e,"a",(function(){return I}));var o={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},s={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},g=function(t){var e={};return function(A){return void 0===e[A]&&(e[A]=t(A)),e[A]}}((function(t){if(t.length>2){if(!s[t])return[t];t=s[t]}var e=t.split(""),A=Object(n.a)(e,2),r=A[0],i=A[1],g=o[r],c=a[i]||"";return Array.isArray(c)?c.map((function(t){return g+t})):[g+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 I(t){var e=t.spacing||8;return"number"===typeof e?function(t){return e*t}:Array.isArray(e)?function(t){return e[t]}:"function"===typeof e?e:function(){}}function u(t,e){return function(A){return t.reduce((function(t,n){return t[n]=function(t,e){if("string"===typeof e)return e;var A=t(Math.abs(e));return e>=0?A:"number"===typeof A?-A:"-".concat(A)}(e,A),t}),{})}}function l(t){var e=I(t.theme);return Object.keys(t).map((function(A){if(-1===c.indexOf(A))return null;var n=u(g(A),e),i=t[A];return Object(r.a)(t,i,n)})).reduce(i.a,{})}l.propTypes={},l.filterProps=c;e.b=l},function(t,e,A){"use strict";var n=A(12),r=A(20),i=A(21),o=A(13),a=A(0),s=A.n(a),g=A(213),c=A(73),I=A(145),u=A(87),l=A(150),C=A(592),h=A(823),B=A(1141),f=A(881),d=A(1143),Q=A(546),E=A(1422),p=A(754),y=A(802),v=Object(Q.a)((function(){return Object(E.a)({cameraLabel:{padding:"0px 0px 0px 16px"},box:{padding:"0px"},button:{padding:"0px 0px 0px 8px"}})})),m=function(t){var e=t.setSpatialAxisFixed,A=t.spatialAxisFixed,n=t.use3d,r=v();return s.a.createElement(d.a,null,s.a.createElement(f.a,{className:r.cameraLabel},"Fix Camera Axis"),s.a.createElement(f.a,{className:r.box},s.a.createElement(B.a,{onClick:function(){return e(!A)},disabled:!n,checked:Boolean(A)})))};function b(t){var e=t.observationsLabel,A=t.cellColorEncoding,n=t.setCellColorEncoding,r=t.setSpatialAxisFixed,i=t.spatialAxisFixed,o=t.use3d;return s.a.createElement(p.a,null,s.a.createElement(y.a,{observationsLabel:e,cellColorEncoding:A,setCellColorEncoding:n}),s.a.createElement(m,{setSpatialAxisFixed:r,spatialAxisFixed:i,use3d:o}))}var F=A(544),w=A(545),S=A(63);function D(t){var e=t.parentUuid,A=t.cellHighlight,n=t.width,r=t.height,a=t.getCellInfo,g=Object(S.c)(),c=Object(S.e)(e),I=A&&a?[a(A)].concat(Object(i.a)(c&&c.project?c.project(A):[null,null])):[null,null,null],u=Object(o.a)(I,3),l=u[0],C=u[1],h=u[2];return l?s.a.createElement(F.a,{x:C,y:h,parentUuid:e,sourceUuid:g,parentWidth:n,parentHeight:r},s.a.createElement(w.a,{info:l})):null}var R=A(427),U=A(140);A.d(e,"a",(function(){return N}));var G=["cells","molecules","raster","cell-sets","expression-matrix"];function N(t){var e=t.uuid,A=t.coordinationScopes,B=t.removeGridComponent,f=t.observationsLabelOverride,d=void 0===f?"cell":f,Q=t.observationsPluralLabelOverride,E=void 0===Q?"".concat(d,"s"):Q,p=t.subobservationsLabelOverride,y=void 0===p?"molecule":p,v=t.subobservationsPluralLabelOverride,m=void 0===v?"".concat(y,"s"):v,F=t.theme,w=t.disableTooltip,N=void 0!==w&&w,k=t.title,x=void 0===k?"Spatial":k,O=Object(S.j)(),M=Object(S.l)(),L=Object(S.m)(e),_=Object(S.f)(U.b.spatial,A),J=Object(o.a)(_,2),T=J[0],j=T.dataset,H=T.spatialZoom,Y=T.spatialTargetX,V=T.spatialTargetY,Z=T.spatialTargetZ,W=T.spatialRotationX,K=T.spatialRotationY,P=T.spatialRotationZ,q=T.spatialRotationOrbit,X=T.spatialOrbitAxis,z=T.spatialRasterLayers,$=T.spatialCellsLayer,tt=T.spatialMoleculesLayer,et=T.spatialNeighborhoodsLayer,At=T.cellFilter,nt=T.cellHighlight,rt=T.geneSelection,it=T.cellSetSelection,ot=T.cellSetColor,at=T.cellColorEncoding,st=T.additionalCellSets,gt=T.spatialAxisFixed,ct=J[1],It=ct.setSpatialZoom,ut=ct.setSpatialTargetX,lt=ct.setSpatialTargetY,Ct=ct.setSpatialTargetZ,ht=ct.setSpatialRotationX,Bt=ct.setSpatialRotationOrbit,ft=ct.setSpatialOrbitAxis,dt=ct.setSpatialRasterLayers,Qt=ct.setSpatialCellsLayer,Et=ct.setSpatialMoleculesLayer,pt=ct.setSpatialNeighborhoodsLayer,yt=ct.setCellFilter,vt=ct.setCellSetSelection,mt=ct.setCellHighlight,bt=ct.setCellSetColor,Ft=ct.setCellColorEncoding,wt=ct.setAdditionalCellSets,St=ct.setMoleculeHighlight,Dt=ct.setSpatialAxisFixed,Rt=Object(S.a)(U.b.layerController,A),Ut=Object(o.a)(Rt,1)[0].rasterLayersCallbacks,Gt=null===z||void 0===z?void 0:z.some((function(t){return t.use3d})),Nt=Object(I.e)(),kt=Object(o.a)(Nt,3),xt=kt[0],Ot=kt[1],Mt=kt[2],Lt=Object(I.d)(G),_t=Object(o.a)(Lt,3),Jt=_t[0],Tt=_t[1],jt=_t[2],Ht=Object(I.b)(),Yt=Object(o.a)(Ht,3),Vt=Yt[0],Zt=Yt[1],Wt=Yt[2];Object(a.useEffect)((function(){Mt(),jt()}),[O,j]);var Kt=Object(l.b)(O,j,Tt,Ot,!1,{setSpatialCellsLayer:Qt},{spatialCellsLayer:$}),Pt=Object(o.a)(Kt,2),qt=Pt[0],Xt=Pt[1],zt=Object(l.h)(O,j,Tt,Ot,!1,{setSpatialMoleculesLayer:Et},{spatialMoleculesLayer:tt}),$t=Object(o.a)(zt,3),te=$t[0],ee=$t[1],Ae=$t[2],ne=Object(l.i)(O,j,Tt,Ot,!1,{setSpatialNeighborhoodsLayer:pt},{spatialNeighborhoodsLayer:et}),re=Object(o.a)(ne,1)[0],ie=Object(l.a)(O,j,Tt,Ot,!1,{setCellSetSelection:vt,setCellSetColor:bt},{cellSetSelection:it,cellSetColor:ot}),oe=Object(o.a)(ie,1)[0],ae=Object(l.f)(O,j,Tt,!1,rt),se=Object(o.a)(ae,1)[0],ge=Object(l.d)(O,j,Tt,Ot,!1),ce=Object(o.a)(ge,1)[0],Ie=Object(l.j)(O,j,Tt,Ot,!1,{setSpatialRasterLayers:dt},{spatialRasterLayers:z}),ue=Object(o.a)(Ie,3),le=(ue[0],ue[1]),Ce=ue[2],he=Object(a.useMemo)((function(){var t=!Ce.some((function(t){var e;return null===t||void 0===t||null===(e=t.metadata)||void 0===e?void 0:e.isBitmask}));return[].concat(Object(i.a)(tt?[Object(r.a)({},tt,{type:"molecules"})]:[]),Object(i.a)($&&t?[Object(r.a)({},$,{type:"cells"})]:[]),Object(i.a)(et?[Object(r.a)({},et,{type:"neighborhoods"})]:[]),Object(i.a)(z?z.map((function(t){return Object(r.a)({},t,{type:t.type&&["raster","bitmask"].includes(t.type)?t.type:"raster"})})):[]))}),[$,tt,et,z,Ce]);Object(a.useEffect)((function(){if("number"!==typeof Y||"number"!==typeof V){var t=Object(R.a)({width:Vt,height:Zt,cells:qt,imageLayerLoaders:le,useRaster:Boolean(O[j].loaders.raster),use3d:Gt}),e=t.initialTargetX,A=t.initialTargetY,n=t.initialTargetZ,r=t.initialZoom;ut(e),lt(A),Ct(n),It(r)}}),[le,qt,Y,V,ut,lt,It,Gt]);var Be=Object(a.useMemo)((function(){return Object(u.n)(oe,st)}),[oe,st]),fe=Object(a.useCallback)((function(t){Object(u.o)(t,st,ot,vt,wt,bt,Ft)}),[st,ot,Ft,wt,bt,vt]),de=Object(a.useMemo)((function(){return Object(C.a)({cellColorEncoding:at,expressionData:se&&se[0],geneSelection:rt,cellSets:Be,cellSetSelection:it,cellSetColor:ot,expressionDataAttrs:ce})}),[at,rt,Be,ot,it,se,ce]),Qe=Object(a.useMemo)((function(){return Array.from(de.keys())}),[de]),Ee=Object(R.e)({observationsCount:Xt,observationsLabel:d,observationsPluralLabel:E,subobservationsCount:ee,subobservationsLabel:y,subobservationsPluralLabel:m,locationsCount:Ae});return s.a.createElement(g.a,{title:x,info:Ee,isSpatial:!0,urls:xt,theme:F,removeGridComponent:B,isReady:Jt,options:s.a.createElement(b,{observationsLabel:d,cellColorEncoding:at,setCellColorEncoding:Ft,setSpatialAxisFixed:Dt,spatialAxisFixed:gt,use3d:Gt})},s.a.createElement(h.a,{ref:Wt,uuid:e,width:Vt,height:Zt,viewState:{zoom:H,target:[Y,V,Z],rotationX:W,rotationY:K,rotationZ:P,rotationOrbit:q,orbitAxis:X},setViewState:function(t){var e=t.zoom,A=t.target,n=t.rotationX,r=t.rotationOrbit,i=t.orbitAxis;It(e),ut(A[0]),lt(A[1]),Ct(A[2]),ht(n),Bt(r),ft(i)},layers:he,cells:qt,cellFilter:At,cellSelection:Qe,cellHighlight:nt,cellColors:de,molecules:te,neighborhoods:re,imageLayerLoaders:le,setCellFilter:yt,setCellSelection:fe,setCellHighlight:mt,setMoleculeHighlight:St,setComponentHover:function(){M(e)},updateViewInfo:L,rasterLayersCallbacks:Ut,spatialAxisFixed:gt}),!N&&s.a.createElement(D,{parentUuid:e,cellHighlight:nt,width:Vt,height:Zt,getCellInfo:function(t){var e=qt[t];return e?Object(r.a)(Object(n.a)({},"".concat(Object(c.a)(d)," ID"),t),e.factors):null}}))}},function(t,e,A){"use strict";var n=A(12),r=A(20),i=A(21),o=A(13),a=A(0),s=A.n(a),g=A(1166),c=A(298),I=A.n(c),u=A(89),l=A.n(u),C=A(213),h=A(73),B=A(145),f=A(87),d=A(137),Q=A(150),E=A(592),p=A(825),y=A(544),v=A(545),m=A(63);function b(t){var e=t.parentUuid,A=t.cellHighlight,n=t.width,r=t.height,a=t.getCellInfo,g=Object(m.c)(),c=Object(m.e)(e),I=A&&a?[a(A)].concat(Object(i.a)(c&&c.project?c.project(A):[null,null])):[null,null,null],u=Object(o.a)(I,3),l=u[0],C=u[1],h=u[2];return l?s.a.createElement(y.a,{x:C,y:h,parentUuid:e,sourceUuid:g,parentWidth:n,parentHeight:r},s.a.createElement(v.a,{info:l})):null}var F=A(1141),w=A(1142),S=A(881),D=A(1143),R=A(530),U=A(754),G=A(802);function N(t){var e=t.observationsLabel,A=t.cellRadius,n=t.setCellRadius,r=t.cellSetLabelsVisible,i=t.setCellSetLabelsVisible,o=t.cellSetLabelSize,a=t.setCellSetLabelSize,g=t.cellSetPolygonsVisible,c=t.setCellSetPolygonsVisible,I=t.cellColorEncoding,u=t.setCellColorEncoding,l=Object(h.a)(e),C=Object(R.a)();return s.a.createElement(U.a,null,s.a.createElement(D.a,null,s.a.createElement(S.a,{className:C.labelCell},l," Set Labels Visible"),s.a.createElement(S.a,{className:C.inputCell},s.a.createElement(F.a,{className:C.checkbox,checked:r,onChange:function(t){i(t.target.checked)},name:"scatterplot-option-cell-set-labels",color:"default"}))),s.a.createElement(D.a,null,s.a.createElement(S.a,{className:C.labelCell},l," Set Label Size"),s.a.createElement(S.a,{className:C.inputCell},s.a.createElement(w.a,{disabled:!r,classes:{root:C.slider,valueLabel:C.sliderValueLabel},value:o,onChange:function(t,e){a(e)},"aria-labelledby":"cell-set-label-size-slider",valueLabelDisplay:"auto",step:1,min:8,max:36}))),s.a.createElement(D.a,null,s.a.createElement(S.a,{className:C.labelCell},l," Set Polygons Visible"),s.a.createElement(S.a,{className:C.inputCell},s.a.createElement(F.a,{className:C.checkbox,checked:g,onChange:function(t){c(t.target.checked)},name:"scatterplot-option-cell-set-polygons",color:"default"}))),s.a.createElement(D.a,null,s.a.createElement(S.a,{className:C.labelCell},l," Radius"),s.a.createElement(S.a,{className:C.inputCell},s.a.createElement(w.a,{classes:{root:C.slider,valueLabel:C.sliderValueLabel},value:A,onChange:function(t,e){n(e)},"aria-labelledby":"cell-radius-slider",valueLabelDisplay:"auto",step:.25,min:.25,max:8}))),s.a.createElement(G.a,{observationsLabel:e,cellColorEncoding:I,setCellColorEncoding:u}))}var k=A(140);A.d(e,"a",(function(){return O}));var x=["cells","expression-matrix","cell-sets"];function O(t){var e=t.uuid,A=t.coordinationScopes,c=t.removeGridComponent,u=t.theme,y=t.disableTooltip,v=void 0!==y&&y,F=t.observationsLabelOverride,w=void 0===F?"cell":F,S=t.observationsPluralLabelOverride,D=void 0===S?"".concat(w,"s"):S,R=t.title,U=Object(m.j)(),G=Object(m.l)(),O=Object(m.m)(e),M=Object(m.f)(k.b.scatterplot,A),L=Object(o.a)(M,2),_=L[0],J=_.dataset,T=_.embeddingZoom,j=_.embeddingTargetX,H=_.embeddingTargetY,Y=_.embeddingTargetZ,V=_.embeddingType,Z=_.cellFilter,W=_.cellHighlight,K=_.geneSelection,P=_.cellSetSelection,q=_.cellSetColor,X=_.cellColorEncoding,z=_.additionalCellSets,$=_.embeddingCellSetPolygonsVisible,tt=_.embeddingCellSetLabelsVisible,et=_.embeddingCellSetLabelSize,At=_.embeddingCellRadius,nt=L[1],rt=nt.setEmbeddingZoom,it=nt.setEmbeddingTargetX,ot=nt.setEmbeddingTargetY,at=nt.setEmbeddingTargetZ,st=nt.setCellFilter,gt=nt.setCellSetSelection,ct=nt.setCellHighlight,It=nt.setCellSetColor,ut=nt.setCellColorEncoding,lt=nt.setAdditionalCellSets,Ct=nt.setEmbeddingCellSetPolygonsVisible,ht=nt.setEmbeddingCellSetLabelsVisible,Bt=nt.setEmbeddingCellSetLabelSize,ft=nt.setEmbeddingCellRadius,dt=Object(B.e)(),Qt=Object(o.a)(dt,3),Et=Qt[0],pt=Qt[1],yt=Qt[2],vt=Object(B.b)(),mt=Object(o.a)(vt,3),bt=mt[0],Ft=mt[1],wt=mt[2],St=Object(B.d)(x),Dt=Object(o.a)(St,3),Rt=Dt[0],Ut=Dt[1],Gt=Dt[2],Nt=R||"Scatterplot (".concat(V,")");Object(a.useEffect)((function(){yt(),Gt()}),[U,J]);var kt=Object(Q.b)(U,J,Ut,pt,!0),xt=Object(o.a)(kt,2),Ot=xt[0],Mt=xt[1],Lt=Object(Q.a)(U,J,Ut,pt,!1,{setCellSetSelection:gt,setCellSetColor:It},{cellSetSelection:P,cellSetColor:q}),_t=Object(o.a)(Lt,1)[0],Jt=Object(Q.f)(U,J,Ut,!1,K),Tt=Object(o.a)(Jt,1)[0],jt=Object(Q.d)(U,J,Ut,pt,!1),Ht=Object(o.a)(jt,1)[0],Yt=Object(a.useState)(.2),Vt=Object(o.a)(Yt,2),Zt=Vt[0],Wt=Vt[1],Kt=Object(a.useMemo)((function(){return Object(f.n)(_t,z)}),[_t,z]),Pt=Object(a.useCallback)((function(t){Object(f.o)(t,z,q,gt,lt,It,ut)}),[z,q,ut,lt,It,gt]),qt=Object(a.useMemo)((function(){return Object(E.a)({cellColorEncoding:X,expressionData:Tt&&Tt[0],geneSelection:K,cellSets:Kt,cellSetSelection:P,cellSetColor:q,expressionDataAttrs:Ht})}),[X,K,Kt,P,q,Tt,Ht]),Xt=Object(a.useState)([]),zt=Object(o.a)(Xt,2),$t=zt[0],te=zt[1],ee=Object(a.useMemo)((function(){var t,e;if((tt||$)&&(e=P,-1===$t.findIndex((function(t){return l()(t[0],e)})))&&(null===Kt||void 0===Kt||null===(t=Kt.tree)||void 0===t?void 0:t.length)&&Object.values(Ot).length&&(null===q||void 0===q?void 0:q.length)){var A=Object(d.b)({cells:Ot,mapping:V,cellSets:Kt,cellSetSelection:P,cellSetColor:q});return te((function(t){return[].concat(Object(i.a)(t),[[P,A]])})),A}return function(t,e){var A;return null===(A=t.find((function(t){return l()(t[0],e)})))||void 0===A?void 0:A[1]}($t,P)||[]}),[$,$t,tt,Ot,V,Kt,P,q]),Ae=Object(a.useMemo)((function(){return Array.from(qt.keys())}),[qt]);Object(a.useEffect)((function(){var t=Ot&&Object.values(Ot);if(null===t||void 0===t?void 0:t.length){var e=Object.values(Ot).map((function(t){return t.mappings[V]})),A=Object(g.a)(e,(function(t){return t[0]})),n=Object(g.a)(e,(function(t){return t[1]})),r=A[1]-A[0],i=n[1]-n[0],o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)),a=I()(o/300,0,.2);if(a&&Wt(a),"number"!==typeof j||"number"!==typeof H){var s=A[0]+r/2,c=n[0]+i/2,u=Math.log2(Math.min(bt/r,Ft/i));it(s),ot(-c),rt(u)}}}),[Ot,V]);var ne=Object(a.useCallback)((function(t){var e=Ot[t];return Object(r.a)(Object(n.a)({},"".concat(Object(h.a)(w)," ID"),t),e?e.factors:{})}),[Ot,w]);return s.a.createElement(C.a,{title:Nt,info:"".concat(Mt," ").concat(Object(h.f)(w,D,Mt)),removeGridComponent:c,urls:Et,theme:u,isReady:Rt,options:s.a.createElement(N,{observationsLabel:w,cellRadius:At,setCellRadius:ft,cellSetLabelsVisible:tt,setCellSetLabelsVisible:ht,cellSetLabelSize:et,setCellSetLabelSize:Bt,cellSetPolygonsVisible:$,setCellSetPolygonsVisible:Ct,cellColorEncoding:X,setCellColorEncoding:ut})},s.a.createElement(p.a,{ref:wt,uuid:e,theme:u,viewState:{zoom:T,target:[j,H,Y]},setViewState:function(t){var e=t.zoom,A=t.target;rt(e),it(A[0]),ot(A[1]),at(A[2])},cells:Ot,mapping:V,cellFilter:Z,cellSelection:Ae,cellHighlight:W,cellColors:qt,cellSetPolygons:ee,cellSetLabelSize:et,cellSetLabelsVisible:tt,cellSetPolygonsVisible:$,setCellFilter:st,setCellSelection:Pt,setCellHighlight:ct,cellRadiusScale:Zt*At,setComponentHover:function(){G(e)},updateViewInfo:O}),!v&&s.a.createElement(b,{parentUuid:e,cellHighlight:W,width:bt,height:Ft,getCellInfo:ne}))}},function(t,e,A){"use strict";var n=A(12),r=A(20),i=A(13),o=A(0),a=A.n(o),s=A(213),g=A(73),c=A(145),I=A(87),u=A(150),l=A(592),C=A(63),h=A(140),B=A(824),f=A(544),d=A(545);function Q(t){var e=t.parentUuid,A=t.width,n=t.height,o=t.transpose,s=t.getCellInfo,g=t.getGeneInfo,c=t.cellHighlight,I=t.geneHighlight,u=Object(C.c)(),l=Object(C.e)(e),h=c&&s?[s(c),l&&l.project?l.project(c,null)[o?0:1]:null]:[null,null],B=Object(i.a)(h,2),Q=B[0],E=B[1],p=I&&g?[g(I),l&&l.project?l.project(null,I)[o?1:0]:null]:[null,null],y=Object(i.a)(p,2),v=y[0],m=y[1],b=o?E:m,F=o?m:E;return Q||v?a.a.createElement(f.a,{x:b,y:F,parentUuid:e,parentWidth:A,parentHeight:n,sourceUuid:u},a.a.createElement(d.a,{info:Object(r.a)({},v,{},Q)})):null}A.d(e,"a",(function(){return p}));var E=["cells","cell-sets","expression-matrix"];function p(t){var e=t.uuid,A=t.coordinationScopes,f=t.removeGridComponent,d=t.theme,p=t.transpose,y=t.observationsLabelOverride,v=void 0===y?"cell":y,m=t.observationsPluralLabelOverride,b=void 0===m?"".concat(v,"s"):m,F=t.variablesLabelOverride,w=void 0===F?"gene":F,S=t.variablesPluralLabelOverride,D=void 0===S?"".concat(w,"s"):S,R=t.disableTooltip,U=void 0!==R&&R,G=t.title,N=void 0===G?"Heatmap":G,k=Object(C.j)(),x=Object(C.l)(),O=Object(C.m)(e),M=Object(C.f)(h.b.heatmap,A),L=Object(i.a)(M,2),_=L[0],J=_.dataset,T=_.heatmapZoomX,j=_.heatmapTargetX,H=_.heatmapTargetY,Y=_.geneSelection,V=_.cellHighlight,Z=_.geneHighlight,W=_.cellSetSelection,K=_.cellSetColor,P=_.cellColorEncoding,q=_.additionalCellSets,X=_.geneExpressionColormapRange,z=L[1],$=z.setHeatmapZoomX,tt=z.setHeatmapZoomY,et=z.setHeatmapTargetX,At=z.setHeatmapTargetY,nt=z.setCellHighlight,rt=z.setGeneHighlight,it=z.setCellSetSelection,ot=z.setCellSetColor,at=z.setGeneExpressionColormapRange,st=Object(g.a)(b),gt=Object(g.a)(D),ct=Object(o.useState)(!1),It=Object(i.a)(ct,2),ut=It[0],lt=It[1],Ct=Object(c.d)(E),ht=Object(i.a)(Ct,3),Bt=ht[0],ft=ht[1],dt=ht[2],Qt=Object(c.e)(),Et=Object(i.a)(Qt,3),pt=Et[0],yt=Et[1],vt=Et[2],mt=Object(c.b)(),bt=Object(i.a)(mt,3),Ft=bt[0],wt=bt[1],St=bt[2];Object(o.useEffect)((function(){vt(),dt()}),[k,J]);var Dt=Object(u.b)(k,J,ft,yt,!0),Rt=Object(i.a)(Dt,1)[0],Ut=Object(u.e)(k,J,ft,yt,!0),Gt=Object(i.a)(Ut,1)[0],Nt=Object(u.f)(k,J,ft,!1,Y),kt=Object(i.a)(Nt,1)[0],xt=Object(u.a)(k,J,ft,yt,!1,{setCellSetSelection:it,setCellSetColor:ot},{cellSetSelection:W,cellSetColor:K}),Ot=Object(i.a)(xt,1)[0],Mt=Object(o.useMemo)((function(){return Object(I.n)(Ot,q)}),[Ot,q]),Lt=Object(o.useMemo)((function(){return Object(l.a)({cellColorEncoding:P,expressionData:kt&&kt[0],geneSelection:Y,cellSets:Mt,cellSetSelection:W,cellSetColor:K,expressionDataAttrs:Gt})}),[P,Mt,Y,K,W,kt,Gt]),_t=Object(o.useCallback)((function(t){if(t){var e=Rt[t];return Object(r.a)(Object(n.a)({},"".concat(Object(g.a)(v)," ID"),t),e?e.factors:{})}return null}),[Rt,v]),Jt=Object(o.useCallback)((function(t){return t?Object(n.a)({},"".concat(Object(g.a)(w)," ID"),t):null}),[w]),Tt=Gt&&Gt.rows?Gt.rows.length:0,jt=Gt&&Gt.cols?Gt.cols.length:0,Ht=Lt.size;return a.a.createElement(s.a,{title:N,info:"".concat(Tt," ").concat(Object(g.f)(v,b,Tt)," \xd7 ").concat(jt," ").concat(Object(g.f)(w,D,jt),",\n             with ").concat(Ht," ").concat(Object(g.f)(v,b,Ht)," selected"),urls:pt,theme:d,removeGridComponent:f,isReady:Bt&&!ut},a.a.createElement(B.a,{ref:St,transpose:p,viewState:{zoom:T,target:[j,H]},setViewState:function(t){var e=t.zoom,A=t.target;$(e),tt(e),et(A[0]),At(A[1])},heatmapControls:X,setHeatmapControls:at,height:wt,width:Ft,theme:d,uuid:e,expressionMatrix:Gt,cellColors:Lt,setIsRendering:lt,setCellHighlight:nt,setGeneHighlight:rt,setComponentHover:function(){x(e)},updateViewInfo:O,observationsTitle:st,variablesTitle:gt}),!U&&a.a.createElement(Q,{parentUuid:e,width:Ft,height:wt,transpose:p,getCellInfo:_t,getGeneInfo:Jt,cellHighlight:V,geneHighlight:Z}))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return i}));var n=A(0),r=A.n(n);function i(t){var e=t.info,A=t.warn,n=[];return e&&n.push(r.a.createElement("p",{className:"details",key:"info"},e)),A&&n.push(r.a.createElement("p",{className:"alert alert-warning my-0 details",key:"warn"},A)),n}},function(t,e,A){"use strict";A.d(e,"a",(function(){return c}));var n=A(20),r=A(0),i=A.n(r),o=A(298),a=A.n(o),s=A(575),g=A(131);function c(t){var e=t.data,A=t.theme,r=t.width,o=t.height,c=t.marginRight,I=void 0===c?90:c,u=t.marginBottom,l=void 0===u?120:u,C=t.keyLength,h=void 0===C?36:C,B=e.map((function(t){return Object(n.a)({},t,{keyName:t.key+t.name,colorString:Object(g.c)(t.color)})})),f={domain:B.map((function(t){return t.key})),range:B.map((function(t){return t.colorString}))},d=B.map((function(t){return t.keyName})),Q={mark:{type:"bar"},encoding:{x:{field:"keyName",type:"nominal",axis:{labelExpr:"substring(datum.label, ".concat(h,")")},title:"Cell Set",sort:d},y:{field:"size",type:"quantitative",title:"Cell Set Size"},color:{field:"key",type:"nominal",scale:f,legend:null},tooltip:{field:"size",type:"quantitative"}},width:a()(r-I,10,1/0),height:a()(o-l,10,1/0),config:s.b[A]};return i.a.createElement(s.c,{data:B,spec:Q})}},function(t,e,A){"use strict";var n=A(13),r=A(0),i=A.n(r),o=A(12),a=A(132),s=A.n(a),g=A(135),c=A.n(g),I=A(188),u=A.n(I),l=A(189),C=A.n(l),h=A(50),B=A.n(h),f=A(190),d=A.n(f),Q=A(42),E=A.n(Q),p=A(331),y=A(240),v=A.n(y),m=A(32);function b(t){var e=t.cellCount,A=t.cellSize,n=t.computeMetadataCallback,r=t.computeMetadataCallbackProps,i=t.nextCellsCount,o=t.nextCellSize,a=t.nextScrollToIndex,s=t.scrollToIndex,g=t.updateScrollOffsetForScrollToIndex;e===i&&("number"!==typeof A&&"number"!==typeof o||A===o)||(n(r),s>=0&&s===a&&g())}var F=A(596),w=A.n(F),S=(A(25),function(){function t(e){var A=e.cellCount,n=e.cellSizeGetter,r=e.estimatedCellSize;s()(this,t),E()(this,"_cellSizeAndPositionData",{}),E()(this,"_lastMeasuredIndex",-1),E()(this,"_lastBatchedIndex",-1),E()(this,"_cellCount",void 0),E()(this,"_cellSizeGetter",void 0),E()(this,"_estimatedCellSize",void 0),this._cellSizeGetter=n,this._cellCount=A,this._estimatedCellSize=r}return c()(t,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(t){var e=t.cellCount,A=t.estimatedCellSize,n=t.cellSizeGetter;this._cellCount=e,this._estimatedCellSize=A,this._cellSizeGetter=n}},{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(t){if(t<0||t>=this._cellCount)throw Error("Requested index ".concat(t," is outside of range 0..").concat(this._cellCount));if(t>this._lastMeasuredIndex)for(var e=this.getSizeAndPositionOfLastMeasuredCell(),A=e.offset+e.size,n=this._lastMeasuredIndex+1;n<=t;n++){var r=this._cellSizeGetter({index:n});if(void 0===r||isNaN(r))throw Error("Invalid size returned for cell ".concat(n," of value ").concat(r));null===r?(this._cellSizeAndPositionData[n]={offset:A,size:0},this._lastBatchedIndex=t):(this._cellSizeAndPositionData[n]={offset:A,size:r},A+=r,this._lastMeasuredIndex=t)}return this._cellSizeAndPositionData[t]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var t=this.getSizeAndPositionOfLastMeasuredCell();return t.offset+t.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(t){var e=t.align,A=void 0===e?"auto":e,n=t.containerSize,r=t.currentOffset,i=t.targetIndex;if(n<=0)return 0;var o,a=this.getSizeAndPositionOfCell(i),s=a.offset,g=s-n+a.size;switch(A){case"start":o=s;break;case"end":o=g;break;case"center":o=s-(n-a.size)/2;break;default:o=Math.max(g,Math.min(s,r))}var c=this.getTotalSize();return Math.max(0,Math.min(c-n,o))}},{key:"getVisibleCellRange",value:function(t){var e=t.containerSize,A=t.offset;if(0===this.getTotalSize())return{};var n=A+e,r=this._findNearestCell(A),i=this.getSizeAndPositionOfCell(r);A=i.offset+i.size;for(var o=r;A<n&&o<this._cellCount-1;)o++,A+=this.getSizeAndPositionOfCell(o).size;return{start:r,stop:o}}},{key:"resetCell",value:function(t){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,t-1)}},{key:"_binarySearch",value:function(t,e,A){for(;e<=t;){var n=e+Math.floor((t-e)/2),r=this.getSizeAndPositionOfCell(n).offset;if(r===A)return n;r<A?e=n+1:r>A&&(t=n-1)}return e>0?e-1:0}},{key:"_exponentialSearch",value:function(t,e){for(var A=1;t<this._cellCount&&this.getSizeAndPositionOfCell(t).offset<e;)t+=A,A*=2;return this._binarySearch(Math.min(t,this._cellCount-1),Math.floor(t/2),e)}},{key:"_findNearestCell",value:function(t){if(isNaN(t))throw Error("Invalid offset ".concat(t," specified"));t=Math.max(0,t);var e=this.getSizeAndPositionOfLastMeasuredCell(),A=Math.max(0,this._lastMeasuredIndex);return e.offset>=t?this._binarySearch(A,0,t):this._exponentialSearch(A,t)}}]),t}()),D=function(){return"undefined"!==typeof window&&window.chrome?16777100:15e5},R=function(){function t(e){var A=e.maxScrollSize,n=void 0===A?D():A,r=w()(e,["maxScrollSize"]);s()(this,t),E()(this,"_cellSizeAndPositionManager",void 0),E()(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new S(r),this._maxScrollSize=n}return c()(t,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(t){this._cellSizeAndPositionManager.configure(t)}},{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(t){var e=t.containerSize,A=t.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:e,offset:A,totalSize:r});return Math.round(i*(r-n))}},{key:"getSizeAndPositionOfCell",value:function(t){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(t)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(t){var e=t.align,A=void 0===e?"auto":e,n=t.containerSize,r=t.currentOffset,i=t.targetIndex;r=this._safeOffsetToOffset({containerSize:n,offset:r});var o=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:A,containerSize:n,currentOffset:r,targetIndex:i});return this._offsetToSafeOffset({containerSize:n,offset:o})}},{key:"getVisibleCellRange",value:function(t){var e=t.containerSize,A=t.offset;return A=this._safeOffsetToOffset({containerSize:e,offset:A}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:e,offset:A})}},{key:"resetCell",value:function(t){this._cellSizeAndPositionManager.resetCell(t)}},{key:"_getOffsetPercentage",value:function(t){var e=t.containerSize,A=t.offset,n=t.totalSize;return n<=e?0:A/(n-e)}},{key:"_offsetToSafeOffset",value:function(t){var e=t.containerSize,A=t.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return A;var i=this._getOffsetPercentage({containerSize:e,offset:A,totalSize:n});return Math.round(i*(r-e))}},{key:"_safeOffsetToOffset",value:function(t){var e=t.containerSize,A=t.offset,n=this._cellSizeAndPositionManager.getTotalSize(),r=this.getTotalSize();if(n===r)return A;var i=this._getOffsetPercentage({containerSize:e,offset:A,totalSize:r});return Math.round(i*(n-e))}}]),t}();function U(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e={};return function(A){var n=A.callback,r=A.indices,i=Object.keys(r),o=!t||i.every((function(t){var e=r[t];return Array.isArray(e)?e.length>0:e>=0})),a=i.length!==Object.keys(e).length||i.some((function(t){var A=e[t],n=r[t];return Array.isArray(n)?A.join(",")!==n.join(","):A!==n}));e=r,o&&a&&n(r)}}function G(t){var e=t.cellSize,A=t.cellSizeAndPositionManager,n=t.previousCellsCount,r=t.previousCellSize,i=t.previousScrollToAlignment,o=t.previousScrollToIndex,a=t.previousSize,s=t.scrollOffset,g=t.scrollToAlignment,c=t.scrollToIndex,I=t.size,u=t.sizeJustIncreasedFromZero,l=t.updateScrollIndexCallback,C=A.getCellCount(),h=c>=0&&c<C;h&&(I!==a||u||!r||"number"===typeof e&&e!==r||g!==i||c!==o)?l(c):!h&&C>0&&(I<a||C<n)&&s>A.getTotalSize()-I&&l(C-1)}var N,k,x=!("undefined"===typeof window||!window.document||!window.document.createElement);function O(t){if((!N&&0!==N||t)&&x){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),N=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return N}var M,L,_=(k="undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).requestAnimationFrame||k.webkitRequestAnimationFrame||k.mozRequestAnimationFrame||k.oRequestAnimationFrame||k.msRequestAnimationFrame||function(t){return k.setTimeout(t,1e3/60)},J=k.cancelAnimationFrame||k.webkitCancelAnimationFrame||k.mozCancelAnimationFrame||k.oCancelAnimationFrame||k.msCancelAnimationFrame||function(t){k.clearTimeout(t)},T=_,j=J,H=function(t){return j(t.id)},Y=function(t,e){var A;Promise.resolve().then((function(){A=Date.now()}));var n={id:T((function r(){Date.now()-A>=e?t.call():n.id=T(r)}))};return n};function V(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Z(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?V(A,!0).forEach((function(e){E()(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):V(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var W="observed",K="requested",P=(L=M=function(t){function e(t){var A;s()(this,e),A=u()(this,C()(e).call(this,t)),E()(B()(A),"_onGridRenderedMemoizer",U()),E()(B()(A),"_onScrollMemoizer",U(!1)),E()(B()(A),"_deferredInvalidateColumnIndex",null),E()(B()(A),"_deferredInvalidateRowIndex",null),E()(B()(A),"_recomputeScrollLeftFlag",!1),E()(B()(A),"_recomputeScrollTopFlag",!1),E()(B()(A),"_horizontalScrollBarSize",0),E()(B()(A),"_verticalScrollBarSize",0),E()(B()(A),"_scrollbarPresenceChanged",!1),E()(B()(A),"_scrollingContainer",void 0),E()(B()(A),"_childrenToDisplay",void 0),E()(B()(A),"_columnStartIndex",void 0),E()(B()(A),"_columnStopIndex",void 0),E()(B()(A),"_rowStartIndex",void 0),E()(B()(A),"_rowStopIndex",void 0),E()(B()(A),"_renderedColumnStartIndex",0),E()(B()(A),"_renderedColumnStopIndex",0),E()(B()(A),"_renderedRowStartIndex",0),E()(B()(A),"_renderedRowStopIndex",0),E()(B()(A),"_initialScrollTop",void 0),E()(B()(A),"_initialScrollLeft",void 0),E()(B()(A),"_disablePointerEventsTimeoutId",void 0),E()(B()(A),"_styleCache",{}),E()(B()(A),"_cellCache",{}),E()(B()(A),"_debounceScrollEndedCallback",(function(){A._disablePointerEventsTimeoutId=null,A.setState({isScrolling:!1,needToResetStyleCache:!1})})),E()(B()(A),"_invokeOnGridRenderedHelper",(function(){var t=A.props.onSectionRendered;A._onGridRenderedMemoizer({callback:t,indices:{columnOverscanStartIndex:A._columnStartIndex,columnOverscanStopIndex:A._columnStopIndex,columnStartIndex:A._renderedColumnStartIndex,columnStopIndex:A._renderedColumnStopIndex,rowOverscanStartIndex:A._rowStartIndex,rowOverscanStopIndex:A._rowStopIndex,rowStartIndex:A._renderedRowStartIndex,rowStopIndex:A._renderedRowStopIndex}})})),E()(B()(A),"_setScrollingContainerRef",(function(t){A._scrollingContainer=t})),E()(B()(A),"_onScroll",(function(t){t.target===A._scrollingContainer&&A.handleScrollEvent(t.target)}));var n=new R({cellCount:t.columnCount,cellSizeGetter:function(A){return e._wrapSizeGetter(t.columnWidth)(A)},estimatedCellSize:e._getEstimatedColumnSize(t)}),r=new R({cellCount:t.rowCount,cellSizeGetter:function(A){return e._wrapSizeGetter(t.rowHeight)(A)},estimatedCellSize:e._getEstimatedRowSize(t)});return A.state={instanceProps:{columnSizeAndPositionManager:n,rowSizeAndPositionManager:r,prevColumnWidth:t.columnWidth,prevRowHeight:t.rowHeight,prevColumnCount:t.columnCount,prevRowCount:t.rowCount,prevIsScrolling:!0===t.isScrolling,prevScrollToColumn:t.scrollToColumn,prevScrollToRow:t.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},t.scrollToRow>0&&(A._initialScrollTop=A._getCalculatedScrollTop(t,A.state)),t.scrollToColumn>0&&(A._initialScrollLeft=A._getCalculatedScrollLeft(t,A.state)),A}return d()(e,t),c()(e,[{key:"getOffsetForCell",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.alignment,A=void 0===e?this.props.scrollToAlignment:e,n=t.columnIndex,r=void 0===n?this.props.scrollToColumn:n,i=t.rowIndex,o=void 0===i?this.props.scrollToRow:i,a=Z({},this.props,{scrollToAlignment:A,scrollToColumn:r,scrollToRow:o});return{scrollLeft:this._getCalculatedScrollLeft(a),scrollTop:this._getCalculatedScrollTop(a)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(t){var e=t.scrollLeft,A=void 0===e?0:e,n=t.scrollTop,r=void 0===n?0:n;if(!(r<0)){this._debounceScrollEnded();var i=this.props,o=i.autoHeight,a=i.autoWidth,s=i.height,g=i.width,c=this.state.instanceProps,I=c.scrollbarSize,u=c.rowSizeAndPositionManager.getTotalSize(),l=c.columnSizeAndPositionManager.getTotalSize(),C=Math.min(Math.max(0,l-g+I),A),h=Math.min(Math.max(0,u-s+I),r);if(this.state.scrollLeft!==C||this.state.scrollTop!==h){var B={isScrolling:!0,scrollDirectionHorizontal:C!==this.state.scrollLeft?C>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:h!==this.state.scrollTop?h>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:W};o||(B.scrollTop=h),a||(B.scrollLeft=C),B.needToResetStyleCache=!1,this.setState(B)}this._invokeOnScrollMemoizer({scrollLeft:C,scrollTop:h,totalColumnsWidth:l,totalRowsHeight:u})}}},{key:"invalidateCellSizeAfterRender",value:function(t){var e=t.columnIndex,A=t.rowIndex;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,e):e,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,A):A}},{key:"measureAllCells",value:function(){var t=this.props,e=t.columnCount,A=t.rowCount,n=this.state.instanceProps;n.columnSizeAndPositionManager.getSizeAndPositionOfCell(e-1),n.rowSizeAndPositionManager.getSizeAndPositionOfCell(A-1)}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,A=void 0===e?0:e,n=t.rowIndex,r=void 0===n?0:n,i=this.props,o=i.scrollToColumn,a=i.scrollToRow,s=this.state.instanceProps;s.columnSizeAndPositionManager.resetCell(A),s.rowSizeAndPositionManager.resetCell(r),this._recomputeScrollLeftFlag=o>=0&&(1===this.state.scrollDirectionHorizontal?A<=o:A>=o),this._recomputeScrollTopFlag=a>=0&&(1===this.state.scrollDirectionVertical?r<=a:r>=a),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(t){var e=t.columnIndex,A=t.rowIndex,n=this.props.columnCount,r=this.props;n>1&&void 0!==e&&this._updateScrollLeftForScrollToColumn(Z({},r,{scrollToColumn:e})),void 0!==A&&this._updateScrollTopForScrollToRow(Z({},r,{scrollToRow:A}))}},{key:"componentDidMount",value:function(){var t=this.props,A=t.getScrollbarSize,n=t.height,r=t.scrollLeft,i=t.scrollToColumn,o=t.scrollTop,a=t.scrollToRow,s=t.width,g=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),g.scrollbarSizeMeasured||this.setState((function(t){var e=Z({},t,{needToResetStyleCache:!1});return e.instanceProps.scrollbarSize=A(),e.instanceProps.scrollbarSizeMeasured=!0,e})),"number"===typeof r&&r>=0||"number"===typeof o&&o>=0){var c=e._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:r,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 I=n>0&&s>0;i>=0&&I&&this._updateScrollLeftForScrollToColumn(),a>=0&&I&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:r||0,scrollTop:o||0,totalColumnsWidth:g.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:g.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(t,e){var A=this,n=this.props,r=n.autoHeight,i=n.autoWidth,o=n.columnCount,a=n.height,s=n.rowCount,g=n.scrollToAlignment,c=n.scrollToColumn,I=n.scrollToRow,u=n.width,l=this.state,C=l.scrollLeft,h=l.scrollPositionChangeReason,B=l.scrollTop,f=l.instanceProps;this._handleInvalidatedGridSize();var d=o>0&&0===t.columnCount||s>0&&0===t.rowCount;h===K&&(!i&&C>=0&&(C!==this._scrollingContainer.scrollLeft||d)&&(this._scrollingContainer.scrollLeft=C),!r&&B>=0&&(B!==this._scrollingContainer.scrollTop||d)&&(this._scrollingContainer.scrollTop=B));var Q=(0===t.width||0===t.height)&&a>0&&u>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):G({cellSizeAndPositionManager:f.columnSizeAndPositionManager,previousCellsCount:t.columnCount,previousCellSize:t.columnWidth,previousScrollToAlignment:t.scrollToAlignment,previousScrollToIndex:t.scrollToColumn,previousSize:t.width,scrollOffset:C,scrollToAlignment:g,scrollToIndex:c,size:u,sizeJustIncreasedFromZero:Q,updateScrollIndexCallback:function(){return A._updateScrollLeftForScrollToColumn(A.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):G({cellSizeAndPositionManager:f.rowSizeAndPositionManager,previousCellsCount:t.rowCount,previousCellSize:t.rowHeight,previousScrollToAlignment:t.scrollToAlignment,previousScrollToIndex:t.scrollToRow,previousSize:t.height,scrollOffset:B,scrollToAlignment:g,scrollToIndex:I,size:a,sizeJustIncreasedFromZero:Q,updateScrollIndexCallback:function(){return A._updateScrollTopForScrollToRow(A.props)}}),this._invokeOnGridRenderedHelper(),C!==e.scrollLeft||B!==e.scrollTop){var E=f.rowSizeAndPositionManager.getTotalSize(),p=f.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:C,scrollTop:B,totalColumnsWidth:p,totalRowsHeight:E})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&H(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,e=t.autoContainerWidth,A=t.autoHeight,n=t.autoWidth,i=t.className,o=t.containerProps,a=t.containerRole,s=t.containerStyle,g=t.height,c=t.id,I=t.noContentRenderer,u=t.role,l=t.style,C=t.tabIndex,h=t.width,B=this.state,f=B.instanceProps,d=B.needToResetStyleCache,Q=this._isScrolling(),E={boxSizing:"border-box",direction:"ltr",height:A?"auto":g,position:"relative",width:n?"auto":h,WebkitOverflowScrolling:"touch",willChange:"transform"};d&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var p=f.columnSizeAndPositionManager.getTotalSize(),y=f.rowSizeAndPositionManager.getTotalSize(),b=y>g?f.scrollbarSize:0,F=p>h?f.scrollbarSize:0;F===this._horizontalScrollBarSize&&b===this._verticalScrollBarSize||(this._horizontalScrollBarSize=F,this._verticalScrollBarSize=b,this._scrollbarPresenceChanged=!0),E.overflowX=p+b<=h?"hidden":"auto",E.overflowY=y+F<=g?"hidden":"auto";var w=this._childrenToDisplay,S=0===w.length&&g>0&&h>0;return r.createElement("div",v()({ref:this._setScrollingContainerRef},o,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:Object(m.a)("ReactVirtualized__Grid",i),id:c,onScroll:this._onScroll,role:u,style:Z({},E,{},l),tabIndex:C}),w.length>0&&r.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:a,style:Z({width:e?"auto":p,height:y,maxWidth:p,maxHeight:y,overflow:"hidden",pointerEvents:Q?"none":"",position:"relative"},s)},w),S&&I())}},{key:"_calculateChildrenToRender",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,A=t.cellRenderer,n=t.cellRangeRenderer,r=t.columnCount,i=t.deferredMeasurementCache,o=t.height,a=t.overscanColumnCount,s=t.overscanIndicesGetter,g=t.overscanRowCount,c=t.rowCount,I=t.width,u=t.isScrollingOptOut,l=e.scrollDirectionHorizontal,C=e.scrollDirectionVertical,h=e.instanceProps,B=this._initialScrollTop>0?this._initialScrollTop:e.scrollTop,f=this._initialScrollLeft>0?this._initialScrollLeft:e.scrollLeft,d=this._isScrolling(t,e);if(this._childrenToDisplay=[],o>0&&I>0){var Q=h.columnSizeAndPositionManager.getVisibleCellRange({containerSize:I,offset:f}),E=h.rowSizeAndPositionManager.getVisibleCellRange({containerSize:o,offset:B}),p=h.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:I,offset:f}),y=h.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:o,offset:B});this._renderedColumnStartIndex=Q.start,this._renderedColumnStopIndex=Q.stop,this._renderedRowStartIndex=E.start,this._renderedRowStopIndex=E.stop;var v=s({direction:"horizontal",cellCount:r,overscanCellsCount:a,scrollDirection:l,startIndex:"number"===typeof Q.start?Q.start:0,stopIndex:"number"===typeof Q.stop?Q.stop:-1}),m=s({direction:"vertical",cellCount:c,overscanCellsCount:g,scrollDirection:C,startIndex:"number"===typeof E.start?E.start:0,stopIndex:"number"===typeof E.stop?E.stop:-1}),b=v.overscanStartIndex,F=v.overscanStopIndex,w=m.overscanStartIndex,S=m.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var D=w;D<=S;D++)if(!i.has(D,0)){b=0,F=r-1;break}if(!i.hasFixedWidth())for(var R=b;R<=F;R++)if(!i.has(0,R)){w=0,S=c-1;break}}this._childrenToDisplay=n({cellCache:this._cellCache,cellRenderer:A,columnSizeAndPositionManager:h.columnSizeAndPositionManager,columnStartIndex:b,columnStopIndex:F,deferredMeasurementCache:i,horizontalOffsetAdjustment:p,isScrolling:d,isScrollingOptOut:u,parent:this,rowSizeAndPositionManager:h.rowSizeAndPositionManager,rowStartIndex:w,rowStopIndex:S,scrollLeft:f,scrollTop:B,styleCache:this._styleCache,verticalOffsetAdjustment:y,visibleColumnIndices:Q,visibleRowIndices:E}),this._columnStartIndex=b,this._columnStopIndex=F,this._rowStartIndex=w,this._rowStopIndex=S}}},{key:"_debounceScrollEnded",value:function(){var t=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&H(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=Y(this._debounceScrollEndedCallback,t)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex&&"number"===typeof this._deferredInvalidateRowIndex){var t=this._deferredInvalidateColumnIndex,e=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:t,rowIndex:e})}}},{key:"_invokeOnScrollMemoizer",value:function(t){var e=this,A=t.scrollLeft,n=t.scrollTop,r=t.totalColumnsWidth,i=t.totalRowsHeight;this._onScrollMemoizer({callback:function(t){var A=t.scrollLeft,n=t.scrollTop,o=e.props,a=o.height;(0,o.onScroll)({clientHeight:a,clientWidth:o.width,scrollHeight:i,scrollLeft:A,scrollTop:n,scrollWidth:r})},indices:{scrollLeft:A,scrollTop:n}})}},{key:"_isScrolling",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(t,"isScrolling")?Boolean(t.isScrolling):Boolean(e.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var t=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,t({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(t){var A=t.scrollLeft,n=t.scrollTop,r=e._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:A,scrollTop:n});r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return e._getCalculatedScrollLeft(t,A)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e._getScrollLeftForScrollToColumnStateUpdate(t,A);n&&(n.needToResetStyleCache=!1,this.setState(n))}},{key:"_getCalculatedScrollTop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return e._getCalculatedScrollTop(t,A)}},{key:"_resetStyleCache",value:function(){var t=this._styleCache,e=this._cellCache,A=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var n=this._rowStartIndex;n<=this._rowStopIndex;n++)for(var r=this._columnStartIndex;r<=this._columnStopIndex;r++){var i="".concat(n,"-").concat(r);this._styleCache[i]=t[i],A&&(this._cellCache[i]=e[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e._getScrollTopForScrollToRowStateUpdate(t,A);n&&(n.needToResetStyleCache=!1,this.setState(n))}}],[{key:"getDerivedStateFromProps",value:function(t,A){var n={};0===t.columnCount&&0!==A.scrollLeft||0===t.rowCount&&0!==A.scrollTop?(n.scrollLeft=0,n.scrollTop=0):(t.scrollLeft!==A.scrollLeft&&t.scrollToColumn<0||t.scrollTop!==A.scrollTop&&t.scrollToRow<0)&&Object.assign(n,e._getScrollToPositionStateUpdate({prevState:A,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}));var r,i,o=A.instanceProps;return n.needToResetStyleCache=!1,t.columnWidth===o.prevColumnWidth&&t.rowHeight===o.prevRowHeight||(n.needToResetStyleCache=!0),o.columnSizeAndPositionManager.configure({cellCount:t.columnCount,estimatedCellSize:e._getEstimatedColumnSize(t),cellSizeGetter:e._wrapSizeGetter(t.columnWidth)}),o.rowSizeAndPositionManager.configure({cellCount:t.rowCount,estimatedCellSize:e._getEstimatedRowSize(t),cellSizeGetter:e._wrapSizeGetter(t.rowHeight)}),0!==o.prevColumnCount&&0!==o.prevRowCount||(o.prevColumnCount=0,o.prevRowCount=0),t.autoHeight&&!1===t.isScrolling&&!0===o.prevIsScrolling&&Object.assign(n,{isScrolling:!1}),b({cellCount:o.prevColumnCount,cellSize:"number"===typeof o.prevColumnWidth?o.prevColumnWidth:null,computeMetadataCallback:function(){return o.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.columnCount,nextCellSize:"number"===typeof t.columnWidth?t.columnWidth:null,nextScrollToIndex:t.scrollToColumn,scrollToIndex:o.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){r=e._getScrollLeftForScrollToColumnStateUpdate(t,A)}}),b({cellCount:o.prevRowCount,cellSize:"number"===typeof o.prevRowHeight?o.prevRowHeight:null,computeMetadataCallback:function(){return o.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.rowCount,nextCellSize:"number"===typeof t.rowHeight?t.rowHeight:null,nextScrollToIndex:t.scrollToRow,scrollToIndex:o.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=e._getScrollTopForScrollToRowStateUpdate(t,A)}}),o.prevColumnCount=t.columnCount,o.prevColumnWidth=t.columnWidth,o.prevIsScrolling=!0===t.isScrolling,o.prevRowCount=t.rowCount,o.prevRowHeight=t.rowHeight,o.prevScrollToColumn=t.scrollToColumn,o.prevScrollToRow=t.scrollToRow,o.scrollbarSize=t.getScrollbarSize(),void 0===o.scrollbarSize?(o.scrollbarSizeMeasured=!1,o.scrollbarSize=0):o.scrollbarSizeMeasured=!0,n.instanceProps=o,Z({},n,{},r,{},i)}},{key:"_getEstimatedColumnSize",value:function(t){return"number"===typeof t.columnWidth?t.columnWidth:t.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(t){return"number"===typeof t.rowHeight?t.rowHeight:t.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(t){var e=t.prevState,A=t.scrollLeft,n=t.scrollTop,r={scrollPositionChangeReason:K};return"number"===typeof A&&A>=0&&(r.scrollDirectionHorizontal=A>e.scrollLeft?1:-1,r.scrollLeft=A),"number"===typeof n&&n>=0&&(r.scrollDirectionVertical=n>e.scrollTop?1:-1,r.scrollTop=n),"number"===typeof A&&A>=0&&A!==e.scrollLeft||"number"===typeof n&&n>=0&&n!==e.scrollTop?r:{}}},{key:"_wrapSizeGetter",value:function(t){return"function"===typeof t?t:function(){return t}}},{key:"_getCalculatedScrollLeft",value:function(t,e){var A=t.columnCount,n=t.height,r=t.scrollToAlignment,i=t.scrollToColumn,o=t.width,a=e.scrollLeft,s=e.instanceProps;if(A>0){var g=A-1,c=i<0?g:Math.min(g,i),I=s.rowSizeAndPositionManager.getTotalSize(),u=s.scrollbarSizeMeasured&&I>n?s.scrollbarSize:0;return s.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:r,containerSize:o-u,currentOffset:a,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(t,A){var n=A.scrollLeft,r=e._getCalculatedScrollLeft(t,A);return"number"===typeof r&&r>=0&&n!==r?e._getScrollToPositionStateUpdate({prevState:A,scrollLeft:r,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(t,e){var A=t.height,n=t.rowCount,r=t.scrollToAlignment,i=t.scrollToRow,o=t.width,a=e.scrollTop,s=e.instanceProps;if(n>0){var g=n-1,c=i<0?g:Math.min(g,i),I=s.columnSizeAndPositionManager.getTotalSize(),u=s.scrollbarSizeMeasured&&I>o?s.scrollbarSize:0;return s.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:r,containerSize:A-u,currentOffset:a,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(t,A){var n=A.scrollTop,r=e._getCalculatedScrollTop(t,A);return"number"===typeof r&&r>=0&&n!==r?e._getScrollToPositionStateUpdate({prevState:A,scrollLeft:-1,scrollTop:r}):{}}}]),e}(r.PureComponent),E()(M,"propTypes",null),L);E()(P,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(t){for(var e=t.cellCache,A=t.cellRenderer,n=t.columnSizeAndPositionManager,r=t.columnStartIndex,i=t.columnStopIndex,o=t.deferredMeasurementCache,a=t.horizontalOffsetAdjustment,s=t.isScrolling,g=t.isScrollingOptOut,c=t.parent,I=t.rowSizeAndPositionManager,u=t.rowStartIndex,l=t.rowStopIndex,C=t.styleCache,h=t.verticalOffsetAdjustment,B=t.visibleColumnIndices,f=t.visibleRowIndices,d=[],Q=n.areOffsetsAdjusted()||I.areOffsetsAdjusted(),E=!s&&!Q,p=u;p<=l;p++)for(var y=I.getSizeAndPositionOfCell(p),v=r;v<=i;v++){var m=n.getSizeAndPositionOfCell(v),b=v>=B.start&&v<=B.stop&&p>=f.start&&p<=f.stop,F="".concat(p,"-").concat(v),w=void 0;E&&C[F]?w=C[F]:o&&!o.has(p,v)?w={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(w={height:y.size,left:m.offset+a,position:"absolute",top:y.offset+h,width:m.size},C[F]=w);var S={columnIndex:v,isScrolling:s,isVisible:b,key:F,parent:c,rowIndex:p,style:w},D=void 0;!g&&!s||a||h?D=A(S):(e[F]||(e[F]=A(S)),D=e[F]),null!=D&&!1!==D&&d.push(D)}return d},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:O,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(t){var e=t.cellCount,A=t.overscanCellsCount,n=t.scrollDirection,r=t.startIndex,i=t.stopIndex;return 1===n?{overscanStartIndex:Math.max(0,r),overscanStopIndex:Math.min(e-1,i+A)}:{overscanStartIndex:Math.max(0,r-A),overscanStopIndex:Math.min(e-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),Object(p.a)(P);var q=P;function X(t){var e=t.cellCount,A=t.overscanCellsCount,n=t.scrollDirection,r=t.startIndex,i=t.stopIndex;return A=Math.max(1,A),1===n?{overscanStartIndex:Math.max(0,r-1),overscanStopIndex:Math.min(e-1,i+A)}:{overscanStartIndex:Math.max(0,r-A),overscanStopIndex:Math.min(e-1,i+1)}}var z,$;function tt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}var et=($=z=function(t){function e(){var t,A;s()(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A=u()(this,(t=C()(e)).call.apply(t,[this].concat(r))),E()(B()(A),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),E()(B()(A),"_columnStartIndex",0),E()(B()(A),"_columnStopIndex",0),E()(B()(A),"_rowStartIndex",0),E()(B()(A),"_rowStopIndex",0),E()(B()(A),"_onKeyDown",(function(t){var e=A.props,n=e.columnCount,r=e.disabled,i=e.mode,o=e.rowCount;if(!r){var a=A._getScrollState(),s=a.scrollToColumn,g=a.scrollToRow,c=A._getScrollState(),I=c.scrollToColumn,u=c.scrollToRow;switch(t.key){case"ArrowDown":u="cells"===i?Math.min(u+1,o-1):Math.min(A._rowStopIndex+1,o-1);break;case"ArrowLeft":I="cells"===i?Math.max(I-1,0):Math.max(A._columnStartIndex-1,0);break;case"ArrowRight":I="cells"===i?Math.min(I+1,n-1):Math.min(A._columnStopIndex+1,n-1);break;case"ArrowUp":u="cells"===i?Math.max(u-1,0):Math.max(A._rowStartIndex-1,0)}I===s&&u===g||(t.preventDefault(),A._updateScrollState({scrollToColumn:I,scrollToRow:u}))}})),E()(B()(A),"_onSectionRendered",(function(t){var e=t.columnStartIndex,n=t.columnStopIndex,r=t.rowStartIndex,i=t.rowStopIndex;A._columnStartIndex=e,A._columnStopIndex=n,A._rowStartIndex=r,A._rowStopIndex=i})),A}return d()(e,t),c()(e,[{key:"setScrollIndexes",value:function(t){var e=t.scrollToColumn,A=t.scrollToRow;this.setState({scrollToRow:A,scrollToColumn:e})}},{key:"render",value:function(){var t=this.props,e=t.className,A=t.children,n=this._getScrollState(),i=n.scrollToColumn,o=n.scrollToRow;return r.createElement("div",{className:e,onKeyDown:this._onKeyDown},A({onSectionRendered:this._onSectionRendered,scrollToColumn:i,scrollToRow:o}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(t){var e=t.scrollToColumn,A=t.scrollToRow,n=this.props,r=n.isControlled,i=n.onScrollToChange;"function"===typeof i&&i({scrollToColumn:e,scrollToRow:A}),r||this.setState({scrollToColumn:e,scrollToRow:A})}}],[{key:"getDerivedStateFromProps",value:function(t,e){return t.isControlled?{}:t.scrollToColumn!==e.instanceProps.prevScrollToColumn||t.scrollToRow!==e.instanceProps.prevScrollToRow?function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?tt(A,!0).forEach((function(e){E()(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):tt(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},e,{scrollToColumn:t.scrollToColumn,scrollToRow:t.scrollToRow,instanceProps:{prevScrollToColumn:t.scrollToColumn,prevScrollToRow:t.scrollToRow}}):{}}}]),e}(r.PureComponent),E()(z,"propTypes",null),$);E()(et,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),Object(p.a)(et);var At,nt,rt=A(826);function it(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function ot(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?it(A,!0).forEach((function(e){E()(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):it(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var at=(nt=At=function(t){function e(){var t,A;s()(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A=u()(this,(t=C()(e)).call.apply(t,[this].concat(r))),E()(B()(A),"state",{height:A.props.defaultHeight||0,width:A.props.defaultWidth||0}),E()(B()(A),"_parentNode",void 0),E()(B()(A),"_autoSizer",void 0),E()(B()(A),"_window",void 0),E()(B()(A),"_detectElementResize",void 0),E()(B()(A),"_onResize",(function(){var t=A.props,e=t.disableHeight,n=t.disableWidth,r=t.onResize;if(A._parentNode){var i=A._parentNode.offsetHeight||0,o=A._parentNode.offsetWidth||0,a=(A._window||window).getComputedStyle(A._parentNode)||{},s=parseInt(a.paddingLeft,10)||0,g=parseInt(a.paddingRight,10)||0,c=parseInt(a.paddingTop,10)||0,I=parseInt(a.paddingBottom,10)||0,u=i-c-I,l=o-s-g;(!e&&A.state.height!==u||!n&&A.state.width!==l)&&(A.setState({height:i-c-I,width:o-s-g}),r({height:i,width:o}))}})),E()(B()(A),"_setRef",(function(t){A._autoSizer=t})),A}return d()(e,t),c()(e,[{key:"componentDidMount",value:function(){var t=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(rt.a)(t,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 t=this.props,e=t.children,A=t.className,n=t.disableHeight,i=t.disableWidth,o=t.style,a=this.state,s=a.height,g=a.width,c={overflow:"visible"},I={};return n||(c.height=0,I.height=s),i||(c.width=0,I.width=g),r.createElement("div",{className:A,ref:this._setRef,style:ot({},c,{},o)},e(I))}}]),e}(r.Component),E()(At,"propTypes",null),nt);E()(at,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var st,gt,ct=A(68),It=(gt=st=function(t){function e(){var t,A;s()(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A=u()(this,(t=C()(e)).call.apply(t,[this].concat(r))),E()(B()(A),"_child",void 0),E()(B()(A),"_measure",(function(){var t=A.props,e=t.cache,n=t.columnIndex,r=void 0===n?0:n,i=t.parent,o=t.rowIndex,a=void 0===o?A.props.index||0:o,s=A._getCellMeasurements(),g=s.height,c=s.width;g===e.getHeight(a,r)&&c===e.getWidth(a,r)||(e.set(a,r,c,g),i&&"function"===typeof i.recomputeGridSize&&i.recomputeGridSize({columnIndex:r,rowIndex:a}))})),E()(B()(A),"_registerChild",(function(t){!t||t instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),A._child=t,t&&A._maybeMeasureCell()})),A}return d()(e,t),c()(e,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var t=this.props.children;return"function"===typeof t?t({measure:this._measure,registerChild:this._registerChild}):t}},{key:"_getCellMeasurements",value:function(){var t=this.props.cache,e=this._child||Object(ct.findDOMNode)(this);if(e&&e.ownerDocument&&e.ownerDocument.defaultView&&e instanceof e.ownerDocument.defaultView.HTMLElement){var A=e.style.width,n=e.style.height;t.hasFixedWidth()||(e.style.width="auto"),t.hasFixedHeight()||(e.style.height="auto");var r=Math.ceil(e.offsetHeight),i=Math.ceil(e.offsetWidth);return A&&(e.style.width=A),n&&(e.style.height=n),{height:r,width:i}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var t=this.props,e=t.cache,A=t.columnIndex,n=void 0===A?0:A,r=t.parent,i=t.rowIndex,o=void 0===i?this.props.index||0:i;if(!e.has(o,n)){var a=this._getCellMeasurements(),s=a.height,g=a.width;e.set(o,n,g,s),r&&"function"===typeof r.invalidateCellSizeAfterRender&&r.invalidateCellSizeAfterRender({columnIndex:n,rowIndex:o})}}}]),e}(r.PureComponent),E()(st,"propTypes",null),gt);E()(It,"__internalCellMeasurerFlag",!1);function ut(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function lt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?ut(A,!0).forEach((function(e){E()(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):ut(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var Ct="observed",ht="requested",Bt=function(t){function e(){var t,A;s()(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A=u()(this,(t=C()(e)).call.apply(t,[this].concat(r))),E()(B()(A),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),E()(B()(A),"_calculateSizeAndPositionDataOnNextUpdate",!1),E()(B()(A),"_onSectionRenderedMemoizer",U()),E()(B()(A),"_onScrollMemoizer",U(!1)),E()(B()(A),"_invokeOnSectionRenderedHelper",(function(){var t=A.props,e=t.cellLayoutManager,n=t.onSectionRendered;A._onSectionRenderedMemoizer({callback:n,indices:{indices:e.getLastRenderedIndices()}})})),E()(B()(A),"_setScrollingContainerRef",(function(t){A._scrollingContainer=t})),E()(B()(A),"_updateScrollPositionForScrollToCell",(function(){var t=A.props,e=t.cellLayoutManager,n=t.height,r=t.scrollToAlignment,i=t.scrollToCell,o=t.width,a=A.state,s=a.scrollLeft,g=a.scrollTop;if(i>=0){var c=e.getScrollPositionForCell({align:r,cellIndex:i,height:n,scrollLeft:s,scrollTop:g,width:o});c.scrollLeft===s&&c.scrollTop===g||A._setScrollPosition(c)}})),E()(B()(A),"_onScroll",(function(t){if(t.target===A._scrollingContainer){A._enablePointerEventsAfterDelay();var e=A.props,n=e.cellLayoutManager,r=e.height,i=e.isScrollingChange,o=e.width,a=A._scrollbarSize,s=n.getTotalSize(),g=s.height,c=s.width,I=Math.max(0,Math.min(c-o+a,t.target.scrollLeft)),u=Math.max(0,Math.min(g-r+a,t.target.scrollTop));if(A.state.scrollLeft!==I||A.state.scrollTop!==u){var l=t.cancelable?Ct:ht;A.state.isScrolling||i(!0),A.setState({isScrolling:!0,scrollLeft:I,scrollPositionChangeReason:l,scrollTop:u})}A._invokeOnScrollMemoizer({scrollLeft:I,scrollTop:u,totalWidth:c,totalHeight:g})}})),A._scrollbarSize=O(),void 0===A._scrollbarSize?(A._scrollbarSizeMeasured=!1,A._scrollbarSize=0):A._scrollbarSizeMeasured=!0,A}return d()(e,t),c()(e,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var t=this.props,e=t.cellLayoutManager,A=t.scrollLeft,n=t.scrollToCell,r=t.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=O(),this._scrollbarSizeMeasured=!0,this.setState({})),n>=0?this._updateScrollPositionForScrollToCell():(A>=0||r>=0)&&this._setScrollPosition({scrollLeft:A,scrollTop:r}),this._invokeOnSectionRenderedHelper();var i=e.getTotalSize(),o=i.height,a=i.width;this._invokeOnScrollMemoizer({scrollLeft:A||0,scrollTop:r||0,totalHeight:o,totalWidth:a})}},{key:"componentDidUpdate",value:function(t,e){var A=this.props,n=A.height,r=A.scrollToAlignment,i=A.scrollToCell,o=A.width,a=this.state,s=a.scrollLeft,g=a.scrollPositionChangeReason,c=a.scrollTop;g===ht&&(s>=0&&s!==e.scrollLeft&&s!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=s),c>=0&&c!==e.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),n===t.height&&r===t.scrollToAlignment&&i===t.scrollToCell&&o===t.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,e=t.autoHeight,A=t.cellCount,n=t.cellLayoutManager,i=t.className,o=t.height,a=t.horizontalOverscanSize,s=t.id,g=t.noContentRenderer,c=t.style,I=t.verticalOverscanSize,u=t.width,l=this.state,C=l.isScrolling,h=l.scrollLeft,B=l.scrollTop;(this._lastRenderedCellCount!==A||this._lastRenderedCellLayoutManager!==n||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=A,this._lastRenderedCellLayoutManager=n,this._calculateSizeAndPositionDataOnNextUpdate=!1,n.calculateSizeAndPositionData());var f=n.getTotalSize(),d=f.height,Q=f.width,E=Math.max(0,h-a),p=Math.max(0,B-I),y=Math.min(Q,h+u+a),v=Math.min(d,B+o+I),b=o>0&&u>0?n.cellRenderers({height:v-p,isScrolling:C,width:y-E,x:E,y:p}):[],F={boxSizing:"border-box",direction:"ltr",height:e?"auto":o,position:"relative",WebkitOverflowScrolling:"touch",width:u,willChange:"transform"},w=d>o?this._scrollbarSize:0,S=Q>u?this._scrollbarSize:0;return F.overflowX=Q+w<=u?"hidden":"auto",F.overflowY=d+S<=o?"hidden":"auto",r.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Object(m.a)("ReactVirtualized__Collection",i),id:s,onScroll:this._onScroll,role:"grid",style:lt({},F,{},c),tabIndex:0},A>0&&r.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:d,maxHeight:d,maxWidth:Q,overflow:"hidden",pointerEvents:C?"none":"",width:Q}},b),0===A&&g())}},{key:"_enablePointerEventsAfterDelay",value:function(){var t=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,t.props.isScrollingChange)(!1),t._disablePointerEventsTimeoutId=null,t.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(t){var e=this,A=t.scrollLeft,n=t.scrollTop,r=t.totalHeight,i=t.totalWidth;this._onScrollMemoizer({callback:function(t){var A=t.scrollLeft,n=t.scrollTop,o=e.props,a=o.height;(0,o.onScroll)({clientHeight:a,clientWidth:o.width,scrollHeight:r,scrollLeft:A,scrollTop:n,scrollWidth:i})},indices:{scrollLeft:A,scrollTop:n}})}},{key:"_setScrollPosition",value:function(t){var e=t.scrollLeft,A=t.scrollTop,n={scrollPositionChangeReason:ht};e>=0&&(n.scrollLeft=e),A>=0&&(n.scrollTop=A),(e>=0&&e!==this.state.scrollLeft||A>=0&&A!==this.state.scrollTop)&&this.setState(n)}}],[{key:"getDerivedStateFromProps",value:function(t,e){return 0!==t.cellCount||0===e.scrollLeft&&0===e.scrollTop?t.scrollLeft!==e.scrollLeft||t.scrollTop!==e.scrollTop?{scrollLeft:null!=t.scrollLeft?t.scrollLeft:e.scrollLeft,scrollTop:null!=t.scrollTop?t.scrollTop:e.scrollTop,scrollPositionChangeReason:ht}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:ht}}}]),e}(r.PureComponent);E()(Bt,"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}),Bt.propTypes={},Object(p.a)(Bt);var ft=Bt,dt=function(){function t(e){var A=e.height,n=e.width,r=e.x,i=e.y;s()(this,t),this.height=A,this.width=n,this.x=r,this.y=i,this._indexMap={},this._indices=[]}return c()(t,[{key:"addCellIndex",value:function(t){var e=t.index;this._indexMap[e]||(this._indexMap[e]=!0,this._indices.push(e))}},{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)}}]),t}(),Qt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;s()(this,t),this._sectionSize=e,this._cellMetadata=[],this._sections={}}return c()(t,[{key:"getCellIndices",value:function(t){var e=t.height,A=t.width,n=t.x,r=t.y,i={};return this.getSections({height:e,width:A,x:n,y:r}).forEach((function(t){return t.getCellIndices().forEach((function(t){i[t]=t}))})),Object.keys(i).map((function(t){return i[t]}))}},{key:"getCellMetadata",value:function(t){var e=t.index;return this._cellMetadata[e]}},{key:"getSections",value:function(t){for(var e=t.height,A=t.width,n=t.x,r=t.y,i=Math.floor(n/this._sectionSize),o=Math.floor((n+A-1)/this._sectionSize),a=Math.floor(r/this._sectionSize),s=Math.floor((r+e-1)/this._sectionSize),g=[],c=i;c<=o;c++)for(var I=a;I<=s;I++){var u="".concat(c,".").concat(I);this._sections[u]||(this._sections[u]=new dt({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:I*this._sectionSize})),g.push(this._sections[u])}return g}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var t=this;return Object.keys(this._sections).map((function(e){return t._sections[e].toString()}))}},{key:"registerCell",value:function(t){var e=t.cellMetadatum,A=t.index;this._cellMetadata[A]=e,this.getSections(e).forEach((function(t){return t.addCellIndex({index:A})}))}}]),t}();function Et(t){var e=t.align,A=void 0===e?"auto":e,n=t.cellOffset,r=t.cellSize,i=t.containerSize,o=t.currentOffset,a=n,s=a-i+r;switch(A){case"start":return a;case"end":return s;case"center":return a-(i-r)/2;default:return Math.max(s,Math.min(a,o))}}var pt=function(t){function e(t,A){var n;return s()(this,e),(n=u()(this,C()(e).call(this,t,A)))._cellMetadata=[],n._lastRenderedCellIndices=[],n._cellCache=[],n._isScrollingChange=n._isScrollingChange.bind(B()(n)),n._setCollectionViewRef=n._setCollectionViewRef.bind(B()(n)),n}return d()(e,t),c()(e,[{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 t=v()({},this.props);return r.createElement(ft,v()({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},t))}},{key:"calculateSizeAndPositionData",value:function(){var t=this.props,e=function(t){for(var e=t.cellCount,A=t.cellSizeAndPositionGetter,n=t.sectionSize,r=[],i=new Qt(n),o=0,a=0,s=0;s<e;s++){var g=A({index:s});if(null==g.height||isNaN(g.height)||null==g.width||isNaN(g.width)||null==g.x||isNaN(g.x)||null==g.y||isNaN(g.y))throw Error("Invalid metadata returned for cell ".concat(s,":\n        x:").concat(g.x,", y:").concat(g.y,", width:").concat(g.width,", height:").concat(g.height));o=Math.max(o,g.y+g.height),a=Math.max(a,g.x+g.width),r[s]=g,i.registerCell({cellMetadatum:g,index:s})}return{cellMetadata:r,height:o,sectionManager:i,width:a}}({cellCount:t.cellCount,cellSizeAndPositionGetter:t.cellSizeAndPositionGetter,sectionSize:t.sectionSize});this._cellMetadata=e.cellMetadata,this._sectionManager=e.sectionManager,this._height=e.height,this._width=e.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(t){var e=t.align,A=t.cellIndex,n=t.height,r=t.scrollLeft,i=t.scrollTop,o=t.width,a=this.props.cellCount;if(A>=0&&A<a){var s=this._cellMetadata[A];r=Et({align:e,cellOffset:s.x,cellSize:s.width,containerSize:o,currentOffset:r,targetIndex:A}),i=Et({align:e,cellOffset:s.y,cellSize:s.height,containerSize:n,currentOffset:i,targetIndex:A})}return{scrollLeft:r,scrollTop:i}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(t){var e=this,A=t.height,n=t.isScrolling,r=t.width,i=t.x,o=t.y,a=this.props,s=a.cellGroupRenderer,g=a.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:A,width:r,x:i,y:o}),s({cellCache:this._cellCache,cellRenderer:g,cellSizeAndPositionGetter:function(t){var A=t.index;return e._sectionManager.getCellMetadata({index:A})},indices:this._lastRenderedCellIndices,isScrolling:n})}},{key:"_isScrollingChange",value:function(t){t||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(t){this._collectionView=t}}]),e}(r.PureComponent);E()(pt,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(t){var e=t.cellCache,A=t.cellRenderer,n=t.cellSizeAndPositionGetter,r=t.indices,i=t.isScrolling;return r.map((function(t){var r=n({index:t}),o={index:t,isScrolling:i,key:t,style:{height:r.height,left:r.x,position:"absolute",top:r.y,width:r.width}};return i?(t in e||(e[t]=A(o)),e[t]):A(o)})).filter((function(t){return!!t}))}}),pt.propTypes={};var yt=function(t){function e(t,A){var n;return s()(this,e),(n=u()(this,C()(e).call(this,t,A)))._registerChild=n._registerChild.bind(B()(n)),n}return d()(e,t),c()(e,[{key:"componentDidUpdate",value:function(t){var e=this.props,A=e.columnMaxWidth,n=e.columnMinWidth,r=e.columnCount,i=e.width;A===t.columnMaxWidth&&n===t.columnMinWidth&&r===t.columnCount&&i===t.width||this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var t=this.props,e=t.children,A=t.columnMaxWidth,n=t.columnMinWidth,r=t.columnCount,i=t.width,o=n||1,a=A?Math.min(A,i):i,s=i/r;return s=Math.max(o,s),s=Math.min(a,s),s=Math.floor(s),e({adjustedWidth:Math.min(i,s*r),columnWidth:s,getColumnWidth:function(){return s},registerChild:this._registerChild})}},{key:"_registerChild",value:function(t){if(t&&"function"!==typeof t.recomputeGridSize)throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=t,this._registeredChild&&this._registeredChild.recomputeGridSize()}}]),e}(r.PureComponent);yt.propTypes={};var vt=A(1124),mt=A.n(vt),bt=function(t){function e(t,A){var n;return s()(this,e),(n=u()(this,C()(e).call(this,t,A)))._loadMoreRowsMemoizer=U(),n._onRowsRendered=n._onRowsRendered.bind(B()(n)),n._registerChild=n._registerChild.bind(B()(n)),n}return d()(e,t),c()(e,[{key:"resetLoadMoreRowsCache",value:function(t){this._loadMoreRowsMemoizer=U(),t&&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(t){var e=this,A=this.props.loadMoreRows;t.forEach((function(t){var n=A(t);n&&n.then((function(){(function(t){var e=t.lastRenderedStartIndex,A=t.lastRenderedStopIndex,n=t.startIndex,r=t.stopIndex;return!(n>A||r<e)})({lastRenderedStartIndex:e._lastRenderedStartIndex,lastRenderedStopIndex:e._lastRenderedStopIndex,startIndex:t.startIndex,stopIndex:t.stopIndex})&&e._registeredChild&&function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,A="function"===typeof t.recomputeGridSize?t.recomputeGridSize:t.recomputeRowHeights;A?A.call(t,e):t.forceUpdate()}(e._registeredChild,e._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(t){var e=t.startIndex,A=t.stopIndex;this._lastRenderedStartIndex=e,this._lastRenderedStopIndex=A,this._doStuff(e,A)}},{key:"_doStuff",value:function(t,e){var A,n=this,r=this.props,i=r.isRowLoaded,o=r.minimumBatchSize,a=r.rowCount,s=r.threshold,g=function(t){for(var e=t.isRowLoaded,A=t.minimumBatchSize,n=t.rowCount,r=t.startIndex,i=t.stopIndex,o=[],a=null,s=null,g=r;g<=i;g++){e({index:g})?null!==s&&(o.push({startIndex:a,stopIndex:s}),a=s=null):(s=g,null===a&&(a=g))}if(null!==s){for(var c=Math.min(Math.max(s,a+A-1),n-1),I=s+1;I<=c&&!e({index:I});I++)s=I;o.push({startIndex:a,stopIndex:s})}if(o.length)for(var u=o[0];u.stopIndex-u.startIndex+1<A&&u.startIndex>0;){var l=u.startIndex-1;if(e({index:l}))break;u.startIndex=l}return o}({isRowLoaded:i,minimumBatchSize:o,rowCount:a,startIndex:Math.max(0,t-s),stopIndex:Math.min(a-1,e+s)}),c=(A=[]).concat.apply(A,mt()(g.map((function(t){return[t.startIndex,t.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){n._loadUnloadedRanges(g)},indices:{squashedUnloadedRanges:c}})}},{key:"_registerChild",value:function(t){this._registeredChild=t}}]),e}(r.PureComponent);E()(bt,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),bt.propTypes={};var Ft,wt,St=(wt=Ft=function(t){function e(){var t,A;s()(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A=u()(this,(t=C()(e)).call.apply(t,[this].concat(r))),E()(B()(A),"Grid",void 0),E()(B()(A),"_cellRenderer",(function(t){var e=t.parent,n=t.rowIndex,r=t.style,i=t.isScrolling,o=t.isVisible,a=t.key,s=A.props.rowRenderer,g=Object.getOwnPropertyDescriptor(r,"width");return g&&g.writable&&(r.width="100%"),s({index:n,style:r,isScrolling:i,isVisible:o,key:a,parent:e})})),E()(B()(A),"_setRef",(function(t){A.Grid=t})),E()(B()(A),"_onScroll",(function(t){var e=t.clientHeight,n=t.scrollHeight,r=t.scrollTop;(0,A.props.onScroll)({clientHeight:e,scrollHeight:n,scrollTop:r})})),E()(B()(A),"_onSectionRendered",(function(t){var e=t.rowOverscanStartIndex,n=t.rowOverscanStopIndex,r=t.rowStartIndex,i=t.rowStopIndex;(0,A.props.onRowsRendered)({overscanStartIndex:e,overscanStopIndex:n,startIndex:r,stopIndex:i})})),A}return d()(e,t),c()(e,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(t){var e=t.alignment,A=t.index;return this.Grid?this.Grid.getOffsetForCell({alignment:e,rowIndex:A,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(t){var e=t.columnIndex,A=t.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:A,columnIndex:e})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,A=void 0===e?0:e,n=t.rowIndex,r=void 0===n?0:n;this.Grid&&this.Grid.recomputeGridSize({rowIndex:r,columnIndex:A})}},{key:"recomputeRowHeights",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:t,columnIndex:0})}},{key:"scrollToPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:t})}},{key:"scrollToRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:t})}},{key:"render",value:function(){var t=this.props,e=t.className,A=t.noRowsRenderer,n=t.scrollToIndex,i=t.width,o=Object(m.a)("ReactVirtualized__List",e);return r.createElement(q,v()({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:o,columnWidth:i,columnCount:1,noContentRenderer:A,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:n}))}}]),e}(r.PureComponent),E()(Ft,"propTypes",null),wt);E()(St,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:X,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});var Dt=A(1125),Rt=A.n(Dt);var Ut={ge:function(t,e,A,n,r){return"function"===typeof A?function(t,e,A,n,r){for(var i=A+1;e<=A;){var o=e+A>>>1;r(t[o],n)>=0?(i=o,A=o-1):e=o+1}return i}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e,A):function(t,e,A,n){for(var r=A+1;e<=A;){var i=e+A>>>1;t[i]>=n?(r=i,A=i-1):e=i+1}return r}(t,void 0===A?0:0|A,void 0===n?t.length-1:0|n,e)},gt:function(t,e,A,n,r){return"function"===typeof A?function(t,e,A,n,r){for(var i=A+1;e<=A;){var o=e+A>>>1;r(t[o],n)>0?(i=o,A=o-1):e=o+1}return i}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e,A):function(t,e,A,n){for(var r=A+1;e<=A;){var i=e+A>>>1;t[i]>n?(r=i,A=i-1):e=i+1}return r}(t,void 0===A?0:0|A,void 0===n?t.length-1:0|n,e)},lt:function(t,e,A,n,r){return"function"===typeof A?function(t,e,A,n,r){for(var i=e-1;e<=A;){var o=e+A>>>1;r(t[o],n)<0?(i=o,e=o+1):A=o-1}return i}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e,A):function(t,e,A,n){for(var r=e-1;e<=A;){var i=e+A>>>1;t[i]<n?(r=i,e=i+1):A=i-1}return r}(t,void 0===A?0:0|A,void 0===n?t.length-1:0|n,e)},le:function(t,e,A,n,r){return"function"===typeof A?function(t,e,A,n,r){for(var i=e-1;e<=A;){var o=e+A>>>1;r(t[o],n)<=0?(i=o,e=o+1):A=o-1}return i}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e,A):function(t,e,A,n){for(var r=e-1;e<=A;){var i=e+A>>>1;t[i]<=n?(r=i,e=i+1):A=i-1}return r}(t,void 0===A?0:0|A,void 0===n?t.length-1:0|n,e)},eq:function(t,e,A,n,r){return"function"===typeof A?function(t,e,A,n,r){for(;e<=A;){var i=e+A>>>1,o=r(t[i],n);if(0===o)return i;o<=0?e=i+1:A=i-1}return-1}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e,A):function(t,e,A,n){for(;e<=A;){var r=e+A>>>1,i=t[r];if(i===n)return r;i<=n?e=r+1:A=r-1}return-1}(t,void 0===A?0:0|A,void 0===n?t.length-1:0|n,e)}};function Gt(t,e,A,n,r){this.mid=t,this.left=e,this.right=A,this.leftPoints=n,this.rightPoints=r,this.count=(e?e.count:0)+(A?A.count:0)+n.length}var Nt=Gt.prototype;function kt(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function xt(t,e){var A=Yt(e);t.mid=A.mid,t.left=A.left,t.right=A.right,t.leftPoints=A.leftPoints,t.rightPoints=A.rightPoints,t.count=A.count}function Ot(t,e){var A=t.intervals([]);A.push(e),xt(t,A)}function Mt(t,e){var A=t.intervals([]),n=A.indexOf(e);return n<0?0:(A.splice(n,1),xt(t,A),1)}function Lt(t,e,A){for(var n=0;n<t.length&&t[n][0]<=e;++n){var r=A(t[n]);if(r)return r}}function _t(t,e,A){for(var n=t.length-1;n>=0&&t[n][1]>=e;--n){var r=A(t[n]);if(r)return r}}function Jt(t,e){for(var A=0;A<t.length;++A){var n=e(t[A]);if(n)return n}}function Tt(t,e){return t-e}function jt(t,e){var A=t[0]-e[0];return A||t[1]-e[1]}function Ht(t,e){var A=t[1]-e[1];return A||t[0]-e[0]}function Yt(t){if(0===t.length)return null;for(var e=[],A=0;A<t.length;++A)e.push(t[A][0],t[A][1]);e.sort(Tt);var n=e[e.length>>1],r=[],i=[],o=[];for(A=0;A<t.length;++A){var a=t[A];a[1]<n?r.push(a):n<a[0]?i.push(a):o.push(a)}var s=o,g=o.slice();return s.sort(jt),g.sort(Ht),new Gt(n,Yt(r),Yt(i),s,g)}function Vt(t){this.root=t}Nt.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},Nt.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?Ot(this,t):this.left.insert(t):this.left=Yt([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?Ot(this,t):this.right.insert(t):this.right=Yt([t]);else{var A=Ut.ge(this.leftPoints,t,jt),n=Ut.ge(this.rightPoints,t,Ht);this.leftPoints.splice(A,0,t),this.rightPoints.splice(n,0,t)}},Nt.remove=function(t){var e=this.count-this.leftPoints;if(t[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(e-1)?Mt(this,t):2===(i=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===i&&(this.count-=1),i):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?Mt(this,t):2===(i=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===i&&(this.count-=1),i):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var A=this,n=this.left;n.right;)A=n,n=n.right;if(A===this)n.right=this.right;else{var r=this.left,i=this.right;A.count-=n.count,A.right=n.left,n.left=r,n.right=i}kt(this,n),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?kt(this,this.left):kt(this,this.right);return 1}for(r=Ut.ge(this.leftPoints,t,jt);r<this.leftPoints.length&&this.leftPoints[r][0]===t[0];++r)if(this.leftPoints[r]===t){this.count-=1,this.leftPoints.splice(r,1);for(i=Ut.ge(this.rightPoints,t,Ht);i<this.rightPoints.length&&this.rightPoints[i][1]===t[1];++i)if(this.rightPoints[i]===t)return this.rightPoints.splice(i,1),1}return 0},Nt.queryPoint=function(t,e){if(t<this.mid){if(this.left)if(A=this.left.queryPoint(t,e))return A;return Lt(this.leftPoints,t,e)}if(t>this.mid){var A;if(this.right)if(A=this.right.queryPoint(t,e))return A;return _t(this.rightPoints,t,e)}return Jt(this.leftPoints,e)},Nt.queryInterval=function(t,e,A){var n;if(t<this.mid&&this.left&&(n=this.left.queryInterval(t,e,A)))return n;if(e>this.mid&&this.right&&(n=this.right.queryInterval(t,e,A)))return n;return e<this.mid?Lt(this.leftPoints,e,A):t>this.mid?_t(this.rightPoints,t,A):Jt(this.leftPoints,A)};var Zt=Vt.prototype;Zt.insert=function(t){this.root?this.root.insert(t):this.root=new Gt(t[0],null,null,[t],[t])},Zt.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},Zt.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},Zt.queryInterval=function(t,e,A){if(t<=e&&this.root)return this.root.queryInterval(t,e,A)},Object.defineProperty(Zt,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Zt,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var Wt,Kt,Pt=function(){function t(){var e;s()(this,t),E()(this,"_columnSizeMap",{}),E()(this,"_intervalTree",e&&0!==e.length?new Vt(Yt(e)):new Vt(null)),E()(this,"_leftMap",{})}return c()(t,[{key:"estimateTotalHeight",value:function(t,e,A){var n=t-this.count;return this.tallestColumnSize+Math.ceil(n/e)*A}},{key:"range",value:function(t,e,A){var n=this;this._intervalTree.queryInterval(t,t+e,(function(t){var e=Rt()(t,3),r=e[0],i=(e[1],e[2]);return A(i,n._leftMap[i],r)}))}},{key:"setPosition",value:function(t,e,A,n){this._intervalTree.insert([A,A+n,t]),this._leftMap[t]=e;var r=this._columnSizeMap,i=r[e];r[e]=void 0===i?A+n:Math.max(i,A+n)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var t=this._columnSizeMap,e=0;for(var A in t){var n=t[A];e=0===e?n:Math.min(e,n)}return e}},{key:"tallestColumnSize",get:function(){var t=this._columnSizeMap,e=0;for(var A in t){var n=t[A];e=Math.max(e,n)}return e}}]),t}();function qt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Xt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?qt(A,!0).forEach((function(e){E()(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):qt(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var zt=(Kt=Wt=function(t){function e(){var t,A;s()(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A=u()(this,(t=C()(e)).call.apply(t,[this].concat(r))),E()(B()(A),"state",{isScrolling:!1,scrollTop:0}),E()(B()(A),"_debounceResetIsScrollingId",void 0),E()(B()(A),"_invalidateOnUpdateStartIndex",null),E()(B()(A),"_invalidateOnUpdateStopIndex",null),E()(B()(A),"_positionCache",new Pt),E()(B()(A),"_startIndex",null),E()(B()(A),"_startIndexMemoized",null),E()(B()(A),"_stopIndex",null),E()(B()(A),"_stopIndexMemoized",null),E()(B()(A),"_debounceResetIsScrollingCallback",(function(){A.setState({isScrolling:!1})})),E()(B()(A),"_setScrollingContainerRef",(function(t){A._scrollingContainer=t})),E()(B()(A),"_onScroll",(function(t){var e=A.props.height,n=t.currentTarget.scrollTop,r=Math.min(Math.max(0,A._getEstimatedTotalHeight()-e),n);n===r&&(A._debounceResetIsScrolling(),A.state.scrollTop!==r&&A.setState({isScrolling:!0,scrollTop:r}))})),A}return d()(e,t),c()(e,[{key:"clearCellPositions",value:function(){this._positionCache=new Pt,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(t){var e=t.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=e,this._invalidateOnUpdateStopIndex=e):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,e),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,e))}},{key:"recomputeCellPositions",value:function(){var t=this._positionCache.count-1;this._positionCache=new Pt,this._populatePositionCache(0,t),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(t,e){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==t.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&H(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var t,e=this,A=this.props,n=A.autoHeight,i=A.cellCount,o=A.cellMeasurerCache,a=A.cellRenderer,s=A.className,g=A.height,c=A.id,I=A.keyMapper,u=A.overscanByPixels,l=A.role,C=A.style,h=A.tabIndex,B=A.width,f=A.rowDirection,d=this.state,Q=d.isScrolling,p=d.scrollTop,y=[],v=this._getEstimatedTotalHeight(),b=this._positionCache.shortestColumnSize,F=this._positionCache.count,w=0;if(this._positionCache.range(Math.max(0,p-u),g+2*u,(function(A,n,r){var i;"undefined"===typeof t?(w=A,t=A):(w=Math.min(w,A),t=Math.max(t,A)),y.push(a({index:A,isScrolling:Q,key:I(A),parent:e,style:(i={height:o.getHeight(A)},E()(i,"ltr"===f?"left":"right",n),E()(i,"position","absolute"),E()(i,"top",r),E()(i,"width",o.getWidth(A)),i)}))})),b<p+g+u&&F<i)for(var S=Math.min(i-F,Math.ceil((p+g+u-b)/o.defaultHeight*B/o.defaultWidth)),D=F;D<F+S;D++)t=D,y.push(a({index:D,isScrolling:Q,key:I(D),parent:this,style:{width:o.getWidth(D)}}));return this._startIndex=w,this._stopIndex=t,r.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Object(m.a)("ReactVirtualized__Masonry",s),id:c,onScroll:this._onScroll,role:l,style:Xt({boxSizing:"border-box",direction:"ltr",height:n?"auto":g,overflowX:"hidden",overflowY:v<g?"hidden":"auto",position:"relative",width:B,WebkitOverflowScrolling:"touch",willChange:"transform"},C),tabIndex:h},r.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:v,maxWidth:"100%",maxHeight:v,overflow:"hidden",pointerEvents:Q?"none":"",position:"relative"}},y))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"===typeof this._invalidateOnUpdateStartIndex){var t=this._invalidateOnUpdateStartIndex,e=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(t,e),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var t=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&H(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=Y(this._debounceResetIsScrollingCallback,t)}},{key:"_getEstimatedTotalHeight",value:function(){var t=this.props,e=t.cellCount,A=t.cellMeasurerCache,n=t.width,r=Math.max(1,Math.floor(n/A.defaultWidth));return this._positionCache.estimateTotalHeight(e,r,A.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var t=this.props,e=t.height,A=t.onScroll,n=this.state.scrollTop;this._onScrollMemoized!==n&&(A({clientHeight:e,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:n}),this._onScrollMemoized=n)}},{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(t,e){for(var A=this.props,n=A.cellMeasurerCache,r=A.cellPositioner,i=t;i<=e;i++){var o=r(i),a=o.left,s=o.top;this._positionCache.setPosition(i,a,s,n.getHeight(i))}}}],[{key:"getDerivedStateFromProps",value:function(t,e){return void 0!==t.scrollTop&&e.scrollTop!==t.scrollTop?{isScrolling:!0,scrollTop:t.scrollTop}:null}}]),e}(r.PureComponent),E()(Wt,"propTypes",null),Kt);function $t(){}E()(zt,"defaultProps",{autoHeight:!1,keyMapper:function(t){return t},onCellsRendered:$t,onScroll:$t,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"});Object(p.a)(zt);var te=function(){function t(){var e=this,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,t),E()(this,"_cellMeasurerCache",void 0),E()(this,"_columnIndexOffset",void 0),E()(this,"_rowIndexOffset",void 0),E()(this,"columnWidth",(function(t){var A=t.index;e._cellMeasurerCache.columnWidth({index:A+e._columnIndexOffset})})),E()(this,"rowHeight",(function(t){var A=t.index;e._cellMeasurerCache.rowHeight({index:A+e._rowIndexOffset})}));var n=A.cellMeasurerCache,r=A.columnIndexOffset,i=void 0===r?0:r,o=A.rowIndexOffset,a=void 0===o?0:o;this._cellMeasurerCache=n,this._columnIndexOffset=i,this._rowIndexOffset=a}return c()(t,[{key:"clear",value:function(t,e){this._cellMeasurerCache.clear(t+this._rowIndexOffset,e+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(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(t+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"getWidth",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(t+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"has",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(t+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"set",value:function(t,e,A,n){this._cellMeasurerCache.set(t+this._rowIndexOffset,e+this._columnIndexOffset,A,n)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),t}();function ee(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Ae(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?ee(A,!0).forEach((function(e){E()(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):ee(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var ne=function(t){function e(t,A){var n;s()(this,e),n=u()(this,C()(e).call(this,t,A)),E()(B()(n),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),E()(B()(n),"_deferredInvalidateColumnIndex",null),E()(B()(n),"_deferredInvalidateRowIndex",null),E()(B()(n),"_bottomLeftGridRef",(function(t){n._bottomLeftGrid=t})),E()(B()(n),"_bottomRightGridRef",(function(t){n._bottomRightGrid=t})),E()(B()(n),"_cellRendererBottomLeftGrid",(function(t){var e=t.rowIndex,A=w()(t,["rowIndex"]),i=n.props,o=i.cellRenderer,a=i.fixedRowCount;return e===i.rowCount-a?r.createElement("div",{key:A.key,style:Ae({},A.style,{height:20})}):o(Ae({},A,{parent:B()(n),rowIndex:e+a}))})),E()(B()(n),"_cellRendererBottomRightGrid",(function(t){var e=t.columnIndex,A=t.rowIndex,r=w()(t,["columnIndex","rowIndex"]),i=n.props,o=i.cellRenderer,a=i.fixedColumnCount,s=i.fixedRowCount;return o(Ae({},r,{columnIndex:e+a,parent:B()(n),rowIndex:A+s}))})),E()(B()(n),"_cellRendererTopRightGrid",(function(t){var e=t.columnIndex,A=w()(t,["columnIndex"]),i=n.props,o=i.cellRenderer,a=i.columnCount,s=i.fixedColumnCount;return e===a-s?r.createElement("div",{key:A.key,style:Ae({},A.style,{width:20})}):o(Ae({},A,{columnIndex:e+s,parent:B()(n)}))})),E()(B()(n),"_columnWidthRightGrid",(function(t){var e=t.index,A=n.props,r=A.columnCount,i=A.fixedColumnCount,o=A.columnWidth,a=n.state,s=a.scrollbarSize;return a.showHorizontalScrollbar&&e===r-i?s:"function"===typeof o?o({index:e+i}):o})),E()(B()(n),"_onScroll",(function(t){var e=t.scrollLeft,A=t.scrollTop;n.setState({scrollLeft:e,scrollTop:A});var r=n.props.onScroll;r&&r(t)})),E()(B()(n),"_onScrollbarPresenceChange",(function(t){var e=t.horizontal,A=t.size,r=t.vertical,i=n.state,o=i.showHorizontalScrollbar,a=i.showVerticalScrollbar;if(e!==o||r!==a){n.setState({scrollbarSize:A,showHorizontalScrollbar:e,showVerticalScrollbar:r});var s=n.props.onScrollbarPresenceChange;"function"===typeof s&&s({horizontal:e,size:A,vertical:r})}})),E()(B()(n),"_onScrollLeft",(function(t){var e=t.scrollLeft;n._onScroll({scrollLeft:e,scrollTop:n.state.scrollTop})})),E()(B()(n),"_onScrollTop",(function(t){var e=t.scrollTop;n._onScroll({scrollTop:e,scrollLeft:n.state.scrollLeft})})),E()(B()(n),"_rowHeightBottomGrid",(function(t){var e=t.index,A=n.props,r=A.fixedRowCount,i=A.rowCount,o=A.rowHeight,a=n.state,s=a.scrollbarSize;return a.showVerticalScrollbar&&e===i-r?s:"function"===typeof o?o({index:e+r}):o})),E()(B()(n),"_topLeftGridRef",(function(t){n._topLeftGrid=t})),E()(B()(n),"_topRightGridRef",(function(t){n._topRightGrid=t}));var i=t.deferredMeasurementCache,o=t.fixedColumnCount,a=t.fixedRowCount;return n._maybeCalculateCachedStyles(!0),i&&(n._deferredMeasurementCacheBottomLeftGrid=a>0?new te({cellMeasurerCache:i,columnIndexOffset:0,rowIndexOffset:a}):i,n._deferredMeasurementCacheBottomRightGrid=o>0||a>0?new te({cellMeasurerCache:i,columnIndexOffset:o,rowIndexOffset:a}):i,n._deferredMeasurementCacheTopRightGrid=o>0?new te({cellMeasurerCache:i,columnIndexOffset:o,rowIndexOffset:0}):i),n}return d()(e,t),c()(e,[{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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,A=void 0===e?0:e,n=t.rowIndex,r=void 0===n?0:n;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,A):A,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,r):r}},{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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,A=void 0===e?0:e,n=t.rowIndex,r=void 0===n?0:n,i=this.props,o=i.fixedColumnCount,a=i.fixedRowCount,s=Math.max(0,A-o),g=Math.max(0,r-a);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:A,rowIndex:g}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:s,rowIndex:g}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:A,rowIndex:r}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:s,rowIndex:r}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var t=this.props,e=t.scrollLeft,A=t.scrollTop;if(e>0||A>0){var n={};e>0&&(n.scrollLeft=e),A>0&&(n.scrollTop=A),this.setState(n)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var t=this.props,e=t.onScroll,A=t.onSectionRendered,n=(t.onScrollbarPresenceChange,t.scrollLeft,t.scrollToColumn),i=(t.scrollTop,t.scrollToRow),o=w()(t,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var a=this.state,s=a.scrollLeft,g=a.scrollTop;return r.createElement("div",{style:this._containerOuterStyle},r.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(o),this._renderTopRightGrid(Ae({},o,{onScroll:e,scrollLeft:s}))),r.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(Ae({},o,{onScroll:e,scrollTop:g})),this._renderBottomRightGrid(Ae({},o,{onScroll:e,onSectionRendered:A,scrollLeft:s,scrollToColumn:n,scrollToRow:i,scrollTop:g}))))}},{key:"_getBottomGridHeight",value:function(t){return t.height-this._getTopGridHeight(t)}},{key:"_getLeftGridWidth",value:function(t){var e=t.fixedColumnCount,A=t.columnWidth;if(null==this._leftGridWidth)if("function"===typeof A){for(var n=0,r=0;r<e;r++)n+=A({index:r});this._leftGridWidth=n}else this._leftGridWidth=A*e;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(t){return t.width-this._getLeftGridWidth(t)}},{key:"_getTopGridHeight",value:function(t){var e=t.fixedRowCount,A=t.rowHeight;if(null==this._topGridHeight)if("function"===typeof A){for(var n=0,r=0;r<e;r++)n+=A({index:r});this._topGridHeight=n}else this._topGridHeight=A*e;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex){var t=this._deferredInvalidateColumnIndex,e=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:t,rowIndex:e}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(t){var e=this.props,A=e.columnWidth,n=e.enableFixedColumnScroll,r=e.enableFixedRowScroll,i=e.height,o=e.fixedColumnCount,a=e.fixedRowCount,s=e.rowHeight,g=e.style,c=e.styleBottomLeftGrid,I=e.styleBottomRightGrid,u=e.styleTopLeftGrid,l=e.styleTopRightGrid,C=e.width,h=t||i!==this._lastRenderedHeight||C!==this._lastRenderedWidth,B=t||A!==this._lastRenderedColumnWidth||o!==this._lastRenderedFixedColumnCount,f=t||a!==this._lastRenderedFixedRowCount||s!==this._lastRenderedRowHeight;(t||h||g!==this._lastRenderedStyle)&&(this._containerOuterStyle=Ae({height:i,overflow:"visible",width:C},g)),(t||h||f)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:C},this._containerBottomStyle={height:i-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:C}),(t||c!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=Ae({left:0,overflowX:"hidden",overflowY:n?"auto":"hidden",position:"absolute"},c)),(t||B||I!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=Ae({left:this._getLeftGridWidth(this.props),position:"absolute"},I)),(t||u!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=Ae({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},u)),(t||B||l!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=Ae({left:this._getLeftGridWidth(this.props),overflowX:r?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},l)),this._lastRenderedColumnWidth=A,this._lastRenderedFixedColumnCount=o,this._lastRenderedFixedRowCount=a,this._lastRenderedHeight=i,this._lastRenderedRowHeight=s,this._lastRenderedStyle=g,this._lastRenderedStyleBottomLeftGrid=c,this._lastRenderedStyleBottomRightGrid=I,this._lastRenderedStyleTopLeftGrid=u,this._lastRenderedStyleTopRightGrid=l,this._lastRenderedWidth=C}},{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(t){var e=t.enableFixedColumnScroll,A=t.fixedColumnCount,n=t.fixedRowCount,i=t.rowCount,o=t.hideBottomLeftGridScrollbar,a=this.state.showVerticalScrollbar;if(!A)return null;var s=a?1:0,g=this._getBottomGridHeight(t),c=this._getLeftGridWidth(t),I=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,u=o?c+I:c,l=r.createElement(q,v()({},t,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:A,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:g,onScroll:e?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-n)+s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:u}));return o?r.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:Ae({},this._bottomLeftGridStyle,{height:g,width:c,overflowY:"hidden"})},l):l}},{key:"_renderBottomRightGrid",value:function(t){var e=t.columnCount,A=t.fixedColumnCount,n=t.fixedRowCount,i=t.rowCount,o=t.scrollToColumn,a=t.scrollToRow;return r.createElement(q,v()({},t,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,e-A),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(t),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,i-n),rowHeight:this._rowHeightBottomGrid,scrollToColumn:o-A,scrollToRow:a-n,style:this._bottomRightGridStyle,width:this._getRightGridWidth(t)}))}},{key:"_renderTopLeftGrid",value:function(t){var e=t.fixedColumnCount,A=t.fixedRowCount;return e&&A?r.createElement(q,v()({},t,{className:this.props.classNameTopLeftGrid,columnCount:e,height:this._getTopGridHeight(t),ref:this._topLeftGridRef,rowCount:A,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(t)})):null}},{key:"_renderTopRightGrid",value:function(t){var e=t.columnCount,A=t.enableFixedRowScroll,n=t.fixedColumnCount,i=t.fixedRowCount,o=t.scrollLeft,a=t.hideTopRightGridScrollbar,s=this.state,g=s.showHorizontalScrollbar,c=s.scrollbarSize;if(!i)return null;var I=g?1:0,u=this._getTopGridHeight(t),l=this._getRightGridWidth(t),C=g?c:0,h=u,B=this._topRightGridStyle;a&&(h=u+C,B=Ae({},this._topRightGridStyle,{left:0}));var f=r.createElement(q,v()({},t,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,e-n)+I,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:h,onScroll:A?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:o,style:B,tabIndex:null,width:l}));return a?r.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:Ae({},this._topRightGridStyle,{height:u,width:l,overflowX:"hidden"})},f):f}}],[{key:"getDerivedStateFromProps",value:function(t,e){return t.scrollLeft!==e.scrollLeft||t.scrollTop!==e.scrollTop?{scrollLeft:null!=t.scrollLeft&&t.scrollLeft>=0?t.scrollLeft:e.scrollLeft,scrollTop:null!=t.scrollTop&&t.scrollTop>=0?t.scrollTop:e.scrollTop}:null}}]),e}(r.PureComponent);E()(ne,"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}),ne.propTypes={},Object(p.a)(ne);var re=function(t){function e(t,A){var n;return s()(this,e),(n=u()(this,C()(e).call(this,t,A))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},n._onScroll=n._onScroll.bind(B()(n)),n}return d()(e,t),c()(e,[{key:"render",value:function(){var t=this.props.children,e=this.state,A=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,i=e.scrollLeft,o=e.scrollTop,a=e.scrollWidth;return t({clientHeight:A,clientWidth:n,onScroll:this._onScroll,scrollHeight:r,scrollLeft:i,scrollTop:o,scrollWidth:a})}},{key:"_onScroll",value:function(t){var e=t.clientHeight,A=t.clientWidth,n=t.scrollHeight,r=t.scrollLeft,i=t.scrollTop,o=t.scrollWidth;this.setState({clientHeight:e,clientWidth:A,scrollHeight:n,scrollLeft:r,scrollTop:i,scrollWidth:o})}}]),e}(r.PureComponent);re.propTypes={};function ie(t){var e=t.className,A=t.columns,n=t.style;return r.createElement("div",{className:e,role:"row",style:n},A)}ie.propTypes=null;var oe={ASC:"ASC",DESC:"DESC"};function ae(t){var e=t.sortDirection,A=Object(m.a)("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":e===oe.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":e===oe.DESC});return r.createElement("svg",{className:A,width:18,height:18,viewBox:"0 0 24 24"},e===oe.ASC?r.createElement("path",{d:"M7 14l5-5 5 5z"}):r.createElement("path",{d:"M7 10l5 5 5-5z"}),r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function se(t){var e=t.dataKey,A=t.label,n=t.sortBy,i=t.sortDirection,o=n===e,a=[r.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"===typeof A?A:null},A)];return o&&a.push(r.createElement(ae,{key:"SortIndicator",sortDirection:i})),a}function ge(t){var e=t.className,A=t.columns,n=t.index,i=t.key,o=t.onRowClick,a=t.onRowDoubleClick,s=t.onRowMouseOut,g=t.onRowMouseOver,c=t.onRowRightClick,I=t.rowData,u=t.style,l={"aria-rowindex":n+1};return(o||a||s||g||c)&&(l["aria-label"]="row",l.tabIndex=0,o&&(l.onClick=function(t){return o({event:t,index:n,rowData:I})}),a&&(l.onDoubleClick=function(t){return a({event:t,index:n,rowData:I})}),s&&(l.onMouseOut=function(t){return s({event:t,index:n,rowData:I})}),g&&(l.onMouseOver=function(t){return g({event:t,index:n,rowData:I})}),c&&(l.onContextMenu=function(t){return c({event:t,index:n,rowData:I})})),r.createElement("div",v()({},l,{className:e,key:i,role:"row",style:u}),A)}ae.propTypes={},se.propTypes=null,ge.propTypes=null;var ce=function(t){function e(){return s()(this,e),u()(this,C()(e).apply(this,arguments))}return d()(e,t),e}(r.Component);function Ie(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function ue(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Ie(A,!0).forEach((function(e){E()(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Ie(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}E()(ce,"defaultProps",{cellDataGetter:function(t){var e=t.dataKey,A=t.rowData;return"function"===typeof A.get?A.get(e):A[e]},cellRenderer:function(t){var e=t.cellData;return null==e?"":String(e)},defaultSortDirection:oe.ASC,flexGrow:0,flexShrink:1,headerRenderer:se,style:{}}),ce.propTypes={};var le=function(t){function e(t){var A;return s()(this,e),(A=u()(this,C()(e).call(this,t))).state={scrollbarWidth:0},A._createColumn=A._createColumn.bind(B()(A)),A._createRow=A._createRow.bind(B()(A)),A._onScroll=A._onScroll.bind(B()(A)),A._onSectionRendered=A._onSectionRendered.bind(B()(A)),A._setRef=A._setRef.bind(B()(A)),A}return d()(e,t),c()(e,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(t){var e=t.alignment,A=t.index;return this.Grid?this.Grid.getOffsetForCell({alignment:e,rowIndex:A}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(t){var e=t.columnIndex,A=t.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:A,columnIndex:e})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,A=void 0===e?0:e,n=t.rowIndex,r=void 0===n?0:n;this.Grid&&this.Grid.recomputeGridSize({rowIndex:r,columnIndex:A})}},{key:"recomputeRowHeights",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:t})}},{key:"scrollToPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:t})}},{key:"scrollToRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:t})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var t=Object(ct.findDOMNode)(this.Grid),e=t.clientWidth||0;return(t.offsetWidth||0)-e}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var t=this,e=this.props,A=e.children,n=e.className,i=e.disableHeader,o=e.gridClassName,a=e.gridStyle,s=e.headerHeight,g=e.headerRowRenderer,c=e.height,I=e.id,u=e.noRowsRenderer,l=e.rowClassName,C=e.rowStyle,h=e.scrollToIndex,B=e.style,f=e.width,d=this.state.scrollbarWidth,Q=i?c:c-s,E="function"===typeof l?l({index:-1}):l,p="function"===typeof C?C({index:-1}):C;return this._cachedColumnStyles=[],r.Children.toArray(A).forEach((function(e,A){var n=t._getFlexStyleForColumn(e,e.props.style);t._cachedColumnStyles[A]=ue({overflow:"hidden"},n)})),r.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":r.Children.toArray(A).length,"aria-rowcount":this.props.rowCount,className:Object(m.a)("ReactVirtualized__Table",n),id:I,role:"grid",style:B},!i&&g({className:Object(m.a)("ReactVirtualized__Table__headerRow",E),columns:this._getHeaderColumns(),style:ue({height:s,overflow:"hidden",paddingRight:d,width:f},p)}),r.createElement(q,v()({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:Object(m.a)("ReactVirtualized__Table__Grid",o),cellRenderer:this._createRow,columnWidth:f,columnCount:1,height:Q,id:void 0,noContentRenderer:u,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:d,scrollToRow:h,style:ue({},a,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(t){var e=t.column,A=t.columnIndex,n=t.isScrolling,i=t.parent,o=t.rowData,a=t.rowIndex,s=this.props.onColumnClick,g=e.props,c=g.cellDataGetter,I=g.cellRenderer,u=g.className,l=g.columnData,C=g.dataKey,h=g.id,B=I({cellData:c({columnData:l,dataKey:C,rowData:o}),columnData:l,columnIndex:A,dataKey:C,isScrolling:n,parent:i,rowData:o,rowIndex:a}),f=this._cachedColumnStyles[A],d="string"===typeof B?B:null;return r.createElement("div",{"aria-colindex":A+1,"aria-describedby":h,className:Object(m.a)("ReactVirtualized__Table__rowColumn",u),key:"Row"+a+"-Col"+A,onClick:function(t){s&&s({columnData:l,dataKey:C,event:t})},role:"gridcell",style:f,title:d},B)}},{key:"_createHeader",value:function(t){var e,A,n,i,o,a=t.column,s=t.index,g=this.props,c=g.headerClassName,I=g.headerStyle,u=g.onHeaderClick,l=g.sort,C=g.sortBy,h=g.sortDirection,B=a.props,f=B.columnData,d=B.dataKey,Q=B.defaultSortDirection,E=B.disableSort,p=B.headerRenderer,y=B.id,v=B.label,b=!E&&l,F=Object(m.a)("ReactVirtualized__Table__headerColumn",c,a.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:b}),w=this._getFlexStyleForColumn(a,ue({},I,{},a.props.headerStyle)),S=p({columnData:f,dataKey:d,disableSort:E,label:v,sortBy:C,sortDirection:h});if(b||u){var D=C!==d?Q:h===oe.DESC?oe.ASC:oe.DESC,R=function(t){b&&l({defaultSortDirection:Q,event:t,sortBy:d,sortDirection:D}),u&&u({columnData:f,dataKey:d,event:t})};o=a.props["aria-label"]||v||d,i="none",n=0,e=R,A=function(t){"Enter"!==t.key&&" "!==t.key||R(t)}}return C===d&&(i=h===oe.ASC?"ascending":"descending"),r.createElement("div",{"aria-label":o,"aria-sort":i,className:F,id:y,key:"Header-Col"+s,onClick:e,onKeyDown:A,role:"columnheader",style:w,tabIndex:n},S)}},{key:"_createRow",value:function(t){var e=this,A=t.rowIndex,n=t.isScrolling,i=t.key,o=t.parent,a=t.style,s=this.props,g=s.children,c=s.onRowClick,I=s.onRowDoubleClick,u=s.onRowRightClick,l=s.onRowMouseOver,C=s.onRowMouseOut,h=s.rowClassName,B=s.rowGetter,f=s.rowRenderer,d=s.rowStyle,Q=this.state.scrollbarWidth,E="function"===typeof h?h({index:A}):h,p="function"===typeof d?d({index:A}):d,y=B({index:A}),v=r.Children.toArray(g).map((function(t,r){return e._createColumn({column:t,columnIndex:r,isScrolling:n,parent:o,rowData:y,rowIndex:A,scrollbarWidth:Q})})),b=Object(m.a)("ReactVirtualized__Table__row",E),F=ue({},a,{height:this._getRowHeight(A),overflow:"hidden",paddingRight:Q},p);return f({className:b,columns:v,index:A,isScrolling:n,key:i,onRowClick:c,onRowDoubleClick:I,onRowRightClick:u,onRowMouseOver:l,onRowMouseOut:C,rowData:y,style:F})}},{key:"_getFlexStyleForColumn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A="".concat(t.props.flexGrow," ").concat(t.props.flexShrink," ").concat(t.props.width,"px"),n=ue({},e,{flex:A,msFlex:A,WebkitFlex:A});return t.props.maxWidth&&(n.maxWidth=t.props.maxWidth),t.props.minWidth&&(n.minWidth=t.props.minWidth),n}},{key:"_getHeaderColumns",value:function(){var t=this,e=this.props,A=e.children;return(e.disableHeader?[]:r.Children.toArray(A)).map((function(e,A){return t._createHeader({column:e,index:A})}))}},{key:"_getRowHeight",value:function(t){var e=this.props.rowHeight;return"function"===typeof e?e({index:t}):e}},{key:"_onScroll",value:function(t){var e=t.clientHeight,A=t.scrollHeight,n=t.scrollTop;(0,this.props.onScroll)({clientHeight:e,scrollHeight:A,scrollTop:n})}},{key:"_onSectionRendered",value:function(t){var e=t.rowOverscanStartIndex,A=t.rowOverscanStopIndex,n=t.rowStartIndex,r=t.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:e,overscanStopIndex:A,startIndex:n,stopIndex:r})}},{key:"_setRef",value:function(t){this.Grid=t}},{key:"_setScrollbarWidth",value:function(){var t=this.getScrollbarWidth();this.setState({scrollbarWidth:t})}}]),e}(r.PureComponent);E()(le,"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:ge,headerRowRenderer:ie,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),le.propTypes={};var Ce=[],he=null,Be=null;function fe(){Be&&(Be=null,document.body&&null!=he&&(document.body.style.pointerEvents=he),he=null)}function de(){fe(),Ce.forEach((function(t){return t.__resetIsScrolling()}))}function Qe(t){t.currentTarget===window&&null==he&&document.body&&(he=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){Be&&H(Be);var t=0;Ce.forEach((function(e){t=Math.max(t,e.props.scrollingResetTimeInterval)})),Be=Y(de,t)}(),Ce.forEach((function(e){e.props.scrollElement===t.currentTarget&&e.__handleWindowScrollEvent()}))}function Ee(t,e){Ce.some((function(t){return t.props.scrollElement===e}))||e.addEventListener("scroll",Qe),Ce.push(t)}function pe(t,e){(Ce=Ce.filter((function(e){return e!==t}))).length||(e.removeEventListener("scroll",Qe),Be&&(H(Be),fe()))}var ye,ve,me=function(t){return t===window},be=function(t){return t.getBoundingClientRect()};function Fe(t,e){if(t){if(me(t)){var A=window,n=A.innerHeight,r=A.innerWidth;return{height:"number"===typeof n?n:0,width:"number"===typeof r?r:0}}return be(t)}return{height:e.serverHeight,width:e.serverWidth}}function we(t,e){if(me(e)&&document.documentElement){var A=document.documentElement,n=be(t),r=be(A);return{top:n.top-r.top,left:n.left-r.left}}var i=Se(e),o=be(t),a=be(e);return{top:o.top+i.top-a.top,left:o.left+i.left-a.left}}function Se(t){return me(t)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:t.scrollTop,left:t.scrollLeft}}function De(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Re(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?De(A,!0).forEach((function(e){E()(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):De(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var Ue=function(){return"undefined"!==typeof window?window:void 0},Ge=(ve=ye=function(t){function e(){var t,A;s()(this,e);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return A=u()(this,(t=C()(e)).call.apply(t,[this].concat(r))),E()(B()(A),"_window",Ue()),E()(B()(A),"_isMounted",!1),E()(B()(A),"_positionFromTop",0),E()(B()(A),"_positionFromLeft",0),E()(B()(A),"_detectElementResize",void 0),E()(B()(A),"_child",void 0),E()(B()(A),"state",Re({},Fe(A.props.scrollElement,A.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),E()(B()(A),"_registerChild",(function(t){!t||t instanceof Element||console.warn("WindowScroller registerChild expects to be passed Element or null"),A._child=t,A.updatePosition()})),E()(B()(A),"_onChildScroll",(function(t){var e=t.scrollTop;if(A.state.scrollTop!==e){var n=A.props.scrollElement;n&&("function"===typeof n.scrollTo?n.scrollTo(0,e+A._positionFromTop):n.scrollTop=e+A._positionFromTop)}})),E()(B()(A),"_registerResizeListener",(function(t){t===window?window.addEventListener("resize",A._onResize,!1):A._detectElementResize.addResizeListener(t,A._onResize)})),E()(B()(A),"_unregisterResizeListener",(function(t){t===window?window.removeEventListener("resize",A._onResize,!1):t&&A._detectElementResize.removeResizeListener(t,A._onResize)})),E()(B()(A),"_onResize",(function(){A.updatePosition()})),E()(B()(A),"__handleWindowScrollEvent",(function(){if(A._isMounted){var t=A.props.onScroll,e=A.props.scrollElement;if(e){var n=Se(e),r=Math.max(0,n.left-A._positionFromLeft),i=Math.max(0,n.top-A._positionFromTop);A.setState({isScrolling:!0,scrollLeft:r,scrollTop:i}),t({scrollLeft:r,scrollTop:i})}}})),E()(B()(A),"__resetIsScrolling",(function(){A.setState({isScrolling:!1})})),A}return d()(e,t),c()(e,[{key:"updatePosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,e=this.props.onResize,A=this.state,n=A.height,r=A.width,i=this._child||ct.findDOMNode(this);if(i instanceof Element&&t){var o=we(i,t);this._positionFromTop=o.top,this._positionFromLeft=o.left}var a=Fe(t,this.props);n===a.height&&r===a.width||(this.setState({height:a.height,width:a.width}),e({height:a.height,width:a.width}))}},{key:"componentDidMount",value:function(){var t=this.props.scrollElement;this._detectElementResize=Object(rt.a)(),this.updatePosition(t),t&&(Ee(this,t),this._registerResizeListener(t)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(t,e){var A=this.props.scrollElement,n=t.scrollElement;n!==A&&null!=n&&null!=A&&(this.updatePosition(A),pe(this,n),Ee(this,A),this._unregisterResizeListener(n),this._registerResizeListener(A))}},{key:"componentWillUnmount",value:function(){var t=this.props.scrollElement;t&&(pe(this,t),this._unregisterResizeListener(t)),this._isMounted=!1}},{key:"render",value:function(){var t=this.props.children,e=this.state,A=e.isScrolling,n=e.scrollTop,r=e.scrollLeft,i=e.height,o=e.width;return t({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:A,scrollLeft:r,scrollTop:n,width:o})}}]),e}(r.PureComponent),E()(ye,"propTypes",null),ve);E()(Ge,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:Ue(),serverHeight:0,serverWidth:0});var Ne=A(360),ke=A.n(Ne),xe=A(1126),Oe=A.n(xe),Me=A(1127),Le=A.n(Me),_e=A(89),Je=A.n(_e);function Te(t){var e=t.hasColorEncoding,A=t.columns,a=t.data,s=t.onChange,g=t.idKey,c=void 0===g?"id":g,I=t.valueKey,u=void 0===I?"value":I,l=t.allowMultiple,C=void 0!==l&&l,h=t.allowUncheck,B=void 0!==h&&h,f=t.showTableHead,d=void 0===f||f,Q=t.showTableInputs,E=void 0!==Q&&Q,p=t.testHeight,y=void 0===p?void 0:p,v=t.testWidth,m=void 0===v?void 0:v,b=Object(r.useState)(null),F=Object(n.a)(b,2),w=F[0],S=F[1],D=Object(r.useCallback)((function(t,e){(e||B)&&S(C?e?Oe()(w||[],[t]):Le()(w||[],[t]):e?[t]:[])}),[C,B,w]),R=Object(r.useCallback)((function(t){var e=t.target,A=e.checked,n=e.value;D(n,A)}),[D]),U=Object(r.useCallback)((function(t){return t.map((function(t){var e;return e={},Object(o.a)(e,c,t),Object(o.a)(e,"data",a.find((function(e){return e[c]===t}))),e}))}),[a,c]),G=Object(r.useCallback)((function(t){return Array.isArray(w)&&w.includes(t)}),[w]);Object(r.useEffect)((function(){var t=a.map((function(t){return t[u]?t[c]:null})).filter(Boolean);Je()(t,w)||(t.length>0?S(t):S(null))}),[a,c,u]),Object(r.useEffect)((function(){if(s&&w){var t=U(w);C?s(t):1===w.length?s(t[0]):0===w.length&&s(null)}}),[w]);var N=ke()(),k=E?"":"hidden-input-column",x=function(t){var n=t.index,r=t.style;return i.a.createElement("div",{key:a[n][c],className:"table-item table-row ".concat(G(a[n][c])?"row-checked ":""),style:r,role:"button",onClick:function(){return D(a[n][c],!G(a[n][c])||!e)}},i.a.createElement("div",{className:"input-container ".concat(k," table-cell")},i.a.createElement("label",{htmlFor:"".concat(N,"_").concat(a[n][c])},i.a.createElement("input",{id:"".concat(N,"_").concat(a[n][c]),type:"checkbox",className:C?"checkbox":"radio",name:N,value:a[n][c],onChange:R,checked:G(a[n][c])}))),A.map((function(t){return i.a.createElement("div",{className:"table-cell",key:t},a[n][t])})))},O=function(t){var e=t.style;return i.a.createElement("div",{className:"".concat(k," table-row"),style:e},A.map((function(t){return i.a.createElement("div",{key:t},t)})))};return i.a.createElement("div",{className:"selectable-table"},i.a.createElement(at,null,(function(t){var e=t.width,A=t.height;return i.a.createElement(le,{height:y||A,gridStyle:{outline:"none"},rowCount:a.length,rowHeight:24,headerHeight:d?24:void 0,rowRenderer:x,width:m||e,headerRowRenderer:d?O:void 0,rowGetter:function(t){var e=t.index;return a[e]}})})))}function je(t){var e=t.hasColorEncoding,A=t.geneList,o=void 0===A?[]:A,a=t.geneSelection,s=void 0===a?[]:a,g=t.geneFilter,c=void 0===g?null:g,I=t.setGeneSelection,u=Object(r.useState)(""),l=Object(n.a)(u,2),C=l[0],h=l[1],B=Object(r.useState)(o),f=Object(n.a)(B,2),d=f[0],Q=f[1];Object(r.useEffect)((function(){var t=o.filter((function(t){return t.toLowerCase().includes(C.toLowerCase())}));Q(t)}),[C,o]);var E=d.filter((function(t){return!c||c.includes(t)})).sort((function(t,e){return t.localeCompare(e)})).map((function(t){return{name:t,value:!!s&&s.includes(t)}}));return i.a.createElement(i.a.Fragment,null,i.a.createElement("input",{className:"search-bar",type:"text",placeholder:"Search",value:C,onChange:function(t){h(t.target.value)}}),i.a.createElement(Te,{columns:["name"],data:E,hasColorEncoding:e,idKey:"name",valueKey:"value",onChange:function(t){I&&t&&t.name&&I([t.name])},allowUncheck:!1,showTableHead:!1}))}A.d(e,"a",(function(){return je}))},function(t,e,A){"use strict";var n=A(13),r=A(20),i=A(21),o=A(0),a=A.n(o),s=A(89),g=A.n(s),c=A(12),I=A(291),u=A.n(I),l=A(299),C=A.n(l),h=A(733),B=A.n(h),f=A(734),d=A.n(f),Q=A(735),E=A.n(Q),p=A(736),y=A.n(p),v=A(25),m=A.n(v),b=A(183),F=A.n(b),w=A(597),S=A.n(w),D=A(285);function R(t){var e=[];return a.a.Children.forEach(t,(function(t){void 0!==t&&null!==t&&(Array.isArray(t)?e=e.concat(R(t)):Object(D.isFragment)(t)&&t.props?e=e.concat(R(t.props.children)):e.push(t))})),e}var U=A(331),G={rcTree:m.a.shape({root:m.a.object,prefixCls:m.a.string,selectable:m.a.bool,showIcon:m.a.bool,icon:m.a.oneOfType([m.a.node,m.a.func]),draggable:m.a.bool,checkable:m.a.oneOfType([m.a.bool,m.a.node]),checkStrictly:m.a.bool,disabled:m.a.bool,openTransitionName:m.a.string,openAnimation:m.a.oneOfType([m.a.string,m.a.object]),loadData:m.a.func,filterTreeNode:m.a.func,renderTreeNode:m.a.func,isKeyChecked:m.a.func,onNodeClick:m.a.func,onNodeDoubleClick:m.a.func,onNodeExpand:m.a.func,onNodeSelect:m.a.func,onNodeCheck:m.a.func,onNodeMouseEnter:m.a.func,onNodeMouseLeave:m.a.func,onNodeContextMenu:m.a.func,onNodeDragStart:m.a.func,onNodeDragEnter:m.a.func,onNodeDragOver:m.a.func,onNodeDragLeave:m.a.func,onNodeDragEnd:m.a.func,onNodeDrop:m.a.func})},N=u()({},G,{rcTreeNode:m.a.shape({onUpCheckConduct:m.a.func})}),k=A(827),x=A.n(k),O=A(68),M=A.n(O);function L(t){return t instanceof HTMLElement?t:M.a.findDOMNode(t)}var _=A(543),J=A.n(_),T=!("undefined"===typeof window||!window.document||!window.document.createElement);function j(t,e){var A={};return A[t.toLowerCase()]=e.toLowerCase(),A["Webkit"+t]="webkit"+e,A["Moz"+t]="moz"+e,A["ms"+t]="MS"+e,A["O"+t]="o"+e.toLowerCase(),A}var H=function(t,e){var A={animationend:j("Animation","AnimationEnd"),transitionend:j("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete A.animationend.animation,"TransitionEvent"in e||delete A.transitionend.transition),A}(T,"undefined"!==typeof window?window:{}),Y={};T&&(Y=document.createElement("div").style);var V={};function Z(t){if(V[t])return V[t];var e=H[t];if(e)for(var A=Object.keys(e),n=A.length,r=0;r<n;r+=1){var i=A[r];if(Object.prototype.hasOwnProperty.call(e,i)&&i in Y)return V[t]=e[i],V[t]}return""}var W=Z("animationend"),K=Z("transitionend"),P=!(!W||!K);function q(t,e){return t?"object"===typeof t?t[e.replace(/-\w/g,(function(t){return t[1].toUpperCase()}))]:t+"-"+e:null}var X={eventProps:m.a.object,visible:m.a.bool,children:m.a.func,motionName:m.a.oneOfType([m.a.string,m.a.object]),motionAppear:m.a.bool,motionEnter:m.a.bool,motionLeave:m.a.bool,motionLeaveImmediately:m.a.bool,removeOnLeave:m.a.bool,leavedClassName:m.a.string,onAppearStart:m.a.func,onAppearActive:m.a.func,onAppearEnd:m.a.func,onEnterStart:m.a.func,onEnterActive:m.a.func,onEnterEnd:m.a.func,onLeaveStart:m.a.func,onLeaveActive:m.a.func,onLeaveEnd:m.a.func};var z=function(t){var e=t,A=!!a.a.forwardRef;function n(t){return!(!t.motionName||!e)}"object"===typeof t&&(e=t.transitionSupport,A="forwardRef"in t?t.forwardRef:A);var r=function(t){function e(){B()(this,e);var t=E()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.onDomUpdate=function(){var e=t.state,A=e.status,r=e.newStatus,i=t.props,o=i.onAppearStart,a=i.onEnterStart,s=i.onLeaveStart,g=i.onAppearActive,c=i.onEnterActive,I=i.onLeaveActive,u=i.motionAppear,l=i.motionEnter,C=i.motionLeave;if(n(t.props)){var h=t.getElement();t.$cacheEle!==h&&(t.removeEventListener(t.$cacheEle),t.addEventListener(h),t.$cacheEle=h),r&&"appear"===A&&u?t.updateStatus(o,null,null,(function(){t.updateActiveStatus(g,"appear")})):r&&"enter"===A&&l?t.updateStatus(a,null,null,(function(){t.updateActiveStatus(c,"enter")})):r&&"leave"===A&&C&&t.updateStatus(s,null,null,(function(){t.updateActiveStatus(I,"leave")}))}},t.onMotionEnd=function(e){var A=t.state,n=A.status,r=A.statusActive,i=t.props,o=i.onAppearEnd,a=i.onEnterEnd,s=i.onLeaveEnd;"appear"===n&&r?t.updateStatus(o,{status:"none"},e):"enter"===n&&r?t.updateStatus(a,{status:"none"},e):"leave"===n&&r&&t.updateStatus(s,{status:"none"},e)},t.setNodeRef=function(e){var A=t.props.internalRef;t.node=e,"function"===typeof A?A(e):A&&"current"in A&&(A.current=e)},t.getElement=function(){return L(t.node||t)},t.addEventListener=function(e){e&&(e.addEventListener(K,t.onMotionEnd),e.addEventListener(W,t.onMotionEnd))},t.removeEventListener=function(e){e&&(e.removeEventListener(K,t.onMotionEnd),e.removeEventListener(W,t.onMotionEnd))},t.updateStatus=function(e,A,n,r){var i=e?e(t.getElement(),n):null;if(!1!==i&&!t._destroyed){var o=void 0;r&&(o=function(){t.nextFrame(r)}),t.setState(u()({statusStyle:"object"===typeof i?i:null,newStatus:!1},A),o)}},t.updateActiveStatus=function(e,A){t.nextFrame((function(){t.state.status===A&&t.updateStatus(e,{statusActive:!0})}))},t.nextFrame=function(e){t.cancelNextFrame(),t.raf=J()(e)},t.cancelNextFrame=function(){t.raf&&(J.a.cancel(t.raf),t.raf=null)},t.state={status:"none",statusActive:!1,newStatus:!1,statusStyle:null},t.$cacheEle=null,t.node=null,t.raf=null,t}return y()(e,t),d()(e,[{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 t,e=this.state,A=e.status,r=e.statusActive,i=e.statusStyle,o=this.props,a=o.children,s=o.motionName,g=o.visible,c=o.removeOnLeave,I=o.leavedClassName,l=o.eventProps;return a?"none"!==A&&n(this.props)?a(u()({},l,{className:F()((t={},C()(t,q(s,A),"none"!==A),C()(t,q(s,A+"-active"),"none"!==A&&r),C()(t,s,"string"===typeof s),t)),style:i}),this.setNodeRef):g?a(u()({},l),this.setNodeRef):c?null:a(u()({},l,{className:I}),this.setNodeRef):null}}],[{key:"getDerivedStateFromProps",value:function(t,e){var A=e.prevProps,r=e.status;if(!n(t))return{};var i=t.visible,o=t.motionAppear,a=t.motionEnter,s=t.motionLeave,g=t.motionLeaveImmediately,c={prevProps:t};return("appear"===r&&!o||"enter"===r&&!a||"leave"===r&&!s)&&(c.status="none",c.statusActive=!1,c.newStatus=!1),!A&&i&&o&&(c.status="appear",c.statusActive=!1,c.newStatus=!0),A&&!A.visible&&i&&a&&(c.status="enter",c.statusActive=!1,c.newStatus=!0),(A&&A.visible&&!i&&s||!A&&g&&!i&&s)&&(c.status="leave",c.statusActive=!1,c.newStatus=!0),c}}]),e}(a.a.Component);return r.propTypes=u()({},X,{internalRef:m.a.oneOfType([m.a.object,m.a.func])}),r.defaultProps={visible:!0,motionEnter:!0,motionAppear:!0,motionLeave:!0,removeOnLeave:!0},Object(U.a)(r),A?a.a.forwardRef((function(t,e){return a.a.createElement(r,u()({internalRef:e},t))})):r}(P),$=function(t){function e(t){B()(this,e);var A=E()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return tt.call(A),A.state={dragNodeHighlight:!1},A}return y()(e,t),d()(e,[{key:"getChildContext",value:function(){return u()({},this.context,{rcTreeNode:{}})}},{key:"componentDidMount",value:function(){var t=this.props.eventKey,e=this.context.rcTree.registerTreeNode;this.syncLoadData(this.props),e(t,this)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"componentWillUnmount",value:function(){var t=this.props.eventKey;(0,this.context.rcTree.registerTreeNode)(t,null)}},{key:"isSelectable",value:function(){var t=this.props.selectable,e=this.context.rcTree.selectable;return"boolean"===typeof t?t:e}},{key:"render",value:function(){var t,e=this.props.loading,A=this.props,n=A.className,r=A.style,i=A.dragOver,o=A.dragOverGapTop,s=A.dragOverGapBottom,g=A.isLeaf,c=A.expanded,I=A.selected,l=A.checked,h=A.halfChecked,B=x()(A,["className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","expanded","selected","checked","halfChecked"]),f=this.context.rcTree,d=f.prefixCls,Q=f.filterTreeNode,E=f.draggable,p=this.isDisabled(),y=Et(B);return a.a.createElement("li",u()({className:F()(n,(t={},C()(t,d+"-treenode-disabled",p),C()(t,d+"-treenode-switcher-"+(c?"open":"close"),!g),C()(t,d+"-treenode-checkbox-checked",l),C()(t,d+"-treenode-checkbox-indeterminate",h),C()(t,d+"-treenode-selected",I),C()(t,d+"-treenode-loading",e),C()(t,"drag-over",!p&&i),C()(t,"drag-over-gap-top",!p&&o),C()(t,"drag-over-gap-bottom",!p&&s),C()(t,"filter-node",Q&&Q(this)),t)),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:void 0,onDragEnd:E?this.onDragEnd:void 0},y),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector(),this.renderChildren())}}]),e}(a.a.Component);$.propTypes={eventKey:m.a.string,prefixCls:m.a.string,className:m.a.string,style:m.a.object,root:m.a.object,onSelect:m.a.func,expanded:m.a.bool,selected:m.a.bool,checked:m.a.bool,loaded:m.a.bool,loading:m.a.bool,halfChecked:m.a.bool,children:m.a.node,title:m.a.node,pos:m.a.string,dragOver:m.a.bool,dragOverGapTop:m.a.bool,dragOverGapBottom:m.a.bool,isLeaf:m.a.bool,checkable:m.a.bool,selectable:m.a.bool,disabled:m.a.bool,disableCheckbox:m.a.bool,icon:m.a.oneOfType([m.a.node,m.a.func]),switcherIcon:m.a.oneOfType([m.a.node,m.a.func])},$.contextTypes=N,$.childContextTypes=N,$.defaultProps={title:"---"};var tt=function(){var t=this;this.onSelectorClick=function(e){(0,t.context.rcTree.onNodeClick)(e,t),t.isSelectable()?t.onSelect(e):t.onCheck(e)},this.onSelectorDoubleClick=function(e){(0,t.context.rcTree.onNodeDoubleClick)(e,t)},this.onSelect=function(e){if(!t.isDisabled()){var A=t.context.rcTree.onNodeSelect;e.preventDefault(),A(e,t)}},this.onCheck=function(e){if(!t.isDisabled()){var A=t.props,n=A.disableCheckbox,r=A.checked,i=t.context.rcTree.onNodeCheck;if(t.isCheckable()&&!n)e.preventDefault(),i(e,t,!r)}},this.onMouseEnter=function(e){(0,t.context.rcTree.onNodeMouseEnter)(e,t)},this.onMouseLeave=function(e){(0,t.context.rcTree.onNodeMouseLeave)(e,t)},this.onContextMenu=function(e){(0,t.context.rcTree.onNodeContextMenu)(e,t)},this.onDragStart=function(e){var A=t.context.rcTree.onNodeDragStart;e.stopPropagation(),t.setState({dragNodeHighlight:!0}),A(e,t);try{e.dataTransfer.setData("text/plain","")}catch(n){}},this.onDragEnter=function(e){var A=t.context.rcTree.onNodeDragEnter;e.preventDefault(),e.stopPropagation(),A(e,t)},this.onDragOver=function(e){var A=t.context.rcTree.onNodeDragOver;e.preventDefault(),e.stopPropagation(),A(e,t)},this.onDragLeave=function(e){var A=t.context.rcTree.onNodeDragLeave;e.stopPropagation(),A(e,t)},this.onDragEnd=function(e){var A=t.context.rcTree.onNodeDragEnd;e.stopPropagation(),t.setState({dragNodeHighlight:!1}),A(e,t)},this.onDrop=function(e){var A=t.context.rcTree.onNodeDrop;e.preventDefault(),e.stopPropagation(),t.setState({dragNodeHighlight:!1}),A(e,t)},this.onExpand=function(e){(0,t.context.rcTree.onNodeExpand)(e,t)},this.setSelectHandle=function(e){t.selectHandle=e},this.getNodeChildren=function(){var e=R(t.props.children).filter((function(t){return t})),A=st(e);return e.length!==A.length&&nt(),A},this.getNodeState=function(){var e=t.props.expanded;return t.isLeaf()?null:e?"open":"close"},this.isLeaf=function(){var e=t.props,A=e.isLeaf,n=e.loaded,r=t.context.rcTree.loadData,i=0!==t.getNodeChildren().length;return!1!==A&&(A||!r&&!i||r&&n&&!i)},this.isDisabled=function(){var e=t.props.disabled,A=t.context.rcTree.disabled;return!1!==e&&!(!A&&!e)},this.isCheckable=function(){var e=t.props.checkable,A=t.context.rcTree.checkable;return!(!A||!1===e)&&A},this.syncLoadData=function(e){var A=e.expanded,n=e.loading,r=e.loaded,i=t.context.rcTree,o=i.loadData,a=i.onNodeLoad;n||o&&A&&!t.isLeaf()&&(0!==t.getNodeChildren().length||r||a(t))},this.renderSwitcher=function(){var e=t.props,A=e.expanded,n=e.switcherIcon,r=t.context.rcTree,i=r.prefixCls,o=r.switcherIcon,s=n||o;if(t.isLeaf())return a.a.createElement("span",{className:F()(i+"-switcher",i+"-switcher-noop")},"function"===typeof s?s(u()({},t.props,{isLeaf:!0})):s);var g=F()(i+"-switcher",i+"-switcher_"+(A?"open":"close"));return a.a.createElement("span",{onClick:t.onExpand,className:g},"function"===typeof s?s(u()({},t.props,{isLeaf:!1})):s)},this.renderCheckbox=function(){var e=t.props,A=e.checked,n=e.halfChecked,r=e.disableCheckbox,i=t.context.rcTree.prefixCls,o=t.isDisabled(),s=t.isCheckable();if(!s)return null;var g="boolean"!==typeof s?s:null;return a.a.createElement("span",{className:F()(i+"-checkbox",A&&i+"-checkbox-checked",!A&&n&&i+"-checkbox-indeterminate",(o||r)&&i+"-checkbox-disabled"),onClick:t.onCheck},g)},this.renderIcon=function(){var e=t.props.loading,A=t.context.rcTree.prefixCls;return a.a.createElement("span",{className:F()(A+"-iconEle",A+"-icon__"+(t.getNodeState()||"docu"),e&&A+"-icon_loading")})},this.renderSelector=function(){var e=t.state.dragNodeHighlight,A=t.props,n=A.title,r=A.selected,i=A.icon,o=A.loading,s=t.context.rcTree,g=s.prefixCls,c=s.showIcon,I=s.icon,l=s.draggable,C=s.loadData,h=t.isDisabled(),B=g+"-node-content-wrapper",f=void 0;if(c){var d=i||I;f=d?a.a.createElement("span",{className:F()(g+"-iconEle",g+"-icon__customize")},"function"===typeof d?a.a.createElement(d,u()({},t.props)):d):t.renderIcon()}else C&&o&&(f=t.renderIcon());var Q=a.a.createElement("span",{className:g+"-title"},n);return a.a.createElement("span",{ref:t.setSelectHandle,title:"string"===typeof n?n:"",className:F()(""+B,B+"-"+(t.getNodeState()||"normal"),!h&&(r||e)&&g+"-node-selected",!h&&l&&"draggable"),draggable:!h&&l||void 0,"aria-grabbed":!h&&l||void 0,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onContextMenu:t.onContextMenu,onClick:t.onSelectorClick,onDoubleClick:t.onSelectorDoubleClick,onDragStart:l?t.onDragStart:void 0},f,Q)},this.renderChildren=function(){var e=t.props,A=e.expanded,n=e.pos,r=t.context.rcTree,i=r.prefixCls,o=r.motion,s=r.renderTreeNode,g=t.getNodeChildren();return 0===g.length?null:a.a.createElement(z,u()({visible:A},o),(function(t){var e=t.style,r=t.className;return a.a.createElement("ul",{className:F()(r,i+"-child-tree",A&&i+"-child-tree-open"),style:e,"data-expanded":A,role:"group"},It(g,(function(t,e){return s(t,e,n)})))}))}};$.isTreeNode=1,Object(U.a)($);var et=$,At=!1;function nt(){At||(At=!0,S()(!1,"Tree only accept TreeNode as children."))}function rt(t,e){var A=t.slice(),n=A.indexOf(e);return n>=0&&A.splice(n,1),A}function it(t,e){var A=t.slice();return-1===A.indexOf(e)&&A.push(e),A}function ot(t,e){return t+"-"+e}function at(t){return t&&t.type&&t.type.isTreeNode}function st(t){return R(t).filter(at)}function gt(t){var e=t.props||{},A=e.disabled,n=e.disableCheckbox;return!(!A&&!n)}function ct(t,e){!function A(n,r,i){var a=n?n.props.children:t,s=n?ot(i.pos,r):0,g=st(a);if(n){var c={node:n,index:r,pos:s,key:n.key||s,parentPos:i.node?i.pos:null};e(c)}o.Children.forEach(g,(function(t,e){A(t,e,{node:n,pos:s})}))}(null)}function It(t,e){var A=R(t).map(e);return 1===A.length?A[0]:A}function ut(t,e){var A=e.props,n=A.eventKey,r=A.pos,i=[];return ct(t,(function(t){var e=t.key;i.push(e)})),i.push(n||r),i}function lt(t,e){var A=t.clientY,n=e.selectHandle.getBoundingClientRect(),r=n.top,i=n.bottom,o=n.height,a=Math.max(.25*o,2);return A<=r+a?-1:A>=i-a?1:0}function Ct(t,e){if(t)return e.multiple?t.slice():t.length?[t[0]]:t}function ht(t){return t?t.map((function(t){return String(t)})):t}var Bt=function(t){return t};function ft(t){if(!t)return null;var e=void 0;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else{if("object"!==typeof t)return S()(!1,"`checkedKeys` is not an array or an object"),null;e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0}}return e.checkedKeys=ht(e.checkedKeys),e.halfCheckedKeys=ht(e.halfCheckedKeys),e}function dt(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r={},i={};function o(t){if(r[t]!==e){var n=A[t];if(n){var a=n.children,s=n.parent;if(!gt(n.node)){var g=!0,c=!1;(a||[]).filter((function(t){return!gt(t.node)})).forEach((function(t){var e=t.key,A=r[e],n=i[e];(A||n)&&(c=!0),A||(g=!1)})),r[t]=!!e&&g,i[t]=c,s&&o(s.key)}}}}function a(t){if(r[t]!==e){var n=A[t];if(n){var i=n.children;gt(n.node)||(r[t]=e,(i||[]).forEach((function(t){a(t.key)})))}}}function s(t){var n=A[t];if(n){var i=n.children,s=n.parent,g=n.node;r[t]=e,gt(g)||((i||[]).filter((function(t){return!gt(t.node)})).forEach((function(t){a(t.key)})),s&&o(s.key))}else S()(!1,"'"+t+"' does not exist in the tree.")}(n.checkedKeys||[]).forEach((function(t){r[t]=!0})),(n.halfCheckedKeys||[]).forEach((function(t){i[t]=!0})),(t||[]).forEach((function(t){s(t)}));var g=[],c=[];return Object.keys(r).forEach((function(t){r[t]&&g.push(t)})),Object.keys(i).forEach((function(t){!r[t]&&i[t]&&c.push(t)})),{checkedKeys:g,halfCheckedKeys:c}}function Qt(t,e){var A={};return(t||[]).forEach((function(t){!function t(n){if(!A[n]){var r=e[n];if(r){A[n]=!0;var i=r.parent;gt(r.node)||i&&t(i.key)}}}(t)})),Object.keys(A)}function Et(t){return Object.keys(t).reduce((function(e,A){return"data-"!==A.substr(0,5)&&"aria-"!==A.substr(0,5)||(e[A]=t[A]),e}),{})}var pt=function(t){function e(t){B()(this,e);var A=E()(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return A.onNodeDragStart=function(t,e){var n=A.state.expandedKeys,r=A.props.onDragStart,i=e.props,o=i.eventKey,a=i.children;A.dragNode=e,A.setState({dragNodesKeys:ut(a,e),expandedKeys:rt(n,o)}),r&&r({event:t,node:e})},A.onNodeDragEnter=function(t,e){var n=A.state.expandedKeys,r=A.props.onDragEnter,i=e.props,o=i.pos,a=i.eventKey;if(A.dragNode){var s=lt(t,e);A.dragNode.props.eventKey!==a||0!==s?setTimeout((function(){A.setState({dragOverNodeKey:a,dropPosition:s}),A.delayedDragEnterLogic||(A.delayedDragEnterLogic={}),Object.keys(A.delayedDragEnterLogic).forEach((function(t){clearTimeout(A.delayedDragEnterLogic[t])})),A.delayedDragEnterLogic[o]=setTimeout((function(){var i=it(n,a);"expandedKeys"in A.props||A.setState({expandedKeys:i}),r&&r({event:t,node:e,expandedKeys:i})}),400)}),0):A.setState({dragOverNodeKey:"",dropPosition:null})}},A.onNodeDragOver=function(t,e){var n=A.props.onDragOver,r=e.props.eventKey;if(A.dragNode&&r===A.state.dragOverNodeKey){var i=lt(t,e);if(i===A.state.dropPosition)return;A.setState({dropPosition:i})}n&&n({event:t,node:e})},A.onNodeDragLeave=function(t,e){var n=A.props.onDragLeave;A.setState({dragOverNodeKey:""}),n&&n({event:t,node:e})},A.onNodeDragEnd=function(t,e){var n=A.props.onDragEnd;A.setState({dragOverNodeKey:""}),n&&n({event:t,node:e}),A.dragNode=null},A.onNodeDrop=function(t,e){var n=A.state,r=n.dragNodesKeys,i=void 0===r?[]:r,o=n.dropPosition,a=A.props.onDrop,s=e.props,g=s.eventKey,c=s.pos;if(A.setState({dragOverNodeKey:""}),-1===i.indexOf(g)){var I=function(t){return t.split("-")}(c),u={event:t,node:e,dragNode:A.dragNode,dragNodesKeys:i.slice(),dropPosition:o+Number(I[I.length-1])};0!==o&&(u.dropToGap=!0),a&&a(u),A.dragNode=null}else S()(!1,"Can not drop to dragNode(include it's children node)")},A.onNodeClick=function(t,e){var n=A.props.onClick;n&&n(t,e)},A.onNodeDoubleClick=function(t,e){var n=A.props.onDoubleClick;n&&n(t,e)},A.onNodeSelect=function(t,e){var n=A.state.selectedKeys,r=A.state.keyEntities,i=A.props,o=i.onSelect,a=i.multiple,s=e.props,g=s.selected,c=s.eventKey,I=!g,u=(n=I?a?it(n,c):[c]:rt(n,c)).map((function(t){var e=r[t];return e?e.node:null})).filter((function(t){return t}));(A.setUncontrolledState({selectedKeys:n}),o)&&o(n,{event:"select",selected:I,node:e,selectedNodes:u,nativeEvent:t.nativeEvent})},A.onNodeCheck=function(t,e,n){var r=A.state,i=r.keyEntities,o=r.checkedKeys,a=r.halfCheckedKeys,s=A.props,g=s.checkStrictly,c=s.onCheck,I=e.props.eventKey,u=void 0,l={event:"check",node:e,checked:n,nativeEvent:t.nativeEvent};if(g){var C=n?it(o,I):rt(o,I);u={checked:C,halfChecked:rt(a,I)},l.checkedNodes=C.map((function(t){return i[t]})).filter((function(t){return t})).map((function(t){return t.node})),A.setUncontrolledState({checkedKeys:C})}else{var h=dt([I],n,i,{checkedKeys:o,halfCheckedKeys:a}),B=h.checkedKeys,f=h.halfCheckedKeys;u=B,l.checkedNodes=[],l.checkedNodesPositions=[],l.halfCheckedKeys=f,B.forEach((function(t){var e=i[t];if(e){var A=e.node,n=e.pos;l.checkedNodes.push(A),l.checkedNodesPositions.push({node:A,pos:n})}})),A.setUncontrolledState({checkedKeys:B,halfCheckedKeys:f})}c&&c(u,l)},A.onNodeLoad=function(t){return new Promise((function(e){A.setState((function(n){var r=n.loadedKeys,i=void 0===r?[]:r,o=n.loadingKeys,a=void 0===o?[]:o,s=A.props,g=s.loadData,c=s.onLoad,I=t.props.eventKey;return g&&-1===i.indexOf(I)&&-1===a.indexOf(I)?(g(t).then((function(){var n=it(A.state.loadedKeys,I),r=rt(A.state.loadingKeys,I);c&&c(n,{event:"load",node:t});A.setUncontrolledState({loadedKeys:n}),A.setState({loadingKeys:r}),e()})),{loadingKeys:it(a,I)}):{}}))}))},A.onNodeExpand=function(t,e){var n=A.state.expandedKeys,r=A.props,i=r.onExpand,o=r.loadData,a=e.props,s=a.eventKey,g=a.expanded,c=n.indexOf(s),I=!g;if(S()(g&&-1!==c||!g&&-1===c,"Expand state not sync with index check"),n=I?it(n,s):rt(n,s),A.setUncontrolledState({expandedKeys:n}),i&&i(n,{node:e,expanded:I,nativeEvent:t.nativeEvent}),I&&o){var u=A.onNodeLoad(e);return u?u.then((function(){A.setUncontrolledState({expandedKeys:n})})):null}return null},A.onNodeMouseEnter=function(t,e){var n=A.props.onMouseEnter;n&&n({event:t,node:e})},A.onNodeMouseLeave=function(t,e){var n=A.props.onMouseLeave;n&&n({event:t,node:e})},A.onNodeContextMenu=function(t,e){var n=A.props.onRightClick;n&&(t.preventDefault(),n({event:t,node:e}))},A.setUncontrolledState=function(t){var e=!1,n={};Object.keys(t).forEach((function(r){r in A.props||(e=!0,n[r]=t[r])})),e&&A.setState(n)},A.registerTreeNode=function(t,e){e?A.domTreeNodes[t]=e:delete A.domTreeNodes[t]},A.isKeyChecked=function(t){var e=A.state.checkedKeys;return-1!==(void 0===e?[]:e).indexOf(t)},A.renderTreeNode=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=A.state,i=r.keyEntities,o=r.expandedKeys,s=void 0===o?[]:o,g=r.selectedKeys,c=void 0===g?[]:g,I=r.halfCheckedKeys,u=void 0===I?[]:I,l=r.loadedKeys,C=void 0===l?[]:l,h=r.loadingKeys,B=void 0===h?[]:h,f=r.dragOverNodeKey,d=r.dropPosition,Q=ot(n,e),E=t.key||Q;return i[E]?a.a.cloneElement(t,{key:E,eventKey:E,expanded:-1!==s.indexOf(E),selected:-1!==c.indexOf(E),loaded:-1!==C.indexOf(E),loading:-1!==B.indexOf(E),checked:A.isKeyChecked(E),halfChecked:-1!==u.indexOf(E),pos:Q,dragOver:f===E&&0===d,dragOverGapTop:f===E&&-1===d,dragOverGapBottom:f===E&&1===d}):(nt(),null)},A.state={posEntities:{},keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],treeNode:[]},A.domTreeNodes={},A}return y()(e,t),d()(e,[{key:"getChildContext",value:function(){var t=this.props,e=t.prefixCls,A=t.selectable,n=t.showIcon,r=t.icon,i=t.draggable,o=t.checkable,a=t.checkStrictly,s=t.disabled,g=t.loadData,c=t.filterTreeNode,I=t.motion;return{rcTree:{prefixCls:e,selectable:A,showIcon:n,icon:r,switcherIcon:t.switcherIcon,draggable:i,checkable:o,checkStrictly:a,disabled:s,motion:I,loadData:g,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 t=this,e=this.state.treeNode,A=this.props,n=A.prefixCls,r=A.className,i=A.focusable,o=A.style,s=A.showLine,g=A.tabIndex,c=void 0===g?0:g,I=Et(this.props);return i&&(I.tabIndex=c,I.onKeyDown=this.onKeyDown),a.a.createElement("ul",u()({},I,{className:F()(n,r,C()({},n+"-show-line",s)),style:o,role:"tree",unselectable:"on"}),It(e,(function(e,A){return t.renderTreeNode(e,A)})))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var A=e.prevProps,n={prevProps:t};function r(e){return!A&&e in t||A&&A[e]!==t[e]}var i=null;if(r("treeData")?i=function t(e,A){if(!e)return[];var n=(A||{}).processProps,r=void 0===n?Bt:n;return(Array.isArray(e)?e:[e]).map((function(e){var n=e.children,i=x()(e,["children"]),o=t(n,A);return a.a.createElement(et,r(i),o)}))}(t.treeData):r("children")&&(i=R(t.children)),i){n.treeNode=i;var o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.initWrapper,n=e.processEntity,r=e.onProcessFinished,i={},o={},a={posEntities:i,keyEntities:o};return A&&(a=A(a)||a),ct(t,(function(t){var e=t.node,A=t.index,r=t.pos,s=t.key,g=t.parentPos,c={node:e,index:A,key:s,pos:r};i[r]=c,o[s]=c,c.parent=i[g],c.parent&&(c.parent.children=c.parent.children||[],c.parent.children.push(c)),n&&n(c,a)})),r&&r(a),a}(i);n.posEntities=o.posEntities,n.keyEntities=o.keyEntities}var s=n.keyEntities||e.keyEntities;if(r("expandedKeys")||A&&r("autoExpandParent")?n.expandedKeys=t.autoExpandParent||!A&&t.defaultExpandParent?Qt(t.expandedKeys,s):t.expandedKeys:!A&&t.defaultExpandAll?n.expandedKeys=Object.keys(s):!A&&t.defaultExpandedKeys&&(n.expandedKeys=t.autoExpandParent||t.defaultExpandParent?Qt(t.defaultExpandedKeys,s):t.defaultExpandedKeys),t.selectable&&(r("selectedKeys")?n.selectedKeys=Ct(t.selectedKeys,t):!A&&t.defaultSelectedKeys&&(n.selectedKeys=Ct(t.defaultSelectedKeys,t))),t.checkable){var g=void 0;if(r("checkedKeys")?g=ft(t.checkedKeys)||{}:!A&&t.defaultCheckedKeys?g=ft(t.defaultCheckedKeys)||{}:i&&(g=ft(t.checkedKeys)||{checkedKeys:e.checkedKeys,halfCheckedKeys:e.halfCheckedKeys}),g){var c=g,I=c.checkedKeys,u=void 0===I?[]:I,l=c.halfCheckedKeys,C=void 0===l?[]:l;if(!t.checkStrictly){var h=dt(u,!0,s);u=h.checkedKeys,C=h.halfCheckedKeys}n.checkedKeys=u,n.halfCheckedKeys=C}}return r("loadedKeys")&&(n.loadedKeys=t.loadedKeys),n}}]),e}(a.a.Component);pt.propTypes={prefixCls:m.a.string,className:m.a.string,style:m.a.object,tabIndex:m.a.oneOfType([m.a.string,m.a.number]),children:m.a.any,treeData:m.a.array,showLine:m.a.bool,showIcon:m.a.bool,icon:m.a.oneOfType([m.a.node,m.a.func]),focusable:m.a.bool,selectable:m.a.bool,disabled:m.a.bool,multiple:m.a.bool,checkable:m.a.oneOfType([m.a.bool,m.a.node]),checkStrictly:m.a.bool,draggable:m.a.bool,defaultExpandParent:m.a.bool,autoExpandParent:m.a.bool,defaultExpandAll:m.a.bool,defaultExpandedKeys:m.a.arrayOf(m.a.string),expandedKeys:m.a.arrayOf(m.a.string),defaultCheckedKeys:m.a.arrayOf(m.a.string),checkedKeys:m.a.oneOfType([m.a.arrayOf(m.a.oneOfType([m.a.string,m.a.number])),m.a.object]),defaultSelectedKeys:m.a.arrayOf(m.a.string),selectedKeys:m.a.arrayOf(m.a.string),onClick:m.a.func,onDoubleClick:m.a.func,onExpand:m.a.func,onCheck:m.a.func,onSelect:m.a.func,onLoad:m.a.func,loadData:m.a.func,loadedKeys:m.a.arrayOf(m.a.string),onMouseEnter:m.a.func,onMouseLeave:m.a.func,onRightClick:m.a.func,onDragStart:m.a.func,onDragEnter:m.a.func,onDragOver:m.a.func,onDragLeave:m.a.func,onDragEnd:m.a.func,onDrop:m.a.func,filterTreeNode:m.a.func,motion:m.a.object,switcherIcon:m.a.oneOfType([m.a.node,m.a.func])},pt.childContextTypes=G,pt.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(U.a)(pt);var yt=pt;yt.TreeNode=et;var vt=yt,mt=a.a.forwardRef((function(t,e){var A,n=t.prefixCls,r=t.className,i=t.showIcon,o=t.blockNode,s=t.children,g=t.checkable;return a.a.createElement(vt,Object.assign({itemHeight:32,ref:e},t,{className:F()(r,(A={},Object(c.a)(A,"".concat(n,"-icon-hide"),!i),Object(c.a)(A,"".concat(n,"-block-node"),o),A)),checkable:g?a.a.createElement("span",{className:"".concat(n,"-checkbox-inner")}):g}),s)}));mt.defaultProps={virtual:!1,checkable:!1,showIcon:!1,blockNode:!0,prefixCls:"rc-tree"};var bt=mt,Ft=A(271),wt=A(9),St=A(15),Dt=A(54),Rt=A(23),Ut=A(24),Gt=A(32),Nt=A(247),kt=A.n(Nt),xt=A(1128),Ot=A(131),Mt=A(87);function Lt(t,e){for(var A=e;A;){if(A===t)return!0;A=A.parentNode}return!1}function _t(t){return(_t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Jt(t,e){"function"===typeof t?t(e):"object"===_t(t)&&t&&"current"in t&&(t.current=e)}function Tt(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];return function(t){e.forEach((function(e){Jt(e,t)}))}}var jt=A(1129),Ht=A.n(jt);function Yt(t,e,A,n){var r=M.a.unstable_batchedUpdates?function(t){M.a.unstable_batchedUpdates(A,t)}:A;return Ht()(t,e,r,n)}function Vt(t){return(Vt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wt(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Kt(t,e){return!e||"object"!==Vt(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Pt(t){return(Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function qt(t,e){return(qt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var Xt,zt=function(t){function e(){return Zt(this,e),Kt(this,Pt(e).apply(this,arguments))}var A,n,r;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qt(t,e)}(e,t),A=e,(n=[{key:"componentDidMount",value:function(){this.createContainer()}},{key:"componentDidUpdate",value:function(t){var e=this.props.didUpdate;e&&e(t)}},{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?M.a.createPortal(this.props.children,this._container):null}}])&&Wt(A.prototype,n),r&&Wt(A,r),e}(a.a.Component);function $t(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function te(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(A),!0).forEach((function(e){ee(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):$t(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function ee(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function Ae(t,e,A){return A?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function ne(t){return(ne="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function re(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function ie(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}zt.propTypes={getContainer:m.a.func.isRequired,children:m.a.node.isRequired,didUpdate:m.a.func};var oe={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function ae(){if(void 0!==Xt)return Xt;Xt="";var t=document.createElement("p").style;for(var e in oe)e+"Transform"in t&&(Xt=e);return Xt}function se(){return ae()?"".concat(ae(),"TransitionProperty"):"transitionProperty"}function ge(){return ae()?"".concat(ae(),"Transform"):"transform"}function ce(t,e){var A=se();A&&(t.style[A]=e,"transitionProperty"!==A&&(t.style.transitionProperty=e))}function Ie(t,e){var A=ge();A&&(t.style[A]=e,"transform"!==A&&(t.style.transform=e))}var ue,le=/matrix\((.*)\)/,Ce=/matrix3d\((.*)\)/;function he(t){var e=t.style.display;t.style.display="none",t.offsetHeight,t.style.display=e}function Be(t,e,A){var n=A;if("object"!==ne(e))return"undefined"!==typeof n?("number"===typeof n&&(n="".concat(n,"px")),void(t.style[e]=n)):ue(t,e);for(var r in e)e.hasOwnProperty(r)&&Be(t,r,e[r])}function fe(t,e){var A=t["page".concat(e?"Y":"X","Offset")],n="scroll".concat(e?"Top":"Left");if("number"!==typeof A){var r=t.document;"number"!==typeof(A=r.documentElement[n])&&(A=r.body[n])}return A}function de(t){return fe(t)}function Qe(t){return fe(t,!0)}function Ee(t){var e=function(t){var e,A,n,r=t.ownerDocument,i=r.body,o=r&&r.documentElement;return A=(e=t.getBoundingClientRect()).left,n=e.top,{left:A-=o.clientLeft||i.clientLeft||0,top:n-=o.clientTop||i.clientTop||0}}(t),A=t.ownerDocument,n=A.defaultView||A.parentWindow;return e.left+=de(n),e.top+=Qe(n),e}function pe(t){return null!==t&&void 0!==t&&t==t.window}function ye(t){return pe(t)?t.document:9===t.nodeType?t:t.ownerDocument}var ve=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),me=/^(top|right|bottom|left)$/,be="left";function Fe(t,e){return"left"===t?e.useCssRight?"right":t:e.useCssBottom?"bottom":t}function we(t){return"left"===t?"right":"right"===t?"left":"top"===t?"bottom":"bottom"===t?"top":void 0}function Se(t,e,A){"static"===Be(t,"position")&&(t.style.position="relative");var n=-999,r=-999,i=Fe("left",A),o=Fe("top",A),a=we(i),s=we(o);"left"!==i&&(n=999),"top"!==o&&(r=999);var g,c="",I=Ee(t);("left"in e||"top"in e)&&(c=(g=t).style.transitionProperty||g.style[se()]||"",ce(t,"none")),"left"in e&&(t.style[a]="",t.style[i]="".concat(n,"px")),"top"in e&&(t.style[s]="",t.style[o]="".concat(r,"px")),he(t);var u=Ee(t),l={};for(var C in e)if(e.hasOwnProperty(C)){var h=Fe(C,A),B="left"===C?n:r,f=I[C]-u[C];l[h]=h===C?B+f:B-f}Be(t,l),he(t),("left"in e||"top"in e)&&ce(t,c);var d={};for(var Q in e)if(e.hasOwnProperty(Q)){var E=Fe(Q,A),p=e[Q]-I[Q];d[E]=Q===E?l[E]+p:l[E]-p}Be(t,d)}function De(t,e){var A=Ee(t),n=function(t){var e=window.getComputedStyle(t,null),A=e.getPropertyValue("transform")||e.getPropertyValue(ge());if(A&&"none"!==A){var n=A.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(n[12]||n[4],0),y:parseFloat(n[13]||n[5],0)}}return{x:0,y:0}}(t),r={x:n.x,y:n.y};"left"in e&&(r.x=n.x+e.left-A.left),"top"in e&&(r.y=n.y+e.top-A.top),function(t,e){var A=window.getComputedStyle(t,null),n=A.getPropertyValue("transform")||A.getPropertyValue(ge());if(n&&"none"!==n){var r,i=n.match(le);if(i)(r=(i=i[1]).split(",").map((function(t){return parseFloat(t,10)})))[4]=e.x,r[5]=e.y,Ie(t,"matrix(".concat(r.join(","),")"));else(r=n.match(Ce)[1].split(",").map((function(t){return parseFloat(t,10)})))[12]=e.x,r[13]=e.y,Ie(t,"matrix3d(".concat(r.join(","),")"))}else Ie(t,"translateX(".concat(e.x,"px) translateY(").concat(e.y,"px) translateZ(0)"))}(t,r)}function Re(t,e){for(var A=0;A<t.length;A++)e(t[A])}function Ue(t){return"border-box"===ue(t,"boxSizing")}"undefined"!==typeof window&&(ue=window.getComputedStyle?function(t,e,A){var n=A,r="",i=ye(t);return(n=n||i.defaultView.getComputedStyle(t,null))&&(r=n.getPropertyValue(e)||n[e]),r}:function(t,e){var A=t.currentStyle&&t.currentStyle[e];if(ve.test(A)&&!me.test(e)){var n=t.style,r=n[be],i=t.runtimeStyle[be];t.runtimeStyle[be]=t.currentStyle[be],n[be]="fontSize"===e?"1em":A||0,A=n.pixelLeft+"px",n[be]=r,t.runtimeStyle[be]=i}return""===A?"auto":A});var Ge=["margin","border","padding"];function Ne(t,e,A){var n,r={},i=t.style;for(n in e)e.hasOwnProperty(n)&&(r[n]=i[n],i[n]=e[n]);for(n in A.call(t),e)e.hasOwnProperty(n)&&(i[n]=r[n])}function ke(t,e,A){var n,r,i,o=0;for(r=0;r<e.length;r++)if(n=e[r])for(i=0;i<A.length;i++){var a=void 0;a="border"===n?"".concat(n).concat(A[i],"Width"):n+A[i],o+=parseFloat(ue(t,a))||0}return o}var xe={getParent:function(t){var e=t;do{e=11===e.nodeType&&e.host?e.host:e.parentNode}while(e&&1!==e.nodeType&&9!==e.nodeType);return e}};function Oe(t,e,A){var n=A;if(pe(t))return"width"===e?xe.viewportWidth(t):xe.viewportHeight(t);if(9===t.nodeType)return"width"===e?xe.docWidth(t):xe.docHeight(t);var r="width"===e?["Left","Right"]:["Top","Bottom"],i="width"===e?t.getBoundingClientRect().width:t.getBoundingClientRect().height,o=(ue(t),Ue(t)),a=0;(null===i||void 0===i||i<=0)&&(i=void 0,(null===(a=ue(t,e))||void 0===a||Number(a)<0)&&(a=t.style[e]||0),a=parseFloat(a)||0),void 0===n&&(n=o?1:-1);var s=void 0!==i||o,g=i||a;return-1===n?s?g-ke(t,["border","padding"],r):a:s?1===n?g:g+(2===n?-ke(t,["border"],r):ke(t,["margin"],r)):a+ke(t,Ge.slice(n),r)}Re(["Width","Height"],(function(t){xe["doc".concat(t)]=function(e){var A=e.document;return Math.max(A.documentElement["scroll".concat(t)],A.body["scroll".concat(t)],xe["viewport".concat(t)](A))},xe["viewport".concat(t)]=function(e){var A="client".concat(t),n=e.document,r=n.body,i=n.documentElement[A];return"CSS1Compat"===n.compatMode&&i||r&&r[A]||i}}));var Me={position:"absolute",visibility:"hidden",display:"block"};function Le(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];var n,r=e[0];return 0!==r.offsetWidth?n=Oe.apply(void 0,e):Ne(r,Me,(function(){n=Oe.apply(void 0,e)})),n}function _e(t,e){for(var A in e)e.hasOwnProperty(A)&&(t[A]=e[A]);return t}Re(["width","height"],(function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);xe["outer".concat(e)]=function(e,A){return e&&Le(e,t,A?0:1)};var A="width"===t?["Left","Right"]:["Top","Bottom"];xe[t]=function(e,n){var r=n;if(void 0===r)return e&&Le(e,t,-1);if(e){ue(e);return Ue(e)&&(r+=ke(e,["padding","border"],A)),Be(e,t,r)}}}));var Je={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var e=t.ownerDocument||t;return e.defaultView||e.parentWindow},getDocument:ye,offset:function(t,e,A){if("undefined"===typeof e)return Ee(t);!function(t,e,A){if(A.ignoreShake){var n=Ee(t),r=n.left.toFixed(0),i=n.top.toFixed(0),o=e.left.toFixed(0),a=e.top.toFixed(0);if(r===o&&i===a)return}A.useCssRight||A.useCssBottom?Se(t,e,A):A.useCssTransform&&ge()in document.body.style?De(t,e):Se(t,e,A)}(t,e,A||{})},isWindow:pe,each:Re,css:Be,clone:function(t){var e,A={};for(e in t)t.hasOwnProperty(e)&&(A[e]=t[e]);if(t.overflow)for(e in t)t.hasOwnProperty(e)&&(A.overflow[e]=t.overflow[e]);return A},mix:_e,getWindowScrollLeft:function(t){return de(t)},getWindowScrollTop:function(t){return Qe(t)},merge:function(){for(var t={},e=0;e<arguments.length;e++)Je.mix(t,e<0||arguments.length<=e?void 0:arguments[e]);return t},viewportWidth:0,viewportHeight:0};_e(Je,xe);var Te=Je.getParent;function je(t){if(Je.isWindow(t)||9===t.nodeType)return null;var e,A=Je.getDocument(t).body,n=Je.css(t,"position");if(!("fixed"===n||"absolute"===n))return"html"===t.nodeName.toLowerCase()?null:Te(t);for(e=Te(t);e&&e!==A&&9!==e.nodeType;e=Te(e))if("static"!==(n=Je.css(e,"position")))return e;return null}var He=Je.getParent;function Ye(t,e){for(var A={left:0,right:1/0,top:0,bottom:1/0},n=je(t),r=Je.getDocument(t),i=r.defaultView||r.parentWindow,o=r.body,a=r.documentElement;n;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===n.clientWidth||n===o||n===a||"visible"===Je.css(n,"overflow")){if(n===o||n===a)break}else{var s=Je.offset(n);s.left+=n.clientLeft,s.top+=n.clientTop,A.top=Math.max(A.top,s.top),A.right=Math.min(A.right,s.left+n.clientWidth),A.bottom=Math.min(A.bottom,s.top+n.clientHeight),A.left=Math.max(A.left,s.left)}n=je(n)}var g=null;Je.isWindow(t)||9===t.nodeType||(g=t.style.position,"absolute"===Je.css(t,"position")&&(t.style.position="fixed"));var c=Je.getWindowScrollLeft(i),I=Je.getWindowScrollTop(i),u=Je.viewportWidth(i),l=Je.viewportHeight(i),C=a.scrollWidth,h=a.scrollHeight,B=window.getComputedStyle(o);if("hidden"===B.overflowX&&(C=i.innerWidth),"hidden"===B.overflowY&&(h=i.innerHeight),t.style&&(t.style.position=g),e||function(t){if(Je.isWindow(t)||9===t.nodeType)return!1;var e=Je.getDocument(t).body,A=null;for(A=He(t);A&&A!==e;A=He(A)){if("fixed"===Je.css(A,"position"))return!0}return!1}(t))A.left=Math.max(A.left,c),A.top=Math.max(A.top,I),A.right=Math.min(A.right,c+u),A.bottom=Math.min(A.bottom,I+l);else{var f=Math.max(C,c+u);A.right=Math.min(A.right,f);var d=Math.max(h,I+l);A.bottom=Math.min(A.bottom,d)}return A.top>=0&&A.left>=0&&A.bottom>A.top&&A.right>A.left?A:null}function Ve(t){var e,A,n;if(Je.isWindow(t)||9===t.nodeType){var r=Je.getWindow(t);e={left:Je.getWindowScrollLeft(r),top:Je.getWindowScrollTop(r)},A=Je.viewportWidth(r),n=Je.viewportHeight(r)}else e=Je.offset(t),A=Je.outerWidth(t),n=Je.outerHeight(t);return e.width=A,e.height=n,e}function Ze(t,e){var A=e.charAt(0),n=e.charAt(1),r=t.width,i=t.height,o=t.left,a=t.top;return"c"===A?a+=i/2:"b"===A&&(a+=i),"c"===n?o+=r/2:"r"===n&&(o+=r),{left:o,top:a}}function We(t,e,A,n,r){var i=Ze(e,A[1]),o=Ze(t,A[0]),a=[o.left-i.left,o.top-i.top];return{left:Math.round(t.left-a[0]+n[0]-r[0]),top:Math.round(t.top-a[1]+n[1]-r[1])}}function Ke(t,e,A){return t.left<A.left||t.left+e.width>A.right}function Pe(t,e,A){return t.top<A.top||t.top+e.height>A.bottom}function qe(t,e,A){var n=[];return Je.each(t,(function(t){n.push(t.replace(e,(function(t){return A[t]})))})),n}function Xe(t,e){return t[e]=-t[e],t}function ze(t,e){return(/%$/.test(t)?parseInt(t.substring(0,t.length-1),10)/100*e:parseInt(t,10))||0}function $e(t,e){t[0]=ze(t[0],e.width),t[1]=ze(t[1],e.height)}function tA(t,e,A,n){var r=A.points,i=A.offset||[0,0],o=A.targetOffset||[0,0],a=A.overflow,s=A.source||t;i=[].concat(i),o=[].concat(o);var g={},c=0,I=Ye(s,!(!(a=a||{})||!a.alwaysByViewport)),u=Ve(s);$e(i,u),$e(o,e);var l=We(u,e,r,i,o),C=Je.merge(u,l);if(I&&(a.adjustX||a.adjustY)&&n){if(a.adjustX&&Ke(l,u,I)){var h=qe(r,/[lr]/gi,{l:"r",r:"l"}),B=Xe(i,0),f=Xe(o,0);(function(t,e,A){return t.left>A.right||t.left+e.width<A.left})(We(u,e,h,B,f),u,I)||(c=1,r=h,i=B,o=f)}if(a.adjustY&&Pe(l,u,I)){var d=qe(r,/[tb]/gi,{t:"b",b:"t"}),Q=Xe(i,1),E=Xe(o,1);(function(t,e,A){return t.top>A.bottom||t.top+e.height<A.top})(We(u,e,d,Q,E),u,I)||(c=1,r=d,i=Q,o=E)}c&&(l=We(u,e,r,i,o),Je.mix(C,l));var p=Ke(l,u,I),y=Pe(l,u,I);(p||y)&&(r=A.points,i=A.offset||[0,0],o=A.targetOffset||[0,0]),g.adjustX=a.adjustX&&p,g.adjustY=a.adjustY&&y,(g.adjustX||g.adjustY)&&(C=function(t,e,A,n){var r=Je.clone(t),i={width:e.width,height:e.height};return n.adjustX&&r.left<A.left&&(r.left=A.left),n.resizeWidth&&r.left>=A.left&&r.left+i.width>A.right&&(i.width-=r.left+i.width-A.right),n.adjustX&&r.left+i.width>A.right&&(r.left=Math.max(A.right-i.width,A.left)),n.adjustY&&r.top<A.top&&(r.top=A.top),n.resizeHeight&&r.top>=A.top&&r.top+i.height>A.bottom&&(i.height-=r.top+i.height-A.bottom),n.adjustY&&r.top+i.height>A.bottom&&(r.top=Math.max(A.bottom-i.height,A.top)),Je.mix(r,i)}(l,u,I,g))}return C.width!==u.width&&Je.css(s,"width",Je.width(s)+C.width-u.width),C.height!==u.height&&Je.css(s,"height",Je.height(s)+C.height-u.height),Je.offset(s,{left:C.left,top:C.top},{useCssRight:A.useCssRight,useCssBottom:A.useCssBottom,useCssTransform:A.useCssTransform,ignoreShake:A.ignoreShake}),{points:r,offset:i,targetOffset:o,overflow:g}}function eA(t,e,A){var n=A.target||e;return tA(t,Ve(n),A,!function(t,e){var A=Ye(t,e),n=Ve(t);return!A||n.left+n.width<=A.left||n.top+n.height<=A.top||n.left>=A.right||n.top>=A.bottom}(n,A.overflow&&A.overflow.alwaysByViewport))}function AA(t,e,A){var n,r,i=Je.getDocument(t),o=i.defaultView||i.parentWindow,a=Je.getWindowScrollLeft(o),s=Je.getWindowScrollTop(o),g=Je.viewportWidth(o),c=Je.viewportHeight(o);n="pageX"in e?e.pageX:a+e.clientX,r="pageY"in e?e.pageY:s+e.clientY;var I=n>=0&&n<=a+g&&r>=0&&r<=s+c;return tA(t,{left:n,top:r,width:0,height:0},function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?ie(A,!0).forEach((function(e){re(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):ie(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},A,{points:[A.points[0],"cc"]}),I)}eA.__getOffsetParent=je,eA.__getVisibleRectForElement=Ye;var nA=A(1130);function rA(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return iA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return iA(t,e)}(t,e)||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 iA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function oA(t,e){var A=null,n=null;var r=new nA.a((function(t){var r=rA(t,1)[0].target.getBoundingClientRect(),i=r.width,o=r.height,a=Math.floor(i),s=Math.floor(o);A===a&&n===s||e({width:a,height:s}),A=a,n=s}));return t&&r.observe(t),function(){r.disconnect()}}function aA(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return sA(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return sA(t,e)}(t,e)||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 sA(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function gA(t){return(gA="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function cA(t){return"function"!==typeof t?null:t()}function IA(t){return"object"===gA(t)&&t?t:null}var uA=a.a.forwardRef((function(t,e){var A=t.children,n=t.disabled,r=t.target,i=t.align,o=t.onAlign,s=t.monitorWindowResize,g=t.monitorBufferTime,c=void 0===g?0:g,I=a.a.useRef({}),u=a.a.useRef(),l=a.a.Children.only(A),C=a.a.useRef({});C.current.disabled=n,C.current.target=r,C.current.onAlign=o;var h=aA(function(t,e){var A=a.a.useRef(!1),n=a.a.useRef(null);function r(){window.clearTimeout(n.current)}return[function i(o){if(A.current&&!0!==o)r(),n.current=window.setTimeout((function(){A.current=!1,i()}),e);else{if(!1===t())return;A.current=!0,r(),n.current=window.setTimeout((function(){A.current=!1}),e)}},function(){A.current=!1,r()}]}((function(){var t=C.current,e=t.disabled,A=t.target;if(!e&&A){var n,r=u.current,a=cA(A),s=IA(A);I.current.element=a,I.current.point=s;var g=document.activeElement;return a?n=eA(r,a,i):s&&(n=AA(r,s,i)),function(t,e){t!==document.activeElement&&Lt(e,t)&&t.focus()}(g,r),o&&o(r,n),!0}return!1}),c),2),B=h[0],f=h[1],d=a.a.useRef({cancel:function(){}}),Q=a.a.useRef({cancel:function(){}});a.a.useEffect((function(){var t,e,A=cA(r),n=IA(r);u.current!==Q.current.element&&(Q.current.cancel(),Q.current.element=u.current,Q.current.cancel=oA(u.current,B)),I.current.element===A&&((t=I.current.point)===(e=n)||t&&e&&("pageX"in e&&"pageY"in e?t.pageX===e.pageX&&t.pageY===e.pageY:"clientX"in e&&"clientY"in e&&t.clientX===e.clientX&&t.clientY===e.clientY))||(B(),d.current.element!==A&&(d.current.cancel(),d.current.element=A,d.current.cancel=oA(A,B)))})),a.a.useEffect((function(){n?f():B()}),[n]);var E=a.a.useRef(null);return a.a.useEffect((function(){s?E.current||(E.current=Yt(window,"resize",B)):E.current&&(E.current.remove(),E.current=null)}),[s]),a.a.useEffect((function(){return function(){d.current.cancel(),Q.current.cancel(),E.current&&E.current.remove(),f()}}),[]),a.a.useImperativeHandle(e,(function(){return{forceAlign:function(){return B(!0)}}})),a.a.isValidElement(l)&&(l=a.a.cloneElement(l,{ref:Tt(l.ref,u)})),l}));uA.displayName="Align";var lA=uA,CA=!("undefined"===typeof window||!window.document||!window.document.createElement);function hA(t,e){var A={};return A[t.toLowerCase()]=e.toLowerCase(),A["Webkit"+t]="webkit"+e,A["Moz"+t]="moz"+e,A["ms"+t]="MS"+e,A["O"+t]="o"+e.toLowerCase(),A}var BA=function(t,e){var A={animationend:hA("Animation","AnimationEnd"),transitionend:hA("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete A.animationend.animation,"TransitionEvent"in e||delete A.transitionend.transition),A}(CA,"undefined"!==typeof window?window:{}),fA={};CA&&(fA=document.createElement("div").style);var dA={};function QA(t){if(dA[t])return dA[t];var e=BA[t];if(e)for(var A=Object.keys(e),n=A.length,r=0;r<n;r+=1){var i=A[r];if(Object.prototype.hasOwnProperty.call(e,i)&&i in fA)return dA[t]=e[i],dA[t]}return""}var EA=QA("animationend"),pA=QA("transitionend"),yA=!(!EA||!pA);function vA(t,e){return t?"object"===typeof t?t[e.replace(/-\w/g,(function(t){return t[1].toUpperCase()}))]:t+"-"+e:null}var mA=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},bA=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}();function FA(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var wA=function(t){var e=t,A=!!a.a.forwardRef;function n(t){return!(!t.motionName||!e)}"object"===typeof t&&(e=t.transitionSupport,A="forwardRef"in t?t.forwardRef:A);var r=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.onDomUpdate=function(){var e=t.state,A=e.status,r=e.newStatus,i=t.props,o=i.onAppearStart,a=i.onEnterStart,s=i.onLeaveStart,g=i.onAppearActive,c=i.onEnterActive,I=i.onLeaveActive,u=i.motionAppear,l=i.motionEnter,C=i.motionLeave;if(n(t.props)){var h=t.getElement();t.$cacheEle!==h&&(t.removeEventListener(t.$cacheEle),t.addEventListener(h),t.$cacheEle=h),r&&"appear"===A&&u?t.updateStatus(o,null,null,(function(){t.updateActiveStatus(g,"appear")})):r&&"enter"===A&&l?t.updateStatus(a,null,null,(function(){t.updateActiveStatus(c,"enter")})):r&&"leave"===A&&C&&t.updateStatus(s,null,null,(function(){t.updateActiveStatus(I,"leave")}))}},t.onMotionEnd=function(e){var A=t.state,n=A.status,r=A.statusActive,i=t.props,o=i.onAppearEnd,a=i.onEnterEnd,s=i.onLeaveEnd;"appear"===n&&r?t.updateStatus(o,{status:"none"},e):"enter"===n&&r?t.updateStatus(a,{status:"none"},e):"leave"===n&&r&&t.updateStatus(s,{status:"none"},e)},t.setNodeRef=function(e){var A=t.props.internalRef;t.node=e,"function"===typeof A?A(e):A&&"current"in A&&(A.current=e)},t.getElement=function(){try{return L(t.node||t)}catch(e){return t.$cacheEle}},t.addEventListener=function(e){e&&(e.addEventListener(pA,t.onMotionEnd),e.addEventListener(EA,t.onMotionEnd))},t.removeEventListener=function(e){e&&(e.removeEventListener(pA,t.onMotionEnd),e.removeEventListener(EA,t.onMotionEnd))},t.updateStatus=function(e,A,n,r){var i=e?e(t.getElement(),n):null;if(!1!==i&&!t._destroyed){var o=void 0;r&&(o=function(){t.nextFrame(r)}),t.setState(mA({statusStyle:"object"===typeof i?i:null,newStatus:!1},A),o)}},t.updateActiveStatus=function(e,A){t.nextFrame((function(){if(t.state.status===A){var n=t.props.motionDeadline;t.updateStatus(e,{statusActive:!0}),n>0&&setTimeout((function(){t.onMotionEnd({deadline:!0})}),n)}}))},t.nextFrame=function(e){t.cancelNextFrame(),t.raf=J()(e)},t.cancelNextFrame=function(){t.raf&&(J.a.cancel(t.raf),t.raf=null)},t.state={status:"none",statusActive:!1,newStatus:!1,statusStyle:null},t.$cacheEle=null,t.node=null,t.raf=null,t}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),bA(e,[{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 t,e=this.state,A=e.status,r=e.statusActive,i=e.statusStyle,o=this.props,a=o.children,s=o.motionName,g=o.visible,c=o.removeOnLeave,I=o.leavedClassName,u=o.eventProps;return a?"none"!==A&&n(this.props)?a(mA({},u,{className:F()((t={},FA(t,vA(s,A),"none"!==A),FA(t,vA(s,A+"-active"),"none"!==A&&r),FA(t,s,"string"===typeof s),t)),style:i}),this.setNodeRef):g?a(mA({},u),this.setNodeRef):c?null:a(mA({},u,{className:I}),this.setNodeRef):null}}],[{key:"getDerivedStateFromProps",value:function(t,e){var A=e.prevProps,r=e.status;if(!n(t))return{};var i=t.visible,o=t.motionAppear,a=t.motionEnter,s=t.motionLeave,g=t.motionLeaveImmediately,c={prevProps:t};return("appear"===r&&!o||"enter"===r&&!a||"leave"===r&&!s)&&(c.status="none",c.statusActive=!1,c.newStatus=!1),!A&&i&&o&&(c.status="appear",c.statusActive=!1,c.newStatus=!0),A&&!A.visible&&i&&a&&(c.status="enter",c.statusActive=!1,c.newStatus=!0),(A&&A.visible&&!i&&s||!A&&g&&!i&&s)&&(c.status="leave",c.statusActive=!1,c.newStatus=!0),c}}]),e}(a.a.Component);return r.defaultProps={visible:!0,motionEnter:!0,motionAppear:!0,motionLeave:!0,removeOnLeave:!0},A?a.a.forwardRef((function(t,e){return a.a.createElement(r,mA({internalRef:e},t))})):r}(yA),SA=a.a.forwardRef((function(t,e){var A=t.prefixCls,n=t.className,r=t.visible,i=t.style,o=t.children,s=t.onMouseEnter,g=t.onMouseLeave,c=t.onMouseDown,I=t.onTouchStart,u=o;return a.a.Children.count(o)>1&&(u=a.a.createElement("div",{className:"".concat(A,"-content")},o)),a.a.createElement("div",{ref:e,className:F()(n,!r&&"".concat(t.hiddenClassName)),onMouseEnter:s,onMouseLeave:g,onMouseDown:c,onTouchStart:I,style:i},u)}));SA.displayName="PopupInner";var DA=SA;function RA(t){var e=t.prefixCls,A=t.motion,n=t.animation,r=t.transitionName;return A||(n?{motionName:"".concat(e,"-").concat(n)}:r?{motionName:r}:null)}function UA(t){return(UA="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function GA(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}function NA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function kA(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?NA(Object(A),!0).forEach((function(e){xA(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):NA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function xA(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function OA(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function MA(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function LA(t,e){return(LA=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _A(t){var e=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(t){return!1}}();return function(){var A,n=TA(t);if(e){var r=TA(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return JA(this,A)}}function JA(t,e){return!e||"object"!==UA(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function TA(t){return(TA=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var jA=wA;function HA(t){return t&&t.motionName}var YA=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&LA(t,e)}(i,t);var e,A,n,r=_A(i);function i(){var t;return OA(this,i),(t=r.apply(this,arguments)).state={targetWidth:void 0,targetHeight:void 0,status:null,prevVisible:null,alignClassName:null},t.popupRef=a.a.createRef(),t.alignRef=a.a.createRef(),t.nextFrameState=null,t.nextFrameId=null,t.onAlign=function(e,A){var n=t.state.status,r=t.props,i=r.getClassNameFromAlign,o=r.onAlign,a=i(A);"align"===n?t.setState({alignClassName:a,status:"aligned"},(function(){t.alignRef.current.forceAlign()})):"aligned"===n?(t.setState({alignClassName:a,status:"afterAlign"}),o(e,A)):t.setState({alignClassName:a})},t.onMotionEnd=function(){var e=t.props.visible;t.setState({status:e?"AfterMotion":"stable"})},t.setStateOnNextFrame=function(e){t.cancelFrameState(),t.nextFrameState=kA(kA({},t.nextFrameState),e),t.nextFrameId=J()((function(){var e=kA({},t.nextFrameState);t.nextFrameState=null,t.setState(e)}))},t.getMotion=function(){return kA({},RA(t.props))},t.getAlignTarget=function(){var e=t.props,A=e.point,n=e.getRootDomNode;return A||n},t.cancelFrameState=function(){J.a.cancel(t.nextFrameId)},t.renderPopupElement=function(){var e=t.state,A=e.status,n=e.targetHeight,r=e.targetWidth,i=e.alignClassName,o=t.props,s=o.prefixCls,g=o.className,c=o.style,I=o.stretch,u=o.visible,l=o.align,C=o.destroyPopupOnHide,h=o.onMouseEnter,B=o.onMouseLeave,f=o.onMouseDown,d=o.onTouchStart,Q=o.children,E=F()(s,g,i),p="".concat(s,"-hidden"),y={};I&&(-1!==I.indexOf("height")?y.height=n:-1!==I.indexOf("minHeight")&&(y.minHeight=n),-1!==I.indexOf("width")?y.width=r:-1!==I.indexOf("minWidth")&&(y.minWidth=r));var v=kA(kA(kA(kA({},y),t.getZIndexStyle()),c),{},{opacity:"stable"!==A&&u?0:void 0}),m=t.getMotion(),b=u;u&&"beforeMotion"!==A&&"motion"!==A&&"stable"!==A&&(m.motionAppear=!1,m.motionEnter=!1,m.motionLeave=!1),"afterAlign"!==A&&"beforeMotion"!==A||(b=!1);var w=!u||"align"!==A&&"aligned"!==A&&"stable"!==A,S=!0;return"stable"===A&&(S=u),C&&!S?null:a.a.createElement(jA,Object.assign({visible:b},m,{removeOnLeave:!1,onEnterEnd:t.onMotionEnd,onLeaveEnd:t.onMotionEnd}),(function(e,A){var n=e.style,r=e.className;return a.a.createElement(lA,{target:t.getAlignTarget(),key:"popup",ref:t.alignRef,monitorWindowResize:!0,disabled:w,align:l,onAlign:t.onAlign},a.a.createElement(DA,{prefixCls:s,visible:S,hiddenClassName:p,className:F()(E,r),ref:Tt(A,t.popupRef),onMouseEnter:h,onMouseLeave:B,onMouseDown:f,onTouchStart:d,style:kA(kA({},v),n)},Q))}))},t.renderMaskElement=function(){var e=t.props,A=e.mask,n=e.maskMotion,r=e.maskTransitionName,i=e.maskAnimation,o=e.prefixCls,s=e.visible;if(!A)return null;var g={};return n&&n.motionName&&(g=kA({motionAppear:!0},RA({motion:n,prefixCls:o,transitionName:r,animation:i}))),a.a.createElement(jA,Object.assign({},g,{visible:s,removeOnLeave:!0}),(function(e){var A=e.className;return a.a.createElement("div",{style:t.getZIndexStyle(),key:"mask",className:F()("".concat(o,"-mask"),A)})}))},t}return e=i,n=[{key:"getDerivedStateFromProps",value:function(t,e){var A=t.visible,n=GA(t,["visible"]),r=e.prevVisible,i=e.status,o={prevVisible:A,status:i},a=RA(n);return null===r&&!1===A?o.status="stable":A!==r&&(A||HA(a)&&["motion","AfterMotion","stable"].includes(i)?o.status=null:o.status="stable",A&&(o.alignClassName=null)),o}}],(A=[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var t=this.state.status,e=this.props,A=e.getRootDomNode,n=e.visible,r=e.stretch;if(this.cancelFrameState(),n&&"stable"!==t)switch(t){case null:this.setStateOnNextFrame({status:r?"measure":"align"});break;case"afterAlign":this.setStateOnNextFrame({status:HA(this.getMotion())?"beforeMotion":"stable"});break;case"AfterMotion":this.setStateOnNextFrame({status:"stable"});break;default:var i=["measure","align",null,"beforeMotion","motion"],o=i.indexOf(t),a=i[o+1];-1!==o&&a&&this.setStateOnNextFrame({status:a})}if("measure"===t){var s=A();s&&this.setStateOnNextFrame({targetHeight:s.offsetHeight,targetWidth:s.offsetWidth})}}},{key:"componentWillUnmount",value:function(){this.cancelFrameState()}},{key:"getZIndexStyle",value:function(){return{zIndex:this.props.zIndex}}},{key:"render",value:function(){return a.a.createElement("div",null,this.renderMaskElement(),this.renderPopupElement())}}])&&MA(e.prototype,A),n&&MA(e,n),i}(o.Component),VA=a.a.createContext(null);function ZA(t){return(ZA="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function WA(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function KA(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function PA(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function qA(t,e){return(qA=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function XA(t){var e=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(t){return!1}}();return function(){var A,n=tn(t);if(e){var r=tn(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return zA(this,A)}}function zA(t,e){return!e||"object"!==ZA(e)&&"function"!==typeof e?$A(t):e}function $A(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tn(t){return(tn=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function en(){}function An(){return""}function nn(){return window.document}var rn=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var on=function(t){var e=function(e){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qA(t,e)}(o,e);var A,n,r,i=XA(o);function o(t){var e,A;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,t)).popupRef=a.a.createRef(),e.triggerRef=a.a.createRef(),e.onMouseEnter=function(t){var A=e.props.mouseEnterDelay;e.fireEvents("onMouseEnter",t),e.delaySetPopupVisible(!0,A,A?null:t)},e.onMouseMove=function(t){e.fireEvents("onMouseMove",t),e.setPoint(t)},e.onMouseLeave=function(t){e.fireEvents("onMouseLeave",t),e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},e.onPopupMouseEnter=function(){e.clearDelayTimer()},e.onPopupMouseLeave=function(t){t.relatedTarget&&!t.relatedTarget.setTimeout&&e.popupRef.current&&e.popupRef.current.popupRef.current&&Lt(e.popupRef.current.popupRef.current,t.relatedTarget)||e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},e.onFocus=function(t){e.fireEvents("onFocus",t),e.clearDelayTimer(),e.isFocusToShow()&&(e.focusTime=Date.now(),e.delaySetPopupVisible(!0,e.props.focusDelay))},e.onMouseDown=function(t){e.fireEvents("onMouseDown",t),e.preClickTime=Date.now()},e.onTouchStart=function(t){e.fireEvents("onTouchStart",t),e.preTouchTime=Date.now()},e.onBlur=function(t){e.fireEvents("onBlur",t),e.clearDelayTimer(),e.isBlurToHide()&&e.delaySetPopupVisible(!1,e.props.blurDelay)},e.onContextMenu=function(t){t.preventDefault(),e.fireEvents("onContextMenu",t),e.setPopupVisible(!0,t)},e.onContextMenuClose=function(){e.isContextMenuToShow()&&e.close()},e.onClick=function(t){if(e.fireEvents("onClick",t),e.focusTime){var A;if(e.preClickTime&&e.preTouchTime?A=Math.min(e.preClickTime,e.preTouchTime):e.preClickTime?A=e.preClickTime:e.preTouchTime&&(A=e.preTouchTime),Math.abs(A-e.focusTime)<20)return;e.focusTime=0}e.preClickTime=0,e.preTouchTime=0,e.isClickToShow()&&(e.isClickToHide()||e.isBlurToHide())&&t&&t.preventDefault&&t.preventDefault();var n=!e.state.popupVisible;(e.isClickToHide()&&!n||n&&e.isClickToShow())&&e.setPopupVisible(!e.state.popupVisible,t)},e.onPopupMouseDown=function(){var t;(e.hasPopupMouseDown=!0,clearTimeout(e.mouseDownTimeout),e.mouseDownTimeout=window.setTimeout((function(){e.hasPopupMouseDown=!1}),0),e.context)&&(t=e.context).onPopupMouseDown.apply(t,arguments)},e.onDocumentClick=function(t){if(!e.props.mask||e.props.maskClosable){var A=t.target,n=e.getRootDomNode(),r=e.getPopupDomNode();Lt(n,A)||Lt(r,A)||e.hasPopupMouseDown||e.close()}},e.getRootDomNode=function(){var t=e.props.getTriggerDOMNode;if(t)return t(e.triggerRef.current);try{var A=L(e.triggerRef.current);if(A)return A}catch(n){}return M.a.findDOMNode($A(e))},e.getPopupClassNameFromAlign=function(t){var A=[],n=e.props,r=n.popupPlacement,i=n.builtinPlacements,o=n.prefixCls,a=n.alignPoint,s=n.getPopupClassNameFromAlign;return r&&i&&A.push(function(t,e,A,n){for(var r=A.points,i=Object.keys(t),o=0;o<i.length;o+=1){var a=i[o];if(Ae(t[a].points,r,n))return"".concat(e,"-placement-").concat(a)}return""}(i,o,t,a)),s&&A.push(s(t)),A.join(" ")},e.getComponent=function(){var t=e.props,A=t.prefixCls,n=t.destroyPopupOnHide,r=t.popupClassName,i=t.onPopupAlign,o=t.popupMotion,s=t.popupAnimation,g=t.popupTransitionName,c=t.popupStyle,I=t.mask,u=t.maskAnimation,l=t.maskTransitionName,C=t.maskMotion,h=t.zIndex,B=t.popup,f=t.stretch,d=t.alignPoint,Q=e.state,E=Q.popupVisible,p=Q.point,y=e.getPopupAlign(),v={};return e.isMouseEnterToShow()&&(v.onMouseEnter=e.onPopupMouseEnter),e.isMouseLeaveToHide()&&(v.onMouseLeave=e.onPopupMouseLeave),v.onMouseDown=e.onPopupMouseDown,v.onTouchStart=e.onPopupMouseDown,a.a.createElement(YA,Object.assign({prefixCls:A,destroyPopupOnHide:n,visible:E,point:d&&p,className:r,align:y,onAlign:i,animation:s,getClassNameFromAlign:e.getPopupClassNameFromAlign},v,{stretch:f,getRootDomNode:e.getRootDomNode,style:c,mask:I,zIndex:h,transitionName:g,maskAnimation:u,maskTransitionName:l,maskMotion:C,ref:e.popupRef,motion:o}),"function"===typeof B?B():B)},e.getContainer=function(){var t=$A(e).props,A=document.createElement("div");return A.style.position="absolute",A.style.top="0",A.style.left="0",A.style.width="100%",(t.getPopupContainer?t.getPopupContainer(e.getRootDomNode()):t.getDocument().body).appendChild(A),A},e.setPoint=function(t){e.props.alignPoint&&t&&e.setState({point:{pageX:t.pageX,pageY:t.pageY}})},e.handlePortalUpdate=function(){e.state.prevPopupVisible!==e.state.popupVisible&&e.props.afterPopupVisibleChange(e.state.popupVisible)},A="popupVisible"in t?!!t.popupVisible:!!t.defaultPopupVisible,e.state={prevPopupVisible:A,popupVisible:A},rn.forEach((function(t){e["fire".concat(t)]=function(A){e.fireEvents(t,A)}})),e}return A=o,r=[{key:"getDerivedStateFromProps",value:function(t,e){var A=t.popupVisible,n={};return void 0!==A&&e.popupVisible!==A&&(n.popupVisible=A,n.prevPopupVisible=e.popupVisible),n}}],(n=[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var t,e=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(t=e.getDocument(),this.clickOutsideHandler=Yt(t,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(t=t||e.getDocument(),this.touchOutsideHandler=Yt(t,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(t=t||e.getDocument(),this.contextMenuOutsideHandler1=Yt(t,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Yt(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 t=this.props,e=t.popupPlacement,A=t.popupAlign,n=t.builtinPlacements;return e&&n?function(t,e,A){return te(te({},t[e]||{}),A)}(n,e,A):A}},{key:"setPopupVisible",value:function(t,e){var A=this.props.alignPoint,n=this.state.popupVisible;this.clearDelayTimer(),n!==t&&("popupVisible"in this.props||this.setState({popupVisible:t,prevPopupVisible:n}),this.props.onPopupVisibleChange(t)),A&&e&&this.setPoint(e)}},{key:"delaySetPopupVisible",value:function(t,e,A){var n=this,r=1e3*e;if(this.clearDelayTimer(),r){var i=A?{pageX:A.pageX,pageY:A.pageY}:null;this.delayTimer=window.setTimeout((function(){n.setPopupVisible(t,i),n.clearDelayTimer()}),r)}else this.setPopupVisible(t,A)}},{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(t){var e=this.props.children.props,A=this.props;return e[t]&&A[t]?this["fire".concat(t)]:e[t]||A[t]}},{key:"isClickToShow",value:function(){var t=this.props,e=t.action,A=t.showAction;return-1!==e.indexOf("click")||-1!==A.indexOf("click")}},{key:"isContextMenuToShow",value:function(){var t=this.props,e=t.action,A=t.showAction;return-1!==e.indexOf("contextMenu")||-1!==A.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var t=this.props,e=t.action,A=t.hideAction;return-1!==e.indexOf("click")||-1!==A.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var t=this.props,e=t.action,A=t.showAction;return-1!==e.indexOf("hover")||-1!==A.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var t=this.props,e=t.action,A=t.hideAction;return-1!==e.indexOf("hover")||-1!==A.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var t=this.props,e=t.action,A=t.showAction;return-1!==e.indexOf("focus")||-1!==A.indexOf("focus")}},{key:"isBlurToHide",value:function(){var t=this.props,e=t.action,A=t.hideAction;return-1!==e.indexOf("focus")||-1!==A.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(t,e){var A=this.props.children.props[t];A&&A(e);var n=this.props[t];n&&n(e)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,A=this.props,n=A.children,r=A.forceRender,i=A.alignPoint,o=A.className,s=a.a.Children.only(n),g={key:"trigger"};this.isContextMenuToShow()?g.onContextMenu=this.onContextMenu:g.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(g.onClick=this.onClick,g.onMouseDown=this.onMouseDown,g.onTouchStart=this.onTouchStart):(g.onClick=this.createTwoChains("onClick"),g.onMouseDown=this.createTwoChains("onMouseDown"),g.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(g.onMouseEnter=this.onMouseEnter,i&&(g.onMouseMove=this.onMouseMove)):g.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?g.onMouseLeave=this.onMouseLeave:g.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(g.onFocus=this.onFocus,g.onBlur=this.onBlur):(g.onFocus=this.createTwoChains("onFocus"),g.onBlur=this.createTwoChains("onBlur"));var c=F()(s&&s.props&&s.props.className,o);c&&(g.className=c);var I,u=function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?WA(Object(A),!0).forEach((function(e){KA(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):WA(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},g);(I=s).type&&I.type.prototype&&!I.type.prototype.render||"function"===typeof I&&I.prototype&&!I.prototype.render||(u.ref=Tt(this.triggerRef,s.ref));var l,C=a.a.cloneElement(s,u);return(e||this.popupRef.current||r)&&(l=a.a.createElement(t,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),a.a.createElement(VA.Provider,{value:{onPopupMouseDown:this.onPopupMouseDown}},C,l)}}])&&PA(A.prototype,n),r&&PA(A,r),o}(a.a.Component);return e.contextType=VA,e.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:An,getDocument:nn,onPopupVisibleChange:en,afterPopupVisibleChange:en,onPopupAlign:en,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[]},e}(zt),an={adjustX:1,adjustY:1},sn=[0,0],gn={left:{points:["cr","cl"],overflow:an,offset:[-4,0],targetOffset:sn},right:{points:["cl","cr"],overflow:an,offset:[4,0],targetOffset:sn},top:{points:["bc","tc"],overflow:an,offset:[0,-4],targetOffset:sn},bottom:{points:["tc","bc"],overflow:an,offset:[0,4],targetOffset:sn},topLeft:{points:["bl","tl"],overflow:an,offset:[0,-4],targetOffset:sn},leftTop:{points:["tr","tl"],overflow:an,offset:[-4,0],targetOffset:sn},topRight:{points:["br","tr"],overflow:an,offset:[0,-4],targetOffset:sn},rightTop:{points:["tl","tr"],overflow:an,offset:[4,0],targetOffset:sn},bottomRight:{points:["tr","br"],overflow:an,offset:[0,4],targetOffset:sn},rightBottom:{points:["bl","br"],overflow:an,offset:[4,0],targetOffset:sn},bottomLeft:{points:["tl","bl"],overflow:an,offset:[0,4],targetOffset:sn},leftBottom:{points:["br","bl"],overflow:an,offset:[-4,0],targetOffset:sn}},cn=function(t){var e=t.overlay,A=t.prefixCls,n=t.id;return a.a.createElement("div",{className:"".concat(A,"-inner"),id:n,role:"tooltip"},"function"===typeof e?e():e)};function In(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function un(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function ln(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}var Cn=Object(o.forwardRef)((function(t,e){var A=t.overlayClassName,n=t.trigger,r=void 0===n?["hover"]:n,i=t.mouseEnterDelay,s=void 0===i?0:i,g=t.mouseLeaveDelay,c=void 0===g?.1:g,I=t.overlayStyle,u=t.prefixCls,l=void 0===u?"rc-tooltip":u,C=t.children,h=t.onVisibleChange,B=t.afterVisibleChange,f=t.transitionName,d=t.animation,Q=t.placement,E=void 0===Q?"right":Q,p=t.align,y=void 0===p?{}:p,v=t.destroyTooltipOnHide,m=void 0!==v&&v,b=t.defaultVisible,F=t.getTooltipContainer,w=ln(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer"]),S=Object(o.useRef)(null);Object(o.useImperativeHandle)(e,(function(){return S.current}));var D=function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?In(Object(A),!0).forEach((function(e){un(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):In(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},w);"visible"in t&&(D.popupVisible=t.visible);return a.a.createElement(on,Object.assign({popupClassName:A,prefixCls:l,popup:function(){var e=t.arrowContent,A=void 0===e?null:e,n=t.overlay,r=t.id;return[a.a.createElement("div",{className:"".concat(l,"-arrow"),key:"arrow"},A),a.a.createElement(cn,{key:"content",prefixCls:l,id:r,overlay:n})]},action:r,builtinPlacements:gn,popupPlacement:E,ref:S,popupAlign:y,getPopupContainer:F,onPopupVisibleChange:h,afterPopupVisibleChange:B,popupTransitionName:f,popupAnimation:d,defaultPopupVisible:b,destroyPopupOnHide:m,mouseLeaveDelay:c,popupStyle:I,mouseEnterDelay:s},D),C)}));function hn(t){var e=t.title,A=t.content,n=t.overlayClassName,r=Object(o.useRef)(),i=Object(o.useCallback)((function(){return r.current?r.current.closest(".vitessce-container"):null}),[r]),s=e||A;return a.a.createElement(a.a.Fragment,null,a.a.createElement("span",{ref:r}),a.a.createElement(Cn,Object.assign({getTooltipContainer:i,overlayClassName:n,overlay:s},t)))}function Bn(t){return a.a.createElement(hn,t)}function fn(t){var e=t.title,A=t.subtitle,r=t.onClick,i=t.handler,s=t.handlerKey,g=t.confirm,c=t.visible,I=Object(o.useState)(!1),u=Object(n.a)(I,2),l=u[0],C=u[1];function h(){!g||l?(r(),i()):C(!0)}Object(o.useEffect)((function(){C(!1)}),[c]);var B="".concat(l?"Confirm ":"").concat(e);return a.a.createElement("button",{title:B,type:"button",onClick:h,onKeyPress:function(t){return Object(Ot.b)(t,s,h)}},B,A&&a.a.createElement(a.a.Fragment,null,a.a.createElement("br",null),a.a.createElement("span",{className:"small"},A)))}function dn(t){var e=t.menuConfig,A=t.onClick,n=t.color,r=void 0===n?null:n,i=t.palette,o=void 0===i?null:i,s=t.setColor,g=void 0===s?null:s,c=t.visible;var I=o?o.map(Ot.c):Mt.d.concat([[255,255,255],[128,128,128],[0,0,0]]).map(Ot.c);return a.a.createElement("div",null,r&&g&&I&&a.a.createElement(xt.TwitterPicker,{className:"popover-menu-color",disableAlpha:!0,width:108,triangle:"hide",colors:I,color:Object(Ot.c)(r),onChangeComplete:function(t){var e=t.rgb;e&&g&&g([e.r,e.g,e.b])}}),a.a.createElement("ul",{className:"popover-menu-list"},e.map((function(t){return a.a.createElement("li",{key:t.title+t.subtitle},a.a.createElement(fn,Object.assign({},t,{onClick:A,visible:c})))}))))}function Qn(t){var e=t.menuConfig,A=t.placement,r=t.children,i=t.color,s=void 0===i?null:i,g=t.setColor,c=void 0===g?null:g,I=t.palette,u=void 0===I?null:I,l=Object(o.useState)(!1),C=Object(n.a)(l,2),h=C[0],B=C[1];return a.a.createElement(Bn,{content:a.a.createElement(dn,{menuConfig:e,onClick:function(){return B(!1)},color:s,setColor:c,palette:u,visible:h}),placement:A,visible:h,onVisibleChange:B},r)}function En(){return(En=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function pn(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}hn.defaultProps={overlayClassName:"help-tooltip",placement:"top",trigger:"hover",mouseEnterDelay:.2,mouseLeaveDelay:0},Bn.defaultProps={overlayClassName:"popover",placement:"top",trigger:"click",mouseEnterDelay:0,mouseLeaveDelay:0};var yn=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 vn(t){var e=t.svgRef,A=t.title,n=t.titleId,r=pn(t,["svgRef","title","titleId"]);return o.createElement("svg",En({width:24,height:24,viewBox:"0 0 24 24",ref:e,"aria-labelledby":n},r),A?o.createElement("title",{id:n},A):null,yn)}var mn=o.forwardRef((function(t,e){return o.createElement(vn,En({svgRef:e},t))}));A.p;function bn(t){var e=t.path,A=t.level,n=t.height,r=t.onCheckNode,o=t.onNodeRemove,a=t.onNodeSetIsEditing,s=t.onExportLevelZeroNodeJSON,g=t.onExportLevelZeroNodeTabular,c=t.onExportSetJSON,I=t.checkable,u=t.editable,l=t.exportable,C=t.checked;return[].concat(Object(i.a)(u?[{title:"Rename",handler:function(){a(e,!0)},handlerKey:"r"},{title:"Delete",confirm:!0,handler:function(){o(e)},handlerKey:"d"}]:[]),Object(i.a)(0===A&&l?[{title:"Export hierarchy",subtitle:"(to JSON file)",handler:function(){s(e)},handlerKey:"j"}].concat(Object(i.a)(n<=1?[{title:"Export hierarchy",subtitle:"(to CSV file)",handler:function(){g(e)},handlerKey:"t"}]:[])):[]),Object(i.a)(A>0?[].concat(Object(i.a)(I?[{title:C?"Uncheck":"Check",handler:function(){r(e,!C)},handlerKey:"s"}]:[]),Object(i.a)(l?[{title:"Export set",subtitle:"(to JSON file)",handler:function(){c(e)},handlerKey:"e"}]:[])):[]))}function Fn(t){var e,A=t.title,n=t.path,r=t.nodeKey,i=t.level,o=t.height,s=t.color,c=t.checkbox,I=t.isChecking,u=t.isLeaf,l=t.onNodeSetColor,C=t.onNodeView,h=t.expanded,B=t.onCheckLevel,f=t.checkedLevelPath,d=t.checkedLevelIndex,Q=t.disableTooltip,E=t.size,p=t.datatype,y=t.editable,v=0===i&&!h,m=d&&g()(n,f)&&d<o?d+1:1,b=new Intl.NumberFormat("en-US").format(E);e=v?Object(Ot.e)(m):u||!h?"Color individual set (".concat(b," ").concat(p).concat(1===E?"":"s",")"):"Color by expanded descendants";var F=0!==i||h?function(){return C(n)}:function(){return B(r,m)},w=Q?{visible:!1}:{},S=bn(t);return a.a.createElement("span",null,a.a.createElement(hn,Object.assign({title:e},w),a.a.createElement("button",{type:"button",onClick:F,onKeyPress:function(t){return Object(Ot.b)(t,"v",(function(){return C(n)}))},className:"title-button"},A)),S.length>0?a.a.createElement(Qn,{menuConfig:bn(t),color:i>0&&y?s||Mt.b:null,setColor:function(t){return l(n,t)}},a.a.createElement(mn,{className:"node-menu-icon"})):null,i>0&&I?c:null,i>0&&a.a.createElement("span",{className:"node-size-label"},b))}function wn(t){var e=t.title,A=t.path,r=t.onNodeSetName,i=t.onNodeCheckNewName,s=Object(o.useState)(e),g=Object(n.a)(s,2),c=g[0],I=g[1],u=i(A,c);function l(){u||r(A,c,!0)}return a.a.createElement("span",{className:"title-button-with-input"},a.a.createElement("input",{autoFocus:!0,className:"title-input",type:"text",value:c,onChange:function(t){I(t.target.value)},onKeyPress:function(t){return Object(Ot.b)(t,"Enter",l)},onFocus:function(t){return t.target.select()}}),!u&&a.a.createElement("button",{type:"button",className:"title-save-button",onClick:l},"Save"))}function Sn(t){var e=t.isEditing,A=t.isCurrentSet;return e||A?a.a.createElement(wn,t):a.a.createElement(Fn,t)}function Dn(t){var e=t.nodeKey,A=t.path,n=t.height,r=t.onCheckLevel,i=t.checkedLevelPath,o=t.checkedLevelIndex,s=t.hasColorEncoding;function c(t){if(t.target.checked){var A=parseInt(t.target.value,10);r(e,A)}}return a.a.createElement("div",{className:"level-buttons-container"},kt()(1,n+1).map((function(t){var e=g()(A,i)&&t===o;return a.a.createElement("div",{className:"level-buttons",key:t},a.a.createElement(hn,{title:Object(Ot.e)(t)},a.a.createElement("input",{className:Object(Gt.a)("level-radio-button",{checked:e&&!s}),type:"checkbox",value:t,checked:e&&s,onChange:c})))})))}function Rn(t){var e=t.isLeaf,A=t.isOpen,n=t.color,r=n?Object(Ot.c)(n):void 0;return e?a.a.createElement("i",{className:"anticon anticon-circle rc-tree-switcher-icon"},a.a.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em","aria-hidden":"true"},a.a.createElement("rect",{fill:r,x:300,y:300,width:424,height:424}))):a.a.createElement("i",{className:"anticon anticon-caret-down rc-tree-switcher-icon"},a.a.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em","aria-hidden":"true"},a.a.createElement("path",{fill:A?"#444":r,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 Un=function(t){Object(Rt.a)(A,t);var e=Object(Ut.a)(A);function A(){var t;Object(wt.a)(this,A);for(var 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))).renderSelector=function(){var e=t.props,A=e.title,n=e.isCurrentSet,r=e.isSelected,i=e.isEditing,o=e.onDragStart,s=t.context.rcTree,g=s.prefixCls,c=s.draggable,I="".concat(g,"-node-content-wrapper"),u=!n&&!i&&c;return a.a.createElement("span",{ref:t.setSelectHandle,title:A,className:F()(I,"".concat(I,"-").concat(t.getNodeState()||"normal"),r&&"".concat(g,"-node-selected"),u&&"draggable"),draggable:u,"aria-grabbed":u,onDragStart:u?function(e){o(),t.onDragStart(e)}:void 0},a.a.createElement(Sn,Object.assign({},t.props,{prefixClass:g,checkbox:t.renderCheckbox()})),t.renderLevels())},t.renderLevels=function(){var e=t.props,A=e.level,n=e.expanded;return 0!==A||n?null:a.a.createElement(Dn,t.props)},t.renderSwitcher=function(){var e=t.props,A=e.expanded,n=e.isLeaf,r=e.color,i=t.context.rcTree,o=i.prefixCls,s=i.onNodeExpand,g=function(e){n||s(e,Object(Dt.a)(t))},I=F()("".concat(o,"-switcher"),Object(c.a)({},"".concat(o,"-switcher_").concat(A?"open":"close"),!n));return a.a.createElement("span",{className:I,onClick:g,onKeyPress:function(t){return Object(Ot.b)(t,"d",g)},role:"button",tabIndex:"0"},a.a.createElement(Rn,{isLeaf:n,isOpen:A,color:r}))},t}return Object(St.a)(A,[{key:"render",value:function(){var t,e=this,A=this.props,n=A.style,r=A.loading,i=A.level,o=A.dragOver,s=A.dragOverGapTop,g=A.dragOverGapBottom,I=A.isLeaf,u=A.expanded,l=A.selected,C=A.checked,h=A.halfChecked,B=A.onDragEnd,f=A.expandable,d=Object(Ft.a)(A,["style","loading","level","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","expanded","selected","checked","halfChecked","onDragEnd","expandable"]),Q=this.context.rcTree,E=Q.prefixCls,p=Q.filterTreeNode,y=Q.draggable,v=this.isDisabled(),m=Et(d);return a.a.createElement("li",Object.assign({className:F()("rc-tree-treenode","level-".concat(i,"-treenode"),(t={},Object(c.a)(t,"".concat(E,"-treenode-disabled"),v),Object(c.a)(t,"".concat(E,"-treenode-switcher-").concat(u?"open":"close"),!I),Object(c.a)(t,"".concat(E,"-treenode-checkbox-checked"),C),Object(c.a)(t,"".concat(E,"-treenode-checkbox-indeterminate"),h),Object(c.a)(t,"".concat(E,"-treenode-selected"),l),Object(c.a)(t,"".concat(E,"-treenode-loading"),r),Object(c.a)(t,"drag-over",!v&&o),Object(c.a)(t,"drag-over-gap-top",!v&&s),Object(c.a)(t,"drag-over-gap-bottom",!v&&g),Object(c.a)(t,"filter-node",p&&p(this)),t)),style:n,role:"treeitem",onDragEnter:y?this.onDragEnter:void 0,onDragOver:y?this.onDragOver:void 0,onDragLeave:y?this.onDragLeave:void 0,onDrop:y?this.onDrop.bind(this):void 0,onDragEnd:y?function(t){B(),e.onDragEnd(t)}:void 0},m),f?this.renderSwitcher():null,this.renderSelector(),this.renderChildren())}}]),A}(et),Gn=A(422),Nn=A(101);function kn(){return(kn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function xn(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}function On(t){var e=t.svgRef,A=t.title,n=t.titleId,r=xn(t,["svgRef","title","titleId"]);return o.createElement("svg",kn({viewBox:"0 0 16.433999 10.234",height:12,width:18,ref:e,"aria-labelledby":n},r),A?o.createElement("title",{id:n},A):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 Mn=o.forwardRef((function(t,e){return o.createElement(On,kn({svgRef:e},t))}));A.p;function Ln(){return(Ln=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function _n(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}function Jn(t){var e=t.svgRef,A=t.title,n=t.titleId,r=_n(t,["svgRef","title","titleId"]);return o.createElement("svg",Ln({width:18,height:12,viewBox:"0 0 16 10",ref:e,"aria-labelledby":n},r),A?o.createElement("title",{id:n},A):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 Tn=o.forwardRef((function(t,e){return o.createElement(Jn,Ln({svgRef:e},t))}));A.p;function jn(){return(jn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function Hn(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}var Yn=o.createElement("rect",{x:"5%",width:"90%",height:"100%",fill:"white"}),Vn=o.createElement("g",null,o.createElement("rect",{x:0,y:0,width:25.3804963846,height:16,mask:"url(#union-mask)"}));function Zn(t){var e=t.svgRef,A=t.title,n=t.titleId,r=Hn(t,["svgRef","title","titleId"]);return o.createElement("svg",jn({id:"svg14",viewBox:"0 0 25.3804963846 16",height:16,width:25.3804963846,ref:e,"aria-labelledby":n},r),A?o.createElement("title",{id:n},A):null,o.createElement("defs",null,o.createElement("mask",{id:"union-mask",x:0,y:0,width:25.3804963846,height:16},Yn,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"})))),Vn)}var Wn=o.forwardRef((function(t,e){return o.createElement(Zn,jn({svgRef:e},t))}));A.p;function Kn(t){var e=t.datatype,A=t.onError,n=t.onImportTree,r=t.onCreateLevelZeroNode,s=t.importable,g=t.editable,c=Object(o.useCallback)((function(t,r){return function(){var i=document.createElement("input");i.setAttribute("type","file"),i.setAttribute("accept",r),document.body.appendChild(i),i.click(),i.addEventListener("change",(function(r){if(window.File&&window.FileReader&&window.FileList&&window.Blob){var i=r.target.files;if(i&&1===i.length){var o=new FileReader;o.addEventListener("load",(function(){var r=o.result;try{var i=t(r,e);A(!1),n(i)}catch(a){A(a.message)}}),!1),o.readAsText(i[0])}else A("Incorrect number of files selected.")}else A("Local file reading APIs are not fully supported in this browser.")})),i.remove()}}),[e,A,n]),I=[].concat(Object(i.a)(g?[{title:"Create hierarchy",handler:r,handlerKey:"n"}]:[]),Object(i.a)(s?[{title:"Import hierarchy",subtitle:"(from CSV file)",handler:c(Gn.e,Nn.e),handlerKey:"c"},{title:"Import hierarchy",subtitle:"(from JSON file)",handler:c(Gn.d,Nn.d),handlerKey:"j"}]:[]));return I.length>0?a.a.createElement(Qn,{menuConfig:I},a.a.createElement("button",{className:"plus-button",type:"submit"},"+")):null}function Pn(t){var e=t.onUnion,A=t.onIntersection,n=t.onComplement,r=t.operatable,i=t.hasCheckedSetsToUnion,o=t.hasCheckedSetsToIntersect,s=t.hasCheckedSetsToComplement;return a.a.createElement(a.a.Fragment,null,r&&a.a.createElement(a.a.Fragment,null,a.a.createElement("button",{onClick:e,title:"New set from union of checked sets",type:"submit",disabled:!i},a.a.createElement(Mn,null)),a.a.createElement("button",{onClick:A,title:"New set from intersection of checked sets",type:"submit",disabled:!o},a.a.createElement(Tn,null)),a.a.createElement("button",{onClick:n,title:"New set from complement of checked sets",type:"submit",disabled:!s},a.a.createElement(Wn,null))))}var qn=A(137);function Xn(t,e){return Object(r.a)({},t,{tree:t?t.tree.map((function(t){return function t(e,A,n){var o,a=[].concat(Object(i.a)(A),[e.name]);return Object(r.a)({},e,{},e.children?{children:e.children.map((function(e){return t(e,a,n)}))}:{},{color:(null===n||void 0===n||null===(o=n.find((function(t){return g()(t.path,a)})))||void 0===o?void 0:o.color)||Mt.b})}(t,[],e)})):[]})}function zn(t){var e=t.sets,A=t.additionalSets,r=t.setColor,s=t.levelSelection,c=t.setSelection,I=t.setExpansion,u=t.hasColorEncoding,l=t.datatype,C=t.draggable,h=void 0===C||C,B=t.checkable,f=void 0===B||B,d=t.editable,Q=void 0===d||d,E=t.expandable,p=void 0===E||E,y=t.operatable,v=void 0===y||y,m=t.exportable,b=void 0===m||m,F=t.importable,w=void 0===F||F,S=t.onError,D=t.onCheckNode,R=t.onExpandNode,U=t.onDropNode,G=t.onCheckLevel,N=t.onNodeSetColor,k=t.onNodeSetName,x=t.onNodeCheckNewName,O=t.onNodeRemove,M=t.onNodeView,L=t.onImportTree,_=t.onCreateLevelZeroNode,J=t.onExportLevelZeroNodeJSON,T=t.onExportLevelZeroNodeTabular,j=t.onExportSetJSON,H=t.onUnion,Y=t.onIntersection,V=t.onComplement,Z=t.hasCheckedSetsToUnion,W=t.hasCheckedSetsToIntersect,K=t.hasCheckedSetsToComplement,P=Object(o.useState)(!1),q=Object(n.a)(P,2),X=q[0],z=q[1],$=Object(o.useState)(null),tt=Object(n.a)($,2),et=tt[0],At=tt[1],nt=Object(o.useMemo)((function(){return Xn(e,r)}),[e,r]),rt=Object(o.useMemo)((function(){return Xn(A,r)}),[A,r]),it=rt?rt.tree.flatMap((function(t){return function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return null;var n=[].concat(Object(i.a)(A),[e.name]);return e.children?[Object(Ot.g)(n)].concat(Object(i.a)(e.children.flatMap((function(e){return t(e,n)})))):Object(Ot.g)(n)}(t,[])})):[],ot=(c||[]).map(Ot.g),at=(I||[]).map(Ot.g),st=ot.filter((function(t){return!it.includes(t)})),gt=at.filter((function(t){return!it.includes(t)})),ct=ot.filter((function(t){return it.includes(t)})),It=at.filter((function(t){return it.includes(t)}));function ut(t,e,A){return t?t.map((function(t){var n=[].concat(Object(i.a)(A),[t.name]);return a.a.createElement(Un,Object.assign({key:Object(Ot.g)(n)},Object(qn.h)(t,n,r),{isEditing:g()(et,n),datatype:l,draggable:h&&!e,editable:Q&&!e,checkable:f,expandable:p,exportable:b,hasColorEncoding:u,isChecking:!0,checkedLevelPath:s?s.levelZeroPath:null,checkedLevelIndex:s?s.levelIndex:null,onCheckNode:D,onCheckLevel:G,onNodeView:M,onNodeSetColor:N,onNodeSetName:function(t,e){k(t,e),At(null)},onNodeCheckNewName:x,onNodeSetIsEditing:At,onNodeRemove:O,onExportLevelZeroNodeJSON:J,onExportLevelZeroNodeTabular:T,onExportSetJSON:j,disableTooltip:X,onDragStart:function(){return z(!0)},onDragEnd:function(){return z(!1)}}),ut(t.children,e,n))})):null}return a.a.createElement("div",{className:"sets-manager"},a.a.createElement("div",{className:"sets-manager-tree"},a.a.createElement(bt,{draggable:!1,checkable:f,checkedKeys:st,expandedKeys:gt,autoExpandParent:!0,onCheck:function(t,e){return D(e.node.props.nodeKey,e.checked)},onExpand:function(t,e){return R(t,e.node.props.nodeKey,e.expanded)}},ut(nt.tree,!0,[])),a.a.createElement(bt,{draggable:!0,checkable:f,checkedKeys:ct,expandedKeys:It,autoExpandParent:!0,onCheck:function(t,e){return D(e.node.props.nodeKey,e.checked)},onExpand:function(t,e){return R(t,e.node.props.nodeKey,e.expanded)},onDrop:function(t){var e=t.node.props.eventKey,A=t.dragNode.props.eventKey,n=t.dropToGap,r=t.dropPosition;U(e,A,r,n)}},ut(rt.tree,!1,[])),a.a.createElement(Kn,{datatype:l,onError:S,onImportTree:L,onCreateLevelZeroNode:_,importable:w,editable:Q})),a.a.createElement("div",{className:"set-operation-buttons"},a.a.createElement(Pn,{onUnion:H,onIntersection:Y,onComplement:V,operatable:v,hasCheckedSetsToUnion:Z,hasCheckedSetsToIntersect:W,hasCheckedSetsToComplement:K})))}A.d(e,"a",(function(){return zn}))},function(t,e,A){"use strict";var n,r=A(2),i=A.n(r),o=A(21),a=A(12),s=A(20),g=A(13),c=A(8),I=A(271),u=A(0),l=A.n(u),C=A(123),h=A(833),B=A(30),f=A(10),d=(A(25),A(32)),Q=A(41),E=A(86),p=A(594),y=A(66),v=u.forwardRef((function(t,e){var A=t.children,n=t.classes,r=t.className,i=t.color,o=void 0===i?"default":i,a=t.component,s=void 0===a?"button":a,g=t.disabled,c=void 0!==g&&g,I=t.disableElevation,l=void 0!==I&&I,C=t.disableFocusRipple,h=void 0!==C&&C,Q=t.endIcon,E=t.focusVisibleClassName,v=t.fullWidth,m=void 0!==v&&v,b=t.size,F=void 0===b?"medium":b,w=t.startIcon,S=t.type,D=void 0===S?"button":S,R=t.variant,U=void 0===R?"text":R,G=Object(B.a)(t,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),N=w&&u.createElement("span",{className:Object(d.a)(n.startIcon,n["iconSize".concat(Object(y.a)(F))])},w),k=Q&&u.createElement("span",{className:Object(d.a)(n.endIcon,n["iconSize".concat(Object(y.a)(F))])},Q);return u.createElement(p.a,Object(f.a)({className:Object(d.a)(n.root,n[U],r,"inherit"===o?n.colorInherit:"default"!==o&&n["".concat(U).concat(Object(y.a)(o))],"medium"!==F&&[n["".concat(U,"Size").concat(Object(y.a)(F))],n["size".concat(Object(y.a)(F))]],l&&n.disableElevation,c&&n.disabled,m&&n.fullWidth),component:s,disabled:c,focusRipple:!h,focusVisibleClassName:Object(d.a)(n.focusVisible,E),ref:e,type:D},G),u.createElement("span",{className:n.label},N,A,k))})),m=Object(Q.a)((function(t){return{root:Object(f.a)({},t.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:t.shape.borderRadius,color:t.palette.text.primary,transition:t.transitions.create(["background-color","box-shadow","border"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:Object(E.b)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:t.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:Object(E.b)(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:Object(E.b)(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===t.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(t.palette.action.disabledBackground)}},outlinedPrimary:{color:t.palette.primary.main,border:"1px solid ".concat(Object(E.b)(t.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(t.palette.primary.main),backgroundColor:Object(E.b)(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:t.palette.secondary.main,border:"1px solid ".concat(Object(E.b)(t.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(t.palette.secondary.main),backgroundColor:Object(E.b)(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(t.palette.action.disabled)}},contained:{color:t.palette.getContrastText(t.palette.grey[300]),backgroundColor:t.palette.grey[300],boxShadow:t.shadows[2],"&:hover":{backgroundColor:t.palette.grey.A100,boxShadow:t.shadows[4],"@media (hover: none)":{boxShadow:t.shadows[2],backgroundColor:t.palette.grey[300]},"&$disabled":{backgroundColor:t.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:t.shadows[6]},"&:active":{boxShadow:t.shadows[8]},"&$disabled":{color:t.palette.action.disabled,boxShadow:t.shadows[0],backgroundColor:t.palette.action.disabledBackground}},containedPrimary:{color:t.palette.primary.contrastText,backgroundColor:t.palette.primary.main,"&:hover":{backgroundColor:t.palette.primary.dark,"@media (hover: none)":{backgroundColor:t.palette.primary.main}}},containedSecondary:{color:t.palette.secondary.contrastText,backgroundColor:t.palette.secondary.main,"&:hover":{backgroundColor:t.palette.secondary.dark,"@media (hover: none)":{backgroundColor:t.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:t.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:t.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"})(v),b=A(830),F=A.n(b),w=A(1142),S=A(1),D=(A(285),A(361)),R=A(295);function U(){if(n)return n;var t=document.createElement("div");return t.appendChild(document.createTextNode("ABCD")),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),n="reverse",t.scrollLeft>0?n="default":(t.scrollLeft=1,0===t.scrollLeft&&(n="negative")),document.body.removeChild(t),n}function G(t,e){var A=t.scrollLeft;if("rtl"!==e)return A;switch(U()){case"negative":return t.scrollWidth-t.clientWidth+A;case"reverse":return t.scrollWidth-t.clientWidth-A;default:return A}}function N(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}var k={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function x(t){var e=t.onChange,A=Object(B.a)(t,["onChange"]),n=u.useRef(),r=u.useRef(null),i=function(){n.current=r.current.offsetHeight-r.current.clientHeight};return u.useEffect((function(){var t=Object(D.a)((function(){var t=n.current;i(),t!==n.current&&e(n.current)}));return window.addEventListener("resize",t),function(){t.clear(),window.removeEventListener("resize",t)}}),[e]),u.useEffect((function(){i(),e(n.current)}),[e]),u.createElement("div",Object(f.a)({style:k,ref:r},A))}var O=u.forwardRef((function(t,e){var A=t.classes,n=t.className,r=t.color,i=t.orientation,o=Object(B.a)(t,["classes","className","color","orientation"]);return u.createElement("span",Object(f.a)({className:Object(d.a)(A.root,A["color".concat(Object(y.a)(r))],n,"vertical"===i&&A.vertical),ref:e},o))})),M=Object(Q.a)((function(t){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},colorPrimary:{backgroundColor:t.palette.primary.main},colorSecondary:{backgroundColor:t.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(O),L=A(252),_=Object(L.a)(u.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),J=Object(L.a)(u.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),T=u.createElement(_,{fontSize:"small"}),j=u.createElement(J,{fontSize:"small"}),H=u.forwardRef((function(t,e){var A=t.classes,n=t.className,r=t.direction,i=t.orientation,o=t.visible,a=Object(B.a)(t,["classes","className","direction","orientation","visible"]),s=Object(d.a)(A.root,n,"vertical"===i&&A.vertical);return o?u.createElement(p.a,Object(f.a)({component:"div",className:s,ref:e,role:null,tabIndex:null},a),"left"===r?T:j):u.createElement("div",{className:s})})),Y=Object(Q.a)({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(H),V=A(90),Z=A(246),W=u.forwardRef((function(t,e){var A=t.action,n=t.centered,r=void 0!==n&&n,i=t.children,o=t.classes,a=t.className,s=t.component,g=void 0===s?"div":s,c=t.indicatorColor,I=void 0===c?"secondary":c,l=t.onChange,C=t.orientation,h=void 0===C?"horizontal":C,Q=t.ScrollButtonComponent,E=void 0===Q?Y:Q,p=t.scrollButtons,y=void 0===p?"auto":p,v=t.TabIndicatorProps,m=void 0===v?{}:v,b=t.textColor,F=void 0===b?"inherit":b,w=t.value,k=t.variant,O=void 0===k?"standard":k,L=Object(B.a)(t,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),_=Object(Z.a)(),J="scrollable"===O,T="rtl"===_.direction,j="vertical"===h,H=j?"scrollTop":"scrollLeft",W=j?"top":"left",K=j?"bottom":"right",P=j?"clientHeight":"clientWidth",q=j?"height":"width";var X=u.useState(!1),z=X[0],$=X[1],tt=u.useState({}),et=tt[0],At=tt[1],nt=u.useState({start:!1,end:!1}),rt=nt[0],it=nt[1],ot=u.useState({overflow:"hidden",marginBottom:null}),at=ot[0],st=ot[1],gt=new Map,ct=u.useRef(null),It=u.useRef(null),ut=function(){var t,e,A=ct.current;if(A){var n=A.getBoundingClientRect();t={clientWidth:A.clientWidth,scrollLeft:A.scrollLeft,scrollTop:A.scrollTop,scrollLeftNormalized:G(A,_.direction),scrollWidth:A.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(A&&!1!==w){var r=It.current.children;if(r.length>0){var i=r[gt.get(w)];0,e=i?i.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:e}},lt=Object(V.a)((function(){var t,e=ut(),A=e.tabsMeta,n=e.tabMeta,r=0;if(n&&A)if(j)r=n.top-A.top+A.scrollTop;else{var i=T?A.scrollLeftNormalized+A.clientWidth-A.scrollWidth:A.scrollLeft;r=n.left-A.left+i}var o=(t={},Object(S.a)(t,W,r),Object(S.a)(t,q,n?n[q]:0),t);if(isNaN(et[W])||isNaN(et[q]))At(o);else{var a=Math.abs(et[W]-o[W]),s=Math.abs(et[q]-o[q]);(a>=1||s>=1)&&At(o)}})),Ct=function(t){!function(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=n.ease,o=void 0===i?N:i,a=n.duration,s=void 0===a?300:a,g=null,c=e[t],I=!1,u=function(){I=!0},l=function n(i){if(I)r(new Error("Animation cancelled"));else{null===g&&(g=i);var a=Math.min(1,(i-g)/s);e[t]=o(a)*(A-c)+c,a>=1?requestAnimationFrame((function(){r(null)})):requestAnimationFrame(n)}};c===A?r(new Error("Element already at target position")):requestAnimationFrame(l)}(H,ct.current,t)},ht=function(t){var e=ct.current[H];j?e+=t:(e+=t*(T?-1:1),e*=T&&"reverse"===U()?-1:1),Ct(e)},Bt=function(){ht(-ct.current[P])},ft=function(){ht(ct.current[P])},dt=u.useCallback((function(t){st({overflow:null,marginBottom:-t})}),[]),Qt=Object(V.a)((function(){var t=ut(),e=t.tabsMeta,A=t.tabMeta;if(A&&e)if(A[W]<e[W]){var n=e[H]+(A[W]-e[W]);Ct(n)}else if(A[K]>e[K]){var r=e[H]+(A[K]-e[K]);Ct(r)}})),Et=Object(V.a)((function(){if(J&&"off"!==y){var t,e,A=ct.current,n=A.scrollTop,r=A.scrollHeight,i=A.clientHeight,o=A.scrollWidth,a=A.clientWidth;if(j)t=n>1,e=n<r-i-1;else{var s=G(ct.current,_.direction);t=T?s<o-a-1:s>1,e=T?s>1:s<o-a-1}t===rt.start&&e===rt.end||it({start:t,end:e})}}));u.useEffect((function(){var t=Object(D.a)((function(){lt(),Et()})),e=Object(R.a)(ct.current);return e.addEventListener("resize",t),function(){t.clear(),e.removeEventListener("resize",t)}}),[lt,Et]);var pt=u.useCallback(Object(D.a)((function(){Et()})));u.useEffect((function(){return function(){pt.clear()}}),[pt]),u.useEffect((function(){$(!0)}),[]),u.useEffect((function(){lt(),Et()})),u.useEffect((function(){Qt()}),[Qt,et]),u.useImperativeHandle(A,(function(){return{updateIndicator:lt,updateScrollButtons:Et}}),[lt,Et]);var yt=u.createElement(M,Object(f.a)({className:o.indicator,orientation:h,color:I},m,{style:Object(f.a)({},et,{},m.style)})),vt=0,mt=u.Children.map(i,(function(t){if(!u.isValidElement(t))return null;var e=void 0===t.props.value?vt:t.props.value;gt.set(e,vt);var A=e===w;return vt+=1,u.cloneElement(t,{fullWidth:"fullWidth"===O,indicator:A&&!z&&yt,selected:A,onChange:l,textColor:F,value:e})})),bt=function(){var t={};t.scrollbarSizeListener=J?u.createElement(x,{className:o.scrollable,onChange:dt}):null;var e=rt.start||rt.end,A=J&&("auto"===y&&e||"desktop"===y||"on"===y);return t.scrollButtonStart=A?u.createElement(E,{orientation:h,direction:T?"right":"left",onClick:Bt,visible:rt.start,className:Object(d.a)(o.scrollButtons,"on"!==y&&o.scrollButtonsDesktop)}):null,t.scrollButtonEnd=A?u.createElement(E,{orientation:h,direction:T?"left":"right",onClick:ft,visible:rt.end,className:Object(d.a)(o.scrollButtons,"on"!==y&&o.scrollButtonsDesktop)}):null,t}();return u.createElement(g,Object(f.a)({className:Object(d.a)(o.root,a,j&&o.vertical),ref:e},L),bt.scrollButtonStart,bt.scrollbarSizeListener,u.createElement("div",{className:Object(d.a)(o.scroller,J?o.scrollable:o.fixed),style:at,ref:ct,onScroll:pt},u.createElement("div",{className:Object(d.a)(o.flexContainer,j&&o.flexContainerVertical,r&&!J&&o.centered),ref:It,role:"tablist"},mt),z&&yt),bt.scrollButtonEnd)})),K=Object(Q.a)((function(t){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Object(S.a)({},t.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(W),P=u.forwardRef((function(t,e){var A=t.classes,n=t.className,r=t.disabled,i=void 0!==r&&r,o=t.disableFocusRipple,a=void 0!==o&&o,s=t.fullWidth,g=t.icon,c=t.indicator,I=t.label,l=t.onChange,C=t.onClick,h=t.selected,Q=t.textColor,E=void 0===Q?"inherit":Q,v=t.value,m=t.wrapped,b=void 0!==m&&m,F=Object(B.a)(t,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return u.createElement(p.a,Object(f.a)({focusRipple:!a,className:Object(d.a)(A.root,A["textColor".concat(Object(y.a)(E))],n,i&&A.disabled,h&&A.selected,I&&g&&A.labelIcon,s&&A.fullWidth,b&&A.wrapped),ref:e,role:"tab","aria-selected":h,disabled:i,onClick:function(t){l&&l(t,v),C&&C(t)}},F),u.createElement("span",{className:A.wrapper},g,I),c)})),q=Object(Q.a)((function(t){var e;return{root:Object(f.a)({},t.typography.button,(e={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Object(S.a)(e,t.breakpoints.up("sm"),{padding:"6px 24px"}),Object(S.a)(e,"overflow","hidden"),Object(S.a)(e,"whiteSpace","normal"),Object(S.a)(e,"textAlign","center"),Object(S.a)(e,t.breakpoints.up("sm"),{minWidth:160}),e)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:t.palette.text.secondary,"&$selected":{color:t.palette.primary.main},"&$disabled":{color:t.palette.text.disabled}},textColorSecondary:{color:t.palette.text.secondary,"&$selected":{color:t.palette.secondary.main},"&$disabled":{color:t.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:t.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(P),X=A(382),z=A(381),$=A(383);var tt=A(22),et=A(1391),At=A(384),nt=A(421),rt=u.forwardRef((function(t,e){var A=t.children,n=t.classes,r=t.className,i=t.collapsedHeight,o=void 0===i?"0px":i,a=t.component,s=void 0===a?"div":a,g=t.in,c=t.onEnter,I=t.onEntered,l=t.onEntering,C=t.onExit,h=t.onExiting,Q=t.style,E=t.timeout,p=void 0===E?At.b.standard:E,y=Object(B.a)(t,["children","classes","className","collapsedHeight","component","in","onEnter","onEntered","onEntering","onExit","onExiting","style","timeout"]),v=Object(Z.a)(),m=u.useRef(),b=u.useRef(null),F=u.useRef(),w="number"===typeof o?"".concat(o,"px"):o;u.useEffect((function(){return function(){clearTimeout(m.current)}}),[]);return u.createElement(et.a,Object(f.a)({in:g,onEnter:function(t,e){t.style.height=w,c&&c(t,e)},onEntered:function(t,e){t.style.height="auto",I&&I(t,e)},onEntering:function(t,e){var A=b.current?b.current.clientHeight:0,n=Object(nt.a)({style:Q,timeout:p},{mode:"enter"}).duration;if("auto"===p){var r=v.transitions.getAutoHeightDuration(A);t.style.transitionDuration="".concat(r,"ms"),F.current=r}else t.style.transitionDuration="string"===typeof n?n:"".concat(n,"ms");t.style.height="".concat(A,"px"),l&&l(t,e)},onExit:function(t){var e=b.current?b.current.clientHeight:0;t.style.height="".concat(e,"px"),C&&C(t)},onExiting:function(t){var e=b.current?b.current.clientHeight:0,A=Object(nt.a)({style:Q,timeout:p},{mode:"exit"}).duration;if("auto"===p){var n=v.transitions.getAutoHeightDuration(e);t.style.transitionDuration="".concat(n,"ms"),F.current=n}else t.style.transitionDuration="string"===typeof A?A:"".concat(A,"ms");t.style.height=w,h&&h(t)},addEndListener:function(t,e){"auto"===p&&(m.current=setTimeout(e,F.current||0))},timeout:"auto"===p?null:p},y),(function(t,i){return u.createElement(s,Object(f.a)({className:Object(d.a)(n.container,r,{entered:n.entered,exited:!g&&"0px"===w&&n.hidden}[t]),style:Object(f.a)({minHeight:w},Q),ref:e},i),u.createElement("div",{className:n.wrapper,ref:b},u.createElement("div",{className:n.wrapperInner},A)))}))}));rt.muiSupportAuto=!0;var it=Object(Q.a)((function(t){return{container:{height:0,overflow:"hidden",transition:t.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}}),{name:"MuiCollapse"})(rt),ot=A(821),at=A(829),st=A(344),gt=u.forwardRef((function(t,e){var A,n=t.children,r=t.classes,i=t.className,o=t.defaultExpanded,a=void 0!==o&&o,s=t.disabled,g=void 0!==s&&s,c=t.expanded,I=t.onChange,l=t.square,C=void 0!==l&&l,h=t.TransitionComponent,Q=void 0===h?it:h,E=t.TransitionProps,p=Object(B.a)(t,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),y=Object(st.a)({controlled:c,default:a,name:"ExpansionPanel"}),v=Object(tt.a)(y,2),m=v[0],b=v[1],F=u.useCallback((function(t){b(!m),I&&I(t,!m)}),[m,I,b]),w=u.Children.toArray(n),S=(A=w,Object(X.a)(A)||Object(z.a)(A)||Object($.a)()),D=S[0],R=S.slice(1),U=u.useMemo((function(){return{expanded:m,disabled:g,toggle:F}}),[m,g,F]);return u.createElement(ot.a,Object(f.a)({className:Object(d.a)(r.root,i,m&&r.expanded,g&&r.disabled,!C&&r.rounded),ref:e,square:C},p),u.createElement(at.a.Provider,{value:U},D),u.createElement(Q,Object(f.a)({in:m,timeout:"auto"},E),u.createElement("div",{"aria-labelledby":D.props.id,id:D.props["aria-controls"],role:"region"},R)))})),ct=Object(Q.a)((function(t){var e={duration:t.transitions.duration.shortest};return{root:{position:"relative",transition:t.transitions.create(["margin"],e),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:t.palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&: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:t.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:t.shape.borderRadius,borderBottomRightRadius:t.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiExpansionPanel"})(gt),It=A(1136),ut=A.n(It),lt=A(1134),Ct=A.n(lt),ht=A(1135),Bt=A.n(ht),ft=A(247),dt=A.n(ft),Qt=A(136),Et=A(1478),pt=A(976),yt=A(1141),vt=A(358),mt=A(87),bt=A(158),Ft=A(452),wt=["Full","Min/Max"];var St=function(t,e){var A=t[e],n=A.shape,r=A.labels,i=n[r.indexOf("y")],o=n[r.indexOf("x")],a=n[r.indexOf("z")],s=Math.floor(a/Math.pow(2,e));return{height:i,width:o,depthDownsampled:s,totalBytes:4*i*o*s}};function Dt(t){var e=t.loader,A=t.handleMultiPropertyChange,n=t.resolution,r=t.disable3d,a=t.setRasterLayerCallback,I=t.setAreAllChannelsLoading,u=t.setViewState,h=t.spatialHeight,B=t.spatialWidth,f=t.channels,d=t.use3d,Q=t.modelMatrix,E=f.map((function(t){return t.selection})),p=e.data,y=function(){var t=Object(c.a)(i.a.mark((function t(e){var n,r,c,l,y,v,m,b,F,w,S,D,R,U;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n="number"===typeof e,I(!0),a((function(){I(!1),a(null)})),!n){t.next=18;break}if(r=Object(vt.b)(p),c=Object(g.a)(r,3),l=c[0],y=c[1],v=c[2],m={resolution:e,xSlice:l,ySlice:y,zSlice:v,use3d:n},d){t.next=13;break}return t.next=9,Object(vt.c)({loader:p,selections:E,use3d:n});case 9:b=t.sent,F=b.sliders,m.channels=Object(o.a)(f),m.channels.forEach((function(t,e){t.slider=F[e]}));case 13:A(m),w=Object(C.k)(p,{height:h,width:B},1.5,!0,new Qt.Matrix4(Q)),u(Object(s.a)({},w,{rotationX:0,rotationOrbit:0})),t.next=27;break;case 18:return t.next=20,Object(vt.c)({loader:p,selections:E,use3d:n});case 20:S=t.sent,D=S.sliders,(R=Object(o.a)(f)).forEach((function(t,e){t.slider=D[e]})),A({resolution:e,use3d:n,spatialAxisFixed:!1,channels:R}),U=Object(C.k)(p,{height:h,width:B},.5,!1,new Qt.Matrix4(Q)),u(Object(s.a)({},U,{rotationX:null,rotationOrbit:null,orbitAxis:null}));case 27:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),v=Array.isArray(p)?p[0]:p,m=v.labels,b=v.shape[m.indexOf("z")]>1;return l.a.createElement(l.a.Fragment,null,l.a.createElement(pt.a,{native:!0,value:n,onChange:function(t){return y("2D"===t.target.value?t.target.value:Number(t.target.value))}},l.a.createElement("option",{key:"2D",value:"2D"},"2D Visualization"),Array.from({length:p.length}).fill(0).map((function(t,e){if(p&&function(t,e){var A,n,r;return St(t,e).totalBytes<((null===(A=window.performance)||void 0===A?void 0:A.memory)&&(null===(n=window.performance)||void 0===n||null===(r=n.memory)||void 0===r?void 0:r.jsHeapSizeLimit)/2||Math.pow(2,31)-1)}(p,e)){var A=St(p,e),n=A.height,i=A.width,o=A.depthDownsampled,a=A.totalBytes;return l.a.createElement("option",{key:"(".concat(n,", ").concat(i,", ").concat(o,")"),value:e,disabled:r||!b},"3D: ".concat(e,"x Downsampled, ~").concat(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===t)return"0 Bytes";var A=1024,n=e<0?0:e,r=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(t)/Math.log(A));return"".concat(parseFloat((t/Math.pow(A,i)).toFixed(n))," ").concat(r[i])}(a)," per channel, (").concat(n,", ").concat(i,", ").concat(o,")"))}return null}))))}function Rt(t){var e=t.value,A=t.inputId,n=t.handleChange;return l.a.createElement(pt.a,{native:!0,onChange:function(t){return n(""===t.target.value?null:t.target.value)},value:e,inputProps:{name:"colormap",id:A},style:{width:"100%"}},l.a.createElement("option",{"aria-label":"None",value:""},"None"),mt.a.map((function(t){return l.a.createElement("option",{key:t,value:t},t)})))}function Ut(t){var e=t.value,A=t.handleChange;return l.a.createElement(yt.a,{style:{float:"left",padding:0},color:"default",onChange:function(){A(e?null:[0,0,0])},checked:Boolean(e)})}function Gt(t){var e=t.value,A=t.handleChange;return l.a.createElement(w.a,{value:e,onChange:function(t,e){return A(e)},valueLabelDisplay:"auto",getAriaLabel:function(){return"opacity slider"},min:0,max:1,step:.01,orientation:"horizontal",style:{marginTop:"7px"}})}function Nt(t){var e=t.value,A=t.inputId,n=t.handleChange;return l.a.createElement(pt.a,{native:!0,onChange:function(t){return n(t.target.value)},value:e,inputProps:{name:"domain-selector",id:A},style:{width:"100%"}},wt.map((function(t){return l.a.createElement("option",{key:t,value:t},t)})))}function kt(t){var e=t.field,A=t.value,n=t.handleChange,r=t.possibleValues;return l.a.createElement(Ft.e,{value:A,onChange:function(t,A){n({selection:Object(a.a)({},e,A),event:t})},onChangeCommitted:function(t,A){n({selection:Object(a.a)({},e,A),event:t})},valueLabelDisplay:"auto",getAriaLabel:function(){return"".concat(e," slider")},marks:r.map((function(t){return{value:t}})),min:Number(r[0]),max:Number(r.slice(-1)),orientation:"horizontal",step:null})}function xt(t){var e=t.name,A=t.inputId,n=t.children;return l.a.createElement(h.a,{container:!0,direction:"row",alignItems:"center",justify:"center"},l.a.createElement(h.a,{item:!0,xs:6},l.a.createElement(Et.a,{htmlFor:A},e,":")),l.a.createElement(h.a,{item:!0,xs:6},n))}var Ot=function(t){var e=t.colormap,A=t.opacity,n=t.handleColormapChange,r=t.handleOpacityChange,i=t.handleTransparentColorChange,o=t.globalControlLabels,a=t.globalLabelValues,s=t.handleGlobalChannelsSelectionChange,g=t.handleSliderChange,c=t.handleDomainChange,I=t.transparentColor,u=t.channels,C=t.domainType,B=t.isRgb,f=t.shouldShowTransparentColor,d=t.shouldShowDomain,Q=t.shouldShowColormap,E=t.use3d,p=t.loader,y=t.handleMultiPropertyChange,v=t.resolution,m=t.disable3d,b=t.setRasterLayerCallback,F=t.setAreAllChannelsLoading,w=t.setViewState,S=t.spatialHeight,D=t.spatialWidth,R=t.modelMatrix,U=Array.isArray(p.data)?p.data[0]:p.data,G=U.labels,N=U.shape,k=G.length>0&&u.length>0,x=N[G.indexOf("z")]>1;return l.a.createElement(h.a,{container:!0,direction:"column",style:{width:"100%"}},x&&!m&&l.a.createElement(Dt,{loader:p,handleSliderChange:g,handleDomainChange:c,channels:u,handleMultiPropertyChange:y,resolution:v,disable3d:m,setRasterLayerCallback:b,setAreAllChannelsLoading:F,setViewState:w,spatialHeight:S,spatialWidth:D,use3d:E,modelMatrix:R}),k&&!E&&o.map((function(t){return N[G.indexOf(t)]>1&&l.a.createElement(xt,{name:t,inputId:"".concat(t,"-slider"),key:t},l.a.createElement(kt,{field:t,value:a[t],handleChange:s,possibleValues:dt()(N[G.indexOf(t)])}))})),B?null:l.a.createElement(l.a.Fragment,null,Q&&l.a.createElement(h.a,{item:!0},l.a.createElement(xt,{name:"Colormap",inputId:"colormap-select"},l.a.createElement(Rt,{value:e||"",inputId:"colormap-select",handleChange:n}))),d&&l.a.createElement(h.a,{item:!0},l.a.createElement(xt,{name:"Domain",inputId:"domain-selector"},l.a.createElement(Nt,{value:C||bt.e,handleChange:function(t){c(t)}})))),!E&&l.a.createElement(h.a,{item:!0},l.a.createElement(xt,{name:"Opacity",inputId:"opacity-slider"},l.a.createElement(Gt,{value:A,handleChange:r}))),f&&!E&&l.a.createElement(h.a,{item:!0},l.a.createElement(xt,{name:"Zero Transparent",inputId:"transparent-color-selector"},l.a.createElement(Ut,{value:I,handleChange:i}))))},Mt=A(822),Lt=A(546),_t=A(1422),Jt=A(420),Tt=A(353),jt=A(389),Ht=u.forwardRef((function(t,e){var A=t.children,n=t.classes,r=t.className,i=t.color,o=void 0===i?"primary":i,a=t.component,s=void 0===a?"div":a,g=t.disabled,c=void 0!==g&&g,I=t.error,l=void 0!==I&&I,C=t.fullWidth,h=void 0!==C&&C,Q=t.hiddenLabel,E=void 0!==Q&&Q,p=t.margin,v=void 0===p?"none":p,m=t.required,b=void 0!==m&&m,F=t.size,w=t.variant,S=void 0===w?"standard":w,D=Object(B.a)(t,["children","classes","className","color","component","disabled","error","fullWidth","hiddenLabel","margin","required","size","variant"]),R=u.useState((function(){var t=!1;return A&&u.Children.forEach(A,(function(e){if(Object(Tt.a)(e,["Input","Select"])){var A=Object(Tt.a)(e,["Select"])?e.props.input:e;A&&Object(Jt.a)(A.props)&&(t=!0)}})),t})),U=R[0],G=R[1],N=u.useState((function(){var t=!1;return A&&u.Children.forEach(A,(function(e){Object(Tt.a)(e,["Input","Select"])&&Object(Jt.b)(e.props,!0)&&(t=!0)})),t})),k=N[0],x=N[1],O=u.useState(!1),M=O[0],L=O[1];c&&M&&L(!1);var _=u.useCallback((function(){x(!0)}),[]),J={adornedStart:U,setAdornedStart:G,color:o,disabled:c,error:l,filled:k,focused:M,fullWidth:h,hiddenLabel:E,margin:("small"===F?"dense":void 0)||v,onBlur:function(){L(!1)},onEmpty:u.useCallback((function(){x(!1)}),[]),onFilled:_,onFocus:function(){L(!0)},registerEffect:void 0,required:b,variant:S};return u.createElement(jt.a.Provider,{value:J},u.createElement(s,Object(f.a)({className:Object(d.a)(n.root,r,"none"!==v&&n["margin".concat(Object(y.a)(v))],h&&n.fullWidth),ref:e},D),A))})),Yt=Object(Q.a)({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(Ht),Vt=Object(Lt.a)((function(t){return Object(_t.a)({enabled:{},disabled:{color:t.palette.text.disabled,"& .MuiSlider-thumb":{color:"rgb(100, 100, 100, 1.0)"},"&  .MuiSlider-track":{color:"rgb(100, 100, 100, 1.0)"}}})})),Zt=function(t){var e=t.xSlice,A=t.ySlice,n=t.zSlice,r=t.handleSlicerSetting,i=t.loader,o=t.use3d,a=Object(vt.b)(i.data),s=Object(g.a)(a,3),c=[[e,function(t){return r("x",t)},"x",s[0]],[A,function(t){return r("y",t)},"y",s[1]],[n,function(t){return r("z",t)},"z",s[2]]],I=Vt(),u=c.map((function(t){var e=Object(g.a)(t,4),A=e[0],n=e[1],r=e[2],i=Object(g.a)(e[3],2),a=i[0],s=i[1];return l.a.createElement(h.a,{container:!0,direction:"row",justify:"flex-start",alignItems:"center",key:r},l.a.createElement(h.a,{item:!0,xs:1},l.a.createElement(Mt.a,{className:o?I.enabled:I.disabled,style:{marginBottom:0}},r,":")),l.a.createElement(h.a,{item:!0,xs:11},l.a.createElement(w.a,{disabled:!o,className:o?I.enabled:I.disabled,value:A,onChange:function(t,e){return n(e)},valueLabelDisplay:"auto",valueLabelFormat:function(t){return Object(vt.a)(t)},getAriaLabel:function(){return"".concat(r," slider")},min:a,max:s,step:.005,orientation:"horizontal"})))}));return l.a.createElement(l.a.Fragment,null,l.a.createElement(Mt.a,{className:o?I.enabled:I.disabled,style:{marginTop:16,marginBottom:0}},"Clipping Planes:"," ")," ",u)},Wt=Object.values(C.e);function Kt(t){var e=t.handleRenderingModeChange,A=t.renderingMode,n=t.use3d,r=n?Wt:[].concat(Object(o.a)(Wt),[""]);return l.a.createElement(Yt,{fullWidth:!0},l.a.createElement(Et.a,{htmlFor:"rendering-mode-select"},"Rendering Mode"),l.a.createElement(pt.a,{native:!0,onChange:function(t){return e(t.target.value)},value:n?A:"",inputProps:{name:"rendering-mode",id:"rendering-mode-select"},disabled:!n},r.map((function(t){return l.a.createElement("option",{key:t,value:t},t)}))))}var Pt=function(t){var e=t.setViewState,A=t.use3d,n=t.spatialHeight,r=t.spatialWidth,i=t.loader,o=t.modelMatrix;return l.a.createElement(h.a,{item:!0,xs:"auto",key:"recenter"},l.a.createElement(m,{onClick:function(){var t=Object(C.k)(i.data,{height:n,width:r},1.5,A,new Qt.Matrix4(o));e(Object(s.a)({},t,{rotationX:0,rotationOrbit:0}))},disabled:!A,style:{padding:0,marginBottom:6}},"Re-Center"))},qt=function(t){var e=t.handleSlicerSetting,A=t.handleRenderingModeChange,n=t.renderingMode,r=t.xSlice,i=t.ySlice,o=t.zSlice,a=t.use3d,s=t.loader,g=t.setViewState,c=t.spatialHeight,I=t.spatialWidth,u=t.modelMatrix;return l.a.createElement(l.a.Fragment,null,l.a.createElement(Kt,{handleRenderingModeChange:A,renderingMode:n,use3d:a}),l.a.createElement(Zt,{xSlice:r,ySlice:i,zSlice:o,handleSlicerSetting:e,use3d:a,loader:s}),l.a.createElement(Pt,{setViewState:g,use3d:a,spatialHeight:c,spatialWidth:I,loader:s,modelMatrix:u}))},Xt=A(73),zt=A(798);function $t(t){var e=t.children,A=t.value,n=t.index,r=Object(I.a)(t,["children","value","index"]);return l.a.createElement("div",Object.assign({role:"tabpanel",hidden:A!==n,id:"simple-tabpanel-".concat(n),"aria-labelledby":"simple-tab-".concat(n)},r),A===n&&e)}function te(t,e,A,n){return ee.apply(this,arguments)}function ee(){return(ee=Object(c.a)(i.a.mark((function t(e,A,n,r){var o,a,s,g;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(vt.c)({loader:e.data,selections:A,use3d:r});case 2:return a=t.sent,s=a.sliders,"Min/Max"===n&&(o=a.domains),"Full"===n&&(g=Object(Xt.d)(e),o=A.map((function(){return zt.a[g.dtype]}))),t.abrupt("return",{domains:o,sliders:s});case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}A.d(e,"a",(function(){return ne}));var Ae={borderStyle:"dashed",marginTop:"10px",fontWeight:400};function ne(t){var e,A=t.layer,n=t.name,r=t.loader,I=t.theme,B=t.handleLayerRemove,f=t.handleLayerChange,d=t.shouldShowTransparentColor,Q=t.shouldShowDomain,E=t.shouldShowColormap,p=t.ChannelController,y=t.setViewState,v=t.disable3d,b=t.setRasterLayerCallback,S=t.setAreLayerChannelsLoading,D=t.areLayerChannelsLoading,R=t.disabled,U=t.spatialHeight,G=t.spatialWidth,N=A.colormap,k=A.opacity,x=A.channels,O=A.transparentColor,M=A.renderingMode,L=A.xSlice,_=A.ySlice,J=A.zSlice,T=A.resolution,j=A.use3d,H=A.modelMatrix,Y=(null===(e=x[0])||void 0===e?void 0:e.selection)||{},V=r.data,Z=r.channels,W=Object(u.useState)(0),P=Object(g.a)(W,2),X=P[0],z=P[1],$=Array.isArray(V)?V[V.length-1]:V,tt=$.labels,et=$.shape,At=Object(u.useState)(A.domainType),nt=Object(g.a)(At,2),rt=nt[0],it=nt[1],ot=Object(u.useState)(!0),at=Object(g.a)(ot,2),st=at[0],gt=at[1],It=Object(u.useState)(bt.g.filter((function(t){return"number"===typeof Y[t]})).reduce((function(t,e){return Object(s.a)({},t,Object(a.a)({},e,Y[e]))}),{})),lt=Object(g.a)(It,2),ht=lt[0],ft=lt[1];function dt(t){f(Object(s.a)({},A,{opacity:t}))}function Qt(t){f(Object(s.a)({},A,{channels:t}))}function Et(t,e){f(Object(s.a)({},A,{channels:t,domainType:e}))}function pt(t,e){var n=Object(o.a)(x);n[e]=t,f(Object(s.a)({},A,{channels:n}))}function yt(t){var e=[].concat(Object(o.a)(x),[t]);f(Object(s.a)({},A,{channels:e}))}var vt=function(t){var e=x.map((function(){return t}));S(e)},mt=function(){var t=Object(c.a)(i.a.mark((function t(){var e,A,n,a,g,c,I,u,l,C;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={},tt.forEach((function(t){e[t]=bt.g.includes(t)&&ht[t]||0})),t.next=4,te(r,[e],rt,j);case 4:A=t.sent,n=A.domains,a=A.sliders,g=n[0],c=g,I=[255,255,255],!0,u=x.length,(l=Object(o.a)(D))[u]=!0,S(l),C={selection:e,slider:c,visible:!0,color:I},b((function(){pt(Object(s.a)({},C,{slider:a[0]}),u);var t=Object(o.a)(l);t[u]=!1,S(t),b(null)})),yt(C);case 18:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),wt=function(){var t=Object(c.a)(i.a.mark((function t(e){var A,n,o,a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return it(e),A=x.map((function(t){return t.selection})),n=x.map((function(t){return t.slider})),t.next=5,te(r,A,e,j);case 5:o=t.sent,a=o.domains,n=n.map((function(t,e){var A=Object(g.a)(t,2),n=A[0],r=A[1];return[Math.max(n,a[e][0]),Math.min(r,a[e][1])]})),Et(x.map((function(t,e){return Object(s.a)({},t,{slider:n[e]})})),e);case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),St=function(){var t=Object(c.a)(i.a.mark((function t(e){var A,n,a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=e.selection,n=e.event,a=x.map((function(t){return Object(s.a)({},t.selection,{},A)})),("mouseup"===n.type||"keydown"===n.type)&&(vt(!0),te(r,a,rt,j).then((function(t){var e=t.sliders,n=x.map((function(t){return Object(s.a)({},t,{selection:Object(s.a)({},t.selection,{},A)})}));b((function(){b(null),vt(!1),Qt(Object(o.a)(n).map((function(t,A){return Object(s.a)({},t,{slider:e[A]})})))})),Qt(n)}))),ft((function(t){return Object(s.a)({},t,{},A)}));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Dt=[];if(tt.length>0){var Rt=tt.find((function(t){return"channel"===t||"c"===t}))||tt[0];Dt=x.map((function(t,e){var n=function(t){var A=Object(o.a)(D);A[e]=t,S(A)},u=function(){var A=Object(c.a)(i.a.mark((function A(){var n,o,a,g,c,I;return i.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return n=r.data,o=Array.isArray(n)?n[n.length-1]:n,A.next=4,o.getRaster({selection:x[e].selection});case 4:a=A.sent,g=Object(C.j)(a.data),c=g.q1,I=g.q3,pt(Object(s.a)({},t,{slider:[c,I]}),e);case 8:case"end":return A.stop()}}),A)})));return function(){return A.apply(this,arguments)}}();return l.a.createElement(p,{key:"channel-controller-".concat(e),dimName:Rt,visibility:t.visible,selectionIndex:t.selection[Rt],slider:t.slider,color:t.color,channels:x,channelId:e,domainType:rt,loader:r,globalLabelValues:ht,theme:I,channelOptions:Z,colormapOn:Boolean(N),handlePropertyChange:function(A,o){var I=Object(a.a)({},A,o);"selection"===A?(n(!0),I.selection=Object(s.a)({},ht,{},I.selection),pt(Object(s.a)({},t,{},I),e),b(Object(c.a)(i.a.mark((function a(){var c,u,l,C;return i.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return c=[Object(s.a)({},x[e][A],{},o)],i.next=3,te(r,c,rt,j);case 3:u=i.sent,l=u.sliders,C=Object(g.a)(l,1),I.slider=C[0],pt(Object(s.a)({},t,{},I),e),b(null),n(!1);case 10:case"end":return i.stop()}}),a)}))))):pt(Object(s.a)({},t,{},I),e)},handleChannelRemove:function(){!function(t){var e=Object(o.a)(x);e.splice(t,1),f(Object(s.a)({},A,{channels:e}))}(e)},handleIQRUpdate:u,setRasterLayerCallback:b,isLoading:D[e],use3d:j})}))}var Ut=Object(Ft.f)(),Gt=A.visible,Nt="boolean"!==typeof Gt||Gt?Ct.a:Bt.a,kt=!v&&et[tt.indexOf("z")]>1,xt=l.a.createElement(l.a.Fragment,null,l.a.createElement(Ot,{channels:x,opacity:k,colormap:N,transparentColor:O,domainType:rt,globalControlLabels:tt.filter((function(t){return bt.g.includes(t)})),globalLabelValues:ht,handleOpacityChange:dt,handleColormapChange:function(t){f(Object(s.a)({},A,{colormap:t}))},handleGlobalChannelsSelectionChange:St,handleTransparentColorChange:function(t){f(Object(s.a)({},A,{transparentColor:t}))},isRgb:Object(Xt.e)(r),handleDomainChange:wt,shouldShowTransparentColor:d,shouldShowDomain:Q,shouldShowColormap:E,use3d:j,loader:r,handleMultiPropertyChange:function(t){f(Object(s.a)({},A,{},t))},resolution:T,disable3d:v,setRasterLayerCallback:b,setAreAllChannelsLoading:vt,setViewState:y,spatialHeight:U,spatialWidth:G,modelMatrix:H}),Object(Xt.e)(r)?null:Dt,!Object(Xt.e)(r)&&l.a.createElement(m,{disabled:x.length===C.c,onClick:mt,fullWidth:!0,variant:"outlined",style:Ae,startIcon:l.a.createElement(F.a,null),size:"small"},"Add Channel"));return l.a.createElement(ct,{className:Ut.root,onChange:function(t,e){var A,n,r;return!R&&gt(e&&"presentation"===(null===t||void 0===t||null===(A=t.target)||void 0===A||null===(n=A.attributes)||void 0===n||null===(r=n.role)||void 0===r?void 0:r.value))},TransitionProps:{enter:!1},expanded:!R&&st},l.a.createElement(Ft.c,{expandIcon:l.a.createElement(ut.a,null),"aria-controls":"layer-".concat(n,"-controls")},l.a.createElement(h.a,{container:!0,direction:"column",m:1,justify:"center"},l.a.createElement(Ft.a,{item:!0},l.a.createElement(m,{onClick:function(t){var e;R||(t.stopPropagation(),e="boolean"===typeof Gt&&!Gt,f(Object(s.a)({},A,{visible:e})))},style:{marginRight:8,marginBottom:2,padding:0,minWidth:0}},l.a.createElement(Nt,null)),n),!R&&!st&&!j&&l.a.createElement(h.a,{container:!0,direction:"row",alignItems:"center",justify:"center"},l.a.createElement(h.a,{item:!0,xs:6},l.a.createElement(Ft.d,{htmlFor:"layer-".concat(n,"-opacity-closed")},"Opacity:")),l.a.createElement(h.a,{item:!0,xs:6},l.a.createElement(w.a,{id:"layer-".concat(n,"-opacity-closed"),value:k,onChange:function(t,e){return dt(e)},valueLabelDisplay:"auto",getAriaLabel:function(){return"opacity slider"},min:0,max:1,step:.01,orientation:"horizontal"}))))),l.a.createElement(Ft.b,null,kt?l.a.createElement(l.a.Fragment,null,l.a.createElement(K,{value:X,onChange:function(t,e){z(e)},"aria-label":"simple tabs example",style:{height:"24px",minHeight:"24px"}},l.a.createElement(q,{label:"Channels",style:{fontSize:".75rem",bottom:12,width:"50%",minWidth:"50%"},disableRipple:!0}),l.a.createElement(q,{label:"Volume",style:{fontSize:".75rem",bottom:12,width:"50%",minWidth:"50%"}})),l.a.createElement($t,{value:X,index:0},xt),l.a.createElement($t,{value:X,index:1,style:{marginTop:4}},l.a.createElement(qt,{loader:r,handleSlicerSetting:function(t,e){f(Object(s.a)({},A,Object(a.a)({},"".concat(t,"Slice"),e)))},handleRenderingModeChange:function(t){f(Object(s.a)({},A,{renderingMode:t}))},renderingMode:M,xSlice:L,ySlice:_,zSlice:J,use3d:j,setViewState:y,spatialHeight:U,spatialWidth:G,modelMatrix:H}))):xt,l.a.createElement(m,{onClick:B,fullWidth:!0,variant:"outlined",style:Ae,size:"small"},"Remove Image Layer")))}},function(t,e,A){var n=A(728);t.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:A(816).SEMVER_SPEC_VERSION,SemVer:A(347),compareIdentifiers:A(933).compareIdentifiers,rcompareIdentifiers:A(933).rcompareIdentifiers,parse:A(729),valid:A(1362),clean:A(1363),inc:A(1364),diff:A(1365),major:A(1366),minor:A(1367),patch:A(1368),prerelease:A(1369),compare:A(433),rcompare:A(1370),compareLoose:A(1371),compareBuild:A(935),sort:A(1372),rsort:A(1373),gt:A(818),lt:A(936),eq:A(934),neq:A(1108),gte:A(937),lte:A(938),cmp:A(1109),coerce:A(1374),Comparator:A(819),Range:A(434),satisfies:A(820),toComparators:A(1375),maxSatisfying:A(1376),minSatisfying:A(1377),minVersion:A(1378),validRange:A(1379),outside:A(939),gtr:A(1380),ltr:A(1381),intersects:A(1382),simplifyRange:A(1383),subset:A(1388)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=/\/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(t).slice(1,3);return{library:e[0],version:e[1]}}},,,,,,,,,function(t,e,A){"use strict";A.d(e,"a",(function(){return n}));var n={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(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(5),r=A(56),i=A(4),o=A(14),a=A(16),s=A(7),g=A(19),c=A(94),I=A(83),u=A(211);function l(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}var C=function(t){Object(o.a)(A,t);var e=l(A);function A(t){var i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(n.a)(this,A),Object(g.a)(t),(i=e.call(this,t,o)).initialize(o),i.stubRemovedMethods("TransformFeedback","v6.0",["pause","resume"]),Object.seal(Object(r.a)(i)),i}return Object(i.a)(A,null,[{key:"isSupported",value:function(t){return Object(g.j)(t)}}]),Object(i.a)(A,[{key:"initialize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.buffers={},this.unused={},this.configuration=null,this.bindOnUse=!0,Object(u.a)(this.buffers)||this.bind((function(){return t._unbindBuffers()})),this.setProps(e),this}},{key:"setProps",value:function(t){"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"bindOnUse"in t&&(t=t.bindOnUse),"buffers"in t&&this.setBuffers(t.buffers)}},{key:"setBuffers",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.bind((function(){for(var A in e)t.setBuffer(A,e[A])})),this}},{key:"setBuffer",value:function(t,e){var A=this,n=this._getVaryingIndex(t),r=this._getBufferParams(e),i=r.buffer,o=r.byteSize,a=r.byteOffset;return n<0?(this.unused[t]=i,g.k.warn((function(){return"".concat(A.id," unused varying buffer ").concat(t)}))(),this):(this.buffers[n]=e,this.bindOnUse||this._bindBuffer(n,i,a,o),this)}},{key:"begin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.gl.bindTransformFeedback(36386,this.handle),this._bindBuffers(),this.gl.beginTransformFeedback(t),this}},{key:"end",value:function(){return this.gl.endTransformFeedback(),this._unbindBuffers(),this.gl.bindTransformFeedback(36386,null),this}},{key:"_getBufferParams",value:function(t){var e,A,n;return t instanceof I.a===!1?(n=t.buffer,A=t.byteSize,e=t.byteOffset):n=t,void 0===e&&void 0===A||(e=e||0,A=A||n.byteLength-e),{buffer:n,byteOffset:e,byteSize:A}}},{key:"_getVaryingInfo",value:function(t){return this.configuration&&this.configuration.getVaryingInfo(t)}},{key:"_getVaryingIndex",value:function(t){if(this.configuration)return this.configuration.getVaryingInfo(t).location;var e=Number(t);return Number.isFinite(e)?e:-1}},{key:"_bindBuffers",value:function(){if(this.bindOnUse)for(var t in this.buffers){var e=this._getBufferParams(this.buffers[t]),A=e.buffer,n=e.byteSize,r=e.byteOffset;this._bindBuffer(t,A,r,n)}}},{key:"_unbindBuffers",value:function(){if(this.bindOnUse)for(var t in this.buffers)this._bindBuffer(t,null)}},{key:"_bindBuffer",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,r=e&&e.handle;return r&&void 0!==n?this.gl.bindBufferRange(35982,t,r,A,n):this.gl.bindBufferBase(35982,t,r),this}},{key:"_createHandle",value:function(){return this.gl.createTransformFeedback()}},{key:"_deleteHandle",value:function(){this.gl.deleteTransformFeedback(this.handle)}},{key:"_bindHandle",value:function(t){this.gl.bindTransformFeedback(36386,this.handle)}}]),A}(c.a)},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a})),A.d(e,"c",(function(){return g}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window,a="object"!==("undefined"===typeof n?"undefined":Object(r.a)(n))||"[object process]"!==String(n)||n.browser,s="undefined"!==typeof n&&n.version&&n.version.match(/v([0-9]*)/),g=s&&parseFloat(s[1])||0}).call(this,A(58),A(62))},function(t,e,A){"use strict";(function(t,n){A.d(e,"a",(function(){return o})),A.d(e,"b",(function(){return a})),A.d(e,"c",(function(){return g}));var r=A(26),i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof t&&t,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window,a="object"!==("undefined"===typeof n?"undefined":Object(r.a)(n))||"[object process]"!==String(n)||n.browser,s="undefined"!==typeof n&&n.version&&n.version.match(/v([0-9]*)/),g=s&&parseFloat(s[1])||0}).call(this,A(58),A(62))},function(t,e,A){"use strict";A.d(e,"a",(function(){return c}));var n=A(22),r=A(5),i=A(4);function o(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,s=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var s=1,g=1,c=function(){function t(){Object(r.a)(this,t),this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}return Object(i.a)(t,[{key:"addChannel",value:function(t){var e=t.delay,A=void 0===e?0:e,n=t.duration,r=void 0===n?Number.POSITIVE_INFINITY:n,i=t.rate,o=void 0===i?1:i,a=t.repeat,g=s++,c={time:0,delay:A,duration:r,rate:o,repeat:void 0===a?1:a};return this._setChannelTime(c,this.time),this.channels.set(g,c),g}},{key:"removeChannel",value:function(t){this.channels.delete(t);var e,A=o(this.animations);try{for(A.s();!(e=A.n()).done;){var r=Object(n.a)(e.value,2),i=r[0];r[1].channel===t&&this.detachAnimation(i)}}catch(a){A.e(a)}finally{A.f()}}},{key:"isFinished",value:function(t){var e=this.channels.get(t);return void 0!==e&&this.time>=e.delay+e.duration*e.repeat}},{key:"getTime",value:function(t){if(void 0===t)return this.time;var e=this.channels.get(t);return void 0===e?-1:e.time}},{key:"setTime",value:function(t){this.time=Math.max(0,t);var e,A=o(this.channels.values());try{for(A.s();!(e=A.n()).done;){var n=e.value;this._setChannelTime(n,this.time)}}catch(c){A.e(c)}finally{A.f()}var r,i=o(this.animations.values());try{for(i.s();!(r=i.n()).done;){var a=r.value,s=a.animation,g=a.channel;s.setTime(this.getTime(g))}}catch(c){i.e(c)}finally{i.f()}}},{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(t,e){var A=g++;return this.animations.set(A,{animation:t,channel:e}),t.setTime(this.getTime(e)),A}},{key:"detachAnimation",value:function(t){this.animations.delete(t)}},{key:"update",value:function(t){this.playing&&(-1===this.lastEngineTime&&(this.lastEngineTime=t),this.setTime(this.time+(t-this.lastEngineTime)),this.lastEngineTime=t)}},{key:"_setChannelTime",value:function(t,e){var A=e-t.delay;A>=t.duration*t.repeat?t.time=t.duration*t.rate:(t.time=Math.max(0,A)%t.duration,t.time*=t.rate)}}]),t}()},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bottom=g,e.cloneLayout=function(t){for(var e=Array(t.length),A=0,n=t.length;A<n;A++)e[A]=c(t[A]);return e},e.cloneLayoutItem=c,e.childrenEqual=function(t,e){return(0,n.default)(r.default.Children.map(t,(function(t){return t.key})),r.default.Children.map(e,(function(t){return t.key})))},e.fastPositionEqual=function(t,e){return t.left===e.left&&t.top===e.top&&t.width===e.width&&t.height===e.height},e.collides=u,e.compact=l,e.compactItem=B,e.correctBounds=f,e.getLayoutItem=d,e.getFirstCollision=Q,e.getAllCollisions=E,e.getStatics=p,e.moveElement=y,e.moveElementAwayFromCollision=v,e.perc=function(t){return 100*t+"%"},e.setTransform=function(t){var e=t.top,A=t.left,n=t.width,r=t.height,i="translate(".concat(A,"px,").concat(e,"px)");return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:"".concat(n,"px"),height:"".concat(r,"px"),position:"absolute"}},e.setTopLeft=function(t){var e=t.top,A=t.left,n=t.width,r=t.height;return{top:"".concat(e,"px"),left:"".concat(A,"px"),width:"".concat(n,"px"),height:"".concat(r,"px"),position:"absolute"}},e.sortLayoutItems=m,e.sortLayoutItemsByRowCol=b,e.sortLayoutItemsByColRow=F,e.synchronizeLayoutWithChildren=function(t,e,A,n){t=t||[];var i=[];return r.default.Children.forEach(e,(function(e,A){var n=d(t,String(e.key));if(n)i[A]=c(n);else{0;var r=e.props["data-grid"]||e.props._grid;i[A]=c(r?a(a({},r),{},{i:e.key}):{w:1,h:1,x:0,y:g(i),i:String(e.key)})}})),l(f(i,{cols:A}),n,A)},e.validateLayout=w,e.compactType=function(t){var e=t||{},A=e.verticalCompact,n=e.compactType;return!1===A?null:n},e.autoBindHandlers=function(t,e){e.forEach((function(e){return t[e]=t[e].bind(t)}))},e.noop=e.fastRGLPropsEqual=void 0;var n=i(A(1167)),r=i(A(0));function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function a(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?o(Object(A),!0).forEach((function(e){s(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):o(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function s(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function g(t){for(var e,A=0,n=0,r=t.length;n<r;n++)(e=t[n].y+t[n].h)>A&&(A=e);return A}function c(t){return{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,minW:t.minW,maxW:t.maxW,minH:t.minH,maxH:t.maxH,moved:Boolean(t.moved),static:Boolean(t.static),isDraggable:t.isDraggable,isResizable:t.isResizable,resizeHandles:t.resizeHandles,isBounded:t.isBounded}}var I=A(1456);function u(t,e){return t.i!==e.i&&(!(t.x+t.w<=e.x)&&(!(t.x>=e.x+e.w)&&(!(t.y+t.h<=e.y)&&!(t.y>=e.y+e.h))))}function l(t,e,A){for(var n=p(t),r=m(t,e),i=Array(t.length),o=0,a=r.length;o<a;o++){var s=c(r[o]);s.static||(s=B(n,s,e,A,r),n.push(s)),i[t.indexOf(r[o])]=s,s.moved=!1}return i}e.fastRGLPropsEqual=I;var C={x:"w",y:"h"};function h(t,e,A,n){var r=C[n];e[n]+=1;for(var i=t.map((function(t){return t.i})).indexOf(e.i)+1;i<t.length;i++){var o=t[i];if(!o.static){if(o.y>e.y+e.h)break;u(e,o)&&h(t,o,A+e[r],n)}}e[n]=A}function B(t,e,A,n,r){var i,o="horizontal"===A;if("vertical"===A)for(e.y=Math.min(g(t),e.y);e.y>0&&!Q(t,e);)e.y--;else if(o)for(e.y=Math.min(g(t),e.y);e.x>0&&!Q(t,e);)e.x--;for(;i=Q(t,e);)o?h(r,e,i.x+i.w,"x"):h(r,e,i.y+i.h,"y"),o&&e.x+e.w>n&&(e.x=n-e.w,e.y++);return e}function f(t,e){for(var A=p(t),n=0,r=t.length;n<r;n++){var i=t[n];if(i.x+i.w>e.cols&&(i.x=e.cols-i.w),i.x<0&&(i.x=0,i.w=e.cols),i.static)for(;Q(A,i);)i.y++;else A.push(i)}return t}function d(t,e){for(var A=0,n=t.length;A<n;A++)if(t[A].i===e)return t[A]}function Q(t,e){for(var A=0,n=t.length;A<n;A++)if(u(t[A],e))return t[A]}function E(t,e){return t.filter((function(t){return u(t,e)}))}function p(t){return t.filter((function(t){return t.static}))}function y(t,e,A,n,r,i,o,a){if(e.static&&!0!==e.isDraggable)return t;if(e.y===n&&e.x===A)return t;S("Moving element ".concat(e.i," to [").concat(String(A),",").concat(String(n),"] from [").concat(e.x,",").concat(e.y,"]"));var s=e.x,g=e.y;"number"===typeof A&&(e.x=A),"number"===typeof n&&(e.y=n),e.moved=!0;var c=m(t,o);("vertical"===o&&"number"===typeof n?g>=n:"horizontal"===o&&"number"===typeof A&&s>=A)&&(c=c.reverse());var I=E(c,e);if(i&&I.length)return S("Collision prevented on ".concat(e.i,", reverting.")),e.x=s,e.y=g,e.moved=!1,t;for(var u=0,l=I.length;u<l;u++){var C=I[u];S("Resolving collision between ".concat(e.i," at [").concat(e.x,",").concat(e.y,"] and ").concat(C.i," at [").concat(C.x,",").concat(C.y,"]")),C.moved||(t=C.static?v(t,C,e,r,o,a):v(t,e,C,r,o,a))}return t}function v(t,e,A,n,r,i){var o="horizontal"===r,a="horizontal"!==r,s=e.static;if(n){n=!1;var g={x:o?Math.max(e.x-A.w,0):A.x,y:a?Math.max(e.y-A.h,0):A.y,w:A.w,h:A.h,i:"-1"};if(!Q(t,g))return S("Doing reverse collision on ".concat(A.i," up to [").concat(g.x,",").concat(g.y,"].")),y(t,A,o?g.x:void 0,a?g.y:void 0,n,s,r,i)}return y(t,A,o?A.x+1:void 0,a?A.y+1:void 0,n,s,r,i)}function m(t,e){return"horizontal"===e?F(t):b(t)}function b(t){return t.slice(0).sort((function(t,e){return t.y>e.y||t.y===e.y&&t.x>e.x?1:t.y===e.y&&t.x===e.x?0:-1}))}function F(t){return t.slice(0).sort((function(t,e){return t.x>e.x||t.x===e.x&&t.y>e.y?1:-1}))}function w(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",A=["x","y","w","h"];if(!Array.isArray(t))throw new Error(e+" must be an array!");for(var n=0,r=t.length;n<r;n++){for(var i=t[n],o=0;o<A.length;o++)if("number"!==typeof i[A[o]])throw new Error("ReactGridLayout: "+e+"["+n+"]."+A[o]+" must be a number!");if(i.i&&"string"!==typeof i.i)throw new Error("ReactGridLayout: "+e+"["+n+"].i must be a string!");if(void 0!==i.static&&"boolean"!==typeof i.static)throw new Error("ReactGridLayout: "+e+"["+n+"].static must be a boolean!")}}function S(){}e.noop=function(){}},function(t,e,A){"use strict";var n=A(6),r=A.n(n),i=A(11),o=A(26),a=function(t){return"boolean"===typeof t},s=function(t){return"function"===typeof t},g=function(t){return null!==t&&"object"===Object(o.a)(t)},c=function(t){return g(t)&&t.constructor==={}.constructor},I=function(t){return t&&"function"===typeof t[Symbol.iterator]},u=function(t){return t&&"function"===typeof t[Symbol.asyncIterator]},l=function(t){return"undefined"!==typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json},C=function(t){return"undefined"!==typeof Blob&&t instanceof Blob},h=function(t){return function(t){return"undefined"!==typeof ReadableStream&&t instanceof ReadableStream||g(t)&&s(t.tee)&&s(t.cancel)&&s(t.getReader)}(t)||function(t){return g(t)&&s(t.read)&&s(t.pipe)&&a(t.readable)}(t)},B=A(1),f=A(154);function d(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Q(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?d(Object(A),!0).forEach((function(e){Object(B.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):d(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function E(t){if(!t)return!1;Array.isArray(t)&&(t=t[0]);var e=t.parseTextSync||t.parseSync||t.parse||t.parseStream||t.parseInBatches,A=t.options&&t.options[t.id];return e=e||A&&A.workerUrl}function p(t){var e;return Object(f.a)(t,"null loader"),Object(f.a)(E(t),"invalid loader"),Array.isArray(t)&&(e=t[1],t=Q(Q({},t=t[0]),{},{options:Q(Q({},t.options),e)})),t.extension&&(t.extensions=t.extensions||t.extension,delete t.extension),Array.isArray(t.extensions)||(t.extensions=[t.extensions]),Object(f.a)(t.extensions&&t.extensions.length>0&&t.extensions[0]),(t.parseTextSync||t.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}var y=A(203),v=A(424),m=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,b=/^([-\w.]+\/[-\w.+]+)/;function F(t){if("string"!==typeof t)return"";var e=t.match(m);return e?e[1]:""}var w=/\?.*/;function S(t){if(l(t)){var e=function(t){if("string"!==typeof t)return"";var e=t.match(b);return e?e[1]:t}(t.headers.get("content-type")),A=F(t.url);return{url:R(t.url||""),type:e||A||null}}return C(t)?{url:R(t.name||""),type:t.type||""}:"string"===typeof t?{url:R(t),type:F(t)}:{url:"",type:""}}function D(t){return l(t)?t.headers["content-length"]||-1:C(t)?t.size:"string"===typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function R(t){return t.replace(w,"")}function U(t){return G.apply(this,arguments)}function G(){return(G=Object(i.a)(r.a.mark((function t(e){var A,n,i,o,a,s,g;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!l(e)){t.next=2;break}return t.abrupt("return",e);case 2:return A={},(n=D(e))>=0&&(A["content-length"]=String(n)),i=S(e),o=i.url,(a=i.type)&&(A["content-type"]=a),t.next=9,M(e);case 9:return(s=t.sent)&&(A["x-first-bytes"]=s),"string"===typeof e&&(e=(new TextEncoder).encode(e)),g=new Response(e,{headers:A}),Object.defineProperty(g,"url",{value:o}),t.abrupt("return",g);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(t){return k.apply(this,arguments)}function k(){return(k=Object(i.a)(r.a.mark((function t(e){var A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.ok){t.next=5;break}return t.next=3,x(e);case 3:throw A=t.sent,new Error(A);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return O.apply(this,arguments)}function O(){return(O=Object(i.a)(r.a.mark((function t(e){var A,n,i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,n=e.headers.get("Content-Type"),i=e.statusText,!n.includes("application/json")){t.next=11;break}return t.t0=i,t.t1=" ",t.next=9,e.text();case 9:t.t2=t.sent,i=t.t0+=t.t1.concat.call(t.t1,t.t2);case 11:A=(A+=i).length>60?"".concat(A.slice(60),"..."):A,t.next=17;break;case 15:t.prev=15,t.t3=t.catch(1);case 17:return t.abrupt("return",A);case 18:case"end":return t.stop()}}),t,null,[[1,15]])})))).apply(this,arguments)}function M(t){return L.apply(this,arguments)}function L(){return(L=Object(i.a)(r.a.mark((function t(e){var A,n,i,o;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=5,"string"!==typeof e){t.next=3;break}return t.abrupt("return","data:,".concat(e.slice(0,A)));case 3:if(!(e instanceof Blob)){t.next=8;break}return n=e.slice(0,5),t.next=7,new Promise((function(t){var e=new FileReader;e.onload=function(e){return t(e.target&&e.target.result)},e.readAsDataURL(n)}));case 7:return t.abrupt("return",t.sent);case 8:if(!(e instanceof ArrayBuffer)){t.next=12;break}return i=e.slice(0,A),o=_(i),t.abrupt("return","data:base64,".concat(o));case 12:return t.abrupt("return",null);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _(t){for(var e="",A=new Uint8Array(t),n=0;n<A.byteLength;n++)e+=String.fromCharCode(A[n]);return btoa(e)}function J(t){return T.apply(this,arguments)}function T(){return(T=Object(i.a)(r.a.mark((function t(e){var A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A="Failed to fetch resource ".concat(e.url," (").concat(e.status,"): "),t.prev=1,!e.headers.get("Content-Type").includes("application/json")){t.next=10;break}return t.t0=A,t.next=7,e.text();case 7:A=t.t0+=t.sent,t.next=11;break;case 10:A+=e.statusText;case 11:t.next=16;break;case 13:return t.prev=13,t.t1=t.catch(1),t.abrupt("return",A);case 16:return t.abrupt("return",A);case 17:case"end":return t.stop()}}),t,null,[[1,13]])})))).apply(this,arguments)}function j(t){return H.apply(this,arguments)}function H(){return(H=Object(i.a)(r.a.mark((function t(e){var A,n,i=arguments;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=i.length>1&&void 0!==i[1]?i[1]:{},"string"===typeof e){t.next=5;break}return t.next=4,U(e);case 4:return t.abrupt("return",t.sent);case 5:return e=Object(v.a)(e),t.next=8,fetch(e,A);case 8:if((n=t.sent).ok||!A.throws){t.next=15;break}return t.t0=Error,t.next=13,J(n);case 13:throw t.t1=t.sent,new t.t0(t.t1);case 15:return t.abrupt("return",n);case 16:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Y=A(5),V=A(4),Z=function(){function t(){Object(Y.a)(this,t)}return Object(V.a)(t,[{key:"log",value:function(){return function(t){}}},{key:"info",value:function(){return function(t){}}},{key:"warn",value:function(){return function(t){}}},{key:"error",value:function(){return function(t){}}}]),t}();function W(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return K(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return K(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function P(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function q(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?P(Object(A),!0).forEach((function(e){Object(B.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):P(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}var X={baseUri:"",fetch:null,CDN:"https://unpkg.com/@loaders.gl",worker:!0,log:new(function(){function t(){Object(Y.a)(this,t),this.console=console}return Object(V.a)(t,[{key:"log",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.log).bind.apply(t,[this.console].concat(A))}},{key:"info",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.info).bind.apply(t,[this.console].concat(A))}},{key:"warn",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.warn).bind.apply(t,[this.console].concat(A))}},{key:"error",value:function(){for(var t,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return(t=this.console.error).bind.apply(t,[this.console].concat(A))}}]),t}()),metadata:!1,transforms:[],reuseWorkers:!0},z={dataType:"(no longer used)",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"},$=function(){y.a.loaders=y.a.loaders||{};var t=y.a.loaders;return t._state=t._state||{},t._state},tt=function(){var t=$();return t.globalOptions=t.globalOptions||q({},X),t.globalOptions};function et(t,e,A,n){return A=A||[],function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:console;nt(t,null,A,X,z,e);var n,r=W(e);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=t&&t[i.id]||{},a=i.options&&i.options[i.id]||{},s=i.defaultOptions&&i.defaultOptions[i.id]||{};nt(o,i.id,A,a,s,e)}}catch(g){r.e(g)}finally{r.f()}}(t,A=Array.isArray(A)?A:[A]),it(e,t,n)}function At(t,e){var A=tt(),n=t.fetch||A.fetch;return"function"===typeof n?n:g(n)?function(t){return j(t,n)}:e&&e.fetch?e.fetch:function(e){return j(e,t)}}function nt(t,e,A,n,r,i){var o=e||"Top level",a=e?"".concat(e,"."):"";for(var s in t){var c=!e&&g(t[s]);if(!(s in n))if(s in r)A.warn("".concat(o," loader option '").concat(a).concat(s,"' deprecated, use '").concat(r[s],"'"));else if(!c){var I=rt(s,i);A.warn("".concat(o," loader option '").concat(a).concat(s,"' not recognized. ").concat(I))}}}function rt(t,e){var A,n=t.toLowerCase(),r="",i=W(e);try{for(i.s();!(A=i.n()).done;){var o=A.value;for(var a in o.options){if(t===a)return"Did you mean '".concat(o.id,".").concat(a,"'?");var s=a.toLowerCase();(n.startsWith(s)||s.startsWith(n))&&(r=r||"Did you mean '".concat(o.id,".").concat(a,"'?"))}}}catch(g){i.e(g)}finally{i.f()}return r}function it(t,e,A){var n=q({},t.options||{});return null===n.log&&(n.log=new Z),ot(n,tt()),ot(n,e),function(t,e){e&&!t.baseUri&&(t.baseUri=e)}(n,A),n}function ot(t,e){for(var A in e)if(A in e){var n=e[A];c(n)&&c(t[A])?t[A]=q(q({},t[A]),e[A]):t[A]=e[A]}}var at=A(744),st=A(582),gt=r.a.mark(ct);function ct(t){var e,A,n,i,o,a,s,g=arguments;return r.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e=g.length>1&&void 0!==g[1]?g[1]:{},A=e.chunkSize,n=void 0===A?262144:A,i=0,o=new TextEncoder;case 4:if(!(i<t.length)){r.next=12;break}return a=Math.min(t.length-i,n),s=t.slice(i,i+a),i+=a,r.next=10,o.encode(s);case 10:r.next=4;break;case 12:case"end":return r.stop()}}),gt)}var It=r.a.mark(ut);function ut(t){var e,A,n,i,o,a,s,g=arguments;return r.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e=g.length>1&&void 0!==g[1]?g[1]:{},A=e.chunkSize,n=void 0===A?262144:A,i=0;case 3:if(!(i<t.byteLength)){r.next=14;break}return o=Math.min(t.byteLength-i,n),a=new ArrayBuffer(o),s=new Uint8Array(t,i,o),new Uint8Array(a).set(s),i+=o,r.next=12,a;case 12:r.next=3;break;case 14:case"end":return r.stop()}}),It)}var lt=A(69),Ct=A(95);function ht(t){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(Ct.a)(r.a.mark((function t(e){var A,n,i,o,a,s=arguments;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=s.length>1&&void 0!==s[1]?s[1]:{},n=A.chunkSize||1048576,i=0;case 3:if(!(i<e.size)){t.next=13;break}return o=i+n,t.next=7,Object(lt.a)(ft(e,i,o));case 7:return a=t.sent,i=o,t.next=11,a;case 11:t.next=3;break;case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ft(t,e,A){return dt.apply(this,arguments)}function dt(){return(dt=Object(i.a)(r.a.mark((function t(e,A,n){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,r){var i=e.slice(A,n),o=new FileReader;o.onload=function(e){return t(e.target&&e.target.result)},o.onerror=function(t){return r(t)},o.readAsArrayBuffer(i)}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Qt=A(110),Et=A(259);function pt(t){if(y.b||y.d>=10){if("function"===typeof t[Symbol.asyncIterator])return function(t){return yt.apply(this,arguments)}(t);if("function"===typeof t.getIterator)return t.getIterator()}return y.b?function(t){return vt.apply(this,arguments)}(t):function(t){return mt.apply(this,arguments)}(t)}function yt(){return(yt=Object(Ct.a)(r.a.mark((function t(e){var A,n,i,o,a,s,g;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=!0,n=!1,t.prev=2,o=Object(Qt.a)(e);case 4:return t.next=6,Object(lt.a)(o.next());case 6:return a=t.sent,A=a.done,t.next=10,Object(lt.a)(a.value);case 10:if(s=t.sent,A){t.next=18;break}return g=s,t.next=15,Object(Et.d)(g);case 15:A=!0,t.next=4;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(2),n=!0,i=t.t0;case 24:if(t.prev=24,t.prev=25,A||null==o.return){t.next=29;break}return t.next=29,Object(lt.a)(o.return());case 29:if(t.prev=29,!n){t.next=32;break}throw i;case 32:return t.finish(29);case 33:return t.finish(24);case 34:case"end":return t.stop()}}),t,null,[[2,20,24,34],[25,,29,33]])})))).apply(this,arguments)}function vt(){return(vt=Object(Ct.a)(r.a.mark((function t(e){var A,n,i,o;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=e.getReader(),t.prev=1;case 2:return t.next=5,Object(lt.a)(A.read());case 5:if(n=t.sent,i=n.done,o=n.value,!i){t.next=10;break}return t.abrupt("return");case 10:return t.next=12,Object(Et.d)(o);case 12:t.next=2;break;case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(1),A.releaseLock();case 19:case"end":return t.stop()}}),t,null,[[1,16]])})))).apply(this,arguments)}function mt(){return(mt=Object(Ct.a)(r.a.mark((function t(e){var A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(lt.a)(e);case 2:e=t.sent;case 3:if(null===(A=e.read())){t.next=9;break}return t.next=8,Object(Et.d)(A);case 8:return t.abrupt("continue",3);case 9:if(!e._readableState.ended){t.next=11;break}return t.abrupt("return");case 11:return t.next=13,Object(lt.a)(bt(e));case 13:t.next=3;break;case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bt(t){return Ft.apply(this,arguments)}function Ft(){return(Ft=Object(i.a)(r.a.mark((function t(e){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){e.once("readable",t)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof t?ct(t,e):t instanceof ArrayBuffer?ut(t,e):C(t)?ht(t,e):h(t)?pt(t):l(t)?pt(t.body):Object(f.a)(!1)}var St="Cannot convert supplied data type";function Dt(t,e){if(e.text&&"string"===typeof t)return t;if(t instanceof ArrayBuffer){var A=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(A):A}if(ArrayBuffer.isView(t)||(i=t)&&"object"===Object(o.a)(i)&&i.isBuffer){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);var n=t.buffer,r=t.byteLength||t.length;return 0===t.byteOffset&&r===n.byteLength||(n=n.slice(t.byteOffset,t.byteOffset+r)),n}var i;throw new Error(St)}function Rt(t,e){return Ut.apply(this,arguments)}function Ut(){return(Ut=Object(i.a)(r.a.mark((function t(e,A){var n,i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!==typeof e&&!n){t.next=3;break}return t.abrupt("return",Dt(e,A));case 3:if(!C(e)){t.next=7;break}return t.next=6,U(e);case 6:e=t.sent;case 7:if(!l(e)){t.next=21;break}return i=e,t.next=11,N(i);case 11:if(!A.binary){t.next=17;break}return t.next=14,i.arrayBuffer();case 14:t.t0=t.sent,t.next=20;break;case 17:return t.next=19,i.text();case 19:t.t0=t.sent;case 20:return t.abrupt("return",t.t0);case 21:if(h(e)&&(e=wt(e)),!I(e)&&!u(e)){t.next=24;break}return t.abrupt("return",Object(st.a)(e));case 24:throw new Error(St);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Gt=A(29);function Nt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function kt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Nt(Object(A),!0).forEach((function(e){Object(B.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Nt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function xt(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return A||(t=kt({fetch:At(e||{},t)},t),Array.isArray(t.loaders)||(t.loaders=null),t)}function Ot(t,e){if(!e&&t&&!Array.isArray(t))return t;var A;if(t&&(A=Array.isArray(t)?t:[t]),e&&e.loaders){var n=Array.isArray(e.loaders)?e.loaders:[e.loaders];A=A?[].concat(Object(Gt.a)(A),Object(Gt.a)(n)):n}return A&&A.length?A:null}var Mt=A(745),Lt=A(398);function _t(t,e,A,n){if(!Mt.a.isSupported())return!1;var r=A&&A[t.id];return!!("local"===A.worker&&r&&r.localWorkerUrl||A.worker&&r&&r.workerUrl)&&(!t.useWorker||t.useWorker(A))}function Jt(t,e,A,n){var r=(A||{}).worker,i=A&&A[t.id]||{},o="local"===r?i.localWorkerUrl:i.workerUrl,a="url(".concat(o,")"),s=t.name,g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={};t.maxConcurrency&&(e.maxConcurrency=t.maxConcurrency);t.onDebug&&(e.onDebug=t.onDebug);"reuseWorkers"in t&&(e.reuseWorkers=t.reuseWorkers);Tt||(Tt=new Mt.a({onMessage:jt}));return Tt.setProps(e),Tt}(A);A=JSON.parse(JSON.stringify(A));var c="2.3.13"!==t.version?"(core version ".concat("2.3.13",")"):"";return g.process(a,"".concat(s,"-worker@").concat(t.version).concat(c),{arraybuffer:Object(Et.d)(e),options:A,source:"loaders.gl@".concat("2.3.13"),type:"parse"})}var Tt=null;function jt(t){return Ht.apply(this,arguments)}function Ht(){return(Ht=Object(i.a)(r.a.mark((function t(e){var A,n,i,o,a;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=e.worker,n=e.data,i=e.resolve,o=e.reject,t.t0=n.type,t.next="done"===t.t0?4:"parse"===t.t0?6:"error"===t.t0?17:19;break;case 4:return i(n.result),t.abrupt("break",19);case 6:return t.prev=6,t.next=9,se(n.arraybuffer,n.options,n.url);case 9:a=t.sent,A.postMessage({type:"parse-done",id:n.id,result:a},Object(Lt.a)(a)),t.next=16;break;case 13:t.prev=13,t.t1=t.catch(6),A.postMessage({type:"parse-error",id:n.id,message:t.t1.message});case 16:return t.abrupt("break",19);case 17:return o(n.message),t.abrupt("break",19);case 19:case"end":return t.stop()}}),t,null,[[6,13]])})))).apply(this,arguments)}var Yt=function(){var t=$();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function Vt(){return Yt()}function Zt(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Wt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(A),!0).forEach((function(e){Object(B.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Zt(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Kt(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Pt(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Pt(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var qt=/\.([^.]+)$/;function Xt(t){return zt.apply(this,arguments)}function zt(){return(zt=Object(i.a)(r.a.mark((function t(e){var A,n,i,o,a=arguments;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=a.length>1&&void 0!==a[1]?a[1]:[],n=a.length>2&&void 0!==a[2]?a[2]:{},i=a.length>3&&void 0!==a[3]?a[3]:{},!(o=$t(e,A,Wt(Wt({},n),{},{nothrow:!0}),i))){t.next=6;break}return t.abrupt("return",o);case 6:if(!C(e)){t.next=11;break}return t.next=9,ft(e,0,10);case 9:e=t.sent,o=$t(e,A,n,i);case 11:if(o||n.nothrow){t.next=13;break}throw new Error(te(e));case 13:return t.abrupt("return",o);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function $t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&!Array.isArray(e))return p(e);ee(e=[].concat(Object(Gt.a)(e||[]),Object(Gt.a)(Vt())));var r=S(t),i=r.url,o=r.type,a=Ae(e,i||n.url);if(!(a=(a=a||ne(e,o))||re(e,t))&&!A.nothrow)throw new Error(te(t));return a}function te(t){var e=S(t),A=e.url,n=e.type,r="No valid loader found";return t&&(r+=' data: "'.concat(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return ae(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var A=0;return ae(t,A,e)}return""}(t),'", contentType: "').concat(n,'"')),A&&(r+=" url: ".concat(A)),r}function ee(t){var e,A=Kt(t);try{for(A.s();!(e=A.n()).done;){p(e.value)}}catch(n){A.e(n)}finally{A.f()}}function Ae(t,e){var A=e&&e.match(qt),n=A&&A[1];return n&&function(t,e){e=e.toLowerCase();var A,n=Kt(t);try{for(n.s();!(A=n.n()).done;){var r,i=A.value,o=Kt(i.extensions);try{for(o.s();!(r=o.n()).done;){if(r.value.toLowerCase()===e)return i}}catch(a){o.e(a)}finally{o.f()}}}catch(a){n.e(a)}finally{n.f()}return null}(t,n)}function ne(t,e){var A,n=Kt(t);try{for(n.s();!(A=n.n()).done;){var r=A.value;if(r.mimeTypes&&r.mimeTypes.includes(e))return r;if(e==="application/x.".concat(r.id))return r}}catch(i){n.e(i)}finally{n.f()}return null}function re(t,e){if(!e)return null;var A,n=Kt(t);try{for(n.s();!(A=n.n()).done;){var r=A.value;if("string"===typeof e){if(ie(e,r))return r}else if(ArrayBuffer.isView(e)){if(oe(e.buffer,e.byteOffset,r))return r}else if(e instanceof ArrayBuffer){if(oe(e,0,r))return r}}}catch(i){n.e(i)}finally{n.f()}return null}function ie(t,e){return e.testText&&e.testText(t)}function oe(t,e,A){return(Array.isArray(A.tests)?A.tests:[A.tests]).some((function(n){return function(t,e,A,n){if(n instanceof ArrayBuffer)return Object(Et.a)(n,t,n.byteLength);switch(Object(o.a)(n)){case"function":return n(t,A);case"string":var r=ae(t,e,n.length);return n===r;default:return!1}}(t,e,A,n)}))}function ae(t,e,A){if(t.byteLength<e+A)return"";for(var n=new DataView(t),r="",i=0;i<A;i++)r+=String.fromCharCode(n.getUint8(e+i));return r}function se(t,e,A,n){return ge.apply(this,arguments)}function ge(){return(ge=Object(i.a)(r.a.mark((function t(e,A,n,i){var o,a,s,g;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object(f.a)(!i||"string"!==typeof i,"parse no longer accepts final url"),!A||Array.isArray(A)||E(A)||(i=n,n=A,A=null),t.next=4,e;case 4:return e=t.sent,n=n||{},o=S(e),a=o.url,s=Ot(A,i),t.next=10,Xt(e,s,n);case 10:if(g=t.sent){t.next=13;break}return t.abrupt("return",null);case 13:return n=et(n,g,s,a),i=xt({url:a,parse:se,loaders:s},n,i),t.next=17,ce(g,e,n,i);case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ce(t,e,A,n){return Ie.apply(this,arguments)}function Ie(){return(Ie=Object(i.a)(r.a.mark((function t(e,A,n,i){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object(at.a)(e),t.next=3,Rt(A,e);case 3:if(A=t.sent,!e.parseTextSync||"string"!==typeof A){t.next=7;break}return n.dataType="text",t.abrupt("return",e.parseTextSync(A,n,i,e));case 7:if(!_t(e,0,n)){t.next=11;break}return t.next=10,Jt(e,A,n);case 10:return t.abrupt("return",t.sent);case 11:if(!e.parseText||"string"!==typeof A){t.next=15;break}return t.next=14,e.parseText(A,n,i,e);case 14:return t.abrupt("return",t.sent);case 15:if(!e.parse){t.next=19;break}return t.next=18,e.parse(A,n,i,e);case 18:return t.abrupt("return",t.sent);case 19:return Object(f.a)(!e.parseSync),t.abrupt("return",Object(f.a)(!1));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ue(t,e,A){return le.apply(this,arguments)}function le(){return(le=Object(i.a)(r.a.mark((function t(e,A,n){var i,o;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(A)||E(A)||(n=A,A=null),i=At(n||{}),o=e,"string"!==typeof e){t.next=9;break}return t.next=6,i(e);case 6:o=t.sent,t.next=10;break;case 9:e=null;case 10:if(!C(e)){t.next=15;break}return t.next=13,i(e);case 13:o=t.sent,e=null;case 15:return t.next=17,se(o,A,n);case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}A.d(e,"a",(function(){return ue}))},function(t,e,A){"use strict";var n=A(6),r=A.n(n),i=A(11),o=A(52),a=A(163),s=A(164),g=A(141);function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"2.3.13";Object(g.a)(t,"no loader provided");var A=t.version;e&&A&&(e=I(e),A=I(A))}function I(t){var e=t.split(".").map(Number);return{major:e[0],minor:e[1]}}var u=A(110),l=A(26),C=A(386);function h(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return B(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return B(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function f(t){if(C.toArrayBuffer&&(t=C.toArrayBuffer(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.buffer;if("string"===typeof t){var e=t;return(new TextEncoder).encode(e).buffer}return t&&"object"===Object(l.a)(t)&&t._toArrayBuffer?t._toArrayBuffer():Object(g.a)(!1)}function d(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];var n,r=e.map((function(t){return t instanceof ArrayBuffer?new Uint8Array(t):t})),i=r.reduce((function(t,e){return t+e.byteLength}),0),o=new Uint8Array(i),a=0,s=h(r);try{for(s.s();!(n=s.n()).done;){var g=n.value;o.set(g,a),a+=g.byteLength}}catch(c){s.e(c)}finally{s.f()}return o.buffer}function Q(t){return E.apply(this,arguments)}function E(){return(E=Object(i.a)(r.a.mark((function t(e){var A,n,i,o,a,s,c,I,l;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=[],n=[],i=!0,o=!1,t.prev=4,s=Object(u.a)(e);case 6:return t.next=8,s.next();case 8:return c=t.sent,i=c.done,t.next=12,c.value;case 12:if(I=t.sent,i){t.next=19;break}"string"===typeof(l=I)?n.push(l):A.push(l);case 16:i=!0,t.next=6;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(4),o=!0,a=t.t0;case 25:if(t.prev=25,t.prev=26,i||null==s.return){t.next=30;break}return t.next=30,s.return();case 30:if(t.prev=30,!o){t.next=33;break}throw a;case 33:return t.finish(30);case 34:return t.finish(25);case 35:if(!(n.length>0)){t.next=38;break}return Object(g.a)(0===A.length),t.abrupt("return",n.join(""));case 38:return t.abrupt("return",d.apply(void 0,A));case 39:case"end":return t.stop()}}),t,null,[[4,21,25,35],[26,,30,34]])})))).apply(this,arguments)}var p=r.a.mark(y);function y(t){var e,A,n,i,o,a,s,g=arguments;return r.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e=g.length>1&&void 0!==g[1]?g[1]:{},A=e.chunkSize,n=void 0===A?262144:A,i=0,o=new TextEncoder;case 4:if(!(i<t.length)){r.next=12;break}return a=Math.min(t.length-i,n),s=t.slice(i,i+a),i+=a,r.next=10,o.encode(s);case 10:r.next=4;break;case 12:case"end":return r.stop()}}),p)}var v=r.a.mark(m);function m(t){var e,A,n,i,o,a,s,g=arguments;return r.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e=g.length>1&&void 0!==g[1]?g[1]:{},A=e.chunkSize,n=void 0===A?262144:A,i=0;case 3:if(!(i<t.byteLength)){r.next=14;break}return o=Math.min(t.byteLength-i,n),a=new ArrayBuffer(o),s=new Uint8Array(t,i,o),new Uint8Array(a).set(s),i+=o,r.next=12,a;case 12:r.next=3;break;case 14:case"end":return r.stop()}}),v)}var b=A(69),F=A(95);function w(t){return S.apply(this,arguments)}function S(){return(S=Object(F.a)(r.a.mark((function t(e){var A,n,i,o,a,s=arguments;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=s.length>1&&void 0!==s[1]?s[1]:{},n=A.chunkSize||1048576,i=0;case 3:if(!(i<e.size)){t.next=13;break}return o=i+n,t.next=7,Object(b.a)(D(e,i,o));case 7:return a=t.sent,i=o,t.next=11,a;case 11:t.next=3;break;case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t,e,A){return R.apply(this,arguments)}function R(){return(R=Object(i.a)(r.a.mark((function t(e,A,n){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,r){var i=e.slice(A,n),o=new FileReader;o.onload=function(e){return t(e.target&&e.target.result)},o.onerror=function(t){return r(t)},o.readAsArrayBuffer(i)}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var U=A(964);function G(t){if(U.b||U.c>=10){if("function"===typeof t[Symbol.asyncIterator])return function(t){return N.apply(this,arguments)}(t);if("function"===typeof t.getIterator)return t.getIterator()}return U.b?function(t){return k.apply(this,arguments)}(t):function(t){return x.apply(this,arguments)}(t)}function N(){return(N=Object(F.a)(r.a.mark((function t(e){var A,n,i,o,a,s,g;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=!0,n=!1,t.prev=2,o=Object(u.a)(e);case 4:return t.next=6,Object(b.a)(o.next());case 6:return a=t.sent,A=a.done,t.next=10,Object(b.a)(a.value);case 10:if(s=t.sent,A){t.next=18;break}return g=s,t.next=15,f(g);case 15:A=!0,t.next=4;break;case 18:t.next=24;break;case 20:t.prev=20,t.t0=t.catch(2),n=!0,i=t.t0;case 24:if(t.prev=24,t.prev=25,A||null==o.return){t.next=29;break}return t.next=29,Object(b.a)(o.return());case 29:if(t.prev=29,!n){t.next=32;break}throw i;case 32:return t.finish(29);case 33:return t.finish(24);case 34:case"end":return t.stop()}}),t,null,[[2,20,24,34],[25,,29,33]])})))).apply(this,arguments)}function k(){return(k=Object(F.a)(r.a.mark((function t(e){var A,n,i,o;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=e.getReader(),t.prev=1;case 2:return t.next=5,Object(b.a)(A.read());case 5:if(n=t.sent,i=n.done,o=n.value,!i){t.next=10;break}return t.abrupt("return");case 10:return t.next=12,f(o);case 12:t.next=2;break;case 14:t.next=19;break;case 16:t.prev=16,t.t0=t.catch(1),A.releaseLock();case 19:case"end":return t.stop()}}),t,null,[[1,16]])})))).apply(this,arguments)}function x(){return(x=Object(F.a)(r.a.mark((function t(e){var A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(b.a)(e);case 2:e=t.sent;case 3:if(null===(A=e.read())){t.next=9;break}return t.next=8,f(A);case 8:return t.abrupt("continue",3);case 9:if(!e._readableState.ended){t.next=11;break}return t.abrupt("return");case 11:return t.next=13,Object(b.a)(O(e));case 13:t.next=3;break;case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(t){return M.apply(this,arguments)}function M(){return(M=Object(i.a)(r.a.mark((function t(e){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){e.once("readable",t)})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof t?y(t,e):t instanceof ArrayBuffer?m(t,e):Object(o.b)(t)?w(t,e):Object(o.h)(t)?G(t):Object(o.i)(t)?G(t.body):Object(g.a)(!1)}var _=A(198),J="Cannot convert supplied data type";function T(t,e){if(e.text&&"string"===typeof t)return t;if(t instanceof ArrayBuffer){var A=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(A):A}if(ArrayBuffer.isView(t)||Object(o.c)(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);var n=t.buffer,r=t.byteLength||t.length;return 0===t.byteOffset&&r===n.byteLength||(n=n.slice(t.byteOffset,t.byteOffset+r)),n}throw new Error(J)}function j(t,e){return H.apply(this,arguments)}function H(){return(H=Object(i.a)(r.a.mark((function t(e,A){var n,i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e instanceof ArrayBuffer||ArrayBuffer.isView(e),"string"!==typeof e&&!n){t.next=3;break}return t.abrupt("return",T(e,A));case 3:if(!Object(o.b)(e)){t.next=7;break}return t.next=6,Object(_.b)(e);case 6:e=t.sent;case 7:if(!Object(o.i)(e)){t.next=21;break}return i=e,t.next=11,Object(_.a)(i);case 11:if(!A.binary){t.next=17;break}return t.next=14,i.arrayBuffer();case 14:t.t0=t.sent,t.next=20;break;case 17:return t.next=19,i.text();case 19:t.t0=t.sent;case 20:return t.abrupt("return",t.t0);case 21:if(Object(o.h)(e)&&(e=L(e)),!Object(o.d)(e)&&!Object(o.a)(e)){t.next=24;break}return t.abrupt("return",Q(e));case 24:throw new Error(J);case 25:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Y=A(29),V=A(1);function Z(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function W(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Z(Object(A),!0).forEach((function(e){Object(V.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Z(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function K(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return A||(t=W({fetch:Object(s.a)(e||{},t)},t),Array.isArray(t.loaders)||(t.loaders=null),t)}function P(t,e){if(!e&&t&&!Array.isArray(t))return t;var A;if(t&&(A=Array.isArray(t)?t:[t]),e&&e.loaders){var n=Array.isArray(e.loaders)?e.loaders:[e.loaders];A=A?[].concat(Object(Y.a)(A),Object(Y.a)(n)):n}return A&&A.length?A:null}var q=A(5),X=A(4),z=new Map;function $(t){return"try {\n  importScripts('".concat(t,"');\n} catch (error) {\n  console.error(error);\n}")}function tt(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],A=arguments.length>2?arguments[2]:void 0,n=A||new Set;if(t){if(et(t))n.add(t);else if(et(t.buffer))n.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"===Object(l.a)(t))for(var r in t)tt(t[r],e,n)}else;return void 0===A?Array.from(n):[]}function et(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!==typeof MessagePort&&t instanceof MessagePort||("undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var At=0;function nt(t){var e=t.data;(0,t.resolve)(e)}var rt=function(){function t(e){var A=e.source,n=e.name,r=void 0===n?"web-worker-".concat(At++):n,i=e.onMessage;Object(q.a)(this,t);var o=function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1],Object(g.a)("string"===typeof t,"worker source"),t.startsWith("url(")&&t.endsWith(")")){var e=t.match(/^url\((.*)\)$/)[1];if(e&&!e.startsWith("http"))return e;t=$(e)}var A=z.get(t);if(!A){var n=new Blob([t],{type:"application/javascript"});A=URL.createObjectURL(n),z.set(t,A)}return A}(A,r);this.worker=new Worker(o,{name:r}),this.name=r,this.onMessage=i||nt}return Object(X.a)(t,[{key:"process",value:function(){var t=Object(i.a)(r.a.mark((function t(e){var A=this;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){A.worker.onmessage=function(e){A.onMessage({worker:A.worker,data:e.data,resolve:t,reject:n})},A.worker.onerror=function(t){var e="".concat(A.name,": WorkerThread.process() failed");t.message&&(e+=" ".concat(t.message," ").concat(t.filename,":").concat(t.lineno,":").concat(t.colno));var r=new Error(e);console.error(t),n(r)};var r=tt(e);A.worker.postMessage(e,r)})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"destroy",value:function(){this.worker.terminate(),this.worker=null}}]),t}(),it=function(){function t(e){var A=e.source,n=e.name,r=void 0===n?"unnamed":n,i=e.maxConcurrency,o=void 0===i?1:i,a=e.onMessage,s=e.onDebug,g=void 0===s?function(){}:s,c=e.reuseWorkers,I=void 0===c||c;Object(q.a)(this,t),this.source=A,this.name=r,this.maxConcurrency=o,this.onMessage=a,this.onDebug=g,this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1,this.reuseWorkers=I}return Object(X.a)(t,[{key:"destroy",value:function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0}},{key:"process",value:function(t,e){var A=this;return new Promise((function(n,r){A.jobQueue.push({data:t,jobName:e,resolve:n,reject:r}),A._startQueuedJob()}))}},{key:"_startQueuedJob",value:function(){var t=Object(i.a)(r.a.mark((function t(){var e,A;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.jobQueue.length){t.next=2;break}return t.abrupt("return");case 2:if(e=this._getAvailableWorker()){t.next=5;break}return t.abrupt("return");case 5:return A=this.jobQueue.shift(),this.onDebug({message:"processing",worker:e.name,job:A.jobName,backlog:this.jobQueue.length}),t.prev=7,t.t0=A,t.next=11,e.process(A.data);case 11:t.t1=t.sent,t.t0.resolve.call(t.t0,t.t1),t.next=18;break;case 15:t.prev=15,t.t2=t.catch(7),A.reject(t.t2);case 18:return t.prev=18,this._onWorkerDone(e),t.finish(18);case 21:case"end":return t.stop()}}),t,this,[[7,15,18,21]])})));return function(){return t.apply(this,arguments)}}()},{key:"_onWorkerDone",value:function(t){this.isDestroyed?t.destroy():(this.reuseWorkers?this.idleQueue.push(t):(t.destroy(),this.count--),this._startQueuedJob())}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift();if(this.count<this.maxConcurrency){this.count++;var t="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new rt({source:this.source,onMessage:this.onMessage,name:t})}return null}}]),t}(),ot=function(){function t(e){var A=e.maxConcurrency,n=void 0===A?5:A,r=e.onMessage,i=void 0===r?null:r,o=e.onDebug,a=void 0===o?function(){}:o,s=e.reuseWorkers,g=void 0===s||s;Object(q.a)(this,t),this.maxConcurrency=n,this.onMessage=i,this.onDebug=a,this.workerPools=new Map,this.reuseWorkers=g}return Object(X.a)(t,null,[{key:"isSupported",value:function(){return"undefined"!==typeof Worker}}]),Object(X.a)(t,[{key:"setProps",value:function(t){"maxConcurrency"in t&&(this.maxConcurrency=t.maxConcurrency),"onDebug"in t&&(this.onDebug=t.onDebug),"reuseWorkers"in t&&(this.reuseWorkers=t.reuseWorkers)}},{key:"destroy",value:function(){this.workerPools.forEach((function(t){return t.destroy()}))}},{key:"process",value:function(){var t=Object(i.a)(r.a.mark((function t(e,A,n){var i;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this._getWorkerPool(e,A),t.abrupt("return",i.process(n));case 2:case"end":return t.stop()}}),t,this)})));return function(e,A,n){return t.apply(this,arguments)}}()},{key:"_getWorkerPool",value:function(t,e){var A=this.workerPools.get(e);return A||(A=new it({source:t,name:e,onMessage:at.bind(null,this.onMessage),maxConcurrency:this.maxConcurrency,onDebug:this.onDebug,reuseWorkers:this.reuseWorkers}),this.workerPools.set(e,A)),A}}]),t}();function at(t,e){var A=e.worker,n=e.data,r=e.resolve,i=e.reject;if(t)t({worker:A,data:n,resolve:r,reject:i});else switch(n.type){case"done":r(n.result);break;case"error":i(n.message)}}function st(t,e,A,n){if(!ot.isSupported())return!1;var r=A&&A[t.id];return!!("local"===A.worker&&r&&r.localWorkerUrl||A.worker&&r&&r.workerUrl)&&(!t.useWorker||t.useWorker(A))}function gt(t,e,A,n){var r=(A||{}).worker,i=A&&A[t.id]||{},o="local"===r?i.localWorkerUrl:i.workerUrl,a="url(".concat(o,")"),s=t.name,g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={};t.maxConcurrency&&(e.maxConcurrency=t.maxConcurrency);t.onDebug&&(e.onDebug=t.onDebug);"reuseWorkers"in t&&(e.reuseWorkers=t.reuseWorkers);ct||(ct=new ot({onMessage:It}));return ct.setProps(e),ct}(A);A=JSON.parse(JSON.stringify(A));var c="2.3.13"!==t.version?"(core version ".concat("2.3.13",")"):"";return g.process(a,"".concat(s,"-worker@").concat(t.version).concat(c),{arraybuffer:f(e),options:A,source:"loaders.gl@".concat("2.3.13"),type:"parse"})}var ct=null;function It(t){return ut.apply(this,arguments)}function ut(){return(ut=Object(i.a)(r.a.mark((function t(e){var A,n,i,o,a;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=e.worker,n=e.data,i=e.resolve,o=e.reject,t.t0=n.type,t.next="done"===t.t0?4:"parse"===t.t0?6:"error"===t.t0?17:19;break;case 4:return i(n.result),t.abrupt("break",19);case 6:return t.prev=6,t.next=9,Ut(n.arraybuffer,n.options,n.url);case 9:a=t.sent,A.postMessage({type:"parse-done",id:n.id,result:a},tt(a)),t.next=16;break;case 13:t.prev=13,t.t1=t.catch(6),A.postMessage({type:"parse-error",id:n.id,message:t.t1.message});case 16:return t.abrupt("break",19);case 17:return o(n.message),t.abrupt("break",19);case 19:case"end":return t.stop()}}),t,null,[[6,13]])})))).apply(this,arguments)}var lt=A(182),Ct=A(518);function ht(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function Bt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(A),!0).forEach((function(e){Object(V.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):ht(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function ft(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return dt(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return dt(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var Qt=/\.([^.]+)$/;function Et(t){return pt.apply(this,arguments)}function pt(){return(pt=Object(i.a)(r.a.mark((function t(e){var A,n,i,a,s=arguments;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=s.length>1&&void 0!==s[1]?s[1]:[],n=s.length>2&&void 0!==s[2]?s[2]:{},i=s.length>3&&void 0!==s[3]?s[3]:{},!(a=yt(e,A,Bt(Bt({},n),{},{nothrow:!0}),i))){t.next=6;break}return t.abrupt("return",a);case 6:if(!Object(o.b)(e)){t.next=11;break}return t.next=9,D(e,0,10);case 9:e=t.sent,a=yt(e,A,n,i);case 11:if(a||n.nothrow){t.next=13;break}throw new Error(vt(e));case 13:return t.abrupt("return",a);case 14:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e&&!Array.isArray(e))return Object(a.b)(e);mt(e=[].concat(Object(Y.a)(e||[]),Object(Y.a)(Object(Ct.a)())));var r=Object(lt.b)(t),i=r.url,o=r.type,s=bt(e,i||n.url);if(!(s=(s=s||Ft(e,o))||wt(e,t))&&!A.nothrow)throw new Error(vt(t));return s}function vt(t){var e=Object(lt.b)(t),A=e.url,n=e.type,r="No valid loader found";return t&&(r+=' data: "'.concat(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return Rt(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){var A=0;return Rt(t,A,e)}return""}(t),'", contentType: "').concat(n,'"')),A&&(r+=" url: ".concat(A)),r}function mt(t){var e,A=ft(t);try{for(A.s();!(e=A.n()).done;){var n=e.value;Object(a.b)(n)}}catch(r){A.e(r)}finally{A.f()}}function bt(t,e){var A=e&&e.match(Qt),n=A&&A[1];return n&&function(t,e){e=e.toLowerCase();var A,n=ft(t);try{for(n.s();!(A=n.n()).done;){var r,i=A.value,o=ft(i.extensions);try{for(o.s();!(r=o.n()).done;){if(r.value.toLowerCase()===e)return i}}catch(a){o.e(a)}finally{o.f()}}}catch(a){n.e(a)}finally{n.f()}return null}(t,n)}function Ft(t,e){var A,n=ft(t);try{for(n.s();!(A=n.n()).done;){var r=A.value;if(r.mimeTypes&&r.mimeTypes.includes(e))return r;if(e==="application/x.".concat(r.id))return r}}catch(i){n.e(i)}finally{n.f()}return null}function wt(t,e){if(!e)return null;var A,n=ft(t);try{for(n.s();!(A=n.n()).done;){var r=A.value;if("string"===typeof e){if(St(e,r))return r}else if(ArrayBuffer.isView(e)){if(Dt(e.buffer,e.byteOffset,r))return r}else if(e instanceof ArrayBuffer){if(Dt(e,0,r))return r}}}catch(i){n.e(i)}finally{n.f()}return null}function St(t,e){return e.testText&&e.testText(t)}function Dt(t,e,A){return(Array.isArray(A.tests)?A.tests:[A.tests]).some((function(n){return function(t,e,A,n){if(n instanceof ArrayBuffer)return function(t,e,A){if(A=A||t.byteLength,t.byteLength<A||e.byteLength<A)return!1;for(var n=new Uint8Array(t),r=new Uint8Array(e),i=0;i<n.length;++i)if(n[i]!==r[i])return!1;return!0}(n,t,n.byteLength);switch(Object(l.a)(n)){case"function":return n(t,A);case"string":var r=Rt(t,e,n.length);return n===r;default:return!1}}(t,e,A,n)}))}function Rt(t,e,A){if(t.byteLength<e+A)return"";for(var n=new DataView(t),r="",i=0;i<A;i++)r+=String.fromCharCode(n.getUint8(e+i));return r}function Ut(t,e,A,n){return Gt.apply(this,arguments)}function Gt(){return(Gt=Object(i.a)(r.a.mark((function t(e,A,n,i){var o,c,I,u;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Object(g.a)(!i||"string"!==typeof i,"parse no longer accepts final url"),!A||Array.isArray(A)||Object(a.a)(A)||(i=n,n=A,A=null),t.next=4,e;case 4:return e=t.sent,n=n||{},o=Object(lt.b)(e),c=o.url,I=P(A,i),t.next=10,Et(e,I,n);case 10:if(u=t.sent){t.next=13;break}return t.abrupt("return",null);case 13:return n=Object(s.c)(n,u,I,c),i=K({url:c,parse:Ut,loaders:I},n,i),t.next=17,Nt(u,e,n,i);case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Nt(t,e,A,n){return kt.apply(this,arguments)}function kt(){return(kt=Object(i.a)(r.a.mark((function t(e,A,n,i){return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c(e),t.next=3,j(A,e);case 3:if(A=t.sent,!e.parseTextSync||"string"!==typeof A){t.next=7;break}return n.dataType="text",t.abrupt("return",e.parseTextSync(A,n,i,e));case 7:if(!st(e,0,n)){t.next=11;break}return t.next=10,gt(e,A,n);case 10:return t.abrupt("return",t.sent);case 11:if(!e.parseText||"string"!==typeof A){t.next=15;break}return t.next=14,e.parseText(A,n,i,e);case 14:return t.abrupt("return",t.sent);case 15:if(!e.parse){t.next=19;break}return t.next=18,e.parse(A,n,i,e);case 18:return t.abrupt("return",t.sent);case 19:return Object(g.a)(!e.parseSync),t.abrupt("return",Object(g.a)(!1));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function xt(t,e,A){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(i.a)(r.a.mark((function t(e,A,n){var i,g;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Array.isArray(A)||Object(a.a)(A)||(n=A,A=null),i=Object(s.a)(n||{}),g=e,"string"!==typeof e){t.next=9;break}return t.next=6,i(e);case 6:g=t.sent,t.next=10;break;case 9:e=null;case 10:if(!Object(o.b)(e)){t.next=15;break}return t.next=13,i(e);case 13:g=t.sent,e=null;case 15:return t.next=17,Ut(g,A,n);case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)})))).apply(this,arguments)}A.d(e,"a",(function(){return xt}))},function(t,e,A){"use strict";var n,r=A(5),i=A(4),o=A(56),a=A(35),s=A(14),g=A(16),c=A(7),I=A(94),u=A(118),l=A(147),C=A(1),h=A(19),B=A(199),f=A(49),d=(n={},Object(C.a)(n,5126,N.bind(null,"uniform1fv",m,1,k)),Object(C.a)(n,35664,N.bind(null,"uniform2fv",m,2,k)),Object(C.a)(n,35665,N.bind(null,"uniform3fv",m,3,k)),Object(C.a)(n,35666,N.bind(null,"uniform4fv",m,4,k)),Object(C.a)(n,5124,N.bind(null,"uniform1iv",b,1,k)),Object(C.a)(n,35667,N.bind(null,"uniform2iv",b,2,k)),Object(C.a)(n,35668,N.bind(null,"uniform3iv",b,3,k)),Object(C.a)(n,35669,N.bind(null,"uniform4iv",b,4,k)),Object(C.a)(n,35670,N.bind(null,"uniform1iv",b,1,k)),Object(C.a)(n,35671,N.bind(null,"uniform2iv",b,2,k)),Object(C.a)(n,35672,N.bind(null,"uniform3iv",b,3,k)),Object(C.a)(n,35673,N.bind(null,"uniform4iv",b,4,k)),Object(C.a)(n,35674,N.bind(null,"uniformMatrix2fv",m,4,x)),Object(C.a)(n,35675,N.bind(null,"uniformMatrix3fv",m,9,x)),Object(C.a)(n,35676,N.bind(null,"uniformMatrix4fv",m,16,x)),Object(C.a)(n,35678,G),Object(C.a)(n,35680,G),Object(C.a)(n,5125,N.bind(null,"uniform1uiv",F,1,k)),Object(C.a)(n,36294,N.bind(null,"uniform2uiv",F,2,k)),Object(C.a)(n,36295,N.bind(null,"uniform3uiv",F,3,k)),Object(C.a)(n,36296,N.bind(null,"uniform4uiv",F,4,k)),Object(C.a)(n,35685,N.bind(null,"uniformMatrix2x3fv",m,6,x)),Object(C.a)(n,35686,N.bind(null,"uniformMatrix2x4fv",m,8,x)),Object(C.a)(n,35687,N.bind(null,"uniformMatrix3x2fv",m,6,x)),Object(C.a)(n,35688,N.bind(null,"uniformMatrix3x4fv",m,12,x)),Object(C.a)(n,35689,N.bind(null,"uniformMatrix4x2fv",m,8,x)),Object(C.a)(n,35690,N.bind(null,"uniformMatrix4x3fv",m,12,x)),Object(C.a)(n,35678,G),Object(C.a)(n,35680,G),Object(C.a)(n,35679,G),Object(C.a)(n,35682,G),Object(C.a)(n,36289,G),Object(C.a)(n,36292,G),Object(C.a)(n,36293,G),Object(C.a)(n,36298,G),Object(C.a)(n,36299,G),Object(C.a)(n,36300,G),Object(C.a)(n,36303,G),Object(C.a)(n,36306,G),Object(C.a)(n,36307,G),Object(C.a)(n,36308,G),Object(C.a)(n,36311,G),n),Q={},E={},p={},y=[0];function v(t,e,A,n){1===e&&"boolean"===typeof t&&(t=t?1:0),Number.isFinite(t)&&(y[0]=t,t=y);var r=t.length;if(r%e&&h.k.warn("Uniform size should be multiples of ".concat(e),t)(),t instanceof A)return t;var i=n[r];i||(i=new A(r),n[r]=i);for(var o=0;o<r;o++)i[o]=t[o];return i}function m(t,e){return v(t,e,Float32Array,Q)}function b(t,e){return v(t,e,Int32Array,E)}function F(t,e){return v(t,e,Uint32Array,p)}function w(t,e,A){var n=d[A.type];if(!n)throw new Error("Unknown GLSL uniform type ".concat(A.type));return n().bind(null,t,e)}function S(t){if("]"!==t[t.length-1])return{name:t,length:1,isArray:!1};var e=t.match(/([^[]*)(\[[0-9]+\])?/);if(!e||e.length<2)throw new Error("Failed to parse GLSL uniform name ".concat(t));return{name:e[1],length:e[2]||1,isArray:Boolean(e[2])}}function D(t,e,A){for(var n in t){var r=t[n];if((!A||Boolean(A[n]))&&!R(r))throw e=e?"".concat(e," "):"",console.error("".concat(e," Bad uniform ").concat(n),r),new Error("".concat(e," Bad uniform ").concat(n))}return!0}function R(t){return Array.isArray(t)||ArrayBuffer.isView(t)?function(t){if(0===t.length)return!1;for(var e=Math.min(t.length,16),A=0;A<e;++A)if(!Number.isFinite(t[A]))return!1;return!0}(t):!!isFinite(t)||(!0===t||!1===t||(t instanceof u.a||(t instanceof B.a||t instanceof l.a&&Boolean(t.texture))))}function U(t,e,A){if(Array.isArray(A)||ArrayBuffer.isView(A))if(t[e])for(var n=t[e],r=0,i=A.length;r<i;++r)n[r]=A[r];else t[e]=A.slice();else t[e]=A}function G(){var t=null;return function(e,A,n){var r=t!==n;return r&&(e.uniform1i(A,n),t=n),r}}function N(t,e,A,n){var r=null,i=null;return function(o,a,s){var g=e(s,A),c=g.length,I=!1;if(null===r)r=new Float32Array(c),i=c,I=!0;else{Object(f.a)(i===c,"Uniform length cannot change.");for(var u=0;u<c;++u)if(g[u]!==r[u]){I=!0;break}}return I&&(n(o,t,a,g),r.set(g)),I}}function k(t,e,A,n){t[e](A,n)}function x(t,e,A,n){t[e](A,!1,n)}function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unnamed",A=/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/,n=t.match(A);return n?n[1]:e}function M(t,e,A,n){for(var r=t.split(/\r?\n/),i={},o={},a=n||O(e)||"(unnamed)",s="".concat(function(t){switch(t){case 35632:return"fragment";case 35633:return"vertex";default:return"unknown type"}}(A)," shader ").concat(a),g=0;g<r.length;g++){var c=r[g];if(!(c.length<=1)){var I=c.split(":"),u=I[0],l=parseInt(I[2],10);if(isNaN(l))throw new Error("GLSL compilation error in ".concat(s,": ").concat(t));"WARNING"!==u?i[l]=c:o[l]=c}}var C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:": ",n=t.split(/\r?\n/),r=String(n.length+e-1).length;return n.map((function(t,n){var i=String(n+e),o=i.length;return _(i,r-o)+A+t}))}(e);return{shaderName:s,errors:L(i,C),warnings:L(o,C)}}function L(t,e){for(var A="",n=0;n<e.length;n++){var r=e[n];if((t[n+3]||t[n+2]||t[n+1])&&(A+="".concat(r,"\n"),t[n+1])){var i=t[n+1],o=i.split(":",3),a=o[0],s=parseInt(o[1],10)||0,g=i.substring(o.join(":").length+1).trim();A+=_("^^^ ".concat(a,": ").concat(g,"\n\n"),s)}}return A}function _(t,e){for(var A="",n=0;n<e;++n)A+=" ";return"".concat(A).concat(t)}var J=A(211);function T(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}var j=function(t){Object(s.a)(A,t);var e=T(A);function A(t,n){var i;Object(r.a)(this,A),Object(h.b)(t),Object(f.a)("string"===typeof n.source,"Shader: GLSL source code must be a JavaScript string");var o=O(n.source,null)||n.id||Object(J.c)("unnamed ".concat(A.getTypeName(n.shaderType)));return(i=e.call(this,t,{id:o})).shaderType=n.shaderType,i.source=n.source,i.initialize(n),i}return Object(i.a)(A,null,[{key:"getTypeName",value:function(t){switch(t){case 35633:return"vertex-shader";case 35632:return"fragment-shader";default:return Object(f.a)(!1),"unknown"}}}]),Object(i.a)(A,[{key:"initialize",value:function(t){var e=t.source,A=O(e,null);A&&(this.id=Object(J.c)(A)),this._compile(e)}},{key:"getParameter",value:function(t){return this.gl.getShaderParameter(this.handle,t)}},{key:"toString",value:function(){return"".concat(A.getTypeName(this.shaderType),":").concat(this.id)}},{key:"getName",value:function(){return O(this.source)||"unnamed-shader"}},{key:"getSource",value:function(){return this.gl.getShaderSource(this.handle)}},{key:"getTranslatedSource",value:function(){var t=this.gl.getExtension("WEBGL_debug_shaders");return t?t.getTranslatedShaderSource(this.handle):"No translated source available. WEBGL_debug_shaders not implemented"}},{key:"_compile",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.source;t.startsWith("#version ")||(t="#version 100\n".concat(t)),this.source=t,this.gl.shaderSource(this.handle,this.source),this.gl.compileShader(this.handle);var e=this.getParameter(35713);if(!e){var A=this.gl.getShaderInfoLog(this.handle),n=M(A,this.source,this.shaderType,this.id),r=n.shaderName,i=n.errors,o=n.warnings;throw h.k.error("GLSL compilation errors in ".concat(r,"\n").concat(i))(),h.k.warn("GLSL compilation warnings in ".concat(r,"\n").concat(o))(),new Error("GLSL compilation errors in ".concat(r))}}},{key:"_deleteHandle",value:function(){this.gl.deleteShader(this.handle)}},{key:"_getOptsFromHandle",value:function(){return{type:this.getParameter(35663),source:this.getSource()}}}]),A}(I.a),H=function(t){Object(s.a)(A,t);var e=T(A);function A(t,n){return Object(r.a)(this,A),"string"===typeof n&&(n={source:n}),e.call(this,t,Object.assign({},n,{shaderType:35633}))}return Object(i.a)(A,[{key:"_createHandle",value:function(){return this.gl.createShader(35633)}}]),A}(j),Y=function(t){Object(s.a)(A,t);var e=T(A);function A(t,n){return Object(r.a)(this,A),"string"===typeof n&&(n={source:n}),e.call(this,t,Object.assign({},n,{shaderType:35632}))}return Object(i.a)(A,[{key:"_createHandle",value:function(){return this.gl.createShader(35632)}}]),A}(j),V=A(130),Z=A(162),W=function(){function t(e){Object(r.a)(this,t),this.id=e.id,this.attributeInfos=[],this.attributeInfosByName={},this.attributeInfosByLocation=[],this.varyingInfos=[],this.varyingInfosByName={},Object.seal(this),this._readAttributesFromProgram(e),this._readVaryingsFromProgram(e)}return Object(i.a)(t,[{key:"getAttributeInfo",value:function(t){var e=Number(t);return Number.isFinite(e)?this.attributeInfosByLocation[e]:this.attributeInfosByName[t]||null}},{key:"getAttributeLocation",value:function(t){var e=this.getAttributeInfo(t);return e?e.location:-1}},{key:"getAttributeAccessor",value:function(t){var e=this.getAttributeInfo(t);return e?e.accessor:null}},{key:"getVaryingInfo",value:function(t){var e=Number(t);return Number.isFinite(e)?this.varyingInfos[e]:this.varyingInfosByName[t]||null}},{key:"getVaryingIndex",value:function(t){var e=this.getVaryingInfo();return e?e.location:-1}},{key:"getVaryingAccessor",value:function(t){var e=this.getVaryingInfo();return e?e.accessor:null}},{key:"_readAttributesFromProgram",value:function(t){for(var e=t.gl,A=e.getProgramParameter(t.handle,35721),n=0;n<A;n++){var r=e.getActiveAttrib(t.handle,n),i=r.name,o=r.type,a=r.size,s=e.getAttribLocation(t.handle,i);s>=0&&this._addAttribute(s,i,o,a)}this.attributeInfos.sort((function(t,e){return t.location-e.location}))}},{key:"_readVaryingsFromProgram",value:function(t){var e=t.gl;if(Object(h.j)(e)){for(var A=e.getProgramParameter(t.handle,35971),n=0;n<A;n++){var r=e.getTransformFeedbackVarying(t.handle,n),i=r.name,o=r.type,a=r.size;this._addVarying(n,i,o,a)}this.varyingInfos.sort((function(t,e){return t.location-e.location}))}}},{key:"_addAttribute",value:function(t,e,A,n){var r=Object(Z.a)(A),i={type:r.type,size:n*r.components};this._inferProperties(t,e,i);var o={location:t,name:e,accessor:new V.a(i)};this.attributeInfos.push(o),this.attributeInfosByLocation[t]=o,this.attributeInfosByName[o.name]=o}},{key:"_inferProperties",value:function(t,e,A){/instance/i.test(e)&&(A.divisor=1)}},{key:"_addVarying",value:function(t,e,A,n){var r=Object(Z.a)(A),i=r.type,o=r.components,a={location:t,name:e,accessor:new V.a({type:i,size:n*o})};this.varyingInfos.push(a),this.varyingInfosByName[a.name]=a}}]),t}(),K=A(185);function P(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return q(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return q(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function X(t){var e=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(t){return!1}}();return function(){var A,n=Object(c.a)(t);if(e){var r=Object(c.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(g.a)(this,A)}}A.d(e,"a",(function(){return $}));var z=["setVertexArray","setAttributes","setBuffers","unsetBuffers","use","getUniformCount","getUniformInfo","getUniformLocation","getUniformValue","getVarying","getFragDataLocation","getAttachedShaders","getAttributeCount","getAttributeLocation","getAttributeInfo"],$=function(t){Object(s.a)(A,t);var e=X(A);function A(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(r.a)(this,A),(n=e.call(this,t,i)).stubRemovedMethods("Program","v6.0",z),n._isCached=!1,n.initialize(i),Object.seal(Object(o.a)(n)),n._setId(i.id),n}return Object(i.a)(A,[{key:"initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.hash,A=t.vs,n=t.fs,r=t.varyings,i=t.bufferMode,o=void 0===i?35981:i;return this.hash=e||"",this.vs="string"===typeof A?new H(this.gl,{id:"".concat(t.id,"-vs"),source:A}):A,this.fs="string"===typeof n?new Y(this.gl,{id:"".concat(t.id,"-fs"),source:n}):n,Object(f.a)(this.vs instanceof H),Object(f.a)(this.fs instanceof Y),this.uniforms={},this._textureUniforms={},r&&r.length>0&&(Object(h.a)(this.gl),this.varyings=r,this.gl2.transformFeedbackVaryings(this.handle,r,o)),this._compileAndLink(),this._readUniformLocationsFromLinkedProgram(),this.configuration=new W(this),this.setProps(t)}},{key:"delete",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._isCached?this:Object(a.a)(Object(c.a)(A.prototype),"delete",this).call(this,t)}},{key:"setProps",value:function(t){return"uniforms"in t&&this.setUniforms(t.uniforms),this}},{key:"draw",value:function(t){var e=this,A=t.logPriority,n=t.drawMode,r=void 0===n?4:n,i=t.vertexCount,o=t.offset,a=void 0===o?0:o,s=t.start,g=t.end,c=t.isIndexed,I=void 0!==c&&c,u=t.indexType,l=void 0===u?5123:u,C=t.instanceCount,B=void 0===C?0:C,d=t.isInstanced,Q=void 0===d?B>0:d,E=t.vertexArray,p=void 0===E?null:E,y=t.transformFeedback,v=t.framebuffer,m=t.parameters,b=void 0===m?{}:m,F=t.uniforms,w=t.samplers;if((F||w)&&(h.k.deprecated("Program.draw({uniforms})","Program.setUniforms(uniforms)")(),this.setUniforms(F||{})),h.k.priority>=A){var S=v?v.id:"default",D="mode=".concat(Object(K.a)(this.gl,r)," verts=").concat(i," ")+"instances=".concat(B," indexType=").concat(Object(K.a)(this.gl,l)," ")+"isInstanced=".concat(Q," isIndexed=").concat(I," ")+"Framebuffer=".concat(S);h.k.log(A,D)()}return Object(f.a)(p),this.gl.useProgram(this.handle),!(!this._areTexturesRenderable()||0===i||Q&&0===B)&&(p.bindForDraw(i,B,(function(){if(void 0!==v&&(b=Object.assign({},b,{framebuffer:v})),y){var t=Object(Z.c)(r);y.begin(t)}e._bindTextures(),Object(h.o)(e.gl,b,(function(){I&&Q?e.gl2.drawElementsInstanced(r,i,l,a,B):I&&Object(h.j)(e.gl)&&!isNaN(s)&&!isNaN(g)?e.gl2.drawRangeElements(r,s,g,i,l,a):I?e.gl.drawElements(r,i,l,a):Q?e.gl2.drawArraysInstanced(r,a,i,B):e.gl.drawArrays(r,a,i)})),y&&y.end()})),!0)}},{key:"setUniforms",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var e in h.k.priority>=2&&D(t,this.id,this._uniformSetters),this.gl.useProgram(this.handle),t){var A=t[e],n=this._uniformSetters[e];if(n){var r=A,i=!1;if(r instanceof l.a&&(r=r.texture),r instanceof u.a)if(i=this.uniforms[e]!==A){void 0===n.textureIndex&&(n.textureIndex=this._textureIndexCounter++);var o=r,a=n.textureIndex;o.bind(a),r=a,this._textureUniforms[e]=o}else r=n.textureIndex;else this._textureUniforms[e]&&delete this._textureUniforms[e];(n(r)||i)&&U(this.uniforms,e,A)}}return this}},{key:"_areTexturesRenderable",value:function(){var t=!0;for(var e in this._textureUniforms){var A=this._textureUniforms[e];A.update(),t=t&&A.loaded}return t}},{key:"_bindTextures",value:function(){for(var t in this._textureUniforms){var e=this._uniformSetters[t].textureIndex;this._textureUniforms[t].bind(e)}}},{key:"_createHandle",value:function(){return this.gl.createProgram()}},{key:"_deleteHandle",value:function(){this.gl.deleteProgram(this.handle)}},{key:"_getOptionsFromHandle",value:function(t){var e,A={},n=P(this.gl.getAttachedShaders(t));try{for(n.s();!(e=n.n()).done;){var r=e.value;switch(this.gl.getShaderParameter(this.handle,35663)){case 35633:A.vs=new H({handle:r});break;case 35632:A.fs=new Y({handle:r})}}}catch(i){n.e(i)}finally{n.f()}return A}},{key:"_getParameter",value:function(t){return this.gl.getProgramParameter(this.handle,t)}},{key:"_setId",value:function(t){if(!t){var e=this._getName();this.id=Object(J.c)(e)}}},{key:"_getName",value:function(){var t=this.vs.getName()||this.fs.getName();return t=(t=t.replace(/shader/i,""))?"".concat(t,"-program"):"program"}},{key:"_compileAndLink",value:function(){var t=this.gl;if(t.attachShader(this.handle,this.vs.handle),t.attachShader(this.handle,this.fs.handle),h.k.time(4,"linkProgram for ".concat(this._getName()))(),t.linkProgram(this.handle),h.k.timeEnd(4,"linkProgram for ".concat(this._getName()))(),t.debug||h.k.level>0){if(!t.getProgramParameter(this.handle,35714))throw new Error("Error linking: ".concat(t.getProgramInfoLog(this.handle)));if(t.validateProgram(this.handle),!t.getProgramParameter(this.handle,35715))throw new Error("Error validating: ".concat(t.getProgramInfoLog(this.handle)))}}},{key:"_readUniformLocationsFromLinkedProgram",value:function(){var t=this.gl;this._uniformSetters={},this._uniformCount=this._getParameter(35718);for(var e=0;e<this._uniformCount;e++){var A=this.gl.getActiveUniform(this.handle,e),n=S(A.name).name,r=t.getUniformLocation(this.handle,n);if(this._uniformSetters[n]=w(t,r,A),A.size>1)for(var i=0;i<A.size;i++)r=t.getUniformLocation(this.handle,"".concat(n,"[").concat(i,"]")),this._uniformSetters["".concat(n,"[").concat(i,"]")]=w(t,r,A)}this._textureIndexCounter=0}},{key:"getActiveUniforms",value:function(t,e){return this.gl2.getActiveUniforms(this.handle,t,e)}},{key:"getUniformBlockIndex",value:function(t){return this.gl2.getUniformBlockIndex(this.handle,t)}},{key:"getActiveUniformBlockParameter",value:function(t,e){return this.gl2.getActiveUniformBlockParameter(this.handle,t,e)}},{key:"uniformBlockBinding",value:function(t,e){this.gl2.uniformBlockBinding(this.handle,t,e)}}]),A}(I.a)},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(22),o=A(334),a="void main() {gl_FragColor = vec4(0);}",s="out vec4 transform_output;\nvoid main() {\n  transform_output = vec4(0);\n}",g="#version 300 es\n".concat(s);function c(t,e){e=Array.isArray(e)?e:[e];var A=t.replace(/^\s+/,"").split(/\s+/),n=Object(i.a)(A,3),r=n[0],o=n[1],a=n[2];return e.includes(r)&&o&&a?{qualifier:r,type:o,name:a.split(";")[0]}:null}function I(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.version,A=void 0===e?100:e,n=t.input,r=t.inputType,i=t.output;if(!n)return 300===A?g:A>300?"#version ".concat(A,"\n").concat(s):a;var o=l(n,r);return A>=300?"#version ".concat(A," ").concat(300===A?"es":"","\nin ").concat(r," ").concat(n,";\nout vec4 ").concat(i,";\nvoid main() {\n  ").concat(i," = ").concat(o,";\n}"):"varying ".concat(r," ").concat(n,";\nvoid main() {\n  gl_FragColor = ").concat(o,";\n}")}function u(t){switch(t){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return Object(o.a)(!1),null}}function l(t,e){switch(e){case"float":return"vec4(".concat(t,", 0.0, 0.0, 1.0)");case"vec2":return"vec4(".concat(t,", 0.0, 1.0)");case"vec3":return"vec4(".concat(t,", 1.0)");case"vec4":return t;default:return Object(o.a)(!1),null}}var C=A(19),h=A(83),B=A(963),f=A(49);function d(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return Q(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return Q(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function Q(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}var E=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,t),this.gl=e,this.currentIndex=0,this.feedbackMap={},this.varyings=null,this.bindings=[],this.resources={},this._initialize(A),Object.seal(this)}return Object(r.a)(t,[{key:"setupResources",value:function(t){var e,A=d(this.bindings);try{for(A.s();!(e=A.n()).done;){var n=e.value;this._setupTransformFeedback(n,t)}}catch(r){A.e(r)}finally{A.f()}}},{key:"updateModelProps",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.varyings;return e.length>0&&(t=Object.assign({},t,{varyings:e})),t}},{key:"getDrawOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.bindings[this.currentIndex],A=e.sourceBuffers,n=e.transformFeedback,r=Object.assign({},A,t.attributes);return{attributes:r,transformFeedback:n}}},{key:"swap",value:function(){return!!this.feedbackMap&&(this.currentIndex=this._getNextIndex(),!0)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(t)}},{key:"getBuffer",value:function(t){var e=this.bindings[this.currentIndex].feedbackBuffers,A=t?e[t]:null;return A?A instanceof h.a?A:A.buffer:null}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.varyingName,A=this.getBuffer(e);return A?A.getData():null}},{key:"delete",value:function(){for(var t in this.resources)this.resources[t].delete()}},{key:"_initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupBuffers(t),this.varyings=t.varyings||Object.keys(this.bindings[this.currentIndex].feedbackBuffers),this.varyings.length>0&&Object(f.a)(Object(C.j)(this.gl))}},{key:"_getFeedbackBuffers",value:function(t){var e=t.sourceBuffers,A=void 0===e?{}:e,n={};if(this.bindings[this.currentIndex]&&Object.assign(n,this.bindings[this.currentIndex].feedbackBuffers),this.feedbackMap)for(var r in this.feedbackMap){var i=this.feedbackMap[r];r in A&&(n[i]=r)}for(var o in Object.assign(n,t.feedbackBuffers),n){var a=n[o];if("string"===typeof a){var s=A[a],g=s.byteLength,c=s.usage,I=s.accessor;n[o]=this._createNewBuffer(o,{byteLength:g,usage:c,accessor:I})}}return n}},{key:"_setupBuffers",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.sourceBuffers,A=void 0===e?null:e;Object.assign(this.feedbackMap,t.feedbackMap);var n=this._getFeedbackBuffers(t);this._updateBindings({sourceBuffers:A,feedbackBuffers:n})}},{key:"_setupTransformFeedback",value:function(t,e){var A=e.model.program;t.transformFeedback=new B.a(this.gl,{program:A,buffers:t.feedbackBuffers})}},{key:"_updateBindings",value:function(t){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],t),this.feedbackMap){var e=this._swapBuffers(this.bindings[this.currentIndex]),A=e.sourceBuffers,n=e.feedbackBuffers,r=this._getNextIndex();this.bindings[r]=this._updateBinding(this.bindings[r],{sourceBuffers:A,feedbackBuffers:n})}}},{key:"_updateBinding",value:function(t,e){return t?(Object.assign(t.sourceBuffers,e.sourceBuffers),Object.assign(t.feedbackBuffers,e.feedbackBuffers),t.transformFeedback&&t.transformFeedback.setBuffers(t.feedbackBuffers),t):{sourceBuffers:Object.assign({},e.sourceBuffers),feedbackBuffers:Object.assign({},e.feedbackBuffers)}}},{key:"_swapBuffers",value:function(t){if(!this.feedbackMap)return null;var e=Object.assign({},t.sourceBuffers),A=Object.assign({},t.feedbackBuffers);for(var n in this.feedbackMap){var r=this.feedbackMap[n];e[n]=t.feedbackBuffers[r],A[r]=t.sourceBuffers[n],Object(f.a)(A[r]instanceof h.a)}return{sourceBuffers:e,feedbackBuffers:A}}},{key:"_createNewBuffer",value:function(t,e){var A=new h.a(this.gl,e);return this.resources[t]&&this.resources[t].delete(),this.resources[t]=A,A}},{key:"_getNextIndex",value:function(){return(this.currentIndex+1)%2}}]),t}(),p=A(1),y=A(390),v=A(233),m=A(147),b=A(515);function F(t){var e=100,A=t.match(/[^\s]+/g);if(A.length>=2&&"#version"===A[0]){var n=parseInt(A[1],10);Number.isFinite(n)&&(e=n)}return e}var w,S=A(335),D={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 R(t){var e=t.vs,A=t.sourceTextureMap,n=t.targetTextureVarying,r=t.targetTexture,i=Object.keys(A).length,a=null,s={},g=e,I={};if(i>0||n){var u=g.split("\n"),l=u.slice();if(u.forEach((function(t,e,r){if(i>0){var g=function(t,e){var A={},n=function(t){return c(t,["attribute","in"])}(t);if(!n)return null;var r=n.type,i=n.name;if(i&&e[i]){var a="// ".concat(t," => Replaced by Transform with a sampler"),s=function(t){var e="".concat("transform_uSampler_").concat(t),A="".concat("transform_uSize_").concat(t),n="  uniform sampler2D ".concat(e,";\n  uniform vec2 ").concat(A,";");return{samplerName:e,sizeName:A,uniformDeclerations:n}}(i),g=s.samplerName,I=s.sizeName,u=s.uniformDeclerations,l=function(t){switch(t){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return Object(o.a)(!1),null}}(r),C="  ".concat(r," ").concat(i," = transform_getInput(").concat(g,", ").concat(I,").").concat(l,";\n");return A[g]=i,{updatedLine:a,inject:{"vs:#decl":u,"vs:#main-start":C},samplerTextureMap:A}}return null}(t,A);if(g){var u=g.updatedLine,C=g.inject;l[e]=u,I=Object(S.b)([I,C]),Object.assign(s,g.samplerTextureMap),i--}}n&&!a&&(a=function(t,e){var A=c(t,["varying","out"]);if(!A)return null;return A.name===e?A.type:null}(t,n))})),n){Object(f.a)(r);var C="".concat("transform_uSize_").concat(n),h={"vs:#decl":"uniform vec2 ".concat(C,";\n"),"vs:#main-start":"     vec2 ".concat("transform_position"," = transform_getPos(").concat(C,");\n     gl_Position = vec4(").concat("transform_position",", 0, 1.);\n")};I=Object(S.b)([I,h])}g=l.join("\n")}return{vs:g,targetTextureType:a,inject:I,samplerTextureMap:s}}function U(t){var e,A,n=t.sourceTextureMap,r=t.targetTextureVarying,i=t.targetTexture,o={};for(var a in r&&(e=i.width,A=i.height,o["".concat("transform_uSize_").concat(r)]=[e,A]),n){var s=n[a];e=s.width,A=s.height,o["".concat("transform_uSize_").concat(a)]=[e,A]}return o}var G=(w={},Object(p.a)(w,10241,9728),Object(p.a)(w,10240,9728),Object(p.a)(w,10242,33071),Object(p.a)(w,10243,33071),w),N=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,t),this.gl=e,this.id=this.currentIndex=0,this._swapTexture=null,this.targetTextureVarying=null,this.targetTextureType=null,this.samplerTextureMap=null,this.bindings=[],this.resources={},this._initialize(A),Object.seal(this)}return Object(r.a)(t,[{key:"updateModelProps",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._processVertexShader(t);return Object.assign({},t,e)}},{key:"getDrawOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.bindings[this.currentIndex],A=e.sourceBuffers,n=e.sourceTextures,r=e.framebuffer,i=e.targetTexture,o=Object.assign({},A,t.attributes),a=Object.assign({},t.uniforms),s=Object.assign({},t.parameters),g=t.discard;if(this.hasSourceTextures||this.hasTargetTexture){for(var c in o.transform_elementID=this.elementIDBuffer,this.samplerTextureMap){var I=this.samplerTextureMap[c];a[c]=n[I]}this._setSourceTextureParameters();var u=U({sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:i});Object.assign(a,u)}return this.hasTargetTexture&&(g=!1,s.viewport=[0,0,r.width,r.height]),{attributes:o,framebuffer:r,uniforms:a,discard:g,parameters:s}}},{key:"swap",value:function(){return!!this._swapTexture&&(this.currentIndex=this._getNextIndex(),!0)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setupTextures(t)}},{key:"getTargetTexture",value:function(){return this.bindings[this.currentIndex].targetTexture}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.packed,A=void 0!==e&&e,n=this.bindings[this.currentIndex].framebuffer,r=Object(y.c)(n);if(!A)return r;for(var i=r.constructor,o=u(this.targetTextureType),a=new i(r.length*o/4),s=0,g=0;g<r.length;g+=4)for(var c=0;c<o;c++)a[s++]=r[g+c];return a}},{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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t._targetTextureVarying,A=t._swapTexture;this._swapTexture=A,this.targetTextureVarying=e,this.hasTargetTexture=e,this._setupTextures(t)}},{key:"_createTargetTexture",value:function(t){var e=t.sourceTextures,A=t.textureOrReference;if(A instanceof v.a)return A;var n=e[A];return n?(this._targetRefTexName=A,this._createNewTexture(n)):null}},{key:"_setupTextures",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.sourceBuffers,A=t._sourceTextures,n=void 0===A?{}:A,r=t._targetTexture,i=this._createTargetTexture({sourceTextures:n,textureOrReference:r});this.hasSourceTextures=this.hasSourceTextures||n&&Object.keys(n).length>0,this._updateBindings({sourceBuffers:e,sourceTextures:n,targetTexture:i}),"elementCount"in t&&this._updateElementIDBuffer(t.elementCount)}},{key:"_updateElementIDBuffer",value:function(t){if(!("number"!==typeof t||this.elementCount>=t)){var e=new Float32Array(t);e.forEach((function(t,e,A){A[e]=e})),this.elementIDBuffer?this.elementIDBuffer.setData({data:e}):this.elementIDBuffer=new h.a(this.gl,{data:e,accessor:{size:1}}),this.elementCount=t}}},{key:"_updateBindings",value:function(t){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],t),this._swapTexture){var e=this._swapTextures(this.bindings[this.currentIndex]),A=e.sourceTextures,n=e.targetTexture,r=this._getNextIndex();this.bindings[r]=this._updateBinding(this.bindings[r],{sourceTextures:A,targetTexture:n})}}},{key:"_updateBinding",value:function(t,e){var A=e.sourceBuffers,n=e.sourceTextures,r=e.targetTexture;if(t||(t={sourceBuffers:{},sourceTextures:{},targetTexture:null}),Object.assign(t.sourceTextures,n),Object.assign(t.sourceBuffers,A),r){t.targetTexture=r;var i=r.width,o=r.height,a=t.framebuffer;a?(a.update({attachments:Object(p.a)({},36064,r),resizeAttachments:!1}),a.resize({width:i,height:o})):t.framebuffer=new m.a(this.gl,{id:"transform-framebuffer",width:i,height:o,attachments:Object(p.a)({},36064,r)})}return t}},{key:"_setSourceTextureParameters",value:function(){var t=this.currentIndex,e=this.bindings[t].sourceTextures;for(var A in e)e[A].setParameters(G)}},{key:"_swapTextures",value:function(t){if(!this._swapTexture)return null;var e=Object.assign({},t.sourceTextures);return e[this._swapTexture]=t.targetTexture,{sourceTextures:e,targetTexture:t.sourceTextures[this._swapTexture]}}},{key:"_createNewTexture",value:function(t){var e,A=Object(b.a)(t,{parameters:(e={},Object(p.a)(e,10241,9728),Object(p.a)(e,10240,9728),Object(p.a)(e,10242,33071),Object(p.a)(e,10243,33071),e),pixelStore:Object(p.a)({},37440,!1)});return this.ownTexture&&this.ownTexture.delete(),this.ownTexture=A,A}},{key:"_getNextIndex",value:function(){return(this.currentIndex+1)%2}},{key:"_processVertexShader",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.bindings[this.currentIndex],A=e.sourceTextures,n=e.targetTexture,r=R({vs:t.vs,sourceTextureMap:A,targetTextureVarying:this.targetTextureVarying,targetTexture:n}),i=r.vs,o=r.uniforms,a=r.targetTextureType,s=r.inject,g=r.samplerTextureMap,c=Object(S.b)([t.inject||{},s]);this.targetTextureType=a,this.samplerTextureMap=g;var u=t._fs||I({version:F(i),input:this.targetTextureVarying,inputType:a,output:"transform_output"}),l=this.hasSourceTextures||this.targetTextureVarying?[D].concat(t.modules||[]):t.modules;return{vs:i,fs:u,modules:l,uniforms:o,inject:c}}}]),t}(),k=A(211),x=A(412);function O(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return M(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return M(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}A.d(e,"a",(function(){return L}));var L=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(n.a)(this,t),this.gl=e,this.model=null,this.elementCount=0,this.bufferTransform=null,this.textureTransform=null,this.elementIDBuffer=null,this._initialize(A),Object.seal(this)}return Object(r.a)(t,null,[{key:"isSupported",value:function(t){return Object(C.j)(t)}}]),Object(r.a)(t,[{key:"delete",value:function(){var t=this.model,e=this.bufferTransform,A=this.textureTransform;t&&t.delete(),e&&e.delete(),A&&A.delete()}},{key:"run",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.clearRenderTarget,A=void 0===e||e,n=this._updateDrawOptions(t);A&&n.framebuffer&&n.framebuffer.clear({color:!0}),this.model.transform(n)}},{key:"swap",value:function(){var t,e=!1,A=O([this.bufferTransform,this.textureTransform].filter(Boolean));try{for(A.s();!(t=A.n()).done;){var n=t.value;e=e||n.swap()}}catch(r){A.e(r)}finally{A.f()}Object(f.a)(e,"Nothing to swap")}},{key:"getBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.bufferTransform&&this.bufferTransform.getBuffer(t)}},{key:"getData",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},A=[this.bufferTransform,this.textureTransform].filter(Boolean),n=O(A);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.getData(e);if(i)return i}}catch(o){n.e(o)}finally{n.f()}return null}},{key:"getFramebuffer",value:function(){return this.textureTransform&&this.textureTransform.getFramebuffer()}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"elementCount"in t&&this.model.setVertexCount(t.elementCount);var e,A=[this.bufferTransform,this.textureTransform].filter(Boolean),n=O(A);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.update(t)}}catch(i){n.e(i)}finally{n.f()}}},{key:"_initialize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.gl;this._buildResourceTransforms(e,t),t=this._updateModelProps(t),this.model=new x.a(e,Object.assign({},t,{fs:t.fs||I({version:F(t.vs)}),id:t.id||"transform-model",drawMode:t.drawMode||0,vertexCount:t.elementCount})),this.bufferTransform&&this.bufferTransform.setupResources({model:this.model})}},{key:"_updateModelProps",value:function(t){var e,A=Object.assign({},t),n=O([this.bufferTransform,this.textureTransform].filter(Boolean));try{for(n.s();!(e=n.n()).done;){A=e.value.updateModelProps(A)}}catch(r){n.e(r)}finally{n.f()}return A}},{key:"_buildResourceTransforms",value:function(t,e){(function(t){if(!Object(k.a)(t.feedbackBuffers)||!Object(k.a)(t.feedbackMap)||t.varyings&&t.varyings.length>0)return!0;return!1})(e)&&(this.bufferTransform=new E(t,e)),function(t){if(!Object(k.a)(t._sourceTextures)||t._targetTexture||t._targetTextureVarying)return!0;return!1}(e)&&(this.textureTransform=new N(t,e)),Object(f.a)(this.bufferTransform||this.textureTransform,"must provide source/feedback buffers or source/target textures")}},{key:"_updateDrawOptions",value:function(t){var e,A=Object.assign({},t),n=O([this.bufferTransform,this.textureTransform].filter(Boolean));try{for(n.s();!(e=n.n()).done;){var r=e.value;A=Object.assign(A,r.getDrawOptions(A))}}catch(i){n.e(i)}finally{n.f()}return A}}]),t}()},function(t,e,A){"use strict";var n=A(5),r=A(4),i=A(56),o=A(14),a=A(16),s=A(7),g=A(0),c=A.n(g),I=A(25),u=A.n(I),l=A(750),C=A(187),h=A(29);function B(t,e){for(;t;){if(t===e)return!0;t=Object.getPrototypeOf(t)}return!1}var f=A(171),d=A(279);function Q(t){return t?"function"===typeof t?Object(g.createElement)(f.a,{},t):Array.isArray(t)?t.map(Q):t.type===c.a.Fragment?Q(t.props.children):(B(t.type,f.a),t):t}function E(t){var e=t.children,A=t.layers,n=t.views,r=[],i=[],o={};return c.a.Children.forEach(Q(e),(function(t){if(t){var e=t.type;if(B(e,d.a)){var A=function(t,e){var A={},n=t.defaultProps||{};for(var r in e)n[r]!==e[r]&&(A[r]=e[r]);return new t(A)}(e,t.props);i.push(A)}else r.push(t);if(e!==f.a&&B(e,f.a)&&t.props.id){var n=new e(t.props);o[n.id]=n}}})),Object.keys(o).length>0&&(Array.isArray(n)?n.forEach((function(t){o[t.id]=t})):n&&(o[n.id]=n),n=Object.values(o)),{layers:A=i.length>0?[].concat(i,Object(h.a)(A)):A,children:r,views:n}}var p={position:"absolute",zIndex:-1};function y(t,e){return t?"function"===typeof t?t(e):Array.isArray(t)?t.map((function(t){return y(t,e)})):function(t){var e=t&&t.type,A=e&&e.defaultProps;return A&&A.mapStyle}(t)?(e.style=p,Object(g.cloneElement)(t,e)):function(t){var e=t&&t.type;return e&&e.deckGLViewProps}(t)?Object(g.cloneElement)(t,e):t:t}function v(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return m(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return m(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function b(t){var e=t.children,A=(t.viewports,t.deck),n=t.ContextProvider,r=(A||{}).viewManager;if(!r||!r.views.length)return[];var i,o={},a=r.views[0].id,s=v(e);try{for(s.s();!(i=s.n()).done;){var c=i.value,I=a,u=c;B(c.type,f.a)&&(I=c.props.id||a,u=c.props.children);var l=r.getViewport(I),C=r.getViewState(I);if(l)u=y(u,{x:l.x,y:l.y,width:l.width,height:l.height,viewport:l,viewState:C}),o[I]||(o[I]={viewport:l,children:[]}),o[I].children.push(u)}}catch(d){s.e(d)}finally{s.f()}return Object.keys(o).map((function(t){var e=o[t],r=e.viewport,i=e.children,a={position:"absolute",left:r.x,top:r.y,width:r.width,height:r.height},s="view-".concat(t),c=g.createElement.apply(void 0,["div",{key:s,id:s,style:a}].concat(Object(h.a)(i)));if(n){var I={viewport:r,container:A.canvas.offsetParent,eventManager:A.eventManager,onViewStateChange:function(e){e.viewId=t,A._onViewStateChange(e)}};return Object(g.createElement)(n,{key:s,value:I},c)}return c}))}var F={mixBlendMode:null};function w(t){var e=t.width,A=t.height,n=t.style,r={position:"absolute",zIndex:0,left:0,top:0,width:e,height:A},i={left:0,top:0};if(n)for(var o in n)o in F?i[o]=n[o]:r[o]=n[o];return{containerStyle:r,canvasStyle:i}}function S(t){var e=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(t){return!1}}();return function(){var A,n=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(a.a)(this,A)}}A.d(e,"a",(function(){return U}));var D=l.a.getPropTypes(u.a),R=l.a.defaultProps,U=function(t){Object(o.a)(A,t);var e=S(A);function A(t){var r;return Object(n.a)(this,A),(r=e.call(this,t)).viewports=null,r.children=null,r._needsRedraw=null,r._containerRef=c.a.createRef(),r._canvasRef=c.a.createRef(),r.pickObject=r.pickObject.bind(Object(i.a)(r)),r.pickMultipleObjects=r.pickMultipleObjects.bind(Object(i.a)(r)),r.pickObjects=r.pickObjects.bind(Object(i.a)(r)),r._extractJSXLayers=Object(C.a)(E),r._positionChildrenUnderViews=Object(C.a)(b),r._extractStyles=Object(C.a)(w),r}return Object(r.a)(A,[{key:"componentDidMount",value:function(){var t=this.props.Deck||l.a;this.deck=this.deck||new t(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(t){this._updateFromProps(t);var e=this.children!==this._parseJSX(t).children,A=this.deck.viewManager&&this.deck.viewManager.needsRedraw();return e&&!A}},{key:"componentDidUpdate",value:function(){this._redrawDeck()}},{key:"componentWillUnmount",value:function(){this.deck.finalize()}},{key:"pickObject",value:function(t){return this.deck.pickObject(t)}},{key:"pickMultipleObjects",value:function(t){return this.deck.pickMultipleObjects(t)}},{key:"pickObjects",value:function(t){return this.deck.pickObjects(t)}},{key:"_redrawDeck",value:function(){this._needsRedraw&&(this.deck._drawLayers(this._needsRedraw),this._needsRedraw=null)}},{key:"_customRender",value:function(t){this._needsRedraw=t,this.deck.viewManager.getViewports()!==this.viewports?this.forceUpdate():this._redrawDeck()}},{key:"_parseJSX",value:function(t){return this._extractJSXLayers({layers:t.layers,views:t.views,children:t.children})}},{key:"_updateFromProps",value:function(t){var e=this._parseJSX(t),A=e.layers,n=e.views,r=Object.assign({},t,{style:null,width:"100%",height:"100%",layers:A,views:n});this.deck.setProps(r)}},{key:"render",value:function(){var t=this.props,e=t.ContextProvider,A=t.width,n=t.height,r=t.style,i=(this.deck||{}).viewManager;this.viewports=i&&i.getViewports(),this.children=this._parseJSX(this.props).children;var o=this._positionChildrenUnderViews({children:this.children,viewports:this.viewports,deck:this.deck,ContextProvider:e}),a=this._extractStyles({width:A,height:n,style:r}),s=a.containerStyle,c=a.canvasStyle,I=Object(g.createElement)("canvas",{key:"canvas",ref:this._canvasRef,style:c});return Object(g.createElement)("div",{id:"deckgl-wrapper",ref:this._containerRef,style:s},[I,o])}}]),A}(c.a.Component);U.propTypes=D,U.defaultProps=R},function(t,e,A){"use strict";var n=A(26),r=A(6),i=A.n(r),o=A(11),a=A(5),s=A(4),g=A(19),c=A(274),I=A(49),u=A(56),l=A(14),C=A(16),h=A(7),B=A(94),f=A(737),d=A(385);function Q(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=function(t,e){if(!t)return;if("string"===typeof t)return E(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return E(t,e)}(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function p(t){var e=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(t){return!1}}();return function(){var A,n=Object(h.a)(t);if(e){var r=Object(h.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(C.a)(this,A)}}var y=function(t){Object(l.a)(A,t);var e=p(A);function A(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object(a.a)(this,A),(n=e.call(this,t,r)).target=null,n._queryPending=!1,n._pollingPromise=null,Object.seal(Object(u.a)(n)),n}return Object(s.a)(A,null,[{key:"isSupported",value:function(t){var e,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object(g.j)(t),r=Object(f.c)(t,d.a.TIMER_QUERY),i=n||r,o=Q(A);try{for(o.s();!(e=o.n()).done;){var a=e.value;switch(a){case"queries":i=i&&n;break;case"timers":i=i&&r;break;default:Object(I.a)(!1)}}}catch(s){o.e(s)}finally{o.f()}return i}}]),Object(s.a)(A,[{key:"beginTimeElapsedQuery",value:function(){return this.begin(35007)}},{key:"beginOcclusionQuery",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.conservative,A=void 0!==e&&e;return this.begin(A?36202:35887)}},{key:"beginTransformFeedbackQuery",value:function(){return this.begin(35976)}},{key:"begin",value:function(t){return this._queryPending||(this.target=t,this.gl2.beginQuery(this.target,this.handle)),this}},{key:"end",value:function(){return this._queryPending||this.target&&(this.gl2.endQuery(this.target),this.target=null,this._queryPending=!0),this}},{key:"isResultAvailable",value:function(){if(!this._queryPending)return!1;var t=this.gl2.getQueryParameter(this.handle,34919);return t&&(this._queryPending=!1),t}},{key:"isTimerDisjoint",value:function(){return this.gl2.getParameter(36795)}},{key:"getResult",value:function(){return this.gl2.getQueryParameter(this.handle,34918)}},{key:"getTimerMilliseconds",value:function(){return this.getResult()/1e6}},{key:"createPoll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;if(this._pollingPromise)return this._pollingPromise;var A=0;return this._pollingPromise=new Promise((function(n,r){requestAnimationFrame((function i(){t.isResultAvailable()?(n(t.getResult()),t._pollingPromise=null):A++>e?(r("Timed out"),t._pollingPromise=null):requestAnimationFrame(i)}))})),this._pollingPromise}},{key:"_createHandle",value:function(){return A.isSupported(this.gl)?this.gl2.createQuery():null}},{key:"_deleteHandle",value:function(){this.gl2.deleteQuery(this.handle)}}]),A}(B.a);function v(t){return"undefined"!==typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(t):clearTimeout(t)}var m=A(147),b=A(60);A.d(e,"a",(function(){return S}));var F=Object(b.isBrowser)()&&"undefined"!==typeof document,w=0,S=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(a.a)(this,t);var A=e.onCreateContext,n=void 0===A?function(t){return Object(g.c)(t)}:A,r=e.onAddHTML,i=void 0===r?null:r,o=e.onInitialize,s=void 0===o?function(){}:o,I=e.onRender,u=void 0===I?function(){}:I,l=e.onFinalize,C=void 0===l?function(){}:l,h=e.onError,B=e.gl,f=void 0===B?null:B,d=e.glOptions,Q=void 0===d?{}:d,E=e.debug,p=void 0!==E&&E,y=e.createFramebuffer,v=void 0!==y&&y,m=e.autoResizeViewport,b=void 0===m||m,F=e.autoResizeDrawingBuffer,S=void 0===F||F,D=e.stats,R=void 0===D?c.a.get("animation-loop-".concat(w++)):D,U=e.useDevicePixels,G=void 0===U||U;"useDevicePixelRatio"in e&&(g.k.deprecated("useDevicePixelRatio","useDevicePixels")(),G=e.useDevicePixelRatio),this.props={onCreateContext:n,onAddHTML:i,onInitialize:s,onRender:u,onFinalize:C,onError:h,gl:f,glOptions:Q,debug:p,createFramebuffer:v},this.gl=f,this.needsRedraw=null,this.timeline=null,this.stats=R,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:b,autoResizeDrawingBuffer:S,useDevicePixels:G}),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(s.a)(t,[{key:"delete",value:function(){this.stop(),this._setDisplay(null)}},{key:"setNeedsRedraw",value:function(t){return Object(I.a)("string"===typeof t),this.needsRedraw=this.needsRedraw||t,this}},{key:"setProps",value:function(t){return"autoResizeViewport"in t&&(this.autoResizeViewport=t.autoResizeViewport),"autoResizeDrawingBuffer"in t&&(this.autoResizeDrawingBuffer=t.autoResizeDrawingBuffer),"useDevicePixels"in t&&(this.useDevicePixels=t.useDevicePixels),this}},{key:"start",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._running)return this;this._running=!0;var A=this._getPageLoadPromise().then((function(){return!t._running||t._initialized?null:(t._createWebGLContext(e),t._createFramebuffer(),t._startEventHandling(),t._initializeCallbackData(),t._updateCallbackData(),t._resizeCanvasDrawingBuffer(),t._resizeViewport(),t._gpuTimeQuery=y.isSupported(t.gl,["timers"])?new y(t.gl):null,t._initialized=!0,t.onInitialize(t.animationProps))})).then((function(e){t._running&&(t._addCallbackData(e||{}),!1!==e&&t._startLoop())}));return this.props.onError&&A.catch(this.props.onError),this}},{key:"redraw",value:function(){return this.isContextLost()||(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(),v(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}},{key:"attachTimeline",value:function(t){return this.timeline=t,this.timeline}},{key:"detachTimeline",value:function(){this.timeline=null}},{key:"waitForRender",value:function(){var t=this;return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise((function(e){t._resolveNextFrame=e}))),this._nextFramePromise}},{key:"toDataURL",value:function(){var t=Object(o.a)(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.setNeedsRedraw("toDataURL"),t.next=3,this.waitForRender();case 3:return t.abrupt("return",this.gl.canvas.toDataURL());case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"isContextLost",value:function(){return this.gl.isContextLost()}},{key:"onCreateContext",value:function(){var t;return(t=this.props).onCreateContext.apply(t,arguments)}},{key:"onInitialize",value:function(){var t;return(t=this.props).onInitialize.apply(t,arguments)}},{key:"onRender",value:function(){var t;return(t=this.props).onRender.apply(t,arguments)}},{key:"onFinalize",value:function(){var t;return(t=this.props).onFinalize.apply(t,arguments)}},{key:"getHTMLControlValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,A=document.getElementById(t);return A?Number(A.value):e}},{key:"setViewParameters",value:function(){return g.k.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}},{key:"_startLoop",value:function(){var t=this;v(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame((function e(){t._running&&(t.redraw(),t._animationFrameId=t._requestAnimationFrame(e))}))}},{key:"_getPageLoadPromise",value:function(){return this._pageLoadPromise||(this._pageLoadPromise=F?new Promise((function(t,e){F&&"complete"===document.readyState?t(document):window.addEventListener("load",(function(){t(document)}))})):Promise.resolve({})),this._pageLoadPromise}},{key:"_setDisplay",value:function(t){this.display&&(this.display.delete(),this.display.animationLoop=null),t&&(t.animationLoop=this),this.display=t}},{key:"_requestAnimationFrame",value:function(t){var e;this.display&&this.display.requestAnimationFrame(t)||(e=t,"undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,1e3/60))}},{key:"_renderFrame",value:function(){var t;this.display?(t=this.display)._renderFrame.apply(t,arguments):this.onRender.apply(this,arguments)}},{key:"_clearNeedsRedraw",value:function(){this.needsRedraw=null}},{key:"_setupFrame",value:function(){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 t=this._getSizeAndAspect(),e=t.width,A=t.height,n=t.aspect;e===this.animationProps.width&&A===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),n!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=e,this.animationProps.height=A,this.animationProps.aspect=n,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(t){"object"===Object(n.a)(t)&&null!==t&&(this.animationProps=Object.assign({},this.animationProps,t))}},{key:"_createWebGLContext",value:function(t){if(this.offScreen=t.canvas&&"undefined"!==typeof OffscreenCanvas&&t.canvas instanceof OffscreenCanvas,t=Object.assign({},t,this.props.glOptions),this.gl=this.props.gl?Object(g.h)(this.props.gl,t):this.onCreateContext(t),!Object(g.i)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");Object(g.l)(this.gl),this._createInfoDiv()}},{key:"_createInfoDiv",value:function(){if(this.gl.canvas&&this.props.onAddHTML){var t=document.createElement("div");document.body.appendChild(t),t.style.position="relative";var e=document.createElement("div");e.style.position="absolute",e.style.left="10px",e.style.bottom="10px",e.style.width="300px",e.style.background="white",t.appendChild(this.gl.canvas),t.appendChild(e);var A=this.props.onAddHTML(e);A&&(e.innerHTML=A)}}},{key:"_getSizeAndAspect",value:function(){var t=this.gl.drawingBufferWidth,e=this.gl.drawingBufferHeight,A=1,n=this.gl.canvas;return n&&n.clientHeight?A=n.clientWidth/n.clientHeight:t>0&&e>0&&(A=t/e),{width:t,height:e,aspect:A}}},{key:"_resizeViewport",value:function(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}},{key:"_resizeCanvasDrawingBuffer",value:function(){this.autoResizeDrawingBuffer&&Object(g.m)(this.gl,{useDevicePixels:this.useDevicePixels})}},{key:"_createFramebuffer",value:function(){this.props.createFramebuffer&&(this.framebuffer=new m.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 t=this.gl.canvas;t&&(t.addEventListener("mousemove",this._onMousemove),t.addEventListener("mouseleave",this._onMouseleave))}},{key:"_onMousemove",value:function(t){this.animationProps._mousePosition=[t.offsetX,t.offsetY]}},{key:"_onMouseleave",value:function(t){this.animationProps._mousePosition=null}}]),t}()},function(t,e,A){"use strict";var n=A(341),r="\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";A.d(e,"a",(function(){return s})),A.d(e,"b",(function(){return g}));var i={};function o(t){var e=t.ambient,A=void 0===e?.35:e,n=t.diffuse,r=void 0===n?.6:n,i=t.shininess,o=void 0===i?32:i,a=t.specularColor;return{lighting_uAmbient:A,lighting_uDiffuse:r,lighting_uShininess:o,lighting_uSpecularColor:(void 0===a?[30,30,30]:a).map((function(t){return t/255}))}}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;if(!("material"in t))return{};var e=t.material;return e?o(e):{lighting_uEnabled:!1}}var s={name:"gouraud-lighting",dependencies:[n.a],vs:r,defines:{LIGHTING_VERTEX:1},getUniforms:a},g={name:"phong-lighting",dependencies:[n.a],fs:r,defines:{LIGHTING_FRAGMENT:1},getUniforms:a}},function(t,e,A){"use strict";var n=A(272),r=A(509);var i=function(t){"function"===typeof t?t():t&&"function"===typeof t.unsubscribe&&t.unsubscribe()};e.a=function(t){var e,A=new r.a,o=0;return new n.a((function(n){e||(e=t.subscribe(A));var r=A.subscribe(n);return o++,function(){o--,r.unsubscribe(),0===o&&(i(e),e=void 0)}}))}},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=(A(25),A(903)),a=A(29),s=A(22),g=A(26),c=(A(285),A(32)),I=A(66),u=A(41),l=A(68),C=A(361),h=A(100),B=A(295),f=A(210),d=A(753),Q=A(905),E=A(906),p=A(64),y=A(90),v=A(351),m=A(5),b=A(4),F=A(352);function w(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function S(t){return parseInt(window.getComputedStyle(t)["padding-right"],10)||0}function D(t,e,A){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4?arguments[4]:void 0,i=[e,A].concat(Object(a.a)(n)),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(t.children,(function(t){1===t.nodeType&&-1===i.indexOf(t)&&-1===o.indexOf(t.tagName)&&w(t,r)}))}function R(t,e){var A=-1;return t.some((function(t,n){return!!e(t)&&(A=n,!0)})),A}function U(t,e){var A,n=[],r=[],i=t.container;if(!e.disableScrollLock){if(function(t){var e=Object(h.a)(t);return e.body===t?Object(B.a)(e).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}(i)){var o=Object(F.a)();n.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(S(i)+o,"px"),A=Object(h.a)(i).querySelectorAll(".mui-fixed"),[].forEach.call(A,(function(t){r.push(t.style.paddingRight),t.style.paddingRight="".concat(S(t)+o,"px")}))}var a=i.parentElement,s="HTML"===a.nodeName&&"scroll"===window.getComputedStyle(a)["overflow-y"]?a:i;n.push({value:s.style.overflow,key:"overflow",el:s}),s.style.overflow="hidden"}return function(){A&&[].forEach.call(A,(function(t,e){r[e]?t.style.paddingRight=r[e]:t.style.removeProperty("padding-right")})),n.forEach((function(t){var e=t.value,A=t.el,n=t.key;e?A.style.setProperty(n,e):A.style.removeProperty(n)}))}}var G=function(){function t(){Object(m.a)(this,t),this.modals=[],this.containers=[]}return Object(b.a)(t,[{key:"add",value:function(t,e){var A=this.modals.indexOf(t);if(-1!==A)return A;A=this.modals.length,this.modals.push(t),t.modalRef&&w(t.modalRef,!1);var n=function(t){var e=[];return[].forEach.call(t.children,(function(t){t.getAttribute&&"true"===t.getAttribute("aria-hidden")&&e.push(t)})),e}(e);D(e,t.mountNode,t.modalRef,n,!0);var r=R(this.containers,(function(t){return t.container===e}));return-1!==r?(this.containers[r].modals.push(t),A):(this.containers.push({modals:[t],container:e,restore:null,hiddenSiblingNodes:n}),A)}},{key:"mount",value:function(t,e){var A=R(this.containers,(function(e){return-1!==e.modals.indexOf(t)})),n=this.containers[A];n.restore||(n.restore=U(n,e))}},{key:"remove",value:function(t){var e=this.modals.indexOf(t);if(-1===e)return e;var A=R(this.containers,(function(e){return-1!==e.modals.indexOf(t)})),n=this.containers[A];if(n.modals.splice(n.modals.indexOf(t),1),this.modals.splice(e,1),0===n.modals.length)n.restore&&n.restore(),t.modalRef&&w(t.modalRef,!0),D(n.container,t.mountNode,t.modalRef,n.hiddenSiblingNodes,!1),this.containers.splice(A,1);else{var r=n.modals[n.modals.length-1];r.modalRef&&w(r.modalRef,!1)}return e}},{key:"isTopModal",value:function(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}]),t}();var N=function(t){var e=t.children,A=t.disableAutoFocus,n=void 0!==A&&A,r=t.disableEnforceFocus,o=void 0!==r&&r,a=t.disableRestoreFocus,s=void 0!==a&&a,g=t.getDoc,c=t.isEnabled,I=t.open,u=i.useRef(),C=i.useRef(null),B=i.useRef(null),f=i.useRef(),d=i.useRef(null),Q=i.useCallback((function(t){d.current=l.findDOMNode(t)}),[]),E=Object(p.a)(e.ref,Q);return i.useMemo((function(){I&&"undefined"!==typeof window&&(f.current=g().activeElement)}),[I]),i.useEffect((function(){if(I){var t=Object(h.a)(d.current);n||!d.current||d.current.contains(t.activeElement)||(d.current.hasAttribute("tabIndex")||d.current.setAttribute("tabIndex",-1),d.current.focus());var e=function(){o||!c()||u.current?u.current=!1:d.current&&!d.current.contains(t.activeElement)&&d.current.focus()},A=function(e){!o&&c()&&9===e.keyCode&&t.activeElement===d.current&&(u.current=!0,e.shiftKey?B.current.focus():C.current.focus())};t.addEventListener("focus",e,!0),t.addEventListener("keydown",A,!0);var r=setInterval((function(){e()}),50);return function(){clearInterval(r),t.removeEventListener("focus",e,!0),t.removeEventListener("keydown",A,!0),s||(f.current&&f.current.focus&&f.current.focus(),f.current=null)}}}),[n,o,s,c,I]),i.createElement(i.Fragment,null,i.createElement("div",{tabIndex:0,ref:C,"data-test":"sentinelStart"}),i.cloneElement(e,{ref:E}),i.createElement("div",{tabIndex:0,ref:B,"data-test":"sentinelEnd"}))},k={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"}},x=i.forwardRef((function(t,e){var A=t.invisible,o=void 0!==A&&A,a=t.open,s=Object(r.a)(t,["invisible","open"]);return a?i.createElement("div",Object(n.a)({"aria-hidden":!0,ref:e},s,{style:Object(n.a)({},k.root,{},o?k.invisible:{},{},s.style)})):null}));var O=new G,M=i.forwardRef((function(t,e){var A=Object(d.a)(),o=Object(Q.a)({name:"MuiModal",props:Object(n.a)({},t),theme:A}),a=o.BackdropComponent,s=void 0===a?x:a,g=o.BackdropProps,c=o.children,I=o.closeAfterTransition,u=void 0!==I&&I,C=o.container,B=o.disableAutoFocus,m=void 0!==B&&B,b=o.disableBackdropClick,F=void 0!==b&&b,S=o.disableEnforceFocus,D=void 0!==S&&S,R=o.disableEscapeKeyDown,U=void 0!==R&&R,G=o.disablePortal,k=void 0!==G&&G,M=o.disableRestoreFocus,L=void 0!==M&&M,_=o.disableScrollLock,J=void 0!==_&&_,T=o.hideBackdrop,j=void 0!==T&&T,H=o.keepMounted,Y=void 0!==H&&H,V=o.manager,Z=void 0===V?O:V,W=o.onBackdropClick,K=o.onClose,P=o.onEscapeKeyDown,q=o.onRendered,X=o.open,z=Object(r.a)(o,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),$=i.useState(!0),tt=$[0],et=$[1],At=i.useRef({}),nt=i.useRef(null),rt=i.useRef(null),it=Object(p.a)(rt,e),ot=function(t){return!!t.children&&t.children.props.hasOwnProperty("in")}(o),at=function(){return Object(h.a)(nt.current)},st=function(){return At.current.modalRef=rt.current,At.current.mountNode=nt.current,At.current},gt=function(){Z.mount(st(),{disableScrollLock:J}),rt.current.scrollTop=0},ct=Object(y.a)((function(){var t=function(t){return t="function"===typeof t?t():t,l.findDOMNode(t)}(C)||at().body;Z.add(st(),t),rt.current&&gt()})),It=i.useCallback((function(){return Z.isTopModal(st())}),[Z]),ut=Object(y.a)((function(t){nt.current=t,t&&(q&&q(),X&&It()?gt():w(rt.current,!0))})),lt=i.useCallback((function(){Z.remove(st())}),[Z]);if(i.useEffect((function(){return function(){lt()}}),[lt]),i.useEffect((function(){X?ct():ot&&u||lt()}),[X,lt,ot,u,ct]),!Y&&!X&&(!ot||tt))return null;var Ct=function(t){return{root:{position:"fixed",zIndex:t.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(A||{zIndex:v.a}),ht={};return void 0===c.props.tabIndex&&(ht.tabIndex=c.props.tabIndex||"-1"),ot&&(ht.onEnter=Object(f.a)((function(){et(!1)}),c.props.onEnter),ht.onExited=Object(f.a)((function(){et(!0),u&&lt()}),c.props.onExited)),i.createElement(E.a,{ref:ut,container:C,disablePortal:k},i.createElement("div",Object(n.a)({ref:it,onKeyDown:function(t){"Escape"===t.key&&It()&&(t.stopPropagation(),P&&P(t),!U&&K&&K(t,"escapeKeyDown"))},role:"presentation"},z,{style:Object(n.a)({},Ct.root,{},!X&&tt?Ct.hidden:{},{},z.style)}),j?null:i.createElement(s,Object(n.a)({open:X,onClick:function(t){t.target===t.currentTarget&&(W&&W(t),!F&&K&&K(t,"backdropClick"))}},g)),i.createElement(N,{disableEnforceFocus:D,disableAutoFocus:m,disableRestoreFocus:L,getDoc:at,isEnabled:It,open:X},i.cloneElement(c,ht))))})),L=A(1391),_=A(246),J=A(421);function T(t){return"scale(".concat(t,", ").concat(Math.pow(t,2),")")}var j={entering:{opacity:1,transform:T(1)},entered:{opacity:1,transform:"none"}},H=i.forwardRef((function(t,e){var A=t.children,o=t.in,a=t.onEnter,s=t.onExit,g=t.style,c=t.timeout,I=void 0===c?"auto":c,u=Object(r.a)(t,["children","in","onEnter","onExit","style","timeout"]),l=i.useRef(),C=i.useRef(),h=Object(p.a)(A.ref,e),B=Object(_.a)();return i.useEffect((function(){return function(){clearTimeout(l.current)}}),[]),i.createElement(L.a,Object(n.a)({appear:!0,in:o,onEnter:function(t,e){Object(J.b)(t);var A,n=Object(J.a)({style:g,timeout:I},{mode:"enter"}),r=n.duration,i=n.delay;"auto"===I?(A=B.transitions.getAutoHeightDuration(t.clientHeight),C.current=A):A=r,t.style.transition=[B.transitions.create("opacity",{duration:A,delay:i}),B.transitions.create("transform",{duration:.666*A,delay:i})].join(","),a&&a(t,e)},onExit:function(t){var e,A=Object(J.a)({style:g,timeout:I},{mode:"exit"}),n=A.duration,r=A.delay;"auto"===I?(e=B.transitions.getAutoHeightDuration(t.clientHeight),C.current=e):e=n,t.style.transition=[B.transitions.create("opacity",{duration:e,delay:r}),B.transitions.create("transform",{duration:.666*e,delay:r||.333*e})].join(","),t.style.opacity="0",t.style.transform=T(.75),s&&s(t)},addEndListener:function(t,e){"auto"===I&&(l.current=setTimeout(e,C.current||0))},timeout:"auto"===I?null:I},u),(function(t,e){return i.cloneElement(A,Object(n.a)({style:Object(n.a)({opacity:0,transform:T(.75),visibility:"exited"!==t||o?void 0:"hidden"},j[t],{},g,{},A.props.style),ref:h},e))}))}));H.muiSupportAuto=!0;var Y=H,V=A(821);function Z(t,e){var A=0;return"number"===typeof e?A=e:"center"===e?A=t.height/2:"bottom"===e&&(A=t.height),A}function W(t,e){var A=0;return"number"===typeof e?A=e:"center"===e?A=t.width/2:"right"===e&&(A=t.width),A}function K(t){return[t.horizontal,t.vertical].map((function(t){return"number"===typeof t?"".concat(t,"px"):t})).join(" ")}function P(t){return"function"===typeof t?t():t}var q=i.forwardRef((function(t,e){var A=t.action,o=t.anchorEl,a=t.anchorOrigin,s=void 0===a?{vertical:"top",horizontal:"left"}:a,g=t.anchorPosition,I=t.anchorReference,u=void 0===I?"anchorEl":I,d=t.children,Q=t.classes,E=t.className,p=t.container,y=t.elevation,v=void 0===y?8:y,m=t.getContentAnchorEl,b=t.marginThreshold,F=void 0===b?16:b,w=t.onEnter,S=t.onEntered,D=t.onEntering,R=t.onExit,U=t.onExited,G=t.onExiting,N=t.open,k=t.PaperProps,x=void 0===k?{}:k,O=t.transformOrigin,L=void 0===O?{vertical:"top",horizontal:"left"}:O,_=t.TransitionComponent,J=void 0===_?Y:_,T=t.transitionDuration,j=void 0===T?"auto":T,H=t.TransitionProps,q=void 0===H?{}:H,X=Object(r.a)(t,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),z=i.useRef(),$=i.useCallback((function(t){if("anchorPosition"===u)return g;var e=P(o),A=(e instanceof Object(B.a)(e).Element?e:Object(h.a)(z.current).body).getBoundingClientRect(),n=0===t?s.vertical:"center";return{top:A.top+Z(A,n),left:A.left+W(A,s.horizontal)}}),[o,s.horizontal,s.vertical,g,u]),tt=i.useCallback((function(t){var e=0;if(m&&"anchorEl"===u){var A=m(t);if(A&&t.contains(A)){var n=function(t,e){for(var A=e,n=0;A&&A!==t;)n+=(A=A.parentElement).scrollTop;return n}(t,A);e=A.offsetTop+A.clientHeight/2-n||0}0}return e}),[s.vertical,u,m]),et=i.useCallback((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Z(t,L.vertical)+e,horizontal:W(t,L.horizontal)}}),[L.horizontal,L.vertical]),At=i.useCallback((function(t){var e=tt(t),A={width:t.offsetWidth,height:t.offsetHeight},n=et(A,e);if("none"===u)return{top:null,left:null,transformOrigin:K(n)};var r=$(e),i=r.top-n.vertical,a=r.left-n.horizontal,s=i+A.height,g=a+A.width,c=Object(B.a)(P(o)),I=c.innerHeight-F,l=c.innerWidth-F;if(i<F){var C=i-F;i-=C,n.vertical+=C}else if(s>I){var h=s-I;i-=h,n.vertical+=h}if(a<F){var f=a-F;a-=f,n.horizontal+=f}else if(g>l){var d=g-l;a-=d,n.horizontal+=d}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(a),"px"),transformOrigin:K(n)}}),[o,u,$,tt,et,F]),nt=i.useCallback((function(){var t=z.current;if(t){var e=At(t);null!==e.top&&(t.style.top=e.top),null!==e.left&&(t.style.left=e.left),t.style.transformOrigin=e.transformOrigin}}),[At]),rt=i.useCallback((function(t){z.current=l.findDOMNode(t)}),[]);i.useEffect((function(){N&&nt()})),i.useImperativeHandle(A,(function(){return N?{updatePosition:function(){nt()}}:null}),[N,nt]),i.useEffect((function(){if(N){var t=Object(C.a)((function(){nt()}));return window.addEventListener("resize",t),function(){t.clear(),window.removeEventListener("rezise",t)}}}),[N,nt]);var it=j;"auto"!==j||J.muiSupportAuto||(it=void 0);var ot=p||(o?Object(h.a)(P(o)).body:void 0);return i.createElement(M,Object(n.a)({container:ot,open:N,ref:e,BackdropProps:{invisible:!0},className:Object(c.a)(Q.root,E)},X),i.createElement(J,Object(n.a)({appear:!0,in:N,onEnter:w,onEntered:S,onExit:R,onExited:U,onExiting:G,timeout:it},q,{onEntering:Object(f.a)((function(t,e){D&&D(t,e),nt()}),q.onEntering)}),i.createElement(V.a,Object(n.a)({elevation:v,ref:rt},x,{className:Object(c.a)(Q.paper,x.className)}),d)))})),X=Object(u.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"})(q),z=A(942),$=A(122),tt={vertical:"top",horizontal:"right"},et={vertical:"top",horizontal:"left"},At=i.forwardRef((function(t,e){var A=t.autoFocus,o=void 0===A||A,a=t.children,s=t.classes,g=t.disableAutoFocusItem,I=void 0!==g&&g,u=t.MenuListProps,C=void 0===u?{}:u,h=t.onClose,B=t.onEntering,f=t.open,d=t.PaperProps,Q=void 0===d?{}:d,E=t.PopoverClasses,p=t.transitionDuration,y=void 0===p?"auto":p,v=t.variant,m=void 0===v?"selectedMenu":v,b=Object(r.a)(t,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),F=Object(_.a)(),w=o&&!I&&f,S=i.useRef(null),D=i.useRef(null),R=-1;i.Children.map(a,(function(t,e){i.isValidElement(t)&&(t.props.disabled||("menu"!==m&&t.props.selected||-1===R)&&(R=e))}));var U=i.Children.map(a,(function(t,e){return e===R?i.cloneElement(t,{ref:function(e){D.current=l.findDOMNode(e),Object($.a)(t.ref,e)}}):t}));return i.createElement(X,Object(n.a)({getContentAnchorEl:function(){return D.current},classes:E,onClose:h,onEntering:function(t,e){S.current&&S.current.adjustStyleForScrollbar(t,F),B&&B(t,e)},anchorOrigin:"rtl"===F.direction?tt:et,transformOrigin:"rtl"===F.direction?tt:et,PaperProps:Object(n.a)({},Q,{classes:Object(n.a)({},Q.classes,{root:s.paper})}),open:f,ref:e,transitionDuration:y},b),i.createElement(z.a,Object(n.a)({onKeyDown:function(t){"Tab"===t.key&&(t.preventDefault(),h&&h(t,"tabKeyDown"))},actions:S,autoFocus:o&&(-1===R||I),autoFocusItem:w,variant:m},C,{className:Object(c.a)(s.list,C.className)}),U))})),nt=Object(u.a)({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(At),rt=A(420),it=A(344);function ot(t,e){return"object"===Object(g.a)(e)&&null!==e?t===e:String(t)===String(e)}var at=i.forwardRef((function(t,e){var A=t.autoFocus,o=t.autoWidth,g=t.children,u=t.classes,l=t.className,C=t.defaultValue,h=t.disabled,B=t.displayEmpty,f=t.IconComponent,d=t.inputRef,Q=t.labelId,E=t.MenuProps,y=void 0===E?{}:E,v=t.multiple,m=t.name,b=t.onBlur,F=t.onChange,w=t.onClose,S=t.onFocus,D=t.onOpen,R=t.open,U=t.readOnly,G=t.renderValue,N=(t.required,t.SelectDisplayProps),k=void 0===N?{}:N,x=t.tabIndex,O=(t.type,t.value),M=t.variant,L=void 0===M?"standard":M,_=Object(r.a)(t,["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"]),J=Object(it.a)({controlled:O,default:C,name:"SelectInput"}),T=Object(s.a)(J,2),j=T[0],H=T[1],Y=i.useRef(null),V=i.useState(null),Z=V[0],W=V[1],K=i.useRef(null!=R).current,P=i.useState(),q=P[0],X=P[1],z=i.useState(!1),$=z[0],tt=z[1],et=Object(p.a)(e,d);i.useImperativeHandle(et,(function(){return{focus:function(){Z.focus()},node:Y.current,value:j}}),[Z,j]),i.useEffect((function(){A&&Z&&Z.focus()}),[A,Z]);var At,at,st=function(t,e){t?D&&D(e):w&&w(e),K||(X(o?null:Z.clientWidth),tt(t))},gt=function(t){return function(e){var A;if(v||st(!1,e),v){A=Array.isArray(j)?Object(a.a)(j):[];var n=j.indexOf(t.props.value);-1===n?A.push(t.props.value):A.splice(n,1)}else A=t.props.value;H(A),F&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:A,name:m}}),F(e,t))}},ct=null!==Z&&(K?R:$);delete _["aria-invalid"];var It=[],ut=!1;(Object(rt.b)({value:j})||B)&&(G?At=G(j):ut=!0);var lt=i.Children.map(g,(function(t){if(!i.isValidElement(t))return null;var e;if(v){if(!Array.isArray(j))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(e=j.some((function(e){return ot(e,t.props.value)})))&&ut&&It.push(t.props.children)}else(e=ot(j,t.props.value))&&ut&&(at=t.props.children);return e&&!0,i.cloneElement(t,{"aria-selected":e?"true":void 0,onClick:gt(t),onKeyUp:function(e){" "===e.key&&e.preventDefault();var A=t.props.onKeyUp;"function"===typeof A&&A(e)},role:"option",selected:e,value:void 0,"data-value":t.props.value})}));ut&&(At=v?It.join(", "):at);var Ct,ht=q;!o&&K&&Z&&(ht=Z.clientWidth),Ct="undefined"!==typeof x?x:h?null:0;var Bt=k.id||(m?"mui-component-select-".concat(m):void 0);return i.createElement(i.Fragment,null,i.createElement("div",Object(n.a)({className:Object(c.a)(u.root,u.select,u.selectMenu,u[L],l,h&&u.disabled),ref:W,tabIndex:Ct,role:"button","aria-expanded":ct?"true":void 0,"aria-labelledby":"".concat(Q||""," ").concat(Bt||""),"aria-haspopup":"listbox",onKeyDown:function(t){if(!U){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(t.key)&&(t.preventDefault(),st(!0,t))}},onMouseDown:h||U?null:function(t){0===t.button&&(t.preventDefault(),Z.focus(),st(!0,t))},onBlur:function(t){!ct&&b&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:j,name:m}}),b(t))},onFocus:S},k,{id:Bt}),function(t){return null==t||"string"===typeof t&&!t.trim()}(At)?i.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}}):At),i.createElement("input",Object(n.a)({value:Array.isArray(j)?j.join(","):j,name:m,ref:Y,type:"hidden",autoFocus:A},_)),i.createElement(f,{className:Object(c.a)(u.icon,u["icon".concat(Object(I.a)(L))],ct&&u.iconOpen)}),i.createElement(nt,Object(n.a)({id:"menu-".concat(m||""),anchorEl:Z,open:ct,onClose:function(t){st(!1,t)}},y,{MenuListProps:Object(n.a)({"aria-labelledby":Q,role:"listbox",disableListWrap:!0},y.MenuListProps),PaperProps:Object(n.a)({},y.PaperProps,{style:Object(n.a)({minWidth:ht},null!=y.PaperProps?y.PaperProps.style:null)})}),lt))})),st=A(296),gt=A(297),ct=A(252),It=Object(ct.a)(i.createElement("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ut=A(389);function lt(t,e){return parseInt(t[e],10)||0}var Ct="undefined"!==typeof window?i.useLayoutEffect:i.useEffect,ht={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},Bt=i.forwardRef((function(t,e){var A=t.onChange,o=t.rows,a=t.rowsMax,s=t.rowsMin,g=void 0===s?1:s,c=t.style,I=t.value,u=Object(r.a)(t,["onChange","rows","rowsMax","rowsMin","style","value"]),l=o||g,h=i.useRef(null!=I).current,B=i.useRef(null),f=Object(p.a)(e,B),d=i.useRef(null),Q=i.useRef(0),E=i.useState({}),y=E[0],v=E[1],m=i.useCallback((function(){var e=B.current,A=window.getComputedStyle(e),n=d.current;n.style.width=A.width,n.value=e.value||t.placeholder||"x";var r=A["box-sizing"],i=lt(A,"padding-bottom")+lt(A,"padding-top"),o=lt(A,"border-bottom-width")+lt(A,"border-top-width"),s=n.scrollHeight-i;n.value="x";var g=n.scrollHeight-i,c=s;l&&(c=Math.max(Number(l)*g,c)),a&&(c=Math.min(Number(a)*g,c));var I=(c=Math.max(c,g))+("border-box"===r?i+o:0),u=Math.abs(c-s)<=1;v((function(t){return Q.current<20&&(I>0&&Math.abs((t.outerHeightStyle||0)-I)>1||t.overflow!==u)?(Q.current+=1,{overflow:u,outerHeightStyle:I}):t}))}),[a,l,t.placeholder]);i.useEffect((function(){var t=Object(C.a)((function(){Q.current=0,m()}));return window.addEventListener("resize",t),function(){t.clear(),window.removeEventListener("resize",t)}}),[m]),Ct((function(){m()})),i.useEffect((function(){Q.current=0}),[I]);return i.createElement(i.Fragment,null,i.createElement("textarea",Object(n.a)({value:I,onChange:function(t){Q.current=0,h||m(),A&&A(t)},ref:f,rows:l,style:Object(n.a)({height:y.outerHeightStyle,overflow:y.overflow?"hidden":null},c)},u)),i.createElement("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:d,tabIndex:-1,style:Object(n.a)({},ht,{},c)}))})),ft="undefined"===typeof window?i.useEffect:i.useLayoutEffect,dt=i.forwardRef((function(t,e){var A=t["aria-describedby"],o=t.autoComplete,a=t.autoFocus,s=t.classes,g=t.className,u=(t.color,t.defaultValue),l=t.disabled,C=t.endAdornment,h=(t.error,t.fullWidth),B=void 0!==h&&h,f=t.id,d=t.inputComponent,Q=void 0===d?"input":d,E=t.inputProps,y=void 0===E?{}:E,v=t.inputRef,m=(t.margin,t.multiline),b=void 0!==m&&m,F=t.name,w=t.onBlur,S=t.onChange,D=t.onClick,R=t.onFocus,U=t.onKeyDown,G=t.onKeyUp,N=t.placeholder,k=t.readOnly,x=t.renderSuffix,O=t.rows,M=t.rowsMax,L=t.rowsMin,_=t.startAdornment,J=t.type,T=void 0===J?"text":J,j=t.value,H=Object(r.a)(t,["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"]),Y=null!=y.value?y.value:j,V=i.useRef(null!=Y).current,Z=i.useRef(),W=i.useCallback((function(t){0}),[]),K=Object(p.a)(y.ref,W),P=Object(p.a)(v,K),q=Object(p.a)(Z,P),X=i.useState(!1),z=X[0],$=X[1],tt=Object(ut.b)();var et=Object(st.a)({props:t,muiFormControl:tt,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});et.focused=tt?tt.focused:z,i.useEffect((function(){!tt&&l&&z&&($(!1),w&&w())}),[tt,l,z,w]);var At=tt&&tt.onFilled,nt=tt&&tt.onEmpty,it=i.useCallback((function(t){Object(rt.b)(t)?At&&At():nt&&nt()}),[At,nt]);ft((function(){V&&it({value:Y})}),[Y,it,V]);i.useEffect((function(){it(Z.current)}),[]);var ot=Q,at=Object(n.a)({},y,{ref:q});"string"!==typeof ot?at=Object(n.a)({inputRef:q,type:T},at,{ref:null}):b?!O||M||L?(at=Object(n.a)({rows:O,rowsMax:M},at),ot=Bt):ot="textarea":at=Object(n.a)({type:T},at);return i.useEffect((function(){tt&&tt.setAdornedStart(Boolean(_))}),[tt,_]),i.createElement("div",Object(n.a)({className:Object(c.a)(s.root,s["color".concat(Object(I.a)(et.color||"primary"))],g,et.disabled&&s.disabled,et.error&&s.error,B&&s.fullWidth,et.focused&&s.focused,tt&&s.formControl,b&&s.multiline,_&&s.adornedStart,C&&s.adornedEnd,"dense"===et.margin&&s.marginDense),onClick:function(t){Z.current&&t.currentTarget===t.target&&Z.current.focus(),D&&D(t)},ref:e},H),_,i.createElement(ut.a.Provider,{value:null},i.createElement(ot,Object(n.a)({"aria-invalid":et.error,"aria-describedby":A,autoComplete:o,autoFocus:a,defaultValue:u,disabled:et.disabled,id:f,onAnimationStart:function(t){it("mui-auto-fill-cancel"===t.animationName?Z.current:{value:"x"})},name:F,placeholder:N,readOnly:k,required:et.required,rows:O,value:Y,onKeyDown:U,onKeyUp:G},at,{className:Object(c.a)(s.input,y.className,et.disabled&&s.disabled,b&&s.inputMultiline,et.hiddenLabel&&s.inputHiddenLabel,_&&s.inputAdornedStart,C&&s.inputAdornedEnd,"search"===T&&s.inputTypeSearch,"dense"===et.margin&&s.inputMarginDense),onBlur:function(t){w&&w(t),y.onBlur&&y.onBlur(t),tt&&tt.onBlur?tt.onBlur(t):$(!1)},onChange:function(t){if(!V){var e=t.target||Z.current;if(null==e)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.");it({value:e.value})}for(var A=arguments.length,n=new Array(A>1?A-1:0),r=1;r<A;r++)n[r-1]=arguments[r];y.onChange&&y.onChange.apply(y,[t].concat(n)),S&&S.apply(void 0,[t].concat(n))},onFocus:function(t){et.disabled?t.stopPropagation():(R&&R(t),y.onFocus&&y.onFocus(t),tt&&tt.onFocus?tt.onFocus(t):$(!0))}}))),C,x?x(Object(n.a)({},et,{startAdornment:_})):null)})),Qt=Object(u.a)((function(t){var e="light"===t.palette.type,A={color:"currentColor",opacity:e?.42:.5,transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})},r={opacity:"0 !important"},i={opacity:e?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{from:{}},"@keyframes mui-auto-fill-cancel":{from:{}}},root:Object(n.a)({},t.typography.body1,{color:t.palette.text.primary,lineHeight:"1.1875em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:t.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":A,"&::-moz-placeholder":A,"&:-ms-input-placeholder":A,"&::-ms-input-placeholder":A,"&: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"})(dt),Et=i.forwardRef((function(t,e){var A=t.disableUnderline,o=t.classes,a=t.fullWidth,s=void 0!==a&&a,g=t.inputComponent,I=void 0===g?"input":g,u=t.multiline,l=void 0!==u&&u,C=t.type,h=void 0===C?"text":C,B=Object(r.a)(t,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return i.createElement(Qt,Object(n.a)({classes:Object(n.a)({},o,{root:Object(c.a)(o.root,!A&&o.underline),underline:null}),fullWidth:s,inputComponent:I,multiline:l,ref:e,type:h},B))}));Et.muiName="Input";var pt=Object(u.a)((function(t){var e="light"===t.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:t.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(t.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:t.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(e),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(t.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(e)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(Et),yt=i.forwardRef((function(t,e){var A=t.classes,o=t.className,a=t.disabled,s=t.IconComponent,g=t.inputRef,u=t.variant,l=void 0===u?"standard":u,C=Object(r.a)(t,["classes","className","disabled","IconComponent","inputRef","variant"]);return i.createElement(i.Fragment,null,i.createElement("select",Object(n.a)({className:Object(c.a)(A.root,A.select,A[l],o,a&&A.disabled),disabled:a,ref:g||e},C)),t.multiple?null:i.createElement(s,{className:Object(c.a)(A.icon,A["icon".concat(Object(I.a)(l))])}))})),vt=function(t){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===t.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:t.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:t.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",color:t.palette.action.active,pointerEvents:"none"},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7}}},mt=i.createElement(pt,null),bt=i.forwardRef((function(t,e){var A=t.children,o=t.classes,a=t.IconComponent,s=void 0===a?It:a,g=t.input,c=void 0===g?mt:g,I=t.inputProps,u=(t.variant,Object(r.a)(t,["children","classes","IconComponent","input","inputProps","variant"])),l=Object(gt.a)(),C=Object(st.a)({props:t,muiFormControl:l,states:["variant"]});return i.cloneElement(c,Object(n.a)({inputComponent:yt,inputProps:Object(n.a)({children:A,classes:o,IconComponent:s,variant:C.variant,type:void 0},I,{},c?c.props.inputProps:{}),ref:e},u))}));bt.muiName="Select";Object(u.a)(vt,{name:"MuiNativeSelect"})(bt);var Ft=i.forwardRef((function(t,e){var A=t.disableUnderline,o=t.classes,a=t.fullWidth,s=void 0!==a&&a,g=t.inputComponent,I=void 0===g?"input":g,u=t.multiline,l=void 0!==u&&u,C=t.type,h=void 0===C?"text":C,B=Object(r.a)(t,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return i.createElement(Qt,Object(n.a)({classes:Object(n.a)({},o,{root:Object(c.a)(o.root,!A&&o.underline),underline:null}),fullWidth:s,inputComponent:I,multiline:l,ref:e,type:h},B))}));Ft.muiName="Input";var wt=Object(u.a)((function(t){var e="light"===t.palette.type,A=e?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",n=e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:n,borderTopLeftRadius:t.shape.borderRadius,borderTopRightRadius:t.shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:e?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:n}},"&$focused":{backgroundColor:e?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:e?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:t.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(t.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:t.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(A),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(t.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"===t.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===t.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"})(Ft),St=A(1),Dt=i.forwardRef((function(t,e){t.children;var A=t.classes,o=t.className,a=t.label,s=t.labelWidth,g=t.notched,u=t.style,l=Object(r.a)(t,["children","classes","className","label","labelWidth","notched","style"]),C="rtl"===Object(_.a)().direction?"right":"left";if(void 0!==a)return i.createElement("fieldset",Object(n.a)({"aria-hidden":!0,className:Object(c.a)(A.root,o),ref:e,style:u},l),i.createElement("legend",{className:Object(c.a)(A.legendLabelled,g&&A.legendNotched)},a?i.createElement("span",null,a):i.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})));var h=s>0?.75*s+8:.01;return i.createElement("fieldset",Object(n.a)({"aria-hidden":!0,style:Object(n.a)(Object(St.a)({},"padding".concat(Object(I.a)(C)),8),u),className:Object(c.a)(A.root,o),ref:e},l),i.createElement("legend",{className:A.legend,style:{width:g?h:.01}},i.createElement("span",{dangerouslySetInnerHTML:{__html:"&#8203;"}})))})),Rt=Object(u.a)((function(t){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:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})}}}),{name:"PrivateNotchedOutline"})(Dt),Ut=i.forwardRef((function(t,e){var A=t.classes,o=t.fullWidth,a=void 0!==o&&o,s=t.inputComponent,g=void 0===s?"input":s,I=t.label,u=t.labelWidth,l=void 0===u?0:u,C=t.multiline,h=void 0!==C&&C,B=t.notched,f=t.type,d=void 0===f?"text":f,Q=Object(r.a)(t,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return i.createElement(Qt,Object(n.a)({renderSuffix:function(t){return i.createElement(Rt,{className:A.notchedOutline,label:I,labelWidth:l,notched:"undefined"!==typeof B?B:Boolean(t.startAdornment||t.filled||t.focused)})},classes:Object(n.a)({},A,{root:Object(c.a)(A.root,A.underline),notchedOutline:null}),fullWidth:a,inputComponent:g,multiline:h,ref:e,type:d},Q))}));Ut.muiName="Input";var Gt=Object(u.a)((function(t){var e="light"===t.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:t.shape.borderRadius,"&:hover $notchedOutline":{borderColor:t.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:e}},"&$focused $notchedOutline":{borderColor:t.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:t.palette.error.main},"&$disabled $notchedOutline":{borderColor:t.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:t.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:e},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===t.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===t.palette.type?"#fff":null,borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(Ut),Nt=vt,kt=i.createElement(pt,null),xt=i.createElement(wt,null),Ot=i.forwardRef((function t(e,A){var a=e.autoWidth,s=void 0!==a&&a,g=e.children,c=e.classes,I=e.displayEmpty,u=void 0!==I&&I,l=e.IconComponent,C=void 0===l?It:l,h=e.id,B=e.input,f=e.inputProps,d=e.label,Q=e.labelId,E=e.labelWidth,p=void 0===E?0:E,y=e.MenuProps,v=e.multiple,m=void 0!==v&&v,b=e.native,F=void 0!==b&&b,w=e.onClose,S=e.onOpen,D=e.open,R=e.renderValue,U=e.SelectDisplayProps,G=e.variant,N=void 0===G?"standard":G,k=Object(r.a)(e,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),x=F?yt:at,O=Object(gt.a)(),M=Object(st.a)({props:e,muiFormControl:O,states:["variant"]}).variant||N,L=B||{standard:kt,outlined:i.createElement(Gt,{label:d,labelWidth:p}),filled:xt}[M];return i.cloneElement(L,Object(n.a)({inputComponent:x,inputProps:Object(n.a)({children:g,IconComponent:C,variant:M,type:void 0,multiple:m},F?{id:h}:{autoWidth:s,displayEmpty:u,labelId:Q,MenuProps:y,onClose:w,onOpen:S,open:D,renderValue:R,SelectDisplayProps:Object(n.a)({id:h},U)},{},f,{classes:f?Object(o.a)({baseClasses:c,newClasses:f.classes,Component:t}):c},B?B.props.inputProps:{}),ref:A},k))}));Ot.muiName="Select";e.a=Object(u.a)(Nt,{name:"MuiSelect"})(Ot)},function(t,e,A){"use strict";function n(t,e,A,n){if(isNaN(e)||isNaN(A))return t;var r,i,o,a,s,g,c,I,u,l=t._root,C={data:n},h=t._x0,B=t._y0,f=t._x1,d=t._y1;if(!l)return t._root=C,t;for(;l.length;)if((g=e>=(i=(h+f)/2))?h=i:f=i,(c=A>=(o=(B+d)/2))?B=o:d=o,r=l,!(l=l[I=c<<1|g]))return r[I]=C,t;if(a=+t._x.call(null,l.data),s=+t._y.call(null,l.data),e===a&&A===s)return C.next=l,r?r[I]=C:t._root=C,t;do{r=r?r[I]=new Array(4):t._root=new Array(4),(g=e>=(i=(h+f)/2))?h=i:f=i,(c=A>=(o=(B+d)/2))?B=o:d=o}while((I=c<<1|g)===(u=(s>=o)<<1|a>=i));return r[u]=l,r[I]=C,t}var r=function(t,e,A,n,r){this.node=t,this.x0=e,this.y0=A,this.x1=n,this.y1=r};function i(t){return t[0]}function o(t){return t[1]}function a(t,e,A){var n=new s(null==e?i:e,null==A?o:A,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function s(t,e,A,n,r,i){this._x=t,this._y=e,this._x0=A,this._y0=n,this._x1=r,this._y1=i,this._root=void 0}function g(t){for(var e={data:t.data},A=e;t=t.next;)A=A.next={data:t.data};return e}A.d(e,"a",(function(){return a}));var c=a.prototype=s.prototype;c.copy=function(){var t,e,A=new s(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return A;if(!n.length)return A._root=g(n),A;for(t=[{source:n,target:A._root=new Array(4)}];n=t.pop();)for(var r=0;r<4;++r)(e=n.source[r])&&(e.length?t.push({source:e,target:n.target[r]=new Array(4)}):n.target[r]=g(e));return A},c.add=function(t){var e=+this._x.call(null,t),A=+this._y.call(null,t);return n(this.cover(e,A),e,A,t)},c.addAll=function(t){var e,A,r,i,o=t.length,a=new Array(o),s=new Array(o),g=1/0,c=1/0,I=-1/0,u=-1/0;for(A=0;A<o;++A)isNaN(r=+this._x.call(null,e=t[A]))||isNaN(i=+this._y.call(null,e))||(a[A]=r,s[A]=i,r<g&&(g=r),r>I&&(I=r),i<c&&(c=i),i>u&&(u=i));if(g>I||c>u)return this;for(this.cover(g,c).cover(I,u),A=0;A<o;++A)n(this,a[A],s[A],t[A]);return this},c.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var A=this._x0,n=this._y0,r=this._x1,i=this._y1;if(isNaN(A))r=(A=Math.floor(t))+1,i=(n=Math.floor(e))+1;else{for(var o,a,s=r-A,g=this._root;A>t||t>=r||n>e||e>=i;)switch(a=(e<n)<<1|t<A,(o=new Array(4))[a]=g,g=o,s*=2,a){case 0:r=A+s,i=n+s;break;case 1:A=r-s,i=n+s;break;case 2:r=A+s,n=i-s;break;case 3:A=r-s,n=i-s}this._root&&this._root.length&&(this._root=g)}return this._x0=A,this._y0=n,this._x1=r,this._y1=i,this},c.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},c.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},c.find=function(t,e,A){var n,i,o,a,s,g,c,I=this._x0,u=this._y0,l=this._x1,C=this._y1,h=[],B=this._root;for(B&&h.push(new r(B,I,u,l,C)),null==A?A=1/0:(I=t-A,u=e-A,l=t+A,C=e+A,A*=A);g=h.pop();)if(!(!(B=g.node)||(i=g.x0)>l||(o=g.y0)>C||(a=g.x1)<I||(s=g.y1)<u))if(B.length){var f=(i+a)/2,d=(o+s)/2;h.push(new r(B[3],f,d,a,s),new r(B[2],i,d,f,s),new r(B[1],f,o,a,d),new r(B[0],i,o,f,d)),(c=(e>=d)<<1|t>=f)&&(g=h[h.length-1],h[h.length-1]=h[h.length-1-c],h[h.length-1-c]=g)}else{var Q=t-+this._x.call(null,B.data),E=e-+this._y.call(null,B.data),p=Q*Q+E*E;if(p<A){var y=Math.sqrt(A=p);I=t-y,u=e-y,l=t+y,C=e+y,n=B.data}}return n},c.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,A,n,r,i,o,a,s,g,c,I,u,l=this._root,C=this._x0,h=this._y0,B=this._x1,f=this._y1;if(!l)return this;if(l.length)for(;;){if((g=i>=(a=(C+B)/2))?C=a:B=a,(c=o>=(s=(h+f)/2))?h=s:f=s,e=l,!(l=l[I=c<<1|g]))return this;if(!l.length)break;(e[I+1&3]||e[I+2&3]||e[I+3&3])&&(A=e,u=I)}for(;l.data!==t;)if(n=l,!(l=l.next))return this;return(r=l.next)&&delete l.next,n?(r?n.next=r:delete n.next,this):e?(r?e[I]=r:delete e[I],(l=e[0]||e[1]||e[2]||e[3])&&l===(e[3]||e[2]||e[1]||e[0])&&!l.length&&(A?A[u]=l:this._root=l),this):(this._root=r,this)},c.removeAll=function(t){for(var e=0,A=t.length;e<A;++e)this.remove(t[e]);return this},c.root=function(){return this._root},c.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},c.visit=function(t){var e,A,n,i,o,a,s=[],g=this._root;for(g&&s.push(new r(g,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(g=e.node,n=e.x0,i=e.y0,o=e.x1,a=e.y1)&&g.length){var c=(n+o)/2,I=(i+a)/2;(A=g[3])&&s.push(new r(A,c,I,o,a)),(A=g[2])&&s.push(new r(A,n,I,c,a)),(A=g[1])&&s.push(new r(A,c,i,o,I)),(A=g[0])&&s.push(new r(A,n,i,c,I))}return this},c.visitAfter=function(t){var e,A=[],n=[];for(this._root&&A.push(new r(this._root,this._x0,this._y0,this._x1,this._y1));e=A.pop();){var i=e.node;if(i.length){var o,a=e.x0,s=e.y0,g=e.x1,c=e.y1,I=(a+g)/2,u=(s+c)/2;(o=i[0])&&A.push(new r(o,a,s,I,u)),(o=i[1])&&A.push(new r(o,I,s,g,u)),(o=i[2])&&A.push(new r(o,a,u,I,c)),(o=i[3])&&A.push(new r(o,I,u,g,c))}n.push(e)}for(;e=n.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},c.x=function(t){return arguments.length?(this._x=t,this):this._x},c.y=function(t){return arguments.length?(this._y=t,this):this._y}},,,,,,,,,,,,function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(838),r=A(839),i=A(776),o=A(775),a=A(153),s=A(202),g=A(85),c=A(840);function I(t,e){var A=a.getCoords(e),n=a.getCoords(t),r=n[0],i=n[n.length-1],o=t.geometry.coordinates;return c(A[0],r)?o.unshift(A[1]):c(A[0],i)?o.push(A[1]):c(A[1],r)?o.unshift(A[0]):c(A[1],i)&&o.push(A[0]),t}e.default=function(t,e,A){if(void 0===A&&(A={}),A=A||{},!g.isObject(A))throw new Error("options is invalid");var u,l=A.tolerance||0,C=[],h=n.default(),B=r.default(t);return h.load(B),s.segmentEach(e,(function(t){var e=!1;s.featureEach(h.search(t),(function(A){if(!1===e){var n=a.getCoords(t).sort(),r=a.getCoords(A).sort();c(n,r)||(0===l?o.default(n[0],A)&&o.default(n[1],A):i.default(A,n[0]).properties.dist<=l&&i.default(A,n[1]).properties.dist<=l)?(e=!0,u=u?I(u,t):t):(0===l?o.default(r[0],t)&&o.default(r[1],t):i.default(t,r[0]).properties.dist<=l&&i.default(t,r[1]).properties.dist<=l)&&(u=u?I(u,A):A)}})),!1===e&&u&&(C.push(u),u=void 0)})),u&&C.push(u),g.featureCollection(C)}},function(t,e,A){"use strict";t.exports=r,t.exports.default=r;var n=A(991);function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function i(t,e,A){if(!A)return e.indexOf(t);for(var n=0;n<e.length;n++)if(A(t,e[n]))return n;return-1}function o(t,e){a(t,0,t.children.length,e,t)}function a(t,e,A,n,r){r||(r=B(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var i,o=e;o<A;o++)i=t.children[o],s(r,t.leaf?n(i):i);return r}function s(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function g(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function I(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function l(t,e){var A=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),i=Math.min(t.maxY,e.maxY);return Math.max(0,r-A)*Math.max(0,i-n)}function C(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function h(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function B(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(t,e,A,r,i){for(var o,a=[e,A];a.length;)(A=a.pop())-(e=a.pop())<=r||(o=e+Math.ceil((A-e)/r/2)*r,n(t,o,e,A,i),a.push(e,o,o,A))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,A=[],n=this.toBBox;if(!h(t,e))return A;for(var r,i,o,a,s=[];e;){for(r=0,i=e.children.length;r<i;r++)o=e.children[r],h(t,a=e.leaf?n(o):o)&&(e.leaf?A.push(o):C(t,a)?this._all(o,A):s.push(o));e=s.pop()}return A},collides:function(t){var e=this.data,A=this.toBBox;if(!h(t,e))return!1;for(var n,r,i,o,a=[];e;){for(n=0,r=e.children.length;n<r;n++)if(i=e.children[n],h(t,o=e.leaf?A(i):i)){if(e.leaf||C(t,o))return!0;a.push(i)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,A=t.length;e<A;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=B([]),this},remove:function(t,e){if(!t)return this;for(var A,n,r,o,a=this.data,s=this.toBBox(t),g=[],c=[];a||g.length;){if(a||(a=g.pop(),n=g[g.length-1],A=c.pop(),o=!0),a.leaf&&-1!==(r=i(t,a.children,e)))return a.children.splice(r,1),g.push(a),this._condense(g),this;o||a.leaf||!C(a,s)?n?(A++,a=n.children[A],o=!1):a=null:(g.push(a),c.push(A),A=0,n=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:g,compareMinY:c,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var A=[];t;)t.leaf?e.push.apply(e,t.children):A.push.apply(A,t.children),t=A.pop();return e},_build:function(t,e,A,n){var r,i=A-e+1,a=this._maxEntries;if(i<=a)return o(r=B(t.slice(e,A+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(i)/Math.log(a)),a=Math.ceil(i/Math.pow(a,n-1))),(r=B([])).leaf=!1,r.height=n;var s,g,c,I,u=Math.ceil(i/a),l=u*Math.ceil(Math.sqrt(a));for(f(t,e,A,l,this.compareMinX),s=e;s<=A;s+=l)for(f(t,s,c=Math.min(s+l-1,A),u,this.compareMinY),g=s;g<=c;g+=u)I=Math.min(g+u-1,c),r.children.push(this._build(t,g,I,n-1));return o(r,this.toBBox),r},_chooseSubtree:function(t,e,A,n){for(var r,i,o,a,s,g,c,u,l,C;n.push(e),!e.leaf&&n.length-1!==A;){for(c=u=1/0,r=0,i=e.children.length;r<i;r++)s=I(o=e.children[r]),l=t,C=o,(g=(Math.max(C.maxX,l.maxX)-Math.min(C.minX,l.minX))*(Math.max(C.maxY,l.maxY)-Math.min(C.minY,l.minY))-s)<u?(u=g,c=s<c?s:c,a=o):g===u&&s<c&&(c=s,a=o);e=a||e.children[0]}return e},_insert:function(t,e,A){var n=this.toBBox,r=A?t:n(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),s(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},_split:function(t,e){var A=t[e],n=A.children.length,r=this._minEntries;this._chooseSplitAxis(A,r,n);var i=this._chooseSplitIndex(A,r,n),a=B(A.children.splice(i,A.children.length-i));a.height=A.height,a.leaf=A.leaf,o(A,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(A,a)},_splitRoot:function(t,e){this.data=B([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,A){var n,r,i,o,s,g,c,u;for(g=c=1/0,n=e;n<=A-e;n++)o=l(r=a(t,0,n,this.toBBox),i=a(t,n,A,this.toBBox)),s=I(r)+I(i),o<g?(g=o,u=n,c=s<c?s:c):o===g&&s<c&&(c=s,u=n);return u},_chooseSplitAxis:function(t,e,A){var n=t.leaf?this.compareMinX:g,r=t.leaf?this.compareMinY:c;this._allDistMargin(t,e,A,n)<this._allDistMargin(t,e,A,r)&&t.children.sort(n)},_allDistMargin:function(t,e,A,n){t.children.sort(n);var r,i,o=this.toBBox,g=a(t,0,e,o),c=a(t,A-e,A,o),I=u(g)+u(c);for(r=e;r<A-e;r++)i=t.children[r],s(g,t.leaf?o(i):i),I+=u(g);for(r=A-e-1;r>=e;r--)i=t.children[r],s(c,t.leaf?o(i):i),I+=u(c);return I},_adjustParentBBoxes:function(t,e,A){for(var n=A;n>=0;n--)s(e[n],t)},_condense:function(t){for(var e,A=t.length-1;A>=0;A--)0===t[A].children.length?A>0?(e=t[A-1].children).splice(e.indexOf(t[A]),1):this.clear():o(t[A],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},function(t,e,A){t.exports=function(){"use strict";function t(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function e(t,e){return t<e?-1:t>e?1:0}return function(A,n,r,i,o){!function e(A,n,r,i,o){for(;i>r;){if(i-r>600){var a=i-r+1,s=n-r+1,g=Math.log(a),c=.5*Math.exp(2*g/3),I=.5*Math.sqrt(g*c*(a-c)/a)*(s-a/2<0?-1:1),u=Math.max(r,Math.floor(n-s*c/a+I)),l=Math.min(i,Math.floor(n+(a-s)*c/a+I));e(A,n,u,l,o)}var C=A[n],h=r,B=i;for(t(A,r,n),o(A[i],C)>0&&t(A,r,i);h<B;){for(t(A,h,B),h++,B--;o(A[h],C)<0;)h++;for(;o(A[B],C)>0;)B--}0===o(A[r],C)?t(A,r,B):(B++,t(A,B,i)),B<=n&&(r=B+1),n<=B&&(i=B-1)}}(A,n,r||0,i||A.length-1,o||e)}}()},function(t,e,A){"use strict";var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=A(842),a=Object.prototype.propertyIsEnumerable,s=!a.call({toString:null},"toString"),g=a.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],I=function(t){var e=t.constructor;return e&&e.prototype===t},u={$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},l=function(){if("undefined"===typeof window)return!1;for(var t in window)try{if(!u["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"===typeof window[t])try{I(window[t])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(t){var e=null!==t&&"object"===typeof t,A="[object Function]"===i.call(t),n=o(t),a=e&&"[object String]"===i.call(t),u=[];if(!e&&!A&&!n)throw new TypeError("Object.keys called on a non-object");var C=g&&A;if(a&&t.length>0&&!r.call(t,0))for(var h=0;h<t.length;++h)u.push(String(h));if(n&&t.length>0)for(var B=0;B<t.length;++B)u.push(String(B));else for(var f in t)C&&"prototype"===f||!r.call(t,f)||u.push(String(f));if(s)for(var d=function(t){if("undefined"===typeof window||!l)return I(t);try{return I(t)}catch(e){return!1}}(t),Q=0;Q<c.length;++Q)d&&"constructor"===c[Q]||!r.call(t,c[Q])||u.push(c[Q]);return u}}t.exports=n},function(t,e,A){"use strict";var n="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,r=Object.prototype.toString,i=function(t){return!(n&&t&&"object"===typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===r.call(t)},o=function(t){return!!i(t)||null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Array]"!==r.call(t)&&"[object Function]"===r.call(t.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=o,t.exports=a?i:o},function(t,e,A){"use strict";var n=function(t){return t!==t};t.exports=function(t,e){return 0===t&&0===e?1/t===1/e:t===e||!(!n(t)||!n(e))}},function(t,e,A){"use strict";var n=A(996),r=RegExp.prototype.exec,i=Object.getOwnPropertyDescriptor,o=Object.prototype.toString,a="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;t.exports=function(t){if(!t||"object"!==typeof t)return!1;if(!a)return"[object RegExp]"===o.call(t);var e=i(t,"lastIndex");return!(!e||!n(e,"value"))&&function(t){try{var e=t.lastIndex;return t.lastIndex=0,r.call(t),!0}catch(A){return!1}finally{t.lastIndex=e}}(t)}},function(t,e,A){"use strict";var n=A(777);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},function(t,e,A){"use strict";var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(t){var e=this;if("function"!==typeof e||"[object Function]"!==i.call(e))throw new TypeError(n+e);for(var A,o=r.call(arguments,1),a=function(){if(this instanceof A){var n=e.apply(this,o.concat(r.call(arguments)));return Object(n)===n?n:this}return e.apply(t,o.concat(r.call(arguments)))},s=Math.max(0,e.length-o.length),g=[],c=0;c<s;c++)g.push("$"+c);if(A=Function("binder","return function ("+g.join(",")+"){ return binder.apply(this,arguments); }")(a),e.prototype){var I=function(){};I.prototype=e.prototype,A.prototype=new I,I.prototype=null}return A}},function(t,e,A){"use strict";var n=A(778),r=A(999),i=A(843),o=A(844),a=A(1003),s=r(i);n(s,{getPolyfill:o,implementation:i,shim:a}),t.exports=s},function(t,e,A){"use strict";var n=A(777),r=A(1e3)("%Function%"),i=r.apply,o=r.call;t.exports=function(){return n.apply(o,arguments)},t.exports.apply=function(){return n.apply(i,arguments)}},function(t,e,A){"use strict";var n=TypeError,r=Object.getOwnPropertyDescriptor;if(r)try{r({},"")}catch(f){r=null}var i=function(){throw new n},o=r?function(){try{return arguments.callee,i}catch(t){try{return r(arguments,"callee").get}catch(e){return i}}}():i,a=A(1001)(),s=Object.getPrototypeOf||function(t){return t.__proto__},g=void 0,c="undefined"===typeof Uint8Array?void 0:s(Uint8Array),I={"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":a?s([][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%":g&&a&&Symbol.asyncIterator?g[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%":a?s(s([][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&&a?s((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&&a?s((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%":a?s(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":a?Symbol:void 0,"%SymbolPrototype%":a?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":o,"%TypedArray%":c,"%TypedArrayPrototype%":c?c.prototype:void 0,"%TypeError%":n,"%TypeErrorPrototype%":n.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},u=A(777).call(Function.call,String.prototype.replace),l=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,h=function(t){var e=[];return u(t,l,(function(t,A,n,r){e[e.length]=n?u(r,C,"$1"):A||t})),e},B=function(t,e){if(!(t in I))throw new SyntaxError("intrinsic "+t+" does not exist!");if("undefined"===typeof I[t]&&!e)throw new n("intrinsic "+t+" exists, but is not available. Please file an issue!");return I[t]};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new TypeError('"allowMissing" argument must be a boolean');for(var A=h(t),i=B("%"+(A.length>0?A[0]:"")+"%",e),o=1;o<A.length;o+=1)if(null!=i)if(r&&o+1>=A.length){var a=r(i,A[o]);if(!e&&!(A[o]in i))throw new n("base intrinsic for "+t+" exists, but the property is not available.");i=a?a.get||a.value:i[A[o]]}else i=i[A[o]];return i}},function(t,e,A){"use strict";(function(e){var n=e.Symbol,r=A(1002);t.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&r())))}}).call(this,A(58))},function(t,e,A){"use strict";t.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),A=Object(e);if("string"===typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(A))return!1;for(e in t[e]=42,t)return!1;if("function"===typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(t,e);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},function(t,e,A){"use strict";var n=A(778).supportsDescriptors,r=A(844),i=Object.getOwnPropertyDescriptor,o=Object.defineProperty,a=TypeError,s=Object.getPrototypeOf,g=/a/;t.exports=function(){if(!n||!s)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=r(),e=s(g),A=i(e,"flags");return A&&A.get===t||o(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},function(t,e,A){"use strict";var n=Date.prototype.getDay,r=Object.prototype.toString,i="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;t.exports=function(t){return"object"===typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(e){return!1}}(t):"[object Date]"===r.call(t))}},function(t,e,A){var n=A(840),r=function(t){this.precision=t&&t.precision?t.precision:17,this.direction=!(!t||!t.direction)&&t.direction,this.pseudoNode=!(!t||!t.pseudoNode)&&t.pseudoNode,this.objectComparator=t&&t.objectComparator?t.objectComparator:a};function i(t){return t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e}}))}function o(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function a(t,e){return n(t,e,{strict:!0})}r.prototype.compare=function(t,e){if(t.type!==e.type||!o(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates,0,!1);case"Polygon":return this.comparePolygon(t,e);case"Feature":return this.compareFeature(t,e);default:if(0===t.type.indexOf("Multi")){var A=this,n=i(t),r=i(e);return n.every((function(t){return this.some((function(e){return A.compare(t,e)}))}),r)}}return!1},r.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var A=0;A<t.length;A++)if(t[A].toFixed(this.precision)!==e[A].toFixed(this.precision))return!1;return!0},r.prototype.compareLine=function(t,e,A,n){if(!o(t,e))return!1;var r=this.pseudoNode?t:this.removePseudo(t),i=this.pseudoNode?e:this.removePseudo(e);if(!n||this.compareCoord(r[0],i[0])||(i=this.fixStartIndex(i,r))){var a=this.compareCoord(r[A],i[A]);return this.direction||a?this.comparePath(r,i):!!this.compareCoord(r[A],i[i.length-(1+A)])&&this.comparePath(r.slice().reverse(),i)}},r.prototype.fixStartIndex=function(t,e){for(var A,n=-1,r=0;r<t.length;r++)if(this.compareCoord(t[r],e[0])){n=r;break}return n>=0&&(A=[].concat(t.slice(n,t.length),t.slice(1,n+1))),A},r.prototype.comparePath=function(t,e){var A=this;return t.every((function(t,e){return A.compareCoord(t,this[e])}),e)},r.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var A=t.coordinates.slice(1,t.coordinates.length),n=e.coordinates.slice(1,e.coordinates.length),r=this;return A.every((function(t){return this.some((function(e){return r.compareLine(t,e,1,!0)}))}),n)}return!1},r.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},r.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},r.prototype.removePseudo=function(t){return t},t.exports=r},function(t,e,A){"use strict";A.r(e);var n=A(504),r=A(505),i=A.n(r),o=A(85),a=A(153),s=A(202);function g(t){switch(t.type){case"Polygon":return i()(t)>1?t:null;case"MultiPolygon":var e=[];if(Object(s.flattenEach)(t,(function(t){i()(t)>1&&e.push(t.geometry.coordinates)})),e.length)return{type:"MultiPolygon",coordinates:e}}}e.default=function(t,e){var A=Object(a.getGeom)(t),r=Object(a.getGeom)(e),i=t.properties||{};if(A=g(A),r=g(r),!A)return null;if(!r)return Object(o.feature)(A,i);var s=n.diff(A.coordinates,r.coordinates);return 0===s.length?null:1===s.length?Object(o.polygon)(s[0],i):Object(o.multiPolygon)(s,i)}},function(t,e,A){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(){function t(e,A){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n(this,t),i(this,"geoJson",void 0),i(this,"style",void 0),i(this,"original",void 0),i(this,"metadata",void 0),this.geoJson=e,this.style=A,this.original=r,this.metadata=o}var e,A,o;return e=t,(A=[{key:"getCoords",value:function(){return this.geoJson.geometry.coordinates}}])&&r(e.prototype,A),o&&r(e,o),t}();e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(779),r=a(A(558)),i=A(601),o=a(A(789));function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?I(t):e}function I(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var h=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(h,t);var e,A,r,a,s=(e=h,function(){var t,A=l(e);if(u()){var n=l(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return c(this,t)});function h(t){var e,A,n,r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),e=s.call(this,t),A=I(e),r=void 0,(n="deckCache")in A?Object.defineProperty(A,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):A[n]=r,e.deckCache=new o.default(t.getData,(function(e){return t.toNebulaFeature(e)})),e.enablePicking=!0,e}return A=h,(r=[{key:"render",value:function(t){t.nebula;var e=[0,0,0,255],A=this.deckCache,r=A.objects,o=A.updateTrigger;return new n.JunctionScatterplotLayer({id:"junctions-".concat(this.id),data:r,opacity:1,fp64:!1,pickable:!0,getPosition:function(t){return t.geoJson.geometry.coordinates},getFillColor:function(t){return(0,i.toDeckColor)(t.style.fillColor)||e},getStrokeColor:function(t){return(0,i.toDeckColor)(t.style.outlineColor)||(0,i.toDeckColor)(t.style.fillColor)||e},getRadius:function(t){return t.style.pointRadiusMeters+t.style.outlineRadiusMeters||1},getInnerRadius:function(t){return t.style.pointRadiusMeters||.5},parameters:{depthTest:!1,blend:!1},updateTriggers:{all:o},nebulaLayer:this})}}])&&g(A.prototype,r),a&&g(A,a),h}(r.default);e.default=h},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_ARROWS=e.DEFAULT_ARROWS=e.ArrowStyles=void 0;e.ArrowStyles={NONE:0,FORWARD:1,BACKWARD:2,BOTH:3};e.DEFAULT_ARROWS=1;e.MAX_ARROWS=3},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(504),r=A(153),i=A(85);e.default=function(t,e,A){void 0===A&&(A={});var o=r.getGeom(t).coordinates,a=r.getGeom(e).coordinates,s=n.union(o,a);return 0===s.length?null:1===s.length?i.polygon(s[0],A.properties):i.multiPolygon(s,A.properties)}},function(t,e,A){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var r=A(85),i=A(153),o=n(A(504));e.default=function t(e,A,n){void 0===n&&(n={});var a=i.getGeom(e),s=i.getGeom(A);if("Polygon"===a.type&&"Polygon"===s.type){var g=o.intersection(a.coordinates,s.coordinates);if(null===g||0===g.length)return null;if(1===g.length){var c=g[0][0][0],I=g[0][0][g[0][0].length-1];return c[0]===I[0]&&c[1]===I[1]?r.polygon(g[0],n.properties):null}return r.multiPolygon(g,n.properties)}if("MultiPolygon"===a.type){for(var u=[],l=0,C=a.coordinates;l<C.length;l++){var h=C[l],B=t(i.getGeom(r.polygon(h)),s);if(B){var f=i.getGeom(B);if("Polygon"===f.type)u.push(f.coordinates);else{if("MultiPolygon"!==f.type)throw new Error("intersection is invalid");u=u.concat(f.coordinates)}}}return 0===u.length?null:1===u.length?r.polygon(u[0],n.properties):r.multiPolygon(u,n.properties)}if("MultiPolygon"===s.type)return t(s,a);throw new Error("poly1 and poly2 must be either polygons or multiPolygons")}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(85),r=A(153);e.default=function(t,e,A){void 0===A&&(A={});var i=r.getCoord(t),o=r.getCoord(e);o[0]+=o[0]-i[0]>180?-360:i[0]-o[0]>180?360:0;var a=function(t,e,A){var r=A=void 0===A?n.earthRadius:Number(A),i=t[1]*Math.PI/180,o=e[1]*Math.PI/180,a=o-i,s=Math.abs(e[0]-t[0])*Math.PI/180;s>Math.PI&&(s-=2*Math.PI);var g=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),c=Math.abs(g)>1e-11?a/g:Math.cos(i);return Math.sqrt(a*a+c*c*s*s)*r}(i,o);return n.convertLength(a,"meters",A.units)}},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,A){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function a(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(){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(t){return!1}}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.DuplicateMode=void 0;var I=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(l,t);var e,A,n,I,u=(e=l,function(){var t,A=g(e);if(s()){var n=g(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return a(this,t)});function l(){return r(this,l),u.apply(this,arguments)}return A=l,(n=[{key:"handleStartDragging",value:function(t,e){o(g(l.prototype),"handleStartDragging",this).call(this,t,e),this._geometryBeforeTranslate&&e.onEdit(this.getAddManyFeaturesAction(this._geometryBeforeTranslate,e.data))}},{key:"updateCursor",value:function(t){this._isTranslatable?t.onUpdateCursor("copy"):t.onUpdateCursor(null)}}])&&i(A.prototype,n),I&&i(A,I),l}(A(782).TranslateMode);e.DuplicateMode=I},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendLineStringMode=void 0;var n=A(172),r=A(359);function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&I(t,e)}(l,t);var e,A,n,i,u=(e=l,function(){var t,A=c(e);if(g()){var n=c(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return s(this,t)});function l(){return o(this,l),u.apply(this,arguments)}return A=l,(n=[{key:"getSingleSelectedLineString",value:function(t){var e=this.getSelectedGeometry(t);return e&&"LineString"===e.type?e:null}},{key:"handleClick",value:function(t,e){var A=e.selectedIndexes,n=this.getSingleSelectedLineString(e);if(n){var i=[n.coordinates.length],o=e.modeConfig;o&&o.drawAtFront&&(i=[0]);var a=A[0],s=new r.ImmutableFeatureCollection(e.data).addPosition(a,i,t.mapCoords).getObject();e.onEdit({updatedData:s,editType:"addPosition",editContext:{featureIndexes:[a],positionIndexes:i,position:t.mapCoords}})}else console.warn("ExtendLineStringMode only supported for single LineString selection")}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},A=this.getSingleSelectedLineString(t);if(!A)return e;var n=t.lastPointerMoveEvent&&t.lastPointerMoveEvent.mapCoords,r=null,i=t.modeConfig;return r=i&&i.drawAtFront?A.coordinates[0]:A.coordinates[A.coordinates.length-1],e.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[r,n]}}),e}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}}])&&a(A.prototype,n),i&&a(A,i),l}(n.GeoJsonEditMode);e.ExtendLineStringMode=u},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitPolygonMode=void 0;var n=B(A(563)),r=B(A(848)),i=B(A(793)),o=B(A(599)),a=A(85),s=B(A(294)),g=B(A(258)),c=B(A(497)),I=B(A(783)),u=B(A(776)),l=A(245),C=A(172),h=A(359);function B(t){return t&&t.__esModule?t:{default:t}}function f(t){return(f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||E(t)||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 Q(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||E(t,e)||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,e){if(t){if("string"===typeof t)return p(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e){return!e||"object"!==f(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):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(t){return!1}}function F(t){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function w(t,e){return(w=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var S=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&w(t,e)}(E,t);var e,A,C,B,f=(e=E,function(){var t,A=F(e);if(b()){var n=F(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return m(this,t)});function E(){return y(this,E),f.apply(this,arguments)}return A=E,(C=[{key:"calculateMapCoords",value:function(t,e,A){var n=A.modeConfig;if(!n||!n.lock90Degree||!t.length)return e;if(1===t.length){var r=t[0],i=this.getSelectedGeometry(A),o=(0,I.default)(i),C="FeatureCollection"===o.type?o.features:[o],h=Number.MAX_SAFE_INTEGER,B=null;if(C.forEach((function(t){var e=(0,u.default)(t,r),A=(0,g.default)(e,r);h>A&&(h=A,B=e)})),B){var f=(0,s.default)(r,B),d=(0,g.default)(r,e,{units:"meters"});return(0,c.default)(r,d,f,{units:"meters"}).geometry.coordinates}return e}var E=t[t.length-1],p=Q((0,l.generatePointsParallelToLinePoints)(t[t.length-2],E,e),1)[0];return(0,u.default)((0,a.lineString)([E,p]),e).geometry.coordinates}},{key:"getGuides",value:function(t){var e=this.getClickSequence(),A={type:"FeatureCollection",features:[]};if(0===e.length||!t.lastPointerMoveEvent)return A;var n=t.lastPointerMoveEvent.mapCoords;return A.features.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(d(e),[this.calculateMapCoords(e,n,t)])}}),A}},{key:"handleClick",value:function(t,e){var A=this.getTentativeGuide(e),r=this.getSelectedGeometry(e);if(r){var i=this.getClickSequence();A&&"LineString"===A.geometry.type?i.push(A.geometry.coordinates[A.geometry.coordinates.length-1]):this.addClickSequence(t);var a={type:"Point",coordinates:i[i.length-1]},s=(0,n.default)(a,r);if(i.length>1&&A&&!s){if(this.resetClickSequence(),0===(0,o.default)(A,r).features.length)return;var g=this.splitPolygon(A,e);g&&e.onEdit(g)}}else console.warn("A polygon must be selected for splitting")}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"splitPolygon",value:function(t,e){var A=this.getSelectedGeometry(e),n=e.selectedIndexes[0],o=e.modeConfig||{},a=o.gap,s=void 0===a?.1:a,g=o.units,c=void 0===g?"centimeters":g;0===s&&(s=.1,c="centimeters");var I=(0,i.default)(t,s,{units:c}),u=(0,r.default)(A,I);if(!u)return console.warn("Canceling edit. Split Polygon erased"),null;var l=u.geometry,C=l.type,B=l.coordinates,f=[];return f="Polygon"===C?B.map((function(t){return[t]})):B.reduce((function(t,e){return e.forEach((function(e){t.push([e])})),t}),[]),{updatedData:new h.ImmutableFeatureCollection(e.data).replaceGeometry(n,{type:"MultiPolygon",coordinates:f}).getObject(),editType:"split",editContext:{featureIndexes:[n]}}}}])&&v(A.prototype,C),B&&v(A,B),E}(C.GeoJsonEditMode);e.SplitPolygonMode=S},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtrudeMode=void 0;var n,r=(n=A(294))&&n.__esModule?n:{default:n},i=A(245),o=A(781),a=A(359);function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||I(t)||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(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||I(t,e)||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(t,e){if(t){if("string"===typeof t)return u(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?B(t):e}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Q(t,e){return(Q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function E(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var p=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Q(t,e)}(I,t);var e,A,n,o,s=(e=I,function(){var t,A=d(e);if(f()){var n=d(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return h(this,t)});function I(){var t;l(this,I);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return E(B(t=s.call.apply(s,[this].concat(A))),"isPointAdded",!1),t}return A=I,(n=[{key:"handleDragging",value:function(t,e){var A=(0,i.getPickedEditHandle)(t.pointerDownPicks);if(A){var n=A.properties.featureIndex,r=A.properties.positionIndexes,o=this.coordinatesSize(r,n,e.data);r=this.isPointAdded?this.nextPositionIndexes(r,o):r;var s=this.getPointForPositionIndexes(this.prevPositionIndexes(r,o),n,e.data),g=this.getPointForPositionIndexes(r,n,e.data);if(s&&g){var I=c((0,i.generatePointsParallelToLinePoints)(s,g,t.mapCoords),2),u=I[0],l=I[1],C=new a.ImmutableFeatureCollection(e.data).replacePosition(n,this.prevPositionIndexes(r,o),l).replacePosition(n,r,u).getObject();e.onEdit({updatedData:C,editType:"extruding",editContext:{featureIndexes:[n],positionIndexes:this.nextPositionIndexes(r,o),position:u}}),t.cancelPan()}}}},{key:"handleStartDragging",value:function(t,e){var A=e.selectedIndexes,n=(0,i.getPickedIntermediateEditHandle)(t.picks);if(A.length&&n){var r=n.properties,o=r.positionIndexes,s=r.featureIndex,g=this.coordinatesSize(o,s,e.data),c=this.getPointForPositionIndexes(this.prevPositionIndexes(o,g),s,e.data),I=this.getPointForPositionIndexes(o,s,e.data);if(c&&I){var u=new a.ImmutableFeatureCollection(e.data);this.isOrthogonal(o,s,g,e.data)||(u=u.addPosition(s,o,I)),this.isOrthogonal(this.prevPositionIndexes(o,g),s,g,e.data)||(u=u.addPosition(s,o,c),this.isPointAdded=!0),e.onEdit({updatedData:u.getObject(),editType:"startExtruding",editContext:{featureIndexes:[s],positionIndexes:o,position:c}})}}}},{key:"handleStopDragging",value:function(t,e){var A=e.selectedIndexes,n=(0,i.getPickedEditHandle)(t.pointerDownPicks);if(A.length&&n){var r=n.properties.featureIndex,o=n.properties.positionIndexes,s=this.coordinatesSize(o,r,e.data);o=this.isPointAdded?this.nextPositionIndexes(o,s):o;var g=this.getPointForPositionIndexes(this.prevPositionIndexes(o,s),r,e.data),I=this.getPointForPositionIndexes(o,r,e.data);if(g&&I){var u=c((0,i.generatePointsParallelToLinePoints)(g,I,t.mapCoords),2),l=u[0],C=u[1],h=new a.ImmutableFeatureCollection(e.data).replacePosition(r,this.prevPositionIndexes(o,s),C).replacePosition(r,o,l).getObject();e.onEdit({updatedData:h,editType:"extruded",editContext:{featureIndexes:[r],positionIndexes:o,position:l}})}}this.isPointAdded=!1}},{key:"coordinatesSize",value:function(t,e,A){var n=A.features,r=0;if(Array.isArray(t)){var i=n[e].geometry.coordinates;if(3===t.length){var o=c(t,2),a=o[0],s=o[1];i.length&&i[a].length&&(r=i[a][s].length)}else{var g=c(t,1)[0];i.length&&i[g].length&&(r=i[g].length)}}return r}},{key:"getBearing",value:function(t,e){var A=(0,r.default)(t,e);return A<0?Math.floor(360+A):Math.floor(A)}},{key:"isOrthogonal",value:function(t,e,A,n){if(!Array.isArray(t))return!1;t[t.length-1]===A-1&&(t[t.length-1]=0);var r=this.getPointForPositionIndexes(this.prevPositionIndexes(t,A),e,n),i=this.getPointForPositionIndexes(this.nextPositionIndexes(t,A),e,n),o=this.getPointForPositionIndexes(t,e,n),a=this.getBearing(o,r),s=this.getBearing(o,i);return[89,90,91,269,270,271].includes(Math.abs(a-s))}},{key:"nextPositionIndexes",value:function(t,e){if(!Array.isArray(t))return[];var A=g(t);return A.length&&(A[A.length-1]=A[A.length-1]===e-1?0:A[A.length-1]+1),A}},{key:"prevPositionIndexes",value:function(t,e){if(!Array.isArray(t))return[];var A=g(t);return A.length&&(A[A.length-1]=0===A[A.length-1]?e-2:A[A.length-1]-1),A}},{key:"getPointForPositionIndexes",value:function(t,e,A){var n,r=A.features;if(Array.isArray(t)){var i=r[e].geometry.coordinates;if(3===t.length){var o=c(t,3),a=o[0],s=o[1],g=o[2];i.length&&i[a].length&&(n=i[a][s][g])}else{var I=c(t,2),u=I[0],l=I[1];i.length&&i[u].length&&(n=i[u][l])}}return n}}])&&C(A.prototype,n),o&&C(A,o),I}(o.ModifyMode);e.ExtrudeMode=p},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElevationMode=void 0;var n=A(245);function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e,A){return(a="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function s(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=t.pointerDownScreenCoords,A=t.screenCoords;return 10*(e[1]-A[1])}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&I(t,e)}(h,t);var e,A,r,l,C=(e=h,function(){var t,A=c(e);if(g()){var n=c(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return s(this,t)});function h(){return i(this,h),C.apply(this,arguments)}return A=h,l=[{key:"calculateElevationChangeWithViewport",value:function(t,e){var A=e.pointerDownScreenCoords,n=e.screenCoords;return 156543.03392*Math.cos(t.latitude*Math.PI/180)/Math.pow(2,t.zoom)*(A[1]-n[1])/2}}],(r=[{key:"makeElevatedEvent",value:function(t,e,A){var n=A.modeConfig||{},r=n.minElevation,i=void 0===r?0:r,o=n.maxElevation,a=void 0===o?2e4:o,s=n.calculateElevationChange,g=void 0===s?u:s;if(!t.pointerDownScreenCoords)return t;var c=3===e.length?e[2]:0;return c+=g({pointerDownScreenCoords:t.pointerDownScreenCoords,screenCoords:t.screenCoords}),c=Math.min(c,a),c=Math.max(c,i),Object.assign({},t,{mapCoords:[e[0],e[1],c]})}},{key:"handlePointerMove",value:function(t,e){var A=(0,n.getPickedEditHandle)(t.pointerDownPicks),r=A?A.geometry.coordinates:t.mapCoords;a(c(h.prototype),"handlePointerMove",this).call(this,this.makeElevatedEvent(t,r,e),e)}},{key:"handleStopDragging",value:function(t,e){var A=(0,n.getPickedEditHandle)(t.picks),r=A?A.geometry.coordinates:t.mapCoords;a(c(h.prototype),"handleStopDragging",this).call(this,this.makeElevatedEvent(t,r,e),e)}},{key:"getCursor",value:function(t){var e=a(c(h.prototype),"getCursor",this).call(this,t);return"cell"===e&&(e="ns-resize"),e}}])&&o(A.prototype,r),l&&o(A,l),h}(A(781).ModifyMode);e.ElevationMode=l},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransformMode=void 0;var n=A(85),r=A(782),i=A(851),o=A(852);function a(t){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function g(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function c(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function I(t,e,A){return(I="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function u(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var B=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(d,t);var e,A,a,B,f=(e=d,function(){var t,A=C(e);if(l()){var n=C(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return u(this,t)});function d(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),f.call(this,[new r.TranslateMode,new i.ScaleMode,new o.RotateMode])}return A=d,(a=[{key:"handlePointerMove",value:function(t,e){var A=null;I(C(d.prototype),"handlePointerMove",this).call(this,t,function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?s(Object(A),!0).forEach((function(e){g(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):s(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},e,{onUpdateCursor:function(t){A=t||A}})),e.onUpdateCursor(A)}},{key:"handleStartDragging",value:function(t,e){var A=null,n=null,o=[];this._modes.forEach((function(t){t instanceof r.TranslateMode?n=t:(t instanceof i.ScaleMode&&(A=t),o.push(t))})),A instanceof i.ScaleMode&&!A.isEditHandleSelected()&&o.push(n),o.filter(Boolean).forEach((function(A){return A.handleStartDragging(t,e)}))}},{key:"getGuides",value:function(t){var e=I(C(d.prototype),"getGuides",this).call(this,t),A=(this._modes||[]).find((function(t){return t instanceof o.RotateMode}));if(A instanceof o.RotateMode){var r=e.features.filter((function(t){var e=t.properties||{},n=e.editHandleType,r=[e.mode];return A.getIsRotating()&&r.push(n),!r.includes("scale")}));e=(0,n.featureCollection)(r)}return e}}])&&c(A.prototype,a),B&&c(A,B),d}(A(853).CompositeMode);e.TransformMode=B},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,A){return(o="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function a(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(){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(t){return!1}}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPointMode=void 0;var I=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(l,t);var e,A,n,I,u=(e=l,function(){var t,A=g(e);if(s()){var n=g(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return a(this,t)});function l(){return r(this,l),u.apply(this,arguments)}return A=l,(n=[{key:"createTentativeFeature",value:function(t){var e=t.lastPointerMoveEvent;return{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Point",coordinates:(e?[e.mapCoords]:[])[0]}}}},{key:"handleClick",value:function(t,e){var A={type:"Point",coordinates:t.mapCoords};e.onEdit(this.getAddFeatureAction(A,e.data))}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),o(g(l.prototype),"handlePointerMove",this).call(this,t,e)}}])&&i(A.prototype,n),I&&i(A,I),l}(A(172).GeoJsonEditMode);e.DrawPointMode=I},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawLineStringMode=void 0;var n=A(245);function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return o(t,e)}(t)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):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(t){return!1}}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(C,t);var e,A,r,o,l=(e=C,function(){var t,A=I(e);if(c()){var n=I(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return g(this,t)});function C(){return a(this,C),l.apply(this,arguments)}return A=C,(r=[{key:"handleClick",value:function(t,e){var A=t.picks,r=(0,n.getPickedEditHandle)(A),o=!1;r||(this.addClickSequence(t),o=!0);var a=this.getClickSequence();if(a.length>1&&r&&Array.isArray(r.properties.positionIndexes)&&r.properties.positionIndexes[0]===a.length-1){var s={type:"LineString",coordinates:i(a)};this.resetClickSequence();var g=this.getAddFeatureAction(s,e.data);g&&e.onEdit(g)}else o&&e.onEdit({updatedData:e.data,editType:"addTentativePosition",editContext:{position:t.mapCoords}})}},{key:"handleKeyUp",value:function(t,e){if("Enter"===t.key){var A=this.getClickSequence();if(A.length>1){var n={type:"LineString",coordinates:i(A)};this.resetClickSequence();var r=this.getAddFeatureAction(n,e.data);r&&e.onEdit(r)}}}},{key:"getGuides",value:function(t){var e,A,n=t.lastPointerMoveEvent,r=this.getClickSequence(),o=n?[n.mapCoords]:[],a={type:"FeatureCollection",features:[]};r.length>0&&(A={type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(i(r),o)}}),A&&a.features.push(A);var s=r.map((function(t,e){return{type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[e]},geometry:{type:"Point",coordinates:t}}}));return(e=a.features).push.apply(e,i(s)),a}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}}])&&s(A.prototype,r),o&&s(A,o),C}(A(172).GeoJsonEditMode);e.DrawLineStringMode=l},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleMode=void 0;var n,r=(n=A(557))&&n.__esModule?n:{default:n};function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var u=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&I(t,e)}(l,t);var e,A,n,i,u=(e=l,function(){var t,A=c(e);if(g()){var n=c(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return s(this,t)});function l(){return o(this,l),u.apply(this,arguments)}return A=l,(n=[{key:"getTwoClickPolygon",value:function(t,e,A){var n=(0,r.default)([t[0],t[1],e[0],e[1]]);return n.properties=n.properties||{},n.properties.shape="Rectangle",n}}])&&a(A.prototype,n),i&&a(A,i),l}(A(600).TwoClickPolygonMode);e.DrawRectangleMode=u},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawCircleByDiameterMode=void 0;var n=o(A(854)),r=o(A(258)),i=A(172);function o(t){return t&&t.__esModule?t:{default:t}}function a(t){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var C=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(h,t);var e,A,o,a,C=(e=h,function(){var t,A=u(e);if(I()){var n=u(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return c(this,t)});function h(){return s(this,h),C.apply(this,arguments)}return A=h,(o=[{key:"getTwoClickPolygon",value:function(t,e,A){var o=(A||{}).steps,a=void 0===o?64:o,s={steps:a};a<4&&(console.warn("Minimum steps to draw a circle is 4 "),s.steps=4);var g=(0,i.getIntermediatePosition)(t,e),c=Math.max((0,r.default)(t,g),.001),I=(0,n.default)(g,c,s);return I.properties=I.properties||{},I.properties.shape="Circle",I}}])&&g(A.prototype,o),a&&g(A,a),h}(A(600).TwoClickPolygonMode);e.DrawCircleByDiameterMode=C},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawCircleFromCenterMode=void 0;var n=i(A(854)),r=i(A(258));function i(t){return t&&t.__esModule?t:{default:t}}function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):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(t){return!1}}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(C,t);var e,A,i,o,l=(e=C,function(){var t,A=I(e);if(c()){var n=I(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return g(this,t)});function C(){return a(this,C),l.apply(this,arguments)}return A=C,(i=[{key:"getTwoClickPolygon",value:function(t,e,A){var i=(A||{}).steps,o=void 0===i?64:i,a={steps:o};o<4&&(console.warn("Minimum steps to draw a circle is 4 "),a.steps=4);var s=Math.max((0,r.default)(t,e),.001),g=(0,n.default)(t,s,a);return g.properties=g.properties||{},g.properties.shape="Circle",g}}])&&s(A.prototype,i),o&&s(A,o),C}(A(600).TwoClickPolygonMode);e.DrawCircleFromCenterMode=l},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawEllipseByBoundingBoxMode=void 0;var n=s(A(557)),r=s(A(258)),i=s(A(867)),o=A(85),a=A(172);function s(t){return t&&t.__esModule?t:{default:t}}function g(t){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return!e||"object"!==g(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var B=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(f,t);var e,A,s,g,B=(e=f,function(){var t,A=C(e);if(l()){var n=C(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return u(this,t)});function f(){return c(this,f),B.apply(this,arguments)}return A=f,(s=[{key:"getTwoClickPolygon",value:function(t,e,A){var s=Math.min(t[0],e[0]),g=Math.min(t[1],e[1]),c=Math.max(t[0],e[0]),I=Math.max(t[1],e[1]),u=(0,n.default)([s,g,c,I]).geometry.coordinates[0],l=(0,a.getIntermediatePosition)(t,e),C=Math.max((0,r.default)((0,o.point)(u[0]),(0,o.point)(u[1])),.001),h=Math.max((0,r.default)((0,o.point)(u[0]),(0,o.point)(u[3])),.001);return(0,i.default)(l,C,h)}}])&&I(A.prototype,s),g&&I(A,g),f}(A(600).TwoClickPolygonMode);e.DrawEllipseByBoundingBoxMode=B},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawEllipseUsingThreePointsMode=void 0;var n=s(A(258)),r=s(A(867)),i=s(A(294)),o=A(85),a=A(172);function s(t){return t&&t.__esModule?t:{default:t}}function g(t){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return!e||"object"!==g(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var B=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(f,t);var e,A,s,g,B=(e=f,function(){var t,A=C(e);if(l()){var n=C(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return u(this,t)});function f(){return c(this,f),B.apply(this,arguments)}return A=f,(s=[{key:"getThreeClickPolygon",value:function(t,e,A,s){var g=(0,a.getIntermediatePosition)(t,e),c=Math.max((0,n.default)(g,(0,o.point)(A)),.001),I=Math.max((0,n.default)(t,e),.001)/2,u={angle:(0,i.default)(t,e)};return(0,r.default)(g,c,I,u)}}])&&I(A.prototype,s),g&&I(A,g),f}(A(855).ThreeClickPolygonMode);e.DrawEllipseUsingThreePointsMode=B},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawRectangleUsingThreePointsMode=void 0;var n=A(245);function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return o(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return o(t,e)}(t,e)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):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(t){return!1}}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(C,t);var e,A,r,o,l=(e=C,function(){var t,A=I(e);if(c()){var n=I(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return g(this,t)});function C(){return a(this,C),l.apply(this,arguments)}return A=C,(r=[{key:"getThreeClickPolygon",value:function(t,e,A,r){var o=i((0,n.generatePointsParallelToLinePoints)(t,e,A),2);return{type:"Feature",properties:{shape:"Rectangle"},geometry:{type:"Polygon",coordinates:[[t,e,o[0],o[1],t]]}}}}])&&s(A.prototype,r),o&&s(A,o),C}(A(855).ThreeClickPolygonMode);e.DrawRectangleUsingThreePointsMode=l},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Draw90DegreePolygonMode=void 0;var n=g(A(497)),r=g(A(294)),i=g(A(599)),o=g(A(258)),a=A(85),s=A(245);function g(t){return t&&t.__esModule?t:{default:t}}function c(t){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function I(t){return function(t){if(Array.isArray(t))return C(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||l(t)||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(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||l(t,e)||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(t,e){if(t){if("string"===typeof t)return C(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?C(t,e):void 0}}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,A){return(f="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function d(t,e){return!e||"object"!==c(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Q(){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(t){return!1}}function E(t){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var y=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(C,t);var e,A,g,c,l=(e=C,function(){var t,A=E(e);if(Q()){var n=E(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return d(this,t)});function C(){return h(this,C),l.apply(this,arguments)}return A=C,(g=[{key:"createTentativeFeature",value:function(t){var e,A=this.getClickSequence(),n=t.lastPointerMoveEvent.mapCoords;if(1===A.length)e=n;else{var r=A[A.length-2],i=A[A.length-1];e=u((0,s.generatePointsParallelToLinePoints)(r,i,n),1)[0]}return A.length<3?{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[].concat(I(A),[e])}}:{type:"Feature",properties:{guideType:"tentative"},geometry:{type:"Polygon",coordinates:[[].concat(I(A),[e,A[0]])]}}}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]};if(0===this.getClickSequence().length||!t.lastPointerMoveEvent)return e;var A=this.createTentativeFeature(t);return e.features.push(A),e.features=e.features.concat((0,s.getEditHandlesForGeometry)(A.geometry,-1)),e.features=e.features.slice(0,-1),e}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell"),f(E(C.prototype),"handlePointerMove",this).call(this,t,e)}},{key:"handleClick",value:function(t,e){var A=t.picks,n=this.getTentativeGuide(e);this.addClickSequence(t);var r=this.getClickSequence();if(n){if(3===r.length&&"LineString"===n.geometry.type){var i=n.geometry;r[r.length-1]=i.coordinates[i.coordinates.length-1]}else if(r.length>3&&"Polygon"===n.geometry.type){var o=n.geometry;r[r.length-1]=o.coordinates[0][o.coordinates[0].length-2];var a=(0,s.getPickedEditHandle)(A);if(a&&Array.isArray(a.properties.positionIndexes)&&(0===a.properties.positionIndexes[1]||a.properties.positionIndexes[1]===o.coordinates[0].length-3)){var g={type:"Polygon",coordinates:this.finalizedCoordinates(I(o.coordinates[0]))};this.resetClickSequence();var c=this.getAddFeatureOrBooleanPolygonAction(g,e);c&&e.onEdit(c)}}var u={screenCoords:[-1,-1],mapCoords:t.mapCoords,picks:[],pointerDownPicks:null,pointerDownScreenCoords:null,pointerDownMapCoords:null,cancelPan:function(){},sourceEvent:null};this.handlePointerMove(u,e)}}},{key:"finalizedCoordinates",value:function(t){var e=[[].concat(I(t.slice(0,-2)),[t[0]])],A=this.getIntermediatePoint(I(t));if(A)e=[[].concat(I(t.slice(0,-2)),[A,t[0]])];else{var n=I(t);n.splice(-3,1),(A=this.getIntermediatePoint(I(n)))&&(e=[[].concat(I(t.slice(0,-3)),[A,t[0]])])}return e}},{key:"getIntermediatePoint",value:function(t){var e;if(t.length>4){var A=I(t),s=A[0],g=A[1],c=(0,r.default)(s,g),u=t[t.length-3],l=t[t.length-4],C=(0,r.default)(u,l),h={first:[],second:[]};[1,2,3].forEach((function(t){var e=c+90*t;h.first.push(e>180?e-360:e);var A=C+90*t;h.second.push(A>180?A-360:A)}));var B=(0,o.default)((0,a.point)(s),(0,a.point)(u));[0,1,2].forEach((function(t){var A=(0,a.lineString)([s,(0,n.default)(s,B,h.first[t]).geometry.coordinates]);[0,1,2].forEach((function(t){var r=(0,a.lineString)([u,(0,n.default)(u,B,h.second[t]).geometry.coordinates]),o=(0,i.default)(A,r);o&&o.features.length&&(e=o.features[0].geometry.coordinates)}))}))}return e}}])&&B(A.prototype,g),c&&B(A,c),C}(A(172).GeoJsonEditMode);e.Draw90DegreePolygonMode=y},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawPolygonByDraggingMode=void 0;var n,r=(n=A(1029))&&n.__esModule?n:{default:n},i=A(245);function o(t){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return s(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return s(t,e)}(t)||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 s(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function I(t,e){return!e||"object"!==o(e)&&"function"!==typeof e?u(t):e}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function B(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(f,t);var e,A,n,o,s=(e=f,function(){var t,A=C(e);if(l()){var n=C(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return I(this,t)});function f(){var t;g(this,f);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return B(u(t=s.call.apply(s,[this].concat(A))),"handleDraggingThrottled",null),t}return A=f,(n=[{key:"handleClick",value:function(t,e){}},{key:"handleStartDragging",value:function(t,e){t.cancelPan(),e.modeConfig&&e.modeConfig.throttleMs?this.handleDraggingThrottled=(0,r.default)(this.handleDraggingAux,e.modeConfig.throttleMs):this.handleDraggingThrottled=this.handleDraggingAux}},{key:"handleStopDragging",value:function(t,e){this.addClickSequence(t);var A=this.getClickSequence();if(this.handleDraggingThrottled&&this.handleDraggingThrottled.cancel&&this.handleDraggingThrottled.cancel(),A.length>2){var n={type:"Polygon",coordinates:[[].concat(a(A),[A[0]])]};this.resetClickSequence();var r=this.getAddFeatureOrBooleanPolygonAction(n,e);r&&e.onEdit(r)}}},{key:"handleDraggingAux",value:function(t,e){var A=t.picks;(0,i.getPickedEditHandle)(A)||this.addClickSequence(t)}},{key:"handleDragging",value:function(t,e){this.handleDraggingThrottled&&this.handleDraggingThrottled(t,e)}}])&&c(A.prototype,n),o&&c(A,o),f}(A(784).DrawPolygonMode);e.DrawPolygonByDraggingMode=f},function(t,e,A){(function(e){var A=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,i=/^0o[0-7]+$/i,o=parseInt,a="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,g=a||s||Function("return this")(),c=Object.prototype.toString,I=Math.max,u=Math.min,l=function(){return g.Date.now()};function C(t,e,A){var n,r,i,o,a,s,g=0,c=!1,C=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var A=n,i=r;return n=r=void 0,g=e,o=t.apply(i,A)}function Q(t){return g=t,a=setTimeout(p,e),c?d(t):o}function E(t){var A=t-s;return void 0===s||A>=e||A<0||C&&t-g>=i}function p(){var t=l();if(E(t))return y(t);a=setTimeout(p,function(t){var A=e-(t-s);return C?u(A,i-(t-g)):A}(t))}function y(t){return a=void 0,f&&n?d(t):(n=r=void 0,o)}function v(){var t=l(),A=E(t);if(n=arguments,r=this,s=t,A){if(void 0===a)return Q(s);if(C)return a=setTimeout(p,e),d(s)}return void 0===a&&(a=setTimeout(p,e)),o}return e=B(e)||0,h(A)&&(c=!!A.leading,i=(C="maxWait"in A)?I(B(A.maxWait)||0,e):i,f="trailing"in A?!!A.trailing:f),v.cancel=function(){void 0!==a&&clearTimeout(a),g=0,n=s=r=a=void 0},v.flush=function(){return void 0===a?o:y(l())},v}function h(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function B(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==c.call(t)}(t))return NaN;if(h(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=h(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(A,"");var a=r.test(t);return a||i.test(t)?o(t.slice(2),a?2:8):n.test(t)?NaN:+t}t.exports=function(t,e,A){var n=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return h(A)&&(n="leading"in A?!!A.leading:n,r="trailing"in A?!!A.trailing:r),C(t,e,{leading:n,maxWait:e,trailing:r})}}).call(this,A(58))},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.ViewMode=void 0;var g=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(n,t);var e,A=(e=n,function(){var t,A=a(e);if(o()){var n=a(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return i(this,t)});function n(){return r(this,n),A.apply(this,arguments)}return n}(A(172).GeoJsonEditMode);e.ViewMode=g},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureDistanceMode=void 0;var n=o(A(258)),r=o(A(785)),i=A(172);function o(t){return t&&t.__esModule?t:{default:t}}function a(t){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?I(t):e}function I(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var B=[],f=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(f,t);var e,A,i,o,a=(e=f,function(){var t,A=l(e);if(u()){var n=l(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return c(this,t)});function f(){var t;s(this,f);for(var e=arguments.length,A=new Array(e),i=0;i<e;i++)A[i]=arguments[i];return h(I(t=a.call.apply(a,[this].concat(A))),"startingPoint",null),h(I(t),"endingPoint",null),h(I(t),"endingPointLocked",!1),h(I(t),"_getTooltips",(0,r.default)((function(t){var e=t.modeConfig,A=t.startingPoint,r=t.endingPoint,i=B;if(A&&r){var o,a=e||{},s=a.formatTooltip,g=a.turfOptions,c=a.measurementCallback,I=g&&g.units||"kilometers",u=(0,n.default)(A,r,g);o=s?s(u):"".concat(parseFloat(u).toFixed(2)," ").concat(I),c&&c(u),i=[{position:r.geometry.coordinates,text:o}]}return i}))),t}return A=f,(i=[{key:"_setEndingPoint",value:function(t){this.endingPoint={type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[]},geometry:{type:"Point",coordinates:t}}}},{key:"handleClick",value:function(t,e){!this.startingPoint||this.endingPointLocked?(this.startingPoint={type:"Feature",properties:{guideType:"editHandle",editHandleType:"existing",featureIndex:-1,positionIndexes:[]},geometry:{type:"Point",coordinates:t.mapCoords}},this.endingPoint=null,this.endingPointLocked=!1):this.startingPoint&&(this._setEndingPoint(t.mapCoords),this.endingPointLocked=!0)}},{key:"handlePointerMove",value:function(t,e){this.startingPoint&&!this.endingPointLocked&&this._setEndingPoint(t.mapCoords),e.onUpdateCursor("cell")}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},A=e.features;return this.startingPoint&&A.push(this.startingPoint),this.endingPoint&&A.push(this.endingPoint),this.startingPoint&&this.endingPoint&&A.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[this.startingPoint.geometry.coordinates,this.endingPoint.geometry.coordinates]}}),e}},{key:"getTooltips",value:function(t){return this._getTooltips({modeConfig:t.modeConfig,startingPoint:this.startingPoint,endingPoint:this.endingPoint})}}])&&g(A.prototype,i),o&&g(A,o),f}(i.GeoJsonEditMode);e.MeasureDistanceMode=f},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureAreaMode=void 0;var n=o(A(505)),r=o(A(435)),i=A(784);function o(t){return t&&t.__esModule?t:{default:t}}function a(t){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function g(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e,A){return(u="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function l(t,e){return!e||"object"!==a(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):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(t){return!1}}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t,e){return(B=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=[],d=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&B(t,e)}(d,t);var e,A,i,o,a=(e=d,function(){var t,A=h(e);if(C()){var n=h(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return l(this,t)});function d(){return c(this,d),a.apply(this,arguments)}return A=d,(i=[{key:"handleClick",value:function(t,e){var A=function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?s(Object(A),!0).forEach((function(e){g(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):s(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},e,{onEdit:function(){}});u(h(d.prototype),"handleClick",this).call(this,t,A)}},{key:"getTooltips",value:function(t){var e=this.getTentativeGuide(t);if(e&&"Polygon"===e.geometry.type){var A,i=t.modeConfig||{},o=i.formatTooltip,a=i.measurementCallback,s=(0,r.default)(e),g=(0,n.default)(e);return A=o?o(g):"".concat(parseFloat(g).toFixed(2)," ").concat("sq. m"),a&&a(g),[{position:s.geometry.coordinates,text:A}]}return f}}])&&I(A.prototype,i),o&&I(A,o),d}(i.DrawPolygonMode);e.MeasureAreaMode=d},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MeasureAngleMode=void 0;var n=a(A(294)),r=a(A(1034)),i=a(A(785)),o=A(172);function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return c(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return c(t,e)}(t)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?C(t):e}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var Q=[],E=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(c,t);var e,A,o,a,s=(e=c,function(){var t,A=B(e);if(h()){var n=B(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return l(this,t)});function c(){var t;I(this,c);for(var e=arguments.length,A=new Array(e),o=0;o<e;o++)A[o]=arguments[o];return d(C(t=s.call.apply(s,[this].concat(A))),"_getTooltips",(0,i.default)((function(t){var e=t.modeConfig,A=t.vertex,i=t.point1,o=t.point2,a=Q;if(A&&i&&o){var s,g=e||{},c=g.formatTooltip,I=g.measurementCallback,u=(0,n.default)(A,i),l=(0,n.default)(A,o),C=Math.abs(u-l);C>180&&(C=360-C),s=c?c(C):"".concat(parseFloat(C).toFixed(2)," ").concat("deg"),I&&I(C),a=[{position:(0,r.default)({type:"FeatureCollection",features:[i,o].map((function(t){return{type:"Feature",geometry:{type:"Point",coordinates:t}}}))}).geometry.coordinates,text:s}]}return a}))),t}return A=c,(o=[{key:"handleClick",value:function(t,e){this.getClickSequence().length>=3&&this.resetClickSequence(),this.addClickSequence(t)}},{key:"handlePointerMove",value:function(t,e){e.onUpdateCursor("cell")}},{key:"getPoints",value:function(t){var e=this.getClickSequence(),A=g(e);return e.length<3&&t.lastPointerMoveEvent&&A.push(t.lastPointerMoveEvent.mapCoords),A}},{key:"getGuides",value:function(t){var e={type:"FeatureCollection",features:[]},A=e.features,n=this.getPoints(t);return n.length>2?A.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[n[1],n[0],n[2]]}}):n.length>1&&A.push({type:"Feature",properties:{guideType:"tentative"},geometry:{type:"LineString",coordinates:[n[1],n[0]]}}),e}},{key:"getTooltips",value:function(t){var e=this.getPoints(t);return this._getTooltips({modeConfig:t.modeConfig,vertex:e[0],point1:e[1],point2:e[2]})}}])&&u(A.prototype,o),a&&u(A,a),c}(o.GeoJsonEditMode);e.MeasureAngleMode=E},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=A(431),r=A(85);e.default=function(t,e){void 0===e&&(e={});var A=n.default(t),i=(A[0]+A[2])/2,o=(A[1]+A[3])/2;return r.point([i,o],e.properties,e)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnappableMode=void 0;var n=A(245);function r(t){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||o(t)||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(t,e){if(t){if("string"===typeof t)return a(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function s(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function g(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return!e||"object"!==r(e)&&"function"!==typeof e?I(t):e}function I(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var B=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(f,t);var e,A,r,a,B=(e=f,function(){var t,A=l(e);if(u()){var n=l(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return c(this,t)});function f(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),h(I(e=B.call(this)),"_handler",void 0),e._handler=t,e}return A=f,(r=[{key:"_getSnappedMouseEvent",value:function(t,e,A){return Object.assign(t,{mapCoords:A.geometry.coordinates,pointerDownMapCoords:e&&e.geometry.coordinates})}},{key:"_getPickedSnapTarget",value:function(t){return(0,n.getPickedEditHandles)(t).find((function(t){return"snap-target"===t.properties.editHandleType}))}},{key:"_getPickedSnapSource",value:function(t){return(0,n.getPickedSnapSourceEditHandle)(t)}},{key:"_getUpdatedSnapSourceHandle",value:function(t,e){var A=t.properties,n=A.featureIndex,r=A.positionIndexes;if(!Array.isArray(r))return t;var i=e.features[n];return function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?s(Object(A),!0).forEach((function(e){h(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):s(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},t,{geometry:{type:"Point",coordinates:r.reduce((function(t,e){return t[e]}),i.geometry.coordinates)}})}},{key:"_getSnapTargets",value:function(t){var e=(t.modeConfig||{}).additionalSnapTargets;return e=e||[],[].concat(i(t.data.features),i(e))}},{key:"_getSnapTargetHandles",value:function(t){for(var e=[],A=this._getSnapTargets(t),r=0;r<A.length;r++)if(!t.selectedIndexes.includes(r)){var o=A[r].geometry;e.push.apply(e,i((0,n.getEditHandlesForGeometry)(o,r,"snap-target")))}return e}},{key:"getGuides",value:function(t){var e=t.modeConfig,A=t.lastPointerMoveEvent,r=(e||{}).enableSnapping,a={type:"FeatureCollection",features:i(this._handler.getGuides(t).features)};if(!r)return a;var s,g=A&&this._getPickedSnapSource(A.pointerDownPicks);if(g)return(s=a.features).push.apply(s,i(this._getSnapTargetHandles(t)).concat([this._getUpdatedSnapSourceHandle(g,t.data)])),a;var c,I=t.data.features,u=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=o(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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 n,r,i=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return i=t.done,t},e:function(t){a=!0,r=t},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw r}}}}(t.selectedIndexes);try{for(u.s();!(c=u.n()).done;){var l=c.value;if(l<I.length){var C,h=I[l].geometry;(C=a.features).push.apply(C,i((0,n.getEditHandlesForGeometry)(h,l,"snap-source")))}}}catch(B){u.e(B)}finally{u.f()}return a}},{key:"_getSnapAwareEvent",value:function(t,e){var A=this._getPickedSnapSource(e.lastPointerMoveEvent.pointerDownPicks),n=this._getPickedSnapTarget(t.picks);return A&&n?this._getSnappedMouseEvent(t,A,n):t}},{key:"handleStartDragging",value:function(t,e){this._handler.handleStartDragging(t,e)}},{key:"handleStopDragging",value:function(t,e){this._handler.handleStopDragging(this._getSnapAwareEvent(t,e),e)}},{key:"handleDragging",value:function(t,e){this._handler.handleDragging(this._getSnapAwareEvent(t,e),e)}},{key:"handlePointerMove",value:function(t,e){this._handler.handlePointerMove(this._getSnapAwareEvent(t,e),e)}}])&&g(A.prototype,r),a&&g(A,a),f}(A(172).GeoJsonEditMode);e.SnappableMode=B},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(749),r=A(409),i=A(248),o=s(A(780)),a=s(A(856));function s(t){return t&&t.__esModule?t:{default:t}}function g(t){return(g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return I(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return I(t,e)}(t)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function C(t,e,A){return(C="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,A){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(A):r.value}})(t,e,A||t)}function h(t,e){return!e||"object"!==g(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):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(t){return!1}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Q(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function E(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(A),!0).forEach((function(e){p(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Q(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function p(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var y=r.ViewMode,v={type:"FeatureCollection",features:[]},m=E({mode:y},o.default.defaultProps,{data:[],selectedIndexes:[],filled:!1,stroked:!0,lineWidthScale:1,lineWidthMinPixels:1,lineWidthMaxPixels:Number.MAX_SAFE_INTEGER,lineWidthUnits:"pixels",getHexagons:function(t){return t.hexIds},getEditedCluster:function(t,e){return e?E({},e,{hexIds:t}):{hexIds:t}},resolution:9}),b=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(g,t);var e,A,r,a,s=(e=g,function(){var t,A=f(e);if(B()){var n=f(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return h(this,t)});function g(){return u(this,g),s.apply(this,arguments)}return A=g,(r=[{key:"initializeState",value:function(){C(f(g.prototype),"initializeState",this).call(this),this.setState({tentativeHexagonIDs:[]})}},{key:"getDerivedHexagonIDs",value:function(t){return(0,i.polyfill)(t,this.props.resolution,!0)}},{key:"getDerivedHexagonID",value:function(t){return(0,i.geoToH3)(t[1],t[0],this.props.resolution)}},{key:"renderLayers",value:function(){var t=this;return[new o.default(this.getSubLayerProps({id:"editable-geojson",mode:this.props.mode,data:v,selectedFeatureIndexes:[],onEdit:function(e){var A=e.editType,n=e.editContext;switch(A){case"updateTentativeFeature":if("Polygon"===n.feature.geometry.type){var r=n.feature.geometry.coordinates,i=t.getDerivedHexagonIDs(r);t.setState({tentativeHexagonIDs:i})}else if("Point"===n.feature.geometry.type){var o=n.feature.geometry.coordinates,a=t.getDerivedHexagonID(o);t.setState({tentativeHexagonIDs:[a]})}break;case"addFeature":var s=c(t.props.data),g=t.props.modeConfig;if(g&&g.booleanOperation)if(1!==t.props.selectedIndexes.length)console.warn("booleanOperation only supported for single cluster selection");else{var I,u=new Set(t.getSelectedHexIDs()),l=new Set(t.state.tentativeHexagonIDs);switch(g.booleanOperation){case"union":default:I=c(new Set([].concat(c(u),c(l))));break;case"intersection":I=c(u).filter((function(t){return l.has(t)}));break;case"difference":I=c(u).filter((function(t){return!l.has(t)}))}var C=t.props.selectedIndexes[0],h=t.props.data[C];s[C]=t.props.getEditedCluster(I,h)}else s.push(t.props.getEditedCluster(t.state.tentativeHexagonIDs,null));t.setState({tentativeHexagonIDs:[]}),t.props.onEdit({updatedData:s})}}})),new n.H3ClusterLayer(this.getSubLayerProps({id:"hexagons",data:this.props.data,getHexagons:this.props.getHexagons})),new n.H3ClusterLayer(this.getSubLayerProps({id:"tentative-hexagons",data:[{hexIds:this.state.tentativeHexagonIDs}],getHexagons:function(t){return t.hexIds}}))]}},{key:"getSelectedHexIDs",value:function(){var t=this,e=[];return this.props.selectedIndexes.forEach((function(A){var n=t.props.data[A],r=t.props.getHexagons(n);e=e.concat(r)})),e}},{key:"getCursor",value:function(t){var e=t.isDragging,A=this.state.cursor;return A||(A=e?"grabbing":"grab"),A}}])&&l(A.prototype,r),a&&l(A,a),g}(a.default);e.default=b,p(b,"layerName","EditableH3ClusterLayer"),p(b,"defaultProps",m)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SELECTION_TYPE=void 0;var n,r=A(61),i=A(152),o=A(85),a=I(A(793)),s=I(A(1038)),g=A(409),c=I(A(780));function I(t){return t&&t.__esModule?t:{default:t}}function u(t){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function C(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?l(Object(A),!0).forEach((function(e){b(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):l(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function h(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||f(t)||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 B(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||f(t,e)||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 f(t,e){if(t){if("string"===typeof t)return d(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(){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(t){return!1}}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var F={NONE:null,RECTANGLE:"rectangle",POLYGON:"polygon"};e.SELECTION_TYPE=F;var w=(b(n={},F.RECTANGLE,g.DrawRectangleMode),b(n,F.POLYGON,g.DrawPolygonMode),n),S=b({},F.RECTANGLE,{dragToDraw:!0}),D={selectionType:F.RECTANGLE,layerIds:[],onSelect:function(){}},R={type:"FeatureCollection",features:[]},U=["lineWidthScale","lineWidthMinPixels","lineWidthMaxPixels","lineWidthUnits","lineJointRounded","lineMiterLimit","pointRadiusScale","pointRadiusMinPixels","pointRadiusMaxPixels","lineDashJustified","getLineColor","getFillColor","getRadius","getLineWidth","getLineDashArray","getTentativeLineDashArray","getTentativeLineColor","getTentativeFillColor","getTentativeLineWidth"],G=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(u,t);var e,A,n,r,I=(e=u,function(){var t,A=v(e);if(y()){var n=v(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return p(this,t)});function u(){return Q(this,u),I.apply(this,arguments)}return A=u,(n=[{key:"_selectRectangleObjects",value:function(t){var e=this.props,A=e.layerIds,n=e.onSelect,r=B(this.context.viewport.project(t[0][0]),2),i=r[0],o=r[1],a=B(this.context.viewport.project(t[0][2]),2),s=a[0],g=a[1];n({pickingInfos:this.context.deck.pickObjects({x:Math.min(i,s),y:Math.min(o,g),width:Math.abs(s-i),height:Math.abs(g-o),layerIds:A})})}},{key:"_selectPolygonObjects",value:function(t){var e,A=this,n=this.props,r=n.layerIds,i=n.onSelect,g=t[0].map((function(t){return A.context.viewport.project(t)})),c=g.map((function(t){return t[0]})),I=g.map((function(t){return t[1]})),u=Math.min.apply(Math,h(c)),l=Math.min.apply(Math,h(I)),C=Math.max.apply(Math,h(c)),B=Math.max.apply(Math,h(I)),f=(0,o.polygon)(t),d=(0,a.default)(f,50);try{e=(0,s.default)(d,f)}catch(E){return void console.log("turfDifference() error",E)}this.setState({pendingPolygonSelection:{bigPolygon:e}});var Q="".concat(this.props.id,"-").concat("selection-blocker");setTimeout((function(){var t=A.context.deck.pickObjects({x:u,y:l,width:C-u,height:B-l,layerIds:[Q].concat(h(r))});i({pickingInfos:t.filter((function(t){return t.layer.id!==A.props.id}))})}),250)}},{key:"renderLayers",value:function(){var t=this,e=this.state.pendingPolygonSelection,A=w[this.props.selectionType]||g.ViewMode,n=S[this.props.selectionType],r={};U.forEach((function(e){void 0!==t.props[e]&&(r[e]=t.props[e])}));var o=[new c.default(this.getSubLayerProps(C({id:"selection-geojson",pickable:!0,mode:A,modeConfig:n,selectedFeatureIndexes:[],data:R,onEdit:function(e){var A=e.updatedData;if("addFeature"===e.editType){var n=A.features[0].geometry.coordinates;t.props.selectionType===F.RECTANGLE?t._selectRectangleObjects(n):t.props.selectionType===F.POLYGON&&t._selectPolygonObjects(n)}}},r)))];if(e){var a=e.bigPolygon;o.push(new i.PolygonLayer(this.getSubLayerProps({id:"selection-blocker",pickable:!0,stroked:!1,opacity:1,data:[a],getLineColor:function(t){return[0,0,0,1]},getFillColor:function(t){return[0,0,0,1]},getPolygon:function(t){return t.geometry.coordinates}})))}return o}},{key:"shouldUpdateState",value:function(t){var e=t.changeFlags,A=e.stateChanged,n=e.propsOrDataChanged;return A||n}}])&&E(A.prototype,n),r&&E(A,r),u}(r.CompositeLayer);e.default=G,b(G,"layerName","SelectionLayer"),b(G,"defaultProps",D)},function(t,e,A){"use strict";function n(t){return t&&"object"===typeof t&&"default"in t?t.default:t}var r=n(A(504)),i=n(A(505)),o=A(85),a=A(153),s=A(202);function g(t){switch(t.type){case"Polygon":return i(t)>1?t:null;case"MultiPolygon":var e=[];if(s.flattenEach(t,(function(t){i(t)>1&&e.push(t.geometry.coordinates)})),e.length)return{type:"MultiPolygon",coordinates:e}}}t.exports=function(t,e){var A=a.getGeom(t),n=a.getGeom(e),i=t.properties||{};if(A=g(A),n=g(n),!A)return null;if(!n)return o.feature(A,i);var s=r.diff(A.coordinates,n.coordinates);return 0===s.length?null:1===s.length?o.polygon(s[0],i):o.multiPolygon(s,i)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(61),r=A(152);function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var l=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&I(t,e)}(l,t);var e,A,n,i,u=(e=l,function(){var t,A=c(e);if(g()){var n=c(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return s(this,t)});function l(){return o(this,l),u.apply(this,arguments)}return A=l,(n=[{key:"renderLayers",value:function(){return[new r.ScatterplotLayer(Object.assign({},this.props,{id:"".concat(this.props.id,"-ScatterplotLayer"),data:this.props.data})),new r.LineLayer(Object.assign({},this.props,{id:"".concat(this.props.id,"-LineLayer"),data:this.props.data,pickable:!1,getSourcePosition:function(t){var e=t.position;return[e[0],e[1],0]},getTargetPosition:function(t){var e=t.position;return[e[0],e[1],e[2]||0]},getColor:[150,150,150,200],getStrokeWidth:3}))]}}])&&a(A.prototype,n),i&&a(A,i),l}(n.CompositeLayer);e.default=l,u(l,"layerName","ElevatedEditHandleLayer"),u(l,"defaultProps",{})},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={outlineEnabled:!1,outlineRenderShadowmap:!1,outlineShadowmap:null};var r={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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,e=t.outlineEnabled,A=t.outlineRenderShadowmap,r=t.outlineShadowmap,i={};return void 0!==e&&(i.outline_uEnabled=e),void 0!==A&&(i.outline_uRenderOutlines=A),void 0!==r&&(i.outline_uShadowmap=r),i}};e.default=r},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(61),r=A(152),i=A(788),o=c(A(859)),a=c(A(1042)),s=c(A(1043)),g=A(1044);function c(t){return t&&t.__esModule?t:{default:t}}function I(t){return(I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return l(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return l(t,e)}(t,e)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function C(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function B(t,e){return!e||"object"!==I(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):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(t){return!1}}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Q(t,e){return(Q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function E(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var p=i.SimpleMeshLayer,y={mesh:new a.default({headSize:.2,tailWidth:.05})},v=Object.assign({},o.default.defaultProps,{MarkerLayer:p,markerLayerProps:y,sizeScale:100,fp64:!1,hightlightIndex:-1,highlightPoint:null,getPath:function(t){return t.path},getColor:function(t){return t.color},getMarkerColor:function(t){return[0,0,0,255]},getDirection:function(t){return t.direction},getMarkerPercentages:function(t,e){return e.lineLength>.1?[.25,.5,.75]:[.5]}}),m=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Q(t,e)}(l,t);var e,A,i,c,I=(e=l,function(){var t,A=d(e);if(f()){var n=d(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return B(this,t)});function l(){return C(this,l),I.apply(this,arguments)}return A=l,(i=[{key:"initializeState",value:function(){this.state={markers:[],mesh:new a.default({headSize:.2,tailWidth:.05}),closestPoint:null}}},{key:"projectFlat",value:function(t,e,A,r){if(A===n.COORDINATE_SYSTEM.METER_OFFSETS){var i=u(e.metersToLngLatDelta(t),2),o=i[0],a=i[1],s=u(r,2),g=s[0],c=s[1];return e.projectFlat([g+o,a+c])}if(A===n.COORDINATE_SYSTEM.LNGLAT_OFFSETS){var I=u(t,2),l=I[0],C=I[1],h=u(r,2),B=h[0],f=h[1];return e.projectFlat([B+l,C+f])}return e.projectFlat(t)}},{key:"updateState",value:function(t){var e=this,A=t.props,n=t.oldProps,r=t.changeFlags;if(r.dataChanged||r.updateTriggersChanged){var i=this.props,o=i.data,a=i.getPath,g=i.getDirection,c=i.getMarkerColor,I=i.getMarkerPercentages,u=i.coordinateSystem,l=i.coordinateOrigin,C=this.context.viewport;this.state.markers=(0,s.default)({data:o,getPath:a,getDirection:g,getColor:c,getMarkerPercentages:I,projectFlat:function(t){return e.projectFlat(t,C,u,l)}}),this._recalculateClosestPoint()}r.propsChanged&&A.point!==n.point&&this._recalculateClosestPoint()}},{key:"_recalculateClosestPoint",value:function(){var t=this.props,e=t.highlightPoint,A=t.highlightIndex;if(e&&A>=0){var n=this.props.data[A],r=this.props.getPath(n),i=(0,g.getClosestPointOnPolyline)({points:r,p:e}).point;this.state.closestPoints=[{position:i}]}else this.state.closestPoints=[]}},{key:"getPickingInfo",value:function(t){var e=t.info;return Object.assign(e,{object:e.object&&e.object.path||e.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(t){return[0,-t.angle,0]},getColor:function(t){return t.color},sizeScale:this.props.sizeScale,fp64:this.props.fp64,pickable:!1,parameters:{blend:!1,depthTest:!1}}))),this.state.closestPoints&&new r.ScatterplotLayer({id:"".concat(this.props.id,"-highlight"),data:this.state.closestPoints,fp64:this.props.fp64})]}}])&&h(A.prototype,i),c&&h(A,c),l}(n.CompositeLayer);e.default=m,E(m,"layerName","PathMarkerLayer"),E(m,"defaultProps",v)},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){return!e||"object"!==n(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var g=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(n,t);var e,A=(e=n,function(){var t,A=a(e);if(o()){var n=a(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return i(this,t)});function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r(this,n),A.call(this,Object.assign({},t,{attributes:c(t)}))}return n}(A(57).Geometry);function c(t){for(var e=t.length,A=void 0===e?1:e,n=t.headSize,r=void 0===n?.2:n,i=t.tailWidth,o=void 0===i?.05:i,a=t.tailStart,s=void 0===a?.05:a,g=[.5,1,0,.5-r/2,1-r,0,.5+r/2,1-r,0,.5-o/2,s,0,.5+o/2,1-r,0,.5+o/2,s,0,.5-o/2,s,0,.5-o/2,1-r,0,.5+o/2,1-r,0],c=new Array(g.length),I=0;I<g.length/3;I++){var u=3*I;c[u+0]=(g[u+0]-.5)*A,c[u+1]=(g[u+1]-.5)*A,c[u+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(g)}}e.default=g},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,A=t.data,i=t.getPath,c=void 0===i?function(t){return t.path}:i,I=t.getDirection,u=void 0===I?function(t){return t.direction}:I,l=t.getColor,C=void 0===l?function(t){return a}:l,h=t.getMarkerPercentages,B=void 0===h?function(t){return[.5]}:h,f=t.projectFlat,d=[],Q=r(A);try{for(Q.s();!(e=Q.n()).done;){var E,p=e.value,y=c(p),v=u(p)||s,m=C(p),b=y.map((function(t){return new n.Vector2(t)})),F=b.slice(0).reverse(),w=o(b),S=r(B(p,{lineLength:w}));try{for(S.s();!(E=S.n()).done;){var D=E.value;if(v.forward){var R=g({path:b,percentage:D,lineLength:w,color:m,object:p,projectFlat:f});d.push(R)}if(v.backward){var U=g({path:F,percentage:D,lineLength:w,color:m,object:p,projectFlat:f});d.push(U)}}}catch(G){S.e(G)}finally{S.f()}}}catch(G){Q.e(G)}finally{Q.f()}return d};var n=A(136);function r(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=function(t,e){if(!t)return;if("string"===typeof t)return i(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return i(t,e)}(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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 n,r,o=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){a=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function o(t){for(var e=0,A=0;A<t.length-1;A++)e+=t[A].distance(t[A+1]);return e}var a=[0,0,0,255],s={forward:!0,backward:!1};function g(t){var e=t.path,A=t.percentage,r=t.lineLength,i=t.color,o=t.object,a=t.projectFlat,s=r*A,g=0,c=0,I=0;for(I=0;I<e.length-1&&!((g+=e[I].distance(e[I+1]))>s);I++)c=g;var u=s-c,l=e[I+1].clone().subtract(e[I]).normalize().clone().multiply(new n.Vector2(u,u)).add(e[I]),C=180*-new n.Vector2(a(e[I+1])).subtract(a(e[I])).verticalAngle()/Math.PI;return{position:[l.x,l.y,0],angle:C,color:i,object:o}}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getClosestPointOnLine=r,e.getClosestPointOnPolyline=function(t){var e=t.p,A=t.points;e=new n.Vector3(e);for(var i=null,o=1/0,a=-1,s=0;s<A.length-1;++s){var g=A[s],c=A[s+1],I=r({p:e,p1:g,p2:c}),u=e.distanceSquared(I);u<o&&(o=u,i=I,a=s)}return{point:i,index:a,p1:A[a],p2:A[a+1],distanceSquared:o,distance:Math.sqrt(o)}};var n=A(136);function r(t){var e=t.p,A=t.p1,r=t.p2,i=t.clampToLine,o=void 0===i||i,a=new n.Vector3(r).subtract(A),s=new n.Vector3(e).subtract(A),g=a.dot(s);return o&&(g=(0,n.clamp)(g,0,1)),a.lerp(g)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(61),r=A(152);function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function a(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?o(Object(A),!0).forEach((function(e){C(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):o(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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(t){return!1}}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function C(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var h=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(C,t);var e,A,n,i,o=(e=C,function(){var t,A=u(e);if(I()){var n=u(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return c(this,t)});function C(){return s(this,C),o.apply(this,arguments)}return A=C,(n=[{key:"renderLayers",value:function(){var t=this.props,e=t.id,A=t.getFillColor,n=t.getStrokeColor,i=t.getInnerRadius,o=t.updateTriggers;return[new r.ScatterplotLayer(a({},this.props,{id:"".concat(e,"-full"),data:this.props.data,getLineColor:n,updateTriggers:a({},o,{getStrokeColor:o.getStrokeColor})})),new r.ScatterplotLayer(a({},this.props,{id:"".concat(e,"-inner"),data:this.props.data,getFillColor:A,getRadius:i,pickable:!1,updateTriggers:a({},o,{getFillColor:o.getFillColor,getRadius:o.getInnerRadius})}))]}}])&&g(A.prototype,n),i&&g(A,i),C}(n.CompositeLayer);e.default=h,C(h,"layerName","JunctionScatterplotLayer"),C(h,"defaultProps",a({},r.ScatterplotLayer.defaultProps,{getFillColor:function(t){return[0,0,0,255]},getStrokeColor:function(t){return[255,255,255,255]},getInnerRadius:function(t){return 1}}))},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDeckColor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[255,0,0,255];if(!Array.isArray(t))return e;return[255*t[0],255*t[1],255*t[2],255*t[3]]},e.recursivelyTraverseNestedArrays=function t(e,A,n){if(!Array.isArray(e[0]))return!0;for(var r=0;r<e.length;r++)if(t(e[r],[].concat(function(t){if(Array.isArray(t))return I(t)}(i=A)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(i)||c(i)||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.")}(),[r]),n)){n(e,A);break}var i;return!1},e.generatePointsParallelToLinePoints=function(t,e,A){var a={type:"LineString",coordinates:[t,e]},s=(0,o.point)(A),g=(0,i.default)(s,a),c=(0,r.default)(t,e),I=(A[0]-t[0])*(e[1]-t[1])-(A[1]-t[1])*(e[0]-t[0])<0?c-90:c-270,u=(0,n.default)(e,g,I),l=(0,n.default)(t,g,I);return[u.geometry.coordinates,l.geometry.coordinates]},e.distance2d=u,e.mix=l,e.nearestPointOnProjectedLine=function(t,e,A){var n=new a.default(A),r=t.geometry.coordinates.map((function(t){var e=g(t,3),A=e[0],r=e[1],i=e[2],o=void 0===i?0:i;return n.project([A,r,o])})),i=g(n.project(e.geometry.coordinates),2),o=i[0],s=i[1],c=1/0,I={};r.forEach((function(t,e){var A=g(t,2),n=A[0],i=A[1];if(0!==e){var a=g(r[e-1],2),u=a[0],l=a[1],C=l-i,h=n-u,B=u*i-n*l,f=C*C+h*h,d=Math.abs(C*o+h*s+B)/Math.sqrt(f);d<c&&(c=d,I={index:e,x0:(h*(h*o-C*s)-C*B)/f,y0:(C*(-h*o+C*s)-h*B)/f})}}));var C=I,h=C.index,B=C.x0,f=C.y0,d=g(r[h-1],3),Q=d[0],E=d[1],p=d[2],y=void 0===p?0:p,v=g(r[h],3),m=v[0],b=v[1],F=v[2],w=void 0===F?0:F,S=u(Q,E,m,b),D=u(Q,E,B,f),R=l(y,w,D/S);return{type:"Feature",geometry:{type:"Point",coordinates:n.unproject([B,f,R])},properties:{dist:c,index:h-1}}};var n=s(A(497)),r=s(A(294)),i=s(A(849)),o=A(85),a=s(A(850));function s(t){return t&&t.__esModule?t:{default:t}}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||c(t,e)||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(t,e){if(t){if("string"===typeof t)return I(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(A):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?I(t,e):void 0}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function u(t,e,A,n){var r=t-A,i=e-n;return Math.sqrt(r*r+i*i)}function l(t,e,A){return e*A+t*(1-A)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(152),r=a(A(558)),i=A(601),o=a(A(789));function a(t){return t&&t.__esModule?t:{default:t}}function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?I(t):e}function I(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var h=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}(h,t);var e,A,r,a,s=(e=h,function(){var t,A=l(e);if(u()){var n=l(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return c(this,t)});function h(t){var e,A,n,r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),e=s.call(this,t),A=I(e),r=void 0,(n="deckCache")in A?Object.defineProperty(A,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):A[n]=r,e.deckCache=new o.default(t.getData,(function(e){return t.toNebulaFeature(e)})),e}return A=h,(r=[{key:"render",value:function(t){var e=t.nebula,A=[0,0,0,255],r=this.deckCache,o=r.objects,a=r.updateTrigger,s=e.props.viewport.zoom;return new n.TextLayer({id:"texts-".concat(this.id),data:o,opacity:1,fp64:!1,pickable:!1,getText:function(t){return t.style.text},getPosition:function(t){return t.geoJson.geometry.coordinates},getColor:function(t){return(0,i.toDeckColor)(t.style.fillColor)||A},sizeScale:1/Math.pow(2,20-s),updateTriggers:{all:a},nebulaLayer:this})}}])&&g(A.prototype,r),a&&g(A,a),h}(r.default);e.default=h},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=A(779),i=A(28),o=A(845),a=c(A(558)),s=A(601),g=c(A(789));function c(t){return t&&t.__esModule?t:{default:t}}function I(t){return(I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return!e||"object"!==I(e)&&"function"!==typeof e?C(t):e}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return 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(t){return!1}}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var Q=(d(n={},o.ArrowStyles.NONE,{forward:!1,backward:!1}),d(n,o.ArrowStyles.FORWARD,{forward:!0,backward:!1}),d(n,o.ArrowStyles.BACKWARD,{forward:!1,backward:!0}),d(n,o.ArrowStyles.BOTH,{forward:!0,backward:!0}),n),E=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(I,t);var e,A,n,a,c=(e=I,function(){var t,A=B(e);if(h()){var n=B(this).constructor;t=Reflect.construct(A,arguments,n)}else t=A.apply(this,arguments);return l(this,t)});function I(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,I),d(C(e=c.call(this,t)),"deckCache",void 0),d(C(e),"noBlend",void 0),d(C(e),"highlightColor",void 0),d(C(e),"arrowSize",void 0),d(C(e),"rounded",void 0),d(C(e),"dashed",void 0),d(C(e),"markerLayerProps",void 0),e.deckCache=new g.default(t.getData,(function(e){return t.toNebulaFeature(e)})),e.enableSelection=!0;var A=t.enablePicking,n=void 0===A||A,r=t.noBlend,i=void 0!==r&&r,o=t.rounded,a=void 0===o||o,s=t.dashed,u=void 0!==s&&s,l=t.markerLayerProps,h=void 0===l?null:l;return Object.assign(C(e),{enablePicking:n,noBlend:i,rounded:a,dashed:u,markerLayerProps:h}),e}return A=I,(n=[{key:"getMouseOverSegment",value:function(){return null}},{key:"_calcMarkerPercentages",value:function(t){var e=t.style.arrowPercentages;return e||((t.style.arrowStyle||o.DEFAULT_STYLE.arrowStyle)===o.ArrowStyles.NONE?[]:[[.5],[.33,.66],[.25,.5,.75]][Math.min(t.style.arrowCount||o.DEFAULT_STYLE.arrowCount,o.MAX_ARROWS)-1])}},{key:"_getHighlightedObjectIndex",value:function(t){var e=t.nebula.deckglMouseOverInfo;if(e){var A=e.originalLayer,n=e.index;if(A===this)return n}return-1}},{key:"render",value:function(t){var e=t.nebula,A=[0,0,0,255],n=this.deckCache,o=n.objects,a=n.updateTrigger;return new r.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:i.MAX},getPath:function(t){return t.geoJson.geometry.coordinates},getColor:function(t){return(0,s.toDeckColor)(t.style.lineColor,A)},getWidth:function(t){return t.style.lineWidthMeters||1},getZLevel:function(t){return 255*t.style.zLevel},getDirection:function(t){return Q[t.style.arrowStyle]},getMarkerColor:function(t){return(0,s.toDeckColor)(t.style.arrowColor,A)},getMarkerPercentages:this._calcMarkerPercentages,updateTriggers:{all:a},highlightedObjectIndex:this._getHighlightedObjectIndex({nebula:e}),highlightColor:(0,s.toDeckColor)(this.highlightColor),dashJustified:this.dashed,getDashArray:this.dashed?function(t){return t.style.dashArray}:null,markerLayerProps:this.markerLayerProps||r.PathMarkerLayer.defaultProps.markerLayerProps,nebulaLayer:this})}}])&&u(A.prototype,n),a&&u(A,a),I}(a.default);e.default=E},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=A(276),r=g(A(1050)),i=A(61),o=g(A(846)),a=g(A(847)),s=g(A(558));function g(t){return t&&t.__esModule?t:{default:t}}function c(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return I(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(A);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return I(t,e)}(t)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function u(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var C=function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,"props",void 0),l(this,"deckgl",void 0),l(this,"mainContainer",void 0),l(this,"deckglMouseOverInfo",void 0),l(this,"_deckDrawer",void 0),l(this,"_mouseWasDown",void 0),l(this,"wmViewport",void 0),l(this,"queryObjectEvents",new n.EventEmitter),l(this,"forceUpdate",void 0),l(this,"inited",void 0),l(this,"_onMouseEvent",(function(t){if(e._isNebulaEvent(t)){"mousedown"===t.type&&(e._mouseWasDown=!0);var A=e.mainContainer?e.mainContainer.getBoundingClientRect():{},n=A.top,r=void 0===n?0:n,i=A.left,o=void 0===i?0:i,a=new Proxy(t,{get:function(t,e){if("offsetX"===e)return t.pageX-o;if("offsetY"===e)return t.pageY-r;if("type"===e)return t.type.replace("pointer","mouse");var A=t[e];return"function"===typeof A?A.bind(t):A}});e._handleDeckGLEvent(a)}}))}var e,A,g;return e=t,(A=[{key:"init",value:function(t){var e=this;this.props=t,this.wmViewport=new i.WebMercatorViewport(this.props.viewport),["click","mousemove","mouseup","mousedown"].forEach((function(t){return r.default.addEventListener(t,e._onMouseEvent,!0)}))}},{key:"detach",value:function(){var t=this;["click","mousemove","mouseup","mousedown"].forEach((function(e){return r.default.removeEventListener(e,t._onMouseEvent,!0)}))}},{key:"updateProps",value:function(t){this.props=t;var e=this.props.viewport;this.wmViewport=new i.WebMercatorViewport(e)}},{key:"log",value:function(t){var e=this.props.logger;e&&e.info&&e.info("Nebula: "+t)}},{key:"updateAllDeckObjects",value:function(){this.getAllLayers().forEach((function(t){t&&t.deckCache&&t.deckCache.updateAllDeckObjects()})),this.forceUpdate()}},{key:"updateDeckObjectsByIds",value:function(t){this.getAllLayers().forEach((function(e){e&&e.deckCache&&e.deckCache.updateDeckObjectsByIds(t)})),this.forceUpdate()}},{key:"rerenderLayers",value:function(){this.updateAllDeckObjects()}},{key:"_isNebulaEvent",value:function(t){var e=t.buttons,A=t.target,n=t.type,r=this.props.viewport;if(this._mouseWasDown&&"mouseup"===n)return this._mouseWasDown=!1,!0;if("mousemove"===n&&e>0)return!0;if(!A.getBoundingClientRect)return!1;var i=A.getBoundingClientRect();return Math.round(i.width)===Math.round(r.width)&&Math.round(i.height)===Math.round(r.height)}},{key:"getMouseGroundPosition",value:function(t){return this.wmViewport.unproject([t.offsetX,t.offsetY])}},{key:"unprojectMousePosition",value:function(t){return this.wmViewport.unproject(t)}},{key:"_handleDeckGLEvent",value:function(t){var e=this.deckgl,A=this.props,n=A.onMapMouseEvent,i=A.selectionType,s=A.eventFilter,g=!0,c="auto";if(t&&e&&i){this._deckDrawer||(this._deckDrawer=new o.default(this));var I=this.getMouseGroundPosition(t);if(s&&!s(I,t))return;this._deckDrawer.handleEvent(t,I,i).redraw&&this.forceUpdate()}else{if(t&&e&&(!t.buttons||"mousemove"!==t.type)){var u=e.props.layers.filter((function(t){return t&&t.props&&t.props.nebulaLayer&&t.props.nebulaLayer.enablePicking})).map((function(t){return t.id})),l=e.pickObject({x:t.offsetX,y:t.offsetY,radius:5,layerIds:u});if(this.queryObjectEvents.emit("pick",{event:t,pickingInfo:l}),l){g=!1;var C=l.index,h=l.lngLat;if(s&&!s(h,t))return;var B=l.layer,f=l.object;B&&B.props&&B.props.nebulaLayer&&B.props.nebulaLayer.eventHandler&&B.props.nebulaLayer.eventHandler(t,l);var d=f.original||B.props.nebulaLayer&&B.props.nebulaLayer.deckCache&&B.props.nebulaLayer.deckCache.originals[C];if(d){this.deckglMouseOverInfo={originalLayer:B.props.nebulaLayer,index:C};var Q=new a.default(t,{data:d,metadata:f.metadata,groundPoint:h,nebula:this});B.props.nebulaLayer.emit(t.type,Q),this.forceUpdate()}c="pointer"}}if(r.default.documentElement&&(r.default.documentElement.style.cursor=c),g){this.deckglMouseOverInfo=null;var E=this.getMouseGroundPosition(t);if(s&&!s(E,t))return;var p=new a.default(t,{groundPoint:E,nebula:this});this.getAllLayers().filter((function(t){return t&&t.usesMapEvents})).forEach((function(t){return t.emit("mapMouseEvent",p)})),this.getAllLayers().filter((function(t){return t&&t.props&&t.props.nebulaLayer&&t.props.nebulaLayer.mapMouseEvent})).forEach((function(t){return t.props.nebulaLayer.mapMouseEvent(p,t)})),n&&n(t,E)}}}},{key:"getExtraDeckLayers",value:function(){var t=[];return this._deckDrawer&&t.push.apply(t,c(this._deckDrawer.render())),t}},{key:"renderDeckLayers",value:function(){var t=this;return this.getAllLayers().map((function(e){return e instanceof s.default?e.render({nebula:t}):e})).filter(Boolean)}},{key:"getAllLayers",value:function(){var t=[];return this.props.layers.filter(Boolean).forEach((function(e){t.push(e),e instanceof s.default&&t.push.apply(t,c(e.helperLayers))})),t.filter(Boolean)}},{key:"getRenderedLayers",value:function(){return[].concat(c(this.renderDeckLayers()),c(this.getExtraDeckLayers()))}},{key:"updateAndGetRenderedLayers",value:function(t,e,A){return this.inited?(this.updateProps({layers:t,viewport:e}),this.forceUpdate=function(){return A.forceUpdate()}):(this.inited=!0,this.init({layers:t,viewport:e}),this.forceUpdate=function(){return A.forceUpdate()},this.updateAllDeckObjects()),this.getRenderedLayers()}},{key:"setDeck",value:function(t){t&&(this.deckgl=t)}},{key:"setMainContainer",value:function(t){t&&(this.mainContainer=t)}}])&&u(e.prototype,A),g&&u(e,g),t}();e.default=C},function(t,e,A){(function(e){var n,r="undefined"!==typeof e?e:"undefined"!==typeof window?window:{},i=A(1051);"undefined"!==typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=i),t.exports=n}).call(this,A(58))},function(t,e){},function(t,e,A){(function(t){var n;!function(t,r,i){function o(t){var e=this,A=function(){var t=4022871197;return function(e){e=String(e);for(var A=0;A<e.length;A++){var n=.02519603282416938*(t+=e.charCodeAt(A));n-=t=n>>>0,t=(n*=t)>>>0,t+=4294967296*(n-=t)}return 2.3283064365386963e-10*(t>>>0)}}();e.next=function(){var t=2091639*e.s0+2.3283064365386963e-10*e.c;return e.s0=e.s1,e.s1=e.s2,e.s2=t-(e.c=0|t)},e.c=1,e.s0=A(" "),e.s1=A(" "),e.s2=A(" "),e.s0-=A(t),e.s0<0&&(e.s0+=1),e.s1-=A(t),e.s1<0&&(e.s1+=1),e.s2-=A(t),e.s2<0&&(e.s2+=1),A=null}function a(t,e){return e.c=t.c,e.s0=t.s0,e.s1=t.s1,e.s2=t.s2,e}function s(t,e){var A=new o(t),n=e&&e.state,r=A.next;return r.int32=function(){return 4294967296*A.next()|0},r.double=function(){return r()+11102230246251565e-32*(2097152*r()|0)},r.quick=r,n&&("object"==typeof n&&a(n,A),r.state=function(){return a(A,{})}),r}r&&r.exports?r.exports=s:A(289)&&A(499)?void 0===(n=function(){return s}.call(e,A,e,r))||(r.exports=n):this.alea=s}(0,t,A(289))}).call(this,A(220)(t))},function(t,e,A){(function(t){var n;!function(t,r,i){function o(t){var e=this,A="";e.x=0,e.y=0,e.z=0,e.w=0,e.next=function(){var t=e.x^e.x<<11;return e.x=e.y,e.y=e.z,e.z=e.w,e.w^=e.w>>>19^t^t>>>8},t===(0|t)?e.x=t:A+=t;for(var n=0;n<A.length+64;n++)e.x^=0|A.charCodeAt(n),e.next()}function a(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e}function s(t,e){var A=new o(t),n=e&&e.state,r=function(){return(A.next()>>>0)/4294967296};return r.double=function(){do{var t=((A.next()>>>11)+(A.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},r.int32=A.next,r.quick=r,n&&("object"==typeof n&&a(n,A),r.state=function(){return a(A,{})}),r}r&&r.exports?r.exports=s:A(289)&&A(499)?void 0===(n=function(){return s}.call(e,A,e,r))||(r.exports=n):this.xor128=s}(0,t,A(289))}).call(this,A(220)(t))},function(t,e,A){(function(t){var n;!function(t,r,i){function o(t){var e=this,A="";e.next=function(){var t=e.x^e.x>>>2;return e.x=e.y,e.y=e.z,e.z=e.w,e.w=e.v,(e.d=e.d+362437|0)+(e.v=e.v^e.v<<4^t^t<<1)|0},e.x=0,e.y=0,e.z=0,e.w=0,e.v=0,t===(0|t)?e.x=t:A+=t;for(var n=0;n<A.length+64;n++)e.x^=0|A.charCodeAt(n),n==A.length&&(e.d=e.x<<10^e.x>>>4),e.next()}function a(t,e){return e.x=t.x,e.y=t.y,e.z=t.z,e.w=t.w,e.v=t.v,e.d=t.d,e}function s(t,e){var A=new o(t),n=e&&e.state,r=function(){return(A.next()>>>0)/4294967296};return r.double=function(){do{var t=((A.next()>>>11)+(A.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},r.int32=A.next,r.quick=r,n&&("object"==typeof n&&a(n,A),r.state=function(){return a(A,{})}),r}r&&r.exports?r.exports=s:A(289)&&A(499)?void 0===(n=function(){return s}.call(e,A,e,r))||(r.exports=n):this.xorwow=s}(0,t,A(289))}).call(this,A(220)(t))},function(t,e,A){(function(t){var n;!function(t,r,i){function o(t){var e=this;e.next=function(){var t,A,n=e.x,r=e.i;return t=n[r],A=(t^=t>>>7)^t<<24,A^=(t=n[r+1&7])^t>>>10,A^=(t=n[r+3&7])^t>>>3,A^=(t=n[r+4&7])^t<<7,t=n[r+7&7],A^=(t^=t<<13)^t<<9,n[r]=A,e.i=r+1&7,A},function(t,e){var A,n=[];if(e===(0|e))n[0]=e;else for(e=""+e,A=0;A<e.length;++A)n[7&A]=n[7&A]<<15^e.charCodeAt(A)+n[A+1&7]<<13;for(;n.length<8;)n.push(0);for(A=0;A<8&&0===n[A];++A);for(8==A?n[7]=-1:n[A],t.x=n,t.i=0,A=256;A>0;--A)t.next()}(e,t)}function a(t,e){return e.x=t.x.slice(),e.i=t.i,e}function s(t,e){null==t&&(t=+new Date);var A=new o(t),n=e&&e.state,r=function(){return(A.next()>>>0)/4294967296};return r.double=function(){do{var t=((A.next()>>>11)+(A.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},r.int32=A.next,r.quick=r,n&&(n.x&&a(n,A),r.state=function(){return a(A,{})}),r}r&&r.exports?r.exports=s:A(289)&&A(499)?void 0===(n=function(){return s}.call(e,A,e,r))||(r.exports=n):this.xorshift7=s}(0,t,A(289))}).call(this,A(220)(t))},function(t,e,A){(function(t){var n;!function(t,r,i){function o(t){var e=this;e.next=function(){var t,A,n=e.w,r=e.X,i=e.i;return e.w=n=n+1640531527|0,A=r[i+34&127],t=r[i=i+1&127],A^=A<<13,t^=t<<17,A^=A>>>15,t^=t>>>12,A=r[i]=A^t,e.i=i,A+(n^n>>>16)|0},function(t,e){var A,n,r,i,o,a=[],s=128;for(e===(0|e)?(n=e,e=null):(e+="\0",n=0,s=Math.max(s,e.length)),r=0,i=-32;i<s;++i)e&&(n^=e.charCodeAt((i+32)%e.length)),0===i&&(o=n),n^=n<<10,n^=n>>>15,n^=n<<4,n^=n>>>13,i>=0&&(o=o+1640531527|0,r=0==(A=a[127&i]^=n+o)?r+1:0);for(r>=128&&(a[127&(e&&e.length||0)]=-1),r=127,i=512;i>0;--i)n=a[r+34&127],A=a[r=r+1&127],n^=n<<13,A^=A<<17,n^=n>>>15,A^=A>>>12,a[r]=n^A;t.w=o,t.X=a,t.i=r}(e,t)}function a(t,e){return e.i=t.i,e.w=t.w,e.X=t.X.slice(),e}function s(t,e){null==t&&(t=+new Date);var A=new o(t),n=e&&e.state,r=function(){return(A.next()>>>0)/4294967296};return r.double=function(){do{var t=((A.next()>>>11)+(A.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},r.int32=A.next,r.quick=r,n&&(n.X&&a(n,A),r.state=function(){return a(A,{})}),r}r&&r.exports?r.exports=s:A(289)&&A(499)?void 0===(n=function(){return s}.call(e,A,e,r))||(r.exports=n):this.xor4096=s}(0,t,A(289))}).call(this,A(220)(t))},function(t,e,A){(function(t){var n;!function(t,r,i){function o(t){var e=this,A="";e.next=function(){var t=e.b,A=e.c,n=e.d,r=e.a;return t=t<<25^t>>>7^A,A=A-n|0,n=n<<24^n>>>8^r,r=r-t|0,e.b=t=t<<20^t>>>12^A,e.c=A=A-n|0,e.d=n<<16^A>>>16^r,e.a=r-t|0},e.a=0,e.b=0,e.c=-1640531527,e.d=1367130551,t===Math.floor(t)?(e.a=t/4294967296|0,e.b=0|t):A+=t;for(var n=0;n<A.length+20;n++)e.b^=0|A.charCodeAt(n),e.next()}function a(t,e){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e}function s(t,e){var A=new o(t),n=e&&e.state,r=function(){return(A.next()>>>0)/4294967296};return r.double=function(){do{var t=((A.next()>>>11)+(A.next()>>>0)/4294967296)/(1<<21)}while(0===t);return t},r.int32=A.next,r.quick=r,n&&("object"==typeof n&&a(n,A),r.state=function(){return a(A,{})}),r}r&&r.exports?r.exports=s:A(289)&&A(499)?void 0===(n=function(){return s}.call(e,A,e,r))||(r.exports=n):this.tychei=s}(0,t,A(289))}).call(this,A(220)(t))},function(t,e,A){var n;!function(r,i,o){var a,s=o.pow(256,6),g=o.pow(2,52),c=2*g;function I(t,e,A){var n=[],I=C(function t(e,A){var n,r=[],i=typeof e;if(A&&"object"==i)for(n in e)try{r.push(t(e[n],A-1))}catch(o){}return r.length?r:"string"==i?e:e+"\0"}((e=1==e?{entropy:!0}:e||{}).entropy?[t,h(i)]:null==t?function(){try{var t;return a&&(t=a.randomBytes)?t=t(256):(t=new Uint8Array(256),(r.crypto||r.msCrypto).getRandomValues(t)),h(t)}catch(n){var e=r.navigator,A=e&&e.plugins;return[+new Date,r,A,r.screen,h(i)]}}():t,3),n),B=new u(n),f=function(){for(var t=B.g(6),e=s,A=0;t<g;)t=256*(t+A),e*=256,A=B.g(1);for(;t>=c;)t/=2,e/=2,A>>>=1;return(t+A)/e};return f.int32=function(){return 0|B.g(4)},f.quick=function(){return B.g(4)/4294967296},f.double=f,C(h(B.S),i),(e.pass||A||function(t,e,A,n){return n&&(n.S&&l(n,B),t.state=function(){return l(B,{})}),A?(o.random=t,e):t})(f,I,"global"in e?e.global:this==o,e.state)}function u(t){var e,A=t.length,n=this,r=0,i=n.i=n.j=0,o=n.S=[];for(A||(t=[A++]);r<256;)o[r]=r++;for(r=0;r<256;r++)o[r]=o[i=255&i+t[r%A]+(e=o[r])],o[i]=e;(n.g=function(t){for(var e,A=0,r=n.i,i=n.j,o=n.S;t--;)e=o[r=255&r+1],A=256*A+o[255&(o[r]=o[i=255&i+e])+(o[i]=e)];return n.i=r,n.j=i,A})(256)}function l(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function C(t,e){for(var A,n=t+"",r=0;r<n.length;)e[255&r]=255&(A^=19*e[255&r])+n.charCodeAt(r++);return h(e)}function h(t){return String.fromCharCode.apply(0,t)}if(C(o.random(),i),t.exports){t.exports=I;try{a=A(1059)}catch(B){}}else void 0===(n=function(){return I}.call(e,A,e,t))||(t.exports=n)}("undefined"!==typeof self?self:this,[],Math)},function(t,e){},function(t,e,A){"use strict";var n=A(722);t.exports=function(t){n.copy(t,this)}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n="",r=!0===t.schema.$async,i=t.util.schemaHasRulesExcept(t.schema,t.RULES.all,"$ref"),o=t.self._getId(t.schema);if(t.opts.strictKeywords){var a=t.util.schemaUnknownRules(t.schema,t.RULES.keywords);if(a){var s="unknown keyword: "+a;if("log"!==t.opts.strictKeywords)throw new Error(s);t.logger.warn(s)}}if(t.isTop&&(n+=" var validate = ",r&&(t.async=!0,n+="async "),n+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",o&&(t.opts.sourceCode||t.opts.processCode)&&(n+=" /*# sourceURL="+o+" */ ")),"boolean"==typeof t.schema||!i&&!t.schema.$ref){var g=t.level,c=t.dataLevel,I=t.schema["false schema"],u=t.schemaPath+t.util.getProperty("false schema"),l=t.errSchemaPath+"/false schema",C=!t.opts.allErrors,h="data"+(c||""),B="valid"+g;if(!1===t.schema){t.isTop?C=!0:n+=" var "+B+" = false; ",(X=X||[]).push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: {} ",!1!==t.opts.messages&&(n+=" , message: 'boolean schema is false' "),t.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";var f=n;n=X.pop(),!t.compositeRule&&C?t.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else t.isTop?n+=r?" return data; ":" validate.errors = null; return true; ":n+=" var "+B+" = true; ";return t.isTop&&(n+=" }; return validate; "),n}if(t.isTop){var d=t.isTop;g=t.level=0,c=t.dataLevel=0,h="data";if(t.rootId=t.resolve.fullPath(t.self._getId(t.root.schema)),t.baseId=t.baseId||t.rootId,delete t.isTop,t.dataPathArr=[void 0],void 0!==t.schema.default&&t.opts.useDefaults&&t.opts.strictDefaults){var Q="default is ignored in the schema root";if("log"!==t.opts.strictDefaults)throw new Error(Q);t.logger.warn(Q)}n+=" var vErrors = null; ",n+=" var errors = 0;     ",n+=" if (rootData === undefined) rootData = data; "}else{g=t.level,h="data"+((c=t.dataLevel)||"");if(o&&(t.baseId=t.resolve.url(t.baseId,o)),r&&!t.async)throw new Error("async schema in sync schema");n+=" var errs_"+g+" = errors;"}B="valid"+g,C=!t.opts.allErrors;var E="",p="",y=t.schema.type,v=Array.isArray(y);if(y&&t.opts.nullable&&!0===t.schema.nullable&&(v?-1==y.indexOf("null")&&(y=y.concat("null")):"null"!=y&&(y=[y,"null"],v=!0)),v&&1==y.length&&(y=y[0],v=!1),t.schema.$ref&&i){if("fail"==t.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+t.errSchemaPath+'" (see option extendRefs)');!0!==t.opts.extendRefs&&(i=!1,t.logger.warn('$ref: keywords ignored in schema at path "'+t.errSchemaPath+'"'))}if(t.schema.$comment&&t.opts.$comment&&(n+=" "+t.RULES.all.$comment.code(t,"$comment")),y){if(t.opts.coerceTypes)var m=t.util.coerceToTypes(t.opts.coerceTypes,y);var b=t.RULES.types[y];if(m||v||!0===b||b&&!z(b)){u=t.schemaPath+".type",l=t.errSchemaPath+"/type",u=t.schemaPath+".type",l=t.errSchemaPath+"/type";var F=v?"checkDataTypes":"checkDataType";if(n+=" if ("+t.util[F](y,h,!0)+") { ",m){var w="dataType"+g,S="coerced"+g;n+=" var "+w+" = typeof "+h+"; ","array"==t.opts.coerceTypes&&(n+=" if ("+w+" == 'object' && Array.isArray("+h+")) "+w+" = 'array'; "),n+=" var "+S+" = undefined; ";var D="",R=m;if(R)for(var U,G=-1,N=R.length-1;G<N;)U=R[G+=1],G&&(n+=" if ("+S+" === undefined) { ",D+="}"),"array"==t.opts.coerceTypes&&"array"!=U&&(n+=" if ("+w+" == 'array' && "+h+".length == 1) { "+S+" = "+h+" = "+h+"[0]; "+w+" = typeof "+h+";  } "),"string"==U?n+=" if ("+w+" == 'number' || "+w+" == 'boolean') "+S+" = '' + "+h+"; else if ("+h+" === null) "+S+" = ''; ":"number"==U||"integer"==U?(n+=" if ("+w+" == 'boolean' || "+h+" === null || ("+w+" == 'string' && "+h+" && "+h+" == +"+h+" ","integer"==U&&(n+=" && !("+h+" % 1)"),n+=")) "+S+" = +"+h+"; "):"boolean"==U?n+=" if ("+h+" === 'false' || "+h+" === 0 || "+h+" === null) "+S+" = false; else if ("+h+" === 'true' || "+h+" === 1) "+S+" = true; ":"null"==U?n+=" if ("+h+" === '' || "+h+" === 0 || "+h+" === false) "+S+" = null; ":"array"==t.opts.coerceTypes&&"array"==U&&(n+=" if ("+w+" == 'string' || "+w+" == 'number' || "+w+" == 'boolean' || "+h+" == null) "+S+" = ["+h+"]; ");n+=" "+D+" if ("+S+" === undefined) {   ",(X=X||[]).push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { type: '",n+=v?""+y.join(","):""+y,n+="' } ",!1!==t.opts.messages&&(n+=" , message: 'should be ",n+=v?""+y.join(","):""+y,n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";f=n;n=X.pop(),!t.compositeRule&&C?t.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else {  ";var k=c?"data"+(c-1||""):"parentData";n+=" "+h+" = "+S+"; ",c||(n+="if ("+k+" !== undefined)"),n+=" "+k+"["+(c?t.dataPathArr[c]:"parentDataProperty")+"] = "+S+"; } "}else{(X=X||[]).push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { type: '",n+=v?""+y.join(","):""+y,n+="' } ",!1!==t.opts.messages&&(n+=" , message: 'should be ",n+=v?""+y.join(","):""+y,n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";f=n;n=X.pop(),!t.compositeRule&&C?t.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" } "}}if(t.schema.$ref&&!i)n+=" "+t.RULES.all.$ref.code(t,"$ref")+" ",C&&(n+=" } if (errors === ",n+=d?"0":"errs_"+g,n+=") { ",p+="}");else{var x=t.RULES;if(x)for(var O=-1,M=x.length-1;O<M;)if(z(b=x[O+=1])){if(b.type&&(n+=" if ("+t.util.checkDataType(b.type,h)+") { "),t.opts.useDefaults)if("object"==b.type&&t.schema.properties){I=t.schema.properties;var L=Object.keys(I);if(L)for(var _,J=-1,T=L.length-1;J<T;){if(void 0!==(Y=I[_=L[J+=1]]).default){var j=h+t.util.getProperty(_);if(t.compositeRule){if(t.opts.strictDefaults){Q="default is ignored for: "+j;if("log"!==t.opts.strictDefaults)throw new Error(Q);t.logger.warn(Q)}}else n+=" if ("+j+" === undefined ","empty"==t.opts.useDefaults&&(n+=" || "+j+" === null || "+j+" === '' "),n+=" ) "+j+" = ","shared"==t.opts.useDefaults?n+=" "+t.useDefault(Y.default)+" ":n+=" "+JSON.stringify(Y.default)+" ",n+="; "}}}else if("array"==b.type&&Array.isArray(t.schema.items)){var H=t.schema.items;if(H){G=-1;for(var Y,V=H.length-1;G<V;)if(void 0!==(Y=H[G+=1]).default){j=h+"["+G+"]";if(t.compositeRule){if(t.opts.strictDefaults){Q="default is ignored for: "+j;if("log"!==t.opts.strictDefaults)throw new Error(Q);t.logger.warn(Q)}}else n+=" if ("+j+" === undefined ","empty"==t.opts.useDefaults&&(n+=" || "+j+" === null || "+j+" === '' "),n+=" ) "+j+" = ","shared"==t.opts.useDefaults?n+=" "+t.useDefault(Y.default)+" ":n+=" "+JSON.stringify(Y.default)+" ",n+="; "}}}var Z=b.rules;if(Z)for(var W,K=-1,P=Z.length-1;K<P;)if($(W=Z[K+=1])){var q=W.code(t,W.keyword,b.type);q&&(n+=" "+q+" ",C&&(E+="}"))}if(C&&(n+=" "+E+" ",E=""),b.type&&(n+=" } ",y&&y===b.type&&!m)){n+=" else { ";var X;u=t.schemaPath+".type",l=t.errSchemaPath+"/type";(X=X||[]).push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'type' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(l)+" , params: { type: '",n+=v?""+y.join(","):""+y,n+="' } ",!1!==t.opts.messages&&(n+=" , message: 'should be ",n+=v?""+y.join(","):""+y,n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";f=n;n=X.pop(),!t.compositeRule&&C?t.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } "}C&&(n+=" if (errors === ",n+=d?"0":"errs_"+g,n+=") { ",p+="}")}}function z(t){for(var e=t.rules,A=0;A<e.length;A++)if($(e[A]))return!0}function $(e){return void 0!==t.schema[e.keyword]||e.implements&&function(e){for(var A=e.implements,n=0;n<A.length;n++)if(void 0!==t.schema[A[n]])return!0}(e)}return C&&(n+=" "+p+" "),d?(r?(n+=" if (errors === 0) return data;           ",n+=" else throw new ValidationError(vErrors); "):(n+=" validate.errors = vErrors; ",n+=" return errors === 0;       "),n+=" }; return validate;"):n+=" var "+B+" = errors === errs_"+g+";",n=t.util.cleanUpCode(n),d&&(n=t.util.finalCleanUpCode(n,r)),n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r=" ",i=t.level,o=t.dataLevel,a=t.schema[e],s=t.schemaPath+t.util.getProperty(e),g=t.errSchemaPath+"/"+e,c=!t.opts.allErrors,I="data"+(o||""),u=t.opts.$data&&a&&a.$data;u?(r+=" var schema"+i+" = "+t.util.getData(a.$data,o,t.dataPathArr)+"; ",n="schema"+i):n=a;var l="maximum"==e,C=l?"exclusiveMaximum":"exclusiveMinimum",h=t.schema[C],B=t.opts.$data&&h&&h.$data,f=l?"<":">",d=l?">":"<",Q=void 0;if(B){var E=t.util.getData(h.$data,o,t.dataPathArr),p="exclusive"+i,y="exclType"+i,v="exclIsNumber"+i,m="' + "+(w="op"+i)+" + '";r+=" var schemaExcl"+i+" = "+E+"; ",r+=" var "+p+"; var "+y+" = typeof "+(E="schemaExcl"+i)+"; if ("+y+" != 'boolean' && "+y+" != 'undefined' && "+y+" != 'number') { ";var b;Q=C;(b=b||[]).push(r),r="",!1!==t.createErrors?(r+=" { keyword: '"+(Q||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: {} ",!1!==t.opts.messages&&(r+=" , message: '"+C+" should be boolean' "),t.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),r+=" } "):r+=" {} ";var F=r;r=b.pop(),!t.compositeRule&&c?t.async?r+=" throw new ValidationError(["+F+"]); ":r+=" validate.errors = ["+F+"]; return false; ":r+=" var err = "+F+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else if ( ",u&&(r+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),r+=" "+y+" == 'number' ? ( ("+p+" = "+n+" === undefined || "+E+" "+f+"= "+n+") ? "+I+" "+d+"= "+E+" : "+I+" "+d+" "+n+" ) : ( ("+p+" = "+E+" === true) ? "+I+" "+d+"= "+n+" : "+I+" "+d+" "+n+" ) || "+I+" !== "+I+") { var op"+i+" = "+p+" ? '"+f+"' : '"+f+"='; ",void 0===a&&(Q=C,g=t.errSchemaPath+"/"+C,n=E,u=B)}else{m=f;if((v="number"==typeof h)&&u){var w="'"+m+"'";r+=" if ( ",u&&(r+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),r+=" ( "+n+" === undefined || "+h+" "+f+"= "+n+" ? "+I+" "+d+"= "+h+" : "+I+" "+d+" "+n+" ) || "+I+" !== "+I+") { "}else{v&&void 0===a?(p=!0,Q=C,g=t.errSchemaPath+"/"+C,n=h,d+="="):(v&&(n=Math[l?"min":"max"](h,a)),h===(!v||n)?(p=!0,Q=C,g=t.errSchemaPath+"/"+C,d+="="):(p=!1,m+="="));w="'"+m+"'";r+=" if ( ",u&&(r+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),r+=" "+I+" "+d+" "+n+" || "+I+" !== "+I+") { "}}Q=Q||e,(b=b||[]).push(r),r="",!1!==t.createErrors?(r+=" { keyword: '"+(Q||"_limit")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: { comparison: "+w+", limit: "+n+", exclusive: "+p+" } ",!1!==t.opts.messages&&(r+=" , message: 'should be "+m+" ",r+=u?"' + "+n:n+"'"),t.opts.verbose&&(r+=" , schema:  ",r+=u?"validate.schema"+s:""+a,r+="         , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),r+=" } "):r+=" {} ";F=r;return r=b.pop(),!t.compositeRule&&c?t.async?r+=" throw new ValidationError(["+F+"]); ":r+=" validate.errors = ["+F+"]; return false; ":r+=" var err = "+F+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { "),r}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r=" ",i=t.level,o=t.dataLevel,a=t.schema[e],s=t.schemaPath+t.util.getProperty(e),g=t.errSchemaPath+"/"+e,c=!t.opts.allErrors,I="data"+(o||""),u=t.opts.$data&&a&&a.$data;u?(r+=" var schema"+i+" = "+t.util.getData(a.$data,o,t.dataPathArr)+"; ",n="schema"+i):n=a,r+="if ( ",u&&(r+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),r+=" "+I+".length "+("maxItems"==e?">":"<")+" "+n+") { ";var l=e,C=C||[];C.push(r),r="",!1!==t.createErrors?(r+=" { keyword: '"+(l||"_limitItems")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: { limit: "+n+" } ",!1!==t.opts.messages&&(r+=" , message: 'should NOT have ",r+="maxItems"==e?"more":"fewer",r+=" than ",r+=u?"' + "+n+" + '":""+a,r+=" items' "),t.opts.verbose&&(r+=" , schema:  ",r+=u?"validate.schema"+s:""+a,r+="         , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),r+=" } "):r+=" {} ";var h=r;return r=C.pop(),!t.compositeRule&&c?t.async?r+=" throw new ValidationError(["+h+"]); ":r+=" validate.errors = ["+h+"]; return false; ":r+=" var err = "+h+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+="} ",c&&(r+=" else { "),r}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r=" ",i=t.level,o=t.dataLevel,a=t.schema[e],s=t.schemaPath+t.util.getProperty(e),g=t.errSchemaPath+"/"+e,c=!t.opts.allErrors,I="data"+(o||""),u=t.opts.$data&&a&&a.$data;u?(r+=" var schema"+i+" = "+t.util.getData(a.$data,o,t.dataPathArr)+"; ",n="schema"+i):n=a;var l="maxLength"==e?">":"<";r+="if ( ",u&&(r+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===t.opts.unicode?r+=" "+I+".length ":r+=" ucs2length("+I+") ",r+=" "+l+" "+n+") { ";var C=e,h=h||[];h.push(r),r="",!1!==t.createErrors?(r+=" { keyword: '"+(C||"_limitLength")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: { limit: "+n+" } ",!1!==t.opts.messages&&(r+=" , message: 'should NOT be ",r+="maxLength"==e?"longer":"shorter",r+=" than ",r+=u?"' + "+n+" + '":""+a,r+=" characters' "),t.opts.verbose&&(r+=" , schema:  ",r+=u?"validate.schema"+s:""+a,r+="         , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),r+=" } "):r+=" {} ";var B=r;return r=h.pop(),!t.compositeRule&&c?t.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+="} ",c&&(r+=" else { "),r}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r=" ",i=t.level,o=t.dataLevel,a=t.schema[e],s=t.schemaPath+t.util.getProperty(e),g=t.errSchemaPath+"/"+e,c=!t.opts.allErrors,I="data"+(o||""),u=t.opts.$data&&a&&a.$data;u?(r+=" var schema"+i+" = "+t.util.getData(a.$data,o,t.dataPathArr)+"; ",n="schema"+i):n=a,r+="if ( ",u&&(r+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),r+=" Object.keys("+I+").length "+("maxProperties"==e?">":"<")+" "+n+") { ";var l=e,C=C||[];C.push(r),r="",!1!==t.createErrors?(r+=" { keyword: '"+(l||"_limitProperties")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: { limit: "+n+" } ",!1!==t.opts.messages&&(r+=" , message: 'should NOT have ",r+="maxProperties"==e?"more":"fewer",r+=" than ",r+=u?"' + "+n+" + '":""+a,r+=" properties' "),t.opts.verbose&&(r+=" , schema:  ",r+=u?"validate.schema"+s:""+a,r+="         , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),r+=" } "):r+=" {} ";var h=r;return r=C.pop(),!t.compositeRule&&c?t.async?r+=" throw new ValidationError(["+h+"]); ":r+=" validate.errors = ["+h+"]; return false; ":r+=" var err = "+h+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+="} ",c&&(r+=" else { "),r}},function(t){t.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(t,e){t.exports=function(t,e){for(var A=-1,n=null==t?0:t.length;++A<n&&!1!==e(t[A],A,t););return t}},function(t,e,A){var n=A(911),r=A(357),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,A){var o=t[e];i.call(t,e)&&r(o,A)&&(void 0!==A||e in t)||n(t,e,A)}},function(t,e,A){(function(t){var n=A(144),r=e&&!e.nodeType&&e,i=r&&"object"==typeof t&&t&&!t.nodeType&&t,o=i&&i.exports===r?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var A=t.length,n=a?a(A):new t.constructor(A);return t.copy(n),n}}).call(this,A(220)(t))},function(t,e){t.exports=function(t,e){var A=-1,n=t.length;for(e||(e=Array(n));++A<n;)e[A]=t[A];return e}},function(t,e,A){var n=A(553),r=A(913),i=A(554),o=A(586),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,i(t)),t=r(t);return e}:o;t.exports=a},function(t,e,A){var n=A(914);t.exports=function(t,e){var A=e?n(t.buffer):t.buffer;return new t.constructor(A,t.byteOffset,t.length)}},function(t,e,A){var n=A(1215),r=A(913),i=A(556);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:n(r(t))}},function(t,e,A){var n=A(553),r=A(1228);t.exports=function t(e,A,i,o,a){var s=-1,g=e.length;for(i||(i=r),a||(a=[]);++s<g;){var c=e[s];A>0&&i(c)?A>1?t(c,A-1,i,o,a):n(a,c):o||(a[a.length]=c)}return a}},function(t,e,A){var n=A(1076),r=Math.max;t.exports=function(t,e,A){return e=r(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=r(i.length-e,0),s=Array(a);++o<a;)s[o]=i[e+o];o=-1;for(var g=Array(e+1);++o<e;)g[o]=i[o];return g[e]=A(s),n(t,this,g)}}},function(t,e){t.exports=function(t,e,A){switch(A.length){case 0:return t.call(e);case 1:return t.call(e,A[0]);case 2:return t.call(e,A[0],A[1]);case 3:return t.call(e,A[0],A[1],A[2])}return t.apply(e,A)}},function(t,e,A){var n=A(1078),r=A(1080)(n);t.exports=r},function(t,e,A){var n=A(1079),r=A(912),i=A(748),o=r?function(t,e){return r(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:i;t.exports=o},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var A=Date.now;t.exports=function(t){var e=0,n=0;return function(){var r=A(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,A){var n=A(1230);t.exports=function(t,e){return!!(null==t?0:t.length)&&n(t,e,0)>-1}},function(t,e){t.exports=function(t,e,A){for(var n=-1,r=null==t?0:t.length;++n<r;)if(A(e,t[n]))return!0;return!1}},function(t,e,A){var n=A(1240);t.exports=function(t,e,A){if(n(t),void 0===e)return t;switch(A){case 1:return function(A){return t.call(e,A)};case 2:return function(A,n){return t.call(e,A,n)};case 3:return function(A,n,r){return t.call(e,A,n,r)}}return function(){return t.apply(e,arguments)}}},function(t,e,A){t.exports=!A(561)&&!A(792)((function(){return 7!=Object.defineProperty(A(1085)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,A){var n=A(725),r=A(559).document,i=n(r)&&n(r.createElement);t.exports=function(t){return i?r.createElement(t):{}}},function(t,e,A){var n=A(591),r=A(726),i=A(1242)(!1),o=A(918)("IE_PROTO");t.exports=function(t,e){var A,a=r(t),s=0,g=[];for(A in a)A!=o&&n(a,A)&&g.push(A);for(;e.length>s;)n(a,A=e[s++])&&(~i(g,A)||g.push(A));return g}},function(t,e,A){var n=A(1088);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==n(t)?t.split(""):Object(t)}},function(t,e){var A={}.toString;t.exports=function(t){return A.call(t).slice(8,-1)}},function(t,e,A){t.exports={default:A(1245),__esModule:!0}},function(t,e,A){"use strict";e.__esModule=!0;var n=o(A(1247)),r=o(A(1259)),i="function"===typeof r.default&&"symbol"===typeof n.default?function(t){return typeof t}:function(t){return t&&"function"===typeof r.default&&t.constructor===r.default&&t!==r.default.prototype?"symbol":typeof t};function o(t){return t&&t.__esModule?t:{default:t}}e.default="function"===typeof r.default&&"symbol"===i(n.default)?function(t){return"undefined"===typeof t?"undefined":i(t)}:function(t){return t&&"function"===typeof r.default&&t.constructor===r.default&&t!==r.default.prototype?"symbol":"undefined"===typeof t?"undefined":i(t)}},function(t,e,A){"use strict";var n=A(812),r=A(723),i=A(1092),o=A(724),a=A(923),s=A(1251),g=A(925),c=A(1254),I=A(727)("iterator"),u=!([].keys&&"next"in[].keys()),l=function(){return this};t.exports=function(t,e,A,C,h,B,f){s(A,e,C);var d,Q,E,p=function(t){if(!u&&t in b)return b[t];switch(t){case"keys":case"values":return function(){return new A(this,t)}}return function(){return new A(this,t)}},y=e+" Iterator",v="values"==h,m=!1,b=t.prototype,F=b[I]||b["@@iterator"]||h&&b[h],w=F||p(h),S=h?v?p("entries"):w:void 0,D="Array"==e&&b.entries||F;if(D&&(E=c(D.call(new t)))!==Object.prototype&&E.next&&(g(E,y,!0),n||"function"==typeof E[I]||o(E,I,l)),v&&F&&"values"!==F.name&&(m=!0,w=function(){return F.call(this)}),n&&!f||!u&&!m&&b[I]||o(b,I,w),a[e]=w,a[y]=l,h)if(d={values:v?w:p("values"),keys:B?w:p("keys"),entries:S},f)for(Q in d)Q in b||i(b,Q,d[Q]);else r(r.P+r.F*(u||m),e,d);return d}},function(t,e,A){t.exports=A(724)},function(t,e,A){var n=A(1086),r=A(920).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},function(t,e,A){var n=A(814),r=A(810),i=A(726),o=A(915),a=A(591),s=A(1084),g=Object.getOwnPropertyDescriptor;e.f=A(561)?g:function(t,e){if(t=i(t),e=o(e,!0),s)try{return g(t,e)}catch(A){}if(a(t,e))return r(!n.f.call(t,e),t[e])}},function(t,e,A){var n=A(1096),r=A(449);t.exports=function(t,e){return t&&n(t,e,r)}},function(t,e,A){var n=A(1280)();t.exports=n},function(t,e,A){var n=A(748);t.exports=function(t){return"function"==typeof t?t:n}},function(t,e,A){var n=A(244),r=A(913),i=A(207),o=Function.prototype,a=Object.prototype,s=o.toString,g=a.hasOwnProperty,c=s.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=n(t))return!1;var e=r(t);if(null===e)return!0;var A=g.call(e,"constructor")&&e.constructor;return"function"==typeof A&&A instanceof A&&s.call(A)==c}},function(t,e,A){var n=A(201);t.exports=function(t){return t===t&&!n(t)}},function(t,e){t.exports=function(t,e){return function(A){return null!=A&&(A[t]===e&&(void 0!==e||t in Object(A)))}}},function(t,e,A){var n=A(1102),r=A(815);t.exports=function(t,e){for(var A=0,i=(e=n(e,t)).length;null!=t&&A<i;)t=t[r(e[A++])];return A&&A==i?t:void 0}},function(t,e,A){var n=A(212),r=A(929),i=A(1287),o=A(1290);t.exports=function(t,e){return n(t)?t:r(t,e)?[t]:i(o(t))}},function(t,e,A){var n=A(1095),r=A(1299)(n);t.exports=r},function(t,e,A){var n=A(911),r=A(357);t.exports=function(t,e,A){(void 0!==A&&!r(t[e],A)||void 0===A&&!(e in t))&&n(t,e,A)}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!==typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorWrap=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},r=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),i=A(0),o=g(i),a=g(A(214)),s=g(A(432));function g(t){return t&&t.__esModule?t:{default:t}}var c=e.ColorWrap=function(t){var e=function(e){function A(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,A);var e=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(A.__proto__||Object.getPrototypeOf(A)).call(this));return e.handleChange=function(t,A){if(s.default.simpleCheckForValidColor(t)){var n=s.default.toState(t,t.h||e.state.oldHue);e.setState(n),e.props.onChangeComplete&&e.debounce(e.props.onChangeComplete,n,A),e.props.onChange&&e.props.onChange(n,A)}},e.handleSwatchHover=function(t,A){if(s.default.simpleCheckForValidColor(t)){var n=s.default.toState(t,t.h||e.state.oldHue);e.props.onSwatchHover&&e.props.onSwatchHover(n,A)}},e.state=n({},s.default.toState(t.color,0)),e.debounce=(0,a.default)((function(t,e,A){t(e,A)}),100),e}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(A,e),r(A,[{key:"render",value:function(){var e={};return this.props.onSwatchHover&&(e.onSwatchHover=this.handleSwatchHover),o.default.createElement(t,n({},this.props,this.state,{onChange:this.handleChange},e))}}],[{key:"getDerivedStateFromProps",value:function(t,e){return n({},s.default.toState(t.color,e.oldHue))}}]),A}(i.PureComponent||i.Component);return e.propTypes=n({},t.propTypes),e.defaultProps=n({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),e};e.default=c},function(t,e,A){"use strict";A.r(e),A.d(e,"red",(function(){return n})),A.d(e,"pink",(function(){return r})),A.d(e,"purple",(function(){return i})),A.d(e,"deepPurple",(function(){return o})),A.d(e,"indigo",(function(){return a})),A.d(e,"blue",(function(){return s})),A.d(e,"lightBlue",(function(){return g})),A.d(e,"cyan",(function(){return c})),A.d(e,"teal",(function(){return I})),A.d(e,"green",(function(){return u})),A.d(e,"lightGreen",(function(){return l})),A.d(e,"lime",(function(){return C})),A.d(e,"yellow",(function(){return h})),A.d(e,"amber",(function(){return B})),A.d(e,"orange",(function(){return f})),A.d(e,"deepOrange",(function(){return d})),A.d(e,"brown",(function(){return Q})),A.d(e,"grey",(function(){return E})),A.d(e,"blueGrey",(function(){return p})),A.d(e,"darkText",(function(){return y})),A.d(e,"lightText",(function(){return v})),A.d(e,"darkIcons",(function(){return m})),A.d(e,"lightIcons",(function(){return b})),A.d(e,"white",(function(){return F})),A.d(e,"black",(function(){return w}));var n={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"},r={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"},i={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"},a={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"},s={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"},g={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"},I={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"},u={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"},l={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"},C={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"},h={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"},B={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"},f={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"},d={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"},Q={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},E={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},p={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"},y={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)"},v={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)"},m={active:"rgba(0, 0, 0, 0.54)",inactive:"rgba(0, 0, 0, 0.38)"},b={active:"rgba(255, 255, 255, 1)",inactive:"rgba(255, 255, 255, 0.5)"},F="#ffffff",w="#000000";e.default={red:n,pink:r,purple:i,deepPurple:o,indigo:a,blue:s,lightBlue:g,cyan:c,teal:I,green:u,lightGreen:l,lime:C,yellow:h,amber:B,orange:f,deepOrange:d,brown:Q,grey:E,blueGrey:p,darkText:y,lightText:v,darkIcons:m,lightIcons:b,white:F,black:w}},function(t,e,A){var n=A(433);t.exports=function(t,e,A){return 0!==n(t,e,A)}},function(t,e,A){var n=A(934),r=A(1108),i=A(818),o=A(937),a=A(936),s=A(938);t.exports=function(t,e,A,g){switch(e){case"===":return"object"===typeof t&&(t=t.version),"object"===typeof A&&(A=A.version),t===A;case"!==":return"object"===typeof t&&(t=t.version),"object"===typeof A&&(A=A.version),t!==A;case"":case"=":case"==":return n(t,A,g);case"!=":return r(t,A,g);case">":return i(t,A,g);case">=":return o(t,A,g);case"<":return a(t,A,g);case"<=":return s(t,A,g);default:throw new TypeError("Invalid operator: ".concat(e))}}},function(t,e,A){var n=A(548);t.exports=function(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=n(t))){var e=0,A=function(){};return{s:A,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:A}}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,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}},function(t){t.exports=JSON.parse('{"a":"5.13.0"}')},function(t,e,A){"use strict";A.r(e);var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new Uint8Array(16);function i(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)}for(var o=[],a=0;a<256;++a)o[a]=(a+256).toString(16).substr(1);var s,g,c=function(t,e){var A=e||0,n=o;return[n[t[A++]],n[t[A++]],n[t[A++]],n[t[A++]],"-",n[t[A++]],n[t[A++]],"-",n[t[A++]],n[t[A++]],"-",n[t[A++]],n[t[A++]],"-",n[t[A++]],n[t[A++]],n[t[A++]],n[t[A++]],n[t[A++]],n[t[A++]]].join("")},I=0,u=0;var l=function(t,e,A){var n=e&&A||0,r=e||[],o=(t=t||{}).node||s,a=void 0!==t.clockseq?t.clockseq:g;if(null==o||null==a){var l=t.random||(t.rng||i)();null==o&&(o=s=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==a&&(a=g=16383&(l[6]<<8|l[7]))}var C=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:u+1,B=C-I+(h-u)/1e4;if(B<0&&void 0===t.clockseq&&(a=a+1&16383),(B<0||C>I)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");I=C,u=h,g=a;var f=(1e4*(268435455&(C+=122192928e5))+h)%4294967296;r[n++]=f>>>24&255,r[n++]=f>>>16&255,r[n++]=f>>>8&255,r[n++]=255&f;var d=C/4294967296*1e4&268435455;r[n++]=d>>>8&255,r[n++]=255&d,r[n++]=d>>>24&15|16,r[n++]=d>>>16&255,r[n++]=a>>>8|128,r[n++]=255&a;for(var Q=0;Q<6;++Q)r[n+Q]=o[Q];return e||c(r)};var C=function(t,e,A){var n=function(t,n,r,i){var o=r&&i||0;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=new Array(t.length),A=0;A<t.length;A++)e[A]=t.charCodeAt(A);return e}(t)),"string"==typeof n&&(n=function(t){var e=[];return t.replace(/[a-fA-F0-9]{2}/g,(function(t){e.push(parseInt(t,16))})),e}(n)),!Array.isArray(t))throw TypeError("value must be an array of bytes");if(!Array.isArray(n)||16!==n.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");var a=A(n.concat(t));if(a[6]=15&a[6]|e,a[8]=63&a[8]|128,r)for(var s=0;s<16;++s)r[o+s]=a[s];return r||c(a)};try{n.name=t}catch(r){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n};function h(t,e){var A=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(A>>16)<<16|65535&A}function B(t,e,A,n,r,i){return h((o=h(h(e,t),h(n,i)))<<(a=r)|o>>>32-a,A);var o,a}function f(t,e,A,n,r,i,o){return B(e&A|~e&n,t,e,r,i,o)}function d(t,e,A,n,r,i,o){return B(e&n|A&~n,t,e,r,i,o)}function Q(t,e,A,n,r,i,o){return B(e^A^n,t,e,r,i,o)}function E(t,e,A,n,r,i,o){return B(A^(e|~n),t,e,r,i,o)}var p=C("v3",48,(function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Array(e.length);for(var A=0;A<e.length;A++)t[A]=e.charCodeAt(A)}return function(t){var e,A,n,r=[],i=32*t.length;for(e=0;e<i;e+=8)A=t[e>>5]>>>e%32&255,n=parseInt("0123456789abcdef".charAt(A>>>4&15)+"0123456789abcdef".charAt(15&A),16),r.push(n);return r}(function(t,e){var A,n,r,i,o;t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;var a=1732584193,s=-271733879,g=-1732584194,c=271733878;for(A=0;A<t.length;A+=16)n=a,r=s,i=g,o=c,a=f(a,s,g,c,t[A],7,-680876936),c=f(c,a,s,g,t[A+1],12,-389564586),g=f(g,c,a,s,t[A+2],17,606105819),s=f(s,g,c,a,t[A+3],22,-1044525330),a=f(a,s,g,c,t[A+4],7,-176418897),c=f(c,a,s,g,t[A+5],12,1200080426),g=f(g,c,a,s,t[A+6],17,-1473231341),s=f(s,g,c,a,t[A+7],22,-45705983),a=f(a,s,g,c,t[A+8],7,1770035416),c=f(c,a,s,g,t[A+9],12,-1958414417),g=f(g,c,a,s,t[A+10],17,-42063),s=f(s,g,c,a,t[A+11],22,-1990404162),a=f(a,s,g,c,t[A+12],7,1804603682),c=f(c,a,s,g,t[A+13],12,-40341101),g=f(g,c,a,s,t[A+14],17,-1502002290),s=f(s,g,c,a,t[A+15],22,1236535329),a=d(a,s,g,c,t[A+1],5,-165796510),c=d(c,a,s,g,t[A+6],9,-1069501632),g=d(g,c,a,s,t[A+11],14,643717713),s=d(s,g,c,a,t[A],20,-373897302),a=d(a,s,g,c,t[A+5],5,-701558691),c=d(c,a,s,g,t[A+10],9,38016083),g=d(g,c,a,s,t[A+15],14,-660478335),s=d(s,g,c,a,t[A+4],20,-405537848),a=d(a,s,g,c,t[A+9],5,568446438),c=d(c,a,s,g,t[A+14],9,-1019803690),g=d(g,c,a,s,t[A+3],14,-187363961),s=d(s,g,c,a,t[A+8],20,1163531501),a=d(a,s,g,c,t[A+13],5,-1444681467),c=d(c,a,s,g,t[A+2],9,-51403784),g=d(g,c,a,s,t[A+7],14,1735328473),s=d(s,g,c,a,t[A+12],20,-1926607734),a=Q(a,s,g,c,t[A+5],4,-378558),c=Q(c,a,s,g,t[A+8],11,-2022574463),g=Q(g,c,a,s,t[A+11],16,1839030562),s=Q(s,g,c,a,t[A+14],23,-35309556),a=Q(a,s,g,c,t[A+1],4,-1530992060),c=Q(c,a,s,g,t[A+4],11,1272893353),g=Q(g,c,a,s,t[A+7],16,-155497632),s=Q(s,g,c,a,t[A+10],23,-1094730640),a=Q(a,s,g,c,t[A+13],4,681279174),c=Q(c,a,s,g,t[A],11,-358537222),g=Q(g,c,a,s,t[A+3],16,-722521979),s=Q(s,g,c,a,t[A+6],23,76029189),a=Q(a,s,g,c,t[A+9],4,-640364487),c=Q(c,a,s,g,t[A+12],11,-421815835),g=Q(g,c,a,s,t[A+15],16,530742520),s=Q(s,g,c,a,t[A+2],23,-995338651),a=E(a,s,g,c,t[A],6,-198630844),c=E(c,a,s,g,t[A+7],10,1126891415),g=E(g,c,a,s,t[A+14],15,-1416354905),s=E(s,g,c,a,t[A+5],21,-57434055),a=E(a,s,g,c,t[A+12],6,1700485571),c=E(c,a,s,g,t[A+3],10,-1894986606),g=E(g,c,a,s,t[A+10],15,-1051523),s=E(s,g,c,a,t[A+1],21,-2054922799),a=E(a,s,g,c,t[A+8],6,1873313359),c=E(c,a,s,g,t[A+15],10,-30611744),g=E(g,c,a,s,t[A+6],15,-1560198380),s=E(s,g,c,a,t[A+13],21,1309151649),a=E(a,s,g,c,t[A+4],6,-145523070),c=E(c,a,s,g,t[A+11],10,-1120210379),g=E(g,c,a,s,t[A+2],15,718787259),s=E(s,g,c,a,t[A+9],21,-343485551),a=h(a,n),s=h(s,r),g=h(g,i),c=h(c,o);return[a,s,g,c]}(function(t){var e,A=[];for(A[(t.length>>2)-1]=void 0,e=0;e<A.length;e+=1)A[e]=0;var n=8*t.length;for(e=0;e<n;e+=8)A[e>>5]|=(255&t[e/8])<<e%32;return A}(t),8*t.length))}));var y=function(t,e,A){var n=e&&A||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var r=(t=t||{}).random||(t.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e)for(var o=0;o<16;++o)e[n+o]=r[o];return e||c(r)};function v(t,e,A,n){switch(t){case 0:return e&A^~e&n;case 1:return e^A^n;case 2:return e&A^e&n^A&n;case 3:return e^A^n}}function m(t,e){return t<<e|t>>>32-e}var b=C("v5",80,(function(t){var e=[1518500249,1859775393,2400959708,3395469782],A=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var n=unescape(encodeURIComponent(t));t=new Array(n.length);for(var r=0;r<n.length;r++)t[r]=n.charCodeAt(r)}t.push(128);var i=t.length/4+2,o=Math.ceil(i/16),a=new Array(o);for(r=0;r<o;r++){a[r]=new Array(16);for(var s=0;s<16;s++)a[r][s]=t[64*r+4*s]<<24|t[64*r+4*s+1]<<16|t[64*r+4*s+2]<<8|t[64*r+4*s+3]}for(a[o-1][14]=8*(t.length-1)/Math.pow(2,32),a[o-1][14]=Math.floor(a[o-1][14]),a[o-1][15]=8*(t.length-1)&4294967295,r=0;r<o;r++){for(var g=new Array(80),c=0;c<16;c++)g[c]=a[r][c];for(c=16;c<80;c++)g[c]=m(g[c-3]^g[c-8]^g[c-14]^g[c-16],1);var I=A[0],u=A[1],l=A[2],C=A[3],h=A[4];for(c=0;c<80;c++){var B=Math.floor(c/20),f=m(I,5)+v(B,u,l,C)+h+e[B]+g[c]>>>0;h=C,C=l,l=m(u,30)>>>0,u=I,I=f}A[0]=A[0]+I>>>0,A[1]=A[1]+u>>>0,A[2]=A[2]+l>>>0,A[3]=A[3]+C>>>0,A[4]=A[4]+h>>>0}return[A[0]>>24&255,A[0]>>16&255,A[0]>>8&255,255&A[0],A[1]>>24&255,A[1]>>16&255,A[1]>>8&255,255&A[1],A[2]>>24&255,A[2]>>16&255,A[2]>>8&255,255&A[2],A[3]>>24&255,A[3]>>16&255,A[3]>>8&255,255&A[3],A[4]>>24&255,A[4]>>16&255,A[4]>>8&255,255&A[4]]}));A.d(e,"v1",(function(){return l})),A.d(e,"v3",(function(){return p})),A.d(e,"v4",(function(){return y})),A.d(e,"v5",(function(){return b}))},function(t,e,A){"use strict";A.r(e);var n=A(345);var r=function(t){if(!t)throw new Error("line is required");var e=t.geometry?t.geometry.type:t.type;if(!Array.isArray(t)&&"LineString"!==e)throw new Error("geometry must be a LineString");for(var A,n,r=function(t){if(!t)throw new Error("coords is required");if("Feature"===t.type&&null!==t.geometry)return t.geometry.coordinates;if(t.coordinates)return t.coordinates;if(Array.isArray(t))return t;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(t),i=0,o=1;o<r.length;)A=n||r[0],i+=((n=r[o])[0]-A[0])*(n[1]+A[1]),o++;return i>0};function i(t,e){if(!a(e=e||{}))throw new Error("options is invalid");var A=e.bbox,n=e.id;if(!t)throw new Error("No features passed");if(!Array.isArray(t))throw new Error("features must be an Array");A&&s(A),n&&g(n);var r={type:"FeatureCollection"};return n&&(r.id=n),A&&(r.bbox=A),r.features=t,r}function o(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function a(t){return!!t&&t.constructor===Object}function s(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!o(t))throw new Error("bbox must only contain numbers")}))}function g(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}function c(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var A=0;A<t.features.length&&!1!==e(t.features[A],A);A++);}function I(t,e){var A,n,r,i,o,a,s,g,c,I,u=0,l="FeatureCollection"===t.type,C="Feature"===t.type,h=l?t.features.length:1;for(A=0;A<h;A++){for(a=l?t.features[A].geometry:C?t.geometry:t,g=l?t.features[A].properties:C?t.properties:{},c=l?t.features[A].bbox:C?t.bbox:void 0,I=l?t.features[A].id:C?t.id:void 0,o=(s=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,r=0;r<o;r++)if(null!==(i=s?a.geometries[r]:a))switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(i,u,g,c,I))return!1;break;case"GeometryCollection":for(n=0;n<i.geometries.length;n++)if(!1===e(i.geometries[n],u,g,c,I))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,u,g,c,I))return!1;u++}}function u(t){if(!t)throw new Error("coords is required");if("Feature"===t.type&&null!==t.geometry)return t.geometry.coordinates;if(t.coordinates)return t.coordinates;if(Array.isArray(t))return t;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function l(t,e){switch("Feature"===t.type?t.geometry.type:t.type){case"GeometryCollection":return I(t,(function(t){l(t,e)})),t;case"LineString":return C(u(t),e),t;case"Polygon":return h(u(t),e),t;case"MultiLineString":return u(t).forEach((function(t){C(t,e)})),t;case"MultiPolygon":return u(t).forEach((function(t){h(t,e)})),t;case"Point":case"MultiPoint":return t}}function C(t,e){r(t)===e&&t.reverse()}function h(t,e){r(t[0])!==e&&t[0].reverse();for(var A=1;A<t.length;A++)r(t[A])===e&&t[A].reverse()}e.default=function(t,e){if(!a(e=e||{}))throw new Error("options is invalid");var A=e.reverse||!1,r=e.mutate||!1;if(!t)throw new Error("<geojson> is required");if("boolean"!==typeof A)throw new Error("<reverse> must be a boolean");if("boolean"!==typeof r)throw new Error("<mutate> must be a boolean");!1===r&&(t=Object(n.a)(t));var o=[];switch(t.type){case"GeometryCollection":return I(t,(function(t){l(t,A)})),t;case"FeatureCollection":return c(t,(function(t){c(l(t,A),(function(t){o.push(t)}))})),i(o)}return l(t,A)}},function(t,e,A){"use strict";A.r(e);var n=A(345);function r(t,e,A){if(!a(A=A||{}))throw new Error("options is invalid");var n=A.bbox,r=A.id;if(void 0===t)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");n&&s(n),r&&g(r);var i={type:"Feature"};return r&&(i.id=r),n&&(i.bbox=n),i.properties=e||{},i.geometry=t,i}function i(t,e,A){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!o(t[0])||!o(t[1]))throw new Error("coordinates must contain numbers");return r({type:"Point",coordinates:t},e,A)}function o(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function a(t){return!!t&&t.constructor===Object}function s(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!o(t))throw new Error("bbox must only contain numbers")}))}function g(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}function c(t,e,A){if(null!==t)for(var n,r,i,o,a,s,g,I,u=0,l=0,C=t.type,h="FeatureCollection"===C,B="Feature"===C,f=h?t.features.length:1,d=0;d<f;d++){a=(I=!!(g=h?t.features[d].geometry:B?t.geometry:t)&&"GeometryCollection"===g.type)?g.geometries.length:1;for(var Q=0;Q<a;Q++){var E=0,p=0;if(null!==(o=I?g.geometries[Q]:g)){s=o.coordinates;var y=o.type;switch(u=!A||"Polygon"!==y&&"MultiPolygon"!==y?0:1,y){case null:break;case"Point":if(!1===e(s,l,d,E,p))return!1;l++,E++;break;case"LineString":case"MultiPoint":for(n=0;n<s.length;n++){if(!1===e(s[n],l,d,E,p))return!1;l++,"MultiPoint"===y&&E++}"LineString"===y&&E++;break;case"Polygon":case"MultiLineString":for(n=0;n<s.length;n++){for(r=0;r<s[n].length-u;r++){if(!1===e(s[n][r],l,d,E,p))return!1;l++}"MultiLineString"===y&&E++,"Polygon"===y&&p++}"Polygon"===y&&E++;break;case"MultiPolygon":for(n=0;n<s.length;n++){for("MultiPolygon"===y&&(p=0),r=0;r<s[n].length;r++){for(i=0;i<s[n][r].length-u;i++){if(!1===e(s[n][r][i],l,d,E,p))return!1;l++}p++}E++}break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===c(o.geometries[n],e,A))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function I(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var A=0;A<t.features.length&&!1!==e(t.features[A],A);A++);}var u=function(t){var e=[1/0,1/0,-1/0,-1/0];return c(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e};var l=function(t,e){if(!a(e=e||{}))throw new Error("options is invalid");var A=e.properties;if(!t)throw new Error("geojson is required");var n=u(t);return i([(n[0]+n[2])/2,(n[1]+n[3])/2],A)};var C=function(t,e){var A=0,n=0,r=0;return c(t,(function(t){A+=t[0],n+=t[1],r++}),!0),i([A/r,n/r],e)},h=A(606),B=A(607),f=A(362);function d(t,e,A){var n="Point"===function(t,e){if(!t)throw new Error((e||"geojson")+" is required");if(t.geometry&&t.geometry.type)return t.geometry.type;if(t.type)return t.type;throw new Error((e||"geojson")+" is invalid")}(t);return A=function(t,e){void 0!==e&&null!==e||(e="centroid");if(Array.isArray(e)||"object"===typeof e)return function(t){if(!t)throw new Error("coord is required");if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates;if(Array.isArray(t)&&t.length>=2&&void 0===t[0].length&&void 0===t[1].length)return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}(e);var A=t.bbox?t.bbox:u(t),n=A[0],r=A[1],o=A[2],a=A[3];switch(e){case"sw":case"southwest":case"westsouth":case"bottomleft":return i([n,r]);case"se":case"southeast":case"eastsouth":case"bottomright":return i([o,r]);case"nw":case"northwest":case"westnorth":case"topleft":return i([n,a]);case"ne":case"northeast":case"eastnorth":case"topright":return i([o,a]);case"center":return l(t);case void 0:case null:case"centroid":return C(t);default:throw new Error("invalid origin")}}(t,A),1===e||n||c(t,(function(t){var n=Object(B.a)(A,t),r=Object(h.a)(A,t),i=n*e,o=function(t){if(!t)throw new Error("coords is required");if("Feature"===t.type&&null!==t.geometry)return t.geometry.coordinates;if(t.coordinates)return t.coordinates;if(Array.isArray(t))return t;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(Object(f.a)(A,i,r));t[0]=o[0],t[1]=o[1],3===t.length&&(t[2]*=e)})),t}e.default=function(t,e,A){if(!a(A=A||{}))throw new Error("options is invalid");var r=A.origin,i=A.mutate;if(!t)throw new Error("geojson required");if("number"!==typeof e||0===e)throw new Error("invalid factor");var o=Array.isArray(r)||"object"===typeof r;return!0!==i&&(t=Object(n.a)(t)),"FeatureCollection"!==t.type||o?d(t,e,r):(I(t,(function(A,n){t.features[n]=d(A,e,r)})),t)}},function(t,e,A){"use strict";A.r(e);function n(t){return!!t&&t.constructor===Object}function r(t,e,A){if(null!==t)for(var n,i,o,a,s,g,c,I,u=0,l=0,C=t.type,h="FeatureCollection"===C,B="Feature"===C,f=h?t.features.length:1,d=0;d<f;d++){s=(I=!!(c=h?t.features[d].geometry:B?t.geometry:t)&&"GeometryCollection"===c.type)?c.geometries.length:1;for(var Q=0;Q<s;Q++){var E=0,p=0;if(null!==(a=I?c.geometries[Q]:c)){g=a.coordinates;var y=a.type;switch(u=!A||"Polygon"!==y&&"MultiPolygon"!==y?0:1,y){case null:break;case"Point":if(!1===e(g,l,d,E,p))return!1;l++,E++;break;case"LineString":case"MultiPoint":for(n=0;n<g.length;n++){if(!1===e(g[n],l,d,E,p))return!1;l++,"MultiPoint"===y&&E++}"LineString"===y&&E++;break;case"Polygon":case"MultiLineString":for(n=0;n<g.length;n++){for(i=0;i<g[n].length-u;i++){if(!1===e(g[n][i],l,d,E,p))return!1;l++}"MultiLineString"===y&&E++,"Polygon"===y&&p++}"Polygon"===y&&E++;break;case"MultiPolygon":for(n=0;n<g.length;n++){for("MultiPolygon"===y&&(p=0),i=0;i<g[n].length;i++){for(o=0;o<g[n][i].length-u;o++){if(!1===e(g[n][i][o],l,d,E,p))return!1;l++}p++}E++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===r(a.geometries[n],e,A))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}var i=A(345),o=A(362);e.default=function(t,e,A,a){if(!n(a=a||{}))throw new Error("options is invalid");var s=a.units,g=a.zTranslation,c=a.mutate;if(!t)throw new Error("geojson is required");if(void 0===e||null===e||isNaN(e))throw new Error("distance is required");if(g&&"number"!==typeof g&&isNaN(g))throw new Error("zTranslation is not a number");if(g=void 0!==g?g:0,0===e&&0===g)return t;if(void 0===A||null===A||isNaN(A))throw new Error("direction is required");return e<0&&(e=-e,A=-A),!1!==c&&void 0!==c||(t=Object(i.a)(t)),r(t,(function(t){var n=function(t){if(!t)throw new Error("coords is required");if("Feature"===t.type&&null!==t.geometry)return t.geometry.coordinates;if(t.coordinates)return t.coordinates;if(Array.isArray(t))return t;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}(Object(o.a)(t,e,A,{units:s}));t[0]=n[0],t[1]=n[1],g&&3===t.length&&(t[2]+=g)})),t}},function(t,e,A){var n=A(1202);t.exports=function(t){return n(t,5)}},function(t,e,A){"use strict";A.d(e,"a",(function(){return I}));var n=A(21),r=A(13),i=A(0),o=A.n(i),a=A(63),s=A(140),g=A(213),c=A(947);function I(t){var e=t.coordinationScopes,A=t.removeGridComponent,i=t.theme,I=t.title,u=void 0===I?"Status":I,l=Object(a.f)(s.b.status,e),C=Object(r.a)(l,1)[0],h=C.cellHighlight,B=C.geneHighlight,f=C.moleculeHighlight,d=Object(a.r)(),Q=[].concat(Object(n.a)(h?["Hovered cell ".concat(h)]:[]),Object(n.a)(B?["Hovered gene ".concat(B)]:[]),Object(n.a)(f?["Hovered gene ".concat(f)]:[])).join("; ");return o.a.createElement(g.a,{title:u,theme:i,removeGridComponent:A,isScroll:!0,isReady:!0},o.a.createElement(c.a,{warn:d,info:Q}))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return C}));var n=A(13),r=A(0),i=A.n(r),o=A(73),a=A(145),s=A(150),g=A(63),c=A(140),I=A(213),u=A(949),l=["expression-matrix"];function C(t){var e=t.coordinationScopes,A=t.removeGridComponent,C=t.variablesLabelOverride,h=void 0===C?"gene":C,B=t.variablesPluralLabelOverride,f=void 0===B?"".concat(h,"s"):B,d=t.theme,Q=t.title,E=void 0===Q?"Expression Levels":Q,p=Object(g.j)(),y=Object(g.f)(c.b.genes,e),v=Object(n.a)(y,2),m=v[0],b=m.dataset,F=m.geneSelection,w=m.geneFilter,S=m.cellColorEncoding,D=v[1],R=D.setGeneSelection,U=D.setGeneFilter,G=D.setGeneHighlight,N=D.setCellColorEncoding,k=Object(a.e)(),x=Object(n.a)(k,3),O=x[0],M=x[1],L=x[2],_=Object(a.d)(l),J=Object(n.a)(_,3),T=J[0],j=J[1],H=J[2];Object(r.useEffect)((function(){L(),H()}),[p,b]);var Y=Object(s.d)(p,b,j,M,!0),V=Object(n.a)(Y,1)[0],Z=V?V.cols:[],W=Z.length;return i.a.createElement(I.a,{title:E,info:"".concat(W," ").concat(Object(o.f)(h,f,W)),theme:d,isScroll:!0,removeGridComponent:A,isReady:T,urls:O},i.a.createElement(u.a,{hasColorEncoding:"geneSelection"===S,geneList:Z,geneSelection:F,geneFilter:w,setGeneSelection:function(t){R(t),N("geneSelection")},setGeneFilter:U,setGeneHighlight:G}))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return v}));var n=A(20),r=A(21),i=A(13),o=A(0),a=A.n(o),s=A(89),g=A.n(s),c=A(611),I=A(63),u=A(140),l=A(950),C=A(213),h=A(137),B=A(131),f=A(422),d=A(101),Q=A(145),E=A(87),p=A(150),y=["cells","cell-sets"];function v(t){var e=t.coordinationScopes,A=t.removeGridComponent,s=t.theme,v=t.title,m=void 0===v?"Cell Sets":v,b=Object(I.j)(),F=Object(I.p)(),w=Object(I.f)(u.b.cellSets,e),S=Object(i.a)(w,2),D=S[0],R=D.dataset,U=D.cellSetSelection,G=D.cellSetColor,N=D.additionalCellSets,k=D.cellColorEncoding,x=S[1],O=x.setCellSetSelection,M=x.setCellColorEncoding,L=x.setCellSetColor,_=x.setAdditionalCellSets,J=Object(Q.e)(),T=Object(i.a)(J,3),j=T[0],H=T[1],Y=T[2],V=Object(Q.d)(y),Z=Object(i.a)(V,3),W=Z[0],K=Z[1],P=Z[2],q=Object(o.useState)([]),X=Object(i.a)(q,2),z=X[0],$=X[1];Object(o.useEffect)((function(){Y(),P(),$([])}),[b,R]);var tt=Object(p.b)(b,R,K,H,!0),et=Object(i.a)(tt,1)[0],At=Object(p.a)(b,R,K,H,!0,{setCellSetSelection:O,setCellSetColor:L},{cellSetSelection:U,cellSetColor:G}),nt=Object(i.a)(At,1)[0];Object(o.useEffect)((function(){if(N){var t;try{t=Object(f.f)(N,d.h)}catch(e){return void F(e.message)}_(t)}}),[N,_,F]);var rt=Object(o.useMemo)((function(){return et?Object.keys(et):[]}),[et]);function it(){M("cellSetSelection")}var ot=Object(o.useMemo)((function(){return Object(E.n)(nt,N)}),[nt,N]),at=Object(o.useMemo)((function(){return U&&U.length>0&&ot&&ot.tree.length>0?Object(h.p)(ot,U):null}),[U,ot]);return a.a.createElement(C.a,{title:m,isScroll:!0,removeGridComponent:A,urls:j,theme:s,isReady:W},a.a.createElement(l.a,{setColor:G,sets:nt,additionalSets:N,levelSelection:at,setSelection:U,setExpansion:z,hasColorEncoding:"cellSetSelection"===k,draggable:!0,datatype:d.h,onError:F,onCheckNode:function(t,e){var A=Array.isArray(t)?t:t.split(B.a);t&&(O(e?[].concat(Object(r.a)(U),[A]):U.filter((function(t){return!g()(t,A)}))),it())},onExpandNode:function(t,e,A){$(A?function(t){return[].concat(Object(r.a)(t),[e.split(B.a)])}:function(t){return t.filter((function(t){return!g()(t,e.split(B.a))}))})},onDropNode:function(t,e,A,i){var o=t.split(B.a),a=Object(h.l)(N,o);if(a.children||i){var s=0===o.length-1,c=e.split(B.a),I=Object(h.l)(N,c);if(!s||!i||I.children){var u,l,C;s?C=N.tree.findIndex((function(t){return t.name===a.name})):(l=o.slice(0,-1),C=(u=Object(h.l)(N,l)).children.findIndex((function(t){return t.name===a.name})));var f=I.name;if(!(!s&&i?u.children.find((function(t){return t!==I&&t.name===f})):i?N.tree.find((function(t){return t!==I&&t.name===f})):a.children.find((function(t){return t!==I&&t.name===f})))){var d=Object(n.a)({},N,{tree:N.tree.map((function(t){return Object(h.a)(t,[],c)})).filter(Boolean)});C=s?d.tree.findIndex((function(t){return t.name===a.name})):u.children.findIndex((function(t){return t.name===a.name}));var Q=[];if(i&&s)if(-1===A)d.tree.unshift(I),_(d),Q=[I.name],O([Q]);else{var E=C+(A>C?1:0),p=Array.from(d.tree);p.splice(E,0,I),d.tree=p,_(d),Q=[I.name],O([Q])}else{var y,v,m=[];if(i){if(!s)if(v=function(t){return g()(t,l)},-1===A)y=function(t){return Object(h.f)(t,I)};else{var b=C+(A>C?1:0);y=function(t){return Object(h.e)(t,I,b)}}}else y=function(t){return Object(h.d)(t,I)},v=function(t){return g()(t,o)};d.tree=d.tree.map((function(t){return Object(h.i)(t,(function(t,e){return v(e)}),(function(t){return y(t)}),m)})),_(d),Q=[].concat(Object(r.a)(m[0]),[I.name]),O([Q])}var F=G.filter((function(t){return Object(B.f)(c,t.path)})).map((function(t){return Object(n.a)({},t,{path:g()(t.path,c)?Q:Q.concat(t.path.slice(c.length))})})),w=G.filter((function(t){return!Object(B.f)(c,t.path)}));w.push.apply(w,Object(r.a)(F)),L(w)}}}},onCheckLevel:function(t,e){var A=ot.tree.find((function(e){return e.name===t}));if(A){var n=Object(h.g)(A,e,[],!0);O(n),it()}},onNodeSetColor:function(t,e){var A=null===G||void 0===G?void 0:G.find((function(e){return g()(e.path,t)}));L([].concat(A?Object(r.a)(G.filter((function(e){return!g()(e.path,t)}))):Object(r.a)(G||[]),[{path:t,color:e}]))},onNodeSetName:function(t,e){var A=Object(r.a)(t);A.pop(),A.push(e);var i=Object(n.a)({},N,{tree:N.tree.map((function(A){return function A(i,o){return g()([].concat(Object(r.a)(o),[i.name]),t)?Object(n.a)({},i,{name:e}):i.children?Object(n.a)({},i,{children:i.children.map((function(t){return A(t,[].concat(Object(r.a)(o),[i.name]))}))}):i}(A,[])}))}),o=G.map((function(e){return{path:Object(B.h)(t,e.path,A),color:e.color}})),a=U.map((function(e){return Object(B.h)(t,e,A)})),s=z.map((function(e){return Object(B.h)(t,e,A)}));_(i),L(o),O(a),$(s)},onNodeCheckNewName:function(t,e){var A=Object(r.a)(t);return A.pop(),A.push(e),!g()(t,A)&&Object(h.l)(N,A)},onNodeRemove:function(t){var e=Object(n.a)({},N,{tree:N.tree.map((function(e){return Object(h.a)(e,[],t)})).filter(Boolean)}),A=G.filter((function(e){return!Object(B.f)(t,e.path)})),r=U.filter((function(e){return!Object(B.f)(t,e)})),i=z.filter((function(e){return!Object(B.f)(t,e)}));_(e),L(A),O(r),$(i)},onNodeView:function(t){var e=[];!function t(A,n){z.find((function(t){return g()(n,t)}))&&A.children?A.children.forEach((function(e){t(e,[].concat(Object(r.a)(n),[e.name]))})):e.push(n)}(Object(h.l)(ot,t),t),O(e),it()},onImportTree:function(t){if(!Object(h.u)(ot,t)){_(Object(n.a)({},N||Object(h.m)(d.h),{tree:[].concat(Object(r.a)(N?N.tree:[]),Object(r.a)(t.tree))}));var e=Object(h.c)(t,G);L([].concat(Object(r.a)(G),Object(r.a)(e)))}},onCreateLevelZeroNode:function(){var t=Object(E.m)(null===N||void 0===N?void 0:N.tree,"My hierarchy ");_(Object(n.a)({},N||Object(h.m)(d.h),{tree:[].concat(Object(r.a)(N?N.tree:[]),[{name:t,children:[]}])}))},onExportLevelZeroNodeJSON:function(t){var e=Object(h.j)(ot,t,d.h,G),A=e.treeToExport,n=e.nodeName;Object(f.a)(Object(f.b)(A),"".concat(n,"_").concat(c.name,"-").concat(d.h,"-hierarchy.").concat(d.a))},onExportLevelZeroNodeTabular:function(t){var e=Object(h.j)(ot,t,d.h,G),A=e.treeToExport,n=e.nodeName;Object(f.a)(Object(f.c)(A),"".concat(n,"_").concat(c.name,"-").concat(d.h,"-hierarchy.").concat(d.b))},onExportSetJSON:function(t){var e=Object(h.k)(ot,t),A=e.setToExport,n=e.nodeName;Object(f.a)(Object(f.b)(A),"".concat(n,"_").concat(c.name,"-").concat(d.h,"-set.").concat(d.a),d.a)},onUnion:function(){var t=Object(h.t)(ot,U);Object(E.o)(t,N,G,O,_,L,M,"Union ")},onIntersection:function(){var t=Object(h.q)(ot,U);Object(E.o)(t,N,G,O,_,L,M,"Intersection ")},onComplement:function(){var t=Object(h.o)(ot,U,rt);Object(E.o)(t,N,G,O,_,L,M,"Complement ")},hasCheckedSetsToUnion:(null===U||void 0===U?void 0:U.length)>1,hasCheckedSetsToIntersect:(null===U||void 0===U?void 0:U.length)>1,hasCheckedSetsToComplement:(null===U||void 0===U?void 0:U.length)>0}))}},function(t,e,A){"use strict";A.d(e,"a",(function(){return h}));var n=A(13),r=A(0),i=A.n(r),o=A(213),a=A(63),s=A(140),g=A(145),c=A(87),I=A(150),u=A(137),l=A(948),C=["cell-sets"];function h(t){var e=t.coordinationScopes,A=t.removeGridComponent,h=t.theme,B=t.title,f=void 0===B?"Cell Set Sizes":B,d=Object(a.j)(),Q=Object(a.f)(s.b.cellSetSizes,e),E=Object(n.a)(Q,2),p=E[0],y=p.dataset,v=p.cellSetSelection,m=p.cellSetColor,b=p.additionalCellSets,F=E[1],w=F.setCellSetSelection,S=F.setCellSetColor,D=Object(g.c)(),R=Object(n.a)(D,3),U=R[0],G=R[1],N=R[2],k=Object(g.e)(),x=Object(n.a)(k,3),O=x[0],M=x[1],L=x[2],_=Object(g.d)(C),J=Object(n.a)(_,3),T=J[0],j=J[1],H=J[2];Object(r.useEffect)((function(){L(),H()}),[d,y]);var Y=Object(I.a)(d,y,j,M,!0,{setCellSetSelection:w,setCellSetColor:S},{cellSetSelection:v,cellSetColor:m}),V=Object(n.a)(Y,1)[0],Z=Object(r.useMemo)((function(){return Object(c.n)(V,b)}),[V,b]),W=Object(r.useMemo)((function(){return Z&&v&&m?Object(u.s)(Z,v,m):[]}),[Z,v,m]);return i.a.createElement(o.a,{title:f,removeGridComponent:A,urls:O,theme:h,isReady:T},i.a.createElement("div",{ref:N,className:"vega-container"},i.a.createElement(l.a,{data:W,theme:h,width:U,height:G})))}},function(t,e,A){"use strict";var n=A(2),r=A.n(n),i=A(20),o=A(8),a=A(13),s=A(21),g=A(0),c=A.n(g),I=A(833),u=A(213),l=A(12),C=A(1142),h=A(214),B=A.n(h),f=A(89),d=A.n(f),Q=A(546),E=A(1132),p=A.n(E),y=A(941),v=A(254),m=A(907),b=A(1131),F=A.n(b),w=A(87),S=Object(Q.a)((function(t){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:t.palette.action.selected,"stroke-width":"1px"}}})),D=function(t){var e=t.handleChange,A=S();return c.a.createElement("div",{className:A.container,"aria-label":"color-swatch"},w.e.map((function(t){return c.a.createElement(m.a,{className:A.button,key:t,onClick:function(){return e(t)}},c.a.createElement(F.a,{fontSize:"small",style:{color:"rgb(".concat(t,")")},className:A.icon}))})))},R=Object(Q.a)((function(){return{menuButton:{backgroundColor:"transparent"},colors:{"&:hover":{backgroundColor:"transparent"},paddingLeft:"2px",paddingRight:"2px"}}}));var U=function(t){var e=t.handlePropertyChange,A=t.handleChannelRemove,n=t.handleIQRUpdate,r=Object(g.useReducer)((function(t){return!t}),!1),i=Object(a.a)(r,2),o=i[0],s=i[1],I=R();return c.a.createElement(v.b,{open:o,toggle:s,buttonIcon:c.a.createElement(p.a,{fontSize:"small"}),buttonClassName:I.menuButton},c.a.createElement(y.a,{dense:!0,disableGutters:!0,onClick:function(){s(),A()}},c.a.createElement(v.a,null,"Remove")),c.a.createElement(y.a,{dense:!0,disableGutters:!0,onClick:n},c.a.createElement(v.a,null,"Use IQR")),c.a.createElement(y.a,{dense:!0,disableGutters:!0,className:I.colors},c.a.createElement(D,{handleChange:function(t){e("color",t)}})))},G=A(798),N=A(73),k=A(358),x=A(1141),O=A(976);function M(t){var e=t.handleChange,A=t.disabled,n=t.channelOptions,r=t.selectionIndex;return c.a.createElement(O.a,{native:!0,value:r,onChange:function(t){return e(Number(t.target.value))}},n.map((function(t,e){return c.a.createElement("option",{disabled:A,key:t,value:e},t)})))}function L(t){var e=t.color,A=t.checked,n=t.toggle,r=t.disabled;return c.a.createElement(x.a,{onChange:n,checked:A,disabled:r,style:{color:e,"&$checked":{color:e}}})}function _(t){var e=5;Number.isInteger(t)||--e,t<1&&--e;var A=Intl.NumberFormat("en-US",{maximumSignificantDigits:e,useGrouping:!1}).format(t);return A.length<=5?A:t.toExponential(0)}function J(t){var e=t.color,A=t.slider,n=void 0===A?[0,0]:A,r=t.handleChange,i=t.domain,o=void 0===i?[0,0]:i,s=t.dtype,I=t.disabled,u=Object(a.a)(o,2),l=u[0],h=u[1],f=Object(g.useCallback)(B()(r,3,{trailing:!0}),[r]),d=h-l<500&&"Float32"===s?(h-l)/500:1;return c.a.createElement(C.a,{value:n,valueLabelFormat:_,onChange:function(t,e){return f(e)},valueLabelDisplay:"auto",getAriaLabel:function(){return"".concat(e,"-").concat(n)},min:l,max:h,step:d,orientation:"horizontal",style:{color:e,marginTop:"7px"},disabled:I})}var T=function(t){var e=t.visibility,A=void 0!==e&&e,n=t.slider,r=t.color,o=t.channels,s=t.channelId,u=t.domainType,C=t.dimName,h=t.theme,B=t.loader,f=t.colormapOn,Q=t.channelOptions,E=t.handlePropertyChange,p=t.handleChannelRemove,y=t.handleIQRUpdate,v=t.selectionIndex,m=t.isLoading,b=t.use3d,F=Object(N.d)(B).dtype,w=Object(g.useState)(null),S=Object(a.a)(w,2),D=S[0],R=S[1],x=Object(g.useState)(null),O=Object(a.a)(x,2),_=O[0],T=O[1],j=Object(g.useState)(null),H=Object(a.a)(j,2),Y=H[0],V=H[1],Z=Object(g.useState)([Object(i.a)({},o[s].selection)]),W=Object(a.a)(Z,2),K=W[0],P=W[1],q=function(t,e,A){var n=t||"light"===A&&e.every((function(t){return 255===t}))?[220,220,220]:e;return"rgb(".concat(n,")")}(f,r,h);return Object(g.useEffect)((function(){var t=!0;if(F&&B&&o){var e=[Object(i.a)({},o[s].selection)],A=u!==_,n=Y!==b,r=!d()(e,K);if(A||r||n)if("Full"===u){var g=[G.a[F]],c=Object(a.a)(g,1)[0];t&&(R(c),T(u),r&&P(e),n&&V(b))}else Object(k.c)({loader:B.data,selections:e,use3d:b}).then((function(A){var i=A.domains,o=Object(a.a)(i,1)[0];t&&(R(o),T(u),r&&P(e),n&&V(b))}))}return function(){t=!1}}),[_,o,s,B,F,u,K,b,Y]),c.a.createElement(I.a,{container:!0,direction:"column",m:1,justify:"center"},c.a.createElement(I.a,{container:!0,direction:"row",justify:"space-between"},c.a.createElement(I.a,{item:!0,xs:10},c.a.createElement(M,{handleChange:function(t){return E("selection",(e=t,Object(l.a)({},C,e)));var e},selectionIndex:v,channelOptions:Q,disabled:m})),c.a.createElement(I.a,{item:!0,xs:1,style:{marginTop:"4px"}},c.a.createElement(U,{handlePropertyChange:E,handleChannelRemove:p,handleIQRUpdate:y,disabled:m}))),c.a.createElement(I.a,{container:!0,direction:"row",justify:"space-between"},c.a.createElement(I.a,{item:!0,xs:2},c.a.createElement(L,{color:q,checked:A,toggle:function(){return E("visible",!A)},disabled:m})),c.a.createElement(I.a,{item:!0,xs:9},c.a.createElement(J,{color:q,slider:n,domain:D||G.a[F],dtype:F,handleChange:function(t){return E("slider",t)},disabled:m}))))},j=A(1133),H=A.n(j);var Y=function(t){var e=t.visibility,A=void 0!==e&&e,n=t.dimName,r=t.channelOptions,i=t.handlePropertyChange,o=t.handleChannelRemove,a=t.selectionIndex,s=t.disableOptions,g=void 0!==s&&s;return c.a.createElement(I.a,{container:!0,direction:"row",justify:"space-between"},c.a.createElement(I.a,{item:!0,xs:2},c.a.createElement(L,{color:[220,220,220],checked:A,toggle:function(){return i("visible",!A)}})),c.a.createElement(I.a,{item:!0,xs:9},c.a.createElement(M,{handleChange:function(t){return i("selection",(e=t,Object(l.a)({},n,e)));var e},selectionIndex:a,disableOptions:g,channelOptions:r})),c.a.createElement(I.a,{item:!0,xs:1},c.a.createElement(m.a,{onClick:o,style:{padding:"6px 6px 6px 0px"}},c.a.createElement(H.a,null))))},V=A(828),Z=A(951),W=A(830),K=A.n(W),P=Object(Q.a)((function(){return{addButton:{marginTop:"10px",marginBottom:"10px",fontWeight:400}}}));function q(){return c.a.createElement(c.a.Fragment,null,c.a.createElement(K.a,null),"Add Image Layer")}var X=function(t){var e=t.imageOptions,A=t.handleImageAdd,n=Object(g.useReducer)((function(t){return!t}),!1),r=Object(a.a)(n,2),i=r[0],o=r[1],s=P();return e?c.a.createElement(v.b,{open:i,toggle:o,buttonIcon:c.a.createElement(q,null),buttonClassName:s.addButton},e.map((function(t,e){return c.a.createElement(y.a,{dense:!0,key:t.name,onClick:function(){return function(t){o(),A(t)}(e)}},c.a.createElement("span",null,t.name))}))):null},z=A(145),$=A(150),tt=A(63),et=A(140),At=A(427),nt=A(158),rt=["raster"],it=c.a.memo(Object(g.forwardRef)((function(t,e){var A=t.title,n=t.removeGridComponent,r=t.theme,i=t.isReady,o=t.moleculesLayer,a=t.dataset,g=t.setMoleculesLayer,l=t.cellsLayer,C=t.canShowCellVecmask,h=t.setCellsLayer,B=t.rasterLayers,f=t.imageLayerLoaders,d=t.imageLayerMeta,Q=t.rasterLayersCallbacks,E=t.setRasterLayersCallbacks,p=t.areLoadingRasterChannnels,y=t.setAreLoadingRasterChannnels,v=t.handleRasterLayerChange,m=t.handleRasterLayerRemove,b=t.disable3d,F=t.globalDisable3d,w=t.layerIs3DIndex,S=t.setZoom,D=t.setTargetX,R=t.setTargetY,U=t.setTargetZ,G=t.setRotationX,N=t.setRotationOrbit,k=t.componentHeight,x=t.componentWidth,O=t.spatialLayout,M=t.handleImageAdd;return c.a.createElement(u.a,{title:A,isScroll:!0,removeGridComponent:n,theme:r,isReady:i},c.a.createElement("div",{className:"layer-controller-container",ref:e},o&&c.a.createElement(V.a,{key:"".concat(a,"-molecules"),label:"Molecules",layerType:"molecules",layer:o,handleLayerChange:g}),l&&C&&c.a.createElement(V.a,{key:"".concat(a,"-cells"),label:"Cell Segmentations",layerType:"cells",layer:l,handleLayerChange:h}),B&&B.map((function(t,e){var A,n=t.index,i=f[n],o=d[n],g=!(null===o||void 0===o||null===(A=o.metadata)||void 0===A?void 0:A.isBitmask),u=g?T:Y,l=(p||[])[e]||[];return i&&o?c.a.createElement(I.a,{key:"".concat(a,"-raster-").concat(n,"-").concat(e),item:!0,style:{marginTop:"10px"}},c.a.createElement(Z.a,{name:o.name,layer:t,loader:i,theme:r,handleLayerChange:function(t){return v(t,e)},handleLayerRemove:function(){return m(e)},ChannelController:u,shouldShowTransparentColor:g,shouldShowDomain:g,shouldShowColormap:g,disable3d:F||(b||[]).indexOf(o.name)>=0||"number"===typeof w&&-1!==w&&w!==e,disabled:"number"===typeof w&&-1!==w&&w!==e,rasterLayersCallbacks:Q,setRasterLayerCallback:function(t){var A=Object(s.a)(Q||[]);A[e]=t,E(A)},setViewState:function(t){var e=t.zoom,A=t.target,n=t.rotationX,r=t.rotationOrbit;S(e),D(A[0]),R(A[1]),U(A[2]),G(n),N(r)},setAreLayerChannelsLoading:function(t){var A=Object(s.a)(p||[]);A[e]=t,y(A)},areLayerChannelsLoading:l,spatialHeight:k*O.h/12,spatialWidth:x*O.w/12})):null})),c.a.createElement(I.a,{item:!0},c.a.createElement(X,{imageOptions:d,handleImageAdd:M}))))})));e.a=function(t){var e=t.coordinationScopes,A=t.removeGridComponent,n=t.theme,I=t.title,u=void 0===I?"Spatial Layers":I,l=t.disable3d,C=t.globalDisable3d,h=Object(tt.j)(),B=Object(tt.f)(et.b.layerController,e),f=Object(a.a)(B,2),d=f[0],Q=d.dataset,E=d.spatialRasterLayers,p=d.spatialCellsLayer,y=d.spatialMoleculesLayer,v=f[1],m=v.setSpatialRasterLayers,b=v.setSpatialCellsLayer,F=v.setSpatialMoleculesLayer,w=v.setSpatialTargetX,S=v.setSpatialTargetY,D=v.setSpatialTargetZ,R=v.setSpatialRotationX,U=v.setSpatialRotationOrbit,G=v.setSpatialZoom,N=Object(tt.a)(et.b.layerController,e),k=Object(a.a)(N,2),x=k[0],O=x.rasterLayersCallbacks,M=x.areLoadingRasterChannnels,L=k[1],_=L.setRasterLayersCallbacks,J=L.setAreLoadingRasterChannnels,T=Object(tt.d)("spatial",["spatialRasterLayers"],e),j=Object(a.a)(T,1)[0],H=Object(g.useRef)(),Y=Object(z.a)(H),V=Object(a.a)(Y,2),Z=V[0],W=V[1],K=Object(z.f)(),P=K.height,q=K.width,X=Object(z.d)(rt),ot=Object(a.a)(X,3),at=ot[0],st=ot[1],gt=ot[2];Object(g.useEffect)((function(){gt()}),[h,Q]);var ct=Object($.j)(h,Q,st,(function(){}),!1,{setSpatialRasterLayers:m},{spatialRasterLayers:E}),It=Object(a.a)(ct,3),ut=(It[0],It[1]),lt=It[2];Object($.b)(h,Q,st,(function(){}),!1,{setSpatialCellsLayer:b},{spatialCellsLayer:p}),Object($.h)(h,Q,st,(function(){}),!1,{setSpatialMoleculesLayer:F},{spatialMoleculesLayer:y});var Ct=Object(g.useCallback)(function(){var t=Object(o.a)(r.a.mark((function t(e){var A,n,o,a,g,c,I,u,l;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=ut[e],t.next=3,Object(At.c)(c,(E[e]||{}).use3d);case 3:I=t.sent,u=Object(i.a)({index:e,modelMatrix:null===(A=lt[e])||void 0===A||null===(n=A.metadata)||void 0===n||null===(o=n.transform)||void 0===o?void 0:o.matrix},nt.f,{channels:I,type:(null===(a=lt[e])||void 0===a||null===(g=a.metadata)||void 0===g?void 0:g.isBitmask)?"bitmask":"raster"}),l=[].concat(Object(s.a)(E),[u]),m(l);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),[ut,lt,E,m]),ht=Object(g.useCallback)((function(t,e){var A=Object(s.a)(E);A[e]=t,m(A)}),[E,m]),Bt=Object(g.useCallback)((function(t){var e=Object(s.a)(E);e.splice(t,1),m(e)}),[E,m]),ft=(lt.length?lt:[{metadata:{isBitmask:!0}}]).every((function(t){var e;return!(null===t||void 0===t||null===(e=t.metadata)||void 0===e?void 0:e.isBitmask)})),dt=(null===E||void 0===E?void 0:E.findIndex)&&E.findIndex((function(t){return t.use3d}));return c.a.createElement(it,{ref:H,title:u,removeGridComponent:A,theme:n,isReady:at,moleculesLayer:y,dataset:Q,setMoleculesLayer:F,cellsLayer:p,canShowCellVecmask:ft,setCellsLayer:b,rasterLayers:E,imageLayerLoaders:ut,imageLayerMeta:lt,rasterLayersCallbacks:O,setRasterLayersCallbacks:_,areLoadingRasterChannnels:M,setAreLoadingRasterChannnels:J,handleRasterLayerChange:ht,handleRasterLayerRemove:Bt,disable3d:l,globalDisable3d:C,layerIs3DIndex:dt,setZoom:G,setTargetX:w,setTargetY:S,setTargetZ:D,setRotationX:R,setRotationOrbit:U,componentHeight:W||P,componentWidth:Z||q,spatialLayout:j,handleImageAdd:Ct})}},function(t,e,A){t.exports=function(){return A(1165)('!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){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(6),o=e(3);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(14)();t.exports=r},function(t,n,e){var r=e(0),o=e(7),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(5),o=e(11),i=e(12),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(8).Symbol;t.exports=r},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){var r=e(4),o=e(13);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,n,e){var r=e(9),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(10))},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(5),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 null!=t&&"object"==typeof t}},function(t,n,e){var r=e(15),o=e(16),i=e(22);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(17),o=e(18),i=e(21),u=e(0);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(19),o=e(20);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,n,e){var r=e(4),o=e(0);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){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(3);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){"use strict";e.r(n);e(1);var r=e(2),o=e.n(r);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={getTile:function({curr:t,tileI:n,tileJ:e,tileSize:r,cellOrdering:o,rows:i,cols:u,data:c,transpose:f}){const l=new Uint8Array(c),a=u.length;return[{tile:(f?v:d)(l,{tileSize:r,tileI:n,tileJ:e,numCells:o.length,numGenes:a,cellOrdering:o,cells:i}),buffer:c,curr:t},[c]]}};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=364e613d9567f8763e1f.worker.js.map',null)}},function(t,e,A){(function(t){(function(e){"use strict";function A(){}function n(){n.init.call(this)}function r(t){return void 0===t._maxListeners?n.defaultMaxListeners:t._maxListeners}function i(t,e,A){if(e)t.call(A);else for(var n=t.length,r=l(t,n),i=0;i<n;++i)r[i].call(A)}function o(t,e,A,n){if(e)t.call(A,n);else for(var r=t.length,i=l(t,r),o=0;o<r;++o)i[o].call(A,n)}function a(t,e,A,n,r){if(e)t.call(A,n,r);else for(var i=t.length,o=l(t,i),a=0;a<i;++a)o[a].call(A,n,r)}function s(t,e,A,n,r,i){if(e)t.call(A,n,r,i);else for(var o=t.length,a=l(t,o),s=0;s<o;++s)a[s].call(A,n,r,i)}function g(t,e,A,n){if(e)t.apply(A,n);else for(var r=t.length,i=l(t,r),o=0;o<r;++o)i[o].apply(A,n)}function c(t,e,n,i){var o,a,s,g;if("function"!==typeof n)throw new TypeError('"listener" argument must be a function');if((a=t._events)?(a.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),a=t._events),s=a[e]):(a=t._events=new A,t._eventsCount=0),s){if("function"===typeof s?s=a[e]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),!s.warned&&(o=r(t))&&o>0&&s.length>o){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,g=c,"function"===typeof console.warn?console.warn(g):console.log(g)}}else s=a[e]=n,++t._eventsCount;return t}function I(t,e,A){var n=!1;function r(){t.removeListener(e,r),n||(n=!0,A.apply(t,arguments))}return r.listener=A,r}function u(t){var e=this._events;if(e){var A=e[t];if("function"===typeof A)return 1;if(A)return A.length}return 0}function l(t,e){for(var A=new Array(e);e--;)A[e]=t[e];return A}A.prototype=Object.create(null),n.EventEmitter=n,n.usingDomains=!1,n.prototype.domain=void 0,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.init=function(){this.domain=null,n.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new A,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(t){if("number"!==typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},n.prototype.getMaxListeners=function(){return r(this)},n.prototype.emit=function(t){var e,A,n,r,c,I,u,l="error"===t;if(I=this._events)l=l&&null==I.error;else if(!l)return!1;if(u=this.domain,l){if(e=arguments[1],!u){if(e instanceof Error)throw e;var C=new Error('Uncaught, unspecified "error" event. ('+e+")");throw C.context=e,C}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=u,e.domainThrown=!1,u.emit("error",e),!1}if(!(A=I[t]))return!1;var h="function"===typeof A;switch(n=arguments.length){case 1:i(A,h,this);break;case 2:o(A,h,this,arguments[1]);break;case 3:a(A,h,this,arguments[1],arguments[2]);break;case 4:s(A,h,this,arguments[1],arguments[2],arguments[3]);break;default:for(r=new Array(n-1),c=1;c<n;c++)r[c-1]=arguments[c];g(A,h,this,r)}return!0},n.prototype.addListener=function(t,e){return c(this,t,e,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(t,e){return c(this,t,e,!0)},n.prototype.once=function(t,e){if("function"!==typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,I(this,t,e)),this},n.prototype.prependOnceListener=function(t,e){if("function"!==typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,I(this,t,e)),this},n.prototype.removeListener=function(t,e){var n,r,i,o,a;if("function"!==typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[t]))return this;if(n===e||n.listener&&n.listener===e)0===--this._eventsCount?this._events=new A:(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!==typeof n){for(i=-1,o=n.length;o-- >0;)if(n[o]===e||n[o].listener&&n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;if(1===n.length){if(n[0]=void 0,0===--this._eventsCount)return this._events=new A,this;delete r[t]}else!function(t,e){for(var A=e,n=A+1,r=t.length;n<r;A+=1,n+=1)t[A]=t[n];t.pop()}(n,i);r.removeListener&&this.emit("removeListener",t,a||e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new A,this._eventsCount=0):n[t]&&(0===--this._eventsCount?this._events=new A:delete n[t]),this;if(0===arguments.length){for(var r,i=Object.keys(n),o=0;o<i.length;++o)"removeListener"!==(r=i[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new A,this._eventsCount=0,this}if("function"===typeof(e=n[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},n.prototype.listeners=function(t){var e,A=this._events;return A&&(e=A[t])?"function"===typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),A=0;A<e.length;++A)e[A]=t[A].listener||t[A];return e}(e):[]},n.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):u.call(t,e)},n.prototype.listenerCount=u,n.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var C="undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},h=[],B=[],f="undefined"!==typeof Uint8Array?Uint8Array:Array,d=!1;function Q(){d=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,A=t.length;e<A;++e)h[e]=t[e],B[t.charCodeAt(e)]=e;B["-".charCodeAt(0)]=62,B["_".charCodeAt(0)]=63}function E(t,e,A){for(var n,r,i=[],o=e;o<A;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(h[(r=n)>>18&63]+h[r>>12&63]+h[r>>6&63]+h[63&r]);return i.join("")}function p(t){var e;d||Q();for(var A=t.length,n=A%3,r="",i=[],o=0,a=A-n;o<a;o+=16383)i.push(E(t,o,o+16383>a?a:o+16383));return 1===n?(e=t[A-1],r+=h[e>>2],r+=h[e<<4&63],r+="=="):2===n&&(e=(t[A-2]<<8)+t[A-1],r+=h[e>>10],r+=h[e>>4&63],r+=h[e<<2&63],r+="="),i.push(r),i.join("")}function y(t,e,A,n,r){var i,o,a=8*r-n-1,s=(1<<a)-1,g=s>>1,c=-7,I=A?r-1:0,u=A?-1:1,l=t[e+I];for(I+=u,i=l&(1<<-c)-1,l>>=-c,c+=a;c>0;i=256*i+t[e+I],I+=u,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=256*o+t[e+I],I+=u,c-=8);if(0===i)i=1-g;else{if(i===s)return o?NaN:1/0*(l?-1:1);o+=Math.pow(2,n),i-=g}return(l?-1:1)*o*Math.pow(2,i-n)}function v(t,e,A,n,r,i){var o,a,s,g=8*i-r-1,c=(1<<g)-1,I=c>>1,u=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:i-1,C=n?1:-1,h=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-o))<1&&(o--,s*=2),(e+=o+I>=1?u/s:u*Math.pow(2,1-I))*s>=2&&(o++,s/=2),o+I>=c?(a=0,o=c):o+I>=1?(a=(e*s-1)*Math.pow(2,r),o+=I):(a=e*Math.pow(2,I-1)*Math.pow(2,r),o=0));r>=8;t[A+l]=255&a,l+=C,a/=256,r-=8);for(o=o<<r|a,g+=r;g>0;t[A+l]=255&o,l+=C,o/=256,g-=8);t[A+l-C]|=128*h}var m={}.toString,b=Array.isArray||function(t){return"[object Array]"==m.call(t)};function F(){return S.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function w(t,e){if(F()<e)throw new RangeError("Invalid typed array length");return S.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=S.prototype:(null===t&&(t=new S(e)),t.length=e),t}function S(t,e,A){if(!S.TYPED_ARRAY_SUPPORT&&!(this instanceof S))return new S(t,e,A);if("number"===typeof t){if("string"===typeof e)throw new Error("If encoding is specified then the first argument must be a string");return U(this,t)}return D(this,t,e,A)}function D(t,e,A,n){if("number"===typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,A,n){if(e.byteLength,A<0||e.byteLength<A)throw new RangeError("'offset' is out of bounds");if(e.byteLength<A+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===A&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,A):new Uint8Array(e,A,n),S.TYPED_ARRAY_SUPPORT?(t=e).__proto__=S.prototype:t=G(t,e),t}(t,e,A,n):"string"===typeof e?function(t,e,A){if("string"===typeof A&&""!==A||(A="utf8"),!S.isEncoding(A))throw new TypeError('"encoding" must be a valid string encoding');var n=0|x(e,A),r=(t=w(t,n)).write(e,A);return r!==n&&(t=t.slice(0,r)),t}(t,e,A):function(t,e){if(k(e)){var A=0|N(e.length);return 0===(t=w(t,A)).length||e.copy(t,0,0,A),t}if(e){if("undefined"!==typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!==typeof e.length||(n=e.length)!==n?w(t,0):G(t,e);if("Buffer"===e.type&&b(e.data))return G(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function R(t){if("number"!==typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function U(t,e){if(R(e),t=w(t,e<0?0:0|N(e)),!S.TYPED_ARRAY_SUPPORT)for(var A=0;A<e;++A)t[A]=0;return t}function G(t,e){var A=e.length<0?0:0|N(e.length);t=w(t,A);for(var n=0;n<A;n+=1)t[n]=255&e[n];return t}function N(t){if(t>=F())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+F().toString(16)+" bytes");return 0|t}function k(t){return!(null==t||!t._isBuffer)}function x(t,e){if(k(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var A=t.length;if(0===A)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return A;case"utf8":case"utf-8":case void 0:return ot(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*A;case"hex":return A>>>1;case"base64":return at(t).length;default:if(n)return ot(t).length;e=(""+e).toLowerCase(),n=!0}}function O(t,e,A){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===A||A>this.length)&&(A=this.length),A<=0)return"";if((A>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return q(this,e,A);case"utf8":case"utf-8":return W(this,e,A);case"ascii":return K(this,e,A);case"latin1":case"binary":return P(this,e,A);case"base64":return Z(this,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,e,A);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function M(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function L(t,e,A,n,r){if(0===t.length)return-1;if("string"===typeof A?(n=A,A=0):A>2147483647?A=2147483647:A<-2147483648&&(A=-2147483648),A=+A,isNaN(A)&&(A=r?0:t.length-1),A<0&&(A=t.length+A),A>=t.length){if(r)return-1;A=t.length-1}else if(A<0){if(!r)return-1;A=0}if("string"===typeof e&&(e=S.from(e,n)),k(e))return 0===e.length?-1:_(t,e,A,n,r);if("number"===typeof e)return e&=255,S.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,A):Uint8Array.prototype.lastIndexOf.call(t,e,A):_(t,[e],A,n,r);throw new TypeError("val must be string, number or Buffer")}function _(t,e,A,n,r){var i,o=1,a=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,a/=2,s/=2,A/=2}function g(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var c=-1;for(i=A;i<a;i++)if(g(t,i)===g(e,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*o}else-1!==c&&(i-=i-c),c=-1}else for(A+s>a&&(A=a-s),i=A;i>=0;i--){for(var I=!0,u=0;u<s;u++)if(g(t,i+u)!==g(e,u)){I=!1;break}if(I)return i}return-1}function J(t,e,A,n){A=Number(A)||0;var r=t.length-A;n?(n=Number(n))>r&&(n=r):n=r;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;t[A+o]=a}return o}function T(t,e,A,n){return st(ot(e,t.length-A),t,A,n)}function j(t,e,A,n){return st(function(t){for(var e=[],A=0;A<t.length;++A)e.push(255&t.charCodeAt(A));return e}(e),t,A,n)}function H(t,e,A,n){return j(t,e,A,n)}function Y(t,e,A,n){return st(at(e),t,A,n)}function V(t,e,A,n){return st(function(t,e){for(var A,n,r,i=[],o=0;o<t.length&&!((e-=2)<0);++o)A=t.charCodeAt(o),n=A>>8,r=A%256,i.push(r),i.push(n);return i}(e,t.length-A),t,A,n)}function Z(t,e,A){return 0===e&&A===t.length?p(t):p(t.slice(e,A))}function W(t,e,A){A=Math.min(t.length,A);for(var n=[],r=e;r<A;){var i,o,a,s,g=t[r],c=null,I=g>239?4:g>223?3:g>191?2:1;if(r+I<=A)switch(I){case 1:g<128&&(c=g);break;case 2:128===(192&(i=t[r+1]))&&(s=(31&g)<<6|63&i)>127&&(c=s);break;case 3:i=t[r+1],o=t[r+2],128===(192&i)&&128===(192&o)&&(s=(15&g)<<12|(63&i)<<6|63&o)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[r+1],o=t[r+2],a=t[r+3],128===(192&i)&&128===(192&o)&&128===(192&a)&&(s=(15&g)<<18|(63&i)<<12|(63&o)<<6|63&a)>65535&&s<1114112&&(c=s)}null===c?(c=65533,I=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),r+=I}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var A="",n=0;n<e;)A+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return A}(n)}function K(t,e,A){var n="";A=Math.min(t.length,A);for(var r=e;r<A;++r)n+=String.fromCharCode(127&t[r]);return n}function P(t,e,A){var n="";A=Math.min(t.length,A);for(var r=e;r<A;++r)n+=String.fromCharCode(t[r]);return n}function q(t,e,A){var n,r=t.length;(!e||e<0)&&(e=0),(!A||A<0||A>r)&&(A=r);for(var i="",o=e;o<A;++o)i+=(n=t[o])<16?"0"+n.toString(16):n.toString(16);return i}function X(t,e,A){for(var n=t.slice(e,A),r="",i=0;i<n.length;i+=2)r+=String.fromCharCode(n[i]+256*n[i+1]);return r}function z(t,e,A){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>A)throw new RangeError("Trying to access beyond buffer length")}function $(t,e,A,n,r,i){if(!k(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<i)throw new RangeError('"value" argument is out of bounds');if(A+n>t.length)throw new RangeError("Index out of range")}function tt(t,e,A,n){e<0&&(e=65535+e+1);for(var r=0,i=Math.min(t.length-A,2);r<i;++r)t[A+r]=(e&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function et(t,e,A,n){e<0&&(e=4294967295+e+1);for(var r=0,i=Math.min(t.length-A,4);r<i;++r)t[A+r]=e>>>8*(n?r:3-r)&255}function At(t,e,A,n,r,i){if(A+n>t.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function nt(t,e,A,n,r){return r||At(t,0,A,4),v(t,e,A,n,23,4),A+4}function rt(t,e,A,n,r){return r||At(t,0,A,8),v(t,e,A,n,52,8),A+8}S.TYPED_ARRAY_SUPPORT=void 0===C.TYPED_ARRAY_SUPPORT||C.TYPED_ARRAY_SUPPORT,S.poolSize=8192,S._augment=function(t){return t.__proto__=S.prototype,t},S.from=function(t,e,A){return D(null,t,e,A)},S.TYPED_ARRAY_SUPPORT&&(S.prototype.__proto__=Uint8Array.prototype,S.__proto__=Uint8Array),S.alloc=function(t,e,A){return function(t,e,A,n){return R(e),e<=0?w(t,e):void 0!==A?"string"===typeof n?w(t,e).fill(A,n):w(t,e).fill(A):w(t,e)}(null,t,e,A)},S.allocUnsafe=function(t){return U(null,t)},S.allocUnsafeSlow=function(t){return U(null,t)},S.isBuffer=gt,S.compare=function(t,e){if(!k(t)||!k(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var A=t.length,n=e.length,r=0,i=Math.min(A,n);r<i;++r)if(t[r]!==e[r]){A=t[r],n=e[r];break}return A<n?-1:n<A?1:0},S.isEncoding=function(t){switch(String(t).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}},S.concat=function(t,e){if(!b(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return S.alloc(0);var A;if(void 0===e)for(e=0,A=0;A<t.length;++A)e+=t[A].length;var n=S.allocUnsafe(e),r=0;for(A=0;A<t.length;++A){var i=t[A];if(!k(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,r),r+=i.length}return n},S.byteLength=x,S.prototype._isBuffer=!0,S.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)M(this,e,e+1);return this},S.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)M(this,e,e+3),M(this,e+1,e+2);return this},S.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)M(this,e,e+7),M(this,e+1,e+6),M(this,e+2,e+5),M(this,e+3,e+4);return this},S.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?W(this,0,t):O.apply(this,arguments)},S.prototype.equals=function(t){if(!k(t))throw new TypeError("Argument must be a Buffer");return this===t||0===S.compare(this,t)},S.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},S.prototype.compare=function(t,e,A,n,r){if(!k(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===A&&(A=t?t.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),e<0||A>t.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&e>=A)return 0;if(n>=r)return-1;if(e>=A)return 1;if(this===t)return 0;for(var i=(r>>>=0)-(n>>>=0),o=(A>>>=0)-(e>>>=0),a=Math.min(i,o),s=this.slice(n,r),g=t.slice(e,A),c=0;c<a;++c)if(s[c]!==g[c]){i=s[c],o=g[c];break}return i<o?-1:o<i?1:0},S.prototype.includes=function(t,e,A){return-1!==this.indexOf(t,e,A)},S.prototype.indexOf=function(t,e,A){return L(this,t,e,A,!0)},S.prototype.lastIndexOf=function(t,e,A){return L(this,t,e,A,!1)},S.prototype.write=function(t,e,A,n){if(void 0===e)n="utf8",A=this.length,e=0;else if(void 0===A&&"string"===typeof e)n=e,A=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(A)?(A|=0,void 0===n&&(n="utf8")):(n=A,A=void 0)}var r=this.length-e;if((void 0===A||A>r)&&(A=r),t.length>0&&(A<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return J(this,t,e,A);case"utf8":case"utf-8":return T(this,t,e,A);case"ascii":return j(this,t,e,A);case"latin1":case"binary":return H(this,t,e,A);case"base64":return Y(this,t,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,t,e,A);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},S.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},S.prototype.slice=function(t,e){var A,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),S.TYPED_ARRAY_SUPPORT)(A=this.subarray(t,e)).__proto__=S.prototype;else{var r=e-t;A=new S(r,void 0);for(var i=0;i<r;++i)A[i]=this[i+t]}return A},S.prototype.readUIntLE=function(t,e,A){t|=0,e|=0,A||z(t,e,this.length);for(var n=this[t],r=1,i=0;++i<e&&(r*=256);)n+=this[t+i]*r;return n},S.prototype.readUIntBE=function(t,e,A){t|=0,e|=0,A||z(t,e,this.length);for(var n=this[t+--e],r=1;e>0&&(r*=256);)n+=this[t+--e]*r;return n},S.prototype.readUInt8=function(t,e){return e||z(t,1,this.length),this[t]},S.prototype.readUInt16LE=function(t,e){return e||z(t,2,this.length),this[t]|this[t+1]<<8},S.prototype.readUInt16BE=function(t,e){return e||z(t,2,this.length),this[t]<<8|this[t+1]},S.prototype.readUInt32LE=function(t,e){return e||z(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},S.prototype.readUInt32BE=function(t,e){return e||z(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},S.prototype.readIntLE=function(t,e,A){t|=0,e|=0,A||z(t,e,this.length);for(var n=this[t],r=1,i=0;++i<e&&(r*=256);)n+=this[t+i]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*e)),n},S.prototype.readIntBE=function(t,e,A){t|=0,e|=0,A||z(t,e,this.length);for(var n=e,r=1,i=this[t+--n];n>0&&(r*=256);)i+=this[t+--n]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},S.prototype.readInt8=function(t,e){return e||z(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},S.prototype.readInt16LE=function(t,e){e||z(t,2,this.length);var A=this[t]|this[t+1]<<8;return 32768&A?4294901760|A:A},S.prototype.readInt16BE=function(t,e){e||z(t,2,this.length);var A=this[t+1]|this[t]<<8;return 32768&A?4294901760|A:A},S.prototype.readInt32LE=function(t,e){return e||z(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},S.prototype.readInt32BE=function(t,e){return e||z(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},S.prototype.readFloatLE=function(t,e){return e||z(t,4,this.length),y(this,t,!0,23,4)},S.prototype.readFloatBE=function(t,e){return e||z(t,4,this.length),y(this,t,!1,23,4)},S.prototype.readDoubleLE=function(t,e){return e||z(t,8,this.length),y(this,t,!0,52,8)},S.prototype.readDoubleBE=function(t,e){return e||z(t,8,this.length),y(this,t,!1,52,8)},S.prototype.writeUIntLE=function(t,e,A,n){t=+t,e|=0,A|=0,n||$(this,t,e,A,Math.pow(2,8*A)-1,0);var r=1,i=0;for(this[e]=255&t;++i<A&&(r*=256);)this[e+i]=t/r&255;return e+A},S.prototype.writeUIntBE=function(t,e,A,n){t=+t,e|=0,A|=0,n||$(this,t,e,A,Math.pow(2,8*A)-1,0);var r=A-1,i=1;for(this[e+r]=255&t;--r>=0&&(i*=256);)this[e+r]=t/i&255;return e+A},S.prototype.writeUInt8=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,1,255,0),S.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},S.prototype.writeUInt16LE=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,2,65535,0),S.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):tt(this,t,e,!0),e+2},S.prototype.writeUInt16BE=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,2,65535,0),S.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):tt(this,t,e,!1),e+2},S.prototype.writeUInt32LE=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,4,4294967295,0),S.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):et(this,t,e,!0),e+4},S.prototype.writeUInt32BE=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,4,4294967295,0),S.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):et(this,t,e,!1),e+4},S.prototype.writeIntLE=function(t,e,A,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*A-1);$(this,t,e,A,r-1,-r)}var i=0,o=1,a=0;for(this[e]=255&t;++i<A&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+A},S.prototype.writeIntBE=function(t,e,A,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*A-1);$(this,t,e,A,r-1,-r)}var i=A-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+A},S.prototype.writeInt8=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,1,127,-128),S.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},S.prototype.writeInt16LE=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,2,32767,-32768),S.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):tt(this,t,e,!0),e+2},S.prototype.writeInt16BE=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,2,32767,-32768),S.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):tt(this,t,e,!1),e+2},S.prototype.writeInt32LE=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,4,2147483647,-2147483648),S.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):et(this,t,e,!0),e+4},S.prototype.writeInt32BE=function(t,e,A){return t=+t,e|=0,A||$(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),S.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):et(this,t,e,!1),e+4},S.prototype.writeFloatLE=function(t,e,A){return nt(this,t,e,!0,A)},S.prototype.writeFloatBE=function(t,e,A){return nt(this,t,e,!1,A)},S.prototype.writeDoubleLE=function(t,e,A){return rt(this,t,e,!0,A)},S.prototype.writeDoubleBE=function(t,e,A){return rt(this,t,e,!1,A)},S.prototype.copy=function(t,e,A,n){if(A||(A=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<A&&(n=A),n===A)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(A<0||A>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-A&&(n=t.length-e+A);var r,i=n-A;if(this===t&&A<e&&e<n)for(r=i-1;r>=0;--r)t[r+e]=this[r+A];else if(i<1e3||!S.TYPED_ARRAY_SUPPORT)for(r=0;r<i;++r)t[r+e]=this[r+A];else Uint8Array.prototype.set.call(t,this.subarray(A,A+i),e);return i},S.prototype.fill=function(t,e,A,n){if("string"===typeof t){if("string"===typeof e?(n=e,e=0,A=this.length):"string"===typeof A&&(n=A,A=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!S.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof t&&(t&=255);if(e<0||this.length<e||this.length<A)throw new RangeError("Out of range index");if(A<=e)return this;var i;if(e>>>=0,A=void 0===A?this.length:A>>>0,t||(t=0),"number"===typeof t)for(i=e;i<A;++i)this[i]=t;else{var o=k(t)?t:ot(new S(t,n).toString()),a=o.length;for(i=0;i<A-e;++i)this[i+e]=o[i%a]}return this};var it=/[^+\/0-9A-Za-z-_]/g;function ot(t,e){var A;e=e||1/0;for(var n=t.length,r=null,i=[],o=0;o<n;++o){if((A=t.charCodeAt(o))>55295&&A<57344){if(!r){if(A>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&i.push(239,191,189);continue}r=A;continue}if(A<56320){(e-=3)>-1&&i.push(239,191,189),r=A;continue}A=65536+(r-55296<<10|A-56320)}else r&&(e-=3)>-1&&i.push(239,191,189);if(r=null,A<128){if((e-=1)<0)break;i.push(A)}else if(A<2048){if((e-=2)<0)break;i.push(A>>6|192,63&A|128)}else if(A<65536){if((e-=3)<0)break;i.push(A>>12|224,A>>6&63|128,63&A|128)}else{if(!(A<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(A>>18|240,A>>12&63|128,A>>6&63|128,63&A|128)}}return i}function at(t){return function(t){var e,A,n,r,i,o;d||Q();var a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[a-2]?2:"="===t[a-1]?1:0,o=new f(3*a/4-i),n=i>0?a-4:a;var s=0;for(e=0,A=0;e<n;e+=4,A+=3)r=B[t.charCodeAt(e)]<<18|B[t.charCodeAt(e+1)]<<12|B[t.charCodeAt(e+2)]<<6|B[t.charCodeAt(e+3)],o[s++]=r>>16&255,o[s++]=r>>8&255,o[s++]=255&r;return 2===i?(r=B[t.charCodeAt(e)]<<2|B[t.charCodeAt(e+1)]>>4,o[s++]=255&r):1===i&&(r=B[t.charCodeAt(e)]<<10|B[t.charCodeAt(e+1)]<<4|B[t.charCodeAt(e+2)]>>2,o[s++]=r>>8&255,o[s++]=255&r),o}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(it,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function st(t,e,A,n){for(var r=0;r<n&&!(r+A>=e.length||r>=t.length);++r)e[r+A]=t[r];return r}function gt(t){return null!=t&&(!!t._isBuffer||ct(t)||function(t){return"function"===typeof t.readFloatLE&&"function"===typeof t.slice&&ct(t.slice(0,0))}(t))}function ct(t){return!!t.constructor&&"function"===typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function It(){throw new Error("setTimeout has not been defined")}function ut(){throw new Error("clearTimeout has not been defined")}var lt=It,Ct=ut;function ht(t){if(lt===setTimeout)return setTimeout(t,0);if((lt===It||!lt)&&setTimeout)return lt=setTimeout,setTimeout(t,0);try{return lt(t,0)}catch(e){try{return lt.call(null,t,0)}catch(e){return lt.call(this,t,0)}}}"function"===typeof C.setTimeout&&(lt=setTimeout),"function"===typeof C.clearTimeout&&(Ct=clearTimeout);var Bt,ft=[],dt=!1,Qt=-1;function Et(){dt&&Bt&&(dt=!1,Bt.length?ft=Bt.concat(ft):Qt=-1,ft.length&&pt())}function pt(){if(!dt){var t=ht(Et);dt=!0;for(var e=ft.length;e;){for(Bt=ft,ft=[];++Qt<e;)Bt&&Bt[Qt].run();Qt=-1,e=ft.length}Bt=null,dt=!1,function(t){if(Ct===clearTimeout)return clearTimeout(t);if((Ct===ut||!Ct)&&clearTimeout)return Ct=clearTimeout,clearTimeout(t);try{Ct(t)}catch(e){try{return Ct.call(null,t)}catch(e){return Ct.call(this,t)}}}(t)}}function yt(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)e[A-1]=arguments[A];ft.push(new vt(t,e)),1!==ft.length||dt||ht(pt)}function vt(t,e){this.fun=t,this.array=e}function mt(){}vt.prototype.run=function(){this.fun.apply(null,this.array)};var bt=mt,Ft=mt,wt=mt,St=mt,Dt=mt,Rt=mt,Ut=mt,Gt=C.performance||{},Nt=Gt.now||Gt.mozNow||Gt.msNow||Gt.oNow||Gt.webkitNow||function(){return(new Date).getTime()},kt=new Date,xt={nextTick:yt,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:bt,addListener:Ft,once:wt,off:St,removeListener:Dt,removeAllListeners:Rt,emit:Ut,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var e=.001*Nt.call(Gt),A=Math.floor(e),n=Math.floor(e%1*1e9);return t&&(A-=t[0],(n-=t[1])<0&&(A--,n+=1e9)),[A,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-kt)/1e3}},Ot="function"===typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var A=function(){};A.prototype=e.prototype,t.prototype=new A,t.prototype.constructor=t},Mt=/%[sdj%]/g;function Lt(t){if(!qt(t)){for(var e=[],A=0;A<arguments.length;A++)e.push(jt(arguments[A]));return e.join(" ")}A=1;for(var n=arguments,r=n.length,i=String(t).replace(Mt,(function(t){if("%%"===t)return"%";if(A>=r)return t;switch(t){case"%s":return String(n[A++]);case"%d":return Number(n[A++]);case"%j":try{return JSON.stringify(n[A++])}catch(e){return"[Circular]"}default:return t}})),o=n[A];A<r;o=n[++A])Pt(o)||!$t(o)?i+=" "+o:i+=" "+jt(o);return i}function _t(t,e){if(Xt(C.process))return function(){return _t(t,e).apply(this,arguments)};var A=!1;return function(){return A||(console.error(e),A=!0),t.apply(this,arguments)}}var Jt,Tt={};function jt(t,e){var A={seen:[],stylize:Yt};return arguments.length>=3&&(A.depth=arguments[2]),arguments.length>=4&&(A.colors=arguments[3]),Kt(e)?A.showHidden=e:e&&re(A,e),Xt(A.showHidden)&&(A.showHidden=!1),Xt(A.depth)&&(A.depth=2),Xt(A.colors)&&(A.colors=!1),Xt(A.customInspect)&&(A.customInspect=!0),A.colors&&(A.stylize=Ht),Vt(A,t,A.depth)}function Ht(t,e){var A=jt.styles[e];return A?"\x1b["+jt.colors[A][0]+"m"+t+"\x1b["+jt.colors[A][1]+"m":t}function Yt(t,e){return t}function Vt(t,e,A){if(t.customInspect&&e&&Ae(e.inspect)&&e.inspect!==jt&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(A,t);return qt(n)||(n=Vt(t,n,A)),n}var r=function(t,e){if(Xt(e))return t.stylize("undefined","undefined");if(qt(e)){var A="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(A,"string")}return"number"===typeof e?t.stylize(""+e,"number"):Kt(e)?t.stylize(""+e,"boolean"):Pt(e)?t.stylize("null","null"):void 0}(t,e);if(r)return r;var i=Object.keys(e),o=function(t){var e={};return t.forEach((function(t,A){e[t]=!0})),e}(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),ee(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Zt(e);if(0===i.length){if(Ae(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(zt(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(te(e))return t.stylize(Date.prototype.toString.call(e),"date");if(ee(e))return Zt(e)}var s,g,c="",I=!1,u=["{","}"];return s=e,Array.isArray(s)&&(I=!0,u=["[","]"]),Ae(e)&&(c=" [Function"+(e.name?": "+e.name:"")+"]"),zt(e)&&(c=" "+RegExp.prototype.toString.call(e)),te(e)&&(c=" "+Date.prototype.toUTCString.call(e)),ee(e)&&(c=" "+Zt(e)),0!==i.length||I&&0!=e.length?A<0?zt(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),g=I?function(t,e,A,n,r){for(var i=[],o=0,a=e.length;o<a;++o)ie(e,String(o))?i.push(Wt(t,e,A,n,String(o),!0)):i.push("");return r.forEach((function(r){r.match(/^\d+$/)||i.push(Wt(t,e,A,n,r,!0))})),i}(t,e,A,o,i):i.map((function(n){return Wt(t,e,A,o,n,I)})),t.seen.pop(),function(t,e,A){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?A[0]+(""===e?"":e+"\n ")+" "+t.join(",\n  ")+" "+A[1]:A[0]+e+" "+t.join(", ")+" "+A[1]}(g,c,u)):u[0]+c+u[1]}function Zt(t){return"["+Error.prototype.toString.call(t)+"]"}function Wt(t,e,A,n,r,i){var o,a,s;if((s=Object.getOwnPropertyDescriptor(e,r)||{value:e[r]}).get?a=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(a=t.stylize("[Setter]","special")),ie(n,r)||(o="["+r+"]"),a||(t.seen.indexOf(s.value)<0?(a=Pt(A)?Vt(t,s.value,null):Vt(t,s.value,A-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(t){return"  "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return"   "+t})).join("\n")):a=t.stylize("[Circular]","special")),Xt(o)){if(i&&r.match(/^\d+$/))return a;(o=JSON.stringify(""+r)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function Kt(t){return"boolean"===typeof t}function Pt(t){return null===t}function qt(t){return"string"===typeof t}function Xt(t){return void 0===t}function zt(t){return $t(t)&&"[object RegExp]"===ne(t)}function $t(t){return"object"===typeof t&&null!==t}function te(t){return $t(t)&&"[object Date]"===ne(t)}function ee(t){return $t(t)&&("[object Error]"===ne(t)||t instanceof Error)}function Ae(t){return"function"===typeof t}function ne(t){return Object.prototype.toString.call(t)}function re(t,e){if(!e||!$t(e))return t;for(var A=Object.keys(e),n=A.length;n--;)t[A[n]]=e[A[n]];return t}function ie(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function oe(){this.head=null,this.tail=null,this.length=0}jt.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]},jt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},oe.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},oe.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},oe.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},oe.prototype.clear=function(){this.head=this.tail=null,this.length=0},oe.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,A=""+e.data;e=e.next;)A+=t+e.data;return A},oe.prototype.concat=function(t){if(0===this.length)return S.alloc(0);if(1===this.length)return this.head.data;for(var e=S.allocUnsafe(t>>>0),A=this.head,n=0;A;)A.data.copy(e,n),n+=A.data.length,A=A.next;return e};var ae=S.isEncoding||function(t){switch(t&&t.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 se(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!ae(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=ce;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Ie;break;default:return void(this.write=ge)}this.charBuffer=new S(6),this.charReceived=0,this.charLength=0}function ge(t){return t.toString(this.encoding)}function ce(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Ie(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}se.prototype.write=function(t){for(var e="";this.charLength;){var A=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,A),this.charReceived+=A,this.charReceived<this.charLength)return"";if(t=t.slice(A,t.length),!((n=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var n,r=t.length;if(this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived),r=(e+=t.toString(this.encoding,0,r)).length-1,(n=e.charCodeAt(r))>=55296&&n<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),t.copy(this.charBuffer,0,0,i),e.substring(0,r)}return e},se.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var A=t[t.length-e];if(1==e&&A>>5==6){this.charLength=2;break}if(e<=2&&A>>4==14){this.charLength=3;break}if(e<=3&&A>>3==30){this.charLength=4;break}}this.charReceived=e},se.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var A=this.charReceived,n=this.charBuffer,r=this.encoding;e+=n.slice(0,A).toString(r)}return e},he.ReadableState=Ce;var ue,le=(ue="stream",Xt(Jt)&&(Jt=xt.env.NODE_DEBUG||""),ue=ue.toUpperCase(),Tt[ue]||(new RegExp("\\b"+ue+"\\b","i").test(Jt)?Tt[ue]=function(){var t=Lt.apply(null,arguments);console.error("%s %d: %s",ue,0,t)}:Tt[ue]=function(){}),Tt[ue]);function Ce(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof je&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var A=t.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=A||0===A?A:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new oe,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=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new se(t.encoding),this.encoding=t.encoding)}function he(t){if(!(this instanceof he))return new he(t);this._readableState=new Ce(t,this),this.readable=!0,t&&"function"===typeof t.read&&(this._read=t.read),n.call(this)}function Be(t,e,A,n,r){var i=function(t,e){var A=null;return gt(e)||"string"===typeof e||null===e||void 0===e||t.objectMode||(A=new TypeError("Invalid non-string/buffer chunk")),A}(e,A);if(i)t.emit("error",i);else if(null===A)e.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var A=e.decoder.end();A&&A.length&&(e.buffer.push(A),e.length+=e.objectMode?1:A.length)}e.ended=!0,de(t)}}(t,e);else if(e.objectMode||A&&A.length>0)if(e.ended&&!r){var o=new Error("stream.push() after EOF");t.emit("error",o)}else if(e.endEmitted&&r){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else{var s;!e.decoder||r||n||(A=e.decoder.write(A),s=!e.objectMode&&0===A.length),r||(e.reading=!1),s||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",A),t.read(0)):(e.length+=e.objectMode?1:A.length,r?e.buffer.unshift(A):e.buffer.push(A),e.needReadable&&de(t))),function(t,e){e.readingMore||(e.readingMore=!0,yt(Ee,t,e))}(t,e)}else r||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(e)}function fe(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function de(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(le("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?yt(Qe,t):Qe(t))}function Qe(t){le("emit readable"),t.emit("readable"),ve(t)}function Ee(t,e){for(var A=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(le("maybeReadMore read 0"),t.read(0),A!==e.length);)A=e.length;e.readingMore=!1}function pe(t){le("readable nexttick read 0"),t.read(0)}function ye(t,e){e.reading||(le("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),ve(t),e.flowing&&!e.reading&&t.read(0)}function ve(t){var e=t._readableState;for(le("flow",e.flowing);e.flowing&&null!==t.read(););}function me(t,e){return 0===e.length?null:(e.objectMode?A=e.buffer.shift():!t||t>=e.length?(A=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):A=function(t,e,A){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():A?function(t,e){var A=e.head,n=1,r=A.data;for(t-=r.length;A=A.next;){var i=A.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0===(t-=o)){o===i.length?(++n,A.next?e.head=A.next:e.head=e.tail=null):(e.head=A,A.data=i.slice(o));break}++n}return e.length-=n,r}(t,e):function(t,e){var A=S.allocUnsafe(t),n=e.head,r=1;for(n.data.copy(A),t-=n.data.length;n=n.next;){var i=n.data,o=t>i.length?i.length:t;if(i.copy(A,A.length-t,0,o),0===(t-=o)){o===i.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=i.slice(o));break}++r}return e.length-=r,A}(t,e),n}(t,e.buffer,e.decoder),A);var A}function be(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,yt(Fe,e,t))}function Fe(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function we(t,e){for(var A=0,n=t.length;A<n;A++)if(t[A]===e)return A;return-1}function Se(){}function De(t,e,A){this.chunk=t,this.encoding=e,this.callback=A,this.next=null}function Re(t,e){Object.defineProperty(this,"buffer",{get:_t((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),t=t||{},this.objectMode=!!t.objectMode,e instanceof je&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var A=t.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=A||0===A?A:n,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=!1===t.decodeStrings;this.decodeStrings=!r,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var A=t._writableState,n=A.sync,r=A.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(A),e)!function(t,e,A,n,r){--e.pendingcb,A?yt(r,n):r(n),t._writableState.errorEmitted=!0,t.emit("error",n)}(t,A,n,e,r);else{var i=xe(A);i||A.corked||A.bufferProcessing||!A.bufferedRequest||ke(t,A),n?yt(Ne,t,A,i,r):Ne(t,A,i,r)}}(e,t)},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 Le(this)}function Ue(t){if(!(this instanceof Ue)&&!(this instanceof je))return new Ue(t);this._writableState=new Re(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev)),n.call(this)}function Ge(t,e,A,n,r,i,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,A?t._writev(r,e.onwrite):t._write(r,i,e.onwrite),e.sync=!1}function Ne(t,e,A,n){A||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),Me(t,e)}function ke(t,e){e.bufferProcessing=!0;var A=e.bufferedRequest;if(t._writev&&A&&A.next){var n=e.bufferedRequestCount,r=new Array(n),i=e.corkedRequestsFree;i.entry=A;for(var o=0;A;)r[o]=A,A=A.next,o+=1;Ge(t,e,!0,e.length,r,"",i.finish),e.pendingcb++,e.lastBufferedRequest=null,i.next?(e.corkedRequestsFree=i.next,i.next=null):e.corkedRequestsFree=new Le(e)}else{for(;A;){var a=A.chunk,s=A.encoding,g=A.callback;if(Ge(t,e,!1,e.objectMode?1:a.length,a,s,g),A=A.next,e.writing)break}null===A&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=A,e.bufferProcessing=!1}function xe(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function Oe(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function Me(t,e){var A=xe(e);return A&&(0===e.pendingcb?(Oe(t,e),e.finished=!0,t.emit("finish")):Oe(t,e)),A}function Le(t){var e=this;this.next=null,this.entry=null,this.finish=function(A){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(A),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}}Ot(he,n),he.prototype.push=function(t,e){var A=this._readableState;return A.objectMode||"string"!==typeof t||(e=e||A.defaultEncoding)!==A.encoding&&(t=S.from(t,e),e=""),Be(this,A,t,e,!1)},he.prototype.unshift=function(t){return Be(this,this._readableState,t,"",!0)},he.prototype.isPaused=function(){return!1===this._readableState.flowing},he.prototype.setEncoding=function(t){return this._readableState.decoder=new se(t),this._readableState.encoding=t,this},he.prototype.read=function(t){le("read",t),t=parseInt(t,10);var e=this._readableState,A=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return le("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?be(this):de(this),null;if(0===(t=fe(t,e))&&e.ended)return 0===e.length&&be(this),null;var n,r=e.needReadable;return le("need readable",r),(0===e.length||e.length-t<e.highWaterMark)&&le("length less than watermark",r=!0),e.ended||e.reading?le("reading or ended",r=!1):r&&(le("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=fe(A,e))),null===(n=t>0?me(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),A!==t&&e.ended&&be(this)),null!==n&&this.emit("data",n),n},he.prototype._read=function(t){this.emit("error",new Error("not implemented"))},he.prototype.pipe=function(t,e){var A=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,le("pipe count=%d opts=%j",n.pipesCount,e);var r=e&&!1===e.end?g:o;function i(t){le("onunpipe"),t===A&&g()}function o(){le("onend"),t.end()}n.endEmitted?yt(r):A.once("end",r),t.on("unpipe",i);var a=function(t){return function(){var e=t._readableState;le("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,ve(t))}}(A);t.on("drain",a);var s=!1;function g(){le("cleanup"),t.removeListener("close",l),t.removeListener("finish",C),t.removeListener("drain",a),t.removeListener("error",u),t.removeListener("unpipe",i),A.removeListener("end",o),A.removeListener("end",g),A.removeListener("data",I),s=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||a()}var c=!1;function I(e){le("ondata"),c=!1,!1!==t.write(e)||c||((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==we(n.pipes,t))&&!s&&(le("false write response, pause",A._readableState.awaitDrain),A._readableState.awaitDrain++,c=!0),A.pause())}function u(e){le("onerror",e),h(),t.removeListener("error",u),0===function(t,e){return t.listeners(e).length}(t,"error")&&t.emit("error",e)}function l(){t.removeListener("finish",C),h()}function C(){le("onfinish"),t.removeListener("close",l),h()}function h(){le("unpipe"),A.unpipe(t)}return A.on("data",I),function(t,e,A){if("function"===typeof t.prependListener)return t.prependListener(e,A);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(A):t._events[e]=[A,t._events[e]]:t.on(e,A)}(t,"error",u),t.once("close",l),t.once("finish",C),t.emit("pipe",A),n.flowing||(le("pipe resume"),A.resume()),t},he.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var A=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var r=0;r<n;r++)A[r].emit("unpipe",this);return this}var i=we(e.pipes,t);return-1===i||(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this)),this},he.prototype.on=function(t,e){var A=n.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&de(this):yt(pe,this))}return A},he.prototype.addListener=he.prototype.on,he.prototype.resume=function(){var t=this._readableState;return t.flowing||(le("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,yt(ye,t,e))}(this,t)),this},he.prototype.pause=function(){return le("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(le("pause"),this._readableState.flowing=!1,this.emit("pause")),this},he.prototype.wrap=function(t){var e=this._readableState,A=!1,n=this;for(var r in t.on("end",(function(){if(le("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)})),t.on("data",(function(r){le("wrapped data"),e.decoder&&(r=e.decoder.write(r)),(!e.objectMode||null!==r&&void 0!==r)&&(e.objectMode||r&&r.length)&&(n.push(r)||(A=!0,t.pause()))})),t)void 0===this[r]&&"function"===typeof t[r]&&(this[r]=function(e){return function(){return t[e].apply(t,arguments)}}(r));return function(t,e){for(var A=0,n=t.length;A<n;A++)e(t[A],A)}(["error","close","destroy","pause","resume"],(function(e){t.on(e,n.emit.bind(n,e))})),n._read=function(e){le("wrapped _read",e),A&&(A=!1,t.resume())},n},he._fromList=me,Ue.WritableState=Re,Ot(Ue,n),Re.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},Ue.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Ue.prototype.write=function(t,e,A){var n=this._writableState,r=!1;return"function"===typeof e&&(A=e,e=null),S.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),"function"!==typeof A&&(A=Se),n.ended?function(t,e){var A=new Error("write after end");t.emit("error",A),yt(e,A)}(this,A):function(t,e,A,n){var r=!0,i=!1;return null===A?i=new TypeError("May not write null values to stream"):S.isBuffer(A)||"string"===typeof A||void 0===A||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i&&(t.emit("error",i),yt(n,i),r=!1),r}(this,n,t,A)&&(n.pendingcb++,r=function(t,e,A,n,r){A=function(t,e,A){return t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=S.from(e,A)),e}(e,A,n),S.isBuffer(A)&&(n="buffer");var i=e.objectMode?1:A.length;e.length+=i;var o=e.length<e.highWaterMark;if(o||(e.needDrain=!0),e.writing||e.corked){var a=e.lastBufferedRequest;e.lastBufferedRequest=new De(A,n,r),a?a.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Ge(t,e,!1,i,A,n,r);return o}(this,n,t,e,A)),r},Ue.prototype.cork=function(){this._writableState.corked++},Ue.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||ke(this,t))},Ue.prototype.setDefaultEncoding=function(t){if("string"===typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Ue.prototype._write=function(t,e,A){A(new Error("not implemented"))},Ue.prototype._writev=null,Ue.prototype.end=function(t,e,A){var n=this._writableState;"function"===typeof t?(A=t,t=null,e=null):"function"===typeof e&&(A=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,A){e.ending=!0,Me(t,e),A&&(e.finished?yt(A):t.once("finish",A)),e.ended=!0,t.writable=!1}(this,n,A)},Ot(je,he);for(var _e=Object.keys(Ue.prototype),Je=0;Je<_e.length;Je++){var Te=_e[Je];je.prototype[Te]||(je.prototype[Te]=Ue.prototype[Te])}function je(t){if(!(this instanceof je))return new je(t);he.call(this,t),Ue.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",He)}function He(){this.allowHalfOpen||this._writableState.ended||yt(Ye,this)}function Ye(t){t.end()}function Ve(t){this.afterTransform=function(e,A){return function(t,e,A){var n=t._transformState;n.transforming=!1;var r=n.writecb;if(!r)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==A&&void 0!==A&&t.push(A),r(e);var i=t._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&t._read(i.highWaterMark)}(t,e,A)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Ze(t){if(!(this instanceof Ze))return new Ze(t);je.call(this,t),this._transformState=new Ve(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"===typeof t.transform&&(this._transform=t.transform),"function"===typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",(function(){"function"===typeof this._flush?this._flush((function(t){We(e,t)})):We(e)}))}function We(t,e){if(e)return t.emit("error",e);var A=t._writableState,n=t._transformState;if(A.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}function Ke(t){if(!(this instanceof Ke))return new Ke(t);Ze.call(this,t)}function Pe(){n.call(this)}function qe(t){return(qe="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Xe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ze(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $e(t,e,A){return e&&ze(t.prototype,e),A&&ze(t,A),t}function tA(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&AA(t,e)}function eA(t){return(eA=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function AA(t,e){return(AA=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nA(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function rA(t){return function(t){if(Array.isArray(t)){for(var e=0,A=new Array(t.length);e<t.length;e++)A[e]=t[e];return A}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}Ot(Ze,je),Ze.prototype.push=function(t,e){return this._transformState.needTransform=!1,je.prototype.push.call(this,t,e)},Ze.prototype._transform=function(t,e,A){throw new Error("Not implemented")},Ze.prototype._write=function(t,e,A){var n=this._transformState;if(n.writecb=A,n.writechunk=t,n.writeencoding=e,!n.transforming){var r=this._readableState;(n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},Ze.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},Ot(Ke,Ze),Ke.prototype._transform=function(t,e,A){A(null,t)},Ot(Pe,n),Pe.Readable=he,Pe.Writable=Ue,Pe.Duplex=je,Pe.Transform=Ze,Pe.PassThrough=Ke,Pe.Stream=Pe,Pe.prototype.pipe=function(t,e){var A=this;function r(e){t.writable&&!1===t.write(e)&&A.pause&&A.pause()}function i(){A.readable&&A.resume&&A.resume()}A.on("data",r),t.on("drain",i),t._isStdio||e&&!1===e.end||(A.on("end",a),A.on("close",s));var o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"===typeof t.destroy&&t.destroy())}function g(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){A.removeListener("data",r),t.removeListener("drain",i),A.removeListener("end",a),A.removeListener("close",s),A.removeListener("error",g),t.removeListener("error",g),A.removeListener("end",c),A.removeListener("close",c),t.removeListener("close",c)}return A.on("error",g),t.on("error",g),A.on("end",c),A.on("close",c),t.on("close",c),t.emit("pipe",A),t};var iA="\n",oA="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},aA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sA=/^\w*$/,gA=/^\./,cA=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,IA=/\\(\\)?/g,uA=/^\[object .+?Constructor\]$/,lA="object"==typeof oA&&oA&&oA.Object===Object&&oA,CA="object"==typeof self&&self&&self.Object===Object&&self,hA=lA||CA||Function("return this")(),BA=Array.prototype,fA=Function.prototype,dA=Object.prototype,QA=hA["__core-js_shared__"],EA=function(){var t=/[^.]+$/.exec(QA&&QA.keys&&QA.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),pA=fA.toString,yA=dA.hasOwnProperty,vA=dA.toString,mA=RegExp("^"+pA.call(yA).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bA=hA.Symbol,FA=BA.splice,wA=LA(hA,"Map"),SA=LA(Object,"create"),DA=bA?bA.prototype:void 0,RA=DA?DA.toString:void 0;function UA(t){var e=-1,A=t?t.length:0;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}function GA(t){var e=-1,A=t?t.length:0;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}function NA(t){var e=-1,A=t?t.length:0;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}function kA(t,e){for(var A,n,r=t.length;r--;)if((A=t[r][0])===(n=e)||A!==A&&n!==n)return r;return-1}function xA(t,e){for(var A,n=0,r=(e=function(t,e){if(jA(t))return!1;var A=typeof t;return!("number"!=A&&"symbol"!=A&&"boolean"!=A&&null!=t&&!YA(t))||(sA.test(t)||!aA.test(t)||null!=e&&t in Object(e))}(e,t)?[e]:jA(A=e)?A:_A(A)).length;null!=t&&n<r;)t=t[JA(e[n++])];return n&&n==r?t:void 0}function OA(t){return!(!HA(t)||(e=t,EA&&EA in e))&&(function(t){var e=HA(t)?vA.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(A){}return e}(t)?mA:uA).test(function(t){if(null!=t){try{return pA.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var e}function MA(t,e){var A=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?A["string"==typeof e?"string":"hash"]:A.map}function LA(t,e){var A=function(t,e){return null==t?void 0:t[e]}(t,e);return OA(A)?A:void 0}UA.prototype.clear=function(){this.__data__=SA?SA(null):{}},UA.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},UA.prototype.get=function(t){var e=this.__data__;if(SA){var A=e[t];return"__lodash_hash_undefined__"===A?void 0:A}return yA.call(e,t)?e[t]:void 0},UA.prototype.has=function(t){var e=this.__data__;return SA?void 0!==e[t]:yA.call(e,t)},UA.prototype.set=function(t,e){return this.__data__[t]=SA&&void 0===e?"__lodash_hash_undefined__":e,this},GA.prototype.clear=function(){this.__data__=[]},GA.prototype.delete=function(t){var e=this.__data__,A=kA(e,t);return!(A<0)&&(A==e.length-1?e.pop():FA.call(e,A,1),!0)},GA.prototype.get=function(t){var e=this.__data__,A=kA(e,t);return A<0?void 0:e[A][1]},GA.prototype.has=function(t){return kA(this.__data__,t)>-1},GA.prototype.set=function(t,e){var A=this.__data__,n=kA(A,t);return n<0?A.push([t,e]):A[n][1]=e,this},NA.prototype.clear=function(){this.__data__={hash:new UA,map:new(wA||GA),string:new UA}},NA.prototype.delete=function(t){return MA(this,t).delete(t)},NA.prototype.get=function(t){return MA(this,t).get(t)},NA.prototype.has=function(t){return MA(this,t).has(t)},NA.prototype.set=function(t,e){return MA(this,t).set(t,e),this};var _A=TA((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(YA(t))return RA?RA.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(e);var A=[];return gA.test(t)&&A.push(""),t.replace(cA,(function(t,e,n,r){A.push(n?r.replace(IA,"$1"):e||t)})),A}));function JA(t){if("string"==typeof t||YA(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function TA(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var A=function A(){var n=arguments,r=e?e.apply(this,n):n[0],i=A.cache;if(i.has(r))return i.get(r);var o=t.apply(this,n);return A.cache=i.set(r,o),o};return A.cache=new(TA.Cache||NA),A}TA.Cache=NA;var jA=Array.isArray;function HA(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function YA(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==vA.call(t)}var VA=function(t,e,A){var n=null==t?void 0:xA(t,e);return void 0===n?A:n},ZA=function(t,e){var A=!0;return t.reduce((function(t,n){return null!==n&&void 0!==n||(n=""),A?(A=!1,"".concat(n)):"".concat(t).concat(e).concat(n)}),"")},WA=function(t,e){try{return t.push.apply(t,rA(e)),t}catch(A){return t.concat(e)}},KA=function(t,e,A){return void 0===t[e]||null===t[e]?A:t[e]},PA=function t(e,A,n){var r=Array.isArray(A)?A:A.split("."),i=r[0],o=r.length>1?t(e[i]||{},r.slice(1),n):n;return Object.assign({},e,function(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}({},i,o))},qA=ZA,XA=WA,zA=function(){function t(e){Xe(this,t),this.opts=this.preprocessOpts(e),this.preprocessRow=this.memoizePreprocessRow()}return $e(t,[{key:"preprocessOpts",value:function(t){var e=Object.assign({},t);return e.unwind=Array.isArray(e.unwind)?e.unwind:e.unwind?[e.unwind]:[],e.delimiter=e.delimiter||",",e.flattenSeparator=e.flattenSeparator||".",e.eol=e.eol||iA,e.quote="string"===typeof e.quote?t.quote:'"',e.doubleQuote="string"===typeof e.doubleQuote?e.doubleQuote:e.quote+e.quote,e.header=!1!==e.header,e.includeEmptyRows=e.includeEmptyRows||!1,e.withBOM=e.withBOM||!1,e}},{key:"preprocessFieldsInfo",value:function(t){var e=this;return t.map((function(t){if("string"===typeof t)return{label:t,value:t.includes(".")||t.includes("[")?function(A){return VA(A,t,e.opts.defaultValue)}:function(A){return KA(A,t,e.opts.defaultValue)},stringify:!0};if("object"===qe(t)){var A="default"in t?t.default:e.opts.defaultValue;if("string"===typeof t.value)return{label:t.label||t.value,value:t.value.includes(".")||t.value.includes("[")?function(e){return VA(e,t.value,A)}:function(e){return KA(e,t.value,A)},stringify:void 0===t.stringify||t.stringify};if("function"===typeof t.value){var n=t.label||t.value.name||"",r={label:n,default:A};return{label:n,value:function(e){var n=t.value(e,r);return null===n||void 0===n?A:n},stringify:void 0===t.stringify||t.stringify}}}throw new Error("Invalid field info option. "+JSON.stringify(t))}))}},{key:"getHeader",value:function(){var t=this;return qA(this.opts.fields.map((function(e){return t.processValue(e.label,!0)})),this.opts.delimiter)}},{key:"memoizePreprocessRow",value:function(){return this.opts.unwind&&this.opts.unwind.length?this.opts.flatten?function(t){var e=this;return this.unwindData(t,this.opts.unwind).map((function(t){return e.flatten(t,e.opts.flattenSeparator)}))}:function(t){return this.unwindData(t,this.opts.unwind)}:this.opts.flatten?function(t){return[this.flatten(t,this.opts.flattenSeparator)]}:function(t){return[t]}}},{key:"preprocessRow",value:function(){}},{key:"processRow",value:function(t){var e=this;if(t){var A=this.opts.fields.map((function(A){return e.processCell(t,A)}));if(this.opts.includeEmptyRows||!A.every((function(t){return void 0===t})))return qA(A,this.opts.delimiter)}}},{key:"processCell",value:function(t,e){return this.processValue(e.value(t),e.stringify)}},{key:"processValue",value:function(t,e){if(null!==t&&void 0!==t){var A=qe(t);if("boolean"!==A&&"number"!==A&&"string"!==A){if(void 0===(t=JSON.stringify(t)))return;'"'===t[0]&&(t=t.replace(/^"(.+)"$/,"$1"))}return"string"===typeof t&&(t.includes(this.opts.quote)&&(t=t.replace(new RegExp(this.opts.quote,"g"),this.opts.doubleQuote)),t=e?"".concat(this.opts.quote).concat(t).concat(this.opts.quote):t.replace(new RegExp("^".concat(this.opts.doubleQuote)),this.opts.quote).replace(new RegExp("".concat(this.opts.doubleQuote,"$")),this.opts.quote),this.opts.excelStrings&&(t='"="'.concat(t,'""'))),t}}},{key:"flatten",value:function(t,e){return function t(A,n,r){return Object.keys(A).forEach((function(i){var o=A[i],a=r?"".concat(r).concat(e).concat(i):i;"object"===qe(o)&&null!==o&&!Array.isArray(o)&&"[object Function]"!==Object.prototype.toString.call(o.toJSON)&&Object.keys(o).length?t(o,n,a):n[a]=o})),n}(t,{})}},{key:"unwindData",value:function(t,e){var A=this;return e.reduce((function(t,e){return t.map((function(t){var n=VA(t,e);return Array.isArray(n)?n.length?n.map((function(n,r){var i=A.opts.unwindBlank&&r>0?{}:t;return PA(i,e,n)})):PA(t,e,void 0):t})).reduce(XA,[])}),[t])}}]),t}(),$A=ZA,tn=WA,en=function(t){function e(t){var A;return Xe(this,e),(A=nA(this,eA(e).call(this,t))).opts.fields&&(A.opts.fields=A.preprocessFieldsInfo(A.opts.fields)),A}return tA(e,t),$e(e,[{key:"parse",value:function(t){var e=this.preprocessData(t);this.opts.fields||(this.opts.fields=e.reduce((function(t,e){return Object.keys(e).forEach((function(e){t.includes(e)||t.push(e)})),t}),[]),this.opts.fields=this.preprocessFieldsInfo(this.opts.fields));var A=this.opts.header?this.getHeader():"",n=this.processData(e);return(this.opts.withBOM?"\ufeff":"")+A+(A&&n?this.opts.eol:"")+n}},{key:"preprocessData",value:function(t){var e=this,A=Array.isArray(t)?t:[t];if(!this.opts.fields&&(0===A.length||"object"!==qe(A[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?A.map((function(t){return e.preprocessRow(t)})).reduce(tn,[]):A}},{key:"processData",value:function(t){var e=this;return $A(t.map((function(t){return e.processRow(t)})).filter((function(t){return t})),this.opts.eol)}}]),e}(zA),An={},nn=An.LEFT_BRACE=1,rn=An.RIGHT_BRACE=2,on=An.LEFT_BRACKET=3,an=An.RIGHT_BRACKET=4,sn=An.COLON=5,gn=An.COMMA=6,cn=An.TRUE=7,In=An.FALSE=8,un=An.NULL=9,ln=An.STRING=10,Cn=An.NUMBER=11,hn=An.START=17,Bn=An.STOP=18,fn=An.TRUE1=33,dn=An.TRUE2=34,Qn=An.TRUE3=35,En=An.FALSE1=49,pn=An.FALSE2=50,yn=An.FALSE3=51,vn=An.FALSE4=52,mn=An.NULL1=65,bn=An.NULL2=66,Fn=An.NULL3=67,wn=An.NUMBER1=81,Sn=An.NUMBER3=83,Dn=An.STRING1=97,Rn=An.STRING2=98,Un=An.STRING3=99,Gn=An.STRING4=100,Nn=An.STRING5=101,kn=An.STRING6=102,xn=An.VALUE=113,On=An.KEY=114,Mn=An.OBJECT=129,Ln=An.ARRAY=130,_n="\\".charCodeAt(0),Jn="/".charCodeAt(0),Tn="\b".charCodeAt(0),jn="\f".charCodeAt(0),Hn="\n".charCodeAt(0),Yn="\r".charCodeAt(0),Vn="\t".charCodeAt(0);function Zn(){this.tState=hn,this.value=void 0,this.string=void 0,this.stringBuffer=S.alloc?S.alloc(65536):new S(65536),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=xn,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new S(2),3:new S(3),4:new S(4)},this.offset=-1}Zn.toknam=function(t){for(var e=Object.keys(An),A=0,n=e.length;A<n;A++){var r=e[A];if(An[r]===t)return r}return t&&"0x"+t.toString(16)};var Wn=Zn.prototype;Wn.onError=function(t){throw t},Wn.charError=function(t,e){this.tState=Bn,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(t[e]))+" at position "+e+" in state "+Zn.toknam(this.tState)))},Wn.appendStringChar=function(t){this.stringBufferOffset>=65536&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t},Wn.appendStringBuf=function(t,e,A){var n=t.length;"number"===typeof e&&(n="number"===typeof A?A<0?t.length-e+A:A-e:t.length-e),n<0&&(n=0),this.stringBufferOffset+n>65536&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,A),this.stringBufferOffset+=n},Wn.write=function(t){var e;"string"===typeof t&&(t=new S(t));for(var A=0,n=t.length;A<n;A++)if(this.tState===hn){if(e=t[A],this.offset++,123===e)this.onToken(nn,"{");else if(125===e)this.onToken(rn,"}");else if(91===e)this.onToken(on,"[");else if(93===e)this.onToken(an,"]");else if(58===e)this.onToken(sn,":");else if(44===e)this.onToken(gn,",");else if(116===e)this.tState=fn;else if(102===e)this.tState=En;else if(110===e)this.tState=mn;else if(34===e)this.string="",this.stringBufferOffset=0,this.tState=Dn;else if(45===e)this.string="-",this.tState=wn;else if(e>=48&&e<64)this.string=String.fromCharCode(e),this.tState=Sn;else if(32!==e&&9!==e&&10!==e&&13!==e)return this.charError(t,A)}else if(this.tState===Dn)if(e=t[A],this.bytes_remaining>0){for(var r=0;r<this.bytes_remaining;r++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+r]=t[r];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,A=A+r-1}else if(0===this.bytes_remaining&&e>=128){if(e<=193||e>244)return this.onError(new Error("Invalid UTF-8 character at position "+A+" in state "+Zn.toknam(this.tState)));if(e>=194&&e<=223&&(this.bytes_in_sequence=2),e>=224&&e<=239&&(this.bytes_in_sequence=3),e>=240&&e<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+A>t.length){for(var i=0;i<=t.length-1-A;i++)this.temp_buffs[this.bytes_in_sequence][i]=t[A+i];this.bytes_remaining=A+this.bytes_in_sequence-t.length,A=t.length-1}else this.appendStringBuf(t,A,A+this.bytes_in_sequence),A=A+this.bytes_in_sequence-1}else if(34===e)this.tState=hn,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(ln,this.string),this.offset+=S.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===e)this.tState=Rn;else{if(!(e>=32))return this.charError(t,A);this.appendStringChar(e)}else if(this.tState===Rn)if(34===(e=t[A]))this.appendStringChar(e),this.tState=Dn;else if(92===e)this.appendStringChar(_n),this.tState=Dn;else if(47===e)this.appendStringChar(Jn),this.tState=Dn;else if(98===e)this.appendStringChar(Tn),this.tState=Dn;else if(102===e)this.appendStringChar(jn),this.tState=Dn;else if(110===e)this.appendStringChar(Hn),this.tState=Dn;else if(114===e)this.appendStringChar(Yn),this.tState=Dn;else if(116===e)this.appendStringChar(Vn),this.tState=Dn;else{if(117!==e)return this.charError(t,A);this.unicode="",this.tState=Un}else if(this.tState===Un||this.tState===Gn||this.tState===Nn||this.tState===kn){if(!((e=t[A])>=48&&e<64||e>64&&e<=70||e>96&&e<=102))return this.charError(t,A);if(this.unicode+=String.fromCharCode(e),this.tState++===kn){var o=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&o>=56320&&o<57344?(this.appendStringBuf(new S(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 S(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new S(String.fromCharCode(o)))),this.tState=Dn}}else if(this.tState===wn||this.tState===Sn)switch(e=t[A]){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(e),this.tState=Sn;break;default:this.tState=hn;var a=Number(this.string);if(isNaN(a))return this.charError(t,A);this.string.match(/[0-9]+/)==this.string&&a.toString()!=this.string?this.onToken(ln,this.string):this.onToken(Cn,a),this.offset+=this.string.length-1,this.string=void 0,A--}else if(this.tState===fn){if(114!==t[A])return this.charError(t,A);this.tState=dn}else if(this.tState===dn){if(117!==t[A])return this.charError(t,A);this.tState=Qn}else if(this.tState===Qn){if(101!==t[A])return this.charError(t,A);this.tState=hn,this.onToken(cn,!0),this.offset+=3}else if(this.tState===En){if(97!==t[A])return this.charError(t,A);this.tState=pn}else if(this.tState===pn){if(108!==t[A])return this.charError(t,A);this.tState=yn}else if(this.tState===yn){if(115!==t[A])return this.charError(t,A);this.tState=vn}else if(this.tState===vn){if(101!==t[A])return this.charError(t,A);this.tState=hn,this.onToken(In,!1),this.offset+=4}else if(this.tState===mn){if(117!==t[A])return this.charError(t,A);this.tState=bn}else if(this.tState===bn){if(108!==t[A])return this.charError(t,A);this.tState=Fn}else if(this.tState===Fn){if(108!==t[A])return this.charError(t,A);this.tState=hn,this.onToken(un,null),this.offset+=3}},Wn.onToken=function(t,e){},Wn.parseError=function(t,e){this.tState=Bn,this.onError(new Error("Unexpected "+Zn.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+Zn.toknam(this.state)))},Wn.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},Wn.pop=function(){var t=this.value,e=this.stack.pop();this.value=e.value,this.key=e.key,this.mode=e.mode,this.emit(t),this.mode||(this.state=xn)},Wn.emit=function(t){this.mode&&(this.state=gn),this.onValue(t)},Wn.onValue=function(t){},Wn.onToken=function(t,e){if(this.state===xn)if(t===ln||t===Cn||t===cn||t===In||t===un)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===nn)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=On,this.mode=Mn;else if(t===on)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=Ln,this.state=xn;else if(t===rn){if(this.mode!==Mn)return this.parseError(t,e);this.pop()}else{if(t!==an)return this.parseError(t,e);if(this.mode!==Ln)return this.parseError(t,e);this.pop()}else if(this.state===On)if(t===ln)this.key=e,this.state=sn;else{if(t!==rn)return this.parseError(t,e);this.pop()}else if(this.state===sn){if(t!==sn)return this.parseError(t,e);this.state=xn}else{if(this.state!==gn)return this.parseError(t,e);if(t===gn)this.mode===Ln?(this.key++,this.state=xn):this.mode===Mn&&(this.state=On);else{if(!(t===an&&this.mode===Ln||t===rn&&this.mode===Mn))return this.parseError(t,e);this.pop()}}},Zn.C=An;var Kn=Zn,Pn=function(t){function e(t,A){var n;return Xe(this,e),n=nA(this,eA(e).call(this,A)),Object.getOwnPropertyNames(zA.prototype).forEach((function(t){return n[t]=zA.prototype[t]})),n.opts=n.preprocessOpts(t),n.preprocessRow=n.memoizePreprocessRow(),n._data="",n._hasWritten=!1,n._readableState.objectMode?n.initObjectModeParse():n.opts.ndjson?n.initNDJSONParse():n.initJSONParser(),n.opts.withBOM&&n.push("\ufeff"),n.opts.fields&&(n.opts.fields=n.preprocessFieldsInfo(n.opts.fields),n.pushHeader()),n}return tA(e,t),$e(e,[{key:"initObjectModeParse",value:function(){var t=this;this.parser={write:function(e){t.pushLine(e)},getPendingData:function(){}}}},{key:"initNDJSONParse",value:function(){var t=this;this.parser={_data:"",write:function(e){this._data+=e.toString();var A=this._data.split("\n").map((function(t){return t.trim()})).filter((function(t){return""!==t})),n=!1;A.forEach((function(e,r){try{t.pushLine(JSON.parse(e))}catch(i){r===A.length-1?n=!0:(i.message="Invalid JSON ("+e+")",t.emit("error",i))}})),this._data=n?this._data.slice(this._data.lastIndexOf("\n")):""},getPendingData:function(){return this._data}}}},{key:"initJSONParser",value:function(){var t=this;this.parser=new Kn,this.parser.onValue=function(e){this.stack.length===this.depthToEmit&&t.pushLine(e)},this.parser._onToken=this.parser.onToken,this.parser.onToken=function(e,A){t.parser._onToken(e,A),0!==this.stack.length||t.opts.fields||this.mode===Kn.C.ARRAY||this.mode===Kn.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===Kn.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(e){e.message.includes("Unexpected")&&(e.message="Invalid JSON ("+e.message+")"),t.emit("error",e)}}},{key:"_transform",value:function(t,e,A){this.parser.write(t),A()}},{key:"_flush",value:function(t){this.parser.getPendingData()&&t(new Error("Invalid data received from stdin",this.parser.getPendingData())),t()}},{key:"pushHeader",value:function(){if(this.opts.header){var t=this.getHeader();this.emit("header",t),this.push(t),this._hasWritten=!0}}},{key:"pushLine",value:function(t){var e=this,A=this.preprocessRow(t);this._hasWritten||(this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(Object.keys(A[0])),this.pushHeader()),A.forEach((function(t){var A=e.processRow(t,e.opts);void 0!==A&&(e.emit("line",A),e.push(e._hasWritten?e.opts.eol+A:A),e._hasWritten=!0)}))}}]),e}(Pe.Transform),qn=Pe.Transform,Xn=ZA,zn=function(){function t(e,A){Xe(this,t),this.input=new qn(A),this.input._read=function(){},this.transform=new Pn(e,A),this.processor=this.input.pipe(this.transform)}return $e(t,[{key:"fromInput",value:function(t){if(this._input)throw new Error("Async parser already has an input.");return this._input=t,this.input=this._input.pipe(this.processor),this}},{key:"throughTransform",value:function(t){if(this._output)throw new Error("Can't add transforms once an output has been added.");return this.processor=this.processor.pipe(t),this}},{key:"toOutput",value:function(t){if(this._output)throw new Error("Async parser already has an output.");return this._output=t,this.processor=this.processor.pipe(t),this}},{key:"promise",value:function(){var t=this;return new Promise((function(e,A){var n=[];t.processor.on("data",(function(t){return n.push(t.toString())})).on("finish",(function(){return e(Xn(n,""))})).on("error",(function(t){return A(t)}))}))}}]),t}(),$n=Pe.Readable,tr=en,er=zn,Ar=Pn,nr=function(t,e){return new en(e).parse(t)},rr=function(t,e,A){try{t instanceof $n||(A=Object.assign({},A,{objectMode:!0}));var n=new zn(e,A),r=n.promise();return Array.isArray(t)?(t.forEach((function(t){return n.input.push(t)})),n.input.push(null)):t instanceof $n?n.fromInput(t):(n.input.push(t),n.input.push(null)),r}catch(i){return Promise.reject(i)}},ir={Parser:tr,AsyncParser:er,Transform:Ar,parse:nr,parseAsync:rr};e.default=ir,e.Parser=tr,e.AsyncParser=er,e.Transform=Ar,e.parse=nr,e.parseAsync=rr,Object.defineProperty(e,"__esModule",{value:!0})})(e)}).call(this,A(58))},function(t,e,A){var n=A(1222),r=A(1223),i=A(1224);t.exports=function(t){return n(t)||r(t)||i()}},function(t,e,A){var n=A(1225),r=A(1226),i=A(1227);t.exports=function(t,e){return n(t)||r(t,e)||i()}},function(t,e,A){var n=A(1074),r=A(860),i=A(1229),o=A(861),a=r((function(t){return i(n(t,1,o,!0))}));t.exports=a},function(t,e,A){var n=A(1236),r=A(1074),i=A(860),o=A(861),a=i((function(t,e){return o(t)?n(t,r(e,1,o,!0)):[]}));t.exports=a},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomPicker=e.TwitterPicker=e.SwatchesPicker=e.SliderPicker=e.SketchPicker=e.PhotoshopPicker=e.MaterialPicker=e.HuePicker=e.GithubPicker=e.CompactPicker=e.ChromePicker=e.default=e.CirclePicker=e.BlockPicker=e.AlphaPicker=void 0;var n=A(1277);Object.defineProperty(e,"AlphaPicker",{enumerable:!0,get:function(){return d(n).default}});var r=A(1324);Object.defineProperty(e,"BlockPicker",{enumerable:!0,get:function(){return d(r).default}});var i=A(1326);Object.defineProperty(e,"CirclePicker",{enumerable:!0,get:function(){return d(i).default}});var o=A(1328);Object.defineProperty(e,"ChromePicker",{enumerable:!0,get:function(){return d(o).default}});var a=A(1333);Object.defineProperty(e,"CompactPicker",{enumerable:!0,get:function(){return d(a).default}});var s=A(1336);Object.defineProperty(e,"GithubPicker",{enumerable:!0,get:function(){return d(s).default}});var g=A(1338);Object.defineProperty(e,"HuePicker",{enumerable:!0,get:function(){return d(g).default}});var c=A(1340);Object.defineProperty(e,"MaterialPicker",{enumerable:!0,get:function(){return d(c).default}});var I=A(1341);Object.defineProperty(e,"PhotoshopPicker",{enumerable:!0,get:function(){return d(I).default}});var u=A(1347);Object.defineProperty(e,"SketchPicker",{enumerable:!0,get:function(){return d(u).default}});var l=A(1350);Object.defineProperty(e,"SliderPicker",{enumerable:!0,get:function(){return d(l).default}});var C=A(1354);Object.defineProperty(e,"SwatchesPicker",{enumerable:!0,get:function(){return d(C).default}});var h=A(1358);Object.defineProperty(e,"TwitterPicker",{enumerable:!0,get:function(){return d(h).default}});var B=A(1106);Object.defineProperty(e,"CustomPicker",{enumerable:!0,get:function(){return d(B).default}});var f=d(o);function d(t){return t&&t.__esModule?t:{default:t}}e.default=f.default},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,A,n){function r(e){var n=new i.default(e);A.call(t,n)}if(t.addEventListener){var o=function(){var A=!1;return"object"===typeof n?A=n.capture||!1:"boolean"===typeof n&&(A=n),t.addEventListener(e,r,n||!1),{v:{remove:function(){t.removeEventListener(e,r,A)}}}}();if("object"===typeof o)return o.v}else if(t.attachEvent)return t.attachEvent("on"+e,r),{remove:function(){t.detachEvent("on"+e,r)}}};var n,r=A(1359),i=(n=r)&&n.__esModule?n:{default:n};t.exports=e.default},function(t,e,A){"use strict";(function(t){var A=function(){if("undefined"!==typeof Map)return Map;function t(t,e){var A=-1;return t.some((function(t,n){return t[0]===e&&(A=n,!0)})),A}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var A=t(this.__entries__,e),n=this.__entries__[A];return n&&n[1]},e.prototype.set=function(e,A){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=A:this.__entries__.push([e,A])},e.prototype.delete=function(e){var A=this.__entries__,n=t(A,e);~n&&A.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var A=0,n=this.__entries__;A<n.length;A++){var r=n[A];t.call(e,r[1],r[0])}},e}()}(),n="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,r="undefined"!==typeof t&&t.Math===Math?t:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),i="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var o=["top","right","bottom","left","width","height","size","weight"],a="undefined"!==typeof MutationObserver,s=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var A=!1,n=!1,r=0;function o(){A&&(A=!1,t()),n&&s()}function a(){i(o)}function s(){var t=Date.now();if(A){if(t-r<2)return;n=!0}else A=!0,n=!1,setTimeout(a,e);r=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,A=e.indexOf(t);~A&&e.splice(A,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(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)},t.prototype.disconnect_=function(){n&&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)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,A=void 0===e?"":e;o.some((function(t){return!!~A.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),g=function(t,e){for(var A=0,n=Object.keys(e);A<n.length;A++){var r=n[A];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},c=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||r},I=f(0,0,0,0);function u(t){return parseFloat(t)||0}function l(t){for(var e=[],A=1;A<arguments.length;A++)e[A-1]=arguments[A];return e.reduce((function(e,A){return e+u(t["border-"+A+"-width"])}),0)}function C(t){var e=t.clientWidth,A=t.clientHeight;if(!e&&!A)return I;var n=c(t).getComputedStyle(t),r=function(t){for(var e={},A=0,n=["top","right","bottom","left"];A<n.length;A++){var r=n[A],i=t["padding-"+r];e[r]=u(i)}return e}(n),i=r.left+r.right,o=r.top+r.bottom,a=u(n.width),s=u(n.height);if("border-box"===n.boxSizing&&(Math.round(a+i)!==e&&(a-=l(n,"left","right")+i),Math.round(s+o)!==A&&(s-=l(n,"top","bottom")+o)),!function(t){return t===c(t).document.documentElement}(t)){var g=Math.round(a+i)-e,C=Math.round(s+o)-A;1!==Math.abs(g)&&(a-=g),1!==Math.abs(C)&&(s-=C)}return f(r.left,r.top,a,s)}var h="undefined"!==typeof SVGGraphicsElement?function(t){return t instanceof c(t).SVGGraphicsElement}:function(t){return t instanceof c(t).SVGElement&&"function"===typeof t.getBBox};function B(t){return n?h(t)?function(t){var e=t.getBBox();return f(0,0,e.width,e.height)}(t):C(t):I}function f(t,e,A,n){return{x:t,y:e,width:A,height:n}}var d=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=f(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=B(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Q=function(t,e){var A=function(t){var e=t.x,A=t.y,n=t.width,r=t.height,i="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(i.prototype);return g(o,{x:e,y:A,width:n,height:r,top:A,right:e+n,bottom:r+A,left:e}),o}(e);g(this,{target:t,contentRect:A})},E=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new A,"function"!==typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(t instanceof c(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new d(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(t instanceof c(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Q(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),p="undefined"!==typeof WeakMap?new WeakMap:new A,y=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var A=s.getInstance(),n=new E(e,A,this);p.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){y.prototype[t]=function(){var e;return(e=p.get(this))[t].apply(e,arguments)}}));var v="undefined"!==typeof r.ResizeObserver?r.ResizeObserver:y;e.a=v}).call(this,A(58))},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.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");e.default=i},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.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");e.default=i},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.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 2zm5 11H7v-2h10v2z"}),"RemoveCircle");e.default=i},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.default.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");e.default=i},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.default.createElement("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");e.default=i},function(t,e,A){"use strict";var n=A(108);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(A(0)),i=(0,n(A(186)).default)(r.default.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");e.default=i},function(t){t.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(t){t.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(t,e,A){(function(e){var A=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var A,n,r;try{A=Map}catch(s){A=function(){}}try{n=Set}catch(s){n=function(){}}try{r=Promise}catch(s){r=function(){}}function i(o,s,g,c,I){"object"===typeof s&&(g=s.depth,c=s.prototype,I=s.includeNonEnumerable,s=s.circular);var u=[],l=[],C="undefined"!=typeof e;return"undefined"==typeof s&&(s=!0),"undefined"==typeof g&&(g=1/0),function o(g,h){if(null===g)return null;if(0===h)return g;var B,f;if("object"!=typeof g)return g;if(t(g,A))B=new A;else if(t(g,n))B=new n;else if(t(g,r))B=new r((function(t,e){g.then((function(e){t(o(e,h-1))}),(function(t){e(o(t,h-1))}))}));else if(i.__isArray(g))B=[];else if(i.__isRegExp(g))B=new RegExp(g.source,a(g)),g.lastIndex&&(B.lastIndex=g.lastIndex);else if(i.__isDate(g))B=new Date(g.getTime());else{if(C&&e.isBuffer(g))return B=e.allocUnsafe?e.allocUnsafe(g.length):new e(g.length),g.copy(B),B;t(g,Error)?B=Object.create(g):"undefined"==typeof c?(f=Object.getPrototypeOf(g),B=Object.create(f)):(B=Object.create(c),f=c)}if(s){var d=u.indexOf(g);if(-1!=d)return l[d];u.push(g),l.push(B)}for(var Q in t(g,A)&&g.forEach((function(t,e){var A=o(e,h-1),n=o(t,h-1);B.set(A,n)})),t(g,n)&&g.forEach((function(t){var e=o(t,h-1);B.add(e)})),g){var E;f&&(E=Object.getOwnPropertyDescriptor(f,Q)),E&&null==E.set||(B[Q]=o(g[Q],h-1))}if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(g);for(Q=0;Q<p.length;Q++){var y=p[Q];(!(m=Object.getOwnPropertyDescriptor(g,y))||m.enumerable||I)&&(B[y]=o(g[y],h-1),m.enumerable||Object.defineProperty(B,y,{enumerable:!1}))}}if(I){var v=Object.getOwnPropertyNames(g);for(Q=0;Q<v.length;Q++){var m,b=v[Q];(m=Object.getOwnPropertyDescriptor(g,b))&&m.enumerable||(B[b]=o(g[b],h-1),Object.defineProperty(B,b,{enumerable:!1}))}}return B}(o,g)}function o(t){return Object.prototype.toString.call(t)}function a(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return i.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},i.__objToStr=o,i.__isDate=function(t){return"object"===typeof t&&"[object Date]"===o(t)},i.__isArray=function(t){return"object"===typeof t&&"[object Array]"===o(t)},i.__isRegExp=function(t){return"object"===typeof t&&"[object RegExp]"===o(t)},i.__getRegExpFlags=a,i}();t.exports&&(t.exports=A)}).call(this,A(104).Buffer)},function(t){t.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(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=(A(25),A(32)),a=A(22),s=A(344),g=A(297),c=A(41),I=A(907),u=i.forwardRef((function(t,e){var A=t.autoFocus,c=t.checked,u=t.checkedIcon,l=t.classes,C=t.className,h=t.defaultChecked,B=t.disabled,f=t.icon,d=t.id,Q=t.inputProps,E=t.inputRef,p=t.name,y=t.onBlur,v=t.onChange,m=t.onFocus,b=t.readOnly,F=t.required,w=t.tabIndex,S=t.type,D=t.value,R=Object(r.a)(t,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),U=Object(s.a)({controlled:c,default:Boolean(h),name:"SwitchBase"}),G=Object(a.a)(U,2),N=G[0],k=G[1],x=Object(g.a)(),O=B;x&&"undefined"===typeof O&&(O=x.disabled);var M="checkbox"===S||"radio"===S;return i.createElement(I.a,Object(n.a)({component:"span",className:Object(o.a)(l.root,C,N&&l.checked,O&&l.disabled),disabled:O,tabIndex:null,role:void 0,onFocus:function(t){m&&m(t),x&&x.onFocus&&x.onFocus(t)},onBlur:function(t){y&&y(t),x&&x.onBlur&&x.onBlur(t)},ref:e},R),i.createElement("input",Object(n.a)({autoFocus:A,checked:c,defaultChecked:h,className:l.input,disabled:O,id:M&&d,name:p,onChange:function(t){var e=t.target.checked;k(e),v&&v(t,e)},readOnly:b,ref:E,required:F,tabIndex:w,type:S,value:D},Q)),N?u:f)})),l=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"})(u),C=A(252),h=Object(C.a)(i.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"),B=Object(C.a)(i.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"),f=A(86),d=Object(C.a)(i.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"),Q=A(66),E=i.createElement(B,null),p=i.createElement(h,null),y=i.createElement(d,null),v=i.forwardRef((function(t,e){var A=t.checkedIcon,a=void 0===A?E:A,s=t.classes,g=t.color,c=void 0===g?"secondary":g,I=t.icon,u=void 0===I?p:I,C=t.indeterminate,h=void 0!==C&&C,B=t.indeterminateIcon,f=void 0===B?y:B,d=t.inputProps,v=t.size,m=void 0===v?"medium":v,b=Object(r.a)(t,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]);return i.createElement(l,Object(n.a)({type:"checkbox",classes:{root:Object(o.a)(s.root,s["color".concat(Object(Q.a)(c))],h&&s.indeterminate),checked:s.checked,disabled:s.disabled},color:c,inputProps:Object(n.a)({"data-indeterminate":h},d),icon:i.cloneElement(h?f:u,{fontSize:"small"===m?"small":"default"}),checkedIcon:i.cloneElement(h?f:a,{fontSize:"small"===m?"small":"default"}),ref:e},b))}));e.a=Object(c.a)((function(t){return{root:{color:t.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:t.palette.primary.main,"&:hover":{backgroundColor:Object(f.b)(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}},colorSecondary:{"&$checked":{color:t.palette.secondary.main,"&:hover":{backgroundColor:Object(f.b)(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:t.palette.action.disabled}}}}),{name:"MuiCheckbox"})(v)},function(t,e,A){"use strict";var n=A(22),r=A(30),i=A(10),o=A(29),a=A(0),s=(A(25),A(32)),g=A(41),c=A(246),I=A(86),u=A(239),l=A(100),C=A(90),h=A(64),B=A(66),f=A(344);var d=Object(g.a)((function(t){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Object(i.a)({zIndex:1},t.typography.body2,{fontSize:t.typography.pxToRem(12),lineHeight:1.2,transition:t.transitions.create(["transform"],{duration:t.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:t.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(t){var e=t.children,A=t.classes,n=t.className,r=t.open,i=t.value,o=t.valueLabelDisplay;return"off"===o?e:a.cloneElement(e,{className:Object(s.a)(e.props.className,(r||"on"===o)&&A.open,A.thumb)},a.createElement("span",{className:Object(s.a)(A.offset,n)},a.createElement("span",{className:A.circle},a.createElement("span",{className:A.label},i))))}));function Q(t,e){return t-e}function E(t,e,A){return Math.min(Math.max(e,t),A)}function p(t,e){return t.reduce((function(t,A,n){var r=Math.abs(e-A);return null===t||r<t.distance||r===t.distance?{distance:r,index:n}:t}),null).index}function y(t,e){if(void 0!==e.current&&t.changedTouches){for(var A=0;A<t.changedTouches.length;A+=1){var n=t.changedTouches[A];if(n.identifier===e.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function v(t,e,A){return 100*(t-e)/(A-e)}function m(t,e,A){var n=Math.round((t-A)/e)*e+A;return Number(n.toFixed(function(t){if(Math.abs(t)<1){var e=t.toExponential().split("e-"),A=e[0].split(".")[1];return(A?A.length:0)+parseInt(e[1],10)}var n=t.toString().split(".")[1];return n?n.length:0}(e)))}function b(t){var e=t.values,A=t.source,n=t.newValue,r=t.index;if(e[r]===n)return A;var i=Object(o.a)(e);return i[r]=n,i}function F(t){var e=t.sliderRef,A=t.activeIndex,n=t.setActive;e.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===A||e.current.querySelector('[data-index="'.concat(A,'"]')).focus(),n&&n(A)}var w={horizontal:{offset:function(t){return{left:"".concat(t,"%")}},leap:function(t){return{width:"".concat(t,"%")}}},"horizontal-reverse":{offset:function(t){return{right:"".concat(t,"%")}},leap:function(t){return{width:"".concat(t,"%")}}},vertical:{offset:function(t){return{bottom:"".concat(t,"%")}},leap:function(t){return{height:"".concat(t,"%")}}}},S=function(t){return t},D=a.forwardRef((function(t,e){var A=t["aria-label"],g=t["aria-labelledby"],I=t["aria-valuetext"],D=t.classes,R=t.className,U=t.color,G=void 0===U?"primary":U,N=t.component,k=void 0===N?"span":N,x=t.defaultValue,O=t.disabled,M=void 0!==O&&O,L=t.getAriaLabel,_=t.getAriaValueText,J=t.marks,T=void 0!==J&&J,j=t.max,H=void 0===j?100:j,Y=t.min,V=void 0===Y?0:Y,Z=t.name,W=t.onChange,K=t.onChangeCommitted,P=t.onMouseDown,q=t.orientation,X=void 0===q?"horizontal":q,z=t.scale,$=void 0===z?S:z,tt=t.step,et=void 0===tt?1:tt,At=t.ThumbComponent,nt=void 0===At?"span":At,rt=t.track,it=void 0===rt?"normal":rt,ot=t.value,at=t.ValueLabelComponent,st=void 0===at?d:at,gt=t.valueLabelDisplay,ct=void 0===gt?"off":gt,It=t.valueLabelFormat,ut=void 0===It?S:It,lt=Object(r.a)(t,["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"]),Ct=Object(c.a)(),ht=a.useRef(),Bt=a.useState(-1),ft=Bt[0],dt=Bt[1],Qt=a.useState(-1),Et=Qt[0],pt=Qt[1],yt=Object(f.a)({controlled:ot,default:x,name:"Slider"}),vt=Object(n.a)(yt,2),mt=vt[0],bt=vt[1],Ft=Array.isArray(mt),wt=a.useRef(),St=Ft?Object(o.a)(mt).sort(Q):[mt];St=St.map((function(t){return E(t,V,H)}));var Dt=!0===T&&null!==et?Object(o.a)(Array(Math.floor((H-V)/et)+1)).map((function(t,e){return{value:V+et*e}})):T||[];wt.current={source:mt};var Rt=Object(u.a)(),Ut=Rt.isFocusVisible,Gt=Rt.onBlurVisible,Nt=Rt.ref,kt=a.useState(-1),xt=kt[0],Ot=kt[1],Mt=a.useRef(),Lt=Object(h.a)(Nt,Mt),_t=Object(h.a)(e,Lt),Jt=Object(C.a)((function(t){var e=Number(t.currentTarget.getAttribute("data-index"));Ut(t)&&Ot(e),pt(e)})),Tt=Object(C.a)((function(){-1!==xt&&(Ot(-1),Gt()),pt(-1)})),jt=Object(C.a)((function(t){var e=Number(t.currentTarget.getAttribute("data-index"));pt(e)})),Ht=Object(C.a)((function(){pt(-1)})),Yt=Object(C.a)((function(t){var e,A=Number(t.currentTarget.getAttribute("data-index")),n=St[A],r=(H-V)/10,i=Dt.map((function(t){return t.value})),o=i.indexOf(n);switch(t.key){case"Home":e=V;break;case"End":e=H;break;case"PageUp":et&&(e=n+r);break;case"PageDown":et&&(e=n-r);break;case"ArrowRight":case"ArrowUp":e=et?n+et:i[o+1]||i[i.length-1];break;case"ArrowLeft":case"ArrowDown":e=et?n-et:i[o-1]||i[0];break;default:return}if(t.preventDefault(),et&&(e=m(e,et,V)),e=E(e,V,H),Ft){var a=e;e=b({values:St,source:mt,newValue:e,index:A}).sort(Q),F({sliderRef:Mt,activeIndex:e.indexOf(a)})}bt(e),Ot(A),W&&W(t,e),K&&K(t,e)})),Vt=a.useRef(),Zt=X;"rtl"===Ct.direction&&"vertical"!==X&&(Zt+="-reverse");var Wt=function(t){var e,A,n=t.finger,r=t.move,i=void 0!==r&&r,o=t.values,a=t.source,s=Mt.current.getBoundingClientRect(),g=s.width,c=s.height,I=s.bottom,u=s.left;if(e=0===Zt.indexOf("vertical")?(I-n.y)/c:(n.x-u)/g,-1!==Zt.indexOf("-reverse")&&(e=1-e),A=function(t,e,A){return(A-e)*t+e}(e,V,H),et)A=m(A,et,V);else{var l=Dt.map((function(t){return t.value}));A=l[p(l,A)]}A=E(A,V,H);var C=0;if(Ft){var h=A;C=(A=b({values:o,source:a,newValue:A,index:C=i?Vt.current:p(o,A)}).sort(Q)).indexOf(h),Vt.current=C}return{newValue:A,activeIndex:C}},Kt=Object(C.a)((function(t){var e=y(t,ht);if(e){var A=Wt({finger:e,move:!0,values:St,source:mt}),n=A.newValue,r=A.activeIndex;F({sliderRef:Mt,activeIndex:r,setActive:dt}),bt(n),W&&W(t,n)}})),Pt=Object(C.a)((function(t){var e=y(t,ht);if(e){var A=Wt({finger:e,values:St,source:mt}).newValue;dt(-1),"touchend"===t.type&&pt(-1),K&&K(t,A),ht.current=void 0;var n=Object(l.a)(Mt.current);n.removeEventListener("mousemove",Kt),n.removeEventListener("mouseup",Pt),n.removeEventListener("touchmove",Kt),n.removeEventListener("touchend",Pt)}})),qt=Object(C.a)((function(t){t.preventDefault();var e=t.changedTouches[0];null!=e&&(ht.current=e.identifier);var A=y(t,ht),n=Wt({finger:A,values:St,source:mt}),r=n.newValue,i=n.activeIndex;F({sliderRef:Mt,activeIndex:i,setActive:dt}),bt(r),W&&W(t,r);var o=Object(l.a)(Mt.current);o.addEventListener("touchmove",Kt),o.addEventListener("touchend",Pt)}));a.useEffect((function(){var t=Mt.current;t.addEventListener("touchstart",qt);var e=Object(l.a)(t);return function(){t.removeEventListener("touchstart",qt),e.removeEventListener("mousemove",Kt),e.removeEventListener("mouseup",Pt),e.removeEventListener("touchmove",Kt),e.removeEventListener("touchend",Pt)}}),[Pt,Kt,qt]);var Xt=Object(C.a)((function(t){P&&P(t),t.preventDefault();var e=y(t,ht),A=Wt({finger:e,values:St,source:mt}),n=A.newValue,r=A.activeIndex;F({sliderRef:Mt,activeIndex:r,setActive:dt}),bt(n),W&&W(t,n);var i=Object(l.a)(Mt.current);i.addEventListener("mousemove",Kt),i.addEventListener("mouseup",Pt)})),zt=v(Ft?St[0]:V,V,H),$t=v(St[St.length-1],V,H)-zt,te=Object(i.a)({},w[Zt].offset(zt),{},w[Zt].leap($t));return a.createElement(k,Object(i.a)({ref:_t,className:Object(s.a)(D.root,D["color".concat(Object(B.a)(G))],R,M&&D.disabled,Dt.length>0&&Dt.some((function(t){return t.label}))&&D.marked,!1===it&&D.trackFalse,"vertical"===X&&D.vertical,"inverted"===it&&D.trackInverted),onMouseDown:Xt},lt),a.createElement("span",{className:D.rail}),a.createElement("span",{className:D.track,style:te}),a.createElement("input",{value:St.join(","),name:Z,type:"hidden"}),Dt.map((function(t){var e,A=v(t.value,V,H),n=w[Zt].offset(A);return e=!1===it?-1!==St.indexOf(t.value):"normal"===it&&(Ft?t.value>=St[0]&&t.value<=St[St.length-1]:t.value<=St[0])||"inverted"===it&&(Ft?t.value<=St[0]||t.value>=St[St.length-1]:t.value>=St[0]),a.createElement(a.Fragment,{key:t.value},a.createElement("span",{style:n,className:Object(s.a)(D.mark,e&&D.markActive)}),a.createElement("span",{"aria-hidden":!0,style:n,className:Object(s.a)(D.markLabel,e&&D.markLabelActive)},t.label))})),St.map((function(t,e){var n=v(t,V,H),r=w[Zt].offset(n);return a.createElement(st,{key:e,valueLabelFormat:ut,valueLabelDisplay:ct,className:D.valueLabel,value:"function"===typeof ut?ut($(t),e):ut,index:e,open:Et===e||ft===e||"on"===ct,disabled:M},a.createElement(nt,{className:Object(s.a)(D.thumb,D["thumbColor".concat(Object(B.a)(G))],ft===e&&D.active,M&&D.disabled,xt===e&&D.focusVisible),tabIndex:M?null:0,role:"slider",style:r,"data-index":e,"aria-label":L?L(e):A,"aria-labelledby":g,"aria-orientation":X,"aria-valuemax":$(H),"aria-valuemin":$(V),"aria-valuenow":$(t),"aria-valuetext":_?_($(t),e):I,onKeyDown:Yt,onFocus:Jt,onBlur:Tt,onMouseOver:jt,onMouseLeave:Ht}))})))}));e.a=Object(g.a)((function(t){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:t.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:t.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:t.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"===t.palette.type?Object(I.d)(t.palette.primary.main,.62):Object(I.a)(t.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:t.transitions.create(["box-shadow"],{duration:t.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(I.b)(t.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(I.b)(t.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(I.b)(t.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(Object(I.b)(t.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:t.palette.background.paper,opacity:.8},markLabel:Object(i.a)({},t.typography.body2,{color:t.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:t.palette.text.primary}}}),{name:"MuiSlider"})(D)},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=(A(25),A(32)),a=A(41),s=A(531),g=A(86),c=i.forwardRef((function(t,e){var A=t.classes,a=t.className,g=t.component,c=void 0===g?"tr":g,I=t.hover,u=void 0!==I&&I,l=t.selected,C=void 0!==l&&l,h=Object(r.a)(t,["classes","className","component","hover","selected"]),B=i.useContext(s.a);return i.createElement(c,Object(n.a)({ref:e,className:Object(o.a)(A.root,a,B&&{head:A.head,footer:A.footer}[B.variant],u&&A.hover,C&&A.selected)},h))}));e.a=Object(a.a)((function(t){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:t.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:Object(g.b)(t.palette.secondary.main,t.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(c)},function(t,e,A){"use strict";(function(t,n,r){A.d(e,"a",(function(){return An})),A.d(e,"b",(function(){return nn})),A.d(e,"c",(function(){return V}));var i=A(8),o=A(116),a=A(13),s=A(21),g=A(15),c=A(2),I=A.n(c),u=A(17),l=A(9),C=A(54),h=A(23),B=A(24),f=A(77),d=I.a.mark(At);function Q(t){return new Proxy(t,{set:function(t,e,A,n){return t.setItem(e,A)},get:function(t,e,A){return t.getItem(e)},deleteProperty:function(t,e){return t.deleteItem(e)},has:function(t,e){return t.containsItem(e)}})}function E(t,e,A,n){return new(A||(A=Promise))((function(r,i){function o(t){try{s(n.next(t))}catch(e){i(e)}}function a(t){try{s(n.throw(t))}catch(e){i(e)}}function s(t){t.done?r(t.value):new A((function(e){e(t.value)})).then(o,a)}s((n=n.apply(t,e||[])).next())}))}var p="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{};function y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function v(t,e){return t(e={exports:{}},e.exports),e.exports}var m=v((function(t,e){var A=p&&p.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var A in e)e.hasOwnProperty(A)&&(t[A]=e[A])};return function(e,A){function n(){this.constructor=e}t(e,A),e.prototype=null===A?Object.create(A):(n.prototype=A.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){function e(e,A){var n=t.call(this,A)||this;return n.path=e,n}return A(e,t),e}(Error);e.VError=n;var r=function(){function t(){}return t.prototype.fail=function(t,e,A){return!1},t.prototype.unionResolver=function(){return this},t.prototype.createContext=function(){return this},t.prototype.resolveUnion=function(t){},t}();e.NoopContext=r;var i=function(){function t(){this._propNames=[""],this._messages=[null],this._score=0}return t.prototype.fail=function(t,e,A){return this._propNames.push(t),this._messages.push(e),this._score+=A,!1},t.prototype.unionResolver=function(){return new o},t.prototype.resolveUnion=function(t){for(var e,A,n=null,r=0,i=t.contexts;r<i.length;r++){var o=i[r];(!n||o._score>=n._score)&&(n=o)}n&&n._score>0&&((e=this._propNames).push.apply(e,n._propNames),(A=this._messages).push.apply(A,n._messages))},t.prototype.getError=function(t){for(var e=[],A=this._propNames.length-1;A>=0;A--){var r=this._propNames[A];t+="number"===typeof r?"["+r+"]":r?"."+r:"";var i=this._messages[A];i&&e.push(t+" "+i)}return new n(t,e.join("; "))},t.prototype.getErrorDetail=function(t){for(var e=[],A=this._propNames.length-1;A>=0;A--){var n=this._propNames[A];t+="number"===typeof n?"["+n+"]":n?"."+n:"";var r=this._messages[A];r&&e.push({path:t,message:r})}var i=null;for(A=e.length-1;A>=0;A--)i&&(e[A].nested=[i]),i=e[A];return i},t}();e.DetailContext=i;var o=function(){function t(){this.contexts=[]}return t.prototype.createContext=function(){var t=new i;return this.contexts.push(t),t},t}()}));y(m);m.VError,m.NoopContext,m.DetailContext;var b=v((function(t,e){var A=p&&p.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var A in e)e.hasOwnProperty(A)&&(t[A]=e[A])};return function(e,A){function n(){this.constructor=e}t(e,A),e.prototype=null===A?Object.create(A):(n.prototype=A.prototype,new n)}}();Object.defineProperty(e,"__esModule",{value:!0});var r=function(){};function i(t){return"string"===typeof t?a(t):t}function o(t,e){var A=t[e];if(!A)throw new Error("Unknown type "+e);return A}function a(t){return new s(t)}e.TType=r,e.name=a;var s=function(t){function e(e){var A=t.call(this)||this;return A.name=e,A._failMsg="is not a "+e,A}return A(e,t),e.prototype.getChecker=function(t,A){var n=this,r=o(t,this.name),i=r.getChecker(t,A);return r instanceof v||r instanceof e?i:function(t,e){return!!i(t,e)||e.fail(null,n._failMsg,0)}},e}(r);e.TName=s,e.lit=function(t){return new g(t)};var g=function(t){function e(e){var A=t.call(this)||this;return A.value=e,A.name=JSON.stringify(e),A._failMsg="is not "+A.name,A}return A(e,t),e.prototype.getChecker=function(t,e){var A=this;return function(t,e){return t===A.value||e.fail(null,A._failMsg,-1)}},e}(r);e.TLiteral=g,e.array=function(t){return new c(i(t))};var c=function(t){function e(e){var A=t.call(this)||this;return A.ttype=e,A}return A(e,t),e.prototype.getChecker=function(t,e){var A=this.ttype.getChecker(t,e);return function(t,e){if(!Array.isArray(t))return e.fail(null,"is not an array",0);for(var n=0;n<t.length;n++){if(!A(t[n],e))return e.fail(n,null,1)}return!0}},e}(r);e.TArray=c,e.tuple=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new I(t.map((function(t){return i(t)})))};var I=function(t){function e(e){var A=t.call(this)||this;return A.ttypes=e,A}return A(e,t),e.prototype.getChecker=function(t,e){var A=this.ttypes.map((function(A){return A.getChecker(t,e)})),n=function(t,e){if(!Array.isArray(t))return e.fail(null,"is not an array",0);for(var n=0;n<A.length;n++){if(!A[n](t[n],e))return e.fail(n,null,1)}return!0};return e?function(t,e){return!!n(t,e)&&(t.length<=A.length||e.fail(A.length,"is extraneous",2))}:n},e}(r);e.TTuple=I,e.union=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new u(t.map((function(t){return i(t)})))};var u=function(t){function e(e){var A=t.call(this)||this;A.ttypes=e;var n=e.map((function(t){return t instanceof s||t instanceof g?t.name:null})).filter((function(t){return t})),r=e.length-n.length;return n.length?(r>0&&n.push(r+" more"),A._failMsg="is none of "+n.join(", ")):A._failMsg="is none of "+r+" types",A}return A(e,t),e.prototype.getChecker=function(t,e){var A=this,n=this.ttypes.map((function(A){return A.getChecker(t,e)}));return function(t,e){for(var r=e.unionResolver(),i=0;i<n.length;i++){if(n[i](t,r.createContext()))return!0}return e.resolveUnion(r),e.fail(null,A._failMsg,0)}},e}(r);e.TUnion=u,e.enumtype=function(t){return new l(t)};var l=function(t){function e(e){var A=t.call(this)||this;return A.members=e,A.validValues=new Set,A._failMsg="is not a valid enum value",A.validValues=new Set(Object.keys(e).map((function(t){return e[t]}))),A}return A(e,t),e.prototype.getChecker=function(t,e){var A=this;return function(t,e){return!!A.validValues.has(t)||e.fail(null,A._failMsg,0)}},e}(r);e.TEnumType=l,e.enumlit=function(t,e){return new C(t,e)};var C=function(t){function e(e,A){var n=t.call(this)||this;return n.enumName=e,n.prop=A,n._failMsg="is not "+e+"."+A,n}return A(e,t),e.prototype.getChecker=function(t,e){var A=this,n=o(t,this.enumName);if(!(n instanceof l))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var r=n.members[this.prop];if(!n.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(t,e){return t===r||e.fail(null,A._failMsg,-1)}},e}(r);function h(t){return Object.keys(t).map((function(e){return function(t,e){return e instanceof f?new d(t,e.ttype,!0):new d(t,i(e),!1)}(e,t[e])}))}e.TEnumLiteral=C,e.iface=function(t,e){return new B(t,h(e))};var B=function(t){function e(e,A){var n=t.call(this)||this;return n.bases=e,n.props=A,n.propSet=new Set(A.map((function(t){return t.name}))),n}return A(e,t),e.prototype.getChecker=function(t,e){var A=this,n=this.bases.map((function(A){return o(t,A).getChecker(t,e)})),r=this.props.map((function(A){return A.ttype.getChecker(t,e)})),i=new m.NoopContext,a=this.props.map((function(t,e){return!t.isOpt&&!r[e](void 0,i)})),s=function(t,e){if("object"!==typeof t||null===t)return e.fail(null,"is not an object",0);for(var i=0;i<n.length;i++)if(!n[i](t,e))return!1;for(i=0;i<r.length;i++){var o=A.props[i].name,s=t[o];if(void 0===s){if(a[i])return e.fail(o,"is missing",1)}else if(!r[i](s,e))return e.fail(o,null,1)}return!0};return e?function(t,e){if(!s(t,e))return!1;for(var n in t)if(!A.propSet.has(n))return e.fail(n,"is extraneous",2);return!0}:s},e}(r);e.TIface=B,e.opt=function(t){return new f(i(t))};var f=function(t){function e(e){var A=t.call(this)||this;return A.ttype=e,A}return A(e,t),e.prototype.getChecker=function(t,e){var A=this.ttype.getChecker(t,e);return function(t,e){return void 0===t||A(t,e)}},e}(r);e.TOptional=f;var d=function(t,e,A){this.name=t,this.ttype=e,this.isOpt=A};e.TProp=d,e.func=function(t){for(var e=[],A=1;A<arguments.length;A++)e[A-1]=arguments[A];return new Q(new y(e),i(t))};var Q=function(t){function e(e,A){var n=t.call(this)||this;return n.paramList=e,n.result=A,n}return A(e,t),e.prototype.getChecker=function(t,e){return function(t,e){return"function"===typeof t||e.fail(null,"is not a function",0)}},e}(r);e.TFunc=Q,e.param=function(t,e,A){return new E(t,i(e),Boolean(A))};var E=function(t,e,A){this.name=t,this.ttype=e,this.isOpt=A};e.TParam=E;var y=function(t){function e(e){var A=t.call(this)||this;return A.params=e,A}return A(e,t),e.prototype.getChecker=function(t,e){var A=this,n=this.params.map((function(A){return A.ttype.getChecker(t,e)})),r=new m.NoopContext,i=this.params.map((function(t,e){return!t.isOpt&&!n[e](void 0,r)})),o=function(t,e){if(!Array.isArray(t))return e.fail(null,"is not an array",0);for(var r=0;r<n.length;r++){var o=A.params[r];if(void 0===t[r]){if(i[r])return e.fail(o.name,"is missing",1)}else if(!n[r](t[r],e))return e.fail(o.name,null,1)}return!0};return e?function(t,e){return!!o(t,e)&&(t.length<=n.length||e.fail(n.length,"is extraneous",2))}:o},e}(r);e.TParamList=y;var v=function(t){function e(e,A){var n=t.call(this)||this;return n.validator=e,n.message=A,n}return A(e,t),e.prototype.getChecker=function(t,e){var A=this;return function(t,e){return!!A.validator(t)||e.fail(null,A.message,0)}},e}(r);e.BasicType=v,e.basicTypes={any:new v((function(t){return!0}),"is invalid"),number:new v((function(t){return"number"===typeof t}),"is not a number"),object:new v((function(t){return"object"===typeof t&&t}),"is not an object"),boolean:new v((function(t){return"boolean"===typeof t}),"is not a boolean"),string:new v((function(t){return"string"===typeof t}),"is not a string"),symbol:new v((function(t){return"symbol"===typeof t}),"is not a symbol"),void:new v((function(t){return null==t}),"is not void"),undefined:new v((function(t){return void 0===t}),"is not undefined"),null:new v((function(t){return null===t}),"is not null"),never:new v((function(t){return!1}),"is unexpected"),Date:new v(F("[object Date]"),"is not a Date"),RegExp:new v(F("[object RegExp]"),"is not a RegExp")};var b=Object.prototype.toString;function F(t){return function(e){return"object"===typeof e&&e&&b.call(e)===t}}"undefined"!==typeof n&&(e.basicTypes.Buffer=new v((function(t){return n.isBuffer(t)}),"is not a Buffer"));for(var w=function(t){e.basicTypes[t.name]=new v((function(e){return e instanceof t}),"is not a "+t.name)},S=0,D=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];S<D.length;S++){w(D[S])}}));y(b);b.TType,b.name,b.TName,b.lit,b.TLiteral,b.array,b.TArray,b.tuple,b.TTuple,b.union,b.TUnion,b.enumtype,b.TEnumType,b.enumlit,b.TEnumLiteral,b.iface,b.TIface,b.opt,b.TOptional,b.TProp,b.func,b.TFunc,b.param,b.TParam,b.TParamList,b.BasicType,b.basicTypes;var F=v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=b;e.TArray=A.TArray,e.TEnumType=A.TEnumType,e.TEnumLiteral=A.TEnumLiteral,e.TFunc=A.TFunc,e.TIface=A.TIface,e.TLiteral=A.TLiteral,e.TName=A.TName,e.TOptional=A.TOptional,e.TParam=A.TParam,e.TParamList=A.TParamList,e.TProp=A.TProp,e.TTuple=A.TTuple,e.TType=A.TType,e.TUnion=A.TUnion,e.array=A.array,e.enumlit=A.enumlit,e.enumtype=A.enumtype,e.func=A.func,e.iface=A.iface,e.lit=A.lit,e.name=A.name,e.opt=A.opt,e.param=A.param,e.tuple=A.tuple,e.union=A.union,e.BasicType=A.BasicType,e.createCheckers=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var A=Object.assign.apply(Object,[{},b.basicTypes].concat(t)),r={},i=0,o=t;i<o.length;i++)for(var a=o[i],s=0,g=Object.keys(a);s<g.length;s++){var c=g[s];r[c]=new n(A,a[c])}return r};var n=function(){function t(t,e,A){if(void 0===A&&(A="value"),this.suite=t,this.ttype=e,this._path=A,this.props=new Map,e instanceof b.TIface)for(var n=0,r=e.props;n<r.length;n++){var i=r[n];this.props.set(i.name,i.ttype)}this.checkerPlain=this.ttype.getChecker(t,!1),this.checkerStrict=this.ttype.getChecker(t,!0)}return t.prototype.setReportedPath=function(t){this._path=t},t.prototype.check=function(t){return this._doCheck(this.checkerPlain,t)},t.prototype.test=function(t){return this.checkerPlain(t,new m.NoopContext)},t.prototype.validate=function(t){return this._doValidate(this.checkerPlain,t)},t.prototype.strictCheck=function(t){return this._doCheck(this.checkerStrict,t)},t.prototype.strictTest=function(t){return this.checkerStrict(t,new m.NoopContext)},t.prototype.strictValidate=function(t){return this._doValidate(this.checkerStrict,t)},t.prototype.getProp=function(e){var A=this.props.get(e);if(!A)throw new Error("Type has no property "+e);return new t(this.suite,A,this._path+"."+e)},t.prototype.methodArgs=function(e){var A=this._getMethod(e);return new t(this.suite,A.paramList)},t.prototype.methodResult=function(e){var A=this._getMethod(e);return new t(this.suite,A.result)},t.prototype.getArgs=function(){if(!(this.ttype instanceof b.TFunc))throw new Error("getArgs() applied to non-function");return new t(this.suite,this.ttype.paramList)},t.prototype.getResult=function(){if(!(this.ttype instanceof b.TFunc))throw new Error("getResult() applied to non-function");return new t(this.suite,this.ttype.result)},t.prototype.getType=function(){return this.ttype},t.prototype._doCheck=function(t,e){if(!t(e,new m.NoopContext)){var A=new m.DetailContext;throw t(e,A),A.getError(this._path)}},t.prototype._doValidate=function(t,e){if(t(e,new m.NoopContext))return null;var A=new m.DetailContext;return t(e,A),A.getErrorDetail(this._path)},t.prototype._getMethod=function(t){var e=this.props.get(t);if(!e)throw new Error("Type has no property "+t);if(!(e instanceof b.TFunc))throw new Error("Property "+t+" is not a method");return e},t}();e.Checker=n}));y(F);F.TArray,F.TEnumType,F.TEnumLiteral,F.TFunc,F.TIface,F.TLiteral,F.TName,F.TOptional,F.TParam,F.TParamList,F.TProp,F.TTuple,F.TType,F.TUnion;var w=F.array,S=(F.enumlit,F.enumtype,F.func,F.iface),D=F.lit,R=F.name,U=(F.opt,F.param,F.tuple,F.union),G=(F.BasicType,F.createCheckers),N=(F.Checker,{ZarrMetadataType:U("ZarrArrayMetadata","ZarrGroupMetadata"),UserAttributes:R("object"),FillType:U("number",D("NaN"),D("Infinity"),D("-Infinity"),"null"),Order:U(D("C"),D("F")),DtypeString:U(D("<u1"),D("<i1"),D("<i4"),D("<f4"),D("<f8"),D("<b"),D("<B")),ChunksArgument:U("number",w(U("number","null")),"boolean","null"),Compressor:S([],{id:"string"}),Filter:S([],{id:"string"}),ZarrArrayMetadata:S([],{zarr_format:U(D(1),D(2)),shape:w("number"),chunks:w("number"),dtype:"DtypeString",compressor:U("null",S([],{id:"string"})),fill_value:"FillType",order:"Order",filters:U("null",w("Filter"))}),ZarrGroupMetadata:S([],{zarr_format:U(D(1),D(2))})}),k=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),n=e.call(this,"path ".concat(t," contains an array")),Object.setPrototypeOf(Object(C.a)(n),A.prototype),n}return A}(Object(f.a)(Error)),x=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),n=e.call(this,"path ".concat(t," contains a group")),Object.setPrototypeOf(Object(C.a)(n),A.prototype),n}return A}(Object(f.a)(Error)),O=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),n=e.call(this,"array not found at path ".concat(t)),Object.setPrototypeOf(Object(C.a)(n),A.prototype),n}return A}(Object(f.a)(Error)),M=(Error,Error,function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),n=e.call(this,t),Object.setPrototypeOf(Object(C.a)(n),A.prototype),n}return A}(Object(f.a)(Error))),L=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),n=e.call(this,"key ".concat(t," not present")),Object.setPrototypeOf(Object(C.a)(n),A.prototype),n}return A}(Object(f.a)(Error)),_=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t,n){var r;return Object(l.a)(this,A),r=e.call(this,"too many indices for array; expected ".concat(n.length,", got ").concat(t.length)),Object.setPrototypeOf(Object(C.a)(r),A.prototype),r}return A}(Object(f.a)(RangeError)),J=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),n=e.call(this,t),Object.setPrototypeOf(Object(C.a)(n),A.prototype),n}return A}(Object(f.a)(RangeError)),T=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t,n,r,i){var o;return Object(l.a)(this,A),o=e.call(this,"slice arguments slice(".concat(t,", ").concat(n,", ").concat(r,") invalid: ").concat(i)),Object.setPrototypeOf(Object(C.a)(o),A.prototype),o}return A}(Object(f.a)(RangeError)),j=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(){var t;return Object(l.a)(this,A),t=e.call(this,"Negative step size is not supported when indexing."),Object.setPrototypeOf(Object(C.a)(t),A.prototype),t}return A}(Object(f.a)(Error)),H=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),n=e.call(this,t),Object.setPrototypeOf(Object(C.a)(n),A.prototype),n}return A}(Object(f.a)(Error)),Y=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),n=e.call(this,t),Object.setPrototypeOf(Object(C.a)(n),A.prototype),n}return A}(Object(f.a)(Error));function V(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0===t)throw new T(t,e,A,"The first argument must not be undefined");if("string"===typeof t&&":"!==t||"string"===typeof e&&":"!==e)throw new T(t,e,A,'Arguments can only be integers, ":" or null');return void 0===e&&(e=t,t=null),{start:":"===t?null:t,stop:":"===e?null:e,step:A,_slice:!0}}function Z(t,e){var A,n,r;r=null===t.step?1:t.step,null===t.start?A=r<0?Number.MAX_SAFE_INTEGER:0:(A=t.start)<0&&(A+=e),null===t.stop?n=r<0?-Number.MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER:(n=t.stop)<0&&(n+=e);var i=function(t,e,A,n){if(t<0?(t+=n)<0&&(t=A<0?-1:0):t>=n&&(t=A<0?n-1:n),e<0?(e+=n)<0&&(e=A<0?-1:0):e>=n&&(e=A<0?n-1:n),A<0){if(e<t)return[t,e,A,Math.floor((t-e-1)/-A+1)]}else if(t<e)return[t,e,A,Math.floor((e-t-1)/A+1)];return[t,e,A,0]}(A,n,r,e);if(A=i[0],n=i[1],r=i[2],e=i[3],0===r)throw new Error("Step size 0 is invalid");return[A,n,r,e]}function W(t){return Array.isArray(t)?t:[t]}function K(t,e){for(var A=[],n=[],r=0;r<t.length;r++){var i=t[r];if("number"===typeof i)A.push(i);else{var o=Z(i,e[r]),a=o[3];n.push(a),A.push(o)}}return[A,n]}function P(t,e){var A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=q(t,e);for(var n=0;n<t.length;n++){var r=t[n];if("number"===typeof r)t[n]=A?V(r,r+1,1):X(r,e[n]);else{if(z(r))throw new TypeError("Integer array selections are not supported (yet)");":"!==r&&null!==r||(t[n]=V(null,null,1))}}return t}function q(t,e){t=W(t);for(var A=-1,n=0,r=0;r<t.length;r++)"..."===t[r]&&(A=r,n+=1);if(n>1)throw new RangeError("an index can only have a single ellipsis ('...')");if(1===n){var i=A,o=t.length-(i+1),a=t.length-1;if(a>=e.length)t=t.filter((function(t){return"..."!==t}));else{var s=e.length-a,g=t.slice(0,i).concat(new Array(s).fill(null));o>0&&(g=g.concat(t.slice(t.length-o))),t=g}}if(t.length<e.length){var c=e.length-t.length;t=t.concat(new Array(c).fill(null))}return function(t,e){if(t.length>e.length)throw new _(t,e)}(t,e),t}function X(t,e){if(t<0&&(t=e+t),t>=e||t<0)throw new J("index out of bounds for dimension with length ".concat(e));return t}function z(t){if(!Array.isArray(t))return!1;var e,A=Object(u.a)(t);try{for(A.s();!(e=A.n()).done;){if("number"!==typeof e.value)return!1}}catch(we){A.e(we)}finally{A.f()}return!0}function $(t){return null!==t&&!0===t._slice}function tt(t){return $(t)&&(null===t.step||1===t.step)}function et(t){t=W(t);for(var e=0;e<t.length;e++){var A=t[e];if(!z(A)&&!tt(A)&&"..."!==A)return!1}return!0}function At(){var t,e,A,n,r,i,o=arguments;return I.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=o.length,e=new Array(t),A=0;A<t;A++)e[A]=o[A];if(0!==e.length){a.next=3;break}return a.abrupt("return");case 3:n=e.map((function(t){return t()})),r=n.map((function(t){return t.next()})),i=0;case 6:if(!r[i].done){a.next=13;break}if(n[i]=e[i](),r[i]=n[i].next(),!(++i>=n.length)){a.next=11;break}return a.abrupt("return");case 11:a.next=16;break;case 13:return a.next=15,r.map((function(t){return t.value}));case 15:i=0;case 16:r[i]=n[i].next();case 17:a.next=6;break;case 19:case"end":return a.stop()}}),d)}var nt=function(){function t(e,A){Object(l.a)(this,t),e=P(e,A.shape),this.dimIndexers=[];for(var n=A.shape,r=0;r<n.length;r++){var i=e[r],o=n[r],a=A.chunks[r];if(null===i&&(i=V(null)),"number"===typeof i)this.dimIndexers.push(new rt(i,o,a));else{if(!$(i))throw new RangeError("Unspported selection item for basic indexing; expected integer or slice, got ".concat(i));this.dimIndexers.push(new it(i,o,a))}}this.shape=[];var s,g=Object(u.a)(this.dimIndexers);try{for(g.s();!(s=g.n()).done;){var c=s.value;c instanceof it&&this.shape.push(c.numItems)}}catch(we){g.e(we)}finally{g.f()}this.dropAxes=null}return Object(g.a)(t,[{key:"iter",value:I.a.mark((function t(){var e,A,n,r,i,o,a,g,c,l,C;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.dimIndexers.map((function(t){return function(){return t.iter()}})),A=At.apply(void 0,Object(s.a)(e)),n=Object(u.a)(A),t.prev=3,n.s();case 5:if((r=n.n()).done){t.next=16;break}i=r.value,o=[],a=[],g=[],c=Object(u.a)(i);try{for(c.s();!(l=c.n()).done;)C=l.value,o.push(C.dimChunkIndex),a.push(C.dimChunkSelection),null!==C.dimOutSelection&&g.push(C.dimOutSelection)}catch(we){c.e(we)}finally{c.f()}return t.next=14,{chunkCoords:o,chunkSelection:a,outSelection:g};case 14:t.next=5;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(3),n.e(t.t0);case 21:return t.prev=21,n.f(),t.finish(21);case 24:case"end":return t.stop()}}),t,this,[[3,18,21,24]])}))}]),t}(),rt=function(){function t(e,A,n){Object(l.a)(this,t),e=X(e,A),this.dimSelection=e,this.dimLength=A,this.dimChunkLength=n,this.numItems=1}return Object(g.a)(t,[{key:"iter",value:I.a.mark((function t(){var e,A,n;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Math.floor(this.dimSelection/this.dimChunkLength),A=e*this.dimChunkLength,n=this.dimSelection-A,null,t.next=6,{dimChunkIndex:e,dimChunkSelection:n,dimOutSelection:null};case 6:case"end":return t.stop()}}),t,this)}))}]),t}(),it=function(){function t(e,A,n){Object(l.a)(this,t);var r=Z(e,A),i=Object(a.a)(r,3),o=i[0],s=i[1],g=i[2];if(this.start=o,this.stop=s,this.step=g,this.step<1)throw new j;this.dimLength=A,this.dimChunkLength=n,this.numItems=Math.max(0,Math.ceil((this.stop-this.start)/this.step)),this.numChunks=Math.ceil(this.dimLength/this.dimChunkLength)}return Object(g.a)(t,[{key:"iter",value:I.a.mark((function t(){var e,A,n,r,i,o,a,s,g,c,u,l,C;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=Math.floor(this.start/this.dimChunkLength),A=Math.ceil(this.stop/this.dimChunkLength),n=e;case 3:if(!(n<A)){t.next=20;break}return r=n*this.dimChunkLength,i=Math.min(this.dimLength,(n+1)*this.dimChunkLength),o=i-r,a=void 0,s=void 0,g=void 0,this.start<r?(a=0,(c=(r-this.start)%this.step)>0&&(a+=this.step-c),g=Math.ceil((r-this.start)/this.step)):(a=this.start-r,g=0),s=this.stop>i?o:this.stop-r,u=V(a,s,this.step),l=Math.ceil((s-a)/this.step),C=V(g,g+l),t.next=17,{dimChunkIndex:n,dimChunkSelection:u,dimOutSelection:C};case 17:n++,t.next=3;break;case 20:case"end":return t.stop()}}),t,this)}))}]),t}(),ot=G(N),at="undefined"!==typeof r&&r.versions&&r.versions.node;function st(t){if(null===t)return"";for(t instanceof String&&(t=t.valueOf()),t=t.replace(/\\/g,"/");t.length>0&&"/"===t[0];)t=t.slice(1);for(;t.length>0&&"/"===t[t.length-1];)t=t.slice(0,t.length-1);var e,A=(t=t.replace(/\/\/+/g,"/")).split("/"),n=Object(u.a)(A);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("."===r||".."===r)throw Error("path containing '.' or '..' segment not allowed")}}catch(we){n.e(we)}finally{n.f()}return t}function gt(t){return"number"===typeof t&&(t=[t]),t.map((function(t){return Math.floor(t)}))}function ct(t,e){if(ot.ChunksArgument.check(t),null===t||!0===t)throw new Error("Chunk guessing is not supported yet");return!1===t?e:("number"===typeof t&&(t=[t]),t.length<e.length&&(t=t.concat(e.slice(t.length))),t.map((function(t,A){return-1===t||null===t?e[A]:Math.floor(t)})))}function It(t){return t=t.toUpperCase(),ot.Order.check(t),t}function ut(t){return ot.DtypeString.check(t),t}function lt(t){return ot.FillType.check(t),t}function Ct(t,e){if(null===t)return!0;Array.isArray(t)||(t=[t]);for(var A=0;A<Math.min(t.length,e.length);A++){var n=t[A];if(null!==n){if($(n)){var r=n,i=1===r.step||null===r.step;if(null===r.start&&null===r.stop&&i)continue;if(r.stop-r.start===e[A]&&i)continue;return!1}return!1}}return!0}function ht(t,e){if(t.length!==e.length)return!1;for(var A=0;A<t.length;A++)if(t[A]!==e[A])return!1;return!0}function Bt(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];return e.map((function(t,e){return 0===e?t.trim().replace(/[\/]*$/g,""):t.trim().replace(/(^[\/]*|[\/]*$)/g,"")})).filter((function(t){return t.length})).join("/")}function ft(t){var e=t.BYTES_PER_ELEMENT;if(1!==e){if(at){var A=n.from(t.buffer,t.byteOffset,t.length*e);return 2===e&&A.swap16(),4===e&&A.swap32(),void(8===e&&A.swap64())}for(var r,i=new Uint8Array(t.buffer,t.byteOffset,t.length*e),o=e/2,a=e-1,s=0;s<i.length;s+=e)for(var g=0;g<o;g++)r=i[s+g],i[s+g]=i[s+a-g],i[s+a-g]=r}}function dt(t){var e=t.slice();return ft(e),e}function Qt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return E(this,void 0,void 0,I.a.mark((function A(){var n,r;return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return e=st(e),n=pt(e),r=n+".zarray",A.abrupt("return",t.containsItem(r));case 4:case"end":return A.stop()}}),A)})))}function Et(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return E(this,void 0,void 0,I.a.mark((function A(){var n,r;return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return e=st(e),n=pt(e),r=n+".zgroup",A.abrupt("return",t.containsItem(r));case 4:case"end":return A.stop()}}),A)})))}function pt(t){return t.length>0?t+"/":""}function yt(t,e,A,n){return E(this,void 0,void 0,I.a.mark((function A(){var r,i,o,a,s;return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(0!==e.length){A.next=2;break}return A.abrupt("return");case 2:r=e.split("/"),i="",o=Object(u.a)(r.slice(0,r.length-1)),A.prev=5,o.s();case 7:if((a=o.n()).done){A.next=25;break}return s=a.value,i+=s,A.next=12,Qt(t,i);case 12:if(!A.sent){A.next=17;break}return A.next=15,vt(t,i,n);case 15:A.next=22;break;case 17:return A.next=19,Et(t,i);case 19:if(A.sent){A.next=22;break}return A.next=22,vt(t,i);case 22:i+="/";case 23:A.next=7;break;case 25:A.next=30;break;case 27:A.prev=27,A.t0=A.catch(5),o.e(A.t0);case 30:return A.prev=30,o.f(),A.finish(30);case 33:case"end":return A.stop()}}),A,null,[[5,27,30,33]])})))}function vt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return E(this,void 0,void 0,I.a.mark((function n(){var r,i;return I.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e=st(e),!A){n.next=5;break}throw Error("Group overwriting not implemented yet :(");case 5:return n.next=7,Qt(t,e);case 7:if(!n.sent){n.next=11;break}throw new k(e);case 11:return n.next=13,Et(t,e);case 13:if(!n.sent){n.next=15;break}throw new x(e);case 15:return r={zarr_format:2},i=pt(e)+".zgroup",n.next=19,t.setItem(i,JSON.stringify(r));case 19:case"end":return n.stop()}}),n)})))}function mt(t,e,A,n,r,i,o,a,s,g,c){return E(this,void 0,void 0,I.a.mark((function g(){var u,l,C;return I.a.wrap((function(g){for(;;)switch(g.prev=g.next){case 0:if(!s){g.next=4;break}throw Error("Array overwriting not implemented yet :(");case 4:return g.next=6,Qt(t,r);case 6:if(!g.sent){g.next=10;break}throw new k(r);case 10:return g.next=12,Et(t,r);case 12:if(!g.sent){g.next=14;break}throw new x(r);case 14:if(n=ut(n),e=gt(e),A=ct(A,e),a=It(a),o=lt(o),!(null!==c&&c.length>0)){g.next=21;break}throw Error("Filters are not supported yet");case 21:return u=o,"number"===typeof o&&(Number.isNaN(o)&&(u="NaN"),Number.POSITIVE_INFINITY===o&&(u="Infinity"),Number.NEGATIVE_INFINITY===o&&(u="-Infinity")),l={zarr_format:2,shape:e,chunks:A,dtype:n,fill_value:u,order:a,compressor:i,filters:c=null},C=pt(r)+".zarray",g.next=28,t.setItem(C,JSON.stringify(l));case 28:case"end":return g.stop()}}),g)})))}function bt(t,e,A,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"C",s=arguments.length>8&&void 0!==arguments[8]&&arguments[8],g=(arguments.length>9&&void 0!==arguments[9]&&arguments[9],arguments.length>10&&void 0!==arguments[10]?arguments[10]:null);return E(this,void 0,void 0,I.a.mark((function c(){return I.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return r=st(r),c.next=3,yt(t,r,0,s);case 3:return c.next=5,mt(t,e,A,n,r,i,o,a,s,0,g);case 5:case"end":return c.stop()}}),c)})))}function Ft(t){if("string"!==typeof t){if(at&&n.isBuffer(t))return JSON.parse(t.toString());if(t instanceof ArrayBuffer){var e=new TextDecoder,A=new Uint8Array(t);return JSON.parse(e.decode(A))}return t}return JSON.parse(t)}var wt=function(){function t(e,A,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Object(l.a)(this,t),this.store=e,this.key=A,this.readOnly=n,this.cache=r,this.cachedValue=null}return Object(g.a)(t,[{key:"asObject",value:function(){return E(this,void 0,void 0,I.a.mark((function t(){var e;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.cache||null===this.cachedValue){t.next=2;break}return t.abrupt("return",this.cachedValue);case 2:return t.next=4,this.getNoSync();case 4:return e=t.sent,this.cache&&(this.cachedValue=e),t.abrupt("return",e);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getNoSync",value:function(){return E(this,void 0,void 0,I.a.mark((function t(){var e;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.store.getItem(this.key);case 3:return e=t.sent,t.abrupt("return",Ft(e));case 7:return t.prev=7,t.t0=t.catch(0),t.abrupt("return",{});case 10:case"end":return t.stop()}}),t,this,[[0,7]])})))}},{key:"setNoSync",value:function(t,e){return E(this,void 0,void 0,I.a.mark((function A(){var n;return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this.getNoSync();case 2:return(n=A.sent)[t]=e,A.next=6,this.putNoSync(n);case 6:return A.abrupt("return",!0);case 7:case"end":return A.stop()}}),A,this)})))}},{key:"putNoSync",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.store.setItem(this.key,JSON.stringify(t));case 2:this.cache&&(this.cachedValue=t);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"delNoSync",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){var A;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNoSync();case 2:return delete(A=e.sent)[t],e.next=6,this.putNoSync(A);case 6:return e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"put",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.readOnly){e.next=2;break}throw new M("attributes are read-only");case 2:return e.abrupt("return",this.putNoSync(t));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"setItem",value:function(t,e){return E(this,void 0,void 0,I.a.mark((function A(){return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(!this.readOnly){A.next=2;break}throw new M("attributes are read-only");case 2:return A.abrupt("return",this.setNoSync(t,e));case 3:case"end":return A.stop()}}),A,this)})))}},{key:"getItem",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.asObject();case 2:return e.t0=t,e.abrupt("return",e.sent[e.t0]);case 4:case"end":return e.stop()}}),e,this)})))}},{key:"deleteItem",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.readOnly){e.next=2;break}throw new M("attributes are read-only");case 2:return e.abrupt("return",this.delNoSync(t));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"containsItem",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.asObject();case 2:return e.t0=t,e.t1=e.sent[e.t0],e.t2=void 0,e.abrupt("return",e.t1!==e.t2);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"proxy",value:function(){return Q(this)}}]),t}(),St={"|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 Dt(t){if(t instanceof Uint8Array)return"|u1";if(t instanceof Int8Array)return"|i1";if(t instanceof Uint16Array)return"<u2";if(t instanceof Int16Array)return"<i2";if(t instanceof Uint32Array)return"<u4";if(t instanceof Int32Array)return"<i4";if(t instanceof Float32Array)return"<f4";if(t instanceof Float64Array)return"<f8";throw new H("Mapping for TypedArray to Dtypestring not known")}function Rt(t){return void 0!==t.byteLength?t.constructor:Rt(t[0])}function Ut(t,e,A){var n=K(P(A,e),e),r=Object(a.a)(n,2),i=r[0],o=r[1];return[function t(e,A,n){var r=n[0];if("number"===typeof r)return 1===A.length?e[r]:t(e[r],A.slice(1),n.slice(1));var i=Object(a.a)(r,4),o=i[0],s=i[1],g=i[2],c=i[3];if(0===c)return new(Rt(e))(0);if(1===A.length){if(1===g)return e.slice(o,s);for(var I=new e.constructor(c),u=0;u<c;u++)I[u]=e[o+u*g];return I}for(var l=new Array(c),C=0;C<c;C++)l[C]=t(e[o+C*g],A.slice(1),n.slice(1));if(c>0&&"number"===typeof l[0]){var h=e[0].constructor;l=h.from(l)}return l}(t,e,i),o]}function Gt(t,e,A,n){var r=K(P(n,A,!0),A),i=Object(a.a)(r,2),o=i[0];i[1];kt(t,e,A,o)}function Nt(t,e,A,n,r){var i=K(P(r,A,!1),A),o=Object(a.a)(i,2),s=o[0],g=o[1];if(JSON.stringify(g)!==JSON.stringify(n))throw new H("Shape mismatch in target and source NestedArray: ".concat(g," and ").concat(n));!function t(e,A,n,r){var i=r[0];if("number"===typeof A)return void kt(e,A,n,r.map((function(t){return"number"===typeof t?[t,t+1,1,1]:t})));if("number"===typeof i)return void t(e[i],A,n.slice(1),r.slice(1));var o=Object(a.a)(i,4),s=o[0],g=(o[1],o[2]),c=o[3];if(1===n.length){if(1===g)e.set(A,s);else for(var I=0;I<c;I++)e[s+I*g]=A[I];return}for(var u=0;u<c;u++)t(e[s+u*g],A[u],n.slice(1),r.slice(1))}(t,e,A,s)}function kt(t,e,A,n){var r=n[0],i=Object(a.a)(r,4),o=i[0],s=i[1],g=i[2],c=i[3];if(1!==A.length)for(var I=0;I<c;I++)kt(t[o+I*g],e,A.slice(1),n.slice(1));else if(1===g)t.fill(e,o,s);else for(var u=0;u<c;u++)t[o+u*g]=e}function xt(t,e,A){void 0===A&&(A=Rt(t));var n=new A(e.reduce((function(t,e){return t*e}),1));return function t(e,A,n,r){if(1===A.length)return void n.set(e,r);if(2===A.length){for(var i=0;i<A[0];i++)n.set(e[i],r+A[1]*i);return e}for(var o=A.slice(1),a=o.reduce((function(t,e){return t*e}),1),s=0;s<A[0];s++)t(e[s],o,n,r+a*s);return e}(t,e,n,0),n}var Ot=function(){function t(e,A,r){Object(l.a)(this,t);var i=null!==e&&!!e.BYTES_PER_ELEMENT;if(void 0===A){if(!i)throw new H("Shape argument is required unless you pass in a TypedArray");A=[e.length]}if(void 0===r){if(!i)throw new H("Dtype argument is required unless you pass in a TypedArray");r=Dt(e)}if(A=gt(A),this.shape=A,this.dtype=r,i&&1!==A.length&&(e=e.buffer),0===this.shape.length)this.data=new St[r](1);else if(at&&n.isBuffer(e)||e instanceof ArrayBuffer||null===e||e.toString().startsWith("[object ArrayBuffer]")){var o=A.reduce((function(t,e){return t*e}),1);null===e&&(e=new ArrayBuffer(o*parseInt(r[r.length-1],10)));var a=e.byteLength/parseInt(r[r.length-1],10);if(o!==a)throw new Error("Buffer has ".concat(a," of dtype ").concat(r,", shape is too large or small ").concat(A," (flat=").concat(o,")"));var s=St[r];this.data=function t(e,A,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(1===n.length)return new A(e.slice(r,r+n[0]*A.BYTES_PER_ELEMENT));var i=new Array(n[0]);if(2===n.length){for(var o=0;o<n[0];o++)i[o]=new A(e.slice(r+n[1]*o*A.BYTES_PER_ELEMENT,r+n[1]*(o+1)*A.BYTES_PER_ELEMENT));return i}for(var a=n.slice(1),s=a.reduce((function(t,e){return t*e}),1),g=0;g<n[0];g++)i[g]=t(e,A,a,r+s*g*A.BYTES_PER_ELEMENT);return i}(e,s,A)}else this.data=e}return Object(g.a)(t,[{key:"get",value:function(e){var A=Ut(this.data,this.shape,e),n=Object(a.a)(A,2),r=n[0],i=n[1];return 0===i.length?r:new t(r,i,this.dtype)}},{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;null===t&&(t=[V(null)]),"number"===typeof e?0===this.shape.length?this.data[0]=e:Gt(this.data,e,this.shape,t):Nt(this.data,e.data,this.shape,e.shape,t)}},{key:"flatten",value:function(){return 1===this.shape.length?this.data:xt(this.data,this.shape,St[this.dtype])}}],[{key:"arange",value:function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"<i4",n=St[A],r=Mt([e],n);return new t(r,[e],A)}}]),t}();function Mt(t,e){var A=t.reduce((function(t,e){return t*e}),1),n=new e(A);return n.set(Object(s.a)(Array(A).keys())),n}function Lt(t,e,A,n,r){var i=K(P(n,A,!0),A);!function t(e,A,n,r){var i=Object(o.a)(r),s=i[0],g=i.slice(1),c=Object(o.a)(n),I=c[0],u=c.slice(1),l=Object(a.a)(s,4),C=l[0],h=(l[1],l[2]),B=l[3];if(1===n.length){if(1===h&&1===I)A.fill(e,C,C+B);else for(var f=0;f<B;f++)A[I*(C+h*f)]=e;return}for(var d=0;d<B;d++)t(e,A.subarray(I*(C+h*d)),u,g)}(r,t,e,Object(a.a)(i,1)[0])}function _t(t,e,A,n,r,i,s){var g=K(P(n,A,!1),A),c=Object(a.a)(g,2),I=c[0],u=c[1];if(JSON.stringify(u)!==JSON.stringify(s))throw new H("Shape mismatch in target and source RawArray: ".concat(u," and ").concat(s));!function t(e,A,n,r,i){if(0===n.length)return void e.set(r);var s=Object(o.a)(n),g=s[0],c=s.slice(1),I=Object(o.a)(A),u=I[0],l=I.slice(1);if("number"===typeof g)return void t(e.subarray(g*u),l,c,r,i);var C=Object(o.a)(i),h=C[0],B=C.slice(1),f=Object(a.a)(g,4),d=f[0],Q=(f[1],f[2]),E=f[3];if(1===A.length){if(1===Q&&1===u&&1===h)e.set(r.subarray(0,E),d);else for(var p=0;p<E;p++)e[u*(d+Q*p)]=r[h*p];return}for(var y=0;y<E;y++)t(e.subarray(u*(d+y*Q)),l,c,r.subarray(h*y),B)}(t,e,I,r,i)}function Jt(t,e,A,n,r,i,s,g){var c=K(P(n,A,!0),A),I=Object(a.a)(c,1)[0],u=K(P(g,s,!1),s);!function t(e,A,n,r,i,s){if(0===s.length)return void e.set(r.subarray(0,e.length));var g=Object(o.a)(n),c=g[0],I=g.slice(1),u=Object(o.a)(s),l=u[0],C=u.slice(1),h=Object(o.a)(A),B=h[0],f=h.slice(1),d=Object(o.a)(i),Q=d[0],E=d.slice(1);if("number"===typeof l)return void t(e,A,n,r.subarray(Q*l),E,C);var p=Object(a.a)(c,4),y=p[0],v=(p[1],p[2]),m=p[3],b=Object(a.a)(l,4),F=b[0],w=(b[1],b[2]);b[3];if(1===A.length&&1===i.length){if(1===v&&1===B&&1===w&&1===Q)e.set(r.subarray(F,F+m),y);else for(var S=0;S<m;S++)e[B*(y+v*S)]=r[Q*(F+w*S)];return}for(var D=0;D<m;D++)t(e.subarray(B*(y+D*v)),f,I,r.subarray(Q*(F+D*w)),E,C)}(t,e,I,r,i,Object(a.a)(u,1)[0])}var Tt=function(){function t(e,A,r,i){Object(l.a)(this,t);var o=null!==e&&!!e.BYTES_PER_ELEMENT;if(void 0===A){if(!o)throw new H("Shape argument is required unless you pass in a TypedArray");A=[e.length]}if(A=gt(A),void 0===r){if(!o)throw new H("Dtype argument is required unless you pass in a TypedArray");r=Dt(e)}if(void 0===i&&(i=function(t){for(var e=t.length,A=Array(e),n=1,r=e-1;r>=0;r--)A[r]=n,n*=t[r];return A}(A)),this.shape=A,this.dtype=r,this.strides=i,o&&1!==A.length&&(e=e.buffer),0===this.shape.length)this.data=new St[r](1);else if(at&&n.isBuffer(e)||e instanceof ArrayBuffer||null===e||e.toString().startsWith("[object ArrayBuffer]")){var a=A.reduce((function(t,e){return t*e}),1);null===e&&(e=new ArrayBuffer(a*parseInt(r[r.length-1],10)));var s=e.byteLength/parseInt(r[r.length-1],10);if(a!==s)throw new Error("Buffer has ".concat(s," of dtype ").concat(r,", shape is too large or small ").concat(A," (flat=").concat(a,")"));var g=St[r];this.data=new g(e)}else this.data=e}return Object(g.a)(t,[{key:"set",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,A=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;null===e&&(e=[V(null)]),"number"===typeof A?0===this.shape.length?this.data[0]=A:Lt(this.data,this.strides,this.shape,e,A):A instanceof t&&n?Jt(this.data,this.strides,this.shape,e,A.data,A.strides,A.shape,n):_t(this.data,this.strides,this.shape,e,A.data,A.strides,A.shape)}}]),t}();var jt=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){var A="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var A=e.shift();if(A){if("object"!==typeof A)throw new TypeError(A+"must be non-object");for(var r in A)n(A,r)&&(t[r]=A[r])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,A,n,r){if(e.subarray&&t.subarray)t.set(e.subarray(A,A+n),r);else for(var i=0;i<n;i++)t[r+i]=e[A+i]},flattenChunks:function(t){var e,A,n,r,i,o;for(n=0,e=0,A=t.length;e<A;e++)n+=t[e].length;for(o=new Uint8Array(n),r=0,e=0,A=t.length;e<A;e++)i=t[e],o.set(i,r),r+=i.length;return o}},i={arraySet:function(t,e,A,n,r){for(var i=0;i<n;i++)t[r+i]=e[A+i]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(A)}));jt.assign,jt.shrinkBuf,jt.setTyped,jt.Buf8,jt.Buf16,jt.Buf32;function Ht(t){for(var e=t.length;--e>=0;)t[e]=0}var Yt=[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],Vt=[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],Zt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Wt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Kt=new Array(576);Ht(Kt);var Pt=new Array(60);Ht(Pt);var qt=new Array(512);Ht(qt);var Xt=new Array(256);Ht(Xt);var zt=new Array(29);Ht(zt);var $t,te,ee,Ae=new Array(30);function ne(t,e,A,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=A,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function re(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function ie(t){return t<256?qt[t]:qt[256+(t>>>7)]}function oe(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function ae(t,e,A){t.bi_valid>16-A?(t.bi_buf|=e<<t.bi_valid&65535,oe(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=A-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=A)}function se(t,e,A){ae(t,A[2*e],A[2*e+1])}function ge(t,e){var A=0;do{A|=1&t,t>>>=1,A<<=1}while(--e>0);return A>>>1}function ce(t,e,A){var n,r,i=new Array(16),o=0;for(n=1;n<=15;n++)i[n]=o=o+A[n-1]<<1;for(r=0;r<=e;r++){var a=t[2*r+1];0!==a&&(t[2*r]=ge(i[a]++,a))}}function Ie(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function ue(t){t.bi_valid>8?oe(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function le(t,e,A,n){var r=2*e,i=2*A;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[A]}function Ce(t,e,A){for(var n=t.heap[A],r=A<<1;r<=t.heap_len&&(r<t.heap_len&&le(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!le(e,n,t.heap[r],t.depth));)t.heap[A]=t.heap[r],A=r,r<<=1;t.heap[A]=n}function he(t,e,A){var n,r,i,o,a=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*a]<<8|t.pending_buf[t.d_buf+2*a+1],r=t.pending_buf[t.l_buf+a],a++,0===n?se(t,r,e):(se(t,(i=Xt[r])+256+1,e),0!==(o=Yt[i])&&ae(t,r-=zt[i],o),se(t,i=ie(--n),A),0!==(o=Vt[i])&&ae(t,n-=Ae[i],o))}while(a<t.last_lit);se(t,256,e)}function Be(t,e){var A,n,r,i=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.has_stree,s=e.stat_desc.elems,g=-1;for(t.heap_len=0,t.heap_max=573,A=0;A<s;A++)0!==i[2*A]?(t.heap[++t.heap_len]=g=A,t.depth[A]=0):i[2*A+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=g<2?++g:0)]=1,t.depth[r]=0,t.opt_len--,a&&(t.static_len-=o[2*r+1]);for(e.max_code=g,A=t.heap_len>>1;A>=1;A--)Ce(t,i,A);r=s;do{A=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Ce(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=A,t.heap[--t.heap_max]=n,i[2*r]=i[2*A]+i[2*n],t.depth[r]=(t.depth[A]>=t.depth[n]?t.depth[A]:t.depth[n])+1,i[2*A+1]=i[2*n+1]=r,t.heap[1]=r++,Ce(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var A,n,r,i,o,a,s=e.dyn_tree,g=e.max_code,c=e.stat_desc.static_tree,I=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,C=e.stat_desc.max_length,h=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(s[2*t.heap[t.heap_max]+1]=0,A=t.heap_max+1;A<573;A++)(i=s[2*s[2*(n=t.heap[A])+1]+1]+1)>C&&(i=C,h++),s[2*n+1]=i,n>g||(t.bl_count[i]++,o=0,n>=l&&(o=u[n-l]),a=s[2*n],t.opt_len+=a*(i+o),I&&(t.static_len+=a*(c[2*n+1]+o)));if(0!==h){do{for(i=C-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[C]--,h-=2}while(h>0);for(i=C;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--A])>g||(s[2*r+1]!==i&&(t.opt_len+=(i-s[2*r+1])*s[2*r],s[2*r+1]=i),n--)}}(t,e),ce(i,g,t.bl_count)}function fe(t,e,A){var n,r,i=-1,o=e[1],a=0,s=7,g=4;for(0===o&&(s=138,g=3),e[2*(A+1)+1]=65535,n=0;n<=A;n++)r=o,o=e[2*(n+1)+1],++a<s&&r===o||(a<g?t.bl_tree[2*r]+=a:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,i=r,0===o?(s=138,g=3):r===o?(s=6,g=3):(s=7,g=4))}function de(t,e,A){var n,r,i=-1,o=e[1],a=0,s=7,g=4;for(0===o&&(s=138,g=3),n=0;n<=A;n++)if(r=o,o=e[2*(n+1)+1],!(++a<s&&r===o)){if(a<g)do{se(t,r,t.bl_tree)}while(0!==--a);else 0!==r?(r!==i&&(se(t,r,t.bl_tree),a--),se(t,16,t.bl_tree),ae(t,a-3,2)):a<=10?(se(t,17,t.bl_tree),ae(t,a-3,3)):(se(t,18,t.bl_tree),ae(t,a-11,7));a=0,i=r,0===o?(s=138,g=3):r===o?(s=6,g=3):(s=7,g=4)}}Ht(Ae);var Qe=!1;function Ee(t,e,A,n){ae(t,0+(n?1:0),3),function(t,e,A,n){ue(t),n&&(oe(t,A),oe(t,~A)),jt.arraySet(t.pending_buf,t.window,e,A,t.pending),t.pending+=A}(t,e,A,!0)}var pe={_tr_init:function(t){Qe||(!function(){var t,e,A,n,r,i=new Array(16);for(A=0,n=0;n<28;n++)for(zt[n]=A,t=0;t<1<<Yt[n];t++)Xt[A++]=n;for(Xt[A-1]=n,r=0,n=0;n<16;n++)for(Ae[n]=r,t=0;t<1<<Vt[n];t++)qt[r++]=n;for(r>>=7;n<30;n++)for(Ae[n]=r<<7,t=0;t<1<<Vt[n]-7;t++)qt[256+r++]=n;for(e=0;e<=15;e++)i[e]=0;for(t=0;t<=143;)Kt[2*t+1]=8,t++,i[8]++;for(;t<=255;)Kt[2*t+1]=9,t++,i[9]++;for(;t<=279;)Kt[2*t+1]=7,t++,i[7]++;for(;t<=287;)Kt[2*t+1]=8,t++,i[8]++;for(ce(Kt,287,i),t=0;t<30;t++)Pt[2*t+1]=5,Pt[2*t]=ge(t,5);$t=new ne(Kt,Yt,257,286,15),te=new ne(Pt,Vt,0,30,15),ee=new ne(new Array(0),Zt,0,19,7)}(),Qe=!0),t.l_desc=new re(t.dyn_ltree,$t),t.d_desc=new re(t.dyn_dtree,te),t.bl_desc=new re(t.bl_tree,ee),t.bi_buf=0,t.bi_valid=0,Ie(t)},_tr_stored_block:Ee,_tr_flush_block:function(t,e,A,n){var r,i,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,A=4093624447;for(e=0;e<=31;e++,A>>>=1)if(1&A&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),Be(t,t.l_desc),Be(t,t.d_desc),o=function(t){var e;for(fe(t,t.dyn_ltree,t.l_desc.max_code),fe(t,t.dyn_dtree,t.d_desc.max_code),Be(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*Wt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(i=t.static_len+3+7>>>3)<=r&&(r=i)):r=i=A+5,A+4<=r&&-1!==e?Ee(t,e,A,n):4===t.strategy||i===r?(ae(t,2+(n?1:0),3),he(t,Kt,Pt)):(ae(t,4+(n?1:0),3),function(t,e,A,n){var r;for(ae(t,e-257,5),ae(t,A-1,5),ae(t,n-4,4),r=0;r<n;r++)ae(t,t.bl_tree[2*Wt[r]+1],3);de(t,t.dyn_ltree,e-1),de(t,t.dyn_dtree,A-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),he(t,t.dyn_ltree,t.dyn_dtree)),Ie(t),n&&ue(t)},_tr_tally:function(t,e,A){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&A,t.last_lit++,0===e?t.dyn_ltree[2*A]++:(t.matches++,e--,t.dyn_ltree[2*(Xt[A]+256+1)]++,t.dyn_dtree[2*ie(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){ae(t,2,3),se(t,256,Kt),function(t){16===t.bi_valid?(oe(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}};var ye=function(t,e,A,n){for(var r=65535&t|0,i=t>>>16&65535|0,o=0;0!==A;){A-=o=A>2e3?2e3:A;do{i=i+(r=r+e[n++]|0)|0}while(--o);r%=65521,i%=65521}return r|i<<16|0};var ve=function(){for(var t,e=[],A=0;A<256;A++){t=A;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[A]=t}return e}();var me,be=function(t,e,A,n){var r=ve,i=n+A;t^=-1;for(var o=n;o<i;o++)t=t>>>8^r[255&(t^e[o])];return-1^t},Fe={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 we(t,e){return t.msg=Fe[e],e}function Se(t){return(t<<1)-(t>4?9:0)}function De(t){for(var e=t.length;--e>=0;)t[e]=0}function Re(t){var e=t.state,A=e.pending;A>t.avail_out&&(A=t.avail_out),0!==A&&(jt.arraySet(t.output,e.pending_buf,e.pending_out,A,t.next_out),t.next_out+=A,e.pending_out+=A,t.total_out+=A,t.avail_out-=A,e.pending-=A,0===e.pending&&(e.pending_out=0))}function Ue(t,e){pe._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Re(t.strm)}function Ge(t,e){t.pending_buf[t.pending++]=e}function Ne(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function ke(t,e,A,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,jt.arraySet(e,t.input,t.next_in,r,A),1===t.state.wrap?t.adler=ye(t.adler,e,r,A):2===t.state.wrap&&(t.adler=be(t.adler,e,r,A)),t.next_in+=r,t.total_in+=r,r)}function xe(t,e){var A,n,r=t.max_chain_length,i=t.strstart,o=t.prev_length,a=t.nice_match,s=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,g=t.window,c=t.w_mask,I=t.prev,u=t.strstart+258,l=g[i+o-1],C=g[i+o];t.prev_length>=t.good_match&&(r>>=2),a>t.lookahead&&(a=t.lookahead);do{if(g[(A=e)+o]===C&&g[A+o-1]===l&&g[A]===g[i]&&g[++A]===g[i+1]){i+=2,A++;do{}while(g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&g[++i]===g[++A]&&i<u);if(n=258-(u-i),i=u-258,n>o){if(t.match_start=e,o=n,n>=a)break;l=g[i+o-1],C=g[i+o]}}}while((e=I[e&c])>s&&0!==--r);return o<=t.lookahead?o:t.lookahead}function Oe(t){var e,A,n,r,i,o=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=o+(o-262)){jt.arraySet(t.window,t.window,o,o,0),t.match_start-=o,t.strstart-=o,t.block_start-=o,e=A=t.hash_size;do{n=t.head[--e],t.head[e]=n>=o?n-o:0}while(--A);e=A=o;do{n=t.prev[--e],t.prev[e]=n>=o?n-o:0}while(--A);r+=o}if(0===t.strm.avail_in)break;if(A=ke(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=A,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+3-1])&t.hash_mask,t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function Me(t,e){for(var A,n;;){if(t.lookahead<262){if(Oe(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(A=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==A&&t.strstart-A<=t.w_size-262&&(t.match_length=xe(t,A)),t.match_length>=3)if(n=pe._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=pe._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Ue(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Ue(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ue(t,!1),0===t.strm.avail_out)?1:2}function Le(t,e){for(var A,n,r;;){if(t.lookahead<262){if(Oe(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(A=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==A&&t.prev_length<t.max_lazy_match&&t.strstart-A<=t.w_size-262&&(t.match_length=xe(t,A),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=pe._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,A=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Ue(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=pe._tr_tally(t,0,t.window[t.strstart-1]))&&Ue(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=pe._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Ue(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ue(t,!1),0===t.strm.avail_out)?1:2}function _e(t,e,A,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=A,this.max_chain=n,this.func=r}function Je(){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 jt.Buf16(1146),this.dyn_dtree=new jt.Buf16(122),this.bl_tree=new jt.Buf16(78),De(this.dyn_ltree),De(this.dyn_dtree),De(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new jt.Buf16(16),this.heap=new jt.Buf16(573),De(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new jt.Buf16(573),De(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 Te(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,pe._tr_init(e),0):we(t,-2)}function je(t){var e,A=Te(t);return 0===A&&((e=t.state).window_size=2*e.w_size,De(e.head),e.max_lazy_match=me[e.level].max_lazy,e.good_match=me[e.level].good_length,e.nice_match=me[e.level].nice_length,e.max_chain_length=me[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),A}function He(t,e,A,n,r,i){if(!t)return-2;var o=1;if(-1===e&&(e=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>9||8!==A||n<8||n>15||e<0||e>9||i<0||i>4)return we(t,-2);8===n&&(n=9);var a=new Je;return t.state=a,a.strm=t,a.wrap=o,a.gzhead=null,a.w_bits=n,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=r+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new jt.Buf8(2*a.w_size),a.head=new jt.Buf16(a.hash_size),a.prev=new jt.Buf16(a.w_size),a.lit_bufsize=1<<r+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new jt.Buf8(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=e,a.strategy=i,a.method=A,je(t)}me=[new _e(0,0,0,0,(function(t,e){var A=65535;for(A>t.pending_buf_size-5&&(A=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Oe(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+A;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Ue(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(Ue(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Ue(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Ue(t,!1),t.strm.avail_out),1)})),new _e(4,4,8,4,Me),new _e(4,5,16,8,Me),new _e(4,6,32,32,Me),new _e(4,4,16,16,Le),new _e(8,16,32,32,Le),new _e(8,16,128,128,Le),new _e(8,32,128,256,Le),new _e(32,128,258,1024,Le),new _e(32,258,258,4096,Le)];var Ye={deflateInit:function(t,e){return He(t,e,8,15,8,0)},deflateInit2:He,deflateReset:je,deflateResetKeep:Te,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},deflate:function(t,e){var A,n,r,i;if(!t||!t.state||e>5||e<0)return t?we(t,-2):-2;if(n=t.state,!t.output||!t.input&&0!==t.avail_in||666===n.status&&4!==e)return we(t,0===t.avail_out?-5:-2);if(n.strm=t,A=n.last_flush,n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,Ge(n,31),Ge(n,139),Ge(n,8),n.gzhead?(Ge(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Ge(n,255&n.gzhead.time),Ge(n,n.gzhead.time>>8&255),Ge(n,n.gzhead.time>>16&255),Ge(n,n.gzhead.time>>24&255),Ge(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),Ge(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Ge(n,255&n.gzhead.extra.length),Ge(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=be(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(Ge(n,0),Ge(n,0),Ge(n,0),Ge(n,0),Ge(n,0),Ge(n,9===n.level?2:n.strategy>=2||n.level<2?4:0),Ge(n,3),n.status=113);else{var o=8+(n.w_bits-8<<4)<<8;o|=(n.strategy>=2||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(o|=32),o+=31-o%31,n.status=113,Ne(n,o),0!==n.strstart&&(Ne(n,t.adler>>>16),Ne(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(t.adler=be(t.adler,n.pending_buf,n.pending-r,r)),Re(t),r=n.pending,n.pending!==n.pending_buf_size));)Ge(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(t.adler=be(t.adler,n.pending_buf,n.pending-r,r)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=be(t.adler,n.pending_buf,n.pending-r,r)),Re(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,Ge(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>r&&(t.adler=be(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(t.adler=be(t.adler,n.pending_buf,n.pending-r,r)),Re(t),r=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,Ge(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>r&&(t.adler=be(t.adler,n.pending_buf,n.pending-r,r)),0===i&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Re(t),n.pending+2<=n.pending_buf_size&&(Ge(n,255&t.adler),Ge(n,t.adler>>8&255),t.adler=0,n.status=113)):n.status=113),0!==n.pending){if(Re(t),0===t.avail_out)return n.last_flush=-1,0}else if(0===t.avail_in&&Se(e)<=Se(A)&&4!==e)return we(t,-5);if(666===n.status&&0!==t.avail_in)return we(t,-5);if(0!==t.avail_in||0!==n.lookahead||0!==e&&666!==n.status){var a=2===n.strategy?function(t,e){for(var A;;){if(0===t.lookahead&&(Oe(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,A=pe._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,A&&(Ue(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Ue(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ue(t,!1),0===t.strm.avail_out)?1:2}(n,e):3===n.strategy?function(t,e){for(var A,n,r,i,o=t.window;;){if(t.lookahead<=258){if(Oe(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=o[r=t.strstart-1])===o[++r]&&n===o[++r]&&n===o[++r]){i=t.strstart+258;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<i);t.match_length=258-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(A=pe._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(A=pe._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),A&&(Ue(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Ue(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ue(t,!1),0===t.strm.avail_out)?1:2}(n,e):me[n.level].func(n,e);if(3!==a&&4!==a||(n.status=666),1===a||3===a)return 0===t.avail_out&&(n.last_flush=-1),0;if(2===a&&(1===e?pe._tr_align(n):5!==e&&(pe._tr_stored_block(n,0,0,!1),3===e&&(De(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Re(t),0===t.avail_out))return n.last_flush=-1,0}return 4!==e?0:n.wrap<=0?1:(2===n.wrap?(Ge(n,255&t.adler),Ge(n,t.adler>>8&255),Ge(n,t.adler>>16&255),Ge(n,t.adler>>24&255),Ge(n,255&t.total_in),Ge(n,t.total_in>>8&255),Ge(n,t.total_in>>16&255),Ge(n,t.total_in>>24&255)):(Ne(n,t.adler>>>16),Ne(n,65535&t.adler)),Re(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?0:1)},deflateEnd:function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?we(t,-2):(t.state=null,113===e?we(t,-3):0):-2},deflateSetDictionary:function(t,e){var A,n,r,i,o,a,s,g,c=e.length;if(!t||!t.state)return-2;if(2===(i=(A=t.state).wrap)||1===i&&42!==A.status||A.lookahead)return-2;for(1===i&&(t.adler=ye(t.adler,e,c,0)),A.wrap=0,c>=A.w_size&&(0===i&&(De(A.head),A.strstart=0,A.block_start=0,A.insert=0),g=new jt.Buf8(A.w_size),jt.arraySet(g,e,c-A.w_size,A.w_size,0),e=g,c=A.w_size),o=t.avail_in,a=t.next_in,s=t.input,t.avail_in=c,t.next_in=0,t.input=e,Oe(A);A.lookahead>=3;){n=A.strstart,r=A.lookahead-2;do{A.ins_h=(A.ins_h<<A.hash_shift^A.window[n+3-1])&A.hash_mask,A.prev[n&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=n,n++}while(--r);A.strstart=n,A.lookahead=2,Oe(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=2,A.match_available=0,t.next_in=a,t.input=s,t.avail_in=o,A.wrap=i,0},deflateInfo:"pako deflate (from Nodeca project)"},Ve=!0,Ze=!0;try{String.fromCharCode.apply(null,[0])}catch(on){Ve=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(on){Ze=!1}for(var We=new jt.Buf8(256),Ke=0;Ke<256;Ke++)We[Ke]=Ke>=252?6:Ke>=248?5:Ke>=240?4:Ke>=224?3:Ke>=192?2:1;We[254]=We[254]=1;function Pe(t,e){if(e<65534&&(t.subarray&&Ze||!t.subarray&&Ve))return String.fromCharCode.apply(null,jt.shrinkBuf(t,e));for(var A="",n=0;n<e;n++)A+=String.fromCharCode(t[n]);return A}var qe=function(t){var e,A,n,r,i,o=t.length,a=0;for(r=0;r<o;r++)55296===(64512&(A=t.charCodeAt(r)))&&r+1<o&&56320===(64512&(n=t.charCodeAt(r+1)))&&(A=65536+(A-55296<<10)+(n-56320),r++),a+=A<128?1:A<2048?2:A<65536?3:4;for(e=new jt.Buf8(a),i=0,r=0;i<a;r++)55296===(64512&(A=t.charCodeAt(r)))&&r+1<o&&56320===(64512&(n=t.charCodeAt(r+1)))&&(A=65536+(A-55296<<10)+(n-56320),r++),A<128?e[i++]=A:A<2048?(e[i++]=192|A>>>6,e[i++]=128|63&A):A<65536?(e[i++]=224|A>>>12,e[i++]=128|A>>>6&63,e[i++]=128|63&A):(e[i++]=240|A>>>18,e[i++]=128|A>>>12&63,e[i++]=128|A>>>6&63,e[i++]=128|63&A);return e},Xe=function(t){return Pe(t,t.length)},ze=function(t){for(var e=new jt.Buf8(t.length),A=0,n=e.length;A<n;A++)e[A]=t.charCodeAt(A);return e},$e=function(t,e){var A,n,r,i,o=e||t.length,a=new Array(2*o);for(n=0,A=0;A<o;)if((r=t[A++])<128)a[n++]=r;else if((i=We[r])>4)a[n++]=65533,A+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&A<o;)r=r<<6|63&t[A++],i--;i>1?a[n++]=65533:r<65536?a[n++]=r:(r-=65536,a[n++]=55296|r>>10&1023,a[n++]=56320|1023&r)}return Pe(a,n)},tA=function(t,e){var A;for((e=e||t.length)>t.length&&(e=t.length),A=e-1;A>=0&&128===(192&t[A]);)A--;return A<0||0===A?e:A+We[t[A]]>e?A:e};var eA=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},AA=Object.prototype.toString;function nA(t){if(!(this instanceof nA))return new nA(t);this.options=jt.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new eA,this.strm.avail_out=0;var A=Ye.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==A)throw new Error(Fe[A]);if(e.header&&Ye.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"===typeof e.dictionary?qe(e.dictionary):"[object ArrayBuffer]"===AA.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(A=Ye.deflateSetDictionary(this.strm,n)))throw new Error(Fe[A]);this._dict_set=!0}}function rA(t,e){var A=new nA(e);if(A.push(t,!0),A.err)throw A.msg||Fe[A.err];return A.result}nA.prototype.push=function(t,e){var A,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:!0===e?4:0,"string"===typeof t?r.input=qe(t):"[object ArrayBuffer]"===AA.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new jt.Buf8(i),r.next_out=0,r.avail_out=i),1!==(A=Ye.deflate(r,n))&&0!==A)return this.onEnd(A),this.ended=!0,!1;0!==r.avail_out&&(0!==r.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(Xe(jt.shrinkBuf(r.output,r.next_out))):this.onData(jt.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||0===r.avail_out)&&1!==A);return 4===n?(A=Ye.deflateEnd(this.strm),this.onEnd(A),this.ended=!0,0===A):2!==n||(this.onEnd(0),r.avail_out=0,!0)},nA.prototype.onData=function(t){this.chunks.push(t)},nA.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=jt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var iA={Deflate:nA,deflate:rA,deflateRaw:function(t,e){return(e=e||{}).raw=!0,rA(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,rA(t,e)}},oA=function(t,e){var A,n,r,i,o,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F;A=t.state,n=t.next_in,b=t.input,r=n+(t.avail_in-5),i=t.next_out,F=t.output,o=i-(e-t.avail_out),a=i+(t.avail_out-257),s=A.dmax,g=A.wsize,c=A.whave,I=A.wnext,u=A.window,l=A.hold,C=A.bits,h=A.lencode,B=A.distcode,f=(1<<A.lenbits)-1,d=(1<<A.distbits)-1;t:do{C<15&&(l+=b[n++]<<C,C+=8,l+=b[n++]<<C,C+=8),Q=h[l&f];e:for(;;){if(l>>>=E=Q>>>24,C-=E,0===(E=Q>>>16&255))F[i++]=65535&Q;else{if(!(16&E)){if(0===(64&E)){Q=h[(65535&Q)+(l&(1<<E)-1)];continue e}if(32&E){A.mode=12;break t}t.msg="invalid literal/length code",A.mode=30;break t}p=65535&Q,(E&=15)&&(C<E&&(l+=b[n++]<<C,C+=8),p+=l&(1<<E)-1,l>>>=E,C-=E),C<15&&(l+=b[n++]<<C,C+=8,l+=b[n++]<<C,C+=8),Q=B[l&d];A:for(;;){if(l>>>=E=Q>>>24,C-=E,!(16&(E=Q>>>16&255))){if(0===(64&E)){Q=B[(65535&Q)+(l&(1<<E)-1)];continue A}t.msg="invalid distance code",A.mode=30;break t}if(y=65535&Q,C<(E&=15)&&(l+=b[n++]<<C,(C+=8)<E&&(l+=b[n++]<<C,C+=8)),(y+=l&(1<<E)-1)>s){t.msg="invalid distance too far back",A.mode=30;break t}if(l>>>=E,C-=E,y>(E=i-o)){if((E=y-E)>c&&A.sane){t.msg="invalid distance too far back",A.mode=30;break t}if(v=0,m=u,0===I){if(v+=g-E,E<p){p-=E;do{F[i++]=u[v++]}while(--E);v=i-y,m=F}}else if(I<E){if(v+=g+I-E,(E-=I)<p){p-=E;do{F[i++]=u[v++]}while(--E);if(v=0,I<p){p-=E=I;do{F[i++]=u[v++]}while(--E);v=i-y,m=F}}}else if(v+=I-E,E<p){p-=E;do{F[i++]=u[v++]}while(--E);v=i-y,m=F}for(;p>2;)F[i++]=m[v++],F[i++]=m[v++],F[i++]=m[v++],p-=3;p&&(F[i++]=m[v++],p>1&&(F[i++]=m[v++]))}else{v=i-y;do{F[i++]=F[v++],F[i++]=F[v++],F[i++]=F[v++],p-=3}while(p>2);p&&(F[i++]=F[v++],p>1&&(F[i++]=F[v++]))}break}}break}}while(n<r&&i<a);n-=p=C>>3,l&=(1<<(C-=p<<3))-1,t.next_in=n,t.next_out=i,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=i<a?a-i+257:257-(i-a),A.hold=l,A.bits=C},aA=[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],sA=[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],gA=[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],cA=[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],IA=function(t,e,A,n,r,i,o,a){var s,g,c,I,u,l,C,h,B,f=a.bits,d=0,Q=0,E=0,p=0,y=0,v=0,m=0,b=0,F=0,w=0,S=null,D=0,R=new jt.Buf16(16),U=new jt.Buf16(16),G=null,N=0;for(d=0;d<=15;d++)R[d]=0;for(Q=0;Q<n;Q++)R[e[A+Q]]++;for(y=f,p=15;p>=1&&0===R[p];p--);if(y>p&&(y=p),0===p)return r[i++]=20971520,r[i++]=20971520,a.bits=1,0;for(E=1;E<p&&0===R[E];E++);for(y<E&&(y=E),b=1,d=1;d<=15;d++)if(b<<=1,(b-=R[d])<0)return-1;if(b>0&&(0===t||1!==p))return-1;for(U[1]=0,d=1;d<15;d++)U[d+1]=U[d]+R[d];for(Q=0;Q<n;Q++)0!==e[A+Q]&&(o[U[e[A+Q]]++]=Q);if(0===t?(S=G=o,l=19):1===t?(S=aA,D-=257,G=sA,N-=257,l=256):(S=gA,G=cA,l=-1),w=0,Q=0,d=E,u=i,v=y,m=0,c=-1,I=(F=1<<y)-1,1===t&&F>852||2===t&&F>592)return 1;for(;;){C=d-m,o[Q]<l?(h=0,B=o[Q]):o[Q]>l?(h=G[N+o[Q]],B=S[D+o[Q]]):(h=96,B=0),s=1<<d-m,E=g=1<<v;do{r[u+(w>>m)+(g-=s)]=C<<24|h<<16|B|0}while(0!==g);for(s=1<<d-1;w&s;)s>>=1;if(0!==s?(w&=s-1,w+=s):w=0,Q++,0===--R[d]){if(d===p)break;d=e[A+o[Q]]}if(d>y&&(w&I)!==c){for(0===m&&(m=y),u+=E,b=1<<(v=d-m);v+m<p&&!((b-=R[v+m])<=0);)v++,b<<=1;if(F+=1<<v,1===t&&F>852||2===t&&F>592)return 1;r[c=w&I]=y<<24|v<<16|u-i|0}}return 0!==w&&(r[u+w]=d-m<<24|64<<16|0),a.bits=y,0};function uA(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function lA(){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 jt.Buf16(320),this.work=new jt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function CA(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new jt.Buf32(852),e.distcode=e.distdyn=new jt.Buf32(592),e.sane=1,e.back=-1,0):-2}function hA(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,CA(t)):-2}function BA(t,e){var A,n;return t&&t.state?(n=t.state,e<0?(A=0,e=-e):(A=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=A,n.wbits=e,hA(t))):-2}function fA(t,e){var A,n;return t?(n=new lA,t.state=n,n.window=null,0!==(A=BA(t,e))&&(t.state=null),A):-2}var dA,QA,EA=!0;function pA(t){if(EA){var e;for(dA=new jt.Buf32(512),QA=new jt.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(IA(1,t.lens,0,288,dA,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;IA(2,t.lens,0,32,QA,0,t.work,{bits:5}),EA=!1}t.lencode=dA,t.lenbits=9,t.distcode=QA,t.distbits=5}function yA(t,e,A,n){var r,i=t.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new jt.Buf8(i.wsize)),n>=i.wsize?(jt.arraySet(i.window,e,A-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((r=i.wsize-i.wnext)>n&&(r=n),jt.arraySet(i.window,e,A-n,r,i.wnext),(n-=r)?(jt.arraySet(i.window,e,A-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=r,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=r))),0}var vA={inflateReset:hA,inflateReset2:BA,inflateResetKeep:CA,inflateInit:function(t){return fA(t,15)},inflateInit2:fA,inflate:function(t,e){var A,n,r,i,o,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F=0,w=new jt.Buf8(4),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return-2;12===(A=t.state).mode&&(A.mode=13),o=t.next_out,r=t.output,s=t.avail_out,i=t.next_in,n=t.input,a=t.avail_in,g=A.hold,c=A.bits,I=a,u=s,v=0;t:for(;;)switch(A.mode){case 1:if(0===A.wrap){A.mode=13;break}for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(2&A.wrap&&35615===g){A.check=0,w[0]=255&g,w[1]=g>>>8&255,A.check=be(A.check,w,2,0),g=0,c=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",A.mode=30;break}if(8!==(15&g)){t.msg="unknown compression method",A.mode=30;break}if(c-=4,y=8+(15&(g>>>=4)),0===A.wbits)A.wbits=y;else if(y>A.wbits){t.msg="invalid window size",A.mode=30;break}A.dmax=1<<y,t.adler=A.check=1,A.mode=512&g?10:12,g=0,c=0;break;case 2:for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(A.flags=g,8!==(255&A.flags)){t.msg="unknown compression method",A.mode=30;break}if(57344&A.flags){t.msg="unknown header flags set",A.mode=30;break}A.head&&(A.head.text=g>>8&1),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=be(A.check,w,2,0)),g=0,c=0,A.mode=3;case 3:for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.head&&(A.head.time=g),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,w[2]=g>>>16&255,w[3]=g>>>24&255,A.check=be(A.check,w,4,0)),g=0,c=0,A.mode=4;case 4:for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.head&&(A.head.xflags=255&g,A.head.os=g>>8),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=be(A.check,w,2,0)),g=0,c=0,A.mode=5;case 5:if(1024&A.flags){for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.length=g,A.head&&(A.head.extra_len=g),512&A.flags&&(w[0]=255&g,w[1]=g>>>8&255,A.check=be(A.check,w,2,0)),g=0,c=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&((l=A.length)>a&&(l=a),l&&(A.head&&(y=A.head.extra_len-A.length,A.head.extra||(A.head.extra=new Array(A.head.extra_len)),jt.arraySet(A.head.extra,n,i,l,y)),512&A.flags&&(A.check=be(A.check,n,l,i)),a-=l,i+=l,A.length-=l),A.length))break t;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(0===a)break t;l=0;do{y=n[i+l++],A.head&&y&&A.length<65536&&(A.head.name+=String.fromCharCode(y))}while(y&&l<a);if(512&A.flags&&(A.check=be(A.check,n,l,i)),a-=l,i+=l,y)break t}else A.head&&(A.head.name=null);A.length=0,A.mode=8;case 8:if(4096&A.flags){if(0===a)break t;l=0;do{y=n[i+l++],A.head&&y&&A.length<65536&&(A.head.comment+=String.fromCharCode(y))}while(y&&l<a);if(512&A.flags&&(A.check=be(A.check,n,l,i)),a-=l,i+=l,y)break t}else A.head&&(A.head.comment=null);A.mode=9;case 9:if(512&A.flags){for(;c<16;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g!==(65535&A.check)){t.msg="header crc mismatch",A.mode=30;break}g=0,c=0}A.head&&(A.head.hcrc=A.flags>>9&1,A.head.done=!0),t.adler=A.check=0,A.mode=12;break;case 10:for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}t.adler=A.check=uA(g),g=0,c=0,A.mode=11;case 11:if(0===A.havedict)return t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,2;t.adler=A.check=1,A.mode=12;case 12:if(5===e||6===e)break t;case 13:if(A.last){g>>>=7&c,c-=7&c,A.mode=27;break}for(;c<3;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}switch(A.last=1&g,c-=1,3&(g>>>=1)){case 0:A.mode=14;break;case 1:if(pA(A),A.mode=20,6===e){g>>>=2,c-=2;break t}break;case 2:A.mode=17;break;case 3:t.msg="invalid block type",A.mode=30}g>>>=2,c-=2;break;case 14:for(g>>>=7&c,c-=7&c;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if((65535&g)!==(g>>>16^65535)){t.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&g,g=0,c=0,A.mode=15,6===e)break t;case 15:A.mode=16;case 16:if(l=A.length){if(l>a&&(l=a),l>s&&(l=s),0===l)break t;jt.arraySet(r,n,i,l,o),a-=l,i+=l,s-=l,o+=l,A.length-=l;break}A.mode=12;break;case 17:for(;c<14;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(A.nlen=257+(31&g),g>>>=5,c-=5,A.ndist=1+(31&g),g>>>=5,c-=5,A.ncode=4+(15&g),g>>>=4,c-=4,A.nlen>286||A.ndist>30){t.msg="too many length or distance symbols",A.mode=30;break}A.have=0,A.mode=18;case 18:for(;A.have<A.ncode;){for(;c<3;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.lens[S[A.have++]]=7&g,g>>>=3,c-=3}for(;A.have<19;)A.lens[S[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,m={bits:A.lenbits},v=IA(0,A.lens,0,19,A.lencode,0,A.work,m),A.lenbits=m.bits,v){t.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have<A.nlen+A.ndist;){for(;f=(F=A.lencode[g&(1<<A.lenbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(d<16)g>>>=B,c-=B,A.lens[A.have++]=d;else{if(16===d){for(b=B+2;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g>>>=B,c-=B,0===A.have){t.msg="invalid bit length repeat",A.mode=30;break}y=A.lens[A.have-1],l=3+(3&g),g>>>=2,c-=2}else if(17===d){for(b=B+3;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}c-=B,y=0,l=3+(7&(g>>>=B)),g>>>=3,c-=3}else{for(b=B+7;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}c-=B,y=0,l=11+(127&(g>>>=B)),g>>>=7,c-=7}if(A.have+l>A.nlen+A.ndist){t.msg="invalid bit length repeat",A.mode=30;break}for(;l--;)A.lens[A.have++]=y}}if(30===A.mode)break;if(0===A.lens[256]){t.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,m={bits:A.lenbits},v=IA(1,A.lens,0,A.nlen,A.lencode,0,A.work,m),A.lenbits=m.bits,v){t.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,m={bits:A.distbits},v=IA(2,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,m),A.distbits=m.bits,v){t.msg="invalid distances set",A.mode=30;break}if(A.mode=20,6===e)break t;case 20:A.mode=21;case 21:if(a>=6&&s>=258){t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,oA(t,u),o=t.next_out,r=t.output,s=t.avail_out,i=t.next_in,n=t.input,a=t.avail_in,g=A.hold,c=A.bits,12===A.mode&&(A.back=-1);break}for(A.back=0;f=(F=A.lencode[g&(1<<A.lenbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(f&&0===(240&f)){for(Q=B,E=f,p=d;f=(F=A.lencode[p+((g&(1<<Q+E)-1)>>Q)])>>>16&255,d=65535&F,!(Q+(B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}g>>>=Q,c-=Q,A.back+=Q}if(g>>>=B,c-=B,A.back+=B,A.length=d,0===f){A.mode=26;break}if(32&f){A.back=-1,A.mode=12;break}if(64&f){t.msg="invalid literal/length code",A.mode=30;break}A.extra=15&f,A.mode=22;case 22:if(A.extra){for(b=A.extra;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.length+=g&(1<<A.extra)-1,g>>>=A.extra,c-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;f=(F=A.distcode[g&(1<<A.distbits)-1])>>>16&255,d=65535&F,!((B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(0===(240&f)){for(Q=B,E=f,p=d;f=(F=A.distcode[p+((g&(1<<Q+E)-1)>>Q)])>>>16&255,d=65535&F,!(Q+(B=F>>>24)<=c);){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}g>>>=Q,c-=Q,A.back+=Q}if(g>>>=B,c-=B,A.back+=B,64&f){t.msg="invalid distance code",A.mode=30;break}A.offset=d,A.extra=15&f,A.mode=24;case 24:if(A.extra){for(b=A.extra;c<b;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}A.offset+=g&(1<<A.extra)-1,g>>>=A.extra,c-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){t.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(0===s)break t;if(l=u-s,A.offset>l){if((l=A.offset-l)>A.whave&&A.sane){t.msg="invalid distance too far back",A.mode=30;break}l>A.wnext?(l-=A.wnext,C=A.wsize-l):C=A.wnext-l,l>A.length&&(l=A.length),h=A.window}else h=r,C=o-A.offset,l=A.length;l>s&&(l=s),s-=l,A.length-=l;do{r[o++]=h[C++]}while(--l);0===A.length&&(A.mode=21);break;case 26:if(0===s)break t;r[o++]=A.length,s--,A.mode=21;break;case 27:if(A.wrap){for(;c<32;){if(0===a)break t;a--,g|=n[i++]<<c,c+=8}if(u-=s,t.total_out+=u,A.total+=u,u&&(t.adler=A.check=A.flags?be(A.check,r,u,o-u):ye(A.check,r,u,o-u)),u=s,(A.flags?g:uA(g))!==A.check){t.msg="incorrect data check",A.mode=30;break}g=0,c=0}A.mode=28;case 28:if(A.wrap&&A.flags){for(;c<32;){if(0===a)break t;a--,g+=n[i++]<<c,c+=8}if(g!==(4294967295&A.total)){t.msg="incorrect length check",A.mode=30;break}g=0,c=0}A.mode=29;case 29:v=1;break t;case 30:v=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=o,t.avail_out=s,t.next_in=i,t.avail_in=a,A.hold=g,A.bits=c,(A.wsize||u!==t.avail_out&&A.mode<30&&(A.mode<27||4!==e))&&yA(t,t.output,t.next_out,u-t.avail_out),I-=t.avail_in,u-=t.avail_out,t.total_in+=I,t.total_out+=u,A.total+=u,A.wrap&&u&&(t.adler=A.check=A.flags?be(A.check,r,u,t.next_out-u):ye(A.check,r,u,t.next_out-u)),t.data_type=A.bits+(A.last?64:0)+(12===A.mode?128:0)+(20===A.mode||15===A.mode?256:0),(0===I&&0===u||4===e)&&0===v&&(v=-5),v},inflateEnd:function(t){if(!t||!t.state)return-2;var e=t.state;return e.window&&(e.window=null),t.state=null,0},inflateGetHeader:function(t,e){var A;return t&&t.state?0===(2&(A=t.state).wrap)?-2:(A.head=e,e.done=!1,0):-2},inflateSetDictionary:function(t,e){var A,n=e.length;return t&&t.state?0!==(A=t.state).wrap&&11!==A.mode?-2:11===A.mode&&ye(1,e,n,0)!==A.check?-3:yA(t,e,n,n)?(A.mode=31,-4):(A.havedict=1,0):-2},inflateInfo:"pako inflate (from Nodeca project)"},mA={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 bA=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},FA=Object.prototype.toString;function wA(t){if(!(this instanceof wA))return new wA(t);this.options=jt.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new eA,this.strm.avail_out=0;var A=vA.inflateInit2(this.strm,e.windowBits);if(A!==mA.Z_OK)throw new Error(Fe[A]);if(this.header=new bA,vA.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"===typeof e.dictionary?e.dictionary=qe(e.dictionary):"[object ArrayBuffer]"===FA.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(A=vA.inflateSetDictionary(this.strm,e.dictionary))!==mA.Z_OK))throw new Error(Fe[A])}function SA(t,e){var A=new wA(e);if(A.push(t,!0),A.err)throw A.msg||Fe[A.err];return A.result}wA.prototype.push=function(t,e){var A,n,r,i,o,a=this.strm,s=this.options.chunkSize,g=this.options.dictionary,c=!1;if(this.ended)return!1;n=e===~~e?e:!0===e?mA.Z_FINISH:mA.Z_NO_FLUSH,"string"===typeof t?a.input=ze(t):"[object ArrayBuffer]"===FA.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new jt.Buf8(s),a.next_out=0,a.avail_out=s),(A=vA.inflate(a,mA.Z_NO_FLUSH))===mA.Z_NEED_DICT&&g&&(A=vA.inflateSetDictionary(this.strm,g)),A===mA.Z_BUF_ERROR&&!0===c&&(A=mA.Z_OK,c=!1),A!==mA.Z_STREAM_END&&A!==mA.Z_OK)return this.onEnd(A),this.ended=!0,!1;a.next_out&&(0!==a.avail_out&&A!==mA.Z_STREAM_END&&(0!==a.avail_in||n!==mA.Z_FINISH&&n!==mA.Z_SYNC_FLUSH)||("string"===this.options.to?(r=tA(a.output,a.next_out),i=a.next_out-r,o=$e(a.output,r),a.next_out=i,a.avail_out=s-i,i&&jt.arraySet(a.output,a.output,r,i,0),this.onData(o)):this.onData(jt.shrinkBuf(a.output,a.next_out)))),0===a.avail_in&&0===a.avail_out&&(c=!0)}while((a.avail_in>0||0===a.avail_out)&&A!==mA.Z_STREAM_END);return A===mA.Z_STREAM_END&&(n=mA.Z_FINISH),n===mA.Z_FINISH?(A=vA.inflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===mA.Z_OK):n!==mA.Z_SYNC_FLUSH||(this.onEnd(mA.Z_OK),a.avail_out=0,!0)},wA.prototype.onData=function(t){this.chunks.push(t)},wA.prototype.onEnd=function(t){t===mA.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=jt.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var DA={Inflate:wA,inflate:SA,inflateRaw:function(t,e){return(e=e||{}).raw=!0,SA(t,e)},ungzip:SA},RA={};(0,jt.assign)(RA,iA,DA,mA);var UA=RA,GA=function(){var t=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(Object(l.a)(this,t),e<0||e>9)throw new Error("Invalid gzip compression level, it should be between 0 and 9");this.level=e}return Object(g.a)(t,[{key:"encode",value:function(t){return UA.gzip(t,{level:this.level})}},{key:"decode",value:function(t,e){var A=UA.ungzip(t);return void 0!==e?(e.set(A),e):A}}],[{key:"fromConfig",value:function(e){return new t(e.level)}}]),t}();return t.codecId="gzip",t}(),NA=function(){var t=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(Object(l.a)(this,t),e<-1||e>9)throw new Error("Invalid zlib compression level, it should be between -1 and 9");this.level=e}return Object(g.a)(t,[{key:"encode",value:function(t){return UA.deflate(t,{level:this.level})}},{key:"decode",value:function(t,e){var A=UA.inflate(t);return void 0!==e?(e.set(A),e):A}}],[{key:"fromConfig",value:function(e){return new t(e.level)}}]),t}();return t.codecId="zlib",t}();function kA(t,e){var A=function(t){if("undefined"!==typeof r&&null!=r.versions&&null!=r.versions.node)return n.from(t,"base64");for(var e=globalThis.atob(t),A=e.length,i=new Uint8Array(A),o=0;o<A;o++)i[o]=e.charCodeAt(o);return i}(e);return new Promise((function(e){var n=t({noInitialRun:!0,onRuntimeInitialized:function(){delete n.then,e(n)},wasmBinary:A})}))}var xA,OA=function(){"undefined"!==typeof document&&document.currentScript&&document.currentScript.src;return function(t){var e;t=t||{},e||(e="undefined"!==typeof t?t:{});var A,n={};for(A in e)e.hasOwnProperty(A)&&(n[A]=e[A]);var r,i="./this.program",o=e.print||console.log.bind(console),a=e.printErr||console.warn.bind(console);for(A in n)n.hasOwnProperty(A)&&(e[A]=n[A]);n=null,e.thisProgram&&(i=e.thisProgram),e.wasmBinary&&(r=e.wasmBinary),e.noExitRuntime&&e.noExitRuntime,"object"!==typeof WebAssembly&&a("no native wasm support detected");var s,g=new WebAssembly.Table({initial:86,maximum:86,element:"anyfunc"}),c=!1,I="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function u(t,e,A){var n=e+A;for(A=e;t[A]&&!(A>=n);)++A;if(16<A-e&&t.subarray&&I)return I.decode(t.subarray(e,A));for(n="";e<A;){var r=t[e++];if(128&r){var i=63&t[e++];if(192==(224&r))n+=String.fromCharCode((31&r)<<6|i);else{var o=63&t[e++];65536>(r=224==(240&r)?(15&r)<<12|i<<6|o:(7&r)<<18|i<<12|o<<6|63&t[e++])?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r))}}else n+=String.fromCharCode(r)}return n}var l,C,h,B,f,d,Q,E,p,y="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function v(t){var e;for(e=t>>1;B[e];)++e;if(32<(e<<=1)-t&&y)return y.decode(h.subarray(t,e));e=0;for(var A="";;){var n=B[t+2*e>>1];if(0==n)return A;++e,A+=String.fromCharCode(n)}}function m(t,e,A){if(void 0===A&&(A=2147483647),2>A)return 0;var n=e;A=(A-=2)<2*t.length?A/2:t.length;for(var r=0;r<A;++r)B[e>>1]=t.charCodeAt(r),e+=2;return B[e>>1]=0,e-n}function b(t){return 2*t.length}function F(t){for(var e=0,A="";;){var n=d[t+4*e>>2];if(0==n)return A;++e,65536<=n?(n-=65536,A+=String.fromCharCode(55296|n>>10,56320|1023&n)):A+=String.fromCharCode(n)}}function w(t,e,A){if(void 0===A&&(A=2147483647),4>A)return 0;var n=e;A=n+A-4;for(var r=0;r<t.length;++r){var i=t.charCodeAt(r);if(55296<=i&&57343>=i)i=65536+((1023&i)<<10)|1023&t.charCodeAt(++r);if(d[e>>2]=i,(e+=4)+4>A)break}return d[e>>2]=0,e-n}function S(t){for(var e=0,A=0;A<t.length;++A){var n=t.charCodeAt(A);55296<=n&&57343>=n&&++A,e+=4}return e}function D(t){l=t,e.HEAP8=C=new Int8Array(t),e.HEAP16=B=new Int16Array(t),e.HEAP32=d=new Int32Array(t),e.HEAPU8=h=new Uint8Array(t),e.HEAPU16=f=new Uint16Array(t),e.HEAPU32=Q=new Uint32Array(t),e.HEAPF32=E=new Float32Array(t),e.HEAPF64=p=new Float64Array(t)}var R=e.INITIAL_MEMORY||16777216;function U(t){for(;0<t.length;){var A=t.shift();if("function"==typeof A)A(e);else{var n=A.ba;"number"===typeof n?void 0===A.Y?e.dynCall_v(n):e.dynCall_vi(n,A.Y):n(void 0===A.Y?null:A.Y)}}}(s=e.wasmMemory?e.wasmMemory:new WebAssembly.Memory({initial:R/65536,maximum:32768}))&&(l=s.buffer),R=l.byteLength,D(l),d[8104]=5275456;var G=[],N=[],k=[],x=[];function O(){var t=e.preRun.shift();G.unshift(t)}var M=0,L=null;function _(t){throw e.onAbort&&e.onAbort(t),o(t),a(t),c=!0,new WebAssembly.RuntimeError("abort("+t+"). Build with -s ASSERTIONS=1 for more info.")}function J(t){var e=j;return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}function T(){return J("data:application/octet-stream;base64,")}e.preloadedImages={},e.preloadedAudios={};var j="blosc_codec.wasm";if(!T()){var H=j;j=e.locateFile?e.locateFile(H,""):""+H}function Y(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}N.push({ba:function(){mt()}});var V=void 0;function Z(t){for(var e="";h[t];)e+=V[h[t++]];return e}var W={},K={},P={};function q(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?"_"+t:t}function X(t,e){return t=q(t),new Function("body","return function "+t+'() {\n    "use strict";    return body.apply(this, arguments);\n};\n')(e)}function z(t){var e=Error,A=X(t,(function(e){this.name=t,this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return A.prototype=Object.create(e.prototype),A.prototype.constructor=A,A.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},A}var $=void 0;function tt(t){throw new $(t)}var et=void 0;function At(t,e,A){if(A=A||{},!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=e.name;if(t||tt('type "'+n+'" must have a positive integer typeid pointer'),K.hasOwnProperty(t)){if(A.ca)return;tt("Cannot register type '"+n+"' twice")}K[t]=e,delete P[t],W.hasOwnProperty(t)&&(e=W[t],delete W[t],e.forEach((function(t){t()})))}var nt=[],rt=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function it(t){4<t&&0===--rt[t].Z&&(rt[t]=void 0,nt.push(t))}function ot(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=nt.length?nt.pop():rt.length;return rt[e]={Z:1,value:t},e}}function at(t){return this.fromWireType(Q[t>>2])}function st(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function gt(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(p[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function ct(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function It(t,A,n){e.hasOwnProperty(t)?((void 0===n||void 0!==e[t].W&&void 0!==e[t].W[n])&&tt("Cannot register public name '"+t+"' twice"),function(t,A){var n=e;if(void 0===n[t].W){var r=n[t];n[t]=function(){return n[t].W.hasOwnProperty(arguments.length)||tt("Function '"+A+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+n[t].W+")!"),n[t].W[arguments.length].apply(this,arguments)},n[t].W=[],n[t].W[r.aa]=r}}(t,t),e.hasOwnProperty(n)&&tt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),e[t].W[n]=A):(e[t]=A,void 0!==n&&(e[t].ea=n))}var ut=void 0;function lt(t){var e=Z(t=wt(t));return Ft(t),e}function Ct(t,e,A){switch(e){case 0:return A?function(t){return C[t]}:function(t){return h[t]};case 1:return A?function(t){return B[t>>1]}:function(t){return f[t>>1]};case 2:return A?function(t){return d[t>>2]}:function(t){return Q[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}var ht={};function Bt(){if(!ft){var t,e={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",_:i||"./this.program"};for(t in ht)e[t]=ht[t];var A=[];for(t in e)A.push(t+"="+e[t]);ft=A}return ft}for(var ft,dt=[null,[],[]],Qt=Array(256),Et=0;256>Et;++Et)Qt[Et]=String.fromCharCode(Et);V=Qt,$=e.BindingError=z("BindingError"),et=e.InternalError=z("InternalError"),e.count_emval_handles=function(){for(var t=0,e=5;e<rt.length;++e)void 0!==rt[e]&&++t;return t},e.get_first_emval=function(){for(var t=5;t<rt.length;++t)if(void 0!==rt[t])return rt[t];return null},ut=e.UnboundTypeError=z("UnboundTypeError");var pt={o:function(t){return bt(t)},n:function(t){throw t},u:function(t,e,A,n,r){var i=Y(A);At(t,{name:e=Z(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?n:r},argPackAdvance:8,readValueFromPointer:function(t){if(1===A)var n=C;else if(2===A)n=B;else{if(4!==A)throw new TypeError("Unknown boolean type size: "+e);n=d}return this.fromWireType(n[t>>i])},X:null})},s:function(t,e){At(t,{name:e=Z(e),fromWireType:function(t){var e=rt[t].value;return it(t),e},toWireType:function(t,e){return ot(e)},argPackAdvance:8,readValueFromPointer:at,X:null})},f:function(t,e,A){A=Y(A),At(t,{name:e=Z(e),fromWireType:function(t){return t},toWireType:function(t,e){if("number"!==typeof e&&"boolean"!==typeof e)throw new TypeError('Cannot convert "'+st(e)+'" to '+this.name);return e},argPackAdvance:8,readValueFromPointer:gt(e,A),X:null})},d:function(t,A,n,r,i,o){var a=function(t,e){for(var A=[],n=0;n<t;n++)A.push(d[(e>>2)+n]);return A}(A,n);t=Z(t),i=function(t,A){t=Z(t);for(var n=e["dynCall_"+t],r=[],i=1;i<t.length;++i)r.push("a"+i);return i="return function dynCall_"+t+"_"+A+"("+r.join(", ")+") {\n",i+="    return dynCall(rawFunction"+(r.length?", ":"")+r.join(", ")+");\n","function"!==typeof(n=new Function("dynCall","rawFunction",i+"};\n")(n,A))&&tt("unknown function pointer with signature "+t+": "+A),n}(r,i),It(t,(function(){!function(t,e){var A=[],n={};throw e.forEach((function t(e){n[e]||K[e]||(P[e]?P[e].forEach(t):(A.push(e),n[e]=!0))})),new ut(t+": "+A.map(lt).join([", "]))}("Cannot call "+t+" due to unbound types",a)}),A-1),function(t,e){function A(t){if((t=e(t)).length!==n.length)throw new et("Mismatched type converter count");for(var A=0;A<n.length;++A)At(n[A],t[A])}var n=[];n.forEach((function(e){P[e]=t}));var r=Array(t.length),i=[],o=0;t.forEach((function(t,e){K.hasOwnProperty(t)?r[e]=K[t]:(i.push(t),W.hasOwnProperty(t)||(W[t]=[]),W[t].push((function(){r[e]=K[t],++o===i.length&&A(r)})))})),0===i.length&&A(r)}(a,(function(n){var r=t,a=t;n=[n[0],null].concat(n.slice(1));var s=i,g=n.length;2>g&&tt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=null!==n[1]&&!1,I=!1,u=1;u<n.length;++u)if(null!==n[u]&&void 0===n[u].X){I=!0;break}var l="void"!==n[0].name,C="",h="";for(u=0;u<g-2;++u)C+=(0!==u?", ":"")+"arg"+u,h+=(0!==u?", ":"")+"arg"+u+"Wired";a="return function "+q(a)+"("+C+") {\nif (arguments.length !== "+(g-2)+") {\nthrowBindingError('function "+a+" called with ' + arguments.length + ' arguments, expected "+(g-2)+" args!');\n}\n",I&&(a+="var destructors = [];\n");var B=I?"destructors":"null";for(C="throwBindingError invoker fn runDestructors retType classParam".split(" "),s=[tt,s,o,ct,n[0],n[1]],c&&(a+="var thisWired = classParam.toWireType("+B+", this);\n"),u=0;u<g-2;++u)a+="var arg"+u+"Wired = argType"+u+".toWireType("+B+", arg"+u+"); // "+n[u+2].name+"\n",C.push("argType"+u),s.push(n[u+2]);if(c&&(h="thisWired"+(0<h.length?", ":"")+h),a+=(l?"var rv = ":"")+"invoker(fn"+(0<h.length?", ":"")+h+");\n",I)a+="runDestructors(destructors);\n";else for(u=c?1:2;u<n.length;++u)g=1===u?"thisWired":"arg"+(u-2)+"Wired",null!==n[u].X&&(a+=g+"_dtor("+g+"); // "+n[u].name+"\n",C.push(g+"_dtor"),s.push(n[u].X));if(l&&(a+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),C.push(a+"}\n"),n=function(t){var e=Function;if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var A=X(e.name||"unknownFunctionName",(function(){}));return A.prototype=e.prototype,A=new A,(t=e.apply(A,t))instanceof Object?t:A}(C).apply(null,s),u=A-1,!e.hasOwnProperty(r))throw new et("Replacing nonexistant public symbol");return void 0!==e[r].W&&void 0!==u?e[r].W[u]=n:(e[r]=n,e[r].aa=u),[]}))},b:function(t,e,A,n,r){function i(t){return t}e=Z(e),-1===r&&(r=4294967295);var o=Y(A);if(0===n){var a=32-8*A;i=function(t){return t<<a>>>a}}var s=-1!=e.indexOf("unsigned");At(t,{name:e,fromWireType:i,toWireType:function(t,A){if("number"!==typeof A&&"boolean"!==typeof A)throw new TypeError('Cannot convert "'+st(A)+'" to '+this.name);if(A<n||A>r)throw new TypeError('Passing a number "'+st(A)+'" from JS side to C/C++ side to an argument of type "'+e+'", which is outside the valid range ['+n+", "+r+"]!");return s?A>>>0:0|A},argPackAdvance:8,readValueFromPointer:Ct(e,o,0!==n),X:null})},a:function(t,e,A){function n(t){var e=Q;return new r(l,e[(t>>=2)+1],e[t])}var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];At(t,{name:A=Z(A),fromWireType:n,argPackAdvance:8,readValueFromPointer:n},{ca:!0})},g:function(t,e){var A="std::string"===(e=Z(e));At(t,{name:e,fromWireType:function(t){var e=Q[t>>2];if(A){var n=h[t+4+e],r=0;0!=n&&(r=n,h[t+4+e]=0);var i=t+4;for(n=0;n<=e;++n){var o=t+4+n;if(0==h[o]){if(i=i?u(h,i,void 0):"",void 0===a)var a=i;else a+=String.fromCharCode(0),a+=i;i=o+1}}0!=r&&(h[t+4+e]=r)}else{for(a=Array(e),n=0;n<e;++n)a[n]=String.fromCharCode(h[t+4+n]);a=a.join("")}return Ft(t),a},toWireType:function(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"===typeof e;n||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||tt("Cannot pass non-string to std::string");var r=(A&&n?function(){for(var t=0,A=0;A<e.length;++A){var n=e.charCodeAt(A);55296<=n&&57343>=n&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++A)),127>=n?++t:t=2047>=n?t+2:65535>=n?t+3:t+4}return t}:function(){return e.length})(),i=bt(4+r+1);if(Q[i>>2]=r,A&&n)!function(t,e,A){var n=h;if(0<A){A=e+A-1;for(var r=0;r<t.length;++r){var i=t.charCodeAt(r);if(55296<=i&&57343>=i)i=65536+((1023&i)<<10)|1023&t.charCodeAt(++r);if(127>=i){if(e>=A)break;n[e++]=i}else{if(2047>=i){if(e+1>=A)break;n[e++]=192|i>>6}else{if(65535>=i){if(e+2>=A)break;n[e++]=224|i>>12}else{if(e+3>=A)break;n[e++]=240|i>>18,n[e++]=128|i>>12&63}n[e++]=128|i>>6&63}n[e++]=128|63&i}}n[e]=0}}(e,i+4,r+1);else if(n)for(n=0;n<r;++n){var o=e.charCodeAt(n);255<o&&(Ft(i),tt("String has UTF-16 code units that do not fit in 8 bits")),h[i+4+n]=o}else for(n=0;n<r;++n)h[i+4+n]=e[n];return null!==t&&t.push(Ft,i),i},argPackAdvance:8,readValueFromPointer:at,X:function(t){Ft(t)}})},c:function(t,e,A){if(A=Z(A),2===e)var n=v,r=m,i=b,o=function(){return f},a=1;else 4===e&&(n=F,r=w,i=S,o=function(){return Q},a=2);At(t,{name:A,fromWireType:function(t){var A=Q[t>>2],r=o(),i=r[t+4+A*e>>a],s=0;0!=i&&(s=i,r[t+4+A*e>>a]=0);var g=t+4;for(i=0;i<=A;++i){var c=t+4+i*e;if(0==r[c>>a]){if(g=n(g),void 0===I)var I=g;else I+=String.fromCharCode(0),I+=g;g=c+e}}return 0!=s&&(r[t+4+A*e>>a]=s),Ft(t),I},toWireType:function(t,n){"string"!==typeof n&&tt("Cannot pass non-string to C++ string type "+A);var o=i(n),s=bt(4+o+e);return Q[s>>2]=o>>a,r(n,s+4,o+e),null!==t&&t.push(Ft,s),s},argPackAdvance:8,readValueFromPointer:at,X:function(t){Ft(t)}})},v:function(t,e){At(t,{da:!0,name:e=Z(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},m:it,t:function(t){4<t&&(rt[t].Z+=1)},B:function(t,e){var A=K[t];return void 0===A&&tt("_emval_take_value has unknown type "+lt(t)),ot(t=A.readValueFromPointer(e))},w:function(){_()},q:function(t,e,A){h.copyWithin(t,e,e+A)},r:function(t){t>>>=0;var e=h.length;if(2147483648<t)return!1;for(var A=1;4>=A;A*=2){var n=e*(1+.2/A);n=Math.min(n,t+100663296),0<(n=Math.max(16777216,t,n))%65536&&(n+=65536-n%65536);t:{try{s.grow(Math.min(2147483648,n)-l.byteLength+65535>>>16),D(s.buffer);var r=1;break t}catch(i){}r=void 0}if(r)return!0}return!1},x:function(t,e){var A=0;return Bt().forEach((function(n,r){var i=e+A;for(r=d[t+4*r>>2]=i,i=0;i<n.length;++i)C[r++>>0]=n.charCodeAt(i);C[r>>0]=0,A+=n.length+1})),0},y:function(t,e){var A=Bt();d[t>>2]=A.length;var n=0;return A.forEach((function(t){n+=t.length+1})),d[e>>2]=n,0},z:function(){return 0},p:function(){},h:function(t,e,A,n){for(var r=0,i=0;i<A;i++){for(var s=d[e+8*i>>2],g=d[e+(8*i+4)>>2],c=0;c<g;c++){var I=h[s+c],l=dt[t];0===I||10===I?((1===t?o:a)(u(l,0)),l.length=0):l.push(I)}r+=g}return d[n>>2]=r,0},memory:s,k:function(){return 0},j:function(){return 0},i:function(){},A:function(){return 6},l:function(){},e:function(){},table:g},yt=function(){function t(t){e.asm=t.exports,M--,e.monitorRunDependencies&&e.monitorRunDependencies(M),0==M&&L&&(t=L,L=null,t())}function A(e){t(e.instance)}function n(t){return new Promise((function(t){t:{try{if(r){var e=new Uint8Array(r);break t}throw"both async and sync fetching of the wasm failed"}catch(n){_(n)}e=void 0}t(e)})).then((function(t){return WebAssembly.instantiate(t,i)})).then(t,(function(t){a("failed to asynchronously prepare wasm: "+t),_(t)}))}var i={a:pt};if(M++,e.monitorRunDependencies&&e.monitorRunDependencies(M),e.instantiateWasm)try{return e.instantiateWasm(i,t)}catch(o){return a("Module.instantiateWasm callback failed with error: "+o),!1}return function(){if(r||"function"!==typeof WebAssembly.instantiateStreaming||T()||J("file://")||"function"!==typeof fetch)return n(A);fetch(j,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,i).then(A,(function(t){a("wasm streaming compile failed: "+t),a("falling back to ArrayBuffer instantiation"),n(A)}))}))}(),{}}();e.asm=yt;var vt,mt=e.___wasm_call_ctors=function(){return(mt=e.___wasm_call_ctors=e.asm.C).apply(null,arguments)},bt=e._malloc=function(){return(bt=e._malloc=e.asm.D).apply(null,arguments)},Ft=e._free=function(){return(Ft=e._free=e.asm.E).apply(null,arguments)},wt=e.___getTypeName=function(){return(wt=e.___getTypeName=e.asm.F).apply(null,arguments)};function St(){function t(){if(!vt&&(vt=!0,e.calledRun=!0,!c)){if(U(N),U(k),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var t=e.postRun.shift();x.unshift(t)}U(x)}}if(!(0<M)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)O();U(G),0<M||(e.setStatus?(e.setStatus("Running..."),setTimeout((function(){setTimeout((function(){e.setStatus("")}),1),t()}),1)):t())}}if(e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.G).apply(null,arguments)},e.dynCall_ii=function(){return(e.dynCall_ii=e.asm.H).apply(null,arguments)},e.dynCall_vi=function(){return(e.dynCall_vi=e.asm.I).apply(null,arguments)},e.dynCall_iii=function(){return(e.dynCall_iii=e.asm.J).apply(null,arguments)},e.dynCall_vii=function(){return(e.dynCall_vii=e.asm.K).apply(null,arguments)},e.dynCall_viii=function(){return(e.dynCall_viii=e.asm.L).apply(null,arguments)},e.dynCall_iiii=function(){return(e.dynCall_iiii=e.asm.M).apply(null,arguments)},e.dynCall_iiiiiii=function(){return(e.dynCall_iiiiiii=e.asm.N).apply(null,arguments)},e.dynCall_viiiiii=function(){return(e.dynCall_viiiiii=e.asm.O).apply(null,arguments)},e.dynCall_v=function(){return(e.dynCall_v=e.asm.P).apply(null,arguments)},e.dynCall_iiiii=function(){return(e.dynCall_iiiii=e.asm.Q).apply(null,arguments)},e.dynCall_jiiiii=function(){return(e.dynCall_jiiiii=e.asm.R).apply(null,arguments)},e.dynCall_viiii=function(){return(e.dynCall_viiii=e.asm.S).apply(null,arguments)},e.dynCall_iiiiii=function(){return(e.dynCall_iiiiii=e.asm.T).apply(null,arguments)},e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.U).apply(null,arguments)},e.dynCall_viiiii=function(){return(e.dynCall_viiiii=e.asm.V).apply(null,arguments)},e.asm=yt,e.then=function(t){if(vt)t(e);else{var A=e.onRuntimeInitialized;e.onRuntimeInitialized=function(){A&&A(),t(e)}}return e},L=function t(){vt||St(),vt||(L=t)},e.run=St,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();return!0,St(),t}}(),MA=" ";!function(t){t[t.NOSHUFFLE=0]="NOSHUFFLE",t[t.SHUFFLE=1]="SHUFFLE",t[t.BITSHUFFLE=2]="BITSHUFFLE",t[t.AUTOSHUFFLE=-1]="AUTOSHUFFLE"}(xA||(xA={}));var LA,_A=new Set(["blosclz","lz4","lz4hc","snappy","zlib","zstd"]),JA=function(){var t=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lz4",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:xA.SHUFFLE,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(Object(l.a)(this,t),e<0||e>9)throw new Error("Invalid compression level: '".concat(e,"'. It should be between 0 and 9"));if(!_A.has(A))throw new Error("Invalid compressor '".concat(A,"'. Valid compressors include\n        'blosclz', 'lz4', 'lz4hc','snappy', 'zlib', 'zstd'."));if(n<-1||n>2)throw new Error("Invalid shuffle ".concat(n,". Must be one of 0 (NOSHUFFLE),\n        1 (SHUFFLE), 2 (BITSHUFFLE), -1 (AUTOSHUFFLE)."));this.blocksize=r,this.clevel=e,this.cname=A,this.shuffle=n}return Object(g.a)(t,[{key:"encode",value:function(){var t=Object(i.a)(I.a.mark((function t(e){var A,n,r;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return LA||(LA=kA(OA,MA)),t.next=3,LA;case 3:return A=t.sent,n=A.compress(e,this.cname,this.clevel,this.shuffle,this.blocksize),r=new Uint8Array(n),A.free_result(),t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"decode",value:function(){var t=Object(i.a)(I.a.mark((function t(e,A){var n,r,i;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return LA||(LA=kA(OA,MA)),t.next=3,LA;case 3:if(n=t.sent,r=n.decompress(e),i=new Uint8Array(r),n.free_result(),void 0===A){t.next=10;break}return A.set(i),t.abrupt("return",A);case 10:return t.abrupt("return",i);case 11:case"end":return t.stop()}}),t)})));return function(e,A){return t.apply(this,arguments)}}()}],[{key:"fromConfig",value:function(e){var A=e.blocksize;return new t(e.clevel,e.cname,e.shuffle,A)}}]),t}();return t.codecId="blosc",t.COMPRESSORS=Object(s.a)(_A),t.NOSHUFFLE=xA.NOSHUFFLE,t.SHUFFLE=xA.SHUFFLE,t.BITSHUFFLE=xA.BITSHUFFLE,t.AUTOSHUFFLE=xA.AUTOSHUFFLE,t}(),TA=(new Map).set(NA.codecId,NA).set(GA.codecId,GA).set(JA.codecId,JA);function jA(t){if(!TA.has(t.id))throw new Error("Compression codec ".concat(t.id," is not supported by Zarr.js yet."));return TA.get(t.id).fromConfig(t)}var HA=v((function(t){var e=Object.prototype.hasOwnProperty,A="~";function n(){}function r(t,e,A){this.fn=t,this.context=e,this.once=A||!1}function i(t,e,n,i,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var a=new r(n,i||t,o),s=A?A+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],a]:t._events[s].push(a):(t._events[s]=a,t._eventsCount++),t}function o(t,e){0===--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(A=!1)),a.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(A?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t){var e=A?A+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,o=new Array(i);r<i;r++)o[r]=n[r].fn;return o},a.prototype.listenerCount=function(t){var e=A?A+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,r,i,o){var a=A?A+t:t;if(!this._events[a])return!1;var s,g,c=this._events[a],I=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),I){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,i),!0;case 6:return c.fn.call(c.context,e,n,r,i,o),!0}for(g=1,s=new Array(I-1);g<I;g++)s[g-1]=arguments[g];c.fn.apply(c.context,s)}else{var u,l=c.length;for(g=0;g<l;g++)switch(c[g].once&&this.removeListener(t,c[g].fn,void 0,!0),I){case 1:c[g].fn.call(c[g].context);break;case 2:c[g].fn.call(c[g].context,e);break;case 3:c[g].fn.call(c[g].context,e,n);break;case 4:c[g].fn.call(c[g].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(I-1);u<I;u++)s[u-1]=arguments[u];c[g].fn.apply(c[g].context,s)}}return!0},a.prototype.on=function(t,e,A){return i(this,t,e,A,!1)},a.prototype.once=function(t,e,A){return i(this,t,e,A,!0)},a.prototype.removeListener=function(t,e,n,r){var i=A?A+t:t;if(!this._events[i])return this;if(!e)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||o(this,i);else{for(var s=0,g=[],c=a.length;s<c;s++)(a[s].fn!==e||r&&!a[s].once||n&&a[s].context!==n)&&g.push(a[s]);g.length?this._events[i]=1===g.length?g[0]:g:o(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=A?A+t:t,this._events[e]&&o(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=A,a.EventEmitter=a,t.exports=a})),YA=function(t){Object(h.a)(A,t);var e=Object(B.a)(A);function A(t){var n;return Object(l.a)(this,A),(n=e.call(this,t)).name="TimeoutError",n}return A}(Object(f.a)(Error)),VA=function(t,e,A){return new Promise((function(n,r){if("number"!==typeof e||e<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(e!==1/0){var i=setTimeout((function(){if("function"!==typeof A){var i="string"===typeof A?A:"Promise timed out after ".concat(e," milliseconds"),o=A instanceof Error?A:new YA(i);"function"===typeof t.cancel&&t.cancel(),r(o)}else try{n(A())}catch(a){r(a)}}),e);!function(t,e){e=e||function(){},t.then((function(t){return new Promise((function(t){t(e())})).then((function(){return t}))}),(function(t){return new Promise((function(t){t(e())})).then((function(){throw t}))}))}(t.then(n,r),(function(){clearTimeout(i)}))}else n(t)}))},ZA=VA,WA=VA,KA=YA;ZA.default=WA,ZA.TimeoutError=KA;var PA=v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,A){for(var n=0,r=t.length;r>0;){var i=r/2|0,o=n+i;A(t[o],e)<=0?(n=++o,r-=i+1):r=i}return n}}));y(PA);var qA=v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(){Object(l.a)(this,t),this._queue=[]}return Object(g.a)(t,[{key:"enqueue",value:function(t,e){var A={priority:(e=Object.assign({priority:0},e)).priority,run:t};if(this.size&&this._queue[this.size-1].priority>=e.priority)this._queue.push(A);else{var n=PA.default(this._queue,A,(function(t,e){return e.priority-t.priority}));this._queue.splice(n,0,A)}}},{key:"dequeue",value:function(){var t=this._queue.shift();return t&&t.run}},{key:"size",get:function(){return this._queue.length}}]),t}();e.default=A}));y(qA);var XA,zA=y(v((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var A=function(){},n=new ZA.default.TimeoutError,r=function(t){Object(h.a)(r,t);var e=Object(B.a)(r);function r(t){var n;if(Object(l.a)(this,r),(n=e.call(this))._intervalCount=0,n._intervalEnd=0,n._pendingCount=0,n._resolveEmpty=A,n._resolveIdle=A,!("number"===typeof(t=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:qA.default},t)).intervalCap&&t.intervalCap>=1))throw new TypeError("Expected `intervalCap` to be a number from 1 and up, got `".concat(t.intervalCap,"` (").concat(typeof t.intervalCap,")"));if(void 0===t.interval||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError("Expected `interval` to be a finite number >= 0, got `".concat(t.interval,"` (").concat(typeof t.interval,")"));return n._carryoverConcurrencyCount=t.carryoverConcurrencyCount,n._isIntervalIgnored=t.intervalCap===1/0||0===t.interval,n._intervalCap=t.intervalCap,n._interval=t.interval,n._queue=new t.queueClass,n._queueClass=t.queueClass,n.concurrency=t.concurrency,n._timeout=t.timeout,n._throwOnTimeout=!0===t.throwOnTimeout,n._isPaused=!1===t.autoStart,n}return Object(g.a)(r,[{key:"_next",value:function(){this._pendingCount--,this._tryToStartAnother()}},{key:"_resolvePromises",value:function(){this._resolveEmpty(),this._resolveEmpty=A,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=A)}},{key:"_onResumeInterval",value:function(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}},{key:"_isIntervalPaused",value:function(){var t=this,e=Date.now();if(void 0===this._intervalId){var A=this._intervalEnd-e;if(!(A<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout((function(){t._onResumeInterval()}),A)),!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 t=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother)return this.emit("active"),this._queue.dequeue()(),t&&this._initializeIntervalIfNeeded(),!0}return!1}},{key:"_initializeIntervalIfNeeded",value:function(){var t=this;this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval((function(){t._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 t=Object(i.a)(I.a.mark((function t(e){var A,r=this,o=arguments;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return A=o.length>1&&void 0!==o[1]?o[1]:{},t.abrupt("return",new Promise((function(t,o){var a=function(){var a=Object(i.a)(I.a.mark((function i(){var a;return I.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r._pendingCount++,r._intervalCount++,i.prev=2,a=void 0===r._timeout&&void 0===A.timeout?e():ZA.default(Promise.resolve(e()),void 0===A.timeout?r._timeout:A.timeout,(function(){(void 0===A.throwOnTimeout?r._throwOnTimeout:A.throwOnTimeout)&&o(n)})),i.t0=t,i.next=7,a;case 7:i.t1=i.sent,(0,i.t0)(i.t1),i.next=14;break;case 11:i.prev=11,i.t2=i.catch(2),o(i.t2);case 14:r._next();case 15:case"end":return i.stop()}}),i,null,[[2,11]])})));return function(){return a.apply(this,arguments)}}();r._queue.enqueue(a,A),r._tryToStartAnother()})));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"addAll",value:function(){var t=Object(i.a)(I.a.mark((function t(e,A){var n=this;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.map(function(){var t=Object(i.a)(I.a.mark((function t(e){return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.add(e,A));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 1:case"end":return t.stop()}}),t)})));return function(e,A){return t.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 t=Object(i.a)(I.a.mark((function t(){var e=this;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==this._queue.size){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise((function(t){var A=e._resolveEmpty;e._resolveEmpty=function(){A(),t()}})));case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"onIdle",value:function(){var t=Object(i.a)(I.a.mark((function t(){var e=this;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==this._pendingCount||0!==this._queue.size){t.next=2;break}return t.abrupt("return");case 2:return t.abrupt("return",new Promise((function(t){var A=e._resolveIdle;e._resolveIdle=function(){A(),t()}})));case 3:case"end":return t.stop()}}),t,this)})));return function(){return t.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(t){if(!("number"===typeof t&&t>=1))throw new TypeError("Expected `concurrency` to be a number from 1 and up, got `".concat(t,"` (").concat(typeof t,")"));this._concurrency=t,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(t){this._timeout=t},get:function(){return this._timeout}}]),r}(HA);e.default=r}))),$A=function(){function t(e){var A=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]:null,o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6];Object(l.a)(this,t),this.store=e,this._chunkStore=i,this.path=st(A),this.keyPrefix=pt(this.path),this.readOnly=r,this.cacheMetadata=o,this.cacheAttrs=a,this.meta=n,null!==this.meta.compressor?this.compressor=jA(this.meta.compressor):this.compressor=null;var s=this.keyPrefix+".zattributes";this.attrs=new wt(this.store,s,this.readOnly,a)}return Object(g.a)(t,[{key:"reloadMetadata",value:function(){return E(this,void 0,void 0,I.a.mark((function t(){var e,A;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.keyPrefix+".zarray",A=this.store.getItem(e),t.t0=Ft,t.next=5,A;case 5:return t.t1=t.sent,this.meta=(0,t.t0)(t.t1),t.abrupt("return",this.meta);case 8:case"end":return t.stop()}}),t,this)})))}},{key:"refreshMetadata",value:function(){return E(this,void 0,void 0,I.a.mark((function t(){return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.cacheMetadata){t.next=3;break}return t.next=3,this.reloadMetadata();case 3:case"end":return t.stop()}}),t,this)})))}},{key:"get",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getBasicSelection(t,!1,e)}},{key:"getRaw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getBasicSelection(t,!0,e)}},{key:"getBasicSelection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=A.concurrencyLimit,r=void 0===n?10:n,i=A.progressCallback;return E(this,void 0,void 0,I.a.mark((function A(){return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.cacheMetadata){A.next=3;break}return A.next=3,this.reloadMetadata();case 3:if(this.shape!==[]){A.next=7;break}throw new Error("Shape [] indexing is not supported yet");case 7:return A.abrupt("return",this.getBasicSelectionND(t,e,r,i));case 8:case"end":return A.stop()}}),A,this)})))}},{key:"getBasicSelectionND",value:function(t,e,A,n){var r=new nt(t,this);return this.getSelection(r,e,A,n)}},{key:"getSelection",value:function(t,e,A,n){return E(this,void 0,void 0,I.a.mark((function r(){var i,o,a,s,g,c,l,C,h,B,f,d,Q=this;return I.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.dtype,o=t.shape,a=t.shape.reduce((function(t,e){return t*e}),1),!e||a!==this.chunkSize){r.next=12;break}if(s=t.iter(),!1!==(g=s.next()).done||!0!==s.next().done){r.next=12;break}return c=g.value,r.next=10,this.decodeDirectToRawArray(c,o,a);case 10:return l=r.sent,r.abrupt("return",l);case 12:if(C=e?new Tt(null,o,i):new Ot(null,o,i),0!==a){r.next=15;break}return r.abrupt("return",C);case 15:if(h=new zA({concurrency:A}),n)!function(){var e,A=0,r=0,i=Object(u.a)(t.iter());try{for(i.s();!(e=i.n()).done;){e.value;r+=1}}catch(we){i.e(we)}finally{i.f()}n({progress:0,queueSize:r});var o,a=Object(u.a)(t.iter());try{var s=function(){var e=o.value;E(Q,void 0,void 0,I.a.mark((function i(){var o=this;return I.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,h.add((function(){return o.chunkGetItem(e.chunkCoords,e.chunkSelection,C,e.outSelection,t.dropAxes)}));case 2:n({progress:A+=1,queueSize:r});case 4:case"end":return i.stop()}}),i)})))};for(a.s();!(o=a.n()).done;)s()}catch(we){a.e(we)}finally{a.f()}}();else{B=Object(u.a)(t.iter());try{for(d=function(){var e=f.value;h.add((function(){return Q.chunkGetItem(e.chunkCoords,e.chunkSelection,C,e.outSelection,t.dropAxes)}))},B.s();!(f=B.n()).done;)d()}catch(we){B.e(we)}finally{B.f()}}return r.next=19,h.onIdle();case 19:if(0!==C.shape.length){r.next=21;break}return r.abrupt("return",C.data[0]);case 21:return r.abrupt("return",C);case 22:case"end":return r.stop()}}),r,this)})))}},{key:"chunkGetItem",value:function(t,e,A,n,r){return E(this,void 0,void 0,I.a.mark((function i(){var o,a,s,g,c;return I.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(t.length===this._chunkDataShape.length){i.next=2;break}throw new H("Inconsistent shapes: chunkCoordsLength: ".concat(t.length,", cDataShapeLength: ").concat(this.chunkDataShape.length));case 2:return o=this.chunkKey(t),i.prev=3,i.next=6,this.chunkStore.getItem(o);case 6:return a=i.sent,i.next=9,this.decodeChunk(a);case 9:if(s=i.sent,!(A instanceof Ot)){i.next=21;break}if(!et(n)||!Ct(e,this.chunks)||this.meta.filters){i.next=14;break}return A.set(n,this.toNestedArray(s)),i.abrupt("return");case 14:if(g=this.toNestedArray(s),c=g.get(e),null===r){i.next=18;break}throw new Error("Drop axes is not supported yet");case 18:A.set(n,c),i.next=22;break;case 21:A.set(n,this.chunkBufferToRawArray(s),e);case 22:i.next=31;break;case 24:if(i.prev=24,i.t0=i.catch(3),!(i.t0 instanceof L)){i.next=30;break}null!==this.fillValue&&A.set(n,this.fillValue),i.next=31;break;case 30:throw i.t0;case 31:case"end":return i.stop()}}),i,this,[[3,24]])})))}},{key:"getRawChunk",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){var A,n,r,i,o,a;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length===this.shape.length){e.next=2;break}throw new Error("Chunk coordinates ".concat(t.join(".")," do not correspond to shape ").concat(this.shape,"."));case 2:for(e.prev=2,A=0;A<t.length;A++)n=Math.ceil(this.shape[A]/this.chunks[A]),t[A]=X(t[A],n);e.next=13;break;case 6:if(e.prev=6,e.t0=e.catch(2),!(e.t0 instanceof J)){e.next=12;break}throw new J("index ".concat(t.join(".")," is out of bounds for shape: ").concat(this.shape," and chunks ").concat(this.chunks));case 12:throw e.t0;case 13:return r=this.chunkKey(t),i=this.chunkStore.getItem(r),e.t1=this,e.next=18,i;case 18:return e.t2=e.sent,e.next=21,e.t1.decodeChunk.call(e.t1,e.t2);case 21:return o=e.sent,a=this.chunks.filter((function(t){return 1!==t})),e.abrupt("return",new Tt(o,a,this.dtype));case 24:case"end":return e.stop()}}),e,this,[[2,6]])})))}},{key:"chunkKey",value:function(t){return this.keyPrefix+t.join(".")}},{key:"ensureByteArray",value:function(t){return"string"===typeof t?new Uint8Array(n.from(t).buffer):new Uint8Array(t)}},{key:"toTypedArray",value:function(t){return new St[this.dtype](t)}},{key:"toNestedArray",value:function(t){var e=this.ensureByteArray(t).buffer;return new Ot(e,this.chunks,this.dtype)}},{key:"decodeChunk",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){var A;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A=this.ensureByteArray(t),null===this.compressor){e.next=5;break}return e.next=4,this.compressor.decode(A);case 4:A=e.sent;case 5:return this.dtype.includes(">")&&ft(this.toTypedArray(A.buffer)),e.abrupt("return",A.buffer);case 7:case"end":return e.stop()}}),e,this)})))}},{key:"chunkBufferToRawArray",value:function(t){return new Tt(t,this.chunks,this.dtype)}},{key:"decodeDirectToRawArray",value:function(t,e,A){var n=t.chunkCoords;return E(this,void 0,void 0,I.a.mark((function t(){var r,i,o;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.chunkKey(n),t.prev=1,t.next=4,this.chunkStore.getItem(r);case 4:return i=t.sent,t.t0=Tt,t.next=8,this.decodeChunk(i);case 8:return t.t1=t.sent,t.t2=e,t.t3=this.dtype,t.abrupt("return",new t.t0(t.t1,t.t2,t.t3));case 14:if(t.prev=14,t.t4=t.catch(1),!(t.t4 instanceof L)){t.next=21;break}return o=new St[this.dtype](A),t.abrupt("return",new Tt(o.fill(this.fillValue),e));case 21:throw t.t4;case 22:case"end":return t.stop()}}),t,this,[[1,14]])})))}},{key:"set",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return E(this,void 0,void 0,I.a.mark((function n(){return I.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.setBasicSelection(t,e,A);case 2:case"end":return n.stop()}}),n,this)})))}},{key:"setBasicSelection",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=A.concurrencyLimit,r=void 0===n?10:n,i=A.progressCallback;return E(this,void 0,void 0,I.a.mark((function A(){return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(!this.readOnly){A.next=2;break}throw new M("Object is read only");case 2:if(this.cacheMetadata){A.next=5;break}return A.next=5,this.reloadMetadata();case 5:if(this.shape!==[]){A.next=9;break}throw new Error("Shape [] indexing is not supported yet");case 9:return A.next=11,this.setBasicSelectionND(t,e,r,i);case 11:case"end":return A.stop()}}),A,this)})))}},{key:"setBasicSelectionND",value:function(t,e,A,n){return E(this,void 0,void 0,I.a.mark((function r(){var i;return I.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=new nt(t,this),r.next=3,this.setSelection(i,e,A,n);case 3:case"end":return r.stop()}}),r,this)})))}},{key:"getChunkValue",value:function(t,e,A,n){var r;if(n===[])r=A;else if("number"===typeof A)r=A;else if(r=A.get(t.outSelection),null!==e.dropAxes)throw new Error("Handling drop axes not supported yet");return r}},{key:"setSelection",value:function(t,e,A,n){return E(this,void 0,void 0,I.a.mark((function r(){var i,o,a,s,g,c=this;return I.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if((i=t.shape)!==[]){r.next=5;break}r.next=15;break;case 5:if("number"!==typeof e){r.next=9;break}r.next=15;break;case 9:if(!(e instanceof Ot)){r.next=14;break}if(ht(e.shape,i)){r.next=12;break}throw new H("Shape mismatch in source NestedArray and set selection: ".concat(e.shape," and ").concat(i));case 12:r.next=15;break;case 14:throw new Error("Unknown data type for setting :(");case 15:if(o=new zA({concurrency:A}),n)!function(){var A,r=0,a=Object(u.a)(t.iter());try{for(a.s();!(A=a.n()).done;){A.value;r+=1}}catch(we){a.e(we)}finally{a.f()}var s=0;n({progress:0,queueSize:r});var g,l=Object(u.a)(t.iter());try{var C=function(){var A=g.value,a=c.getChunkValue(A,t,e,i);E(c,void 0,void 0,I.a.mark((function t(){var e=this;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.add((function(){return e.chunkSetItem(A.chunkCoords,A.chunkSelection,a)}));case 2:n({progress:s+=1,queueSize:r});case 4:case"end":return t.stop()}}),t)})))};for(l.s();!(g=l.n()).done;)C()}catch(we){l.e(we)}finally{l.f()}}();else{a=Object(u.a)(t.iter());try{for(g=function(){var A=s.value,n=c.getChunkValue(A,t,e,i);o.add((function(){return c.chunkSetItem(A.chunkCoords,A.chunkSelection,n)}))},a.s();!(s=a.n()).done;)g()}catch(we){a.e(we)}finally{a.f()}}return r.next=19,o.onIdle();case 19:case"end":return r.stop()}}),r)})))}},{key:"chunkSetItem",value:function(t,e,A){return E(this,void 0,void 0,I.a.mark((function n(){var r,i,o,a,s,g,c,u,l;return I.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=this.chunkKey(t),i=null,o=St[this.dtype],a=this.chunkSize,!Ct(e,this.chunks)){n.next=8;break}"number"===typeof A?(i=new o(a)).fill(A):i=A.flatten(),n.next=29;break;case 8:return n.prev=8,n.next=11,this.chunkStore.getItem(r);case 11:return g=n.sent,n.next=14,this.decodeChunk(g);case 14:c=n.sent,s=this.toTypedArray(c),n.next=26;break;case 18:if(n.prev=18,n.t0=n.catch(8),!(n.t0 instanceof L)){n.next=25;break}s=new o(a),null!==this.fillValue&&s.fill(this.fillValue),n.next=26;break;case 25:throw n.t0;case 26:(u=new Ot(s,this.chunks,this.dtype)).set(e,A),i=u.flatten();case 29:return n.next=31,this.encodeChunk(i);case 31:l=n.sent,this.chunkStore.setItem(r,l);case 33:case"end":return n.stop()}}),n,this,[[8,18]])})))}},{key:"encodeChunk",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){var A,n;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.dtype.includes(">")&&(t=dt(t)),null===this.compressor){e.next=7;break}return A=new Uint8Array(t.buffer),e.next=5,this.compressor.encode(A);case 5:return n=e.sent,e.abrupt("return",n.buffer);case 7:return e.abrupt("return",t.buffer);case 8:case"end":return e.stop()}}),e,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 t=this.name;if(null===t)return null;var e=t.split("/");return e[e.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(t,e){return t*e}),1)}},{key:"dtype",get:function(){return this.meta.dtype}},{key:"fillValue",get:function(){var t=this.meta.fill_value;return"NaN"===t?NaN:"Infinity"===t?1/0:"-Infinity"===t?-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(t,e){return t*e}),1)}},{key:"length",get:function(){return this.shape[0]}},{key:"_chunkDataShape",get:function(){if(this.shape===[])return[1];for(var t=[],e=0;e<this.shape.length;e++)t[e]=Math.ceil(this.shape[e]/this.chunks[e]);return t}},{key:"chunkDataShape",get:function(){return this._chunkDataShape}},{key:"numChunks",get:function(){return this.chunkDataShape.reduce((function(t,e){return t*e}),1)}}],[{key:"create",value:function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return E(this,void 0,void 0,I.a.mark((function a(){var s;return I.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.loadMetadataForConstructor(e,A);case 2:return s=a.sent,a.abrupt("return",new t(e,A,s,n,r,i,o));case 4:case"end":return a.stop()}}),a,this)})))}},{key:"loadMetadataForConstructor",value:function(t,e){return E(this,void 0,void 0,I.a.mark((function A(){var n,r;return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.prev=0,e=st(e),n=pt(e),A.next=5,t.getItem(n+".zarray");case 5:return r=A.sent,A.abrupt("return",Ft(r));case 9:throw A.prev=9,A.t0=A.catch(0),new Error("Failed to load metadata for ZarrArray:"+A.t0.toString());case 12:case"end":return A.stop()}}),A,null,[[0,9]])})))}}]),t}(),tn=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(l.a)(this,t),this.root=e}return Object(g.a)(t,[{key:"proxy",value:function(){return Q(this)}},{key:"getParent",value:function(t){var e,A=this.root,n=t.split("/"),r=Object(u.a)(n.slice(0,n.length-1));try{for(r.s();!(e=r.n()).done;){if(!(A=A[e.value]))throw Error(t)}}catch(we){r.e(we)}finally{r.f()}return[A,n[n.length-1]]}},{key:"requireParent",value:function(t){var e,A=this.root,n=t.split("/"),r=Object(u.a)(n.slice(0,n.length-1));try{for(r.s();!(e=r.n()).done;){var i=e.value;void 0===A[i]&&(A[i]={}),A=A[i]}}catch(we){r.e(we)}finally{r.f()}return[A,n[n.length-1]]}},{key:"getItem",value:function(t){var e=this.getParent(t),A=Object(a.a)(e,2),n=A[0][A[1]];if(void 0===n)throw new L(t);return n}},{key:"setItem",value:function(t,e){var A=this.requireParent(t),n=Object(a.a)(A,2);return n[0][n[1]]=e,!0}},{key:"deleteItem",value:function(t){var e=this.getParent(t),A=Object(a.a)(e,2);return delete A[0][A[1]]}},{key:"containsItem",value:function(t){try{return void 0!==this.getItem(t)}catch(e){return!1}}},{key:"keys",value:function(){throw new Error("Method not implemented.")}}]),t}();!function(t){t.HEAD="HEAD",t.GET="GET",t.PUT="PUT"}(XA||(XA={}));var en=[XA.HEAD,XA.GET,XA.PUT],An=function(){function t(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(l.a)(this,t),this.url=e;var n=A.fetchOptions,r=void 0===n?{}:n,i=A.supportedMethods,o=void 0===i?en:i;this.fetchOptions=r,this.supportedMethods=new Set(o)}return Object(g.a)(t,[{key:"keys",value:function(){throw new Error("Method not implemented.")}},{key:"getItem",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){var A,r;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=Bt(this.url,t),e.next=3,fetch(A,this.fetchOptions);case 3:if(404!==(r=e.sent).status){e.next=8;break}throw new L(t);case 8:if(200===r.status){e.next=10;break}throw new Y(String(r.status));case 10:if(!at){e.next=18;break}return e.t0=n,e.next=14,r.arrayBuffer();case 14:return e.t1=e.sent,e.abrupt("return",e.t0.from.call(e.t0,e.t1));case 18:return e.abrupt("return",r.arrayBuffer());case 19:case"end":return e.stop()}}),e,this)})))}},{key:"setItem",value:function(t,e){return E(this,void 0,void 0,I.a.mark((function A(){var n,r;return I.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(this.supportedMethods.has(XA.PUT)){A.next=2;break}throw new Error("HTTP PUT no a supported method for store.");case 2:return n=Bt(this.url,t),"string"===typeof e&&(e=(new TextEncoder).encode(e).buffer),A.next=6,fetch(n,Object.assign(Object.assign({},this.fetchOptions),{method:XA.PUT,body:e}));case 6:return r=A.sent,A.abrupt("return","2"===r.status.toString()[0]);case 8:case"end":return A.stop()}}),A,this)})))}},{key:"deleteItem",value:function(t){throw new Error("Method not implemented.")}},{key:"containsItem",value:function(t){return E(this,void 0,void 0,I.a.mark((function e(){var A,n,r;return I.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=Bt(this.url,t),n=this.supportedMethods.has(XA.HEAD)?XA.HEAD:XA.GET,e.next=4,fetch(A,Object.assign(Object.assign({},this.fetchOptions),{method:n}));case 4:return r=e.sent,e.abrupt("return",200===r.status);case 6:case"end":return e.stop()}}),e,this)})))}}]),t}();function nn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.shape,A=t.mode,n=void 0===A?"a":A,r=t.chunks,i=void 0===r||r,o=t.dtype,a=void 0===o?"<i4":o,s=t.compressor,g=void 0===s?null:s,c=t.fillValue,u=void 0===c?null:c,l=t.order,C=void 0===l?"C":l,h=t.store,B=t.overwrite,f=void 0!==B&&B,d=t.path,Q=void 0===d?null:d,p=t.chunkStore,y=t.filters,v=t.cacheMetadata,m=void 0===v||v,b=t.cacheAttrs,F=void 0===b||b;return E(this,void 0,void 0,I.a.mark((function t(){var A;return I.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(h=rn(h),void 0===p&&(p=rn(h)),Q=st(Q),"r"!==n&&"r+"!==n){t.next=16;break}return t.next=6,Et(h,Q);case 6:if(!t.sent){t.next=10;break}throw new x(Q);case 10:return t.next=12,Qt(h,Q);case 12:if(t.sent){t.next=14;break}throw new O(Q);case 14:t.next=59;break;case 16:if("w"!==n){t.next=23;break}if(void 0!==e){t.next=19;break}throw new H("Shape can not be undefined when creating a new array");case 19:return t.next=21,bt(h,e,i,a,Q,g,u,C,f,p,y);case 21:t.next=59;break;case 23:if("a"!==n){t.next=39;break}return t.next=26,Et(h,Q);case 26:if(!t.sent){t.next=30;break}throw new x(Q);case 30:return t.next=32,Qt(h,Q);case 32:if(t.sent){t.next=37;break}if(void 0!==e){t.next=35;break}throw new H("Shape can not be undefined when creating a new array");case 35:return t.next=37,bt(h,e,i,a,Q,g,u,C,f,p,y);case 37:t.next=59;break;case 39:if("w-"!==n&&"x"!==n){t.next=58;break}return t.next=42,Qt(h,Q);case 42:if(!t.sent){t.next=46;break}throw new k(Q);case 46:return t.next=48,Et(h,Q);case 48:if(!t.sent){t.next=52;break}throw new x(Q);case 52:if(void 0!==e){t.next=54;break}throw new H("Shape can not be undefined when creating a new array");case 54:return t.next=56,bt(h,e,i,a,Q,g,u,C,f,p,y);case 56:t.next=59;break;case 58:throw new H("Invalid mode argument: ".concat(n));case 59:return A="r"===n,t.abrupt("return",$A.create(h,Q,A,p,m,F));case 61:case"end":return t.stop()}}),t)})))}function rn(t){return void 0===t?new tn:"string"===typeof t?new An(t):t}}).call(this,A(58),A(104).Buffer,A(62))},,,function(t,e,A){"use strict";A.r(e);var n=A(946);A.d(e,"HeatmapSubscriber",(function(){return n.a}));var r=A(824);A.d(e,"Heatmap",(function(){return r.a}))},function(t,e,A){"use strict";A.r(e);var n=A(944);A.d(e,"SpatialSubscriber",(function(){return n.a}));var r=A(823);A.d(e,"Spatial",(function(){return r.a}))},function(t,e,A){"use strict";A.r(e);var n=A(945);A.d(e,"ScatterplotSubscriber",(function(){return n.a}));var r=A(825);A.d(e,"Scatterplot",(function(){return r.a}))},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findInArray=function(t,e){for(var A=0,n=t.length;A<n;A++)if(e.apply(e,[t[A],A,t]))return t[A]},e.isFunction=function(t){return"function"===typeof t||"[object Function]"===Object.prototype.toString.call(t)},e.isNum=function(t){return"number"===typeof t&&!isNaN(t)},e.int=function(t){return parseInt(t,10)},e.dontSetMe=function(t,e,A){if(t[e])return new Error("Invalid prop ".concat(e," passed to ").concat(A," - do not set this, set it on the child."))}},function(t){t.exports=JSON.parse('{"note":"This file is regenerated by push-demo.sh.","branch":"release_1.1.12","date":"2021-07-20","hash":"8c2fa377"}')},,,,,,,,,,,,,,function(t,e,A){"use strict";var n=window.URL||window.webkitURL;t.exports=function(t,e){try{try{var A;try{(A=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(t),A=A.getBlob()}catch(r){A=new Blob([t])}return new Worker(n.createObjectURL(A))}catch(r){return new Worker("data:application/javascript,"+encodeURIComponent(t))}}catch(r){if(!e)throw Error("Inline worker is not supported");return new Worker(e)}}},function(t,e,A){"use strict";var n=A(17);e.a=function(t,e){var A,r;if(void 0===e){var i,o=Object(n.a)(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;null!=a&&(void 0===A?a>=a&&(A=r=a):(A>a&&(A=a),r<a&&(r=a)))}}catch(u){o.e(u)}finally{o.f()}}else{var s,g=-1,c=Object(n.a)(t);try{for(c.s();!(s=c.n()).done;){var I=s.value;null!=(I=e(I,++g,t))&&(void 0===A?I>=I&&(A=r=I):(A>I&&(A=I),r<I&&(r=I)))}}catch(u){c.e(u)}finally{c.f()}}return[A,r]}},function(t,e,A){(function(t,A){var n="[object Arguments]",r="[object Map]",i="[object Object]",o="[object Set]",a=/^\[object .+?Constructor\]$/,s=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[n]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g["[object Function]"]=g[r]=g["[object Number]"]=g[i]=g["[object RegExp]"]=g[o]=g["[object String]"]=g["[object WeakMap]"]=!1;var c="object"==typeof t&&t&&t.Object===Object&&t,I="object"==typeof self&&self&&self.Object===Object&&self,u=c||I||Function("return this")(),l=e&&!e.nodeType&&e,C=l&&"object"==typeof A&&A&&!A.nodeType&&A,h=C&&C.exports===l,B=h&&c.process,f=function(){try{return B&&B.binding&&B.binding("util")}catch(t){}}(),d=f&&f.isTypedArray;function Q(t,e){for(var A=-1,n=null==t?0:t.length;++A<n;)if(e(t[A],A,t))return!0;return!1}function E(t){var e=-1,A=Array(t.size);return t.forEach((function(t,n){A[++e]=[n,t]})),A}function p(t){var e=-1,A=Array(t.size);return t.forEach((function(t){A[++e]=t})),A}var y,v,m=Array.prototype,b=Function.prototype,F=Object.prototype,w=u["__core-js_shared__"],S=b.toString,D=F.hasOwnProperty,R=function(){var t=/[^.]+$/.exec(w&&w.keys&&w.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),U=F.toString,G=RegExp("^"+S.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=h?u.Buffer:void 0,k=u.Symbol,x=u.Uint8Array,O=F.propertyIsEnumerable,M=m.splice,L=k?k.toStringTag:void 0,_=Object.getOwnPropertySymbols,J=N?N.isBuffer:void 0,T=(y=Object.keys,v=Object,function(t){return y(v(t))}),j=Bt(u,"DataView"),H=Bt(u,"Map"),Y=Bt(u,"Promise"),V=Bt(u,"Set"),Z=Bt(u,"WeakMap"),W=Bt(Object,"create"),K=Et(j),P=Et(H),q=Et(Y),X=Et(V),z=Et(Z),$=k?k.prototype:void 0,tt=$?$.valueOf:void 0;function et(t){var e=-1,A=null==t?0:t.length;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}function At(t){var e=-1,A=null==t?0:t.length;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}function nt(t){var e=-1,A=null==t?0:t.length;for(this.clear();++e<A;){var n=t[e];this.set(n[0],n[1])}}function rt(t){var e=-1,A=null==t?0:t.length;for(this.__data__=new nt;++e<A;)this.add(t[e])}function it(t){var e=this.__data__=new At(t);this.size=e.size}function ot(t,e){var A=vt(t),n=!A&&yt(t),r=!A&&!n&&mt(t),i=!A&&!n&&!r&&Dt(t),o=A||n||r||i,a=o?function(t,e){for(var A=-1,n=Array(t);++A<t;)n[A]=e(A);return n}(t.length,String):[],s=a.length;for(var g in t)!e&&!D.call(t,g)||o&&("length"==g||r&&("offset"==g||"parent"==g)||i&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||Qt(g,s))||a.push(g);return a}function at(t,e){for(var A=t.length;A--;)if(pt(t[A][0],e))return A;return-1}function st(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":L&&L in Object(t)?function(t){var e=D.call(t,L),A=t[L];try{t[L]=void 0;var n=!0}catch(i){}var r=U.call(t);n&&(e?t[L]=A:delete t[L]);return r}(t):function(t){return U.call(t)}(t)}function gt(t){return St(t)&&st(t)==n}function ct(t,e,A,a,s){return t===e||(null==t||null==e||!St(t)&&!St(e)?t!==t&&e!==e:function(t,e,A,a,s,g){var c=vt(t),I=vt(e),u=c?"[object Array]":dt(t),l=I?"[object Array]":dt(e),C=(u=u==n?i:u)==i,h=(l=l==n?i:l)==i,B=u==l;if(B&&mt(t)){if(!mt(e))return!1;c=!0,C=!1}if(B&&!C)return g||(g=new it),c||Dt(t)?lt(t,e,A,a,s,g):function(t,e,A,n,i,a,s){switch(A){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new x(t),new x(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return pt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case r:var g=E;case o:var c=1&n;if(g||(g=p),t.size!=e.size&&!c)return!1;var I=s.get(t);if(I)return I==e;n|=2,s.set(t,e);var u=lt(g(t),g(e),n,i,a,s);return s.delete(t),u;case"[object Symbol]":if(tt)return tt.call(t)==tt.call(e)}return!1}(t,e,u,A,a,s,g);if(!(1&A)){var f=C&&D.call(t,"__wrapped__"),d=h&&D.call(e,"__wrapped__");if(f||d){var Q=f?t.value():t,y=d?e.value():e;return g||(g=new it),s(Q,y,A,a,g)}}if(!B)return!1;return g||(g=new it),function(t,e,A,n,r,i){var o=1&A,a=Ct(t),s=a.length,g=Ct(e).length;if(s!=g&&!o)return!1;var c=s;for(;c--;){var I=a[c];if(!(o?I in e:D.call(e,I)))return!1}var u=i.get(t);if(u&&i.get(e))return u==e;var l=!0;i.set(t,e),i.set(e,t);var C=o;for(;++c<s;){I=a[c];var h=t[I],B=e[I];if(n)var f=o?n(B,h,I,e,t,i):n(h,B,I,t,e,i);if(!(void 0===f?h===B||r(h,B,A,n,i):f)){l=!1;break}C||(C="constructor"==I)}if(l&&!C){var d=t.constructor,Q=e.constructor;d==Q||!("constructor"in t)||!("constructor"in e)||"function"==typeof d&&d instanceof d&&"function"==typeof Q&&Q instanceof Q||(l=!1)}return i.delete(t),i.delete(e),l}(t,e,A,a,s,g)}(t,e,A,a,ct,s))}function It(t){return!(!wt(t)||function(t){return!!R&&R in t}(t))&&(bt(t)?G:a).test(Et(t))}function ut(t){if(!function(t){var e=t&&t.constructor,A="function"==typeof e&&e.prototype||F;return t===A}(t))return T(t);var e=[];for(var A in Object(t))D.call(t,A)&&"constructor"!=A&&e.push(A);return e}function lt(t,e,A,n,r,i){var o=1&A,a=t.length,s=e.length;if(a!=s&&!(o&&s>a))return!1;var g=i.get(t);if(g&&i.get(e))return g==e;var c=-1,I=!0,u=2&A?new rt:void 0;for(i.set(t,e),i.set(e,t);++c<a;){var l=t[c],C=e[c];if(n)var h=o?n(C,l,c,e,t,i):n(l,C,c,t,e,i);if(void 0!==h){if(h)continue;I=!1;break}if(u){if(!Q(e,(function(t,e){if(o=e,!u.has(o)&&(l===t||r(l,t,A,n,i)))return u.push(e);var o}))){I=!1;break}}else if(l!==C&&!r(l,C,A,n,i)){I=!1;break}}return i.delete(t),i.delete(e),I}function Ct(t){return function(t,e,A){var n=e(t);return vt(t)?n:function(t,e){for(var A=-1,n=e.length,r=t.length;++A<n;)t[r+A]=e[A];return t}(n,A(t))}(t,Rt,ft)}function ht(t,e){var A=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?A["string"==typeof e?"string":"hash"]:A.map}function Bt(t,e){var A=function(t,e){return null==t?void 0:t[e]}(t,e);return It(A)?A:void 0}et.prototype.clear=function(){this.__data__=W?W(null):{},this.size=0},et.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},et.prototype.get=function(t){var e=this.__data__;if(W){var A=e[t];return"__lodash_hash_undefined__"===A?void 0:A}return D.call(e,t)?e[t]:void 0},et.prototype.has=function(t){var e=this.__data__;return W?void 0!==e[t]:D.call(e,t)},et.prototype.set=function(t,e){var A=this.__data__;return this.size+=this.has(t)?0:1,A[t]=W&&void 0===e?"__lodash_hash_undefined__":e,this},At.prototype.clear=function(){this.__data__=[],this.size=0},At.prototype.delete=function(t){var e=this.__data__,A=at(e,t);return!(A<0)&&(A==e.length-1?e.pop():M.call(e,A,1),--this.size,!0)},At.prototype.get=function(t){var e=this.__data__,A=at(e,t);return A<0?void 0:e[A][1]},At.prototype.has=function(t){return at(this.__data__,t)>-1},At.prototype.set=function(t,e){var A=this.__data__,n=at(A,t);return n<0?(++this.size,A.push([t,e])):A[n][1]=e,this},nt.prototype.clear=function(){this.size=0,this.__data__={hash:new et,map:new(H||At),string:new et}},nt.prototype.delete=function(t){var e=ht(this,t).delete(t);return this.size-=e?1:0,e},nt.prototype.get=function(t){return ht(this,t).get(t)},nt.prototype.has=function(t){return ht(this,t).has(t)},nt.prototype.set=function(t,e){var A=ht(this,t),n=A.size;return A.set(t,e),this.size+=A.size==n?0:1,this},rt.prototype.add=rt.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},rt.prototype.has=function(t){return this.__data__.has(t)},it.prototype.clear=function(){this.__data__=new At,this.size=0},it.prototype.delete=function(t){var e=this.__data__,A=e.delete(t);return this.size=e.size,A},it.prototype.get=function(t){return this.__data__.get(t)},it.prototype.has=function(t){return this.__data__.has(t)},it.prototype.set=function(t,e){var A=this.__data__;if(A instanceof At){var n=A.__data__;if(!H||n.length<199)return n.push([t,e]),this.size=++A.size,this;A=this.__data__=new nt(n)}return A.set(t,e),this.size=A.size,this};var ft=_?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var A=-1,n=null==t?0:t.length,r=0,i=[];++A<n;){var o=t[A];e(o,A,t)&&(i[r++]=o)}return i}(_(t),(function(e){return O.call(t,e)})))}:function(){return[]},dt=st;function Qt(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||s.test(t))&&t>-1&&t%1==0&&t<e}function Et(t){if(null!=t){try{return S.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function pt(t,e){return t===e||t!==t&&e!==e}(j&&"[object DataView]"!=dt(new j(new ArrayBuffer(1)))||H&&dt(new H)!=r||Y&&"[object Promise]"!=dt(Y.resolve())||V&&dt(new V)!=o||Z&&"[object WeakMap]"!=dt(new Z))&&(dt=function(t){var e=st(t),A=e==i?t.constructor:void 0,n=A?Et(A):"";if(n)switch(n){case K:return"[object DataView]";case P:return r;case q:return"[object Promise]";case X:return o;case z:return"[object WeakMap]"}return e});var yt=gt(function(){return arguments}())?gt:function(t){return St(t)&&D.call(t,"callee")&&!O.call(t,"callee")},vt=Array.isArray;var mt=J||function(){return!1};function bt(t){if(!wt(t))return!1;var e=st(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ft(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function wt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function St(t){return null!=t&&"object"==typeof t}var Dt=d?function(t){return function(e){return t(e)}}(d):function(t){return St(t)&&Ft(t.length)&&!!g[st(t)]};function Rt(t){return null!=(e=t)&&Ft(e.length)&&!bt(e)?ot(t):ut(t);var e}A.exports=function(t,e){return ct(t,e)}}).call(this,A(58),A(220)(t))},function(t,e,A){"use strict";function n(t){return(n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.matchesSelector=I,e.matchesSelectorAndParentsTo=function(t,e,A){var n=t;do{if(I(n,e))return!0;if(n===A)return!1;n=n.parentNode}while(n);return!1},e.addEvent=function(t,e,A,n){if(!t)return;var r=s({capture:!0},n);t.addEventListener?t.addEventListener(e,A,r):t.attachEvent?t.attachEvent("on"+e,A):t["on"+e]=A},e.removeEvent=function(t,e,A,n){if(!t)return;var r=s({capture:!0},n);t.removeEventListener?t.removeEventListener(e,A,r):t.detachEvent?t.detachEvent("on"+e,A):t["on"+e]=null},e.outerHeight=function(t){var e=t.clientHeight,A=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,r.int)(A.borderTopWidth),e+=(0,r.int)(A.borderBottomWidth)},e.outerWidth=function(t){var e=t.clientWidth,A=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,r.int)(A.borderLeftWidth),e+=(0,r.int)(A.borderRightWidth)},e.innerHeight=function(t){var e=t.clientHeight,A=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,r.int)(A.paddingTop),e-=(0,r.int)(A.paddingBottom)},e.innerWidth=function(t){var e=t.clientWidth,A=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,r.int)(A.paddingLeft),e-=(0,r.int)(A.paddingRight)},e.offsetXYFromParent=function(t,e,A){var n=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect(),r=(t.clientX+e.scrollLeft-n.left)/A,i=(t.clientY+e.scrollTop-n.top)/A;return{x:r,y:i}},e.createCSSTransform=function(t,e){var A=u(t,e,"px");return g({},(0,i.browserPrefixToKey)("transform",i.default),A)},e.createSVGTransform=function(t,e){return u(t,e,"")},e.getTranslation=u,e.getTouch=function(t,e){return t.targetTouches&&(0,r.findInArray)(t.targetTouches,(function(t){return e===t.identifier}))||t.changedTouches&&(0,r.findInArray)(t.changedTouches,(function(t){return e===t.identifier}))},e.getTouchIdentifier=function(t){if(t.targetTouches&&t.targetTouches[0])return t.targetTouches[0].identifier;if(t.changedTouches&&t.changedTouches[0])return t.changedTouches[0].identifier},e.addUserSelectStyles=function(t){if(!t)return;var e=t.getElementById("react-draggable-style-el");e||((e=t.createElement("style")).type="text/css",e.id="react-draggable-style-el",e.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",e.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",t.getElementsByTagName("head")[0].appendChild(e));t.body&&l(t.body,"react-draggable-transparent-selection")},e.removeUserSelectStyles=function(t){if(!t)return;try{if(t.body&&C(t.body,"react-draggable-transparent-selection"),t.selection)t.selection.empty();else{var e=(t.defaultView||window).getSelection();e&&"Caret"!==e.type&&e.removeAllRanges()}}catch(A){}},e.addClassName=l,e.removeClassName=C;var r=A(1150),i=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var A={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=r?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(A,i,a):A[i]=t[i]}A.default=t,e&&e.set(t,A);return A}(A(1460));function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}function a(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function s(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?a(Object(A),!0).forEach((function(e){g(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):a(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function g(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var c="";function I(t,e){return c||(c=(0,r.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(e){return(0,r.isFunction)(t[e])}))),!!(0,r.isFunction)(t[c])&&t[c](e)}function u(t,e,A){var n=t.x,r=t.y,i="translate(".concat(n).concat(A,",").concat(r).concat(A,")");if(e){var o="".concat("string"===typeof e.x?e.x:e.x+A),a="".concat("string"===typeof e.y?e.y:e.y+A);i="translate(".concat(o,", ").concat(a,")")+i}return i}function l(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)")))||(t.className+=" ".concat(e))}function C(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g"),"")}},function(t,e,A){"use strict";var n=A(909),r=A(722),i=A(910),o=A(542),a=A(1061),s=r.ucs2length,g=A(221),c=i.Validation;function I(t,e,A){var n=l.call(this,t,e,A);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:t,root:e,baseId:A},{index:n,compiling:!1})}function u(t,e,A){var n=l.call(this,t,e,A);n>=0&&this._compilations.splice(n,1)}function l(t,e,A){for(var n=0;n<this._compilations.length;n++){var r=this._compilations[n];if(r.schema==t&&r.root==e&&r.baseId==A)return n}return-1}function C(t,e){return"var pattern"+t+" = new RegExp("+r.toQuotedString(e[t])+");"}function h(t){return"var default"+t+" = defaults["+t+"];"}function B(t,e){return void 0===e[t]?"":"var refVal"+t+" = refVal["+t+"];"}function f(t){return"var customRule"+t+" = customRules["+t+"];"}function d(t,e){if(!t.length)return"";for(var A="",n=0;n<t.length;n++)A+=e(n,t);return A}t.exports=function t(e,A,l,Q){var E=this,p=this._opts,y=[void 0],v={},m=[],b={},F=[],w={},S=[];A=A||{schema:e,refVal:y,refs:v};var D=I.call(this,e,A,Q),R=this._compilations[D.index];if(D.compiling)return R.callValidate=function t(){var e=R.validate,A=e.apply(this,arguments);return t.errors=e.errors,A};var U=this._formats,G=this.RULES;try{var N=x(e,A,l,Q);R.validate=N;var k=R.callValidate;return k&&(k.schema=N.schema,k.errors=null,k.refs=N.refs,k.refVal=N.refVal,k.root=N.root,k.$async=N.$async,p.sourceCode&&(k.source=N.source)),N}finally{u.call(this,e,A,Q)}function x(e,o,I,u){var l=!o||o&&o.schema==e;if(o.schema!=A.schema)return t.call(E,e,o,I,u);var Q,b=!0===e.$async,w=a({isTop:!0,schema:e,isRoot:l,baseId:u,root:o,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:i.MissingRef,RULES:G,validate:a,util:r,resolve:n,resolveRef:O,usePattern:_,useDefault:J,useCustomRule:T,opts:p,formats:U,logger:E.logger,self:E});w=d(y,B)+d(m,C)+d(F,h)+d(S,f)+w,p.processCode&&(w=p.processCode(w));try{Q=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",w)(E,G,U,A,y,F,S,g,s,c),y[0]=Q}catch(D){throw E.logger.error("Error compiling schema, function code:",w),D}return Q.schema=e,Q.errors=null,Q.refs=v,Q.refVal=y,Q.root=l?Q:o,b&&(Q.$async=!0),!0===p.sourceCode&&(Q.source={code:w,patterns:m,defaults:F}),Q}function O(e,r,i){r=n.url(e,r);var o,a,s=v[r];if(void 0!==s)return L(o=y[s],a="refVal["+s+"]");if(!i&&A.refs){var g=A.refs[r];if(void 0!==g)return L(o=A.refVal[g],a=M(r,o))}a=M(r);var c=n.call(E,x,A,r);if(void 0===c){var I=l&&l[r];I&&(c=n.inlineRef(I,p.inlineRefs)?I:t.call(E,I,A,l,e))}if(void 0!==c)return function(t,e){var A=v[t];y[A]=e}(r,c),L(c,a);!function(t){delete v[t]}(r)}function M(t,e){var A=y.length;return y[A]=e,v[t]=A,"refVal"+A}function L(t,e){return"object"==typeof t||"boolean"==typeof t?{code:e,schema:t,inline:!0}:{code:e,$async:t&&!!t.$async}}function _(t){var e=b[t];return void 0===e&&(e=b[t]=m.length,m[e]=t),"pattern"+e}function J(t){switch(typeof t){case"boolean":case"number":return""+t;case"string":return r.toQuotedString(t);case"object":if(null===t)return"null";var e=o(t),A=w[e];return void 0===A&&(A=w[e]=F.length,F[A]=t),"default"+A}}function T(t,e,A,n){if(!1!==E._opts.validateSchema){var r=t.definition.dependencies;if(r&&!r.every((function(t){return Object.prototype.hasOwnProperty.call(A,t)})))throw new Error("parent schema must have all required keywords: "+r.join(","));var i=t.definition.validateSchema;if(i)if(!i(e)){var o="keyword schema is invalid: "+E.errorsText(i.errors);if("log"!=E._opts.validateSchema)throw new Error(o);E.logger.error(o)}}var a,s=t.definition.compile,g=t.definition.inline,c=t.definition.macro;if(s)a=s.call(E,e,A,n);else if(c)a=c.call(E,e,A,n),!1!==p.validateSchema&&E.validateSchema(a,!0);else if(g)a=g.call(E,n,t.keyword,e,A);else if(!(a=t.definition.validate))return;if(void 0===a)throw new Error('custom keyword "'+t.keyword+'"failed to compile');var I=S.length;return S[I]=a,{code:"customRule"+I,validate:a}}}},function(t,e,A){!function(t){"use strict";function e(){for(var t=arguments.length,e=Array(t),A=0;A<t;A++)e[A]=arguments[A];if(e.length>1){e[0]=e[0].slice(0,-1);for(var n=e.length-1,r=1;r<n;++r)e[r]=e[r].slice(1,-1);return e[n]=e[n].slice(1),e.join("")}return e[0]}function A(t){return"(?:"+t+")"}function n(t){return void 0===t?"undefined":null===t?"null":Object.prototype.toString.call(t).split(" ").pop().split("]").shift().toLowerCase()}function r(t){return t.toUpperCase()}function i(t){var n=e("[0-9]","[A-Fa-f]"),r=A(A("%[EFef]"+n+"%"+n+n+"%"+n+n)+"|"+A("%[89A-Fa-f]"+n+"%"+n+n)+"|"+A("%"+n+n)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",o=e("[\\:\\/\\?\\#\\[\\]\\@]",i),a=t?"[\\uE000-\\uF8FF]":"[]",s=e("[A-Za-z]","[0-9]","[\\-\\.\\_\\~]",t?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),g=A("[A-Za-z]"+e("[A-Za-z]","[0-9]","[\\+\\-\\.]")+"*"),c=A(A(r+"|"+e(s,i,"[\\:]"))+"*"),I=(A(A("25[0-5]")+"|"+A("2[0-4][0-9]")+"|"+A("1[0-9][0-9]")+"|"+A("[1-9][0-9]")+"|[0-9]"),A(A("25[0-5]")+"|"+A("2[0-4][0-9]")+"|"+A("1[0-9][0-9]")+"|"+A("0?[1-9][0-9]")+"|0?0?[0-9]")),u=A(I+"\\."+I+"\\."+I+"\\."+I),l=A(n+"{1,4}"),C=A(A(l+"\\:"+l)+"|"+u),h=A(A(l+"\\:")+"{6}"+C),B=A("\\:\\:"+A(l+"\\:")+"{5}"+C),f=A(A(l)+"?\\:\\:"+A(l+"\\:")+"{4}"+C),d=A(A(A(l+"\\:")+"{0,1}"+l)+"?\\:\\:"+A(l+"\\:")+"{3}"+C),Q=A(A(A(l+"\\:")+"{0,2}"+l)+"?\\:\\:"+A(l+"\\:")+"{2}"+C),E=A(A(A(l+"\\:")+"{0,3}"+l)+"?\\:\\:"+l+"\\:"+C),p=A(A(A(l+"\\:")+"{0,4}"+l)+"?\\:\\:"+C),y=A(A(A(l+"\\:")+"{0,5}"+l)+"?\\:\\:"+l),v=A(A(A(l+"\\:")+"{0,6}"+l)+"?\\:\\:"),m=A([h,B,f,d,Q,E,p,y,v].join("|")),b=A(A(s+"|"+r)+"+"),F=(A(m+"\\%25"+b),A(m+A("\\%25|\\%(?!"+n+"{2})")+b)),w=A("[vV]"+n+"+\\."+e(s,i,"[\\:]")+"+"),S=A("\\["+A(F+"|"+m+"|"+w)+"\\]"),D=A(A(r+"|"+e(s,i))+"*"),R=A(S+"|"+u+"(?!"+D+")|"+D),U=A("[0-9]*"),G=A(A(c+"@")+"?"+R+A("\\:"+U)+"?"),N=A(r+"|"+e(s,i,"[\\:\\@]")),k=A(N+"*"),x=A(N+"+"),O=A(A(r+"|"+e(s,i,"[\\@]"))+"+"),M=A(A("\\/"+k)+"*"),L=A("\\/"+A(x+M)+"?"),_=A(O+M),J=A(x+M),T="(?!"+N+")",j=(A(M+"|"+L+"|"+_+"|"+J+"|"+T),A(A(N+"|"+e("[\\/\\?]",a))+"*")),H=A(A(N+"|[\\/\\?]")+"*"),Y=A(A("\\/\\/"+G+M)+"|"+L+"|"+J+"|"+T),V=A(g+"\\:"+Y+A("\\?"+j)+"?"+A("\\#"+H)+"?"),Z=A(A("\\/\\/"+G+M)+"|"+L+"|"+_+"|"+T),W=A(Z+A("\\?"+j)+"?"+A("\\#"+H)+"?");return A(V+"|"+W),A(g+"\\:"+Y+A("\\?"+j)+"?"),A(A("\\/\\/("+A("("+c+")@")+"?("+R+")"+A("\\:("+U+")")+"?)")+"?("+M+"|"+L+"|"+J+"|"+T+")"),A("\\?("+j+")"),A("\\#("+H+")"),A(A("\\/\\/("+A("("+c+")@")+"?("+R+")"+A("\\:("+U+")")+"?)")+"?("+M+"|"+L+"|"+_+"|"+T+")"),A("\\?("+j+")"),A("\\#("+H+")"),A(A("\\/\\/("+A("("+c+")@")+"?("+R+")"+A("\\:("+U+")")+"?)")+"?("+M+"|"+L+"|"+J+"|"+T+")"),A("\\?("+j+")"),A("\\#("+H+")"),A("("+c+")@"),A("\\:("+U+")"),{NOT_SCHEME:new RegExp(e("[^]","[A-Za-z]","[0-9]","[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",s,i),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",s,i),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",s,i),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",s,i),"g"),NOT_QUERY:new RegExp(e("[^\\%]",s,i,"[\\:\\@\\/\\?]",a),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",s,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",s,i),"g"),UNRESERVED:new RegExp(s,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",s,o),"g"),PCT_ENCODED:new RegExp(r,"g"),IPV4ADDRESS:new RegExp("^("+u+")$"),IPV6ADDRESS:new RegExp("^\\[?("+m+")"+A(A("\\%25|\\%(?!"+n+"{2})")+"("+b+")")+"?\\]?$")}}var o=i(!1),a=i(!0),s=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return A}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},g=2147483647,c=/^xn--/,I=/[^\0-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=Math.floor,h=String.fromCharCode;function B(t){throw new RangeError(l[t])}function f(t,e){var A=t.split("@"),n="";A.length>1&&(n=A[0]+"@",t=A[1]);var r=function(t,e){for(var A=[],n=t.length;n--;)A[n]=e(t[n]);return A}((t=t.replace(u,".")).split("."),e).join(".");return n+r}function d(t){for(var e=[],A=0,n=t.length;A<n;){var r=t.charCodeAt(A++);if(r>=55296&&r<=56319&&A<n){var i=t.charCodeAt(A++);56320==(64512&i)?e.push(((1023&r)<<10)+(1023&i)+65536):(e.push(r),A--)}else e.push(r)}return e}var Q=function(t,e){return t+22+75*(t<26)-((0!=e)<<5)},E=function(t,e,A){var n=0;for(t=A?C(t/700):t>>1,t+=C(t/e);t>455;n+=36)t=C(t/35);return C(n+36*t/(t+38))},p=function(t){var e,A=[],n=t.length,r=0,i=128,o=72,a=t.lastIndexOf("-");a<0&&(a=0);for(var s=0;s<a;++s)t.charCodeAt(s)>=128&&B("not-basic"),A.push(t.charCodeAt(s));for(var c=a>0?a+1:0;c<n;){for(var I=r,u=1,l=36;;l+=36){c>=n&&B("invalid-input");var h=(e=t.charCodeAt(c++))-48<10?e-22:e-65<26?e-65:e-97<26?e-97:36;(h>=36||h>C((g-r)/u))&&B("overflow"),r+=h*u;var f=l<=o?1:l>=o+26?26:l-o;if(h<f)break;var d=36-f;u>C(g/d)&&B("overflow"),u*=d}var Q=A.length+1;o=E(r-I,Q,0==I),C(r/Q)>g-i&&B("overflow"),i+=C(r/Q),r%=Q,A.splice(r++,0,i)}return String.fromCodePoint.apply(String,A)},y=function(t){var e=[],A=(t=d(t)).length,n=128,r=0,i=72,o=!0,a=!1,s=void 0;try{for(var c,I=t[Symbol.iterator]();!(o=(c=I.next()).done);o=!0){var u=c.value;u<128&&e.push(h(u))}}catch(J){a=!0,s=J}finally{try{!o&&I.return&&I.return()}finally{if(a)throw s}}var l=e.length,f=l;for(l&&e.push("-");f<A;){var p=g,y=!0,v=!1,m=void 0;try{for(var b,F=t[Symbol.iterator]();!(y=(b=F.next()).done);y=!0){var w=b.value;w>=n&&w<p&&(p=w)}}catch(J){v=!0,m=J}finally{try{!y&&F.return&&F.return()}finally{if(v)throw m}}var S=f+1;p-n>C((g-r)/S)&&B("overflow"),r+=(p-n)*S,n=p;var D=!0,R=!1,U=void 0;try{for(var G,N=t[Symbol.iterator]();!(D=(G=N.next()).done);D=!0){var k=G.value;if(k<n&&++r>g&&B("overflow"),k==n){for(var x=r,O=36;;O+=36){var M=O<=i?1:O>=i+26?26:O-i;if(x<M)break;var L=x-M,_=36-M;e.push(h(Q(M+L%_,0))),x=C(L/_)}e.push(h(Q(x,0))),i=E(r,S,f==l),r=0,++f}}}catch(J){R=!0,U=J}finally{try{!D&&N.return&&N.return()}finally{if(R)throw U}}++r,++n}return e.join("")},v=function(t){return f(t,(function(t){return I.test(t)?"xn--"+y(t):t}))},m=function(t){return f(t,(function(t){return c.test(t)?p(t.slice(4).toLowerCase()):t}))},b={};function F(t){var e=t.charCodeAt(0);return e<16?"%0"+e.toString(16).toUpperCase():e<128?"%"+e.toString(16).toUpperCase():e<2048?"%"+(e>>6|192).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase():"%"+(e>>12|224).toString(16).toUpperCase()+"%"+(e>>6&63|128).toString(16).toUpperCase()+"%"+(63&e|128).toString(16).toUpperCase()}function w(t){for(var e="",A=0,n=t.length;A<n;){var r=parseInt(t.substr(A+1,2),16);if(r<128)e+=String.fromCharCode(r),A+=3;else if(r>=194&&r<224){if(n-A>=6){var i=parseInt(t.substr(A+4,2),16);e+=String.fromCharCode((31&r)<<6|63&i)}else e+=t.substr(A,6);A+=6}else if(r>=224){if(n-A>=9){var o=parseInt(t.substr(A+4,2),16),a=parseInt(t.substr(A+7,2),16);e+=String.fromCharCode((15&r)<<12|(63&o)<<6|63&a)}else e+=t.substr(A,9);A+=9}else e+=t.substr(A,3),A+=3}return e}function S(t,e){function A(t){var A=w(t);return A.match(e.UNRESERVED)?A:t}return t.scheme&&(t.scheme=String(t.scheme).replace(e.PCT_ENCODED,A).toLowerCase().replace(e.NOT_SCHEME,"")),void 0!==t.userinfo&&(t.userinfo=String(t.userinfo).replace(e.PCT_ENCODED,A).replace(e.NOT_USERINFO,F).replace(e.PCT_ENCODED,r)),void 0!==t.host&&(t.host=String(t.host).replace(e.PCT_ENCODED,A).toLowerCase().replace(e.NOT_HOST,F).replace(e.PCT_ENCODED,r)),void 0!==t.path&&(t.path=String(t.path).replace(e.PCT_ENCODED,A).replace(t.scheme?e.NOT_PATH:e.NOT_PATH_NOSCHEME,F).replace(e.PCT_ENCODED,r)),void 0!==t.query&&(t.query=String(t.query).replace(e.PCT_ENCODED,A).replace(e.NOT_QUERY,F).replace(e.PCT_ENCODED,r)),void 0!==t.fragment&&(t.fragment=String(t.fragment).replace(e.PCT_ENCODED,A).replace(e.NOT_FRAGMENT,F).replace(e.PCT_ENCODED,r)),t}function D(t){return t.replace(/^0*(.*)/,"$1")||"0"}function R(t,e){var A=t.match(e.IPV4ADDRESS)||[],n=s(A,2)[1];return n?n.split(".").map(D).join("."):t}function U(t,e){var A=t.match(e.IPV6ADDRESS)||[],n=s(A,3),r=n[1],i=n[2];if(r){for(var o=r.toLowerCase().split("::").reverse(),a=s(o,2),g=a[0],c=a[1],I=c?c.split(":").map(D):[],u=g.split(":").map(D),l=e.IPV4ADDRESS.test(u[u.length-1]),C=l?7:8,h=u.length-C,B=Array(C),f=0;f<C;++f)B[f]=I[f]||u[h+f]||"";l&&(B[C-1]=R(B[C-1],e));var d=B.reduce((function(t,e,A){if(!e||"0"===e){var n=t[t.length-1];n&&n.index+n.length===A?n.length++:t.push({index:A,length:1})}return t}),[]).sort((function(t,e){return e.length-t.length}))[0],Q=void 0;if(d&&d.length>1){var E=B.slice(0,d.index),p=B.slice(d.index+d.length);Q=E.join(":")+"::"+p.join(":")}else Q=B.join(":");return i&&(Q+="%"+i),Q}return t}var G=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,N=void 0==="".match(/(){0}/)[1];function k(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A={},n=!1!==e.iri?a:o;"suffix"===e.reference&&(t=(e.scheme?e.scheme+":":"")+"//"+t);var r=t.match(G);if(r){N?(A.scheme=r[1],A.userinfo=r[3],A.host=r[4],A.port=parseInt(r[5],10),A.path=r[6]||"",A.query=r[7],A.fragment=r[8],isNaN(A.port)&&(A.port=r[5])):(A.scheme=r[1]||void 0,A.userinfo=-1!==t.indexOf("@")?r[3]:void 0,A.host=-1!==t.indexOf("//")?r[4]:void 0,A.port=parseInt(r[5],10),A.path=r[6]||"",A.query=-1!==t.indexOf("?")?r[7]:void 0,A.fragment=-1!==t.indexOf("#")?r[8]:void 0,isNaN(A.port)&&(A.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),A.host&&(A.host=U(R(A.host,n),n)),void 0!==A.scheme||void 0!==A.userinfo||void 0!==A.host||void 0!==A.port||A.path||void 0!==A.query?void 0===A.scheme?A.reference="relative":void 0===A.fragment?A.reference="absolute":A.reference="uri":A.reference="same-document",e.reference&&"suffix"!==e.reference&&e.reference!==A.reference&&(A.error=A.error||"URI is not a "+e.reference+" reference.");var i=b[(e.scheme||A.scheme||"").toLowerCase()];if(e.unicodeSupport||i&&i.unicodeSupport)S(A,n);else{if(A.host&&(e.domainHost||i&&i.domainHost))try{A.host=v(A.host.replace(n.PCT_ENCODED,w).toLowerCase())}catch(s){A.error=A.error||"Host's domain name can not be converted to ASCII via punycode: "+s}S(A,o)}i&&i.parse&&i.parse(A,e)}else A.error=A.error||"URI can not be parsed.";return A}function x(t,e){var A=!1!==e.iri?a:o,n=[];return void 0!==t.userinfo&&(n.push(t.userinfo),n.push("@")),void 0!==t.host&&n.push(U(R(String(t.host),A),A).replace(A.IPV6ADDRESS,(function(t,e,A){return"["+e+(A?"%25"+A:"")+"]"}))),"number"===typeof t.port&&(n.push(":"),n.push(t.port.toString(10))),n.length?n.join(""):void 0}var O=/^\.\.?\//,M=/^\/\.(\/|$)/,L=/^\/\.\.(\/|$)/,_=/^\/?(?:.|\n)*?(?=\/|$)/;function J(t){for(var e=[];t.length;)if(t.match(O))t=t.replace(O,"");else if(t.match(M))t=t.replace(M,"/");else if(t.match(L))t=t.replace(L,"/"),e.pop();else if("."===t||".."===t)t="";else{var A=t.match(_);if(!A)throw new Error("Unexpected dot segment condition");var n=A[0];t=t.slice(n.length),e.push(n)}return e.join("")}function T(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.iri?a:o,n=[],r=b[(e.scheme||t.scheme||"").toLowerCase()];if(r&&r.serialize&&r.serialize(t,e),t.host)if(A.IPV6ADDRESS.test(t.host));else if(e.domainHost||r&&r.domainHost)try{t.host=e.iri?m(t.host):v(t.host.replace(A.PCT_ENCODED,w).toLowerCase())}catch(g){t.error=t.error||"Host's domain name can not be converted to "+(e.iri?"Unicode":"ASCII")+" via punycode: "+g}S(t,A),"suffix"!==e.reference&&t.scheme&&(n.push(t.scheme),n.push(":"));var i=x(t,e);if(void 0!==i&&("suffix"!==e.reference&&n.push("//"),n.push(i),t.path&&"/"!==t.path.charAt(0)&&n.push("/")),void 0!==t.path){var s=t.path;e.absolutePath||r&&r.absolutePath||(s=J(s)),void 0===i&&(s=s.replace(/^\/\//,"/%2F")),n.push(s)}return void 0!==t.query&&(n.push("?"),n.push(t.query)),void 0!==t.fragment&&(n.push("#"),n.push(t.fragment)),n.join("")}function j(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],r={};return n||(t=k(T(t,A),A),e=k(T(e,A),A)),!(A=A||{}).tolerant&&e.scheme?(r.scheme=e.scheme,r.userinfo=e.userinfo,r.host=e.host,r.port=e.port,r.path=J(e.path||""),r.query=e.query):(void 0!==e.userinfo||void 0!==e.host||void 0!==e.port?(r.userinfo=e.userinfo,r.host=e.host,r.port=e.port,r.path=J(e.path||""),r.query=e.query):(e.path?("/"===e.path.charAt(0)?r.path=J(e.path):(void 0===t.userinfo&&void 0===t.host&&void 0===t.port||t.path?t.path?r.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:r.path=e.path:r.path="/"+e.path,r.path=J(r.path)),r.query=e.query):(r.path=t.path,void 0!==e.query?r.query=e.query:r.query=t.query),r.userinfo=t.userinfo,r.host=t.host,r.port=t.port),r.scheme=t.scheme),r.fragment=e.fragment,r}function H(t,e){return t&&t.toString().replace(e&&e.iri?a.PCT_ENCODED:o.PCT_ENCODED,w)}var Y={scheme:"http",domainHost:!0,parse:function(t,e){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t},serialize:function(t,e){return t.port!==("https"!==String(t.scheme).toLowerCase()?80:443)&&""!==t.port||(t.port=void 0),t.path||(t.path="/"),t}},V={scheme:"https",domainHost:Y.domainHost,parse:Y.parse,serialize:Y.serialize},Z={},W="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",K="[0-9A-Fa-f]",P=A(A("%[EFef]"+K+"%"+K+K+"%"+K+K)+"|"+A("%[89A-Fa-f]"+K+"%"+K+K)+"|"+A("%"+K+K)),q=e("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),X=new RegExp(W,"g"),z=new RegExp(P,"g"),$=new RegExp(e("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',q),"g"),tt=new RegExp(e("[^]",W,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),et=tt;function At(t){var e=w(t);return e.match(X)?e:t}var nt={scheme:"mailto",parse:function(t,e){var A=t,n=A.to=A.path?A.path.split(","):[];if(A.path=void 0,A.query){for(var r=!1,i={},o=A.query.split("&"),a=0,s=o.length;a<s;++a){var g=o[a].split("=");switch(g[0]){case"to":for(var c=g[1].split(","),I=0,u=c.length;I<u;++I)n.push(c[I]);break;case"subject":A.subject=H(g[1],e);break;case"body":A.body=H(g[1],e);break;default:r=!0,i[H(g[0],e)]=H(g[1],e)}}r&&(A.headers=i)}A.query=void 0;for(var l=0,C=n.length;l<C;++l){var h=n[l].split("@");if(h[0]=H(h[0]),e.unicodeSupport)h[1]=H(h[1],e).toLowerCase();else try{h[1]=v(H(h[1],e).toLowerCase())}catch(B){A.error=A.error||"Email address's domain name can not be converted to ASCII via punycode: "+B}n[l]=h.join("@")}return A},serialize:function(t,e){var A,n=t,i=void 0!==(A=t.to)&&null!==A?A instanceof Array?A:"number"!==typeof A.length||A.split||A.setInterval||A.call?[A]:Array.prototype.slice.call(A):[];if(i){for(var o=0,a=i.length;o<a;++o){var s=String(i[o]),g=s.lastIndexOf("@"),c=s.slice(0,g).replace(z,At).replace(z,r).replace($,F),I=s.slice(g+1);try{I=e.iri?m(I):v(H(I,e).toLowerCase())}catch(h){n.error=n.error||"Email address's domain name can not be converted to "+(e.iri?"Unicode":"ASCII")+" via punycode: "+h}i[o]=c+"@"+I}n.path=i.join(",")}var u=t.headers=t.headers||{};t.subject&&(u.subject=t.subject),t.body&&(u.body=t.body);var l=[];for(var C in u)u[C]!==Z[C]&&l.push(C.replace(z,At).replace(z,r).replace(tt,F)+"="+u[C].replace(z,At).replace(z,r).replace(et,F));return l.length&&(n.query=l.join("&")),n}},rt=/^([^\:]+)\:(.*)/,it={scheme:"urn",parse:function(t,e){var A=t.path&&t.path.match(rt),n=t;if(A){var r=e.scheme||n.scheme||"urn",i=A[1].toLowerCase(),o=A[2],a=r+":"+(e.nid||i),s=b[a];n.nid=i,n.nss=o,n.path=void 0,s&&(n=s.parse(n,e))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(t,e){var A=e.scheme||t.scheme||"urn",n=t.nid,r=A+":"+(e.nid||n),i=b[r];i&&(t=i.serialize(t,e));var o=t,a=t.nss;return o.path=(n||e.nid)+":"+a,o}},ot=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,at={scheme:"urn:uuid",parse:function(t,e){var A=t;return A.uuid=A.nss,A.nss=void 0,e.tolerant||A.uuid&&A.uuid.match(ot)||(A.error=A.error||"UUID is not valid."),A},serialize:function(t,e){var A=t;return A.nss=(t.uuid||"").toLowerCase(),A}};b[Y.scheme]=Y,b[V.scheme]=V,b[nt.scheme]=nt,b[it.scheme]=it,b[at.scheme]=at,t.SCHEMES=b,t.pctEncChar=F,t.pctDecChars=w,t.parse=k,t.removeDotSegments=J,t.serialize=T,t.resolveComponents=j,t.resolve=function(t,e,A){var n=function(t,e){var A=t;if(e)for(var n in e)A[n]=e[n];return A}({scheme:"null"},A);return T(j(k(t,n),k(e,n),n,!0),n)},t.normalize=function(t,e){return"string"===typeof t?t=T(k(t,e),e):"object"===n(t)&&(t=k(T(t,e),e)),t},t.equal=function(t,e,A){return"string"===typeof t?t=T(k(t,A),A):"object"===n(t)&&(t=T(t,A)),"string"===typeof e?e=T(k(e,A),A):"object"===n(e)&&(e=T(e,A)),t===e},t.escapeComponent=function(t,e){return t&&t.toString().replace(e&&e.iri?a.ESCAPE:o.ESCAPE,F)},t.unescapeComponent=H,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,A){"use strict";t.exports=function(t){for(var e,A=0,n=t.length,r=0;r<n;)A++,(e=t.charCodeAt(r++))>=55296&&e<=56319&&r<n&&56320==(64512&(e=t.charCodeAt(r)))&&r++;return A}},function(t,e,A){"use strict";var n=t.exports=function(t,e,A){"function"==typeof e&&(A=e,e={}),function t(e,A,r,i,o,a,s,g,c,I){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var u in A(i,o,a,s,g,c,I),i){var l=i[u];if(Array.isArray(l)){if(u in n.arrayKeywords)for(var C=0;C<l.length;C++)t(e,A,r,l[C],o+"/"+u+"/"+C,a,o,u,i,C)}else if(u in n.propsKeywords){if(l&&"object"==typeof l)for(var h in l)t(e,A,r,l[h],o+"/"+u+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),a,o,u,i,h)}else(u in n.keywords||e.allKeys&&!(u in n.skipKeywords))&&t(e,A,r,l,o+"/"+u,a,o,u,i)}r(i,o,a,s,g,c,I)}}(e,"function"==typeof(A=e.cb||A)?A:A.pre||function(){},A.post||function(){},t,"",t)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.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(t,e,A){"use strict";var n=t.exports=function(){this._cache={}};n.prototype.put=function(t,e){this._cache[t]=e},n.prototype.get=function(t){return this._cache[t]},n.prototype.del=function(t){delete this._cache[t]},n.prototype.clear=function(){this._cache={}}},function(t,e,A){"use strict";var n=A(722),r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[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,a=/^(?=.{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,s=/^(?:[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,g=/^(?:(?:[^\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,I=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,u=/^(?:\/(?:[^~/]|~0|~1)*)*$/,l=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,C=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function h(t){return t="full"==t?"full":"fast",n.copy(h[t])}function B(t){var e=t.match(r);if(!e)return!1;var A=+e[1],n=+e[2],o=+e[3];return n>=1&&n<=12&&o>=1&&o<=(2==n&&function(t){return t%4===0&&(t%100!==0||t%400===0)}(A)?29:i[n])}function f(t,e){var A=t.match(o);if(!A)return!1;var n=A[1],r=A[2],i=A[3],a=A[5];return(n<=23&&r<=59&&i<=59||23==n&&59==r&&60==i)&&(!e||a)}t.exports=h,h.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":g,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:a,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:p,uuid:I,"json-pointer":u,"json-pointer-uri-fragment":l,"relative-json-pointer":C},h.full={date:B,time:f,"date-time":function(t){var e=t.split(d);return 2==e.length&&B(e[0])&&f(e[1],!0)},uri:function(t){return Q.test(t)&&s.test(t)},"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":g,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:a,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:p,uuid:I,"json-pointer":u,"json-pointer-uri-fragment":l,"relative-json-pointer":C};var d=/t|\s/i;var Q=/\/|:/;var E=/[^\\]\\Z/;function p(t){if(E.test(t))return!1;try{return new RegExp(t),!0}catch(e){return!1}}},function(t,e,A){"use strict";var n=A(1176),r=A(722).toHash;t.exports=function(){var t=[{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"]}],e=["type","$comment"];return t.all=r(e),t.types=r(["number","integer","string","array","object","boolean","null"]),t.forEach((function(A){A.rules=A.rules.map((function(A){var r;if("object"==typeof A){var i=Object.keys(A)[0];r=A[i],A=i,r.forEach((function(A){e.push(A),t.all[A]=!0}))}return e.push(A),t.all[A]={keyword:A,code:n[A],implements:r}})),t.all.$comment={keyword:"$comment",code:n.$comment},A.type&&(t.types[A.type]=A)})),t.keywords=r(e.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),t.custom={},t}},function(t,e,A){"use strict";t.exports={$ref:A(1177),allOf:A(1178),anyOf:A(1179),$comment:A(1180),const:A(1181),contains:A(1182),dependencies:A(1183),enum:A(1184),format:A(1185),if:A(1186),items:A(1187),maximum:A(1062),minimum:A(1062),maxItems:A(1063),minItems:A(1063),maxLength:A(1064),minLength:A(1064),maxProperties:A(1065),minProperties:A(1065),multipleOf:A(1188),not:A(1189),oneOf:A(1190),pattern:A(1191),properties:A(1192),propertyNames:A(1193),required:A(1194),uniqueItems:A(1195),validate:A(1061)}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r,i=" ",o=t.level,a=t.dataLevel,s=t.schema[e],g=t.errSchemaPath+"/"+e,c=!t.opts.allErrors,I="data"+(a||""),u="valid"+o;if("#"==s||"#/"==s)t.isRoot?(n=t.async,r="validate"):(n=!0===t.root.schema.$async,r="root.refVal[0]");else{var l=t.resolveRef(t.baseId,s,t.isRoot);if(void 0===l){var C=t.MissingRefError.message(t.baseId,s);if("fail"==t.opts.missingRefs){t.logger.error(C),(d=d||[]).push(i),i="",!1!==t.createErrors?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: { ref: '"+t.util.escapeQuotes(s)+"' } ",!1!==t.opts.messages&&(i+=" , message: 'can\\'t resolve reference "+t.util.escapeQuotes(s)+"' "),t.opts.verbose&&(i+=" , schema: "+t.util.toQuotedString(s)+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),i+=" } "):i+=" {} ";var h=i;i=d.pop(),!t.compositeRule&&c?t.async?i+=" throw new ValidationError(["+h+"]); ":i+=" validate.errors = ["+h+"]; return false; ":i+=" var err = "+h+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(i+=" if (false) { ")}else{if("ignore"!=t.opts.missingRefs)throw new t.MissingRefError(t.baseId,s,C);t.logger.warn(C),c&&(i+=" if (true) { ")}}else if(l.inline){var B=t.util.copy(t);B.level++;var f="valid"+B.level;B.schema=l.schema,B.schemaPath="",B.errSchemaPath=s,i+=" "+t.validate(B).replace(/validate\.schema/g,l.code)+" ",c&&(i+=" if ("+f+") { ")}else n=!0===l.$async||t.async&&!1!==l.$async,r=l.code}if(r){var d;(d=d||[]).push(i),i="",t.opts.passContext?i+=" "+r+".call(this, ":i+=" "+r+"( ",i+=" "+I+", (dataPath || '')",'""'!=t.errorPath&&(i+=" + "+t.errorPath);var Q=i+=" , "+(a?"data"+(a-1||""):"parentData")+" , "+(a?t.dataPathArr[a]:"parentDataProperty")+", rootData)  ";if(i=d.pop(),n){if(!t.async)throw new Error("async schema referenced by sync schema");c&&(i+=" var "+u+"; "),i+=" try { await "+Q+"; ",c&&(i+=" "+u+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",c&&(i+=" "+u+" = false; "),i+=" } ",c&&(i+=" if ("+u+") { ")}else i+=" if (!"+Q+") { if (vErrors === null) vErrors = "+r+".errors; else vErrors = vErrors.concat("+r+".errors); errors = vErrors.length; } ",c&&(i+=" else { ")}return i}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.schema[e],i=t.schemaPath+t.util.getProperty(e),o=t.errSchemaPath+"/"+e,a=!t.opts.allErrors,s=t.util.copy(t),g="";s.level++;var c="valid"+s.level,I=s.baseId,u=!0,l=r;if(l)for(var C,h=-1,B=l.length-1;h<B;)C=l[h+=1],(t.opts.strictKeywords?"object"==typeof C&&Object.keys(C).length>0:t.util.schemaHasRules(C,t.RULES.all))&&(u=!1,s.schema=C,s.schemaPath=i+"["+h+"]",s.errSchemaPath=o+"/"+h,n+="  "+t.validate(s)+" ",s.baseId=I,a&&(n+=" if ("+c+") { ",g+="}"));return a&&(n+=u?" if (true) { ":" "+g.slice(0,-1)+" "),n=t.util.cleanUpCode(n)}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="valid"+r,u="errs__"+r,l=t.util.copy(t),C="";l.level++;var h="valid"+l.level;if(o.every((function(e){return t.opts.strictKeywords?"object"==typeof e&&Object.keys(e).length>0:t.util.schemaHasRules(e,t.RULES.all)}))){var B=l.baseId;n+=" var "+u+" = errors; var "+I+" = false;  ";var f=t.compositeRule;t.compositeRule=l.compositeRule=!0;var d=o;if(d)for(var Q,E=-1,p=d.length-1;E<p;)Q=d[E+=1],l.schema=Q,l.schemaPath=a+"["+E+"]",l.errSchemaPath=s+"/"+E,n+="  "+t.validate(l)+" ",l.baseId=B,n+=" "+I+" = "+I+" || "+h+"; if (!"+I+") { ",C+="}";t.compositeRule=l.compositeRule=f,n+=" "+C+" if (!"+I+") {   var err =   ",!1!==t.createErrors?(n+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: {} ",!1!==t.opts.messages&&(n+=" , message: 'should match some schema in anyOf' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&g&&(t.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" } else {  errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",t.opts.allErrors&&(n+=" } "),n=t.util.cleanUpCode(n)}else g&&(n+=" if (true) { ");return n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.schema[e],i=t.errSchemaPath+"/"+e,o=(t.opts.allErrors,t.util.toQuotedString(r));return!0===t.opts.$comment?n+=" console.log("+o+");":"function"==typeof t.opts.$comment&&(n+=" self._opts.$comment("+o+", "+t.util.toQuotedString(i)+", validate.root.schema);"),n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="valid"+r,u=t.opts.$data&&o&&o.$data;u&&(n+=" var schema"+r+" = "+t.util.getData(o.$data,i,t.dataPathArr)+"; "),u||(n+=" var schema"+r+" = validate.schema"+a+";"),n+="var "+I+" = equal("+c+", schema"+r+"); if (!"+I+") {   ";var l=l||[];l.push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'const' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { allowedValue: schema"+r+" } ",!1!==t.opts.messages&&(n+=" , message: 'should be equal to constant' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var C=n;return n=l.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+C+"]); ":n+=" validate.errors = ["+C+"]; return false; ":n+=" var err = "+C+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",g&&(n+=" else { "),n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="valid"+r,u="errs__"+r,l=t.util.copy(t);l.level++;var C="valid"+l.level,h="i"+r,B=l.dataLevel=t.dataLevel+1,f="data"+B,d=t.baseId,Q=t.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:t.util.schemaHasRules(o,t.RULES.all);if(n+="var "+u+" = errors;var "+I+";",Q){var E=t.compositeRule;t.compositeRule=l.compositeRule=!0,l.schema=o,l.schemaPath=a,l.errSchemaPath=s,n+=" var "+C+" = false; for (var "+h+" = 0; "+h+" < "+c+".length; "+h+"++) { ",l.errorPath=t.util.getPathExpr(t.errorPath,h,t.opts.jsonPointers,!0);var p=c+"["+h+"]";l.dataPathArr[B]=h;var y=t.validate(l);l.baseId=d,t.util.varOccurences(y,f)<2?n+=" "+t.util.varReplace(y,f,p)+" ":n+=" var "+f+" = "+p+"; "+y+" ",n+=" if ("+C+") break; }  ",t.compositeRule=l.compositeRule=E,n+="  if (!"+C+") {"}else n+=" if ("+c+".length == 0) {";var v=v||[];v.push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: {} ",!1!==t.opts.messages&&(n+=" , message: 'should contain a valid item' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var m=n;return n=v.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { ",Q&&(n+="  errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } "),t.opts.allErrors&&(n+=" } "),n=t.util.cleanUpCode(n)}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="errs__"+r,u=t.util.copy(t),l="";u.level++;var C="valid"+u.level,h={},B={},f=t.opts.ownProperties;for(p in o){var d=o[p],Q=Array.isArray(d)?B:h;Q[p]=d}n+="var "+I+" = errors;";var E=t.errorPath;for(var p in n+="var missing"+r+";",B)if((Q=B[p]).length){if(n+=" if ( "+c+t.util.getProperty(p)+" !== undefined ",f&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(p)+"') "),g){n+=" && ( ";var y=Q;if(y)for(var v=-1,m=y.length-1;v<m;){R=y[v+=1],v&&(n+=" || "),n+=" ( ( "+(k=c+(N=t.util.getProperty(R)))+" === undefined ",f&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(R)+"') "),n+=") && (missing"+r+" = "+t.util.toQuotedString(t.opts.jsonPointers?R:N)+") ) "}n+=")) {  ";var b="missing"+r,F="' + "+b+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.opts.jsonPointers?t.util.getPathExpr(E,b,!0):E+" + "+b);var w=w||[];w.push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { property: '"+t.util.escapeQuotes(p)+"', missingProperty: '"+F+"', depsCount: "+Q.length+", deps: '"+t.util.escapeQuotes(1==Q.length?Q[0]:Q.join(", "))+"' } ",!1!==t.opts.messages&&(n+=" , message: 'should have ",1==Q.length?n+="property "+t.util.escapeQuotes(Q[0]):n+="properties "+t.util.escapeQuotes(Q.join(", ")),n+=" when property "+t.util.escapeQuotes(p)+" is present' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var S=n;n=w.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+S+"]); ":n+=" validate.errors = ["+S+"]; return false; ":n+=" var err = "+S+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{n+=" ) { ";var D=Q;if(D)for(var R,U=-1,G=D.length-1;U<G;){R=D[U+=1];var N=t.util.getProperty(R),k=(F=t.util.escapeQuotes(R),c+N);t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(E,R,t.opts.jsonPointers)),n+=" if ( "+k+" === undefined ",f&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(R)+"') "),n+=") {  var err =   ",!1!==t.createErrors?(n+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { property: '"+t.util.escapeQuotes(p)+"', missingProperty: '"+F+"', depsCount: "+Q.length+", deps: '"+t.util.escapeQuotes(1==Q.length?Q[0]:Q.join(", "))+"' } ",!1!==t.opts.messages&&(n+=" , message: 'should have ",1==Q.length?n+="property "+t.util.escapeQuotes(Q[0]):n+="properties "+t.util.escapeQuotes(Q.join(", ")),n+=" when property "+t.util.escapeQuotes(p)+" is present' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}n+=" }   ",g&&(l+="}",n+=" else { ")}t.errorPath=E;var x=u.baseId;for(var p in h){d=h[p];(t.opts.strictKeywords?"object"==typeof d&&Object.keys(d).length>0:t.util.schemaHasRules(d,t.RULES.all))&&(n+=" "+C+" = true; if ( "+c+t.util.getProperty(p)+" !== undefined ",f&&(n+=" && Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(p)+"') "),n+=") { ",u.schema=d,u.schemaPath=a+t.util.getProperty(p),u.errSchemaPath=s+"/"+t.util.escapeFragment(p),n+="  "+t.validate(u)+" ",u.baseId=x,n+=" }  ",g&&(n+=" if ("+C+") { ",l+="}"))}return g&&(n+="   "+l+" if ("+I+" == errors) {"),n=t.util.cleanUpCode(n)}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="valid"+r,u=t.opts.$data&&o&&o.$data;u&&(n+=" var schema"+r+" = "+t.util.getData(o.$data,i,t.dataPathArr)+"; ");var l="i"+r,C="schema"+r;u||(n+=" var "+C+" = validate.schema"+a+";"),n+="var "+I+";",u&&(n+=" if (schema"+r+" === undefined) "+I+" = true; else if (!Array.isArray(schema"+r+")) "+I+" = false; else {"),n+=I+" = false;for (var "+l+"=0; "+l+"<"+C+".length; "+l+"++) if (equal("+c+", "+C+"["+l+"])) { "+I+" = true; break; }",u&&(n+="  }  "),n+=" if (!"+I+") {   ";var h=h||[];h.push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { allowedValues: schema"+r+" } ",!1!==t.opts.messages&&(n+=" , message: 'should be equal to one of the allowed values' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var B=n;return n=h.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+B+"]); ":n+=" validate.errors = ["+B+"]; return false; ":n+=" var err = "+B+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",g&&(n+=" else { "),n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||"");if(!1===t.opts.format)return g&&(n+=" if (true) { "),n;var I,u=t.opts.$data&&o&&o.$data;u?(n+=" var schema"+r+" = "+t.util.getData(o.$data,i,t.dataPathArr)+"; ",I="schema"+r):I=o;var l=t.opts.unknownFormats,C=Array.isArray(l);if(u){n+=" var "+(h="format"+r)+" = formats["+I+"]; var "+(B="isObject"+r)+" = typeof "+h+" == 'object' && !("+h+" instanceof RegExp) && "+h+".validate; var "+(f="formatType"+r)+" = "+B+" && "+h+".type || 'string'; if ("+B+") { ",t.async&&(n+=" var async"+r+" = "+h+".async; "),n+=" "+h+" = "+h+".validate; } if (  ",u&&(n+=" ("+I+" !== undefined && typeof "+I+" != 'string') || "),n+=" (","ignore"!=l&&(n+=" ("+I+" && !"+h+" ",C&&(n+=" && self._opts.unknownFormats.indexOf("+I+") == -1 "),n+=") || "),n+=" ("+h+" && "+f+" == '"+A+"' && !(typeof "+h+" == 'function' ? ",t.async?n+=" (async"+r+" ? await "+h+"("+c+") : "+h+"("+c+")) ":n+=" "+h+"("+c+") ",n+=" : "+h+".test("+c+"))))) {"}else{var h;if(!(h=t.formats[o])){if("ignore"==l)return t.logger.warn('unknown format "'+o+'" ignored in schema at path "'+t.errSchemaPath+'"'),g&&(n+=" if (true) { "),n;if(C&&l.indexOf(o)>=0)return g&&(n+=" if (true) { "),n;throw new Error('unknown format "'+o+'" is used in schema at path "'+t.errSchemaPath+'"')}var B,f=(B="object"==typeof h&&!(h instanceof RegExp)&&h.validate)&&h.type||"string";if(B){var d=!0===h.async;h=h.validate}if(f!=A)return g&&(n+=" if (true) { "),n;if(d){if(!t.async)throw new Error("async format in sync schema");n+=" if (!(await "+(Q="formats"+t.util.getProperty(o)+".validate")+"("+c+"))) { "}else{n+=" if (! ";var Q="formats"+t.util.getProperty(o);B&&(Q+=".validate"),n+="function"==typeof h?" "+Q+"("+c+") ":" "+Q+".test("+c+") ",n+=") { "}}var E=E||[];E.push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'format' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { format:  ",n+=u?""+I:""+t.util.toQuotedString(o),n+="  } ",!1!==t.opts.messages&&(n+=" , message: 'should match format \"",n+=u?"' + "+I+" + '":""+t.util.escapeQuotes(o),n+="\"' "),t.opts.verbose&&(n+=" , schema:  ",n+=u?"validate.schema"+a:""+t.util.toQuotedString(o),n+="         , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var p=n;return n=E.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+p+"]); ":n+=" validate.errors = ["+p+"]; return false; ":n+=" var err = "+p+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",g&&(n+=" else { "),n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="valid"+r,u="errs__"+r,l=t.util.copy(t);l.level++;var C="valid"+l.level,h=t.schema.then,B=t.schema.else,f=void 0!==h&&(t.opts.strictKeywords?"object"==typeof h&&Object.keys(h).length>0:t.util.schemaHasRules(h,t.RULES.all)),d=void 0!==B&&(t.opts.strictKeywords?"object"==typeof B&&Object.keys(B).length>0:t.util.schemaHasRules(B,t.RULES.all)),Q=l.baseId;if(f||d){var E;l.createErrors=!1,l.schema=o,l.schemaPath=a,l.errSchemaPath=s,n+=" var "+u+" = errors; var "+I+" = true;  ";var p=t.compositeRule;t.compositeRule=l.compositeRule=!0,n+="  "+t.validate(l)+" ",l.baseId=Q,l.createErrors=!0,n+="  errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; }  ",t.compositeRule=l.compositeRule=p,f?(n+=" if ("+C+") {  ",l.schema=t.schema.then,l.schemaPath=t.schemaPath+".then",l.errSchemaPath=t.errSchemaPath+"/then",n+="  "+t.validate(l)+" ",l.baseId=Q,n+=" "+I+" = "+C+"; ",f&&d?n+=" var "+(E="ifClause"+r)+" = 'then'; ":E="'then'",n+=" } ",d&&(n+=" else { ")):n+=" if (!"+C+") { ",d&&(l.schema=t.schema.else,l.schemaPath=t.schemaPath+".else",l.errSchemaPath=t.errSchemaPath+"/else",n+="  "+t.validate(l)+" ",l.baseId=Q,n+=" "+I+" = "+C+"; ",f&&d?n+=" var "+(E="ifClause"+r)+" = 'else'; ":E="'else'",n+=" } "),n+=" if (!"+I+") {   var err =   ",!1!==t.createErrors?(n+=" { keyword: 'if' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { failingKeyword: "+E+" } ",!1!==t.opts.messages&&(n+=" , message: 'should match \"' + "+E+" + '\" schema' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&g&&(t.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+=" }   ",g&&(n+=" else { "),n=t.util.cleanUpCode(n)}else g&&(n+=" if (true) { ");return n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="valid"+r,u="errs__"+r,l=t.util.copy(t),C="";l.level++;var h="valid"+l.level,B="i"+r,f=l.dataLevel=t.dataLevel+1,d="data"+f,Q=t.baseId;if(n+="var "+u+" = errors;var "+I+";",Array.isArray(o)){var E=t.schema.additionalItems;if(!1===E){n+=" "+I+" = "+c+".length <= "+o.length+"; ";var p=s;s=t.errSchemaPath+"/additionalItems",n+="  if (!"+I+") {   ";var y=y||[];y.push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { limit: "+o.length+" } ",!1!==t.opts.messages&&(n+=" , message: 'should NOT have more than "+o.length+" items' "),t.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var v=n;n=y.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+v+"]); ":n+=" validate.errors = ["+v+"]; return false; ":n+=" var err = "+v+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",s=p,g&&(C+="}",n+=" else { ")}var m=o;if(m)for(var b,F=-1,w=m.length-1;F<w;)if(b=m[F+=1],t.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0:t.util.schemaHasRules(b,t.RULES.all)){n+=" "+h+" = true; if ("+c+".length > "+F+") { ";var S=c+"["+F+"]";l.schema=b,l.schemaPath=a+"["+F+"]",l.errSchemaPath=s+"/"+F,l.errorPath=t.util.getPathExpr(t.errorPath,F,t.opts.jsonPointers,!0),l.dataPathArr[f]=F;var D=t.validate(l);l.baseId=Q,t.util.varOccurences(D,d)<2?n+=" "+t.util.varReplace(D,d,S)+" ":n+=" var "+d+" = "+S+"; "+D+" ",n+=" }  ",g&&(n+=" if ("+h+") { ",C+="}")}if("object"==typeof E&&(t.opts.strictKeywords?"object"==typeof E&&Object.keys(E).length>0:t.util.schemaHasRules(E,t.RULES.all))){l.schema=E,l.schemaPath=t.schemaPath+".additionalItems",l.errSchemaPath=t.errSchemaPath+"/additionalItems",n+=" "+h+" = true; if ("+c+".length > "+o.length+") {  for (var "+B+" = "+o.length+"; "+B+" < "+c+".length; "+B+"++) { ",l.errorPath=t.util.getPathExpr(t.errorPath,B,t.opts.jsonPointers,!0);S=c+"["+B+"]";l.dataPathArr[f]=B;D=t.validate(l);l.baseId=Q,t.util.varOccurences(D,d)<2?n+=" "+t.util.varReplace(D,d,S)+" ":n+=" var "+d+" = "+S+"; "+D+" ",g&&(n+=" if (!"+h+") break; "),n+=" } }  ",g&&(n+=" if ("+h+") { ",C+="}")}}else if(t.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:t.util.schemaHasRules(o,t.RULES.all)){l.schema=o,l.schemaPath=a,l.errSchemaPath=s,n+="  for (var "+B+" = 0; "+B+" < "+c+".length; "+B+"++) { ",l.errorPath=t.util.getPathExpr(t.errorPath,B,t.opts.jsonPointers,!0);S=c+"["+B+"]";l.dataPathArr[f]=B;D=t.validate(l);l.baseId=Q,t.util.varOccurences(D,d)<2?n+=" "+t.util.varReplace(D,d,S)+" ":n+=" var "+d+" = "+S+"; "+D+" ",g&&(n+=" if (!"+h+") break; "),n+=" }"}return g&&(n+=" "+C+" if ("+u+" == errors) {"),n=t.util.cleanUpCode(n)}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r=" ",i=t.level,o=t.dataLevel,a=t.schema[e],s=t.schemaPath+t.util.getProperty(e),g=t.errSchemaPath+"/"+e,c=!t.opts.allErrors,I="data"+(o||""),u=t.opts.$data&&a&&a.$data;u?(r+=" var schema"+i+" = "+t.util.getData(a.$data,o,t.dataPathArr)+"; ",n="schema"+i):n=a,r+="var division"+i+";if (",u&&(r+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),r+=" (division"+i+" = "+I+" / "+n+", ",t.opts.multipleOfPrecision?r+=" Math.abs(Math.round(division"+i+") - division"+i+") > 1e-"+t.opts.multipleOfPrecision+" ":r+=" division"+i+" !== parseInt(division"+i+") ",r+=" ) ",u&&(r+="  )  "),r+=" ) {   ";var l=l||[];l.push(r),r="",!1!==t.createErrors?(r+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: { multipleOf: "+n+" } ",!1!==t.opts.messages&&(r+=" , message: 'should be multiple of ",r+=u?"' + "+n:n+"'"),t.opts.verbose&&(r+=" , schema:  ",r+=u?"validate.schema"+s:""+a,r+="         , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),r+=" } "):r+=" {} ";var C=r;return r=l.pop(),!t.compositeRule&&c?t.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+="} ",c&&(r+=" else { "),r}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="errs__"+r,u=t.util.copy(t);u.level++;var l="valid"+u.level;if(t.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:t.util.schemaHasRules(o,t.RULES.all)){u.schema=o,u.schemaPath=a,u.errSchemaPath=s,n+=" var "+I+" = errors;  ";var C,h=t.compositeRule;t.compositeRule=u.compositeRule=!0,u.createErrors=!1,u.opts.allErrors&&(C=u.opts.allErrors,u.opts.allErrors=!1),n+=" "+t.validate(u)+" ",u.createErrors=!0,C&&(u.opts.allErrors=C),t.compositeRule=u.compositeRule=h,n+=" if ("+l+") {   ";var B=B||[];B.push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: {} ",!1!==t.opts.messages&&(n+=" , message: 'should NOT be valid' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var f=n;n=B.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+f+"]); ":n+=" validate.errors = ["+f+"]; return false; ":n+=" var err = "+f+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else {  errors = "+I+"; if (vErrors !== null) { if ("+I+") vErrors.length = "+I+"; else vErrors = null; } ",t.opts.allErrors&&(n+=" } ")}else n+="  var err =   ",!1!==t.createErrors?(n+=" { keyword: 'not' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: {} ",!1!==t.opts.messages&&(n+=" , message: 'should NOT be valid' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",g&&(n+=" if (false) { ");return n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="valid"+r,u="errs__"+r,l=t.util.copy(t),C="";l.level++;var h="valid"+l.level,B=l.baseId,f="prevValid"+r,d="passingSchemas"+r;n+="var "+u+" = errors , "+f+" = false , "+I+" = false , "+d+" = null; ";var Q=t.compositeRule;t.compositeRule=l.compositeRule=!0;var E=o;if(E)for(var p,y=-1,v=E.length-1;y<v;)p=E[y+=1],(t.opts.strictKeywords?"object"==typeof p&&Object.keys(p).length>0:t.util.schemaHasRules(p,t.RULES.all))?(l.schema=p,l.schemaPath=a+"["+y+"]",l.errSchemaPath=s+"/"+y,n+="  "+t.validate(l)+" ",l.baseId=B):n+=" var "+h+" = true; ",y&&(n+=" if ("+h+" && "+f+") { "+I+" = false; "+d+" = ["+d+", "+y+"]; } else { ",C+="}"),n+=" if ("+h+") { "+I+" = "+f+" = true; "+d+" = "+y+"; }";return t.compositeRule=l.compositeRule=Q,n+=C+"if (!"+I+") {   var err =   ",!1!==t.createErrors?(n+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { passingSchemas: "+d+" } ",!1!==t.opts.messages&&(n+=" , message: 'should match exactly one schema in oneOf' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&g&&(t.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),n+="} else {  errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; }",t.opts.allErrors&&(n+=" } "),n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r=" ",i=t.level,o=t.dataLevel,a=t.schema[e],s=t.schemaPath+t.util.getProperty(e),g=t.errSchemaPath+"/"+e,c=!t.opts.allErrors,I="data"+(o||""),u=t.opts.$data&&a&&a.$data;u?(r+=" var schema"+i+" = "+t.util.getData(a.$data,o,t.dataPathArr)+"; ",n="schema"+i):n=a,r+="if ( ",u&&(r+=" ("+n+" !== undefined && typeof "+n+" != 'string') || "),r+=" !"+(u?"(new RegExp("+n+"))":t.usePattern(a))+".test("+I+") ) {   ";var l=l||[];l.push(r),r="",!1!==t.createErrors?(r+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: { pattern:  ",r+=u?""+n:""+t.util.toQuotedString(a),r+="  } ",!1!==t.opts.messages&&(r+=" , message: 'should match pattern \"",r+=u?"' + "+n+" + '":""+t.util.escapeQuotes(a),r+="\"' "),t.opts.verbose&&(r+=" , schema:  ",r+=u?"validate.schema"+s:""+t.util.toQuotedString(a),r+="         , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),r+=" } "):r+=" {} ";var C=r;return r=l.pop(),!t.compositeRule&&c?t.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+="} ",c&&(r+=" else { "),r}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="errs__"+r,u=t.util.copy(t),l="";u.level++;var C="valid"+u.level,h="key"+r,B="idx"+r,f=u.dataLevel=t.dataLevel+1,d="data"+f,Q="dataProperties"+r,E=Object.keys(o||{}),p=t.schema.patternProperties||{},y=Object.keys(p),v=t.schema.additionalProperties,m=E.length||y.length,b=!1===v,F="object"==typeof v&&Object.keys(v).length,w=t.opts.removeAdditional,S=b||F||w,D=t.opts.ownProperties,R=t.baseId,U=t.schema.required;if(U&&(!t.opts.$data||!U.$data)&&U.length<t.opts.loopRequired)var G=t.util.toHash(U);if(n+="var "+I+" = errors;var "+C+" = true;",D&&(n+=" var "+Q+" = undefined;"),S){if(n+=D?" "+Q+" = "+Q+" || Object.keys("+c+"); for (var "+B+"=0; "+B+"<"+Q+".length; "+B+"++) { var "+h+" = "+Q+"["+B+"]; ":" for (var "+h+" in "+c+") { ",m){if(n+=" var isAdditional"+r+" = !(false ",E.length)if(E.length>8)n+=" || validate.schema"+a+".hasOwnProperty("+h+") ";else{var N=E;if(N)for(var k=-1,x=N.length-1;k<x;)K=N[k+=1],n+=" || "+h+" == "+t.util.toQuotedString(K)+" "}if(y.length){var O=y;if(O)for(var M=-1,L=O.length-1;M<L;)rt=O[M+=1],n+=" || "+t.usePattern(rt)+".test("+h+") "}n+=" ); if (isAdditional"+r+") { "}if("all"==w)n+=" delete "+c+"["+h+"]; ";else{var _=t.errorPath,J="' + "+h+" + '";if(t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(t.errorPath,h,t.opts.jsonPointers)),b)if(w)n+=" delete "+c+"["+h+"]; ";else{n+=" "+C+" = false; ";var T=s;s=t.errSchemaPath+"/additionalProperties",(et=et||[]).push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { additionalProperty: '"+J+"' } ",!1!==t.opts.messages&&(n+=" , message: '",t.opts._errorDataPathProperty?n+="is an invalid additional property":n+="should NOT have additional properties",n+="' "),t.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var j=n;n=et.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+j+"]); ":n+=" validate.errors = ["+j+"]; return false; ":n+=" var err = "+j+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s=T,g&&(n+=" break; ")}else if(F)if("failing"==w){n+=" var "+I+" = errors;  ";var H=t.compositeRule;t.compositeRule=u.compositeRule=!0,u.schema=v,u.schemaPath=t.schemaPath+".additionalProperties",u.errSchemaPath=t.errSchemaPath+"/additionalProperties",u.errorPath=t.opts._errorDataPathProperty?t.errorPath:t.util.getPathExpr(t.errorPath,h,t.opts.jsonPointers);var Y=c+"["+h+"]";u.dataPathArr[f]=h;var V=t.validate(u);u.baseId=R,t.util.varOccurences(V,d)<2?n+=" "+t.util.varReplace(V,d,Y)+" ":n+=" var "+d+" = "+Y+"; "+V+" ",n+=" if (!"+C+") { errors = "+I+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+c+"["+h+"]; }  ",t.compositeRule=u.compositeRule=H}else{u.schema=v,u.schemaPath=t.schemaPath+".additionalProperties",u.errSchemaPath=t.errSchemaPath+"/additionalProperties",u.errorPath=t.opts._errorDataPathProperty?t.errorPath:t.util.getPathExpr(t.errorPath,h,t.opts.jsonPointers);Y=c+"["+h+"]";u.dataPathArr[f]=h;V=t.validate(u);u.baseId=R,t.util.varOccurences(V,d)<2?n+=" "+t.util.varReplace(V,d,Y)+" ":n+=" var "+d+" = "+Y+"; "+V+" ",g&&(n+=" if (!"+C+") break; ")}t.errorPath=_}m&&(n+=" } "),n+=" }  ",g&&(n+=" if ("+C+") { ",l+="}")}var Z=t.opts.useDefaults&&!t.compositeRule;if(E.length){var W=E;if(W)for(var K,P=-1,q=W.length-1;P<q;){var X=o[K=W[P+=1]];if(t.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0:t.util.schemaHasRules(X,t.RULES.all)){var z=t.util.getProperty(K),$=(Y=c+z,Z&&void 0!==X.default);u.schema=X,u.schemaPath=a+z,u.errSchemaPath=s+"/"+t.util.escapeFragment(K),u.errorPath=t.util.getPath(t.errorPath,K,t.opts.jsonPointers),u.dataPathArr[f]=t.util.toQuotedString(K);V=t.validate(u);if(u.baseId=R,t.util.varOccurences(V,d)<2){V=t.util.varReplace(V,d,Y);var tt=Y}else{tt=d;n+=" var "+d+" = "+Y+"; "}if($)n+=" "+V+" ";else{if(G&&G[K]){n+=" if ( "+tt+" === undefined ",D&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(K)+"') "),n+=") { "+C+" = false; ";_=t.errorPath,T=s;var et,At=t.util.escapeQuotes(K);t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(_,K,t.opts.jsonPointers)),s=t.errSchemaPath+"/required",(et=et||[]).push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { missingProperty: '"+At+"' } ",!1!==t.opts.messages&&(n+=" , message: '",t.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+At+"\\'",n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";j=n;n=et.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+j+"]); ":n+=" validate.errors = ["+j+"]; return false; ":n+=" var err = "+j+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s=T,t.errorPath=_,n+=" } else { "}else g?(n+=" if ( "+tt+" === undefined ",D&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(K)+"') "),n+=") { "+C+" = true; } else { "):(n+=" if ("+tt+" !== undefined ",D&&(n+=" &&   Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(K)+"') "),n+=" ) { ");n+=" "+V+" } "}}g&&(n+=" if ("+C+") { ",l+="}")}}if(y.length){var nt=y;if(nt)for(var rt,it=-1,ot=nt.length-1;it<ot;){X=p[rt=nt[it+=1]];if(t.opts.strictKeywords?"object"==typeof X&&Object.keys(X).length>0:t.util.schemaHasRules(X,t.RULES.all)){u.schema=X,u.schemaPath=t.schemaPath+".patternProperties"+t.util.getProperty(rt),u.errSchemaPath=t.errSchemaPath+"/patternProperties/"+t.util.escapeFragment(rt),n+=D?" "+Q+" = "+Q+" || Object.keys("+c+"); for (var "+B+"=0; "+B+"<"+Q+".length; "+B+"++) { var "+h+" = "+Q+"["+B+"]; ":" for (var "+h+" in "+c+") { ",n+=" if ("+t.usePattern(rt)+".test("+h+")) { ",u.errorPath=t.util.getPathExpr(t.errorPath,h,t.opts.jsonPointers);Y=c+"["+h+"]";u.dataPathArr[f]=h;V=t.validate(u);u.baseId=R,t.util.varOccurences(V,d)<2?n+=" "+t.util.varReplace(V,d,Y)+" ":n+=" var "+d+" = "+Y+"; "+V+" ",g&&(n+=" if (!"+C+") break; "),n+=" } ",g&&(n+=" else "+C+" = true; "),n+=" }  ",g&&(n+=" if ("+C+") { ",l+="}")}}}return g&&(n+=" "+l+" if ("+I+" == errors) {"),n=t.util.cleanUpCode(n)}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="errs__"+r,u=t.util.copy(t);u.level++;var l="valid"+u.level;if(n+="var "+I+" = errors;",t.opts.strictKeywords?"object"==typeof o&&Object.keys(o).length>0:t.util.schemaHasRules(o,t.RULES.all)){u.schema=o,u.schemaPath=a,u.errSchemaPath=s;var C="key"+r,h="idx"+r,B="i"+r,f="' + "+C+" + '",d="data"+(u.dataLevel=t.dataLevel+1),Q="dataProperties"+r,E=t.opts.ownProperties,p=t.baseId;E&&(n+=" var "+Q+" = undefined; "),n+=E?" "+Q+" = "+Q+" || Object.keys("+c+"); for (var "+h+"=0; "+h+"<"+Q+".length; "+h+"++) { var "+C+" = "+Q+"["+h+"]; ":" for (var "+C+" in "+c+") { ",n+=" var startErrs"+r+" = errors; ";var y=C,v=t.compositeRule;t.compositeRule=u.compositeRule=!0;var m=t.validate(u);u.baseId=p,t.util.varOccurences(m,d)<2?n+=" "+t.util.varReplace(m,d,y)+" ":n+=" var "+d+" = "+y+"; "+m+" ",t.compositeRule=u.compositeRule=v,n+=" if (!"+l+") { for (var "+B+"=startErrs"+r+"; "+B+"<errors; "+B+"++) { vErrors["+B+"].propertyName = "+C+"; }   var err =   ",!1!==t.createErrors?(n+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { propertyName: '"+f+"' } ",!1!==t.opts.messages&&(n+=" , message: 'property name \\'"+f+"\\' is invalid' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&g&&(t.async?n+=" throw new ValidationError(vErrors); ":n+=" validate.errors = vErrors; return false; "),g&&(n+=" break; "),n+=" } }"}return g&&(n+="  if ("+I+" == errors) {"),n=t.util.cleanUpCode(n)}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n=" ",r=t.level,i=t.dataLevel,o=t.schema[e],a=t.schemaPath+t.util.getProperty(e),s=t.errSchemaPath+"/"+e,g=!t.opts.allErrors,c="data"+(i||""),I="valid"+r,u=t.opts.$data&&o&&o.$data;u&&(n+=" var schema"+r+" = "+t.util.getData(o.$data,i,t.dataPathArr)+"; ");var l="schema"+r;if(!u)if(o.length<t.opts.loopRequired&&t.schema.properties&&Object.keys(t.schema.properties).length){var C=[],h=o;if(h)for(var B,f=-1,d=h.length-1;f<d;){B=h[f+=1];var Q=t.schema.properties[B];Q&&(t.opts.strictKeywords?"object"==typeof Q&&Object.keys(Q).length>0:t.util.schemaHasRules(Q,t.RULES.all))||(C[C.length]=B)}}else C=o;if(u||C.length){var E=t.errorPath,p=u||C.length>=t.opts.loopRequired,y=t.opts.ownProperties;if(g)if(n+=" var missing"+r+"; ",p){u||(n+=" var "+l+" = validate.schema"+a+"; ");var v="' + "+(D="schema"+r+"["+(F="i"+r)+"]")+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(E,D,t.opts.jsonPointers)),n+=" var "+I+" = true; ",u&&(n+=" if (schema"+r+" === undefined) "+I+" = true; else if (!Array.isArray(schema"+r+")) "+I+" = false; else {"),n+=" for (var "+F+" = 0; "+F+" < "+l+".length; "+F+"++) { "+I+" = "+c+"["+l+"["+F+"]] !== undefined ",y&&(n+=" &&   Object.prototype.hasOwnProperty.call("+c+", "+l+"["+F+"]) "),n+="; if (!"+I+") break; } ",u&&(n+="  }  "),n+="  if (!"+I+") {   ",(S=S||[]).push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { missingProperty: '"+v+"' } ",!1!==t.opts.messages&&(n+=" , message: '",t.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+v+"\\'",n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";var m=n;n=S.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else{n+=" if ( ";var b=C;if(b)for(var F=-1,w=b.length-1;F<w;){U=b[F+=1],F&&(n+=" || "),n+=" ( ( "+(x=c+(k=t.util.getProperty(U)))+" === undefined ",y&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(U)+"') "),n+=") && (missing"+r+" = "+t.util.toQuotedString(t.opts.jsonPointers?U:k)+") ) "}n+=") {  ";var S;v="' + "+(D="missing"+r)+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.opts.jsonPointers?t.util.getPathExpr(E,D,!0):E+" + "+D),(S=S||[]).push(n),n="",!1!==t.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { missingProperty: '"+v+"' } ",!1!==t.opts.messages&&(n+=" , message: '",t.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+v+"\\'",n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ";m=n;n=S.pop(),!t.compositeRule&&g?t.async?n+=" throw new ValidationError(["+m+"]); ":n+=" validate.errors = ["+m+"]; return false; ":n+=" var err = "+m+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { "}else if(p){u||(n+=" var "+l+" = validate.schema"+a+"; ");var D;v="' + "+(D="schema"+r+"["+(F="i"+r)+"]")+" + '";t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPathExpr(E,D,t.opts.jsonPointers)),u&&(n+=" if ("+l+" && !Array.isArray("+l+")) {  var err =   ",!1!==t.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { missingProperty: '"+v+"' } ",!1!==t.opts.messages&&(n+=" , message: '",t.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+v+"\\'",n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+l+" !== undefined) { "),n+=" for (var "+F+" = 0; "+F+" < "+l+".length; "+F+"++) { if ("+c+"["+l+"["+F+"]] === undefined ",y&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+l+"["+F+"]) "),n+=") {  var err =   ",!1!==t.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { missingProperty: '"+v+"' } ",!1!==t.opts.messages&&(n+=" , message: '",t.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+v+"\\'",n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",u&&(n+="  }  ")}else{var R=C;if(R)for(var U,G=-1,N=R.length-1;G<N;){U=R[G+=1];var k=t.util.getProperty(U),x=(v=t.util.escapeQuotes(U),c+k);t.opts._errorDataPathProperty&&(t.errorPath=t.util.getPath(E,U,t.opts.jsonPointers)),n+=" if ( "+x+" === undefined ",y&&(n+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+t.util.escapeQuotes(U)+"') "),n+=") {  var err =   ",!1!==t.createErrors?(n+=" { keyword: 'required' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(s)+" , params: { missingProperty: '"+v+"' } ",!1!==t.opts.messages&&(n+=" , message: '",t.opts._errorDataPathProperty?n+="is a required property":n+="should have required property \\'"+v+"\\'",n+="' "),t.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+c+" "),n+=" } "):n+=" {} ",n+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}t.errorPath=E}else g&&(n+=" if (true) {");return n}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r=" ",i=t.level,o=t.dataLevel,a=t.schema[e],s=t.schemaPath+t.util.getProperty(e),g=t.errSchemaPath+"/"+e,c=!t.opts.allErrors,I="data"+(o||""),u="valid"+i,l=t.opts.$data&&a&&a.$data;if(l?(r+=" var schema"+i+" = "+t.util.getData(a.$data,o,t.dataPathArr)+"; ",n="schema"+i):n=a,(a||l)&&!1!==t.opts.uniqueItems){l&&(r+=" var "+u+"; if ("+n+" === false || "+n+" === undefined) "+u+" = true; else if (typeof "+n+" != 'boolean') "+u+" = false; else { "),r+=" var i = "+I+".length , "+u+" = true , j; if (i > 1) { ";var C=t.schema.items&&t.schema.items.type,h=Array.isArray(C);if(!C||"object"==C||"array"==C||h&&(C.indexOf("object")>=0||C.indexOf("array")>=0))r+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+I+"[i], "+I+"[j])) { "+u+" = false; break outer; } } } ";else{r+=" var itemIndices = {}, item; for (;i--;) { var item = "+I+"[i]; ";var B="checkDataType"+(h?"s":"");r+=" if ("+t.util[B](C,"item",!0)+") continue; ",h&&(r+=" if (typeof item == 'string') item = '\"' + item; "),r+=" if (typeof itemIndices[item] == 'number') { "+u+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}r+=" } ",l&&(r+="  }  "),r+=" if (!"+u+") {   ";var f=f||[];f.push(r),r="",!1!==t.createErrors?(r+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(g)+" , params: { i: i, j: j } ",!1!==t.opts.messages&&(r+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),t.opts.verbose&&(r+=" , schema:  ",r+=l?"validate.schema"+s:""+a,r+="         , parentSchema: validate.schema"+t.schemaPath+" , data: "+I+" "),r+=" } "):r+=" {} ";var d=r;r=f.pop(),!t.compositeRule&&c?t.async?r+=" throw new ValidationError(["+d+"]); ":r+=" validate.errors = ["+d+"]; return false; ":r+=" var err = "+d+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { ")}else c&&(r+=" if (true) { ");return r}},function(t,e,A){"use strict";var n=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];t.exports=function(t,e){for(var A=0;A<e.length;A++){t=JSON.parse(JSON.stringify(t));var r,i=e[A].split("/"),o=t;for(r=1;r<i.length;r++)o=o[i[r]];for(r=0;r<n.length;r++){var a=n[r],s=o[a];s&&(o[a]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]})}}return t}},function(t,e,A){"use strict";var n=A(910).MissingRef;t.exports=function t(e,A,r){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof A&&(r=A,A=void 0);var o=a(e).then((function(){var t=i._addSchema(e,void 0,A);return t.validate||function t(e){try{return i._compile(e)}catch(o){if(o instanceof n)return r(o);throw o}function r(n){var r=n.missingSchema;if(g(r))throw new Error("Schema "+r+" is loaded but "+n.missingRef+" cannot be resolved");var o=i._loadingSchemas[r];return o||(o=i._loadingSchemas[r]=i._opts.loadSchema(r)).then(s,s),o.then((function(t){if(!g(r))return a(t).then((function(){g(r)||i.addSchema(t,r,void 0,A)}))})).then((function(){return t(e)}));function s(){delete i._loadingSchemas[r]}function g(t){return i._refs[t]||i._schemas[t]}}}(t)}));r&&o.then((function(t){r(null,t)}),r);return o;function a(e){var A=e.$schema;return A&&!i.getSchema(A)?t.call(i,{$ref:A},!0):Promise.resolve()}}},function(t,e,A){"use strict";var n=/^[a-z_$][a-z0-9_$-]*$/i,r=A(1199),i=A(1200);t.exports={add:function(t,e){var A=this.RULES;if(A.keywords[t])throw new Error("Keyword "+t+" is already defined");if(!n.test(t))throw new Error("Keyword "+t+" is not a valid identifier");if(e){this.validateKeyword(e,!0);var i=e.type;if(Array.isArray(i))for(var o=0;o<i.length;o++)s(t,i[o],e);else s(t,i,e);var a=e.metaSchema;a&&(e.$data&&this._opts.$data&&(a={anyOf:[a,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#"}]}),e.validateSchema=this.compile(a,!0))}function s(t,e,n){for(var i,o=0;o<A.length;o++){var a=A[o];if(a.type==e){i=a;break}}i||(i={type:e,rules:[]},A.push(i));var s={keyword:t,definition:n,custom:!0,code:r,implements:n.implements};i.rules.push(s),A.custom[t]=s}return A.keywords[t]=A.all[t]=!0,this},get:function(t){var e=this.RULES.custom[t];return e?e.definition:this.RULES.keywords[t]||!1},remove:function(t){var e=this.RULES;delete e.keywords[t],delete e.all[t],delete e.custom[t];for(var A=0;A<e.length;A++)for(var n=e[A].rules,r=0;r<n.length;r++)if(n[r].keyword==t){n.splice(r,1);break}return this},validate:function t(e,A){t.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(i,!0);if(n(e))return!0;if(t.errors=n.errors,A)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}}},function(t,e,A){"use strict";t.exports=function(t,e,A){var n,r,i=" ",o=t.level,a=t.dataLevel,s=t.schema[e],g=t.schemaPath+t.util.getProperty(e),c=t.errSchemaPath+"/"+e,I=!t.opts.allErrors,u="data"+(a||""),l="valid"+o,C="errs__"+o,h=t.opts.$data&&s&&s.$data;h?(i+=" var schema"+o+" = "+t.util.getData(s.$data,a,t.dataPathArr)+"; ",r="schema"+o):r=s;var B,f,d,Q,E,p="definition"+o,y=this.definition,v="";if(h&&y.$data){E="keywordValidate"+o;var m=y.validateSchema;i+=" var "+p+" = RULES.custom['"+e+"'].definition; var "+E+" = "+p+".validate;"}else{if(!(Q=t.useCustomRule(this,s,t.schema,t)))return;r="validate.schema"+g,E=Q.code,B=y.compile,f=y.inline,d=y.macro}var b=E+".errors",F="i"+o,w="ruleErr"+o,S=y.async;if(S&&!t.async)throw new Error("async keyword in sync schema");if(f||d||(i+=b+" = null;"),i+="var "+C+" = errors;var "+l+";",h&&y.$data&&(v+="}",i+=" if ("+r+" === undefined) { "+l+" = true; } else { ",m&&(v+="}",i+=" "+l+" = "+p+".validateSchema("+r+"); if ("+l+") { ")),f)y.statements?i+=" "+Q.validate+" ":i+=" "+l+" = "+Q.validate+"; ";else if(d){var D=t.util.copy(t);v="";D.level++;var R="valid"+D.level;D.schema=Q.validate,D.schemaPath="";var U=t.compositeRule;t.compositeRule=D.compositeRule=!0;var G=t.validate(D).replace(/validate\.schema/g,E);t.compositeRule=D.compositeRule=U,i+=" "+G}else{(O=O||[]).push(i),i="",i+="  "+E+".call( ",t.opts.passContext?i+="this":i+="self",B||!1===y.schema?i+=" , "+u+" ":i+=" , "+r+" , "+u+" , validate.schema"+t.schemaPath+" ",i+=" , (dataPath || '')",'""'!=t.errorPath&&(i+=" + "+t.errorPath);var N=a?"data"+(a-1||""):"parentData",k=a?t.dataPathArr[a]:"parentDataProperty",x=i+=" , "+N+" , "+k+" , rootData )  ";i=O.pop(),!1===y.errors?(i+=" "+l+" = ",S&&(i+="await "),i+=x+"; "):i+=S?" var "+(b="customErrors"+o)+" = null; try { "+l+" = await "+x+"; } catch (e) { "+l+" = false; if (e instanceof ValidationError) "+b+" = e.errors; else throw e; } ":" "+b+" = null; "+l+" = "+x+"; "}if(y.modifying&&(i+=" if ("+N+") "+u+" = "+N+"["+k+"];"),i+=""+v,y.valid)I&&(i+=" if (true) { ");else{var O;i+=" if ( ",void 0===y.valid?(i+=" !",i+=d?""+R:""+l):i+=" "+!y.valid+" ",i+=") { ",n=this.keyword,(O=O||[]).push(i),i="",(O=O||[]).push(i),i="",!1!==t.createErrors?(i+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==t.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),t.opts.verbose&&(i+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var M=i;i=O.pop(),!t.compositeRule&&I?t.async?i+=" throw new ValidationError(["+M+"]); ":i+=" validate.errors = ["+M+"]; return false; ":i+=" var err = "+M+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var L=i;i=O.pop(),f?y.errors?"full"!=y.errors&&(i+="  for (var "+F+"="+C+"; "+F+"<errors; "+F+"++) { var "+w+" = vErrors["+F+"]; if ("+w+".dataPath === undefined) "+w+".dataPath = (dataPath || '') + "+t.errorPath+"; if ("+w+".schemaPath === undefined) { "+w+'.schemaPath = "'+c+'"; } ',t.opts.verbose&&(i+=" "+w+".schema = "+r+"; "+w+".data = "+u+"; "),i+=" } "):!1===y.errors?i+=" "+L+" ":(i+=" if ("+C+" == errors) { "+L+" } else {  for (var "+F+"="+C+"; "+F+"<errors; "+F+"++) { var "+w+" = vErrors["+F+"]; if ("+w+".dataPath === undefined) "+w+".dataPath = (dataPath || '') + "+t.errorPath+"; if ("+w+".schemaPath === undefined) { "+w+'.schemaPath = "'+c+'"; } ',t.opts.verbose&&(i+=" "+w+".schema = "+r+"; "+w+".data = "+u+"; "),i+=" } } "):d?(i+="   var err =   ",!1!==t.createErrors?(i+=" { keyword: '"+(n||"custom")+"' , dataPath: (dataPath || '') + "+t.errorPath+" , schemaPath: "+t.util.toQuotedString(c)+" , params: { keyword: '"+this.keyword+"' } ",!1!==t.opts.messages&&(i+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),t.opts.verbose&&(i+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+t.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",i+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!t.compositeRule&&I&&(t.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):!1===y.errors?i+=" "+L+" ":(i+=" if (Array.isArray("+b+")) { if (vErrors === null) vErrors = "+b+"; else vErrors = vErrors.concat("+b+"); errors = vErrors.length;  for (var "+F+"="+C+"; "+F+"<errors; "+F+"++) { var "+w+" = vErrors["+F+"]; if ("+w+".dataPath === undefined) "+w+".dataPath = (dataPath || '') + "+t.errorPath+";  "+w+'.schemaPath = "'+c+'";  ',t.opts.verbose&&(i+=" "+w+".schema = "+r+"; "+w+".data = "+u+"; "),i+=" } } else { "+L+" } "),i+=" } ",I&&(i+=" else { ")}return i}},function(t,e,A){"use strict";var n=A(1066);t.exports={$id:"https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:n.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:n.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(t){t.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(t,e,A){var n=A(538),r=A(1067),i=A(1068),o=A(1203),a=A(1204),s=A(1069),g=A(1070),c=A(1207),I=A(1208),u=A(584),l=A(1209),C=A(541),h=A(1210),B=A(1211),f=A(1073),d=A(212),Q=A(425),E=A(1216),p=A(201),y=A(1218),v=A(449),m={};m["[object Arguments]"]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object DataView]"]=m["[object Boolean]"]=m["[object Date]"]=m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Map]"]=m["[object Number]"]=m["[object Object]"]=m["[object RegExp]"]=m["[object Set]"]=m["[object String]"]=m["[object Symbol]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m["[object Error]"]=m["[object Function]"]=m["[object WeakMap]"]=!1,t.exports=function t(e,A,b,F,w,S){var D,R=1&A,U=2&A,G=4&A;if(b&&(D=w?b(e,F,w,S):b(e)),void 0!==D)return D;if(!p(e))return e;var N=d(e);if(N){if(D=h(e),!R)return g(e,D)}else{var k=C(e),x="[object Function]"==k||"[object GeneratorFunction]"==k;if(Q(e))return s(e,R);if("[object Object]"==k||"[object Arguments]"==k||x&&!w){if(D=U||x?{}:f(e),!R)return U?I(e,a(D,e)):c(e,o(D,e))}else{if(!m[k])return w?e:{};D=B(e,k,R)}}S||(S=new n);var O=S.get(e);if(O)return O;S.set(e,D),y(e)?e.forEach((function(n){D.add(t(n,A,b,n,e,S))})):E(e)&&e.forEach((function(n,r){D.set(r,t(n,A,b,r,e,S))}));var M=G?U?l:u:U?keysIn:v,L=N?void 0:M(e);return r(L||e,(function(n,r){L&&(n=e[r=n]),i(D,r,t(n,A,b,r,e,S))})),D}},function(t,e,A){var n=A(790),r=A(449);t.exports=function(t,e){return t&&n(e,r(e),t)}},function(t,e,A){var n=A(790),r=A(809);t.exports=function(t,e){return t&&n(e,r(e),t)}},function(t,e,A){var n=A(201),r=A(556),i=A(1206),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=r(t),A=[];for(var a in t)("constructor"!=a||!e&&o.call(t,a))&&A.push(a);return A}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var A in Object(t))e.push(A);return e}},function(t,e,A){var n=A(790),r=A(554);t.exports=function(t,e){return n(t,r(t),e)}},function(t,e,A){var n=A(790),r=A(1071);t.exports=function(t,e){return n(t,r(t),e)}},function(t,e,A){var n=A(585),r=A(1071),i=A(809);t.exports=function(t){return n(t,i,r)}},function(t,e){var A=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&A.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},function(t,e,A){var n=A(914),r=A(1212),i=A(1213),o=A(1214),a=A(1072);t.exports=function(t,e,A){var s=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return r(t,A);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 a(t,A);case"[object Map]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return i(t);case"[object Set]":return new s;case"[object Symbol]":return o(t)}}},function(t,e,A){var n=A(914);t.exports=function(t,e){var A=e?n(t.buffer):t.buffer;return new t.constructor(A,t.byteOffset,t.byteLength)}},function(t,e){var A=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,A.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,A){var n=A(337),r=n?n.prototype:void 0,i=r?r.valueOf:void 0;t.exports=function(t){return i?Object(i.call(t)):{}}},function(t,e,A){var n=A(201),r=Object.create,i=function(){function t(){}return function(e){if(!n(e))return{};if(r)return r(e);t.prototype=e;var A=new t;return t.prototype=void 0,A}}();t.exports=i},function(t,e,A){var n=A(1217),r=A(540),i=A(555),o=i&&i.isMap,a=o?r(o):n;t.exports=a},function(t,e,A){var n=A(541),r=A(207);t.exports=function(t){return r(t)&&"[object Map]"==n(t)}},function(t,e,A){var n=A(1219),r=A(540),i=A(555),o=i&&i.isSet,a=o?r(o):n;t.exports=a},function(t,e,A){var n=A(541),r=A(207);t.exports=function(t){return r(t)&&"[object Set]"==n(t)}},function(t,e){function A(e,n){return t.exports=A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(e,n)}t.exports=A},function(t,e){t.exports=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,A=new Array(t.length);e<t.length;e++)A[e]=t[e];return A}}},function(t,e){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,A){var n=A(337),r=A(539),i=A(212),o=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||r(t)||!!(o&&t&&t[o])}},function(t,e,A){var n=A(550),r=A(1081),i=A(1082),o=A(551),a=A(1234),s=A(552);t.exports=function(t,e,A){var g=-1,c=r,I=t.length,u=!0,l=[],C=l;if(A)u=!1,c=i;else if(I>=200){var h=e?null:a(t);if(h)return s(h);u=!1,c=o,C=new n}else C=e?[]:l;t:for(;++g<I;){var B=t[g],f=e?e(B):B;if(B=A||0!==B?B:0,u&&f===f){for(var d=C.length;d--;)if(C[d]===f)continue t;e&&C.push(f),l.push(B)}else c(C,f,A)||(C!==l&&C.push(f),l.push(B))}return l}},function(t,e,A){var n=A(1231),r=A(1232),i=A(1233);t.exports=function(t,e,A){return e===e?i(t,e,A):n(t,r,A)}},function(t,e){t.exports=function(t,e,A,n){for(var r=t.length,i=A+(n?1:-1);n?i--:++i<r;)if(e(t[i],i,t))return i;return-1}},function(t,e){t.exports=function(t){return t!==t}},function(t,e){t.exports=function(t,e,A){for(var n=A-1,r=t.length;++n<r;)if(t[n]===e)return n;return-1}},function(t,e,A){var n=A(589),r=A(1235),i=A(552),o=n&&1/i(new n([,-0]))[1]==1/0?function(t){return new n(t)}:r;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,A){var n=A(550),r=A(1081),i=A(1082),o=A(862),a=A(540),s=A(551);t.exports=function(t,e,A,g){var c=-1,I=r,u=!0,l=t.length,C=[],h=e.length;if(!l)return C;A&&(e=o(e,a(A))),g?(I=i,u=!1):e.length>=200&&(I=s,u=!1,e=new n(e));t:for(;++c<l;){var B=t[c],f=null==A?B:A(B);if(B=g||0!==B?B:0,u&&f===f){for(var d=h;d--;)if(e[d]===f)continue t;C.push(B)}else I(e,f,g)||C.push(B)}return C}},function(t,e,A){t.exports={default:A(1238),__esModule:!0}},function(t,e,A){A(1239),t.exports=A(560).Object.assign},function(t,e,A){var n=A(723);n(n.S+n.F,"Object",{assign:A(1241)})},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,A){"use strict";var n=A(561),r=A(811),i=A(921),o=A(814),a=A(922),s=A(1087),g=Object.assign;t.exports=!g||A(792)((function(){var t={},e={},A=Symbol(),n="abcdefghijklmnopqrst";return t[A]=7,n.split("").forEach((function(t){e[t]=t})),7!=g({},t)[A]||Object.keys(g({},e)).join("")!=n}))?function(t,e){for(var A=a(t),g=arguments.length,c=1,I=i.f,u=o.f;g>c;)for(var l,C=s(arguments[c++]),h=I?r(C).concat(I(C)):r(C),B=h.length,f=0;B>f;)l=h[f++],n&&!u.call(C,l)||(A[l]=C[l]);return A}:g},function(t,e,A){var n=A(726),r=A(1243),i=A(1244);t.exports=function(t){return function(e,A,o){var a,s=n(e),g=r(s.length),c=i(o,g);if(t&&A!=A){for(;g>c;)if((a=s[c++])!=a)return!0}else for(;g>c;c++)if((t||c in s)&&s[c]===A)return t||c||0;return!t&&-1}}},function(t,e,A){var n=A(917),r=Math.min;t.exports=function(t){return t>0?r(n(t),9007199254740991):0}},function(t,e,A){var n=A(917),r=Math.max,i=Math.min;t.exports=function(t,e){return(t=n(t))<0?r(t+e,0):i(t,e)}},function(t,e,A){A(1246);var n=A(560).Object;t.exports=function(t,e,A){return n.defineProperty(t,e,A)}},function(t,e,A){var n=A(723);n(n.S+n.F*!A(561),"Object",{defineProperty:A(590).f})},function(t,e,A){t.exports={default:A(1248),__esModule:!0}},function(t,e,A){A(1249),A(1255),t.exports=A(926).f("iterator")},function(t,e,A){"use strict";var n=A(1250)(!0);A(1091)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,A=this._i;return A>=e.length?{value:void 0,done:!0}:(t=n(e,A),this._i+=t.length,{value:t,done:!1})}))},function(t,e,A){var n=A(917),r=A(916);t.exports=function(t){return function(e,A){var i,o,a=String(r(e)),s=n(A),g=a.length;return s<0||s>=g?t?"":void 0:(i=a.charCodeAt(s))<55296||i>56319||s+1===g||(o=a.charCodeAt(s+1))<56320||o>57343?t?a.charAt(s):i:t?a.slice(s,s+2):o-56320+(i-55296<<10)+65536}}},function(t,e,A){"use strict";var n=A(924),r=A(810),i=A(925),o={};A(724)(o,A(727)("iterator"),(function(){return this})),t.exports=function(t,e,A){t.prototype=n(o,{next:r(1,A)}),i(t,e+" Iterator")}},function(t,e,A){var n=A(590),r=A(791),i=A(811);t.exports=A(561)?Object.defineProperties:function(t,e){r(t);for(var A,o=i(e),a=o.length,s=0;a>s;)n.f(t,A=o[s++],e[A]);return t}},function(t,e,A){var n=A(559).document;t.exports=n&&n.documentElement},function(t,e,A){var n=A(591),r=A(922),i=A(918)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),n(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,A){A(1256);for(var n=A(559),r=A(724),i=A(923),o=A(727)("toStringTag"),a="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(","),s=0;s<a.length;s++){var g=a[s],c=n[g],I=c&&c.prototype;I&&!I[o]&&r(I,o,g),i[g]=i.Array}},function(t,e,A){"use strict";var n=A(1257),r=A(1258),i=A(923),o=A(726);t.exports=A(1091)(Array,"Array",(function(t,e){this._t=o(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,A=this._i++;return!t||A>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?A:"values"==e?t[A]:[A,t[A]])}),"values"),i.Arguments=i.Array,n("keys"),n("values"),n("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,A){t.exports={default:A(1260),__esModule:!0}},function(t,e,A){A(1261),A(1266),A(1267),A(1268),t.exports=A(560).Symbol},function(t,e,A){"use strict";var n=A(559),r=A(591),i=A(561),o=A(723),a=A(1092),s=A(1262).KEY,g=A(792),c=A(919),I=A(925),u=A(813),l=A(727),C=A(926),h=A(927),B=A(1263),f=A(1264),d=A(791),Q=A(725),E=A(922),p=A(726),y=A(915),v=A(810),m=A(924),b=A(1265),F=A(1094),w=A(921),S=A(590),D=A(811),R=F.f,U=S.f,G=b.f,N=n.Symbol,k=n.JSON,x=k&&k.stringify,O=l("_hidden"),M=l("toPrimitive"),L={}.propertyIsEnumerable,_=c("symbol-registry"),J=c("symbols"),T=c("op-symbols"),j=Object.prototype,H="function"==typeof N&&!!w.f,Y=n.QObject,V=!Y||!Y.prototype||!Y.prototype.findChild,Z=i&&g((function(){return 7!=m(U({},"a",{get:function(){return U(this,"a",{value:7}).a}})).a}))?function(t,e,A){var n=R(j,e);n&&delete j[e],U(t,e,A),n&&t!==j&&U(j,e,n)}:U,W=function(t){var e=J[t]=m(N.prototype);return e._k=t,e},K=H&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},P=function(t,e,A){return t===j&&P(T,e,A),d(t),e=y(e,!0),d(A),r(J,e)?(A.enumerable?(r(t,O)&&t[O][e]&&(t[O][e]=!1),A=m(A,{enumerable:v(0,!1)})):(r(t,O)||U(t,O,v(1,{})),t[O][e]=!0),Z(t,e,A)):U(t,e,A)},q=function(t,e){d(t);for(var A,n=B(e=p(e)),r=0,i=n.length;i>r;)P(t,A=n[r++],e[A]);return t},X=function(t){var e=L.call(this,t=y(t,!0));return!(this===j&&r(J,t)&&!r(T,t))&&(!(e||!r(this,t)||!r(J,t)||r(this,O)&&this[O][t])||e)},z=function(t,e){if(t=p(t),e=y(e,!0),t!==j||!r(J,e)||r(T,e)){var A=R(t,e);return!A||!r(J,e)||r(t,O)&&t[O][e]||(A.enumerable=!0),A}},$=function(t){for(var e,A=G(p(t)),n=[],i=0;A.length>i;)r(J,e=A[i++])||e==O||e==s||n.push(e);return n},tt=function(t){for(var e,A=t===j,n=G(A?T:p(t)),i=[],o=0;n.length>o;)!r(J,e=n[o++])||A&&!r(j,e)||i.push(J[e]);return i};H||(a((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=u(arguments.length>0?arguments[0]:void 0),e=function e(A){this===j&&e.call(T,A),r(this,O)&&r(this[O],t)&&(this[O][t]=!1),Z(this,t,v(1,A))};return i&&V&&Z(j,t,{configurable:!0,set:e}),W(t)}).prototype,"toString",(function(){return this._k})),F.f=z,S.f=P,A(1093).f=b.f=$,A(814).f=X,w.f=tt,i&&!A(812)&&a(j,"propertyIsEnumerable",X,!0),C.f=function(t){return W(l(t))}),o(o.G+o.W+o.F*!H,{Symbol:N});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),At=0;et.length>At;)l(et[At++]);for(var nt=D(l.store),rt=0;nt.length>rt;)h(nt[rt++]);o(o.S+o.F*!H,"Symbol",{for:function(t){return r(_,t+="")?_[t]:_[t]=N(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in _)if(_[e]===t)return e},useSetter:function(){V=!0},useSimple:function(){V=!1}}),o(o.S+o.F*!H,"Object",{create:function(t,e){return void 0===e?m(t):q(m(t),e)},defineProperty:P,defineProperties:q,getOwnPropertyDescriptor:z,getOwnPropertyNames:$,getOwnPropertySymbols:tt});var it=g((function(){w.f(1)}));o(o.S+o.F*it,"Object",{getOwnPropertySymbols:function(t){return w.f(E(t))}}),k&&o(o.S+o.F*(!H||g((function(){var t=N();return"[null]"!=x([t])||"{}"!=x({a:t})||"{}"!=x(Object(t))}))),"JSON",{stringify:function(t){for(var e,A,n=[t],r=1;arguments.length>r;)n.push(arguments[r++]);if(A=e=n[1],(Q(e)||void 0!==t)&&!K(t))return f(e)||(e=function(t,e){if("function"==typeof A&&(e=A.call(this,t,e)),!K(e))return e}),n[1]=e,x.apply(k,n)}}),N.prototype[M]||A(724)(N.prototype,M,N.prototype.valueOf),I(N,"Symbol"),I(Math,"Math",!0),I(n.JSON,"JSON",!0)},function(t,e,A){var n=A(813)("meta"),r=A(725),i=A(591),o=A(590).f,a=0,s=Object.isExtensible||function(){return!0},g=!A(792)((function(){return s(Object.preventExtensions({}))})),c=function(t){o(t,n,{value:{i:"O"+ ++a,w:{}}})},I=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,n)){if(!s(t))return"F";if(!e)return"E";c(t)}return t[n].i},getWeak:function(t,e){if(!i(t,n)){if(!s(t))return!0;if(!e)return!1;c(t)}return t[n].w},onFreeze:function(t){return g&&I.NEED&&s(t)&&!i(t,n)&&c(t),t}}},function(t,e,A){var n=A(811),r=A(921),i=A(814);t.exports=function(t){var e=n(t),A=r.f;if(A)for(var o,a=A(t),s=i.f,g=0;a.length>g;)s.call(t,o=a[g++])&&e.push(o);return e}},function(t,e,A){var n=A(1088);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,A){var n=A(726),r=A(1093).f,i={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return o&&"[object Window]"==i.call(t)?function(t){try{return r(t)}catch(e){return o.slice()}}(t):r(n(t))}},function(t,e){},function(t,e,A){A(927)("asyncIterator")},function(t,e,A){A(927)("observable")},function(t,e,A){t.exports={default:A(1270),__esModule:!0}},function(t,e,A){A(1271),t.exports=A(560).Object.setPrototypeOf},function(t,e,A){var n=A(723);n(n.S,"Object",{setPrototypeOf:A(1272).set})},function(t,e,A){var n=A(725),r=A(791),i=function(t,e){if(r(t),!n(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,n){try{(n=A(1083)(Function.call,A(1094).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(r){e=!0}return function(t,A){return i(t,A),e?t.__proto__=A:n(t,A),t}}({},!1):void 0),check:i}},function(t,e,A){t.exports={default:A(1274),__esModule:!0}},function(t,e,A){A(1275);var n=A(560).Object;t.exports=function(t,e){return n.create(t,e)}},function(t,e,A){var n=A(723);n(n.S,"Object",{create:A(924)})},function(t,e,A){(function(e){(function(){var A,n,r,i,o,a;"undefined"!==typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!==typeof e&&null!==e&&e.hrtime?(t.exports=function(){return(A()-o)/1e6},n=e.hrtime,i=(A=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*e.uptime(),o=i-a):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)}).call(this,A(62))},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlphaPicker=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},r=s(A(0)),i=s(A(134)),o=A(237),a=s(A(1323));function s(t){return t&&t.__esModule?t:{default:t}}var g=e.AlphaPicker=function(t){var e=t.rgb,A=t.hsl,a=t.width,s=t.height,g=t.onChange,c=t.direction,I=t.style,u=t.renderers,l=t.pointer,C=t.className,h=void 0===C?"":C,B=(0,i.default)({default:{picker:{position:"relative",width:a,height:s},alpha:{radius:"2px",style:I}}});return r.default.createElement("div",{style:B.picker,className:"alpha-picker "+h},r.default.createElement(o.Alpha,n({},B.alpha,{rgb:e,hsl:A,pointer:l,renderers:u,onChange:g,direction:c})))};g.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:a.default},e.default=(0,o.ColorWrap)(g)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flattenNames=void 0;var n=a(A(1279)),r=a(A(928)),i=a(A(1098)),o=a(A(562));function a(t){return t&&t.__esModule?t:{default:t}}var s=e.flattenNames=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],A=[];return(0,o.default)(e,(function(e){Array.isArray(e)?t(e).map((function(t){return A.push(t)})):(0,i.default)(e)?(0,r.default)(e,(function(t,e){!0===t&&A.push(e),A.push(e+"-"+t)})):(0,n.default)(e)&&A.push(e)})),A};e.default=s},function(t,e,A){var n=A(244),r=A(212),i=A(207);t.exports=function(t){return"string"==typeof t||!r(t)&&i(t)&&"[object String]"==n(t)}},function(t,e){t.exports=function(t){return function(e,A,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[t?a:++r];if(!1===A(i[s],s,i))break}return e}}},function(t,e,A){var n=A(1282),r=A(1285),i=A(748),o=A(212),a=A(1295);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?o(t)?r(t[0],t[1]):n(t):a(t)}},function(t,e,A){var n=A(1283),r=A(1284),i=A(1100);t.exports=function(t){var e=r(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(A){return A===t||n(A,t,e)}}},function(t,e,A){var n=A(538),r=A(549);t.exports=function(t,e,A,i){var o=A.length,a=o,s=!i;if(null==t)return!a;for(t=Object(t);o--;){var g=A[o];if(s&&g[2]?g[1]!==t[g[0]]:!(g[0]in t))return!1}for(;++o<a;){var c=(g=A[o])[0],I=t[c],u=g[1];if(s&&g[2]){if(void 0===I&&!(c in t))return!1}else{var l=new n;if(i)var C=i(I,u,c,t,e,l);if(!(void 0===C?r(u,I,3,i,l):C))return!1}}return!0}},function(t,e,A){var n=A(1099),r=A(449);t.exports=function(t){for(var e=r(t),A=e.length;A--;){var i=e[A],o=t[i];e[A]=[i,o,n(o)]}return e}},function(t,e,A){var n=A(549),r=A(1286),i=A(1292),o=A(929),a=A(1099),s=A(1100),g=A(815);t.exports=function(t,e){return o(t)&&a(e)?s(g(t),e):function(A){var o=r(A,t);return void 0===o&&o===e?i(A,t):n(e,o,3)}}},function(t,e,A){var n=A(1101);t.exports=function(t,e,A){var r=null==t?void 0:n(t,e);return void 0===r?A:r}},function(t,e,A){var n=A(1288),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,o=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,A,n,r){e.push(n?r.replace(i,"$1"):A||t)})),e}));t.exports=o},function(t,e,A){var n=A(1289);t.exports=function(t){var e=n(t,(function(t){return 500===A.size&&A.clear(),t})),A=e.cache;return e}},function(t,e,A){var n=A(445);function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var A=function A(){var n=arguments,r=e?e.apply(this,n):n[0],i=A.cache;if(i.has(r))return i.get(r);var o=t.apply(this,n);return A.cache=i.set(r,o)||i,o};return A.cache=new(r.Cache||n),A}r.Cache=n,t.exports=r},function(t,e,A){var n=A(1291);t.exports=function(t){return null==t?"":n(t)}},function(t,e,A){var n=A(337),r=A(862),i=A(212),o=A(537),a=n?n.prototype:void 0,s=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return r(e,t)+"";if(o(e))return s?s.call(e):"";var A=e+"";return"0"==A&&1/e==-1/0?"-0":A}},function(t,e,A){var n=A(1293),r=A(1294);t.exports=function(t,e){return null!=t&&r(t,e,n)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,A){var n=A(1102),r=A(539),i=A(212),o=A(450),a=A(447),s=A(815);t.exports=function(t,e,A){for(var g=-1,c=(e=n(e,t)).length,I=!1;++g<c;){var u=s(e[g]);if(!(I=null!=t&&A(t,u)))break;t=t[u]}return I||++g!=c?I:!!(c=null==t?0:t.length)&&a(c)&&o(u,c)&&(i(t)||r(t))}},function(t,e,A){var n=A(1296),r=A(1297),i=A(929),o=A(815);t.exports=function(t){return i(t)?n(o(t)):r(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,A){var n=A(1101);t.exports=function(t){return function(e){return n(e,t)}}},function(t,e,A){var n=A(1103),r=A(363);t.exports=function(t,e){var A=-1,i=r(t)?Array(t.length):[];return n(t,(function(t,n,r){i[++A]=e(t,n,r)})),i}},function(t,e,A){var n=A(363);t.exports=function(t,e){return function(A,r){if(null==A)return A;if(!n(A))return t(A,r);for(var i=A.length,o=e?i:-1,a=Object(A);(e?o--:++o<i)&&!1!==r(a[o],o,a););return A}}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeClasses=void 0;var n=o(A(928)),r=o(A(1116)),i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t};function o(t){return t&&t.__esModule?t:{default:t}}var a=e.mergeClasses=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],A=t.default&&(0,r.default)(t.default)||{};return e.map((function(e){var r=t[e];return r&&(0,n.default)(r,(function(t,e){A[e]||(A[e]={}),A[e]=i({},A[e],r[e])})),e})),A};e.default=a},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.autoprefix=void 0;var n,r=A(928),i=(n=r)&&n.__esModule?n:{default:n},o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t};var a={borderRadius:function(t){return{msBorderRadius:t,MozBorderRadius:t,OBorderRadius:t,WebkitBorderRadius:t,borderRadius:t}},boxShadow:function(t){return{msBoxShadow:t,MozBoxShadow:t,OBoxShadow:t,WebkitBoxShadow:t,boxShadow:t}},userSelect:function(t){return{WebkitTouchCallout:t,KhtmlUserSelect:t,MozUserSelect:t,msUserSelect:t,WebkitUserSelect:t,userSelect:t}},flex:function(t){return{WebkitBoxFlex:t,MozBoxFlex:t,WebkitFlex:t,msFlex:t,flex:t}},flexBasis:function(t){return{WebkitFlexBasis:t,flexBasis:t}},justifyContent:function(t){return{WebkitJustifyContent:t,justifyContent:t}},transition:function(t){return{msTransition:t,MozTransition:t,OTransition:t,WebkitTransition:t,transition:t}},transform:function(t){return{msTransform:t,MozTransform:t,OTransform:t,WebkitTransform:t,transform:t}},absolute:function(t){var e=t&&t.split(" ");return{position:"absolute",top:e&&e[0],right:e&&e[1],bottom:e&&e[2],left:e&&e[3]}},extend:function(t,e){var A=e[t];return A||{extend:t}}},s=e.autoprefix=function(t){var e={};return(0,i.default)(t,(function(t,A){var n={};(0,i.default)(t,(function(t,e){var A=a[e];A?n=o({},n,A(t)):n[e]=t})),e[A]=n})),e};e.default=s},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hover=void 0;var n,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},i=A(0),o=(n=i)&&n.__esModule?n:{default:n};function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function g(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var c=e.hover=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(A){function n(){var A,i,g;a(this,n);for(var c=arguments.length,I=Array(c),u=0;u<c;u++)I[u]=arguments[u];return i=g=s(this,(A=n.__proto__||Object.getPrototypeOf(n)).call.apply(A,[this].concat(I))),g.state={hover:!1},g.handleMouseOver=function(){return g.setState({hover:!0})},g.handleMouseOut=function(){return g.setState({hover:!1})},g.render=function(){return o.default.createElement(e,{onMouseOver:g.handleMouseOver,onMouseOut:g.handleMouseOut},o.default.createElement(t,r({},g.props,g.state)))},s(g,i)}return g(n,A),n}(o.default.Component)};e.default=c},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.active=void 0;var n,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},i=A(0),o=(n=i)&&n.__esModule?n:{default:n};function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function g(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var c=e.active=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(A){function n(){var A,i,g;a(this,n);for(var c=arguments.length,I=Array(c),u=0;u<c;u++)I[u]=arguments[u];return i=g=s(this,(A=n.__proto__||Object.getPrototypeOf(n)).call.apply(A,[this].concat(I))),g.state={active:!1},g.handleMouseDown=function(){return g.setState({active:!0})},g.handleMouseUp=function(){return g.setState({active:!1})},g.render=function(){return o.default.createElement(e,{onMouseDown:g.handleMouseDown,onMouseUp:g.handleMouseUp},o.default.createElement(t,r({},g.props,g.state)))},s(g,i)}return g(n,A),n}(o.default.Component)};e.default=c},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e){var A={},n=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];A[t]=e};return 0===t&&n("first-child"),t===e-1&&n("last-child"),(0===t||t%2===0)&&n("even"),1===Math.abs(t%2)&&n("odd"),n("nth-child",t),A}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Alpha=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},r=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),i=A(0),o=c(i),a=c(A(134)),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}(A(1306)),g=c(A(930));function c(t){return t&&t.__esModule?t:{default:t}}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var l=e.Alpha=function(t){function e(){var t,A,n;I(this,e);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return A=n=u(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(i))),n.handleChange=function(t){var e=s.calculateChange(t,n.props.hsl,n.props.direction,n.props.a,n.container);e&&"function"===typeof n.props.onChange&&n.props.onChange(e,t)},n.handleMouseDown=function(t){n.handleChange(t),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleChange),window.removeEventListener("mouseup",n.handleMouseUp)},u(n,A)}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var t=this,e=this.props.rgb,A=(0,a.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("+e.r+","+e.g+","+e.b+", 0) 0%,\n           rgba("+e.r+","+e.g+","+e.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*e.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("+e.r+","+e.g+","+e.b+", 0) 0%,\n           rgba("+e.r+","+e.g+","+e.b+", 1) 100%)"},pointer:{left:0,top:100*e.a+"%"}},overwrite:n({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return o.default.createElement("div",{style:A.alpha},o.default.createElement("div",{style:A.checkboard},o.default.createElement(g.default,{renderers:this.props.renderers})),o.default.createElement("div",{style:A.gradient}),o.default.createElement("div",{style:A.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},o.default.createElement("div",{style:A.pointer},this.props.pointer?o.default.createElement(this.props.pointer,this.props):o.default.createElement("div",{style:A.slider}))))}}]),e}(i.PureComponent||i.Component);e.default=l},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.calculateChange=function(t,e,A,n,r){var i=r.clientWidth,o=r.clientHeight,a="number"===typeof t.pageX?t.pageX:t.touches[0].pageX,s="number"===typeof t.pageY?t.pageY:t.touches[0].pageY,g=a-(r.getBoundingClientRect().left+window.pageXOffset),c=s-(r.getBoundingClientRect().top+window.pageYOffset);if("vertical"===A){var I=void 0;if(I=c<0?0:c>o?1:Math.round(100*c/o)/100,e.a!==I)return{h:e.h,s:e.s,l:e.l,a:I,source:"rgb"}}else{var u=void 0;if(n!==(u=g<0?0:g>i?1:Math.round(100*g/i)/100))return{h:e.h,s:e.s,l:e.l,a:u,source:"rgb"}}return null}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={},r=e.render=function(t,e,A,n){if("undefined"===typeof document&&!n)return null;var r=n?new n:document.createElement("canvas");r.width=2*A,r.height=2*A;var i=r.getContext("2d");return i?(i.fillStyle=t,i.fillRect(0,0,r.width,r.height),i.fillStyle=e,i.fillRect(0,0,A,A),i.translate(A,A),i.fillRect(0,0,A,A),r.toDataURL()):null};e.get=function(t,e,A,i){var o=t+"-"+e+"-"+A+(i?"-server":"");if(n[o])return n[o];var a=r(t,e,A,i);return n[o]=a,a}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditableInput=void 0;var n=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),r=A(0),i=a(r),o=a(A(134));function a(t){return t&&t.__esModule?t:{default:t}}var s=[38,40],g=e.EditableInput=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var A=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return A.handleBlur=function(){A.state.blurValue&&A.setState({value:A.state.blurValue,blurValue:null})},A.handleChange=function(t){A.setUpdatedValue(t.target.value,t)},A.handleKeyDown=function(t){var e,n=function(t){return Number(String(t).replace(/%/g,""))}(t.target.value);if(!isNaN(n)&&(e=t.keyCode,s.indexOf(e)>-1)){var r=A.getArrowOffset(),i=38===t.keyCode?n+r:n-r;A.setUpdatedValue(i,t)}},A.handleDrag=function(t){if(A.props.dragLabel){var e=Math.round(A.props.value+t.movementX);e>=0&&e<=A.props.dragMax&&A.props.onChange&&A.props.onChange(A.getValueObjectWithLabel(e),t)}},A.handleMouseDown=function(t){A.props.dragLabel&&(t.preventDefault(),A.handleDrag(t),window.addEventListener("mousemove",A.handleDrag),window.addEventListener("mouseup",A.handleMouseUp))},A.handleMouseUp=function(){A.unbindEventListeners()},A.unbindEventListeners=function(){window.removeEventListener("mousemove",A.handleDrag),window.removeEventListener("mouseup",A.handleMouseUp)},A.state={value:String(t.value).toUpperCase(),blurValue:String(t.value).toUpperCase()},A}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"componentDidUpdate",value:function(t,e){this.props.value===this.state.value||t.value===this.props.value&&e.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(t){return function(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}({},this.props.label,t)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(t,e){var A=this.props.label?this.getValueObjectWithLabel(t):t;this.props.onChange&&this.props.onChange(A,e);var n,r=function(t){return String(t).indexOf("%")>-1}(e.target.value);this.setState({value:r?(n=t,n+"%"):t})}},{key:"render",value:function(){var t=this,e=(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 i.default.createElement("div",{style:e.wrap},i.default.createElement("input",{style:e.input,ref:function(e){return t.input=e},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?i.default.createElement("span",{style:e.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(r.PureComponent||r.Component);e.default=g},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Hue=void 0;var n=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),r=A(0),i=s(r),o=s(A(134)),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}(A(1310));function s(t){return t&&t.__esModule?t:{default:t}}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}var I=e.Hue=function(t){function e(){var t,A,n;g(this,e);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return A=n=c(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(i))),n.handleChange=function(t){var e=a.calculateChange(t,n.props.direction,n.props.hsl,n.container);e&&"function"===typeof n.props.onChange&&n.props.onChange(e,t)},n.handleMouseDown=function(t){n.handleChange(t),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},c(n,A)}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{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 t=this,e=this.props.direction,A=void 0===e?"horizontal":e,n=(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"===A});return i.default.createElement("div",{style:n.hue},i.default.createElement("div",{className:"hue-"+A,style:n.container,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.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          "),i.default.createElement("div",{style:n.pointer},this.props.pointer?i.default.createElement(this.props.pointer,this.props):i.default.createElement("div",{style:n.slider}))))}}]),e}(r.PureComponent||r.Component);e.default=I},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.calculateChange=function(t,e,A,n){var r=n.clientWidth,i=n.clientHeight,o="number"===typeof t.pageX?t.pageX:t.touches[0].pageX,a="number"===typeof t.pageY?t.pageY:t.touches[0].pageY,s=o-(n.getBoundingClientRect().left+window.pageXOffset),g=a-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===e){var c=void 0;if(g<0)c=359;else if(g>i)c=0;else{c=360*(-100*g/i+100)/100}if(A.h!==c)return{h:c,s:A.s,l:A.l,a:A.a,source:"rgb"}}else{var I=void 0;if(s<0)I=0;else if(s>r)I=359;else{I=360*(100*s/r)/100}if(A.h!==I)return{h:I,s:A.s,l:A.l,a:A.a,source:"rgb"}}return null}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Raised=void 0;var n=a(A(0)),r=a(A(25)),i=a(A(134)),o=a(A(379));function a(t){return t&&t.__esModule?t:{default:t}}var s=e.Raised=function(t){var e=t.zDepth,A=t.radius,r=t.background,a=t.children,s=t.styles,g=void 0===s?{}:s,c=(0,i.default)((0,o.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+e+"px "+4*e+"px rgba(0,0,0,.24)",borderRadius:A,background:r}},"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%"}}},g),{"zDepth-1":1===e});return n.default.createElement("div",{style:c.wrap},n.default.createElement("div",{style:c.bg}),n.default.createElement("div",{style:c.content},a))};s.propTypes={background:r.default.string,zDepth:r.default.oneOf([0,1,2,3,4,5]),radius:r.default.number,styles:r.default.object},s.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},e.default=s},function(t,e,A){var n=A(538),r=A(1104),i=A(1096),o=A(1313),a=A(201),s=A(809),g=A(1105);t.exports=function t(e,A,c,I,u){e!==A&&i(A,(function(i,s){if(u||(u=new n),a(i))o(e,A,s,c,t,I,u);else{var l=I?I(g(e,s),i,s+"",e,A,u):void 0;void 0===l&&(l=i),r(e,s,l)}}),s)}},function(t,e,A){var n=A(1104),r=A(1069),i=A(1072),o=A(1070),a=A(1073),s=A(539),g=A(212),c=A(861),I=A(425),u=A(444),l=A(201),C=A(1098),h=A(446),B=A(1105),f=A(1314);t.exports=function(t,e,A,d,Q,E,p){var y=B(t,A),v=B(e,A),m=p.get(v);if(m)n(t,A,m);else{var b=E?E(y,v,A+"",t,e,p):void 0,F=void 0===b;if(F){var w=g(v),S=!w&&I(v),D=!w&&!S&&h(v);b=v,w||S||D?g(y)?b=y:c(y)?b=o(y):S?(F=!1,b=r(v,!0)):D?(F=!1,b=i(v,!0)):b=[]:C(v)||s(v)?(b=y,s(y)?b=f(y):l(y)&&!u(y)||(b=a(v))):F=!1}F&&(p.set(v,b),Q(b,v,d,E,p),p.delete(v)),n(t,A,b)}}},function(t,e,A){var n=A(790),r=A(809);t.exports=function(t){return n(t,r(t))}},function(t,e,A){var n=A(860),r=A(721);t.exports=function(t){return n((function(e,A){var n=-1,i=A.length,o=i>1?A[i-1]:void 0,a=i>2?A[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&r(A[0],A[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var s=A[n];s&&t(e,s,n,o)}return e}))}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Saturation=void 0;var n=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),r=A(0),i=g(r),o=g(A(134)),a=g(A(1317)),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}(A(1318));function g(t){return t&&t.__esModule?t:{default:t}}var c=e.Saturation=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var A=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return A.handleChange=function(t){"function"===typeof A.props.onChange&&A.throttle(A.props.onChange,s.calculateChange(t,A.props.hsl,A.container),t)},A.handleMouseDown=function(t){A.handleChange(t),window.addEventListener("mousemove",A.handleChange),window.addEventListener("mouseup",A.handleMouseUp)},A.handleMouseUp=function(){A.unbindEventListeners()},A.throttle=(0,a.default)((function(t,e,A){t(e,A)}),50),A}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{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 t=this,e=this.props.style||{},A=e.color,n=e.white,r=e.black,a=e.pointer,s=e.circle,g=(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:A,white:n,black:r,pointer:a,circle:s}},{custom:!!this.props.style});return i.default.createElement("div",{style:g.color,ref:function(e){return t.container=e},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.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        "),i.default.createElement("div",{style:g.white,className:"saturation-white"},i.default.createElement("div",{style:g.black,className:"saturation-black"}),i.default.createElement("div",{style:g.pointer},this.props.pointer?i.default.createElement(this.props.pointer,this.props):i.default.createElement("div",{style:g.circle}))))}}]),e}(r.PureComponent||r.Component);e.default=c},function(t,e,A){var n=A(214),r=A(201);t.exports=function(t,e,A){var i=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return r(A)&&(i="leading"in A?!!A.leading:i,o="trailing"in A?!!A.trailing:o),n(t,e,{leading:i,maxWait:e,trailing:o})}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.calculateChange=function(t,e,A){var n=A.getBoundingClientRect(),r=n.width,i=n.height,o="number"===typeof t.pageX?t.pageX:t.touches[0].pageX,a="number"===typeof t.pageY?t.pageY:t.touches[0].pageY,s=o-(A.getBoundingClientRect().left+window.pageXOffset),g=a-(A.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>r&&(s=r),g<0?g=0:g>i&&(g=i);var c=s/r,I=1-g/i;return{h:e.h,s:c,v:I,a:e.a,source:"rgb"}}},function(t,e,A){t.exports=A(1320)},function(t,e,A){var n=A(1067),r=A(1103),i=A(1097),o=A(212);t.exports=function(t,e){return(o(t)?n:r)(t,i(e))}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Swatch=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},r=s(A(0)),i=s(A(134)),o=A(1322),a=s(A(930));function s(t){return t&&t.__esModule?t:{default:t}}var g=e.Swatch=function(t){var e=t.color,A=t.style,o=t.onClick,s=void 0===o?function(){}:o,g=t.onHover,c=t.title,I=void 0===c?e:c,u=t.children,l=t.focus,C=t.focusStyle,h=void 0===C?{}:C,B="transparent"===e,f=(0,i.default)({default:{swatch:n({background:e,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},A,l?h:{})}}),d={};return g&&(d.onMouseOver=function(t){return g(e,t)}),r.default.createElement("div",n({style:f.swatch,onClick:function(t){return s(e,t)},title:I,tabIndex:0,onKeyDown:function(t){return 13===t.keyCode&&s(e,t)}},d),u,B&&r.default.createElement(a.default,{borderRadius:f.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};e.default=(0,o.handleFocus)(g)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleFocus=void 0;var n,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},i=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),o=A(0),a=(n=o)&&n.__esModule?n:{default:n};function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function c(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.handleFocus=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(A){function n(){var t,e,A;s(this,n);for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=A=g(this,(t=n.__proto__||Object.getPrototypeOf(n)).call.apply(t,[this].concat(i))),A.state={focus:!1},A.handleFocus=function(){return A.setState({focus:!0})},A.handleBlur=function(){return A.setState({focus:!1})},g(A,e)}return c(n,A),i(n,[{key:"render",value:function(){return a.default.createElement(e,{onFocus:this.handleFocus,onBlur:this.handleBlur},a.default.createElement(t,r({},this.props,this.state)))}}]),n}(a.default.Component)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlphaPointer=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.AlphaPointer=function(t){var e=t.direction,A=(0,r.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"===e});return n.default.createElement("div",{style:A.picker})};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Block=void 0;var n=c(A(0)),r=c(A(25)),i=c(A(134)),o=c(A(379)),a=c(A(432)),s=A(237),g=c(A(1325));function c(t){return t&&t.__esModule?t:{default:t}}var I=e.Block=function(t){var e=t.onChange,A=t.onSwatchHover,r=t.hex,c=t.colors,I=t.width,u=t.triangle,l=t.styles,C=void 0===l?{}:l,h=t.className,B=void 0===h?"":h,f="transparent"===r,d=function(t,A){a.default.isValidHex(t)&&e({hex:t,source:"hex"},A)},Q=(0,i.default)((0,o.default)({default:{card:{width:I,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:a.default.getContrastingColor(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" 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"}}},C),{"hide-triangle":"hide"===u});return n.default.createElement("div",{style:Q.card,className:"block-picker "+B},n.default.createElement("div",{style:Q.triangle}),n.default.createElement("div",{style:Q.head},f&&n.default.createElement(s.Checkboard,{borderRadius:"6px 6px 0 0"}),n.default.createElement("div",{style:Q.label},r)),n.default.createElement("div",{style:Q.body},n.default.createElement(g.default,{colors:c,onClick:d,onSwatchHover:A}),n.default.createElement(s.EditableInput,{style:{input:Q.input},value:r,onChange:d})))};I.propTypes={width:r.default.oneOfType([r.default.string,r.default.number]),colors:r.default.arrayOf(r.default.string),triangle:r.default.oneOf(["top","hide"]),styles:r.default.object},I.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},e.default=(0,s.ColorWrap)(I)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockSwatches=void 0;var n=a(A(0)),r=a(A(134)),i=a(A(562)),o=A(237);function a(t){return t&&t.__esModule?t:{default:t}}var s=e.BlockSwatches=function(t){var e=t.colors,A=t.onClick,a=t.onSwatchHover,s=(0,r.default)({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return n.default.createElement("div",{style:s.swatches},(0,i.default)(e,(function(t){return n.default.createElement(o.Swatch,{key:t,color:t,style:s.swatch,onClick:A,onHover:a,focusStyle:{boxShadow:"0 0 4px "+t}})})),n.default.createElement("div",{style:s.clear}))};e.default=s},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Circle=void 0;var n=I(A(0)),r=I(A(25)),i=I(A(134)),o=I(A(562)),a=I(A(379)),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}(A(1107)),g=A(237),c=I(A(1327));function I(t){return t&&t.__esModule?t:{default:t}}var u=e.Circle=function(t){var e=t.width,A=t.onChange,r=t.onSwatchHover,s=t.colors,g=t.hex,I=t.circleSize,u=t.styles,l=void 0===u?{}:u,C=t.circleSpacing,h=t.className,B=void 0===h?"":h,f=(0,i.default)((0,a.default)({default:{card:{width:e,display:"flex",flexWrap:"wrap",marginRight:-C,marginBottom:-C}}},l)),d=function(t,e){return A({hex:t,source:"hex"},e)};return n.default.createElement("div",{style:f.card,className:"circle-picker "+B},(0,o.default)(s,(function(t){return n.default.createElement(c.default,{key:t,color:t,onClick:d,onSwatchHover:r,active:g===t.toLowerCase(),circleSize:I,circleSpacing:C})})))};u.propTypes={width:r.default.oneOfType([r.default.string,r.default.number]),circleSize:r.default.number,circleSpacing:r.default.number,styles:r.default.object},u.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[s.red[500],s.pink[500],s.purple[500],s.deepPurple[500],s.indigo[500],s.blue[500],s.lightBlue[500],s.cyan[500],s.teal[500],s.green[500],s.lightGreen[500],s.lime[500],s.yellow[500],s.amber[500],s.orange[500],s.deepOrange[500],s.brown[500],s.blueGrey[500]],styles:{}},e.default=(0,g.ColorWrap)(u)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CircleSwatch=void 0;var n=a(A(0)),r=A(134),i=a(r),o=A(237);function a(t){return t&&t.__esModule?t:{default:t}}var s=e.CircleSwatch=function(t){var e=t.color,A=t.onClick,r=t.onSwatchHover,a=t.hover,s=t.active,g=t.circleSize,c=t.circleSpacing,I=(0,i.default)({default:{swatch:{width:g,height:g,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+g/2+"px "+e,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+e}}},{hover:a,active:s});return n.default.createElement("div",{style:I.swatch},n.default.createElement(o.Swatch,{style:I.Swatch,color:e,onClick:A,onHover:r,focusStyle:{boxShadow:I.Swatch.boxShadow+", 0 0 5px "+e}}))};s.defaultProps={circleSize:28,circleSpacing:14},e.default=(0,r.handleHover)(s)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Chrome=void 0;var n=I(A(0)),r=I(A(25)),i=I(A(134)),o=I(A(379)),a=A(237),s=I(A(1329)),g=I(A(1331)),c=I(A(1332));function I(t){return t&&t.__esModule?t:{default:t}}var u=e.Chrome=function(t){var e=t.width,A=t.onChange,r=t.disableAlpha,I=t.rgb,u=t.hsl,l=t.hsv,C=t.hex,h=t.renderers,B=t.styles,f=void 0===B?{}:B,d=t.className,Q=void 0===d?"":d,E=t.defaultView,p=(0,i.default)((0,o.default)({default:{picker:{width:e,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("+I.r+", "+I.g+", "+I.b+", "+I.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"}}},f),{disableAlpha:r});return n.default.createElement("div",{style:p.picker,className:"chrome-picker "+Q},n.default.createElement("div",{style:p.saturation},n.default.createElement(a.Saturation,{style:p.Saturation,hsl:u,hsv:l,pointer:c.default,onChange:A})),n.default.createElement("div",{style:p.body},n.default.createElement("div",{style:p.controls,className:"flexbox-fix"},n.default.createElement("div",{style:p.color},n.default.createElement("div",{style:p.swatch},n.default.createElement("div",{style:p.active}),n.default.createElement(a.Checkboard,{renderers:h}))),n.default.createElement("div",{style:p.toggles},n.default.createElement("div",{style:p.hue},n.default.createElement(a.Hue,{style:p.Hue,hsl:u,pointer:g.default,onChange:A})),n.default.createElement("div",{style:p.alpha},n.default.createElement(a.Alpha,{style:p.Alpha,rgb:I,hsl:u,pointer:g.default,renderers:h,onChange:A})))),n.default.createElement(s.default,{rgb:I,hsl:u,hex:C,view:E,onChange:A,disableAlpha:r})))};u.propTypes={width:r.default.oneOfType([r.default.string,r.default.number]),disableAlpha:r.default.bool,styles:r.default.object,defaultView:r.default.oneOf(["hex","rgb","hsl"])},u.defaultProps={width:225,disableAlpha:!1,styles:{}},e.default=(0,a.ColorWrap)(u)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChromeFields=void 0;var n=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),r=g(A(0)),i=g(A(134)),o=g(A(432)),a=A(237),s=g(A(1330));function g(t){return t&&t.__esModule?t:{default:t}}var c=e.ChromeFields=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var A=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return A.toggleViews=function(){"hex"===A.state.view?A.setState({view:"rgb"}):"rgb"===A.state.view?A.setState({view:"hsl"}):"hsl"===A.state.view&&(1===A.props.hsl.a?A.setState({view:"hex"}):A.setState({view:"rgb"}))},A.handleChange=function(t,e){t.hex?o.default.isValidHex(t.hex)&&A.props.onChange({hex:t.hex,source:"hex"},e):t.r||t.g||t.b?A.props.onChange({r:t.r||A.props.rgb.r,g:t.g||A.props.rgb.g,b:t.b||A.props.rgb.b,source:"rgb"},e):t.a?(t.a<0?t.a=0:t.a>1&&(t.a=1),A.props.onChange({h:A.props.hsl.h,s:A.props.hsl.s,l:A.props.hsl.l,a:Math.round(100*t.a)/100,source:"rgb"},e)):(t.h||t.s||t.l)&&("string"===typeof t.s&&t.s.includes("%")&&(t.s=t.s.replace("%","")),"string"===typeof t.l&&t.l.includes("%")&&(t.l=t.l.replace("%","")),A.props.onChange({h:t.h||A.props.hsl.h,s:Number(t.s&&t.s||A.props.hsl.s),l:Number(t.l&&t.l||A.props.hsl.l),source:"hsl"},e))},A.showHighlight=function(t){t.currentTarget.style.background="#eee"},A.hideHighlight=function(t){t.currentTarget.style.background="transparent"},1!==t.hsl.a&&"hex"===t.view?A.state={view:"rgb"}:A.state={view:t.view},A}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"render",value:function(){var t=this,e=(0,i.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),A=void 0;return"hex"===this.state.view?A=r.default.createElement("div",{style:e.fields,className:"flexbox-fix"},r.default.createElement("div",{style:e.field},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?A=r.default.createElement("div",{style:e.fields,className:"flexbox-fix"},r.default.createElement("div",{style:e.field},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),r.default.createElement("div",{style:e.field},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),r.default.createElement("div",{style:e.field},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),r.default.createElement("div",{style:e.alpha},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(A=r.default.createElement("div",{style:e.fields,className:"flexbox-fix"},r.default.createElement("div",{style:e.field},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),r.default.createElement("div",{style:e.field},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),r.default.createElement("div",{style:e.field},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),r.default.createElement("div",{style:e.alpha},r.default.createElement(a.EditableInput,{style:{input:e.input,label:e.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),r.default.createElement("div",{style:e.wrap,className:"flexbox-fix"},A,r.default.createElement("div",{style:e.toggle},r.default.createElement("div",{style:e.icon,onClick:this.toggleViews,ref:function(e){return t.icon=e}},r.default.createElement(s.default,{style:e.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(t,e){return 1!==t.hsl.a&&"hex"===e.view?{view:"rgb"}:null}}]),e}(r.default.Component);c.defaultProps={view:"hex"},e.default=c},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},i=A(0),o=(n=i)&&n.__esModule?n:{default:n};e.default=function(t){var e=t.fill,A=void 0===e?"currentColor":e,n=t.width,i=void 0===n?24:n,a=t.height,s=void 0===a?24:a,g=t.style,c=void 0===g?{}:g,I=function(t,e){var A={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(A[n]=t[n]);return A}(t,["fill","width","height","style"]);return o.default.createElement("svg",r({viewBox:"0 0 24 24",style:r({fill:A,width:i,height:s},c)},I),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(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChromePointer=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.ChromePointer=function(){var t=(0,r.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 n.default.createElement("div",{style:t.picker})};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChromePointerCircle=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.ChromePointerCircle=function(){var t=(0,r.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return n.default.createElement("div",{style:t.picker})};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Compact=void 0;var n=u(A(0)),r=u(A(25)),i=u(A(134)),o=u(A(562)),a=u(A(379)),s=u(A(432)),g=A(237),c=u(A(1334)),I=u(A(1335));function u(t){return t&&t.__esModule?t:{default:t}}var l=e.Compact=function(t){var e=t.onChange,A=t.onSwatchHover,r=t.colors,u=t.hex,l=t.rgb,C=t.styles,h=void 0===C?{}:C,B=t.className,f=void 0===B?"":B,d=(0,i.default)((0,a.default)({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},h)),Q=function(t,A){t.hex?s.default.isValidHex(t.hex)&&e({hex:t.hex,source:"hex"},A):e(t,A)};return n.default.createElement(g.Raised,{style:d.Compact,styles:h},n.default.createElement("div",{style:d.compact,className:"compact-picker "+f},n.default.createElement("div",null,(0,o.default)(r,(function(t){return n.default.createElement(c.default,{key:t,color:t,active:t.toLowerCase()===u,onClick:Q,onSwatchHover:A})})),n.default.createElement("div",{style:d.clear})),n.default.createElement(I.default,{hex:u,rgb:l,onChange:Q})))};l.propTypes={colors:r.default.arrayOf(r.default.string),styles:r.default.object},l.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:{}},e.default=(0,g.ColorWrap)(l)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompactColor=void 0;var n=a(A(0)),r=a(A(134)),i=a(A(432)),o=A(237);function a(t){return t&&t.__esModule?t:{default:t}}var s=e.CompactColor=function(t){var e=t.color,A=t.onClick,a=void 0===A?function(){}:A,s=t.onSwatchHover,g=t.active,c=(0,r.default)({default:{color:{background:e,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:i.default.getContrastingColor(e),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:g,"color-#FFFFFF":"#FFFFFF"===e,transparent:"transparent"===e});return n.default.createElement(o.Swatch,{style:c.color,color:e,onClick:a,onHover:s,focusStyle:{boxShadow:"0 0 4px "+e}},n.default.createElement("div",{style:c.dot}))};e.default=s},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompactFields=void 0;var n=o(A(0)),r=o(A(134)),i=A(237);function o(t){return t&&t.__esModule?t:{default:t}}var a=e.CompactFields=function(t){var e=t.hex,A=t.rgb,o=t.onChange,a=(0,r.default)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:e},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"}}}),s=function(t,e){t.r||t.g||t.b?o({r:t.r||A.r,g:t.g||A.g,b:t.b||A.b,source:"rgb"},e):o({hex:t.hex,source:"hex"},e)};return n.default.createElement("div",{style:a.fields,className:"flexbox-fix"},n.default.createElement("div",{style:a.active}),n.default.createElement(i.EditableInput,{style:{wrap:a.HEXwrap,input:a.HEXinput,label:a.HEXlabel},label:"hex",value:e,onChange:s}),n.default.createElement(i.EditableInput,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"r",value:A.r,onChange:s}),n.default.createElement(i.EditableInput,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"g",value:A.g,onChange:s}),n.default.createElement(i.EditableInput,{style:{wrap:a.RGBwrap,input:a.RGBinput,label:a.RGBlabel},label:"b",value:A.b,onChange:s}))};e.default=a},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Github=void 0;var n=c(A(0)),r=c(A(25)),i=c(A(134)),o=c(A(562)),a=c(A(379)),s=A(237),g=c(A(1337));function c(t){return t&&t.__esModule?t:{default:t}}var I=e.Github=function(t){var e=t.width,A=t.colors,r=t.onChange,s=t.onSwatchHover,c=t.triangle,I=t.styles,u=void 0===I?{}:I,l=t.className,C=void 0===l?"":l,h=(0,i.default)((0,a.default)({default:{card:{width:e,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)"}}},u),{"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}),B=function(t,e){return r({hex:t,source:"hex"},e)};return n.default.createElement("div",{style:h.card,className:"github-picker "+C},n.default.createElement("div",{style:h.triangleShadow}),n.default.createElement("div",{style:h.triangle}),(0,o.default)(A,(function(t){return n.default.createElement(g.default,{color:t,key:t,onClick:B,onSwatchHover:s})})))};I.propTypes={width:r.default.oneOfType([r.default.string,r.default.number]),colors:r.default.arrayOf(r.default.string),triangle:r.default.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:r.default.object},I.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},e.default=(0,s.ColorWrap)(I)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GithubSwatch=void 0;var n=a(A(0)),r=A(134),i=a(r),o=A(237);function a(t){return t&&t.__esModule?t:{default:t}}var s=e.GithubSwatch=function(t){var e=t.hover,A=t.color,r=t.onClick,a=t.onSwatchHover,s={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},g=(0,i.default)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:s}},{hover:e});return n.default.createElement("div",{style:g.swatch},n.default.createElement(o.Swatch,{color:A,onClick:r,onHover:a,focusStyle:s}))};e.default=(0,r.handleHover)(s)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HuePicker=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},r=c(A(0)),i=c(A(25)),o=c(A(134)),a=c(A(379)),s=A(237),g=c(A(1339));function c(t){return t&&t.__esModule?t:{default:t}}var I=e.HuePicker=function(t){var e=t.width,A=t.height,i=t.onChange,g=t.hsl,c=t.direction,I=t.pointer,u=t.styles,l=void 0===u?{}:u,C=t.className,h=void 0===C?"":C,B=(0,o.default)((0,a.default)({default:{picker:{position:"relative",width:e,height:A},hue:{radius:"2px"}}},l));return r.default.createElement("div",{style:B.picker,className:"hue-picker "+h},r.default.createElement(s.Hue,n({},B.hue,{hsl:g,pointer:I,onChange:function(t){return i({a:1,h:t.h,l:.5,s:1})},direction:c})))};I.propTypes={styles:i.default.object},I.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:g.default,styles:{}},e.default=(0,s.ColorWrap)(I)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SliderPointer=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.SliderPointer=function(t){var e=t.direction,A=(0,r.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"===e});return n.default.createElement("div",{style:A.picker})};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Material=void 0;var n=s(A(0)),r=s(A(134)),i=s(A(379)),o=s(A(432)),a=A(237);function s(t){return t&&t.__esModule?t:{default:t}}var g=e.Material=function(t){var e=t.onChange,A=t.hex,s=t.rgb,g=t.styles,c=void 0===g?{}:g,I=t.className,u=void 0===I?"":I,l=(0,r.default)((0,i.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 "+A,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)),C=function(t,A){t.hex?o.default.isValidHex(t.hex)&&e({hex:t.hex,source:"hex"},A):(t.r||t.g||t.b)&&e({r:t.r||s.r,g:t.g||s.g,b:t.b||s.b,source:"rgb"},A)};return n.default.createElement(a.Raised,{styles:c},n.default.createElement("div",{style:l.material,className:"material-picker "+u},n.default.createElement(a.EditableInput,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"hex",value:A,onChange:C}),n.default.createElement("div",{style:l.split,className:"flexbox-fix"},n.default.createElement("div",{style:l.third},n.default.createElement(a.EditableInput,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:s.r,onChange:C})),n.default.createElement("div",{style:l.third},n.default.createElement(a.EditableInput,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:s.g,onChange:C})),n.default.createElement("div",{style:l.third},n.default.createElement(a.EditableInput,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:s.b,onChange:C})))))};e.default=(0,a.ColorWrap)(g)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Photoshop=void 0;var n=function(){function t(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,A,n){return A&&t(e.prototype,A),n&&t(e,n),e}}(),r=C(A(0)),i=C(A(25)),o=C(A(134)),a=C(A(379)),s=A(237),g=C(A(1342)),c=C(A(1343)),I=C(A(1344)),u=C(A(1345)),l=C(A(1346));function C(t){return t&&t.__esModule?t:{default:t}}var h=e.Photoshop=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var A=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return A.state={currentColor:t.hex},A}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"render",value:function(){var t=this.props,e=t.styles,A=void 0===e?{}:e,n=t.className,i=void 0===n?"":n,C=(0,o.default)((0,a.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"}}},A));return r.default.createElement("div",{style:C.picker,className:"photoshop-picker "+i},r.default.createElement("div",{style:C.head},this.props.header),r.default.createElement("div",{style:C.body,className:"flexbox-fix"},r.default.createElement("div",{style:C.saturation},r.default.createElement(s.Saturation,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:c.default,onChange:this.props.onChange})),r.default.createElement("div",{style:C.hue},r.default.createElement(s.Hue,{direction:"vertical",hsl:this.props.hsl,pointer:I.default,onChange:this.props.onChange})),r.default.createElement("div",{style:C.controls},r.default.createElement("div",{style:C.top,className:"flexbox-fix"},r.default.createElement("div",{style:C.previews},r.default.createElement(l.default,{rgb:this.props.rgb,currentColor:this.state.currentColor})),r.default.createElement("div",{style:C.actions},r.default.createElement(u.default,{label:"OK",onClick:this.props.onAccept,active:!0}),r.default.createElement(u.default,{label:"Cancel",onClick:this.props.onCancel}),r.default.createElement(g.default,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),e}(r.default.Component);h.propTypes={header:i.default.string,styles:i.default.object},h.defaultProps={header:"Color Picker",styles:{}},e.default=(0,s.ColorWrap)(h)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoshopPicker=void 0;var n=a(A(0)),r=a(A(134)),i=a(A(432)),o=A(237);function a(t){return t&&t.__esModule?t:{default:t}}var s=e.PhotoshopPicker=function(t){var e=t.onChange,A=t.rgb,a=t.hsv,s=t.hex,g=(0,r.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(t,n){t["#"]?i.default.isValidHex(t["#"])&&e({hex:t["#"],source:"hex"},n):t.r||t.g||t.b?e({r:t.r||A.r,g:t.g||A.g,b:t.b||A.b,source:"rgb"},n):(t.h||t.s||t.v)&&e({h:t.h||a.h,s:t.s||a.s,v:t.v||a.v,source:"hsv"},n)};return n.default.createElement("div",{style:g.fields},n.default.createElement(o.EditableInput,{style:{wrap:g.RGBwrap,input:g.RGBinput,label:g.RGBlabel},label:"h",value:Math.round(a.h),onChange:c}),n.default.createElement(o.EditableInput,{style:{wrap:g.RGBwrap,input:g.RGBinput,label:g.RGBlabel},label:"s",value:Math.round(100*a.s),onChange:c}),n.default.createElement(o.EditableInput,{style:{wrap:g.RGBwrap,input:g.RGBinput,label:g.RGBlabel},label:"v",value:Math.round(100*a.v),onChange:c}),n.default.createElement("div",{style:g.divider}),n.default.createElement(o.EditableInput,{style:{wrap:g.RGBwrap,input:g.RGBinput,label:g.RGBlabel},label:"r",value:A.r,onChange:c}),n.default.createElement(o.EditableInput,{style:{wrap:g.RGBwrap,input:g.RGBinput,label:g.RGBlabel},label:"g",value:A.g,onChange:c}),n.default.createElement(o.EditableInput,{style:{wrap:g.RGBwrap,input:g.RGBinput,label:g.RGBlabel},label:"b",value:A.b,onChange:c}),n.default.createElement("div",{style:g.divider}),n.default.createElement(o.EditableInput,{style:{wrap:g.HEXwrap,input:g.HEXinput,label:g.HEXlabel},label:"#",value:s.replace("#",""),onChange:c}),n.default.createElement("div",{style:g.fieldSymbols},n.default.createElement("div",{style:g.symbol},"\xb0"),n.default.createElement("div",{style:g.symbol},"%"),n.default.createElement("div",{style:g.symbol},"%")))};e.default=s},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoshopPointerCircle=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.PhotoshopPointerCircle=function(t){var e=t.hsl,A=(0,r.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":e.l>.5});return n.default.createElement("div",{style:A.picker})};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoshopPointerCircle=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.PhotoshopPointerCircle=function(){var t=(0,r.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 n.default.createElement("div",{style:t.pointer},n.default.createElement("div",{style:t.left},n.default.createElement("div",{style:t.leftInside})),n.default.createElement("div",{style:t.right},n.default.createElement("div",{style:t.rightInside})))};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoshopButton=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.PhotoshopButton=function(t){var e=t.onClick,A=t.label,i=t.children,o=t.active,a=(0,r.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 n.default.createElement("div",{style:a.button,onClick:e},A||i)};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoshopPreviews=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.PhotoshopPreviews=function(t){var e=t.rgb,A=t.currentColor,i=(0,r.default)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+e.r+","+e.g+", "+e.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:A,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return n.default.createElement("div",null,n.default.createElement("div",{style:i.label},"new"),n.default.createElement("div",{style:i.swatches},n.default.createElement("div",{style:i.new}),n.default.createElement("div",{style:i.current})),n.default.createElement("div",{style:i.label},"current"))};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sketch=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},r=I(A(0)),i=I(A(25)),o=I(A(134)),a=I(A(379)),s=A(237),g=I(A(1348)),c=I(A(1349));function I(t){return t&&t.__esModule?t:{default:t}}var u=e.Sketch=function(t){var e=t.width,A=t.rgb,i=t.hex,I=t.hsv,u=t.hsl,l=t.onChange,C=t.onSwatchHover,h=t.disableAlpha,B=t.presetColors,f=t.renderers,d=t.styles,Q=void 0===d?{}:d,E=t.className,p=void 0===E?"":E,y=(0,o.default)((0,a.default)({default:n({picker:{width:e,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("+A.r+","+A.g+","+A.b+","+A.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)"}},Q),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},Q),{disableAlpha:h});return r.default.createElement("div",{style:y.picker,className:"sketch-picker "+p},r.default.createElement("div",{style:y.saturation},r.default.createElement(s.Saturation,{style:y.Saturation,hsl:u,hsv:I,onChange:l})),r.default.createElement("div",{style:y.controls,className:"flexbox-fix"},r.default.createElement("div",{style:y.sliders},r.default.createElement("div",{style:y.hue},r.default.createElement(s.Hue,{style:y.Hue,hsl:u,onChange:l})),r.default.createElement("div",{style:y.alpha},r.default.createElement(s.Alpha,{style:y.Alpha,rgb:A,hsl:u,renderers:f,onChange:l}))),r.default.createElement("div",{style:y.color},r.default.createElement(s.Checkboard,null),r.default.createElement("div",{style:y.activeColor}))),r.default.createElement(g.default,{rgb:A,hsl:u,hex:i,onChange:l,disableAlpha:h}),r.default.createElement(c.default,{colors:B,onClick:l,onSwatchHover:C}))};u.propTypes={disableAlpha:i.default.bool,width:i.default.oneOfType([i.default.string,i.default.number]),styles:i.default.object},u.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},e.default=(0,s.ColorWrap)(u)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SketchFields=void 0;var n=a(A(0)),r=a(A(134)),i=a(A(432)),o=A(237);function a(t){return t&&t.__esModule?t:{default:t}}var s=e.SketchFields=function(t){var e=t.onChange,A=t.rgb,a=t.hsl,s=t.hex,g=t.disableAlpha,c=(0,r.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:g}),I=function(t,n){t.hex?i.default.isValidHex(t.hex)&&e({hex:t.hex,source:"hex"},n):t.r||t.g||t.b?e({r:t.r||A.r,g:t.g||A.g,b:t.b||A.b,a:A.a,source:"rgb"},n):t.a&&(t.a<0?t.a=0:t.a>100&&(t.a=100),t.a/=100,e({h:a.h,s:a.s,l:a.l,a:t.a,source:"rgb"},n))};return n.default.createElement("div",{style:c.fields,className:"flexbox-fix"},n.default.createElement("div",{style:c.double},n.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"hex",value:s.replace("#",""),onChange:I})),n.default.createElement("div",{style:c.single},n.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"r",value:A.r,onChange:I,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:c.single},n.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"g",value:A.g,onChange:I,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:c.single},n.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"b",value:A.b,onChange:I,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:c.alpha},n.default.createElement(o.EditableInput,{style:{input:c.input,label:c.label},label:"a",value:Math.round(100*A.a),onChange:I,dragLabel:"true",dragMax:"100"})))};e.default=s},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SketchPresetColors=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},r=s(A(0)),i=s(A(25)),o=s(A(134)),a=A(237);function s(t){return t&&t.__esModule?t:{default:t}}var g=e.SketchPresetColors=function(t){var e=t.colors,A=t.onClick,i=void 0===A?function(){}:A,s=t.onSwatchHover,g=(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":!e||!e.length}),c=function(t,e){i({hex:t,source:"hex"},e)};return r.default.createElement("div",{style:g.colors,className:"flexbox-fix"},e.map((function(t){var e="string"===typeof t?{color:t}:t,A=""+e.color+(e.title||"");return r.default.createElement("div",{key:A,style:g.swatchWrap},r.default.createElement(a.Swatch,n({},e,{style:g.swatch,onClick:c,onHover:s,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+e.color}})))})))};g.propTypes={colors:i.default.arrayOf(i.default.oneOfType([i.default.string,i.default.shape({color:i.default.string,title:i.default.string})])).isRequired},e.default=g},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=void 0;var n=c(A(0)),r=c(A(25)),i=c(A(134)),o=c(A(379)),a=A(237),s=c(A(1351)),g=c(A(1353));function c(t){return t&&t.__esModule?t:{default:t}}var I=e.Slider=function(t){var e=t.hsl,A=t.onChange,r=t.pointer,g=t.styles,c=void 0===g?{}:g,I=t.className,u=void 0===I?"":I,l=(0,i.default)((0,o.default)({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},c));return n.default.createElement("div",{style:l.wrap||{},className:"slider-picker "+u},n.default.createElement("div",{style:l.hue},n.default.createElement(a.Hue,{style:l.Hue,hsl:e,pointer:r,onChange:A})),n.default.createElement("div",{style:l.swatches},n.default.createElement(s.default,{hsl:e,onClick:A})))};I.propTypes={styles:r.default.object},I.defaultProps={pointer:g.default,styles:{}},e.default=(0,a.ColorWrap)(I)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SliderSwatches=void 0;var n=o(A(0)),r=o(A(134)),i=o(A(1352));function o(t){return t&&t.__esModule?t:{default:t}}var a=e.SliderSwatches=function(t){var e=t.onClick,A=t.hsl,o=(0,r.default)({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return n.default.createElement("div",{style:o.swatches},n.default.createElement("div",{style:o.swatch},n.default.createElement(i.default,{hsl:A,offset:".80",active:Math.abs(A.l-.8)<.1&&Math.abs(A.s-.5)<.1,onClick:e,first:!0})),n.default.createElement("div",{style:o.swatch},n.default.createElement(i.default,{hsl:A,offset:".65",active:Math.abs(A.l-.65)<.1&&Math.abs(A.s-.5)<.1,onClick:e})),n.default.createElement("div",{style:o.swatch},n.default.createElement(i.default,{hsl:A,offset:".50",active:Math.abs(A.l-.5)<.1&&Math.abs(A.s-.5)<.1,onClick:e})),n.default.createElement("div",{style:o.swatch},n.default.createElement(i.default,{hsl:A,offset:".35",active:Math.abs(A.l-.35)<.1&&Math.abs(A.s-.5)<.1,onClick:e})),n.default.createElement("div",{style:o.swatch},n.default.createElement(i.default,{hsl:A,offset:".20",active:Math.abs(A.l-.2)<.1&&Math.abs(A.s-.5)<.1,onClick:e,last:!0})),n.default.createElement("div",{style:o.clear}))};e.default=a},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SliderSwatch=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.SliderSwatch=function(t){var e=t.hsl,A=t.offset,i=t.onClick,o=void 0===i?function(){}:i,a=t.active,s=t.first,g=t.last,c=(0,r.default)({default:{swatch:{height:"12px",background:"hsl("+e.h+", 50%, "+100*A+"%)",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:a,first:s,last:g});return n.default.createElement("div",{style:c.swatch,onClick:function(t){return o({h:e.h,s:.5,l:A,source:"hsl"},t)}})};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SliderPointer=void 0;var n=i(A(0)),r=i(A(134));function i(t){return t&&t.__esModule?t:{default:t}}var o=e.SliderPointer=function(){var t=(0,r.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 n.default.createElement("div",{style:t.picker})};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Swatches=void 0;var n=u(A(0)),r=u(A(25)),i=u(A(134)),o=u(A(562)),a=u(A(379)),s=u(A(432)),g=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}(A(1107)),c=A(237),I=u(A(1355));function u(t){return t&&t.__esModule?t:{default:t}}var l=e.Swatches=function(t){var e=t.width,A=t.height,r=t.onChange,g=t.onSwatchHover,u=t.colors,l=t.hex,C=t.styles,h=void 0===C?{}:C,B=t.className,f=void 0===B?"":B,d=(0,i.default)((0,a.default)({default:{picker:{width:e,height:A},overflow:{height:A,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},h)),Q=function(t,e){s.default.isValidHex(t)&&r({hex:t,source:"hex"},e)};return n.default.createElement("div",{style:d.picker,className:"swatches-picker "+f},n.default.createElement(c.Raised,null,n.default.createElement("div",{style:d.overflow},n.default.createElement("div",{style:d.body},(0,o.default)(u,(function(t){return n.default.createElement(I.default,{key:t.toString(),group:t,active:l,onClick:Q,onSwatchHover:g})})),n.default.createElement("div",{style:d.clear})))))};l.propTypes={width:r.default.oneOfType([r.default.string,r.default.number]),height:r.default.oneOfType([r.default.string,r.default.number]),colors:r.default.arrayOf(r.default.arrayOf(r.default.string)),styles:r.default.object},l.defaultProps={width:320,height:240,colors:[[g.red[900],g.red[700],g.red[500],g.red[300],g.red[100]],[g.pink[900],g.pink[700],g.pink[500],g.pink[300],g.pink[100]],[g.purple[900],g.purple[700],g.purple[500],g.purple[300],g.purple[100]],[g.deepPurple[900],g.deepPurple[700],g.deepPurple[500],g.deepPurple[300],g.deepPurple[100]],[g.indigo[900],g.indigo[700],g.indigo[500],g.indigo[300],g.indigo[100]],[g.blue[900],g.blue[700],g.blue[500],g.blue[300],g.blue[100]],[g.lightBlue[900],g.lightBlue[700],g.lightBlue[500],g.lightBlue[300],g.lightBlue[100]],[g.cyan[900],g.cyan[700],g.cyan[500],g.cyan[300],g.cyan[100]],[g.teal[900],g.teal[700],g.teal[500],g.teal[300],g.teal[100]],["#194D33",g.green[700],g.green[500],g.green[300],g.green[100]],[g.lightGreen[900],g.lightGreen[700],g.lightGreen[500],g.lightGreen[300],g.lightGreen[100]],[g.lime[900],g.lime[700],g.lime[500],g.lime[300],g.lime[100]],[g.yellow[900],g.yellow[700],g.yellow[500],g.yellow[300],g.yellow[100]],[g.amber[900],g.amber[700],g.amber[500],g.amber[300],g.amber[100]],[g.orange[900],g.orange[700],g.orange[500],g.orange[300],g.orange[100]],[g.deepOrange[900],g.deepOrange[700],g.deepOrange[500],g.deepOrange[300],g.deepOrange[100]],[g.brown[900],g.brown[700],g.brown[500],g.brown[300],g.brown[100]],[g.blueGrey[900],g.blueGrey[700],g.blueGrey[500],g.blueGrey[300],g.blueGrey[100]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},e.default=(0,c.ColorWrap)(l)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SwatchesGroup=void 0;var n=a(A(0)),r=a(A(134)),i=a(A(562)),o=a(A(1356));function a(t){return t&&t.__esModule?t:{default:t}}var s=e.SwatchesGroup=function(t){var e=t.onClick,A=t.onSwatchHover,a=t.group,s=t.active,g=(0,r.default)({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return n.default.createElement("div",{style:g.group},(0,i.default)(a,(function(t,r){return n.default.createElement(o.default,{key:t,color:t,active:t.toLowerCase()===s,first:0===r,last:r===a.length-1,onClick:e,onSwatchHover:A})})))};e.default=s},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SwatchesColor=void 0;var n=s(A(0)),r=s(A(134)),i=s(A(432)),o=A(237),a=s(A(1357));function s(t){return t&&t.__esModule?t:{default:t}}var g=e.SwatchesColor=function(t){var e=t.color,A=t.onClick,s=void 0===A?function(){}:A,g=t.onSwatchHover,c=t.first,I=t.last,u=t.active,l=(0,r.default)({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:e,marginBottom:"1px"},check:{color:i.default.getContrastingColor(e),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:I,active:u,"color-#FFFFFF":"#FFFFFF"===e,transparent:"transparent"===e});return n.default.createElement(o.Swatch,{color:e,style:l.color,onClick:s,onHover:g,focusStyle:{boxShadow:"0 0 4px "+e}},n.default.createElement("div",{style:l.check},n.default.createElement(a.default,null)))};e.default=g},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t},i=A(0),o=(n=i)&&n.__esModule?n:{default:n};e.default=function(t){var e=t.fill,A=void 0===e?"currentColor":e,n=t.width,i=void 0===n?24:n,a=t.height,s=void 0===a?24:a,g=t.style,c=void 0===g?{}:g,I=function(t,e){var A={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(A[n]=t[n]);return A}(t,["fill","width","height","style"]);return o.default.createElement("svg",r({viewBox:"0 0 24 24",style:r({fill:A,width:i,height:s},c)},I),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Twitter=void 0;var n=c(A(0)),r=c(A(25)),i=c(A(134)),o=c(A(562)),a=c(A(379)),s=c(A(432)),g=A(237);function c(t){return t&&t.__esModule?t:{default:t}}var I=e.Twitter=function(t){var e=t.onChange,A=t.onSwatchHover,r=t.hex,c=t.colors,I=t.width,u=t.triangle,l=t.styles,C=void 0===l?{}:l,h=t.className,B=void 0===h?"":h,f=(0,i.default)((0,a.default)({default:{card:{width:I,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"}}},C),{"hide-triangle":"hide"===u,"top-left-triangle":"top-left"===u,"top-right-triangle":"top-right"===u}),d=function(t,A){s.default.isValidHex(t)&&e({hex:t,source:"hex"},A)};return n.default.createElement("div",{style:f.card,className:"twitter-picker "+B},n.default.createElement("div",{style:f.triangleShadow}),n.default.createElement("div",{style:f.triangle}),n.default.createElement("div",{style:f.body},(0,o.default)(c,(function(t,e){return n.default.createElement(g.Swatch,{key:e,color:t,hex:t,style:f.swatch,onClick:d,onHover:A,focusStyle:{boxShadow:"0 0 4px "+t}})})),n.default.createElement("div",{style:f.hash},"#"),n.default.createElement(g.EditableInput,{label:null,style:{input:f.input},value:r.replace("#",""),onChange:d}),n.default.createElement("div",{style:f.clear})))};I.propTypes={width:r.default.oneOfType([r.default.string,r.default.number]),triangle:r.default.oneOf(["hide","top-left","top-right"]),colors:r.default.arrayOf(r.default.string),styles:r.default.object},I.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},e.default=(0,g.ColorWrap)(I)},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(A(1360)),i=n(A(1361)),o=["altKey","bubbles","cancelable","ctrlKey","currentTarget","eventPhase","metaKey","shiftKey","target","timeStamp","view","type"];function a(t){return null===t||void 0===t}var s=[{reg:/^key/,props:["char","charCode","key","keyCode","which"],fix:function(t,e){a(t.which)&&(t.which=a(e.charCode)?e.keyCode:e.charCode),void 0===t.metaKey&&(t.metaKey=t.ctrlKey)}},{reg:/^touch/,props:["touches","changedTouches","targetTouches"]},{reg:/^hashchange$/,props:["newURL","oldURL"]},{reg:/^gesturechange$/i,props:["rotation","scale"]},{reg:/^(mousewheel|DOMMouseScroll)$/,props:[],fix:function(t,e){var A=void 0,n=void 0,r=void 0,i=e.wheelDelta,o=e.axis,a=e.wheelDeltaY,s=e.wheelDeltaX,g=e.detail;i&&(r=i/120),g&&(r=0-(g%3===0?g/3:g)),void 0!==o&&(o===t.HORIZONTAL_AXIS?(n=0,A=0-r):o===t.VERTICAL_AXIS&&(A=0,n=r)),void 0!==a&&(n=a/120),void 0!==s&&(A=-1*s/120),A||n||(n=r),void 0!==A&&(t.deltaX=A),void 0!==n&&(t.deltaY=n),void 0!==r&&(t.delta=r)}},{reg:/^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i,props:["buttons","clientX","clientY","button","offsetX","relatedTarget","which","fromElement","toElement","offsetY","pageX","pageY","screenX","screenY"],fix:function(t,e){var A=void 0,n=void 0,r=void 0,i=t.target,o=e.button;return i&&a(t.pageX)&&!a(e.clientX)&&(n=(A=i.ownerDocument||document).documentElement,r=A.body,t.pageX=e.clientX+(n&&n.scrollLeft||r&&r.scrollLeft||0)-(n&&n.clientLeft||r&&r.clientLeft||0),t.pageY=e.clientY+(n&&n.scrollTop||r&&r.scrollTop||0)-(n&&n.clientTop||r&&r.clientTop||0)),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),!t.relatedTarget&&t.fromElement&&(t.relatedTarget=t.fromElement===i?t.toElement:t.fromElement),t}}];function g(){return!0}function c(){return!1}function I(t){var e=t.type,A="function"===typeof t.stopPropagation||"boolean"===typeof t.cancelBubble;r.default.call(this),this.nativeEvent=t;var n=c;"defaultPrevented"in t?n=t.defaultPrevented?g:c:"getPreventDefault"in t?n=t.getPreventDefault()?g:c:"returnValue"in t&&(n=!1===t.returnValue?g:c),this.isDefaultPrevented=n;var i=[],a=void 0,I=void 0,u=o.concat();for(s.forEach((function(t){e.match(t.reg)&&(u=u.concat(t.props),t.fix&&i.push(t.fix))})),a=u.length;a;)this[I=u[--a]]=t[I];for(!this.target&&A&&(this.target=t.srcElement||document),this.target&&3===this.target.nodeType&&(this.target=this.target.parentNode),a=i.length;a;)(0,i[--a])(this,t);this.timeStamp=t.timeStamp||Date.now()}var u=r.default.prototype;(0,i.default)(I.prototype,u,{constructor:I,preventDefault:function(){var t=this.nativeEvent;t.preventDefault?t.preventDefault():t.returnValue=!1,u.preventDefault.call(this)},stopPropagation:function(){var t=this.nativeEvent;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,u.stopPropagation.call(this)}}),e.default=I,t.exports=e.default},function(t,e,A){"use strict";function n(){return!1}function r(){return!0}function i(){this.timeStamp=Date.now(),this.target=void 0,this.currentTarget=void 0}Object.defineProperty(e,"__esModule",{value:!0}),i.prototype={isEventObject:1,constructor:i,isDefaultPrevented:n,isPropagationStopped:n,isImmediatePropagationStopped:n,preventDefault:function(){this.isDefaultPrevented=r},stopPropagation:function(){this.isPropagationStopped=r},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=r,this.stopPropagation()},halt:function(t){t?this.stopImmediatePropagation():this.stopPropagation(),this.preventDefault()}},e.default=i,t.exports=e.default},function(t,e,A){"use strict";var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function o(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},A=0;A<10;A++)e["_"+String.fromCharCode(A)]=A;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(r){return!1}}()?Object.assign:function(t,e){for(var A,a,s=o(t),g=1;g<arguments.length;g++){for(var c in A=Object(arguments[g]))r.call(A,c)&&(s[c]=A[c]);if(n){a=n(A);for(var I=0;I<a.length;I++)i.call(A,a[I])&&(s[a[I]]=A[a[I]])}}return s}},function(t,e,A){var n=A(729);t.exports=function(t,e){var A=n(t,e);return A?A.version:null}},function(t,e,A){var n=A(729);t.exports=function(t,e){var A=n(t.trim().replace(/^[=v]+/,""),e);return A?A.version:null}},function(t,e,A){var n=A(347);t.exports=function(t,e,A,r){"string"===typeof A&&(r=A,A=void 0);try{return new n(t,A).inc(e,r).version}catch(i){return null}}},function(t,e,A){var n=A(729),r=A(934);t.exports=function(t,e){if(r(t,e))return null;var A=n(t),i=n(e),o=A.prerelease.length||i.prerelease.length,a=o?"pre":"",s=o?"prerelease":"";for(var g in A)if(("major"===g||"minor"===g||"patch"===g)&&A[g]!==i[g])return a+g;return s}},function(t,e,A){var n=A(347);t.exports=function(t,e){return new n(t,e).major}},function(t,e,A){var n=A(347);t.exports=function(t,e){return new n(t,e).minor}},function(t,e,A){var n=A(347);t.exports=function(t,e){return new n(t,e).patch}},function(t,e,A){var n=A(729);t.exports=function(t,e){var A=n(t,e);return A&&A.prerelease.length?A.prerelease:null}},function(t,e,A){var n=A(433);t.exports=function(t,e,A){return n(e,t,A)}},function(t,e,A){var n=A(433);t.exports=function(t,e){return n(t,e,!0)}},function(t,e,A){var n=A(935);t.exports=function(t,e){return t.sort((function(t,A){return n(t,A,e)}))}},function(t,e,A){var n=A(935);t.exports=function(t,e){return t.sort((function(t,A){return n(A,t,e)}))}},function(t,e,A){var n=A(347),r=A(729),i=A(728),o=i.re,a=i.t;t.exports=function(t,e){if(t instanceof n)return t;if("number"===typeof t&&(t=String(t)),"string"!==typeof t)return null;var A=null;if((e=e||{}).rtl){for(var i;(i=o[a.COERCERTL].exec(t))&&(!A||A.index+A[0].length!==t.length);)A&&i.index+i[0].length===A.index+A[0].length||(A=i),o[a.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;o[a.COERCERTL].lastIndex=-1}else A=t.match(o[a.COERCE]);return null===A?null:r("".concat(A[2],".").concat(A[3]||"0",".").concat(A[4]||"0"),e)}},function(t,e,A){var n=A(434);t.exports=function(t,e){return new n(t,e).set.map((function(t){return t.map((function(t){return t.value})).join(" ").trim().split(" ")}))}},function(t,e,A){var n=A(347),r=A(434);t.exports=function(t,e,A){var i=null,o=null,a=null;try{a=new r(e,A)}catch(s){return null}return t.forEach((function(t){a.test(t)&&(i&&-1!==o.compare(t)||(o=new n(i=t,A)))})),i}},function(t,e,A){var n=A(347),r=A(434);t.exports=function(t,e,A){var i=null,o=null,a=null;try{a=new r(e,A)}catch(s){return null}return t.forEach((function(t){a.test(t)&&(i&&1!==o.compare(t)||(o=new n(i=t,A)))})),i}},function(t,e,A){var n=A(347),r=A(434),i=A(818);t.exports=function(t,e){t=new r(t,e);var A=new n("0.0.0");if(t.test(A))return A;if(A=new n("0.0.0-0"),t.test(A))return A;A=null;for(var o=0;o<t.set.length;++o){t.set[o].forEach((function(t){var e=new n(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":A&&!i(A,e)||(A=e);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: ".concat(t.operator))}}))}return A&&t.test(A)?A:null}},function(t,e,A){var n=A(434);t.exports=function(t,e){try{return new n(t,e).range||"*"}catch(A){return null}}},function(t,e,A){var n=A(939);t.exports=function(t,e,A){return n(t,e,">",A)}},function(t,e,A){var n=A(939);t.exports=function(t,e,A){return n(t,e,"<",A)}},function(t,e,A){var n=A(434);t.exports=function(t,e,A){return t=new n(t,A),e=new n(e,A),t.intersects(e)}},function(t,e,A){var n=A(1384),r=A(1110),i=A(820),o=A(433);t.exports=function(t,e,A){var a,s=[],g=null,c=null,I=t.sort((function(t,e){return o(t,e,A)})),u=r(I);try{for(u.s();!(a=u.n()).done;){var l=a.value;i(l,e,A)?(c=l,g||(g=l)):(c&&s.push([g,c]),c=null,g=null)}}catch(y){u.e(y)}finally{u.f()}g&&s.push([g,null]);for(var C=[],h=0,B=s;h<B.length;h++){var f=n(B[h],2),d=f[0],Q=f[1];d===Q?C.push(d):Q||d!==I[0]?Q?d===I[0]?C.push("<=".concat(Q)):C.push("".concat(d," - ").concat(Q)):C.push(">=".concat(d)):C.push("*")}var E=C.join(" || "),p="string"===typeof e.raw?e.raw:String(e);return E.length<p.length?E:e}},function(t,e,A){var n=A(1385),r=A(1386),i=A(548),o=A(1387);t.exports=function(t,e){return n(t)||r(t,e)||i(t,e)||o()}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}}},function(t,e){t.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(t,e,A){var n=A(1110),r=A(434),i=A(819).ANY,o=A(820),a=A(433),s=function(t,e,A){if(1===t.length&&t[0].semver===i)return 1===e.length&&e[0].semver===i;var r,s,I,u,l=new Set,C=n(t);try{for(C.s();!(I=C.n()).done;){var h=I.value;">"===h.operator||">="===h.operator?r=g(r,h,A):"<"===h.operator||"<="===h.operator?s=c(s,h,A):l.add(h.semver)}}catch(w){C.e(w)}finally{C.f()}if(l.size>1)return null;if(r&&s){if((u=a(r.semver,s.semver,A))>0)return null;if(0===u&&(">="!==r.operator||"<="!==s.operator))return null}var B,f,d,Q=n(l);try{for(Q.s();!(B=Q.n()).done;){var E=B.value;if(r&&!o(E,String(r),A))return null;if(s&&!o(E,String(s),A))return null;var p,y=n(e);try{for(y.s();!(p=y.n()).done;){var v=p.value;if(!o(E,String(v),A))return!1}}catch(w){y.e(w)}finally{y.f()}return!0}}catch(w){Q.e(w)}finally{Q.f()}var m,b=n(e);try{for(b.s();!(m=b.n()).done;){var F=m.value;if(d=d||">"===F.operator||">="===F.operator,f=f||"<"===F.operator||"<="===F.operator,r)if(">"===F.operator||">="===F.operator){if(g(r,F,A)===F)return!1}else if(">="===r.operator&&!o(r.semver,String(F),A))return!1;if(s)if("<"===F.operator||"<="===F.operator){if(c(s,F,A)===F)return!1}else if("<="===s.operator&&!o(s.semver,String(F),A))return!1;if(!F.operator&&(s||r)&&0!==u)return!1}}catch(w){b.e(w)}finally{b.f()}return!(r&&f&&!s&&0!==u)&&!(s&&d&&!r&&0!==u)},g=function(t,e,A){if(!t)return e;var n=a(t.semver,e.semver,A);return n>0?t:n<0||">"===e.operator&&">="===t.operator?e:t},c=function(t,e,A){if(!t)return e;var n=a(t.semver,e.semver,A);return n<0?t:n>0||"<"===e.operator&&"<="===t.operator?e:t};t.exports=function(t,e,A){t=new r(t,A),e=new r(e,A);var i,o=!1,a=n(t.set);try{t:for(a.s();!(i=a.n()).done;){var g,c=i.value,I=n(e.set);try{for(I.s();!(g=I.n()).done;){var u=g.value,l=s(c,u,A);if(o=o||null!==l,l)continue t}}catch(C){I.e(C)}finally{I.f()}if(o)return!1}}catch(C){a.e(C)}finally{a.f()}return!0}},function(t,e){Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,value:function t(){var e=isNaN(arguments[0])?1:Number(arguments[0]);return e?Array.prototype.reduce.call(this,(function(A,n){return Array.isArray(n)?A.push.apply(A,t.call(n,e-1)):A.push(n),A}),[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,value:function(t){return Array.prototype.map.apply(this,arguments).flat()},writable:!0})},function(t,e,A){"use strict";var n=A(29),r=A(10),i=(A(25),A(195));var o=function(t){var e=function(e){var A=t(e);return e.css?Object(r.a)({},Object(i.a)(A,t(Object(r.a)({theme:e.theme},e.css))),{},function(t,e){var A={};return Object.keys(t).forEach((function(n){-1===e.indexOf(n)&&(A[n]=t[n])})),A}(e.css,[t.filterProps])):A};return e.propTypes={},e.filterProps=["css"].concat(Object(n.a)(t.filterProps)),e};var a=function(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];var n=function(t){return e.reduce((function(e,A){var n=A(t);return n?Object(i.a)(e,n):e}),{})};return n.propTypes={},n.filterProps=e.reduce((function(t,e){return t.concat(e.filterProps)}),[]),n},s=A(1),g=A(350);function c(t,e){return e&&"string"===typeof e?e.split(".").reduce((function(t,e){return t&&t[e]?t[e]:null}),t):null}var I=function(t){var e=t.prop,A=t.cssProperty,n=void 0===A?t.prop:A,r=t.themeKey,i=t.transform,o=function(t){if(null==t[e])return null;var A=t[e],o=c(t.theme,r)||{};return Object(g.a)(t,A,(function(t){var e;return"function"===typeof o?e=o(t):Array.isArray(o)?e=o[t]||t:(e=c(o,t)||t,i&&(e=i(e))),!1===n?e:Object(s.a)({},n,e)}))};return o.propTypes={},o.filterProps=[e],o};function u(t){return"number"!==typeof t?t:"".concat(t,"px solid")}var l=a(I({prop:"border",themeKey:"borders",transform:u}),I({prop:"borderTop",themeKey:"borders",transform:u}),I({prop:"borderRight",themeKey:"borders",transform:u}),I({prop:"borderBottom",themeKey:"borders",transform:u}),I({prop:"borderLeft",themeKey:"borders",transform:u}),I({prop:"borderColor",themeKey:"palette"}),I({prop:"borderRadius",themeKey:"shape"})),C=a(I({prop:"displayPrint",cssProperty:!1,transform:function(t){return{"@media print":{display:t}}}}),I({prop:"display"}),I({prop:"overflow"}),I({prop:"textOverflow"}),I({prop:"visibility"}),I({prop:"whiteSpace"})),h=a(I({prop:"flexBasis"}),I({prop:"flexDirection"}),I({prop:"flexWrap"}),I({prop:"justifyContent"}),I({prop:"alignItems"}),I({prop:"alignContent"}),I({prop:"order"}),I({prop:"flex"}),I({prop:"flexGrow"}),I({prop:"flexShrink"}),I({prop:"alignSelf"}),I({prop:"justifyItems"}),I({prop:"justifySelf"})),B=a(I({prop:"gridGap"}),I({prop:"gridColumnGap"}),I({prop:"gridRowGap"}),I({prop:"gridColumn"}),I({prop:"gridRow"}),I({prop:"gridAutoFlow"}),I({prop:"gridAutoColumns"}),I({prop:"gridAutoRows"}),I({prop:"gridTemplateColumns"}),I({prop:"gridTemplateRows"}),I({prop:"gridTemplateAreas"}),I({prop:"gridArea"})),f=a(I({prop:"position"}),I({prop:"zIndex",themeKey:"zIndex"}),I({prop:"top"}),I({prop:"right"}),I({prop:"bottom"}),I({prop:"left"})),d=a(I({prop:"color",themeKey:"palette"}),I({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"})),Q=I({prop:"boxShadow",themeKey:"shadows"});function E(t){return t<=1?"".concat(100*t,"%"):t}var p=I({prop:"width",transform:E}),y=I({prop:"maxWidth",transform:E}),v=I({prop:"minWidth",transform:E}),m=I({prop:"height",transform:E}),b=I({prop:"maxHeight",transform:E}),F=I({prop:"minHeight",transform:E}),w=(I({prop:"size",cssProperty:"width",transform:E}),I({prop:"size",cssProperty:"height",transform:E}),a(p,y,v,m,b,F,I({prop:"boxSizing"}))),S=A(943),D=a(I({prop:"fontFamily",themeKey:"typography"}),I({prop:"fontSize",themeKey:"typography"}),I({prop:"fontStyle",themeKey:"typography"}),I({prop:"fontWeight",themeKey:"typography"}),I({prop:"letterSpacing"}),I({prop:"lineHeight"}),I({prop:"textAlign"})),R=A(30),U=A(0),G=A.n(U),N=A(32),k=A(349),x=A.n(k),O=A(595);function M(t,e){var A={};return Object.keys(t).forEach((function(n){-1===e.indexOf(n)&&(A[n]=t[n])})),A}var L=A(192),_=function(t){var e=function(t){return function(e){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A.name,i=Object(R.a)(A,["name"]);var o,a=n,s="function"===typeof e?function(t){return{root:function(A){return e(Object(r.a)({theme:t},A))}}}:{root:e},g=Object(O.a)(s,Object(r.a)({Component:t,name:n||t.displayName,classNamePrefix:a},i));e.filterProps&&(o=e.filterProps,delete e.filterProps),e.propTypes&&(e.propTypes,delete e.propTypes);var c=G.a.forwardRef((function(e,A){var n=e.children,i=e.className,a=e.clone,s=e.component,c=Object(R.a)(e,["children","className","clone","component"]),I=g(e),u=Object(N.a)(I.root,i),l=c;if(o&&(l=M(l,o)),a)return G.a.cloneElement(n,Object(r.a)({className:Object(N.a)(n.props.className,u)},l));if("function"===typeof n)return n(Object(r.a)({className:u},l));var C=s||t;return G.a.createElement(C,Object(r.a)({ref:A,className:u},l),n)}));return x()(c,t),c}}(t);return function(t,A){return e(t,Object(r.a)({defaultTheme:L.a},A))}},J=o(a(l,C,h,B,f,d,Q,w,S.b,D)),T=_("div")(J,{name:"MuiBox"});e.a=T},function(t,e,A){"use strict";var n=A(173),r=A(196),i=(A(25),A(0)),o=A.n(i),a=A(68),s=A.n(a),g=!1,c=A(253),I=function(t){function e(e,A){var n;n=t.call(this,e,A)||this;var r,i=A&&!A.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?i?(r="exited",n.appearStatus="entering"):r="entered":r=e.unmountOnExit||e.mountOnEnter?"unmounted":"exited",n.state={status:r},n.nextCallback=null,n}Object(r.a)(e,t),e.getDerivedStateFromProps=function(t,e){return t.in&&"unmounted"===e.status?{status:"exited"}:null};var A=e.prototype;return A.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},A.componentDidUpdate=function(t){var e=null;if(t!==this.props){var A=this.state.status;this.props.in?"entering"!==A&&"entered"!==A&&(e="entering"):"entering"!==A&&"entered"!==A||(e="exiting")}this.updateStatus(!1,e)},A.componentWillUnmount=function(){this.cancelNextCallback()},A.getTimeouts=function(){var t,e,A,n=this.props.timeout;return t=e=A=n,null!=n&&"number"!==typeof n&&(t=n.exit,e=n.enter,A=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:A}},A.updateStatus=function(t,e){void 0===t&&(t=!1),null!==e?(this.cancelNextCallback(),"entering"===e?this.performEnter(t):this.performExit()):this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},A.performEnter=function(t){var e=this,A=this.props.enter,n=this.context?this.context.isMounting:t,r=this.props.nodeRef?[n]:[s.a.findDOMNode(this),n],i=r[0],o=r[1],a=this.getTimeouts(),c=n?a.appear:a.enter;!t&&!A||g?this.safeSetState({status:"entered"},(function(){e.props.onEntered(i)})):(this.props.onEnter(i,o),this.safeSetState({status:"entering"},(function(){e.props.onEntering(i,o),e.onTransitionEnd(c,(function(){e.safeSetState({status:"entered"},(function(){e.props.onEntered(i,o)}))}))})))},A.performExit=function(){var t=this,e=this.props.exit,A=this.getTimeouts(),n=this.props.nodeRef?void 0:s.a.findDOMNode(this);e&&!g?(this.props.onExit(n),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(n),t.onTransitionEnd(A.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(n)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(n)}))},A.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},A.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},A.setNextCallback=function(t){var e=this,A=!0;return this.nextCallback=function(n){A&&(A=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){A=!1},this.nextCallback},A.onTransitionEnd=function(t,e){this.setNextCallback(e);var A=this.props.nodeRef?this.props.nodeRef.current:s.a.findDOMNode(this),n=null==t&&!this.props.addEndListener;if(A&&!n){if(this.props.addEndListener){var r=this.props.nodeRef?[this.nextCallback]:[A,this.nextCallback],i=r[0],o=r[1];this.props.addEndListener(i,o)}null!=t&&setTimeout(this.nextCallback,t)}else setTimeout(this.nextCallback,0)},A.render=function(){var t=this.state.status;if("unmounted"===t)return null;var e=this.props,A=e.children,r=(e.in,e.mountOnEnter,e.unmountOnExit,e.appear,e.enter,e.exit,e.timeout,e.addEndListener,e.onEnter,e.onEntering,e.onEntered,e.onExit,e.onExiting,e.onExited,e.nodeRef,Object(n.a)(e,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.a.createElement(c.a.Provider,{value:null},"function"===typeof A?A(t,r):o.a.cloneElement(o.a.Children.only(A),r))},e}(o.a.Component);function u(){}I.contextType=c.a,I.propTypes={},I.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:u,onEntering:u,onEntered:u,onExit:u,onExiting:u,onExited:u},I.UNMOUNTED="unmounted",I.EXITED="exited",I.ENTERING="entering",I.ENTERED="entered",I.EXITING="exiting";e.a=I},function(t,e,A){t.exports=A(1415).default,t.exports.utils=A(967),t.exports.Responsive=A(1467).default,t.exports.Responsive.utils=A(1420),t.exports.WidthProvider=A(1468).default},function(t,e,A){"use strict";var n={},r={};function i(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function o(t){var e=Object.create(null),A=[];return t.forEach((function(t){for(var n in t)n in e||A.push(e[n]=n)})),A}function a(t,e){var A=t+"",n=A.length;return n<e?new Array(e-n+1).join(0)+A:A}function s(t){var e,A=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+a(-e,6):e>9999?"+"+a(e,6):a(e,4))+"-"+a(t.getUTCMonth()+1,2)+"-"+a(t.getUTCDate(),2)+(i?"T"+a(A,2)+":"+a(n,2)+":"+a(r,2)+"."+a(i,3)+"Z":r?"T"+a(A,2)+":"+a(n,2)+":"+a(r,2)+"Z":n||A?"T"+a(A,2)+":"+a(n,2)+"Z":"")}e.a=function(t){var e=new RegExp('["'+t+"\n\r]"),A=t.charCodeAt(0);function a(t,e){var i,o=[],a=t.length,s=0,g=0,c=a<=0,I=!1;function u(){if(c)return r;if(I)return I=!1,n;var e,i,o=s;if(34===t.charCodeAt(o)){for(;s++<a&&34!==t.charCodeAt(s)||34===t.charCodeAt(++s););return(e=s)>=a?c=!0:10===(i=t.charCodeAt(s++))?I=!0:13===i&&(I=!0,10===t.charCodeAt(s)&&++s),t.slice(o+1,e-1).replace(/""/g,'"')}for(;s<a;){if(10===(i=t.charCodeAt(e=s++)))I=!0;else if(13===i)I=!0,10===t.charCodeAt(s)&&++s;else if(i!==A)continue;return t.slice(o,e)}return c=!0,t.slice(o,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(i=u())!==r;){for(var l=[];i!==n&&i!==r;)l.push(i),i=u();e&&null==(l=e(l,g++))||o.push(l)}return o}function g(e,A){return e.map((function(e){return A.map((function(t){return I(e[t])})).join(t)}))}function c(e){return e.map(I).join(t)}function I(t){return null==t?"":t instanceof Date?s(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var A,n,r=a(t,(function(t,r){if(A)return A(t,r-1);n=t,A=e?function(t,e){var A=i(t);return function(n,r){return e(A(n),r,t)}}(t,e):i(t)}));return r.columns=n||[],r},parseRows:a,format:function(e,A){return null==A&&(A=o(e)),[A.map(I).join(t)].concat(g(e,A)).join("\n")},formatBody:function(t,e){return null==e&&(e=o(t)),g(t,e).join("\n")},formatRows:function(t){return t.map(c).join("\n")},formatRow:c,formatValue:I}}},function(t,e,A){var n,r=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function r(t,e){if(!n[t]){n[t]={};for(var A=0;A<t.length;A++)n[t][t.charAt(A)]=A}return n[t][e]}var i={compressToBase64:function(t){if(null==t)return"";var A=i._compress(t,6,(function(t){return e.charAt(t)}));switch(A.length%4){default:case 0:return A;case 1:return A+"===";case 2:return A+"==";case 3:return A+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:i._decompress(t.length,32,(function(A){return r(e,t.charAt(A))}))},compressToUTF16:function(e){return null==e?"":i._compress(e,15,(function(e){return t(e+32)}))+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:i._decompress(t.length,16384,(function(e){return t.charCodeAt(e)-32}))},compressToUint8Array:function(t){for(var e=i.compress(t),A=new Uint8Array(2*e.length),n=0,r=e.length;n<r;n++){var o=e.charCodeAt(n);A[2*n]=o>>>8,A[2*n+1]=o%256}return A},decompressFromUint8Array:function(e){if(null===e||void 0===e)return i.decompress(e);for(var A=new Array(e.length/2),n=0,r=A.length;n<r;n++)A[n]=256*e[2*n]+e[2*n+1];var o=[];return A.forEach((function(e){o.push(t(e))})),i.decompress(o.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":i._compress(t,6,(function(t){return A.charAt(t)}))},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),i._decompress(t.length,32,(function(e){return r(A,t.charAt(e))})))},compress:function(e){return i._compress(e,16,(function(e){return t(e)}))},_compress:function(t,e,A){if(null==t)return"";var n,r,i,o={},a={},s="",g="",c="",I=2,u=3,l=2,C=[],h=0,B=0;for(i=0;i<t.length;i+=1)if(s=t.charAt(i),Object.prototype.hasOwnProperty.call(o,s)||(o[s]=u++,a[s]=!0),g=c+s,Object.prototype.hasOwnProperty.call(o,g))c=g;else{if(Object.prototype.hasOwnProperty.call(a,c)){if(c.charCodeAt(0)<256){for(n=0;n<l;n++)h<<=1,B==e-1?(B=0,C.push(A(h)),h=0):B++;for(r=c.charCodeAt(0),n=0;n<8;n++)h=h<<1|1&r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r>>=1}else{for(r=1,n=0;n<l;n++)h=h<<1|r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r=0;for(r=c.charCodeAt(0),n=0;n<16;n++)h=h<<1|1&r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r>>=1}0==--I&&(I=Math.pow(2,l),l++),delete a[c]}else for(r=o[c],n=0;n<l;n++)h=h<<1|1&r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r>>=1;0==--I&&(I=Math.pow(2,l),l++),o[g]=u++,c=String(s)}if(""!==c){if(Object.prototype.hasOwnProperty.call(a,c)){if(c.charCodeAt(0)<256){for(n=0;n<l;n++)h<<=1,B==e-1?(B=0,C.push(A(h)),h=0):B++;for(r=c.charCodeAt(0),n=0;n<8;n++)h=h<<1|1&r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r>>=1}else{for(r=1,n=0;n<l;n++)h=h<<1|r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r=0;for(r=c.charCodeAt(0),n=0;n<16;n++)h=h<<1|1&r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r>>=1}0==--I&&(I=Math.pow(2,l),l++),delete a[c]}else for(r=o[c],n=0;n<l;n++)h=h<<1|1&r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r>>=1;0==--I&&(I=Math.pow(2,l),l++)}for(r=2,n=0;n<l;n++)h=h<<1|1&r,B==e-1?(B=0,C.push(A(h)),h=0):B++,r>>=1;for(;;){if(h<<=1,B==e-1){C.push(A(h));break}B++}return C.join("")},decompress:function(t){return null==t?"":""==t?null:i._decompress(t.length,32768,(function(e){return t.charCodeAt(e)}))},_decompress:function(e,A,n){var r,i,o,a,s,g,c,I=[],u=4,l=4,C=3,h="",B=[],f={val:n(0),position:A,index:1};for(r=0;r<3;r+=1)I[r]=r;for(o=0,s=Math.pow(2,2),g=1;g!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=A,f.val=n(f.index++)),o|=(a>0?1:0)*g,g<<=1;switch(o){case 0:for(o=0,s=Math.pow(2,8),g=1;g!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=A,f.val=n(f.index++)),o|=(a>0?1:0)*g,g<<=1;c=t(o);break;case 1:for(o=0,s=Math.pow(2,16),g=1;g!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=A,f.val=n(f.index++)),o|=(a>0?1:0)*g,g<<=1;c=t(o);break;case 2:return""}for(I[3]=c,i=c,B.push(c);;){if(f.index>e)return"";for(o=0,s=Math.pow(2,C),g=1;g!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=A,f.val=n(f.index++)),o|=(a>0?1:0)*g,g<<=1;switch(c=o){case 0:for(o=0,s=Math.pow(2,8),g=1;g!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=A,f.val=n(f.index++)),o|=(a>0?1:0)*g,g<<=1;I[l++]=t(o),c=l-1,u--;break;case 1:for(o=0,s=Math.pow(2,16),g=1;g!=s;)a=f.val&f.position,f.position>>=1,0==f.position&&(f.position=A,f.val=n(f.index++)),o|=(a>0?1:0)*g,g<<=1;I[l++]=t(o),c=l-1,u--;break;case 2:return B.join("")}if(0==u&&(u=Math.pow(2,C),C++),I[c])h=I[c];else{if(c!==l)return null;h=i+i.charAt(0)}B.push(h),I[l++]=i+h.charAt(0),i=h,0==--u&&(u=Math.pow(2,C),C++)}}};return i}();void 0===(n=function(){return r}.call(e,A,e,t))||(t.exports=n)},,,,,,,,,,,,,,,,,,,function(t,e,A){"use strict";A.d(e,"a",(function(){return d}));var n=A(1),r=A(5),i=A(14),o=A(16),a=A(7),s=A(255),g=A(211);function c(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function I(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?c(Object(A),!0).forEach((function(e){Object(n.a)(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):c(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function u(t){var e=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(t){return!1}}();return function(){var A,n=Object(a.a)(t);if(e){var r=Object(a.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(o.a)(this,A)}}var l=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]),C=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]),h=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]),B=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]),f={POSITION:{size:3,value:new Float32Array(C)},NORMAL:{size:3,value:new Float32Array(h)},TEXCOORD_0:{size:2,value:new Float32Array(B)}},d=function(t){Object(i.a)(A,t);var e=u(A);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r.a)(this,A);var n=t.id,i=void 0===n?Object(g.c)("cube-geometry"):n;return e.call(this,I(I({},t),{},{id:i,indices:{size:1,value:new Uint16Array(l)},attributes:I(I({},f),t.attributes)}))}return A}(s.a)},function(t,e,A){"use strict";A.d(e,"a",(function(){return I}));var n=A(5),r=A(14),i=A(16),o=A(7),a=A(412),s=A(255);function g(t){var e=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(t){return!1}}();return function(){var A,n=Object(o.a)(t);if(e){var r=Object(o.a)(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Object(i.a)(this,A)}}var c=[-1,-1,1,-1,-1,1,1,1],I=function(t){Object(r.a)(A,t);var e=g(A);function A(t,r){var i;Object(n.a)(this,A);var o=c.map((function(t){return-1===t?0:t}));return(i=e.call(this,t,Object.assign({},r,{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 s.a({drawMode:5,vertexCount:4,attributes:{aClipSpacePosition:{size:2,value:new Float32Array(c)},aTexCoord:{size:2,value:new Float32Array(o)},aCoordinate:{size:2,value:new Float32Array(o)}}})}))).setVertexCount(4),i}return A}(a.a)},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=c(A(0)),r=c(A(1167)),i=c(A(183)),o=A(967),a=A(1416),s=c(A(1457)),g=c(A(1466));function c(t){return t&&t.__esModule?t:{default:t}}function I(t){return(I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function l(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?u(Object(A),!0).forEach((function(e){y(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):u(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function C(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return h(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return h(t,e)}(t)||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 h(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function B(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=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(t){return!1}}();return function(){var A,n=p(t);if(e){var r=p(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Q(this,A)}}function Q(t,e){return!e||"object"!==I(e)&&"function"!==typeof e?E(t):e}function E(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var v=!1;try{v=/firefox/i.test(navigator.userAgent)}catch(b){}var m=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(I,t);var e,A,g,c=d(I);function I(t,e){var A;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,I),y(E(A=c.call(this,t,e)),"state",{activeDrag:null,layout:(0,o.synchronizeLayoutWithChildren)(A.props.layout,A.props.children,A.props.cols,(0,o.compactType)(A.props)),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),y(E(A),"dragEnterCounter",0),y(E(A),"onDragOver",(function(t){if(v&&-1===t.nativeEvent.target.className.indexOf("react-grid-layout"))return!1;var e=A.props,r=e.droppingItem,i=e.margin,o=e.cols,s=e.rowHeight,g=e.maxRows,c=e.width,I=e.containerPadding,u=A.state.layout,h=t.nativeEvent,B=h.layerX,f=h.layerY,d={left:B,top:f,e:t};if(A.state.droppingDOMNode){if(A.state.droppingPosition){var Q=A.state.droppingPosition,E=Q.left,p=Q.top;(E!=B||p!=f)&&A.setState({droppingPosition:d})}}else{var y={cols:o,margin:i,maxRows:g,rowHeight:s,containerWidth:c,containerPadding:I||i},m=(0,a.calcXY)(y,f,B,r.w,r.h);A.setState({droppingDOMNode:n.default.createElement("div",{key:r.i}),droppingPosition:d,layout:[].concat(C(u),[l(l({},r),{},{x:m.x,y:m.y,static:!1,isDraggable:!0})])})}t.stopPropagation(),t.preventDefault()})),y(E(A),"removeDroppingPlaceholder",(function(){var t=A.props,e=t.droppingItem,n=t.cols,r=A.state.layout,i=(0,o.compact)(r.filter((function(t){return t.i!==e.i})),(0,o.compactType)(A.props),n);A.setState({layout:i,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),y(E(A),"onDragLeave",(function(){A.dragEnterCounter--,0===A.dragEnterCounter&&A.removeDroppingPlaceholder()})),y(E(A),"onDragEnter",(function(){A.dragEnterCounter++})),y(E(A),"onDrop",(function(t){var e=A.props.droppingItem,n=A.state.layout,r=n.find((function(t){return t.i===e.i}));A.dragEnterCounter=0,A.removeDroppingPlaceholder(),A.props.onDrop(n,r,t)})),(0,o.autoBindHandlers)(E(A),["onDragStart","onDrag","onDragStop","onResizeStart","onResize","onResizeStop"]),A}return e=I,g=[{key:"getDerivedStateFromProps",value:function(t,e){var A;return e.activeDrag?null:((0,r.default)(t.layout,e.propsLayout)&&t.compactType===e.compactType?(0,o.childrenEqual)(t.children,e.children)||(A=e.layout):A=t.layout,A?{layout:(0,o.synchronizeLayoutWithChildren)(A,t.children,t.cols,(0,o.compactType)(t)),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}}],(A=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(t,e){return this.props.children!==t.children||!(0,o.fastRGLPropsEqual)(this.props,t,r.default)||this.state.activeDrag!==e.activeDrag||this.state.mounted!==e.mounted||this.state.droppingPosition!==e.droppingPosition}},{key:"componentDidUpdate",value:function(t,e){if(!this.state.activeDrag){var A=this.state.layout,n=e.layout;this.onLayoutMaybeChanged(A,n)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var t=(0,o.bottom)(this.state.layout),e=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+2*e+"px"}}},{key:"onDragStart",value:function(t,e,A,n){var r=n.e,i=n.node,a=this.state.layout,s=(0,o.getLayoutItem)(a,t);if(s)return this.setState({oldDragItem:(0,o.cloneLayoutItem)(s),oldLayout:this.state.layout}),this.props.onDragStart(a,s,s,null,r,i)}},{key:"onDrag",value:function(t,e,A,n){var r=n.e,i=n.node,a=this.state.oldDragItem,s=this.state.layout,g=this.props.cols,c=(0,o.getLayoutItem)(s,t);if(c){var I={w:c.w,h:c.h,x:c.x,y:c.y,placeholder:!0,i:t};s=(0,o.moveElement)(s,c,e,A,!0,this.props.preventCollision,(0,o.compactType)(this.props),g),this.props.onDrag(s,a,c,I,r,i),this.setState({layout:(0,o.compact)(s,(0,o.compactType)(this.props),g),activeDrag:I})}}},{key:"onDragStop",value:function(t,e,A,n){var r=n.e,i=n.node;if(this.state.activeDrag){var a=this.state.oldDragItem,s=this.state.layout,g=this.props,c=g.cols,I=g.preventCollision,u=(0,o.getLayoutItem)(s,t);if(u){s=(0,o.moveElement)(s,u,e,A,!0,I,(0,o.compactType)(this.props),c),this.props.onDragStop(s,a,u,null,r,i);var l=(0,o.compact)(s,(0,o.compactType)(this.props),c),C=this.state.oldLayout;this.setState({activeDrag:null,layout:l,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(l,C)}}}},{key:"onLayoutMaybeChanged",value:function(t,e){e||(e=this.state.layout),(0,r.default)(e,t)||this.props.onLayoutChange(t)}},{key:"onResizeStart",value:function(t,e,A,n){var r=n.e,i=n.node,a=this.state.layout,s=(0,o.getLayoutItem)(a,t);s&&(this.setState({oldResizeItem:(0,o.cloneLayoutItem)(s),oldLayout:this.state.layout}),this.props.onResizeStart(a,s,s,null,r,i))}},{key:"onResize",value:function(t,e,A,n){var r=n.e,i=n.node,a=this.state,s=a.layout,g=a.oldResizeItem,c=this.props,I=c.cols,u=c.preventCollision,C=(0,o.getLayoutItem)(s,t);if(C){var h;if(u){var B=(0,o.getAllCollisions)(s,l(l({},C),{},{w:e,h:A})).filter((function(t){return t.i!==C.i}));if(h=B.length>0){var f=1/0,d=1/0;B.forEach((function(t){t.x>C.x&&(f=Math.min(f,t.x)),t.y>C.y&&(d=Math.min(d,t.y))})),Number.isFinite(f)&&(C.w=f-C.x),Number.isFinite(d)&&(C.h=d-C.y)}}h||(C.w=e,C.h=A);var Q={w:C.w,h:C.h,x:C.x,y:C.y,static:!0,i:t};this.props.onResize(s,g,C,Q,r,i),this.setState({layout:(0,o.compact)(s,(0,o.compactType)(this.props),I),activeDrag:Q})}}},{key:"onResizeStop",value:function(t,e,A,n){var r=n.e,i=n.node,a=this.state,s=a.layout,g=a.oldResizeItem,c=this.props.cols,I=(0,o.getLayoutItem)(s,t);this.props.onResizeStop(s,g,I,null,r,i);var u=(0,o.compact)(s,(0,o.compactType)(this.props),c),l=this.state.oldLayout;this.setState({activeDrag:null,layout:u,oldResizeItem:null,oldLayout:null}),this.onLayoutMaybeChanged(u,l)}},{key:"placeholder",value:function(){var t=this.state.activeDrag;if(!t)return null;var e=this.props,A=e.width,r=e.cols,i=e.margin,o=e.containerPadding,a=e.rowHeight,g=e.maxRows,c=e.useCSSTransforms,I=e.transformScale;return n.default.createElement(s.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:"react-grid-placeholder",containerWidth:A,cols:r,margin:i,containerPadding:o||i,maxRows:g,rowHeight:a,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:I},n.default.createElement("div",null))}},{key:"processGridItem",value:function(t,e){if(t&&t.key){var A=(0,o.getLayoutItem)(this.state.layout,String(t.key));if(!A)return null;var r=this.props,i=r.width,a=r.cols,g=r.margin,c=r.containerPadding,I=r.rowHeight,u=r.maxRows,l=r.isDraggable,C=r.isResizable,h=r.isBounded,B=r.useCSSTransforms,f=r.transformScale,d=r.draggableCancel,Q=r.draggableHandle,E=r.resizeHandles,p=this.state,y=p.mounted,v=p.droppingPosition,m="boolean"===typeof A.isDraggable?A.isDraggable:!A.static&&l,b="boolean"===typeof A.isResizable?A.isResizable:!A.static&&C,F=A.resizeHandles||E,w=m&&h&&!1!==A.isBounded;return n.default.createElement(s.default,{containerWidth:i,cols:a,margin:g,containerPadding:c||g,maxRows:u,rowHeight:I,cancel:d,handle:Q,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:m,isResizable:b,isBounded:w,useCSSTransforms:B&&y,usePercentages:!y,transformScale:f,w:A.w,h:A.h,x:A.x,y:A.y,i:A.i,minH:A.minH,minW:A.minW,maxH:A.maxH,maxW:A.maxW,static:A.static,droppingPosition:e?v:void 0,resizeHandles:F},t)}}},{key:"render",value:function(){var t=this,e=this.props,A=e.className,r=e.style,a=e.isDroppable,s=e.innerRef,g=(0,i.default)("react-grid-layout",A),c=l({height:this.containerHeight()},r);return n.default.createElement("div",{ref:s,className:g,style:c,onDrop:a?this.onDrop:o.noop,onDragLeave:a?this.onDragLeave:o.noop,onDragEnter:a?this.onDragEnter:o.noop,onDragOver:a?this.onDragOver:o.noop},n.default.Children.map(this.props.children,(function(e){return t.processGridItem(e)})),a&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&B(e.prototype,A),g&&B(e,g),I}(n.default.Component);e.default=m,y(m,"displayName","ReactGridLayout"),y(m,"propTypes",g.default),y(m,"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(t,e,A){"use strict";function n(t){var e=t.margin,A=t.containerPadding,n=t.containerWidth,r=t.cols;return(n-e[0]*(r-1)-2*A[0])/r}function r(t,e,A){return Number.isFinite(t)?Math.round(e*t+Math.max(0,t-1)*A):t}function i(t,e,A){return Math.max(Math.min(t,A),e)}Object.defineProperty(e,"__esModule",{value:!0}),e.calcGridColWidth=n,e.calcGridItemWHPx=r,e.calcGridItemPosition=function(t,e,A,i,o,a){var s=t.margin,g=t.containerPadding,c=t.rowHeight,I=n(t),u={};a&&a.resizing?(u.width=Math.round(a.resizing.width),u.height=Math.round(a.resizing.height)):(u.width=r(i,I,s[0]),u.height=r(o,c,s[1]));a&&a.dragging?(u.top=Math.round(a.dragging.top),u.left=Math.round(a.dragging.left)):(u.top=Math.round((c+s[1])*A+g[1]),u.left=Math.round((I+s[0])*e+g[0]));return u},e.calcXY=function(t,e,A,r,o){var a=t.margin,s=t.cols,g=t.rowHeight,c=t.maxRows,I=n(t),u=Math.round((A-a[0])/(I+a[0])),l=Math.round((e-a[1])/(g+a[1]));return u=i(u,0,s-r),l=i(l,0,c-o),{x:u,y:l}},e.calcWH=function(t,e,A,r,o){var a=t.margin,s=t.maxRows,g=t.cols,c=t.rowHeight,I=n(t),u=Math.round((e+a[0])/(I+a[0])),l=Math.round((A+a[1])/(c+a[1]));return u=i(u,0,g-r),l=i(l,0,s-o),{w:u,h:l}},e.clamp=i},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBoundPosition=function(t,e,A){if(!t.props.bounds)return[e,A];var o=t.props.bounds;o="string"===typeof o?o:function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}(o);var a=i(t);if("string"===typeof o){var s,g=a.ownerDocument,c=g.defaultView;if(!((s="parent"===o?a.parentNode:g.querySelector(o))instanceof c.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');var I=c.getComputedStyle(a),u=c.getComputedStyle(s);o={left:-a.offsetLeft+(0,n.int)(u.paddingLeft)+(0,n.int)(I.marginLeft),top:-a.offsetTop+(0,n.int)(u.paddingTop)+(0,n.int)(I.marginTop),right:(0,r.innerWidth)(s)-(0,r.outerWidth)(a)-a.offsetLeft+(0,n.int)(u.paddingRight)-(0,n.int)(I.marginRight),bottom:(0,r.innerHeight)(s)-(0,r.outerHeight)(a)-a.offsetTop+(0,n.int)(u.paddingBottom)-(0,n.int)(I.marginBottom)}}(0,n.isNum)(o.right)&&(e=Math.min(e,o.right));(0,n.isNum)(o.bottom)&&(A=Math.min(A,o.bottom));(0,n.isNum)(o.left)&&(e=Math.max(e,o.left));(0,n.isNum)(o.top)&&(A=Math.max(A,o.top));return[e,A]},e.snapToGrid=function(t,e,A){var n=Math.round(e/t[0])*t[0],r=Math.round(A/t[1])*t[1];return[n,r]},e.canDragX=function(t){return"both"===t.props.axis||"x"===t.props.axis},e.canDragY=function(t){return"both"===t.props.axis||"y"===t.props.axis},e.getControlPosition=function(t,e,A){var n="number"===typeof e?(0,r.getTouch)(t,e):null;if("number"===typeof e&&!n)return null;var o=i(A),a=A.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,r.offsetXYFromParent)(n||t,a,A.props.scale)},e.createCoreData=function(t,e,A){var r=t.state,o=!(0,n.isNum)(r.lastX),a=i(t);return o?{node:a,deltaX:0,deltaY:0,lastX:e,lastY:A,x:e,y:A}:{node:a,deltaX:e-r.lastX,deltaY:A-r.lastY,lastX:r.lastX,lastY:r.lastY,x:e,y:A}},e.createDraggableData=function(t,e){var A=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/A,y:t.state.y+e.deltaY/A,deltaX:e.deltaX/A,deltaY:e.deltaY/A,lastX:t.state.x,lastY:t.state.y}};var n=A(1150),r=A(1168);function i(t){var e=t.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){void 0}},function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n=a(A(0)),r=a(A(25)),i=A(1463),o=A(1464);function a(t){return t&&t.__esModule?t:{default:t}}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function g(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function I(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var u=function(t){var e,A;function r(){for(var e,A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return I(c(e=t.call.apply(t,[this].concat(n))||this),"state",{slackW:0,slackH:0}),e}A=t,(e=r).prototype=Object.create(A.prototype),e.prototype.constructor=e,e.__proto__=A;var a=r.prototype;return a.lockAspectRatio=function(t,e,A){return[t=(e=t/A)*A,e]},a.runConstraints=function(t,e){var A=[this.props.minConstraints,this.props.maxConstraints],n=A[0],r=A[1];if(!n&&!r)return[t,e];if(this.props.lockAspectRatio)if(e===this.props.height){var i=this.props.width/this.props.height;t=(e=t/i)*i}else{var o=this.props.height/this.props.width;e=(t=e/o)*o}var a=t,s=e,g=this.state,c=g.slackW,I=g.slackH;return t+=c,e+=I,n&&(t=Math.max(n[0],t),e=Math.max(n[1],e)),r&&(t=Math.min(r[0],t),e=Math.min(r[1],e)),I+=s-e,(c+=a-t)===this.state.slackW&&I===this.state.slackH||this.setState({slackW:c,slackH:I}),[t,e]},a.resizeHandler=function(t,e){var A=this;return function(n,r){var i=r.node,o=r.deltaX,a=r.deltaY;o/=A.props.transformScale,a/=A.props.transformScale;var s=("both"===A.props.axis||"x"===A.props.axis)&&-1===["n","s"].indexOf(e),g=("both"===A.props.axis||"y"===A.props.axis)&&-1===["e","w"].indexOf(e);s&&"w"===e[e.length-1]&&(o=-o),g&&"n"===e[0]&&(a=-a);var c=A.props.width+(s?o:0),I=A.props.height+(g?a:0),u=c!==A.props.width,l=I!==A.props.height;if("onResize"!==t||u||l){var C=A.runConstraints(c,I);c=C[0],I=C[1];var h={};if("onResizeStart"===t);else if("onResizeStop"===t)h.slackW=h.slackH=0;else if(c===A.props.width&&I===A.props.height)return;"function"===typeof A.props[t]?("function"===typeof n.persist&&n.persist(),A.setState(h,(function(){return A.props[t](n,{node:i,size:{width:c,height:I},handle:e})}))):A.setState(h)}}},a.renderResizeHandle=function(t){var e=this.props.handle;return e?"function"===typeof e?e(t):e:n.default.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+t})},a.render=function(){var t=this,e=this.props,A=e.children,r=e.draggableOpts,a=(e.width,e.height,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart,e.resizeHandles),c=(e.transformScale,function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(e,["children","draggableOpts","width","height","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"])),u=c.className?c.className+" react-resizable":"react-resizable";return(0,o.cloneElement)(A,function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?g(A,!0).forEach((function(e){I(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):g(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},c,{className:u,children:[A.props.children,a.map((function(e){return n.default.createElement(i.DraggableCore,s({},r,{key:"resizableHandle-"+e,onStop:t.resizeHandler("onResizeStop",e),onStart:t.resizeHandler("onResizeStart",e),onDrag:t.resizeHandler("onResize",e)}),t.renderResizeHandle(e))}))]}))},r}(n.default.Component);e.default=u,I(u,"propTypes",{children:r.default.element.isRequired,width:r.default.number.isRequired,height:r.default.number.isRequired,handle:r.default.element,handleSize:r.default.array,resizeHandles:r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:r.default.number,lockAspectRatio:r.default.bool,axis:r.default.oneOf(["both","x","y","none"]),minConstraints:r.default.arrayOf(r.default.number),maxConstraints:r.default.arrayOf(r.default.number),onResizeStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,draggableOpts:r.default.object}),I(u,"defaultProps",{handleSize:[20,20],lockAspectRatio:!1,axis:"both",minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1})},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBreakpointFromWidth=function(t,e){for(var A=r(t),n=A[0],i=1,o=A.length;i<o;i++){var a=A[i];e>t[a]&&(n=a)}return n},e.getColsFromBreakpoint=function(t,e){if(!e[t])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+t+" is missing!");return e[t]},e.findOrGenerateResponsiveLayout=function(t,e,A,i,o,a){if(t[A])return(0,n.cloneLayout)(t[A]);for(var s=t[i],g=r(e),c=g.slice(g.indexOf(A)),I=0,u=c.length;I<u;I++){var l=c[I];if(t[l]){s=t[l];break}}return s=(0,n.cloneLayout)(s||[]),(0,n.compact)((0,n.correctBounds)(s,{cols:o}),a,o)},e.sortBreakpoints=r;var n=A(967);function r(t){return Object.keys(t).sort((function(e,A){return t[e]-t[A]}))}},function(t,e,A){"use strict";var n=A(341);A.d(e,"a",(function(){return r}));var r={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 defined(USE_TEX_LOD) && !defined(FEATURE_GLSL_TEXTURE_LOD)\n# error PBR fragment shader: Texture LOD is not available\n#endif\n\n#if !defined(HAS_TANGENTS) && !defined(FEATURE_GLSL_DERIVATIVES)\n# error PBR fragment shader: Derivatives are not available\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(textureCubeLod(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:[n.a]}},function(t,e,A){"use strict";function n(t){return t}A.d(e,"a",(function(){return n}))},function(t){t.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(t){t.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(t){t.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(t){t.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(t){t.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(t){t.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(t){t.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"},"geneExpressionTransform":{"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":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"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 \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"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."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"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"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/hubmapconsortium/vitessce/#raster"},{"$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":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"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":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"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"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"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(t){t.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"},"spatialRotationX":{"type":"string"},"spatialRotationY":{"type":"string"},"spatialRotationZ":{"type":"string"},"spatialRotationOrbit":{"type":"string"},"spatialOrbitAxis":{"type":"string"},"spatialAxisFixed":{"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"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialRasterLayers":{"type":"string"},"spatialCellsLayer":{"type":"string"},"spatialMoleculesLayer":{"type":"string"},"spatialNeighborhoodsLayer":{"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":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"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 \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"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"],"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."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"resolution":{"type":"number","description":"Resolution of 3D volumetric rendering"},"xSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"renderingMode":{"type":"string","description":"Rendering mode of 3D volumetric rendering"},"ySlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"zSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"type":{"type":"string"},"use3d":{"type":"boolean"},"visible":{"type":"boolean","description":"Determines whether this entire layer will be rendered in the spatial component."}}},"moleculesLayer":{"type":"object","description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"cellsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"neighborhoodsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible"],"properties":{"visible":{"type":"boolean"}}},"spatialRasterLayers":{"type":"array","description":"Array of Spatial Layers","items":{"$ref":"#/definitions/rasterLayer"}}},"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"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/hubmapconsortium/vitessce/#raster"},{"$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":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"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":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotationX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationOrbit":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialOrbitAxis":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"string"}]}}},"spatialAxisFixed":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"Whether or not to have a fixed axis for the camera. Only useful for 3D viewing."},{"type":"boolean"}]}}},"spatialRasterLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialRasterLayers"}]}}},"spatialCellsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/cellsLayer"}]}}},"spatialNeighborhoodsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"spatialMoleculesLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/moleculesLayer"}]}}},"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"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"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.1"],"description":"The schema version for the view config."}}}')},function(t){t.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"},"spatialRotationX":{"type":"string"},"spatialRotationY":{"type":"string"},"spatialRotationZ":{"type":"string"},"spatialRotationOrbit":{"type":"string"},"spatialOrbitAxis":{"type":"string"},"spatialAxisFixed":{"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"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialRasterLayers":{"type":"string"},"spatialCellsLayer":{"type":"string"},"spatialMoleculesLayer":{"type":"string"},"spatialNeighborhoodsLayer":{"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":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"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 \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"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"],"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."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"resolution":{"type":"number","description":"Resolution of 3D volumetric rendering"},"xSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"renderingMode":{"type":"string","description":"Rendering mode of 3D volumetric rendering"},"ySlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"zSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"type":{"type":"string","enum":["raster","bitmask"]},"use3d":{"type":"boolean"},"visible":{"type":"boolean","description":"Determines whether this entire layer will be rendered in the spatial component."}}},"moleculesLayer":{"type":"object","description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"cellsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"neighborhoodsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible"],"properties":{"visible":{"type":"boolean"}}},"spatialRasterLayers":{"type":"array","description":"Array of Spatial Layers","items":{"$ref":"#/definitions/rasterLayer"}}},"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"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/hubmapconsortium/vitessce/#raster"},{"$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":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"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":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotationX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationOrbit":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialOrbitAxis":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"string"}]}}},"spatialAxisFixed":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"Whether or not to have a fixed axis for the camera. Only useful for 3D viewing."},{"type":"boolean"}]}}},"spatialRasterLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialRasterLayers"}]}}},"spatialCellsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/cellsLayer"}]}}},"spatialNeighborhoodsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"spatialMoleculesLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/moleculesLayer"}]}}},"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"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"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.2"],"description":"The schema version for the view config."}}}')},function(t,e,A){t.exports=function(t){var e={};function A(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,A),r.l=!0,r.exports}return A.m=t,A.c=e,A.d=function(t,e,n){A.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},A.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},A.t=function(t,e){if(1&e&&(t=A(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(A.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)A.d(n,r,function(e){return t[e]}.bind(null,r));return n},A.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return A.d(e,"a",e),e},A.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},A.p="",A(A.s=90)}({17:function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n=A(18),r=function(){function t(){}return t.getFirstMatch=function(t,e){var A=e.match(t);return A&&A.length>0&&A[1]||""},t.getSecondMatch=function(t,e){var A=e.match(t);return A&&A.length>1&&A[2]||""},t.matchAndReturnConst=function(t,e,A){if(t.test(e))return A},t.getWindowsVersionName=function(t){switch(t){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}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[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}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,A,n){void 0===n&&(n=!1);var r=t.getVersionPrecision(e),i=t.getVersionPrecision(A),o=Math.max(r,i),a=0,s=t.map([e,A],(function(e){var A=o-t.getVersionPrecision(e),n=e+new Array(A+1).join(".0");return t.map(n.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(n&&(a=o-Math.min(r,i)),o-=1;o>=a;){if(s[0][o]>s[1][o])return 1;if(s[0][o]===s[1][o]){if(o===a)return 0;o-=1}else if(s[0][o]<s[1][o])return-1}},t.map=function(t,e){var A,n=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(A=0;A<t.length;A+=1)n.push(e(t[A]));return n},t.find=function(t,e){var A,n;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(A=0,n=t.length;A<n;A+=1){var r=t[A];if(e(r,A))return r}},t.assign=function(t){for(var e,A,n=t,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[t].concat(i));var a=function(){var t=i[e];"object"==typeof t&&null!==t&&Object.keys(t).forEach((function(e){n[e]=t[e]}))};for(e=0,A=i.length;e<A;e+=1)a();return t},t.getBrowserAlias=function(t){return n.BROWSER_ALIASES_MAP[t]},t.getBrowserTypeByAlias=function(t){return n.BROWSER_MAP[t]||""},t}();e.default=r,t.exports=e.default},18:function(t,e,A){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.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"},e.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"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.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"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=A(91))&&n.__esModule?n:{default:n},i=A(18);function o(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(){function t(){}var e,A;return t.getParser=function(t,e){if(void 0===e&&(e=!1),"string"!=typeof t)throw new Error("UserAgent should be a string");return new r.default(t,e)},t.parse=function(t){return new r.default(t).getResult()},e=t,(A=[{key:"BROWSER_MAP",get:function(){return i.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return i.ENGINE_MAP}},{key:"OS_MAP",get:function(){return i.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return i.PLATFORMS_MAP}}])&&o(e,A),t}();e.default=a,t.exports=e.default},91:function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n=s(A(92)),r=s(A(93)),i=s(A(94)),o=s(A(95)),a=s(A(17));function s(t){return t&&t.__esModule?t:{default:t}}var g=function(){function t(t,e){if(void 0===e&&(e=!1),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}var e=t.prototype;return e.getUA=function(){return this._ua},e.test=function(t){return t.test(this._ua)},e.parseBrowser=function(){var t=this;this.parsedResult.browser={};var e=a.default.find(n.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser},e.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},e.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},e.getBrowserVersion=function(){return this.getBrowser().version},e.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},e.parseOS=function(){var t=this;this.parsedResult.os={};var e=a.default.find(r.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os},e.getOSName=function(t){var e=this.getOS().name;return t?String(e).toLowerCase()||"":e||""},e.getOSVersion=function(){return this.getOS().version},e.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},e.getPlatformType=function(t){void 0===t&&(t=!1);var e=this.getPlatform().type;return t?String(e).toLowerCase()||"":e||""},e.parsePlatform=function(){var t=this;this.parsedResult.platform={};var e=a.default.find(i.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform},e.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},e.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},e.parseEngine=function(){var t=this;this.parsedResult.engine={};var e=a.default.find(o.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine},e.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},e.getResult=function(){return a.default.assign({},this.parsedResult)},e.satisfies=function(t){var e=this,A={},n=0,r={},i=0;if(Object.keys(t).forEach((function(e){var o=t[e];"string"==typeof o?(r[e]=o,i+=1):"object"==typeof o&&(A[e]=o,n+=1)})),n>0){var o=Object.keys(A),s=a.default.find(o,(function(t){return e.isOS(t)}));if(s){var g=this.satisfies(A[s]);if(void 0!==g)return g}var c=a.default.find(o,(function(t){return e.isPlatform(t)}));if(c){var I=this.satisfies(A[c]);if(void 0!==I)return I}}if(i>0){var u=Object.keys(r),l=a.default.find(u,(function(t){return e.isBrowser(t,!0)}));if(void 0!==l)return this.compareVersion(r[l])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var A=this.getBrowserName().toLowerCase(),n=t.toLowerCase(),r=a.default.getBrowserTypeByAlias(n);return e&&r&&(n=r.toLowerCase()),n===A},e.compareVersion=function(t){var e=[0],A=t,n=!1,r=this.getBrowserVersion();if("string"==typeof r)return">"===t[0]||"<"===t[0]?(A=t.substr(1),"="===t[1]?(n=!0,A=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?A=t.substr(1):"~"===t[0]&&(n=!0,A=t.substr(1)),e.indexOf(a.default.compareVersions(r,A,n))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=g,t.exports=e.default},92:function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=A(17))&&n.__esModule?n:{default:n},i=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},A=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},A=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},A=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},A=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},A=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},A=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},A=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},A=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},A=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},A=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},A=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},A=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},A=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},A=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},A=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return A&&(e.version=A),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},A=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},A=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},A=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},A=r.default.getFirstMatch(i,t)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},A=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},A=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},A=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},A=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},A=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},A=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},A=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},A=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},A=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:function(t){var e=!t.test(/like android/i),A=t.test(/android/i);return e&&A},describe:function(t){var e={name:"Android Browser"},A=r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},A=r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},A=r.default.getFirstMatch(i,t);return A&&(e.version=A),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(e,t),version:r.default.getSecondMatch(e,t)}}}];e.default=o,t.exports=e.default},93:function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=A(17))&&n.__esModule?n:{default:n},i=A(18),o=[{test:[/Roku\/DVP/],describe:function(t){var e=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:i.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:i.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),A=r.default.getWindowsVersionName(e);return{name:i.OS_MAP.Windows,version:e,versionName:A}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:i.OS_MAP.iOS},A=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return A&&(e.version=A),e}},{test:[/macintosh/i],describe:function(t){var e=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),A=r.default.getMacOSVersionName(e),n={name:i.OS_MAP.MacOS,version:e};return A&&(n.versionName=A),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),A=t.test(/android/i);return e&&A},describe:function(t){var e=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),A=r.default.getAndroidVersionName(e),n={name:i.OS_MAP.Android,version:e};return A&&(n.versionName=A),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),A={name:i.OS_MAP.WebOS};return e&&e.length&&(A.version=e),A}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||r.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:i.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:i.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:i.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:i.OS_MAP.PlayStation4,version:e}}}];e.default=o,t.exports=e.default},94:function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=A(17))&&n.__esModule?n:{default:n},i=A(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=r.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",A={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(A.model=e),A}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),A=t.test(/like (ipod|iphone)/i);return e&&!A},describe:function(t){var e=r.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];e.default=o,t.exports=e.default},95:function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n,r=(n=A(17))&&n.__esModule?n:{default:n},i=A(18),o=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:i.ENGINE_MAP.Blink};var e=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:i.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:i.ENGINE_MAP.Trident},A=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:i.ENGINE_MAP.Presto},A=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:function(t){var e=t.test(/gecko/i),A=t.test(/like gecko/i);return e&&!A},describe:function(t){var e={name:i.ENGINE_MAP.Gecko},A=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:i.ENGINE_MAP.WebKit},A=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return A&&(e.version=A),e}}];e.default=o,t.exports=e.default}})},,,,,,,,,,,,,,,,,,,,,,,,function(t,e){t.exports=function(t,e,A){return t===e||t.className===e.className&&A(t.style,e.style)&&t.width===e.width&&t.autoSize===e.autoSize&&t.cols===e.cols&&t.draggableCancel===e.draggableCancel&&t.draggableHandle===e.draggableHandle&&A(t.verticalCompact,e.verticalCompact)&&A(t.compactType,e.compactType)&&A(t.layout,e.layout)&&A(t.margin,e.margin)&&A(t.containerPadding,e.containerPadding)&&t.rowHeight===e.rowHeight&&t.maxRows===e.maxRows&&t.isBounded===e.isBounded&&t.isDraggable===e.isDraggable&&t.isResizable===e.isResizable&&t.preventCollision===e.preventCollision&&t.useCSSTransforms===e.useCSSTransforms&&t.transformScale===e.transformScale&&t.isDroppable===e.isDroppable&&A(t.resizeHandles,e.resizeHandles)&&t.onLayoutChange===e.onLayoutChange&&t.onDragStart===e.onDragStart&&t.onDrag===e.onDrag&&t.onDragStop===e.onDragStop&&t.onResizeStart===e.onResizeStart&&t.onResize===e.onResize&&t.onResizeStop===e.onResizeStop&&t.onDrop===e.onDrop&&A(t.droppingItem,e.droppingItem)&&A(t.innerRef,e.innerRef)}},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=I(A(0)),r=I(A(68)),i=I(A(25)),o=A(1458),a=A(1462),s=A(967),g=A(1416),c=I(A(183));function I(t){return t&&t.__esModule?t:{default:t}}function u(t){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function C(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?l(Object(A),!0).forEach((function(e){y(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):l(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=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(t){return!1}}();return function(){var A,n=p(t);if(e){var r=p(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Q(this,A)}}function Q(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?E(t):e}function E(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var v=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(u,t);var e,A,i,I=d(u);function u(){var t;h(this,u);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return y(E(t=I.call.apply(I,[this].concat(A))),"state",{resizing:null,dragging:null,className:""}),y(E(t),"currentNode",void 0),y(E(t),"onDragStart",(function(e,A){var n=A.node,r=t.props.onDragStart;if(r){var i={top:0,left:0},o=n.offsetParent;if(o){var a=o.getBoundingClientRect(),s=n.getBoundingClientRect(),c=s.left/t.props.transformScale,I=a.left/t.props.transformScale,u=s.top/t.props.transformScale,l=a.top/t.props.transformScale;i.left=c-I+o.scrollLeft,i.top=u-l+o.scrollTop,t.setState({dragging:i});var C=(0,g.calcXY)(t.getPositionParams(),i.top,i.left,t.props.w,t.props.h),h=C.x,B=C.y;return r.call(E(t),t.props.i,h,B,{e:e,node:n,newPosition:i})}}})),y(E(t),"onDrag",(function(e,A){var n=A.node,r=A.deltaX,i=A.deltaY,o=t.props,a=o.onDrag,s=o.transformScale;if(a){if(r/=s,i/=s,!t.state.dragging)throw new Error("onDrag called before onDragStart.");var c=t.state.dragging.top+i,I=t.state.dragging.left+r,u=t.props,l=u.isBounded,C=u.i,h=u.w,B=u.h,f=u.containerWidth,d=t.getPositionParams();if(l){var Q=n.offsetParent;if(Q){var p=t.props,y=p.margin,v=p.rowHeight,m=Q.clientHeight-(0,g.calcGridItemWHPx)(B,v,y[1]);c=(0,g.clamp)(c,0,m);var b=(0,g.calcGridColWidth)(d),F=f-(0,g.calcGridItemWHPx)(h,b,y[0]);I=(0,g.clamp)(I,0,F)}}var w={top:c,left:I};t.setState({dragging:w});var S=(0,g.calcXY)(d,c,I,h,B),D=S.x,R=S.y;return a.call(E(t),C,D,R,{e:e,node:n,newPosition:w})}})),y(E(t),"onDragStop",(function(e,A){var n=A.node,r=t.props.onDragStop;if(r){if(!t.state.dragging)throw new Error("onDragEnd called before onDragStart.");var i=t.props,o=i.w,a=i.h,s=i.i,c=t.state.dragging,I=c.left,u=c.top,l={top:u,left:I};t.setState({dragging:null});var C=(0,g.calcXY)(t.getPositionParams(),u,I,o,a),h=C.x,B=C.y;return r.call(E(t),s,h,B,{e:e,node:n,newPosition:l})}})),y(E(t),"onResizeStop",(function(e,A){t.onResizeHandler(e,A,"onResizeStop")})),y(E(t),"onResizeStart",(function(e,A){t.onResizeHandler(e,A,"onResizeStart")})),y(E(t),"onResize",(function(e,A){t.onResizeHandler(e,A,"onResize")})),t}return e=u,(A=[{key:"shouldComponentUpdate",value:function(t,e){if(this.props.children!==t.children)return!0;if(this.props.droppingPosition!==t.droppingPosition)return!0;var A=(0,g.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),n=(0,g.calcGridItemPosition)(this.getPositionParams(t),t.x,t.y,t.w,t.h,e);return!(0,s.fastPositionEqual)(A,n)||this.props.useCSSTransforms!==t.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(t){this.moveDroppingItem(t)}},{key:"moveDroppingItem",value:function(t){var e=this.props.droppingPosition;if(e){var A=t.droppingPosition||{left:0,top:0},n=this.state.dragging;this.currentNode||(this.currentNode=r.default.findDOMNode(this));var i=n&&e.left!==A.left||e.top!==A.top;if(n){if(i){var o=e.left-n.left,a=e.top-n.top;this.onDrag(e.e,{node:this.currentNode,deltaX:o,deltaY:a})}}else this.onDragStart(e.e,{node:this.currentNode,deltaX:e.left,deltaY:e.top})}}},{key:"getPositionParams",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:t.cols,containerPadding:t.containerPadding,containerWidth:t.containerWidth,margin:t.margin,maxRows:t.maxRows,rowHeight:t.rowHeight}}},{key:"createStyle",value:function(t){var e,A=this.props,n=A.usePercentages,r=A.containerWidth;return A.useCSSTransforms?e=(0,s.setTransform)(t):(e=(0,s.setTopLeft)(t),n&&(e.left=(0,s.perc)(t.left/r),e.width=(0,s.perc)(t.width/r))),e}},{key:"mixinDraggable",value:function(t,e){return n.default.createElement(o.DraggableCore,{disabled:!e,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},t)}},{key:"mixinResizable",value:function(t,e,A){var r=this.props,i=r.cols,o=r.x,s=r.minW,c=r.minH,I=r.maxW,u=r.maxH,l=r.transformScale,C=r.resizeHandles,h=this.getPositionParams(),B=(0,g.calcGridItemPosition)(h,0,0,i-o,0).width,f=(0,g.calcGridItemPosition)(h,0,0,s,c),d=(0,g.calcGridItemPosition)(h,0,0,I,u),Q=[f.width,f.height],E=[Math.min(d.width,B),Math.min(d.height,1/0)];return n.default.createElement(a.Resizable,{draggableOpts:{disabled:!A},className:A?void 0:"react-resizable-hide",width:e.width,height:e.height,minConstraints:Q,maxConstraints:E,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:l,resizeHandles:C},t)}},{key:"onResizeHandler",value:function(t,e,A){var n=e.node,r=e.size,i=this.props[A];if(i){var o=this.props,a=o.cols,s=o.x,c=o.y,I=o.i,u=o.maxH,l=o.minH,C=this.props,h=C.minW,B=C.maxW,f=(0,g.calcWH)(this.getPositionParams(),r.width,r.height,s,c),d=f.w,Q=f.h;h=Math.max(h,1),B=Math.min(B,a-s),d=(0,g.clamp)(d,h,B),Q=(0,g.clamp)(Q,l,u),this.setState({resizing:"onResizeStop"===A?null:r}),i.call(this,I,d,Q,{e:t,node:n,size:r})}}},{key:"render",value:function(){var t=this.props,e=t.x,A=t.y,r=t.w,i=t.h,o=t.isDraggable,a=t.isResizable,s=t.droppingPosition,I=t.useCSSTransforms,u=(0,g.calcGridItemPosition)(this.getPositionParams(),e,A,r,i,this.state),l=n.default.Children.only(this.props.children),h=n.default.cloneElement(l,{className:(0,c.default)("react-grid-item",l.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(s),cssTransforms:I}),style:C(C(C({},this.props.style),l.props.style),this.createStyle(u))});return h=this.mixinResizable(h,u,a),h=this.mixinDraggable(h,o)}}])&&B(e.prototype,A),i&&B(e,i),u}(n.default.Component);e.default=v,y(v,"propTypes",{children:i.default.element,cols:i.default.number.isRequired,containerWidth:i.default.number.isRequired,rowHeight:i.default.number.isRequired,margin:i.default.array.isRequired,maxRows:i.default.number.isRequired,containerPadding:i.default.array.isRequired,x:i.default.number.isRequired,y:i.default.number.isRequired,w:i.default.number.isRequired,h:i.default.number.isRequired,minW:function(t,e){var A=t[e];return"number"!==typeof A?new Error("minWidth not Number"):A>t.w||A>t.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(t,e){var A=t[e];return"number"!==typeof A?new Error("maxWidth not Number"):A<t.w||A<t.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(t,e){var A=t[e];return"number"!==typeof A?new Error("minHeight not Number"):A>t.h||A>t.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(t,e){var A=t[e];return"number"!==typeof A?new Error("maxHeight not Number"):A<t.h||A<t.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:i.default.string.isRequired,onDragStop:i.default.func,onDragStart:i.default.func,onDrag:i.default.func,onResizeStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,isDraggable:i.default.bool.isRequired,isResizable:i.default.bool.isRequired,isBounded:i.default.bool.isRequired,static:i.default.bool,useCSSTransforms:i.default.bool.isRequired,transformScale:i.default.number,className:i.default.string,handle:i.default.string,cancel:i.default.string,droppingPosition:i.default.shape({e:i.default.object.isRequired,left:i.default.number.isRequired,top:i.default.number.isRequired})}),y(v,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})},function(t,e,A){"use strict";var n=A(1459),r=n.default,i=n.DraggableCore;t.exports=r,t.exports.default=r,t.exports.DraggableCore=i},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==C(t)&&"function"!==typeof t)return{default:t};var e=l();if(e&&e.has(t))return e.get(t);var A={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=n?Object.getOwnPropertyDescriptor(t,r):null;i&&(i.get||i.set)?Object.defineProperty(A,r,i):A[r]=t[r]}A.default=t,e&&e.set(t,A);return A}(A(0)),r=u(A(25)),i=u(A(68)),o=u(A(183)),a=A(1168),s=A(1417),g=A(1150),c=u(A(1461)),I=u(A(1418));function u(t){return t&&t.__esModule?t:{default:t}}function l(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return l=function(){return t},t}function C(t){return(C="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(){return(h=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function B(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return d(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return d(t,e)}(t,e)||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 d(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Q(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function E(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(A),!0).forEach((function(e){S(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Q(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function p(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function y(t,e,A){return e&&p(t.prototype,e),A&&p(t,A),t}function v(t,e){return(v=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t){var e=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(t){return!1}}();return function(){var A,n=w(t);if(e){var r=w(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return b(this,A)}}function b(t,e){return!e||"object"!==C(e)&&"function"!==typeof e?F(t):e}function F(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function S(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var D=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&v(t,e)}(A,t);var e=m(A);function A(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,A),S(F(n=e.call(this,t)),"onDragStart",(function(t,e){if((0,I.default)("Draggable: onDragStart: %j",e),!1===n.props.onStart(t,(0,s.createDraggableData)(F(n),e)))return!1;n.setState({dragging:!0,dragged:!0})})),S(F(n),"onDrag",(function(t,e){if(!n.state.dragging)return!1;(0,I.default)("Draggable: onDrag: %j",e);var A=(0,s.createDraggableData)(F(n),e),r={x:A.x,y:A.y};if(n.props.bounds){var i=r.x,o=r.y;r.x+=n.state.slackX,r.y+=n.state.slackY;var a=f((0,s.getBoundPosition)(F(n),r.x,r.y),2),g=a[0],c=a[1];r.x=g,r.y=c,r.slackX=n.state.slackX+(i-r.x),r.slackY=n.state.slackY+(o-r.y),A.x=r.x,A.y=r.y,A.deltaX=r.x-n.state.x,A.deltaY=r.y-n.state.y}if(!1===n.props.onDrag(t,A))return!1;n.setState(r)})),S(F(n),"onDragStop",(function(t,e){if(!n.state.dragging)return!1;if(!1===n.props.onStop(t,(0,s.createDraggableData)(F(n),e)))return!1;(0,I.default)("Draggable: onDragStop: %j",e);var A={dragging:!1,slackX:0,slackY:0};if(Boolean(n.props.position)){var r=n.props.position,i=r.x,o=r.y;A.x=i,A.y=o}n.setState(A)})),n.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:E({},t.position),slackX:0,slackY:0,isElementSVG:!1},!t.position||t.onDrag||t.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 y(A,null,[{key:"getDerivedStateFromProps",value:function(t,e){var A=t.position,n=e.prevPropsPosition;return!A||n&&A.x===n.x&&A.y===n.y?null:((0,I.default)("Draggable: getDerivedStateFromProps %j",{position:A,prevPropsPosition:n}),{x:A.x,y:A.y,prevPropsPosition:E({},A)})}}]),y(A,[{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:i.default.findDOMNode(this)}},{key:"render",value:function(){var t,e=this.props,A=(e.axis,e.bounds,e.children),r=e.defaultPosition,i=e.defaultClassName,g=e.defaultClassNameDragging,I=e.defaultClassNameDragged,u=e.position,l=e.positionOffset,C=(e.scale,B(e,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),f={},d=null,Q=!Boolean(u)||this.state.dragging,p=u||r,y={x:(0,s.canDragX)(this)&&Q?this.state.x:p.x,y:(0,s.canDragY)(this)&&Q?this.state.y:p.y};this.state.isElementSVG?d=(0,a.createSVGTransform)(y,l):f=(0,a.createCSSTransform)(y,l);var v=(0,o.default)(A.props.className||"",i,(S(t={},g,this.state.dragging),S(t,I,this.state.dragged),t));return n.createElement(c.default,h({},C,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(A),{className:v,style:E(E({},A.props.style),f),transform:d}))}}]),A}(n.Component);e.default=D,S(D,"displayName","Draggable"),S(D,"propTypes",E(E({},c.default.propTypes),{},{axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:g.dontSetMe,style:g.dontSetMe,transform:g.dontSetMe})),S(D,"defaultProps",E(E({},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(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPrefix=r,e.browserPrefixToKey=i,e.browserPrefixToStyle=function(t,e){return e?"-".concat(e.toLowerCase(),"-").concat(t):t},e.default=void 0;var n=["Moz","Webkit","O","ms"];function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window||"undefined"===typeof window.document)return"";var e=window.document.documentElement.style;if(t in e)return"";for(var A=0;A<n.length;A++)if(i(t,n[A])in e)return n[A];return""}function i(t,e){return e?"".concat(e).concat(function(t){for(var e="",A=!0,n=0;n<t.length;n++)A?(e+=t[n].toUpperCase(),A=!1):"-"===t[n]?A=!0:e+=t[n];return e}(t)):t}var o=r();e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==u(t)&&"function"!==typeof t)return{default:t};var e=I();if(e&&e.has(t))return e.get(t);var A={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=n?Object.getOwnPropertyDescriptor(t,r):null;i&&(i.get||i.set)?Object.defineProperty(A,r,i):A[r]=t[r]}A.default=t,e&&e.set(t,A);return A}(A(0)),r=c(A(25)),i=c(A(68)),o=A(1168),a=A(1417),s=A(1150),g=c(A(1418));function c(t){return t&&t.__esModule?t:{default:t}}function I(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return I=function(){return t},t}function u(t){return(u="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return C(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);"Object"===A&&t.constructor&&(A=t.constructor.name);if("Map"===A||"Set"===A)return Array.from(t);if("Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A))return C(t,e)}(t,e)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=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(t){return!1}}();return function(){var A,n=p(t);if(e){var r=p(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return Q(this,A)}}function Q(t,e){return!e||"object"!==u(e)&&"function"!==typeof e?E(t):e}function E(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var v={start:"touchstart",move:"touchmove",stop:"touchend"},m={start:"mousedown",move:"mousemove",stop:"mouseup"},b=m,F=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(c,t);var e,A,r,s=d(c);function c(){var t;h(this,c);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return y(E(t=s.call.apply(s,[this].concat(A))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),y(E(t),"mounted",!1),y(E(t),"handleDragStart",(function(e){if(t.props.onMouseDown(e),!t.props.allowAnyClick&&"number"===typeof e.button&&0!==e.button)return!1;var A=t.findDOMNode();if(!A||!A.ownerDocument||!A.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var n=A.ownerDocument;if(!(t.props.disabled||!(e.target instanceof n.defaultView.Node)||t.props.handle&&!(0,o.matchesSelectorAndParentsTo)(e.target,t.props.handle,A)||t.props.cancel&&(0,o.matchesSelectorAndParentsTo)(e.target,t.props.cancel,A))){"touchstart"===e.type&&e.preventDefault();var r=(0,o.getTouchIdentifier)(e);t.setState({touchIdentifier:r});var i=(0,a.getControlPosition)(e,r,E(t));if(null!=i){var s=i.x,c=i.y,I=(0,a.createCoreData)(E(t),s,c);(0,g.default)("DraggableCore: handleDragStart: %j",I),(0,g.default)("calling",t.props.onStart),!1!==t.props.onStart(e,I)&&!1!==t.mounted&&(t.props.enableUserSelectHack&&(0,o.addUserSelectStyles)(n),t.setState({dragging:!0,lastX:s,lastY:c}),(0,o.addEvent)(n,b.move,t.handleDrag),(0,o.addEvent)(n,b.stop,t.handleDragStop))}}})),y(E(t),"handleDrag",(function(e){var A=(0,a.getControlPosition)(e,t.state.touchIdentifier,E(t));if(null!=A){var n=A.x,r=A.y;if(Array.isArray(t.props.grid)){var i=n-t.state.lastX,o=r-t.state.lastY,s=l((0,a.snapToGrid)(t.props.grid,i,o),2);if(i=s[0],o=s[1],!i&&!o)return;n=t.state.lastX+i,r=t.state.lastY+o}var c=(0,a.createCoreData)(E(t),n,r);if((0,g.default)("DraggableCore: handleDrag: %j",c),!1!==t.props.onDrag(e,c)&&!1!==t.mounted)t.setState({lastX:n,lastY:r});else try{t.handleDragStop(new MouseEvent("mouseup"))}catch(u){var I=document.createEvent("MouseEvents");I.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),t.handleDragStop(I)}}})),y(E(t),"handleDragStop",(function(e){if(t.state.dragging){var A=(0,a.getControlPosition)(e,t.state.touchIdentifier,E(t));if(null!=A){var n=A.x,r=A.y,i=(0,a.createCoreData)(E(t),n,r);if(!1===t.props.onStop(e,i)||!1===t.mounted)return!1;var s=t.findDOMNode();s&&t.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(s.ownerDocument),(0,g.default)("DraggableCore: handleDragStop: %j",i),t.setState({dragging:!1,lastX:NaN,lastY:NaN}),s&&((0,g.default)("DraggableCore: Removing handlers"),(0,o.removeEvent)(s.ownerDocument,b.move,t.handleDrag),(0,o.removeEvent)(s.ownerDocument,b.stop,t.handleDragStop))}}})),y(E(t),"onMouseDown",(function(e){return b=m,t.handleDragStart(e)})),y(E(t),"onMouseUp",(function(e){return b=m,t.handleDragStop(e)})),y(E(t),"onTouchStart",(function(e){return b=v,t.handleDragStart(e)})),y(E(t),"onTouchEnd",(function(e){return b=v,t.handleDragStop(e)})),t}return e=c,(A=[{key:"componentDidMount",value:function(){this.mounted=!0;var t=this.findDOMNode();t&&(0,o.addEvent)(t,v.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var t=this.findDOMNode();if(t){var e=t.ownerDocument;(0,o.removeEvent)(e,m.move,this.handleDrag),(0,o.removeEvent)(e,v.move,this.handleDrag),(0,o.removeEvent)(e,m.stop,this.handleDragStop),(0,o.removeEvent)(e,v.stop,this.handleDragStop),(0,o.removeEvent)(t,v.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(e)}}},{key:"findDOMNode",value:function(){return this.props.nodeRef?this.props.nodeRef.current:i.default.findDOMNode(this)}},{key:"render",value:function(){return n.cloneElement(n.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&B(e.prototype,A),r&&B(e,r),c}(n.Component);e.default=F,y(F,"displayName","DraggableCore"),y(F,"propTypes",{allowAnyClick:r.default.bool,disabled:r.default.bool,enableUserSelectHack:r.default.bool,offsetParent:function(t,e){if(t[e]&&1!==t[e].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:r.default.arrayOf(r.default.number),handle:r.default.string,cancel:r.default.string,nodeRef:r.default.object,onStart:r.default.func,onDrag:r.default.func,onStop:r.default.func,onMouseDown:r.default.func,scale:r.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),y(F,"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(t,e,A){"use strict";t.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},t.exports.Resizable=A(1419).default,t.exports.ResizableBox=A(1465).default},function(t,e,A){var n,r;window,t.exports=(n=A(0),r=A(68),function(t){var e={};function A(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,A),r.l=!0,r.exports}return A.m=t,A.c=e,A.d=function(t,e,n){A.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},A.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},A.t=function(t,e){if(1&e&&(t=A(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(A.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)A.d(n,r,function(e){return t[e]}.bind(null,r));return n},A.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return A.d(e,"a",e),e},A.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},A.p="",A(A.s=4)}([function(t,e,A){t.exports=A(5)()},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e,A){var n;!function(){"use strict";var A={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var i=typeof n;if("string"===i||"number"===i)t.push(n);else if(Array.isArray(n)&&n.length){var o=r.apply(null,n);o&&t.push(o)}else if("object"===i)for(var a in n)A.call(n,a)&&n[a]&&t.push(a)}}return t.join(" ")}t.exports?(r.default=r,t.exports=r):void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n)}()},function(t,e,A){var n=A(7),r=n.default,i=n.DraggableCore;t.exports=r,t.exports.default=r,t.exports.DraggableCore=i},function(t,e,A){"use strict";var n=A(6);function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function t(t,e,A,r,i,o){if(o!==n){var a=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 a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var A={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:r};return A.PropTypes=A,A}},function(t,e,A){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,A){"use strict";A.r(e);var n=A(1),r=A.n(n),i=A(0),o=A.n(i),a=A(2),s=A.n(a),g=A(3),c=A.n(g);function I(t,e){for(var A=0,n=t.length;A<n;A++)if(e.apply(e,[t[A],A,t]))return t[A]}function u(t){return"function"==typeof t||"[object Function]"===Object.prototype.toString.call(t)}function l(t){return"number"==typeof t&&!isNaN(t)}function C(t){return parseInt(t,10)}function h(t,e,A){if(t[e])return new Error("Invalid prop ".concat(e," passed to ").concat(A," - do not set this, set it on the child."))}var B=["Moz","Webkit","O","ms"];function f(t,e){return e?"".concat(e).concat(function(t){for(var e="",A=!0,n=0;n<t.length;n++)A?(e+=t[n].toUpperCase(),A=!1):"-"===t[n]?A=!0:e+=t[n];return e}(t)):t}var d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var e=window.document.documentElement.style;if(t in e)return"";for(var A=0;A<B.length;A++)if(f(t,B[A])in e)return B[A];return""}();function Q(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function E(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var p="";function y(t,e){return p||(p=I(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(e){return u(t[e])}))),!!u(t[p])&&t[p](e)}function v(t,e,A){var n=t;do{if(y(n,e))return!0;if(n===A)return!1;n=n.parentNode}while(n);return!1}function m(t,e,A){t&&(t.attachEvent?t.attachEvent("on"+e,A):t.addEventListener?t.addEventListener(e,A,!0):t["on"+e]=A)}function b(t,e,A){t&&(t.detachEvent?t.detachEvent("on"+e,A):t.removeEventListener?t.removeEventListener(e,A,!0):t["on"+e]=null)}function F(t){var e=t.clientHeight,A=t.ownerDocument.defaultView.getComputedStyle(t);return(e+=C(A.borderTopWidth))+C(A.borderBottomWidth)}function w(t){var e=t.clientWidth,A=t.ownerDocument.defaultView.getComputedStyle(t);return(e+=C(A.borderLeftWidth))+C(A.borderRightWidth)}function S(t){var e=t.clientHeight,A=t.ownerDocument.defaultView.getComputedStyle(t);return(e-=C(A.paddingTop))-C(A.paddingBottom)}function D(t){var e=t.clientWidth,A=t.ownerDocument.defaultView.getComputedStyle(t);return(e-=C(A.paddingLeft))-C(A.paddingRight)}function R(t,e,A){var n=t.x,r=t.y,i="translate(".concat(n).concat(A,",").concat(r).concat(A,")");if(e){var o="".concat("string"==typeof e.x?e.x:e.x+A),a="".concat("string"==typeof e.y?e.y:e.y+A);i="translate(".concat(o,", ").concat(a,")")+i}return i}function U(t){if(t){var e,A,n=t.getElementById("react-draggable-style-el");n||((n=t.createElement("style")).type="text/css",n.id="react-draggable-style-el",n.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",n.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",t.getElementsByTagName("head")[0].appendChild(n)),t.body&&(A="react-draggable-transparent-selection",(e=t.body).classList?e.classList.add(A):e.className.match(new RegExp("(?:^|\\s)".concat(A,"(?!\\S)")))||(e.className+=" ".concat(A)))}}function G(t){try{t&&t.body&&(e=t.body,A="react-draggable-transparent-selection",e.classList?e.classList.remove(A):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(A,"(?!\\S)"),"g"),"")),t.selection?t.selection.empty():window.getSelection().removeAllRanges()}catch(t){}var e,A}function N(){return function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Q(A,!0).forEach((function(e){E(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Q(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({touchAction:"none"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function k(t){return"both"===t.props.axis||"x"===t.props.axis}function x(t){return"both"===t.props.axis||"y"===t.props.axis}function O(t,e,A){var n="number"==typeof e?function(t,e){return t.targetTouches&&I(t.targetTouches,(function(t){return e===t.identifier}))||t.changedTouches&&I(t.changedTouches,(function(t){return e===t.identifier}))}(t,e):null;if("number"==typeof e&&!n)return null;var r=_(A);return function(t,e,A){var n=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect();return{x:(t.clientX+e.scrollLeft-n.left)/A,y:(t.clientY+e.scrollTop-n.top)/A}}(n||t,A.props.offsetParent||r.offsetParent||r.ownerDocument.body,A.props.scale)}function M(t,e,A){var n=t.state,r=!l(n.lastX),i=_(t);return r?{node:i,deltaX:0,deltaY:0,lastX:e,lastY:A,x:e,y:A}:{node:i,deltaX:e-n.lastX,deltaY:A-n.lastY,lastX:n.lastX,lastY:n.lastY,x:e,y:A}}function L(t,e){var A=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/A,y:t.state.y+e.deltaY/A,deltaX:e.deltaX/A,deltaY:e.deltaY/A,lastX:t.state.x,lastY:t.state.y}}function _(t){var e=s.a.findDOMNode(t);if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}function J(t){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function j(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function H(t){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function V(t,e){return(V=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var W={start:"touchstart",move:"touchmove",stop:"touchend"},K={start:"mousedown",move:"mousemove",stop:"mouseup"},P=K,q=function(t){function e(){var t,A,n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=this,r=(t=H(e)).call.apply(t,[this].concat(o)),A=!r||"object"!==J(r)&&"function"!=typeof r?Y(n):r,Z(Y(A),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),Z(Y(A),"handleDragStart",(function(t){if(A.props.onMouseDown(t),!A.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var e=s.a.findDOMNode(Y(A));if(!e||!e.ownerDocument||!e.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");var n=e.ownerDocument;if(!(A.props.disabled||!(t.target instanceof n.defaultView.Node)||A.props.handle&&!v(t.target,A.props.handle,e)||A.props.cancel&&v(t.target,A.props.cancel,e))){var r=function(t){return t.targetTouches&&t.targetTouches[0]?t.targetTouches[0].identifier:t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].identifier:void 0}(t);A.setState({touchIdentifier:r});var i=O(t,r,Y(A));if(null!=i){var o=i.x,a=i.y,g=M(Y(A),o,a);A.props.onStart,!1!==A.props.onStart(t,g)&&(A.props.enableUserSelectHack&&U(n),A.setState({dragging:!0,lastX:o,lastY:a}),m(n,P.move,A.handleDrag),m(n,P.stop,A.handleDragStop))}}})),Z(Y(A),"handleDrag",(function(t){"touchmove"===t.type&&t.preventDefault();var e=O(t,A.state.touchIdentifier,Y(A));if(null!=e){var n,r,i,o=e.x,a=e.y;if(Array.isArray(A.props.grid)){var s=o-A.state.lastX,g=a-A.state.lastY,c=T((n=A.props.grid,r=s,i=g,[Math.round(r/n[0])*n[0],Math.round(i/n[1])*n[1]]),2);if(s=c[0],g=c[1],!s&&!g)return;o=A.state.lastX+s,a=A.state.lastY+g}var I=M(Y(A),o,a);if(!1!==A.props.onDrag(t,I))A.setState({lastX:o,lastY:a});else try{A.handleDragStop(new MouseEvent("mouseup"))}catch(t){var u=document.createEvent("MouseEvents");u.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),A.handleDragStop(u)}}})),Z(Y(A),"handleDragStop",(function(t){if(A.state.dragging){var e=O(t,A.state.touchIdentifier,Y(A));if(null!=e){var n=e.x,r=e.y,i=M(Y(A),n,r),o=s.a.findDOMNode(Y(A));o&&A.props.enableUserSelectHack&&G(o.ownerDocument),A.setState({dragging:!1,lastX:NaN,lastY:NaN}),A.props.onStop(t,i),o&&(b(o.ownerDocument,P.move,A.handleDrag),b(o.ownerDocument,P.stop,A.handleDragStop))}}})),Z(Y(A),"onMouseDown",(function(t){return P=K,A.handleDragStart(t)})),Z(Y(A),"onMouseUp",(function(t){return P=K,A.handleDragStop(t)})),Z(Y(A),"onTouchStart",(function(t){return P=W,A.handleDragStart(t)})),Z(Y(A),"onTouchEnd",(function(t){return P=W,A.handleDragStop(t)})),A}var A,n;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&V(t,e)}(e,r.a.Component),A=e,(n=[{key:"componentWillUnmount",value:function(){var t=s.a.findDOMNode(this);if(t){var e=t.ownerDocument;b(e,K.move,this.handleDrag),b(e,W.move,this.handleDrag),b(e,K.stop,this.handleDragStop),b(e,W.stop,this.handleDragStop),this.props.enableUserSelectHack&&G(e)}}},{key:"render",value:function(){return r.a.cloneElement(r.a.Children.only(this.props.children),{style:N(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&j(A.prototype,n),e}();function X(t){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function z(){return(z=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function $(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function tt(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?$(A,!0).forEach((function(e){ot(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):$(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function et(t){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function At(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nt(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function rt(t,e,A){return e&&nt(t.prototype,e),A&&nt(t,A),t}function it(t,e){return(it=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ot(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}Z(q,"displayName","DraggableCore"),Z(q,"propTypes",{allowAnyClick:o.a.bool,disabled:o.a.bool,enableUserSelectHack:o.a.bool,offsetParent:function(t,e){if(t[e]&&1!==t[e].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:h,style:h,transform:h}),Z(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}),A.d(e,"default",(function(){return at})),A.d(e,"DraggableCore",(function(){return q}));var at=function(t){function e(t){var A,n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=et(e).call(this,t),A=!n||"object"!==X(n)&&"function"!=typeof n?At(this):n,ot(At(A),"onDragStart",(function(t,e){if(!1===A.props.onStart(t,L(At(A),e)))return!1;A.setState({dragging:!0,dragged:!0})})),ot(At(A),"onDrag",(function(t,e){if(!A.state.dragging)return!1;var n=L(At(A),e),r={x:n.x,y:n.y};if(A.props.bounds){var i=r.x,o=r.y;r.x+=A.state.slackX,r.y+=A.state.slackY;var a=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(t){r=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(function(t,e,A){if(!t.props.bounds)return[e,A];var n=t.props.bounds;n="string"==typeof n?n:function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}(n);var r=_(t);if("string"==typeof n){var i,o=r.ownerDocument,a=o.defaultView;if(!((i="parent"===n?r.parentNode:o.querySelector(n))instanceof a.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');var s=a.getComputedStyle(r),g=a.getComputedStyle(i);n={left:-r.offsetLeft+C(g.paddingLeft)+C(s.marginLeft),top:-r.offsetTop+C(g.paddingTop)+C(s.marginTop),right:D(i)-w(r)-r.offsetLeft+C(g.paddingRight)-C(s.marginRight),bottom:S(i)-F(r)-r.offsetTop+C(g.paddingBottom)-C(s.marginBottom)}}return l(n.right)&&(e=Math.min(e,n.right)),l(n.bottom)&&(A=Math.min(A,n.bottom)),l(n.left)&&(e=Math.max(e,n.left)),l(n.top)&&(A=Math.max(A,n.top)),[e,A]}(At(A),r.x,r.y),2),s=a[0],g=a[1];r.x=s,r.y=g,r.slackX=A.state.slackX+(i-r.x),r.slackY=A.state.slackY+(o-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-A.state.x,n.deltaY=r.y-A.state.y}if(!1===A.props.onDrag(t,n))return!1;A.setState(r)})),ot(At(A),"onDragStop",(function(t,e){if(!A.state.dragging)return!1;if(!1===A.props.onStop(t,L(At(A),e)))return!1;var n={dragging:!1,slackX:0,slackY:0};if(Boolean(A.props.position)){var r=A.props.position,i=r.x,o=r.y;n.x=i,n.y=o}A.setState(n)})),A.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:tt({},t.position),slackX:0,slackY:0,isElementSVG:!1},!t.position||t.onDrag||t.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."),A}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&it(t,e)}(e,r.a.Component),rt(e,null,[{key:"getDerivedStateFromProps",value:function(t,e){var A=t.position,n=e.prevPropsPosition;return!A||n&&A.x===n.x&&A.y===n.y?null:{x:A.x,y:A.y,prevPropsPosition:tt({},A)}}}]),rt(e,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&s.a.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var t,e=this.props,A=(e.axis,e.bounds,e.children),n=e.defaultPosition,i=e.defaultClassName,o=e.defaultClassNameDragging,a=e.defaultClassNameDragged,s=e.position,g=e.positionOffset,I=(e.scale,function(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}(e,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"])),u={},l=null,C=!Boolean(s)||this.state.dragging,h=s||n,B={x:k(this)&&C?this.state.x:h.x,y:x(this)&&C?this.state.y:h.y};this.state.isElementSVG?l=function(t,e){return R(t,e,"")}(B,g):u=function(t,e){var A=R(t,e,"px");return E({},f("transform",d),A)}(B,g);var Q=c()(A.props.className||"",i,(ot(t={},o,this.state.dragging),ot(t,a,this.state.dragged),t));return r.a.createElement(q,z({},I,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.a.cloneElement(r.a.Children.only(A),{className:Q,style:tt({},A.props.style,{},u),transform:l}))}}]),e}();ot(at,"displayName","Draggable"),ot(at,"propTypes",tt({},q.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:h,style:h,transform:h})),ot(at,"defaultProps",tt({},q.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(t,e,A){"use strict";e.__esModule=!0,e.cloneElement=function(t,e){e.style&&t.props.style&&(e.style=function(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?i(A,!0).forEach((function(e){o(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):i(A).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}({},t.props.style,{},e.style));e.className&&t.props.className&&(e.className=t.props.className+" "+e.className);return r.default.cloneElement(t,e)};var n,r=(n=A(0))&&n.__esModule?n:{default:n};function i(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function o(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}},function(t,e,A){"use strict";e.__esModule=!0,e.default=void 0;var n=o(A(0)),r=o(A(25)),i=o(A(1419));function o(t){return t&&t.__esModule?t:{default:t}}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function g(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var c=function(t){var e,A;function r(){for(var e,A=arguments.length,n=new Array(A),r=0;r<A;r++)n[r]=arguments[r];return g(s(e=t.call.apply(t,[this].concat(n))||this),"state",{width:e.props.width,height:e.props.height,propsWidth:e.props.width,propsHeight:e.props.height}),g(s(e),"onResize",(function(t,A){var n=A.size;n.width,n.height;e.props.onResize?(t.persist&&t.persist(),e.setState(n,(function(){return e.props.onResize&&e.props.onResize(t,A)}))):e.setState(n)})),e}return A=t,(e=r).prototype=Object.create(A.prototype),e.prototype.constructor=e,e.__proto__=A,r.getDerivedStateFromProps=function(t,e){return e.propsWidth!==t.width||e.propsHeight!==t.height?{width:t.width,height:t.height,propsWidth:t.width,propsHeight:t.height}:null},r.prototype.render=function(){var t=this.props,e=t.handle,A=t.handleSize,r=(t.onResize,t.onResizeStart),o=t.onResizeStop,s=t.draggableOpts,g=t.minConstraints,c=t.maxConstraints,I=t.lockAspectRatio,u=t.axis,l=(t.width,t.height,t.resizeHandles),C=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles"]);return n.default.createElement(i.default,{handle:e,handleSize:A,width:this.state.width,height:this.state.height,onResizeStart:r,onResize:this.onResize,onResizeStop:o,draggableOpts:s,minConstraints:g,maxConstraints:c,lockAspectRatio:I,axis:u,resizeHandles:l},n.default.createElement("div",a({style:{width:this.state.width+"px",height:this.state.height+"px"}},C)))},r}(n.default.Component);e.default=c,g(c,"propTypes",{height:r.default.number,width:r.default.number}),g(c,"defaultProps",{handleSize:[20,20]})},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(A(25)),r=i(A(0));function i(t){return t&&t.__esModule?t:{default:t}}var o={className:n.default.string,style:n.default.object,width:n.default.number,autoSize:n.default.bool,cols:n.default.number,draggableCancel:n.default.string,draggableHandle:n.default.string,verticalCompact:function(t){t.verticalCompact,0},compactType:n.default.oneOf(["vertical","horizontal"]),layout:function(t){var e=t.layout;void 0!==e&&A(967).validateLayout(e,"layout")},margin:n.default.arrayOf(n.default.number),containerPadding:n.default.arrayOf(n.default.number),rowHeight:n.default.number,maxRows:n.default.number,isBounded:n.default.bool,isDraggable:n.default.bool,isResizable:n.default.bool,preventCollision:n.default.bool,useCSSTransforms:n.default.bool,transformScale:n.default.number,isDroppable:n.default.bool,resizeHandles:n.default.arrayOf(n.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),onLayoutChange:n.default.func,onDragStart:n.default.func,onDrag:n.default.func,onDragStop:n.default.func,onResizeStart:n.default.func,onResize:n.default.func,onResizeStop:n.default.func,onDrop:n.default.func,droppingItem:n.default.shape({i:n.default.string.isRequired,w:n.default.number.isRequired,h:n.default.number.isRequired}),children:function(t,e){var A=t[e],n={};r.default.Children.forEach(A,(function(t){if(n[t.key])throw new Error('Duplicate child key "'+t.key+'" found! This will cause problems in ReactGridLayout.');n[t.key]=!0}))},innerRef:n.default.any};e.default=o},function(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==I(t)&&"function"!==typeof t)return{default:t};var e=c();if(e&&e.has(t))return e.get(t);var A={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=n?Object.getOwnPropertyDescriptor(t,r):null;i&&(i.get||i.set)?Object.defineProperty(A,r,i):A[r]=t[r]}A.default=t,e&&e.set(t,A);return A}(A(0)),r=g(A(25)),i=g(A(1167)),o=A(967),a=A(1420),s=g(A(1415));function g(t){return t&&t.__esModule?t:{default:t}}function c(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return c=function(){return t},t}function I(t){return(I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function l(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}function C(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function h(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?C(Object(A),!0).forEach((function(e){v(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):C(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Q(t){var e=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(t){return!1}}();return function(){var A,n=y(t);if(e){var r=y(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return E(this,A)}}function E(t,e){return!e||"object"!==I(e)&&"function"!==typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}var m=function(t){return Object.prototype.toString.call(t)};function b(t,e){return null==t?null:Array.isArray(t)?t:t[e]}var F=function(t){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(c,t);var e,A,r,g=Q(c);function c(){var t;B(this,c);for(var e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];return v(p(t=g.call.apply(g,[this].concat(A))),"state",t.generateInitialState()),v(p(t),"onLayoutChange",(function(e){t.props.onLayoutChange(e,h(h({},t.props.layouts),{},v({},t.state.breakpoint,e)))})),t}return e=c,r=[{key:"getDerivedStateFromProps",value:function(t,e){if(!(0,i.default)(t.layouts,e.layouts)){var A=e.breakpoint,n=e.cols;return{layout:(0,a.findOrGenerateResponsiveLayout)(t.layouts,t.breakpoints,A,A,n,t.compactType),layouts:t.layouts}}return null}}],(A=[{key:"generateInitialState",value:function(){var t=this.props,e=t.width,A=t.breakpoints,n=t.layouts,r=t.cols,i=(0,a.getBreakpointFromWidth)(A,e),o=(0,a.getColsFromBreakpoint)(i,r),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,a.findOrGenerateResponsiveLayout)(n,A,i,i,o,s),breakpoint:i,cols:o}}},{key:"componentDidUpdate",value:function(t){this.props.width==t.width&&this.props.breakpoint===t.breakpoint&&(0,i.default)(this.props.breakpoints,t.breakpoints)&&(0,i.default)(this.props.cols,t.cols)||this.onWidthChange(t)}},{key:"onWidthChange",value:function(t){var e=this.props,A=e.breakpoints,n=e.cols,r=e.layouts,i=e.compactType,s=this.props.breakpoint||(0,a.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),g=this.state.breakpoint,c=(0,a.getColsFromBreakpoint)(s,n),I=h({},r);if(g!==s||t.breakpoints!==A||t.cols!==n){g in I||(I[g]=(0,o.cloneLayout)(this.state.layout));var u=(0,a.findOrGenerateResponsiveLayout)(I,A,s,g,c,i);u=(0,o.synchronizeLayoutWithChildren)(u,this.props.children,c,i),I[s]=u,this.props.onLayoutChange(u,I),this.props.onBreakpointChange(s,c),this.setState({breakpoint:s,layout:u,cols:c})}var l=b(this.props.margin,s),C=b(this.props.containerPadding,s);this.props.onWidthChange(this.props.width,l,c,C)}},{key:"render",value:function(){var t=this.props,e=(t.breakpoint,t.breakpoints,t.cols,t.layouts,t.margin),A=t.containerPadding,r=(t.onBreakpointChange,t.onLayoutChange,t.onWidthChange,l(t,["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"]));return n.createElement(s.default,u({},r,{margin:b(e,this.state.breakpoint),containerPadding:b(A,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&f(e.prototype,A),r&&f(e,r),c}(n.Component);e.default=F,v(F,"propTypes",{breakpoint:r.default.string,breakpoints:r.default.object,cols:r.default.object,margin:r.default.oneOfType([r.default.array,r.default.object]),containerPadding:r.default.oneOfType([r.default.array,r.default.object]),layouts:function(t,e){if("[object Object]"!==m(t[e]))throw new Error("Layout property must be an object. Received: "+m(t[e]));Object.keys(t[e]).forEach((function(e){if(!(e in t.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,o.validateLayout)(t.layouts[e],"layouts."+e)}))},width:r.default.number.isRequired,onBreakpointChange:r.default.func,onLayoutChange:r.default.func,onWidthChange:r.default.func}),v(F,"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(t,e,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,A;return A=e=function(e){!function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(r,e);var A=function(t){var e=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(t){return!1}}();return function(){var A,n=h(t);if(e){var r=h(this).constructor;A=Reflect.construct(n,arguments,r)}else A=n.apply(this,arguments);return l(this,A)}}(r);function r(){var t;c(this,r);for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return B(C(t=A.call.apply(A,[this].concat(n))),"state",{width:1280}),B(C(t),"mounted",!1),B(C(t),"onWindowResize",(function(){if(t.mounted){var e=i.default.findDOMNode(C(t));e instanceof HTMLElement&&t.setState({width:e.offsetWidth})}})),t}return function(t,e,A){e&&I(t.prototype,e);A&&I(t,A)}(r,[{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 e=this.props,A=e.measureBeforeMount,r=function(t,e){if(null==t)return{};var A,n,r=function(t,e){if(null==t)return{};var A,n,r={},i=Object.keys(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||(r[A]=t[A]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)A=i[n],e.indexOf(A)>=0||Object.prototype.propertyIsEnumerable.call(t,A)&&(r[A]=t[A])}return r}(e,["measureBeforeMount"]);return A&&!this.mounted?n.createElement("div",{className:this.props.className,style:this.props.style}):n.createElement(t,g({},r,this.state))}}]),r}(n.Component),B(e,"defaultProps",{measureBeforeMount:!1}),B(e,"propTypes",{measureBeforeMount:r.default.bool}),A};var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==s(t)&&"function"!==typeof t)return{default:t};var e=a();if(e&&e.has(t))return e.get(t);var A={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=n?Object.getOwnPropertyDescriptor(t,r):null;i&&(i.get||i.set)?Object.defineProperty(A,r,i):A[r]=t[r]}A.default=t,e&&e.set(t,A);return A}(A(0)),r=o(A(25)),i=o(A(68));function o(t){return t&&t.__esModule?t:{default:t}}function a(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return a=function(){return t},t}function s(t){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var A=arguments[e];for(var n in A)Object.prototype.hasOwnProperty.call(A,n)&&(t[n]=A[n])}return t}).apply(this,arguments)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function I(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){return!e||"object"!==s(e)&&"function"!==typeof e?C(t):e}function C(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function B(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}},function(t,e,A){},function(t,e,A){},function(t,e,A){},,,,,,function(t,e,A){"use strict";A.r(e);var n=A(1147),r=A(1148),i=A(1149),o=A(13),a=A(0),s=A.n(a),g=A(9),c=A(15),I=A(23),u=A(24),l=A(1392),C=A(89),h=A.n(C),B=A(21),f=A(73);function d(t,e){for(var A=[],n=0;n<t.length;n++)A.push(t[n+1]-t[n]);return Object.entries(e).map((function(e){var n,r=Object(o.a)(e,2),i=r[0],a=r[1];return{i:i,y:a.y,h:a.h||1,x:t[a.x],w:(n=A.slice(a.x,a.x+(a.w||1)),n.reduce((function(t,e){return t+e}),0))}}))}var Q=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(){return Object(g.a)(this,A),e.apply(this,arguments)}return Object(c.a)(A,[{key:"componentDidUpdate",value:function(t){this.props.height!==t.height&&this.onWindowResize()}}]),A}(Object(l.WidthProvider)(l.Responsive));function E(t){var e,A=t.layout,n=t.getComponent,r=t.padding,i=t.margin,a=t.draggableHandle,g=t.reactGridLayoutProps,c=t.rowHeight,I=t.theme,u=t.height,l=t.onRemoveComponent,C=t.onLayoutChange,E=function(t){var e={},A={},n={},r={},i={};if(("components"in t?t.components:t).forEach((function(t,e){var A="".concat("i").concat(e);r[A]={component:t.component,props:t.props||{},coordinationScopes:t.coordinationScopes||{}},i[A]={id:A,x:t.x,y:t.y,w:t.w,h:t.h}})),"components"in t)Object.entries(t.columns).forEach((function(t){var r=Object(o.a)(t,2),a=r[0],s=r[1];e[a]=s[s.length-1],A[a]=d(s,i),n[a]=a}));else{e.ID=12,A.ID=d(Object(f.g)(13),i),n.ID=1e3}return{cols:e,layouts:A,breakpoints:n,components:r}}(A),p=E.cols,y=E.layouts,v=E.breakpoints,m=E.components,b=(e=y,Math.max.apply(Math,Object(B.a)(Object.values(e).map((function(t){return Math.max.apply(Math,Object(B.a)(t.map((function(t){return t.y+t.h}))))}))))),F=s.a.createElement("style",null,"\n        ".concat(a," {\n          cursor: grab;\n        }\n        ").concat(a,":active {\n          cursor: grabbing;\n        }\n     ")),w=Object.entries(m).map((function(t,e){var A=Object(o.a)(t,2),r=A[0],i=A[1],a=n(i.component);return s.a.createElement("div",{key:r},s.a.createElement(a,Object.assign({},i.props,{uuid:e,coordinationScopes:i.coordinationScopes,theme:I,removeGridComponent:function(){l(e)}})))}));return y&&m&&v&&p&&s.a.createElement(s.a.Fragment,null,F,s.a.createElement(Q,Object.assign({className:"layout",cols:p,layouts:y,breakpoints:v,height:u,rowHeight:c||(window.innerHeight-2*r-(b-1)*i)/b,containerPadding:[r,r],margin:[i,i],draggableHandle:a,onLayoutChange:function(t){if(t.length===Object.entries(m).length){var e=[];t.forEach((function(t){var A=t.i,n=m[A];if(n){var r=parseInt(A.substring(A.indexOf("i")+1),10),i={x:t.x,y:t.y,w:t.w,h:t.h},o={x:n.x,y:n.y,w:n.w,h:n.h};h()(i,o)||e.push([r,i])}})),e.length>0&&C(e)}}},g),w))}E.defaultProps={padding:10,margin:10};var p=A(12),y=A(610),v=A.n(y),m=A(360),b=A.n(m),F=function(){function t(e){var A=e.type,n=e.url,r=e.requestInit,i=e.options;Object(g.a)(this,t),this.type=A,this.url=n,this.requestInit=r,this.options=i,this.subscriptions={}}return Object(c.a)(t,[{key:"load",value:function(){throw new Error("The load() method has not been implemented.")}},{key:"subscribe",value:function(t){var e=b()();return this.subscriptions[e]=t,e}},{key:"unsubscribe",value:function(t){delete this.subscriptions[t]}},{key:"publish",value:function(t){Object.values(this.subscriptions).forEach((function(e){e(t)}))}}]),t}(),w=A(121),S=function t(e,A){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(g.a)(this,t),this.data=e,this.url=A,this.coordinationValues=n},D=A(1423),R=A(1424),U=A(1425),G=A(880),N=A(419),k={cells:D,molecules:R,neighborhoods:U,raster:G,"cell-sets":N},x=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(t){var n;Object(g.a)(this,A),n=e.call(this,t);var r=t.type;return n.schema=k[r],n}return Object(c.a)(A,[{key:"load",value:function(){var t=this,e=this.url,A=this.requestInit,n=this.type,r=this.fileType;return this.data||(this.data=fetch(e,A).then((function(t){return t.ok?t.json():Promise.reject(new w.b(n,r,e,t.headers))})).catch((function(t){return Promise.resolve(t)})).then((function(A){if(A instanceof w.a)return Promise.reject(A);var i=t.validate(A),a=Object(o.a)(i,2),s=a[0],g=a[1];return s?Promise.resolve(new S(A,e)):Promise.reject(new w.d(n,r,e,g))}))),this.data}},{key:"validate",value:function(t){var e=this.schema,A=this.type;if(!e)throw Error("No schema for ".concat(A));var n,r=(new v.a).compile(e),i=r(t);return i||(n=r.errors),[i,n]}}]),A}(F),O=A(534),M=A(2),L=A.n(M),_=A(8),J=A(54),T=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(t){var n;Object(g.a)(this,A),n=e.call(this,t);var r=Object(J.a)(n),i=r.url,o=r.requestInit;return n.store=new O.a(i,{supportedMethods:["GET"],fetchOptions:o}),n}return Object(c.a)(A,[{key:"getJson",value:function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.store.getItem(e);case 3:return A=t.sent,n=new TextDecoder("utf-8").decode(A),t.abrupt("return",JSON.parse(n));case 8:if(t.prev=8,t.t0=t.catch(0),!(t.t0 instanceof O.b)){t.next=12;break}return t.abrupt("return",{});case 12:throw t.t0;case 13:case"end":return t.stop()}}),t,this,[[0,8]])})));return function(e){return t.apply(this,arguments)}}()}]),A}(F),j=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(){return Object(g.a)(this,A),e.apply(this,arguments)}return Object(c.a)(A,[{key:"loadAttrs",value:function(){return this.attrs||(this.attrs=this.getJson(".zattrs")),this.attrs}},{key:"loadArr",value:function(){var t=this.store;return this.arr||(this.arr=Object(O.c)({store:t,path:"/",mode:"r"}).then((function(t){return new Promise((function(e){t.getRaw([null,null]).then(e)}))}))),this.arr}},{key:"load",value:function(){return Promise.all([this.loadAttrs(),this.loadArr()]).then((function(t){return Promise.resolve(new S(t,null))}))}}]),A}(T),H=A(71),Y=A(92),V=A(1426),Z=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(t){var n;return Object(g.a)(this,A),(n=e.call(this,t)).schema=V,n}return Object(c.a)(A,[{key:"load",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,n,r,i,o,a,s,g;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Y.a)(Object(H.a)(A.prototype),"load",this).call(this).catch((function(t){return Promise.resolve(t)}));case 2:if(!((e=t.sent)instanceof w.a)){t.next=5;break}return t.abrupt("return",Promise.reject(e));case 5:return n=e.data,r=e.url,i=Object.keys(n),o=i.length>0?Object.keys(n[i[0]].cells):[],a={rows:o,cols:i},s=o.flatMap((function(t){return i.map((function(e){return n[e].cells[t]/n[e].max*255}))})),g={data:Uint8Array.from(s)},t.abrupt("return",Promise.resolve(new S([a,g],r)));case 12:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),A}(x),W=A(1166),K=A(247),P=A.n(K),q=A(1427),X=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(t){var n;return Object(g.a)(this,A),(n=e.call(this,t)).schema=q,n}return Object(c.a)(A,[{key:"load",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,n,r,i,a,s,g,c,I,u,l,C;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Y.a)(Object(H.a)(A.prototype),"load",this).call(this).catch((function(t){return Promise.resolve(t)}));case 2:if(!((e=t.sent)instanceof w.a)){t.next=5;break}return t.abrupt("return",Promise.reject(e));case 5:return n=e.data,r=e.url,i=n.rows,a=n.cols,s=n.matrix,c=[(g={rows:a,cols:i}).rows.length,g.cols.length],I=s.map((function(t){var e=Object(W.a)(t),A=Object(o.a)(e,2),n=A[0],r=A[1];return t.map((function(t){return Math.floor((t-n)/(r-n)*255)}))})),u=P()(c[0]).map((function(t){return P()(c[1]).map((function(e){return I[e][t]}))})),l=u.flat(),C={data:Uint8Array.from(l)},t.abrupt("return",Promise.resolve(new S([g,C],r)));case 14:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),A}(x),z=A(20),$=A(123),tt=A(427);function et(t){return At.apply(this,arguments)}function At(){return(At=Object(_.a)(L.a.mark((function t(e){var A,n,r,i,a,s,g,c,I,u,l,C,h,B,f,d,Q,E,p,y,v,m,b,F,w,S,D,R,U;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A=e.type,n=e.url,r=e.metadata,i=e.requestInit,t.t0=A,t.next="zarr"===t.t0?4:"ome-tiff"===t.t0?30:53;break;case 4:if(s=(a=r||{}).dimensions,g=a.isPyramid,c=a.transform,I=s.map((function(t){return t.field})),!g){t.next=25;break}return l="".concat(n).concat("/"===n.slice(-1)?"":"/",".zmetadata"),t.next=10,fetch(l);case 10:return C=t.sent,t.next=13,C.json();case 13:return h=t.sent,B=h.metadata,f=Object.keys(B).filter((function(t){return t.includes(".zarray")})).map((function(t){return t.slice(0,-7)})),t.next=18,Promise.all(f.map((function(t){return Object(O.c)({store:n,path:t})})));case 18:d=t.sent,Q=d[0].chunks.slice(-2),E=Object(o.a)(Q,2),p=E[0],y=E[1],v=Math.min(p,y),m=Math.pow(2,Math.floor(Math.log2(v))),u=d.map((function(t){return new $.i(t,I,m)})),t.next=29;break;case 25:return t.next=27,Object(O.c)({store:n});case 27:b=t.sent,u=new $.i(b,I);case 29:return t.abrupt("return",{data:u,metadata:{dimensions:s,transform:c},channels:(s.find((function(t){return"channel"===t.field}))||s[0]).values});case 30:if(!r||!("omeTiffOffsetsUrl"in r)){t.next=47;break}return w=r.omeTiffOffsetsUrl,t.next=34,fetch(w,i||{});case 34:if(!(S=t.sent).ok){t.next=44;break}return t.next=38,S.json();case 38:return D=t.sent,t.next=41,Object($.l)(n,{offsets:D,headers:null===i||void 0===i?void 0:i.headers});case 41:F=t.sent,t.next=45;break;case 44:throw new Error("Offsets not found but provided.");case 45:t.next=50;break;case 47:return t.next=49,Object($.l)(n,{headers:null===i||void 0===i?void 0:i.headers});case 49:F=t.sent;case 50:return R=F.metadata.Pixels.Channels,U=Array.isArray(R)?R.map((function(t,e){return t.Name||"Channel ".concat(e)})):[R.Name||"Channel ".concat(0)],t.abrupt("return",Object(z.a)({},F,{channels:U}));case 53:throw Error("Image type (".concat(A,") is not supported"));case 54:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var nt=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(t){var n;Object(g.a)(this,A),n=e.call(this,t);var r=t.url,i=t.options;return!r&&i&&(n.url=URL.createObjectURL(new Blob([JSON.stringify(i)])),n.options=void 0),n.schema=G,n}return Object(c.a)(A,[{key:"load",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,n,r,i,a,s,g,c;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Y.a)(Object(H.a)(A.prototype),"load",this).call(this).catch((function(t){return Promise.resolve(t)}));case 2:if(!((e=t.sent)instanceof w.a)){t.next=5;break}return t.abrupt("return",Promise.reject(e));case 5:return n=e.data,r=n.images,i=n.renderLayers,a=n.usePhysicalSizeScaling,s=void 0!==a&&a,g=r.filter((function(t){return!t.url.includes("zarr")})).map((function(t){return[t.url,t.name]})),c=r.map((function(t){return Object(z.a)({},t,{loaderCreator:function(){var e=Object(_.a)(L.a.mark((function e(){return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",et(t));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()})})),this.autoImageCache||(this.autoImageCache=Object(tt.d)(c,i,s)),t.abrupt("return",this.autoImageCache.then((function(t){var e=Object(o.a)(t,3),A=e[0],n=e[1],r=e[2];return new S({loaders:n,meta:r},g,{spatialRasterLayers:A})})));case 11:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),A}(x);function rt(t){var e=/^#?([A-F\d]{2})([A-F\d]{2})([A-F\d]{2})$/i.exec(t);return[parseInt(e[1].toLowerCase(),16),parseInt(e[2].toLowerCase(),16),parseInt(e[3].toLowerCase(),16)]}var it=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(){return Object(g.a)(this,A),e.apply(this,arguments)}return Object(c.a)(A,[{key:"load",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,A,n,r,i,a,s,g,c,I,u,l,C,h,B,f,d;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getJson(".zattrs").catch((function(t){return Promise.resolve(t)}));case 2:if(!((n=t.sent)instanceof w.a)){t.next=5;break}return t.abrupt("return",Promise.reject(n));case 5:return t.next=7,Object($.m)(this.url,{fetchOptions:this.requestInit,type:"multiscales"});case 7:if(r=t.sent,i=r.metadata,a=i.omero){t.next=13;break}return console.error("Path for image not valid"),t.abrupt("return",Promise.reject(n));case 13:return s=a.rdefs,g=a.channels,c=null!==(e=s.defaultT)&&void 0!==e?e:0,I=null!==(A=s.defaultZ)&&void 0!==A?A:0,u=[{name:a.name,channels:g.map((function(t,e){return{selection:{z:I,t:c,c:e},slider:[t.window.start,t.window.end],color:rt(t.color)}})),loaderCreator:function(){var t=Object(_.a)(L.a.mark((function t(){return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(z.a)({},r,{channels:g.map((function(t){return t.label}))}));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}],t.next=19,Object(tt.d)(u,void 0);case 19:return l=t.sent,C=Object(o.a)(l,3),h=C[0],B=C[1],f=C[2],d={spatialRasterLayers:h},t.abrupt("return",Promise.resolve(new S({loaders:B,meta:f},[],d)));case 26:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),A}(T),ot=A(422),at=A(137),st=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(t){var n;return Object(g.a)(this,A),(n=e.call(this,t)).schema=N,n}return Object(c.a)(A,[{key:"load",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,n,r,i,o,a,s,g,c;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Y.a)(Object(H.a)(A.prototype),"load",this).call(this).catch((function(t){return Promise.resolve(t)}));case 2:if(!((e=t.sent)instanceof w.a)){t.next=5;break}return t.abrupt("return",Promise.reject(e));case 5:return n=e.data,r=e.url,i=Object(ot.f)(n,"cell"),o={cellSetSelection:[],cellSetColor:[]},i&&i.tree.length>=1&&(a=i.tree,s=a[0].name,g=a[0].children.map((function(t){return[s,t.name]})),c=Object(at.c)(i,[]),o.cellSetSelection=g,o.cellSetColor=c),t.abrupt("return",Promise.resolve(new S(i,r,o)));case 10:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),A}(x),gt=A(101),ct=function(t){if(4!==t.length)throw new Error("readFloat32 only takes in length 4 byte buffers");return new Int32Array(t.buffer)[0]};function It(t){var e=new TextDecoder,A=0,n=A+t.length,r=ct(t.slice(A,4));if(t.length<4)throw new Error("corrupt buffer, missing or truncated header");A+=4;for(var i=new Array(r),o=0;o<r;o+=1){if(A+4>n)throw new Error("corrupt buffer, data seem truncated");var a=ct(t.slice(A,A+4));if((A+=4)+a>n)throw new Error("corrupt buffer, data seem truncated");i[o]=e.decode(t.slice(A,A+a)),A+=a}return i}var ut,lt=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(){return Object(g.a)(this,A),e.apply(this,arguments)}return Object(c.a)(A,[{key:"loadCellSetIds",value:function(t){var e=this,A=this.store;return this.cellSets||(this.cellSets=Promise.all(t.map(function(){var t=Object(_.a)(L.a.mark((function t(n){var r,i,o,a,s,g,c,I;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getJson("".concat(n,"/.zattrs"));case 2:if(r=t.sent,!(i=r.categories)){t.next=13;break}return t.next=7,e.getJson("/obs/".concat(i,"/.zarray"));case 7:if(a=t.sent,"|O"!==a.dtype){t.next=13;break}return t.next=12,e.getFlatArrDecompressed("/obs/".concat(i));case 12:o=t.sent;case 13:return t.next=15,Object(O.c)({store:A,path:n,mode:"r"});case 15:return s=t.sent,t.next=18,s.get();case 18:return g=t.sent,c=g.data,I=Array.from(c).map((function(t){return o?o[t]:String(t)})),t.abrupt("return",I);case 22:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()))),this.cellSets}},{key:"loadNumeric",value:function(t){var e=this.store;return Object(O.c)({store:e,path:t,mode:"r"}).then((function(t){return t.get()}))}},{key:"getFlatArrDecompressed",value:function(t){var e=this.store;return Object(O.c)({store:e,path:t,mode:"r"}).then(function(){var t=Object(_.a)(L.a.mark((function t(A){var n,r,i,a,s,g,c;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=function(t){var e=It(t);n=n?n.concat(e):e},i=function(t){if(n){var e=new Uint8Array(t.buffer.byteLength+n.buffer.byteLength);e.set(new Uint8Array(n.buffer),0),e.set(t,n.buffer.byteLength),n=e}else n=t},a=Math.ceil(A.meta.shape[0]/A.meta.chunks[0]),s=P()(a).map(function(){var t=Object(_.a)(L.a.mark((function t(n){return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.getItem("".concat(A.keyPrefix).concat(String(n))).then((function(t){return A.compressor.then((function(e){return e.decode(t)}))})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.next=6,Promise.all(s);case 6:return t.sent.forEach((function(t){Array.isArray(A.meta.filters)&&"vlen-utf8"===A.meta.filters[0].id?r(t):i(t)})),g=Object(o.a)(A.meta.shape,1),c=g[0],t.abrupt("return",n.slice(0,c));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"loadCellNames",value:function(){var t=this;return this.cellNames||(this.cellNames=this.getJson("obs/.zattrs").then((function(e){var A=e._index;return t.getFlatArrDecompressed("/obs/".concat(A))}))),this.cellNames}}]),A}(T),Ct=function(t){var e=Object(W.a)(t),A=Object(o.a)(e,2),n=A[0],r=255/(A[1]-n);return{data:new Uint8Array(t.map((function(t){return Math.floor((t-n)*r)})))}},ht=function(t){for(var e=t.length,A=t[0].length,n=t[0].BYTES_PER_ELEMENT,r=new DataView(new ArrayBuffer(e*A*n)),i=t[0].constructor,o=i.name.replace("Array",""),a=0;a<e;a+=1)for(var s=0;s<A;s+=1)r["set".concat(o)](n*(s*e+a),t[a][s],!0);return new i(r.buffer)},Bt={CellSetsZarrLoader:function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(){return Object(g.a)(this,A),e.apply(this,arguments)}return Object(c.a)(A,[{key:"load",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,A,n,r,i,a,s,g;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.cellSetsTree||(e=this.options,A=e.map((function(t){return t.setName})),this.cellSetsTree=Promise.all([this.loadCellNames(),this.loadCellSetIds(A)]).then((function(t){var A=Object(o.a)(t,2),n=A[0],r=A[1],i=Object(at.m)(gt.h);return r.forEach((function(t,A){var r={name:e[A].groupName,children:[]},o=Array.apply(void 0,Object(B.a)(new Set(t))).sort(),a={};o.forEach((function(t){return a[t]={name:t,set:[]}})),t.forEach((function(t,e){return a[t].set.push([n[e],null])})),Object.values(a).forEach((function(t){return r=Object(at.d)(r,t)})),i.tree.push(r)})),i}))),t.next=3,this.cellSetsTree;case 3:return n=t.sent,r={},i=n.tree,a=i[0].name,s=i[0].children.map((function(t){return[a,t.name]})),g=Object(at.c)(n,[]),r.cellSetSelection=s,r.cellSetColor=g,t.abrupt("return",Promise.resolve(new S(n,null,r)));case 12:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),A}(lt),CellsZarrLoader:function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(){return Object(g.a)(this,A),e.apply(this,arguments)}return Object(c.a)(A,[{key:"loadXy",value:function(){var t=(this.options||{}).xy;return this.xy?this.xy:!this.xy&&t?(this.xy=this.loadNumeric(t),this.xy):(this.xy=Promise.resolve(null),this.xy)}},{key:"loadPoly",value:function(){var t=(this.options||{}).poly;return this.poly?this.poly:!this.poly&&t?(this.poly=this.loadNumeric(t),this.poly):(this.poly=Promise.resolve(null),this.poly)}},{key:"loadMappings",value:function(){var t=this,e=(this.options||{}).mappings;return this.mappings?this.mappings:!this.mappings&&e?(this.mappings=Promise.all(Object.keys(e).map(function(){var A=Object(_.a)(L.a.mark((function A(n){var r;return L.a.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return r=e[n].key,A.t0=n,A.next=4,t.loadNumeric(r);case 4:return A.t1=A.sent,A.abrupt("return",{coordinationName:A.t0,arr:A.t1});case 6:case"end":return A.stop()}}),A)})));return function(t){return A.apply(this,arguments)}}())),this.mappings):(this.mappings=Promise.resolve(null),this.mappings)}},{key:"loadFactors",value:function(){var t=(this.options||{}).factors;return t?this.loadCellSetIds(t):Promise.resolve(null)}},{key:"load",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e=this;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.cells||(this.cells=Promise.all([this.loadMappings(),this.loadXy(),this.loadPoly(),this.loadCellNames(),this.loadFactors()]).then((function(t){var A=Object(o.a)(t,5),n=A[0],r=A[1],i=A[2],a=A[3],s=A[4],g={};return a.forEach((function(t,A){if(g[t]={},n&&n.forEach((function(n){var r=n.coordinationName,i=n.arr;g[t].mappings||(g[t].mappings={});var o=e.options.mappings[r].dims;g[t].mappings[r]=o.map((function(t){return i.data[A][t]}))})),r&&(g[t].xy=r.data[A]),i&&(g[t].poly=i.data[A]),s){var o={};s.forEach((function(t,n){return o[e.options.factors[n].split("/").slice(-1)]=t[A]})),g[t].factors=o}})),g}))),t.t0=Promise,t.t1=S,t.next=5,this.cells;case 5:return t.t2=t.sent,t.t3=new t.t1(t.t2,null),t.abrupt("return",t.t0.resolve.call(t.t0,t.t3));case 8:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),A}(lt),MatrixZarrLoader:function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(){return Object(g.a)(this,A),e.apply(this,arguments)}return Object(c.a)(A,[{key:"loadGeneNames",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,A,n,r;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.geneNames){t.next=2;break}return t.abrupt("return",this.geneNames);case 2:if(!(e=this.options.geneFilter)){t.next=7;break}return t.next=6,this.getFlatArrDecompressed(e);case 6:A=t.sent;case 7:return t.next=9,this.getJson("var/.zattrs");case 9:if(n=t.sent,r=n._index,!this.geneNames){t.next=13;break}return t.abrupt("return",this.geneNames);case 13:return this.geneNames=this.getFlatArrDecompressed("var/".concat(r)).then((function(t){return t.filter((function(t,e){return!A||A[e]}))})),t.abrupt("return",this.geneNames);case 15:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_getFilteredGenes",value:function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n,r;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getFlatArrDecompressed(e);case 2:return A=t.sent,t.next=5,this.loadGeneNames();case 5:return n=t.sent,r=n.filter((function(t,e){return A[e]})),t.abrupt("return",r);case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getGeneIndices",value:function(){var t=Object(_.a)(L.a.mark((function t(e){var A;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadGeneNames();case 2:return A=t.sent,t.abrupt("return",e.map((function(t){return A.indexOf(t)})));case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getNumCells",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadCellNames();case 2:return e=t.sent,t.abrupt("return",e.length);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_getNumGenes",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadGeneNames();case 2:return e=t.sent,t.abrupt("return",e.length);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_openSparseArrays",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,A;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.options.matrix,A=this.store,!this.sparseArrays){t.next=3;break}return t.abrupt("return",this.sparseArrays);case 3:return this.sparseArrays=Promise.all(["indptr","indices","data"].map((function(t){return Object(O.c)({store:A,path:"".concat(e,"/").concat(t),mode:"r"})}))),t.abrupt("return",this.sparseArrays);case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_loadCSCGeneSelection",value:function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n,r,i,a,s,g,c,I;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._getGeneIndices(e);case 2:return A=t.sent,t.next=5,this._openSparseArrays();case 5:return n=t.sent,r=Object(o.a)(n,3),i=r[0],a=r[1],s=r[2],t.next=12,this._getNumCells();case 12:return g=t.sent,t.next=15,i.getRaw(null);case 15:return c=t.sent,I=c.data,t.abrupt("return",Promise.all(A.map(function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n,r,i,o,c,u,l,C;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=I[e],n=I[e+1],r=A===n,i=new Float32Array(g).fill(0),!r){t.next=6;break}return t.abrupt("return",i);case 6:return t.next=8,a.get([Object(O.d)(A,n)]);case 8:return o=t.sent,c=o.data,t.next=12,s.get([Object(O.d)(A,n)]);case 12:for(u=t.sent,l=u.data,C=0;C<c.length;C+=1)i[c[C]]=l[C];return t.abrupt("return",i);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())));case 18:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_loadCSRGeneSelection",value:function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n,r,i;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._getGeneIndices(e);case 2:return A=t.sent,t.next=5,this._getNumGenes();case 5:return n=t.sent,t.next=8,this._getNumCells();case 8:return r=t.sent,t.next=11,this._loadCSRSparseCellXGene();case 11:return i=t.sent,t.abrupt("return",A.map((function(t){for(var e=new Float32Array(r).fill(0),A=0;A<r;A+=1)e[A]=i[A*n+t];return e})));case 13:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_loadCSRSparseCellXGene",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e=this;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._sparseMatrix){t.next=2;break}return t.abrupt("return",this._sparseMatrix);case 2:return this._sparseMatrix=this._openSparseArrays().then(function(){var t=Object(_.a)(L.a.mark((function t(A){var n,r,i,a,s,g,c,I,u,l;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.options.matrix,t.next=3,e.getJson("".concat(n,"/.zattrs"));case 3:return r=t.sent,i=r.shape,t.next=7,Promise.all(A.map(function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getRaw(null);case 2:return A=t.sent,n=A.data,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 7:return a=t.sent,s=Object(o.a)(a,3),g=s[0],c=s[1],I=s[2],u=new Float32Array(i[0]*i[1]).fill(0),l=0,g.forEach((function(t,e){for(var A=g[e],n=g[e+1],r=A;r<n;r+=1){var o=I[r],a=c[r];u[l*i[1]+a]=o}l+=1})),t.abrupt("return",u);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.abrupt("return",this._sparseMatrix);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_loadCSCSparseCellXGene",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e=this;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._sparseMatrix){t.next=2;break}return t.abrupt("return",this._sparseMatrix);case 2:return this._sparseMatrix=this._openSparseArrays().then(function(){var t=Object(_.a)(L.a.mark((function t(A){var n,r,i,a,s,g,c,I,u,l;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.options.matrix,t.next=3,e.getJson("".concat(n,"/.zattrs"));case 3:return r=t.sent,i=r.shape,t.next=7,Promise.all(A.map(function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getRaw(null);case 2:return A=t.sent,n=A.data,t.abrupt("return",n);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 7:return a=t.sent,s=Object(o.a)(a,3),g=s[0],c=s[1],I=s[2],u=new Float32Array(i[0]*i[1]).fill(0),l=0,g.forEach((function(t,e){for(var A=g[e],n=g[e+1],r=A;r<n;r+=1){var o=I[r],a=c[r];u[a*i[1]+l]=o}l+=1})),t.abrupt("return",u);case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.abrupt("return",this._sparseMatrix);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"loadCellXGene",value:function(){var t=Object(_.a)(L.a.mark((function t(){var e,A,n,r,i,o,a=this;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.store,!this.cellXGene){t.next=3;break}return t.abrupt("return",this.cellXGene);case 3:if(A=this.options,n=A.matrix,r=A.matrixGeneFilter,this._matrixZattrs){t.next=8;break}return t.next=7,this.getJson("".concat(n,"/.zattrs"));case 7:this._matrixZattrs=t.sent;case 8:if(i=this._matrixZattrs["encoding-type"],r){t.next=13;break}"csr_matrix"===i?this.cellXGene=this._loadCSRSparseCellXGene().then((function(t){return Ct(t)})):"csc_matrix"===i?this.cellXGene=this._loadCSCSparseCellXGene().then((function(t){return Ct(t)})):(this.arr||(this.arr=Object(O.c)({store:e,path:n,mode:"r"})),this.cellXGene=this.arr.then((function(t){return t.getRaw(null).then((function(t){var e=t.data;return Ct(e)}))}))),t.next=21;break;case 13:if("csr_matrix"!==i){t.next=17;break}this.cellXGene=this._loadCSRSparseCellXGene().then(function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n,i,o,s,g,c,I,u;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a._getFilteredGenes(r);case 2:return A=t.sent,n=A.length,t.next=6,a.loadGeneNames();case 6:return i=t.sent,o=i.length,t.next=10,a._getNumCells();case 10:for(s=t.sent,g=new Float32Array(s*n).fill(0),c=0;c<n;c+=1)for(I=i.indexOf(A[c]),u=0;u<s;u+=1)g[u*n+c]=e[u*o+I];return t.abrupt("return",Ct(g));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.next=21;break;case 17:return t.next=19,this._getFilteredGenes(r);case 19:o=t.sent,this.cellXGene=this.loadGeneSelection({selection:o,shouldNormalize:!1}).then((function(t){var e=t.data;return Ct(ht(e))}));case 21:return t.abrupt("return",this.cellXGene);case 22:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"loadGeneSelection",value:function(){var t=Object(_.a)(L.a.mark((function t(e){var A,n,r,i,o,a,s,g,c=this;return L.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(A=e.selection,n=e.shouldNormalize,r=void 0===n||n,i=this.options.matrix,o=this.store,this._matrixZattrs){t.next=6;break}return t.next=5,this.getJson("".concat(i,"/.zattrs"));case 5:this._matrixZattrs=t.sent;case 6:if("csc_matrix"!==(a=this._matrixZattrs["encoding-type"])){t.next=13;break}return t.next=10,this._loadCSCGeneSelection(A);case 10:s=t.sent,t.next=26;break;case 13:if("csr_matrix"!==a){t.next=19;break}return t.next=16,this._loadCSRGeneSelection(A);case 16:s=t.sent,t.next=26;break;case 19:return this.arr||(this.arr=Object(O.c)({store:o,path:i,mode:"r"})),t.next=22,this._getGeneIndices(A);case 22:return g=t.sent,t.next=25,Promise.all(g.map((function(t){return c.arr.then((function(e){return e.get([null,t])})).then((function(t){return t.data}))})));case 25:s=t.sent;case 26:return t.abrupt("return",{data:s.map((function(t){return r?Ct(t).data:t})),url:null});case 27:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"loadAttrs",value:function(){return Promise.all([this.loadCellNames(),this.loadGeneNames()]).then((function(t){var e=Object(o.a)(t,2);return{data:{rows:e[0],cols:e[1]},url:null}}))}},{key:"load",value:function(){var t=this;return Promise.all([this.loadAttrs(),this.loadCellXGene()]).then(function(){var e=Object(_.a)(L.a.mark((function e(A){var n,r,i,a,s;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Object(o.a)(A,2),r=n[0].data,i=n[1],!(a=t.options.matrixGeneFilter)){e.next=7;break}return e.next=5,t.getFlatArrDecompressed(a);case 5:s=e.sent,r.cols=r.cols.filter((function(t,e){return s[e]}));case 7:return e.abrupt("return",Promise.resolve(new S([r,i],null)));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}}]),A}(lt)},ft=function(t){Object(I.a)(A,t);var e=Object(u.a)(A);function A(t){var n;Object(g.a)(this,A),n=e.call(this,t);var r=Object(J.a)(n),i=r.url;r.requestInit;return n.store=new O.a(i),n}return Object(c.a)(A,[{key:"loadAttrs",value:function(){var t=this.store;return this.attrs||(this.attrs=t.getItem(".zattrs").then((function(t){var e=new TextDecoder("utf-8");return JSON.parse(e.decode(t))}))),this.attrs}},{key:"load",value:function(){var t=this.url;return this.loadAttrs().then((function(e){return Promise.resolve(new S(e,t))}))}}]),A}(F),dt=(ut={"expression-matrix.zarr":j,"clusters.json":X,"genes.json":Z,"cells.json":x,"molecules.json":x,"neighborhoods.json":x,"raster.json":nt,"raster.ome-zarr":it,"cell-sets.json":st},Object(p.a)(ut,"".concat("anndata","-cell-sets.zarr"),Bt.CellSetsZarrLoader),Object(p.a)(ut,"".concat("anndata","-cells.zarr"),Bt.CellsZarrLoader),Object(p.a)(ut,"".concat("anndata","-expression-matrix.zarr"),Bt.MatrixZarrLoader),Object(p.a)(ut,"genomic-profiles.zarr",ft),ut);var Qt=A(63);function Et(t){var e=t.rowHeight,A=t.config,n=t.getComponent,r=t.theme,i=t.height,g=function(t,e,A,n,r){var i=Object(a.useState)(A),s=Object(o.a)(i,2),g=s[0],c=s[1],I=Object(a.useState)(e),u=Object(o.a)(I,2),l=u[0],C=u[1],h=Object(a.useRef)();return Object(a.useEffect)((function(){var e=function(t){for(var e,A=0,n=0,r=t.length;n<r;n++)(e=t[n].y+t[n].h)>A&&(A=e);return A}(t.layout),A=function(t,e,A,n){return(t-2*n-(e-1)*A)/e}(g,e,n,r);C(A)}),[g,t,n,r]),Object(a.useEffect)((function(){null!==A&&void 0!==A&&c(A)}),[A]),Object(a.useEffect)((function(){if(null!==A&&void 0!==A)return function(){};function t(){if(h.current){var t=h.current.getBoundingClientRect();c(t.height)}}return window.addEventListener("resize",t),t(),function(){window.removeEventListener("resize",t)}}),[h,A]),[l,h]}(A,e,i,5,10),c=Object(o.a)(g,2),I=c[0],u=c[1],l=Object(Qt.g)();Object(a.useEffect)((function(){l()}),[I,l]);var C=Object(Qt.o)(),h=Object(Qt.n)(),B=Object(Qt.k)(),f=Object(Qt.b)(),d=Object(Qt.i)();return Object(a.useEffect)((function(){if(A){C(A);var t=function(t,e){var A={};return t.forEach((function(t){var n={name:t.name,description:t.description||e,loaders:{}};t.files.forEach((function(t){var e=dt[t.fileType]||x;n.loaders[t.type]=new e(t)})),A[t.uid]=n})),A}(A.datasets,A.description);h(t)}else h({})}),[A,C,h]),s.a.createElement("div",{ref:u,className:"vitessce-container vitessce-theme-".concat(r)},d&&s.a.createElement(E,{layout:d,height:i,rowHeight:I,theme:r,getComponent:n,draggableHandle:".title",margin:5,padding:10,onRemoveComponent:B,onLayoutChange:f,reactGridLayoutProps:{onResize:l,onResizeStop:l}}))}var pt="https://s3.amazonaws.com/vitessce-data/0.0.31/master_release";function yt(t){return function(e){return{name:e,type:e.toUpperCase(),fileType:"".concat(e,".json"),url:"".concat(pt,"/").concat(t,"/").concat(t,".").concat(e,".json")}}}var vt=["cells","cell-sets","raster","molecules","neighborhoods"],mt="Spatial organization of the somatosensory cortex revealed by cyclic smFISH",bt={description:mt,layers:[].concat(Object(B.a)(vt.map(yt("linnarsson"))),[Object(z.a)({},yt("linnarsson")("clusters"),{type:"EXPRESSION-MATRIX"})])},Ft={description:mt,layers:vt.filter((function(t){return"clusters"!==t})).map(yt("linnarsson"))},wt="Giotto, a pipeline for integrative analysis and visualization of single-cell spatial transcriptomic data",St={description:wt,layers:["cells","cell-sets"].map(yt("dries"))},Dt="Multiplexed imaging of high-density libraries of RNAs with MERFISH and expansion microscopy",Rt={description:Dt,layers:[].concat(Object(B.a)(["cells","molecules"].map(yt("wang"))),[Object(z.a)({},yt("wang")("genes"),{name:"expression-matrix",type:"EXPRESSION-MATRIX"})])},Ut={description:"High Bit Depth (uint16) Multiplex Immunofluorescence Imaging",layers:["raster"].map(yt("spraggins"))},Gt={"just-scatter":{version:"0.1.0",public:!1,layers:[{name:"cells",type:"CELLS",fileType:"cells.json",url:"".concat(pt,"/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:mt,public:!0,datasets:[{uid:"linnarsson-2018",name:"Linnarsson 2018",description:"Linnarsson: ".concat(mt),files:bt.layers.map((function(t){return{type:t.type.toLowerCase(),fileType:t.fileType,url:t.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",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:5,h:2},{component:"cellSetExpression",x:7,y:4,w:3,h:2},{component:"expressionHistogram",x:10,y:4,w:2,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(z.a)({},bt,{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(z.a)({},Ft,{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(z.a)({},bt,{version:"0.1.0",name:"Linnarsson (static layout)",staticLayout:[{component:"description",props:{description:"Linnarsson (static layout): ".concat(mt)},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(z.a)({},bt,{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:wt,public:!0,datasets:[{uid:"dries-2019",name:"Dries 2019",files:St.layers.map((function(t){return{type:t.type.toLowerCase(),fileType:t.fileType,url:t.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",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:Dt,public:!0,datasets:[{uid:"wang-2019",name:"Wang 2019",files:Rt.layers.map((function(t){return{type:t.type.toLowerCase(),fileType:t.fileType,url:t.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"},props:{},x:0,y:0,w:10,h:2},{component:"genes",x:10,y:0,w:2,h:4},{component:"expressionHistogram",x:0,y:2,w:10,h:2}]},vanderbilt:Object(z.a)({},Ut,{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"},"portal-ui-featured":{coordinationSpace:{dataset:{A:"A"},spatialZoom:{A:.6219962674826599},spatialRotation:{A:0},spatialTargetX:{A:550.9755273834661},spatialTargetY:{A:418.2987491735642},spatialTargetZ:{A:6252776074688882e-28},heatmapZoomX:{A:0},heatmapZoomY:{A:0},heatmapTargetX:{A:0},heatmapTargetY:{A:0},cellFilter:{A:null},cellHighlight:{A:"761"},cellSetSelection:{A:[["K-Means [Mean] Expression","Cluster 1"],["K-Means [Mean] Expression","Cluster 2"],["K-Means [Mean] Expression","Cluster 3"],["K-Means [Mean] Expression","Cluster 4"],["K-Means [Mean] Expression","Cluster 5"],["K-Means [Mean] Expression","Cluster 6"]]},cellSetHighlight:{A:null},cellSetColor:{A:[{path:["K-Means [Mean] Expression"],color:[68,119,170,255]},{path:["K-Means [Mean] Expression","Cluster 1"],color:[68,119,170,255]},{path:["K-Means [Mean] Expression","Cluster 2"],color:[136,204,238,255]},{path:["K-Means [Mean] Expression","Cluster 3"],color:[68,170,153,255]},{path:["K-Means [Mean] Expression","Cluster 4"],color:[17,119,51,255]},{path:["K-Means [Mean] Expression","Cluster 5"],color:[153,153,51,255]},{path:["K-Means [Mean] Expression","Cluster 6"],color:[221,204,119,255]},{path:["K-Means [Covariance] Expression"],color:[68,119,170,255]},{path:["K-Means [Covariance] Expression","Cluster 1"],color:[68,119,170,255]},{path:["K-Means [Covariance] Expression","Cluster 2"],color:[136,204,238,255]},{path:["K-Means [Covariance] Expression","Cluster 3"],color:[68,170,153,255]},{path:["K-Means [Covariance] Expression","Cluster 4"],color:[17,119,51,255]},{path:["K-Means [Covariance] Expression","Cluster 5"],color:[153,153,51,255]},{path:["K-Means [Covariance] Expression","Cluster 6"],color:[221,204,119,255]},{path:["K-Means [Total] Expression"],color:[68,119,170,255]},{path:["K-Means [Total] Expression","Cluster 1"],color:[68,119,170,255]},{path:["K-Means [Total] Expression","Cluster 2"],color:[136,204,238,255]},{path:["K-Means [Total] Expression","Cluster 3"],color:[68,170,153,255]},{path:["K-Means [Total] Expression","Cluster 4"],color:[17,119,51,255]},{path:["K-Means [Total] Expression","Cluster 5"],color:[153,153,51,255]},{path:["K-Means [Total] Expression","Cluster 6"],color:[221,204,119,255]},{path:["K-Means [Mean-All-SubRegions] Expression"],color:[68,119,170,255]},{path:["K-Means [Mean-All-SubRegions] Expression","Cluster 1"],color:[68,119,170,255]},{path:["K-Means [Mean-All-SubRegions] Expression","Cluster 2"],color:[136,204,238,255]},{path:["K-Means [Mean-All-SubRegions] Expression","Cluster 3"],color:[68,170,153,255]},{path:["K-Means [Mean-All-SubRegions] Expression","Cluster 4"],color:[17,119,51,255]},{path:["K-Means [Mean-All-SubRegions] Expression","Cluster 5"],color:[153,153,51,255]},{path:["K-Means [Mean-All-SubRegions] Expression","Cluster 6"],color:[221,204,119,255]},{path:["K-Means [Shape-Vectors]"],color:[68,119,170,255]},{path:["K-Means [Shape-Vectors]","Cluster 1"],color:[68,119,170,255]},{path:["K-Means [Shape-Vectors]","Cluster 2"],color:[136,204,238,255]},{path:["K-Means [Shape-Vectors]","Cluster 3"],color:[68,170,153,255]}]},geneFilter:{A:null},geneHighlight:{A:null},geneSelection:{A:null},geneExpressionColormap:{A:"plasma"},geneExpressionColormapRange:{A:[.065,.435]},cellColorEncoding:{A:"cellSetSelection"},spatialRasterLayers:{A:[{type:"t",index:0,colormap:null,opacity:1,domainType:"Min/Max",transparentColor:null,channels:[{selection:{z:5,t:0,c:10},color:[0,0,255],visible:!0,slider:[1,14906]},{selection:{z:5,t:0,c:15},color:[0,255,0],visible:!0,slider:[2313,31611]},{selection:{z:5,t:0,c:45},color:[255,0,255],visible:!0,slider:[2570,21074]},{selection:{z:5,t:0,c:20},color:[255,255,0],visible:!0,slider:[2827,11565]},{selection:{z:5,t:0,c:31},slider:[5658,17479],visible:!0,color:[255,128,0]},{selection:{z:5,t:0,c:39},slider:[1767,11735],visible:!0,color:[255,255,255]}]}]},spatialCellsLayer:{A:{opacity:0,radius:50,visible:!0,stroked:!0}},spatialMoleculesLayer:{A:null},spatialNeighborhoodsLayer:{A:null},additionalCellSets:{A:null},moleculeHighlight:{A:null}},datasets:[{files:[{fileType:"cells.json",type:"cells",url:"https://assets.hubmapconsortium.org/ca3016d836d8ee50bef1b93f339c9679/output_json/R002_X002_Y007.cells.json?token="},{fileType:"cell-sets.json",type:"cell-sets",url:"https://assets.hubmapconsortium.org/ca3016d836d8ee50bef1b93f339c9679/output_json/R002_X002_Y007.cell-sets.json?token="},{fileType:"clusters.json",type:"expression-matrix",url:"https://assets.hubmapconsortium.org/ca3016d836d8ee50bef1b93f339c9679/output_json/R002_X002_Y007.clusters.json?token="},{fileType:"raster.json",options:{images:[{metadata:{omeTiffOffsetsUrl:"https://assets.hubmapconsortium.org/ca3016d836d8ee50bef1b93f339c9679/output_offsets/R002_X002_Y007.offsets.json?token="},name:"R002_X002_Y007",type:"ome-tiff",url:"https://assets.hubmapconsortium.org/ca3016d836d8ee50bef1b93f339c9679/output/extract/expressions/ome-tiff/R002_X002_Y007.ome.tiff?token="}],schemaVersion:"0.0.2"},type:"raster"}],name:"SPRM",uid:"A"}],description:"",initStrategy:"auto",layout:[{component:"spatial",coordinationScopes:{dataset:"A",spatialZoom:"A",spatialRotation:"A",spatialTargetX:"A",spatialTargetY:"A",spatialTargetZ:"A",cellFilter:"A",cellHighlight:"A",cellSetSelection:"A",cellSetHighlight:"A",cellSetColor:"A",geneHighlight:"A",geneSelection:"A",geneExpressionColormap:"A",geneExpressionColormapRange:"A",cellColorEncoding:"A",spatialRasterLayers:"A",spatialCellsLayer:"A",spatialMoleculesLayer:"A",spatialNeighborhoodsLayer:"A",additionalCellSets:"A",moleculeHighlight:"A"},h:8,w:7,x:3,y:0},{component:"description",coordinationScopes:{dataset:"A",spatialRasterLayers:"A"},h:2,w:2,x:10,y:10},{component:"layerController",coordinationScopes:{dataset:"A",spatialRasterLayers:"A",spatialCellsLayer:"A",spatialMoleculesLayer:"A",spatialNeighborhoodsLayer:"A"},h:8,w:3,x:0,y:0},{component:"cellSets",coordinationScopes:{dataset:"A",cellSetSelection:"A",cellSetHighlight:"A",cellSetColor:"A",cellColorEncoding:"A",additionalCellSets:"A"},h:5,w:2,x:10,y:5},{component:"genes",coordinationScopes:{dataset:"A",geneFilter:"A",geneHighlight:"A",geneSelection:"A",cellColorEncoding:"A"},h:5,props:{variablesLabelOverride:"antigen"},w:2,x:10,y:0},{component:"heatmap",coordinationScopes:{dataset:"A",heatmapZoomX:"A",heatmapZoomY:"A",heatmapTargetX:"A",heatmapTargetY:"A",cellFilter:"A",cellHighlight:"A",cellSetSelection:"A",cellSetHighlight:"A",cellSetColor:"A",geneFilter:"A",geneHighlight:"A",geneSelection:"A",geneExpressionColormap:"A",geneExpressionColormapRange:"A",cellColorEncoding:"A",additionalCellSets:"A"},h:4,props:{transpose:!0,variablesLabelOverride:"antigen"},w:10,x:0,y:8}],name:"R002_X002_Y007",version:"1.0.1"}};var Nt=A(1151);function kt(t){var e=t.configs,A=t.theme,n=e.map((function(t){var e=t.id,n=t.name,r=t.description;return s.a.createElement("div",{className:"list-group-item list-group-item-action flex-column align-items-start bg-secondary",key:e},s.a.createElement("a",{href:"?dataset=".concat(e,"&theme=").concat(A),key:e},s.a.createElement("h5",null,n),s.a.createElement("p",null,r)),s.a.createElement("a",{href:"?dataset=".concat(e,"&theme=").concat(A,"&small"),style:{fontSize:"75%"}},n," as component"))}));return s.a.createElement("div",{className:"list-group"},n)}function xt(t){var e=t.configs,A=t.theme;return s.a.createElement("form",{method:"GET"},s.a.createElement("h1",null,"Vitessce"),s.a.createElement("div",null,"Select a dataset:"),s.a.createElement(kt,{configs:e,theme:A}),s.a.createElement("br",null),s.a.createElement("div",null,"Or specify URL of configuration:"),s.a.createElement("div",{className:"input-group mb-3"},s.a.createElement("input",{type:"text",name:"url",className:"form-control"}),s.a.createElement("input",{type:"hidden",name:"theme",value:A}),s.a.createElement("div",{className:"input-group-append"},s.a.createElement("button",{className:"btn btn-outline-secondary",type:"submit"},"Load"))))}function Ot(){return s.a.createElement(s.a.Fragment,null,s.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 ",s.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."),s.a.createElement("h5",{className:"info-section-text"},"Contributors"),s.a.createElement("ul",null,s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/keller-mark"},"Mark Keller")),s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/mccalluc"},"Chuck McCallum")),s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/ilan-gold"},"Ilan Gold")),s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/manzt"},"Trevor Manz")),s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/thomaslchan"},"Tos Chan")),s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/jkmarx"},"Jennifer Marx")),s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/pkharchenko"},"Peter Kharchenko")),s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/ngehlenborg"},"Nils Gehlenborg"))),s.a.createElement("h5",{className:"info-section-text"},"Source Code"),s.a.createElement("ul",null,s.a.createElement("li",null,s.a.createElement("a",{href:"https://github.com/hubmapconsortium/vitessce"},"GitHub")),s.a.createElement("li",null,s.a.createElement("a",{href:"https://www.npmjs.com/package/vitessce"},"NPM"))),s.a.createElement("h5",{className:"info-section-text"},"Funding"),s.a.createElement("ul",null,s.a.createElement("li",null,"NIH/OD Human BioMolecular Atlas Program (HuBMAP) (OT2OD026677, PI: Nils Gehlenborg)."),s.a.createElement("li",null,"NIH/NLM Biomedical Informatics and Data Science Research Training Program (T15LM007092, PI: Nils Gehlenborg)"),s.a.createElement("li",null,"Harvard Stem Cell Institute (CF-0014-17-03, PI: Nils Gehlenborg)")),s.a.createElement("p",{className:"info-section-text"},"This deployment: branch=",Nt.branch," | hash=",Nt.hash," | date=",Nt.date))}function Mt(t){var e=t.configs,A=t.theme,n=t.showBetaHeader;return s.a.createElement("div",{className:"vitessce-container vitessce-theme-".concat(A," welcome-container")},n&&s.a.createElement("div",{className:"welcome-beta-header"},s.a.createElement("p",null,"Visit ",s.a.createElement("a",{href:"http://beta.vitessce.io"},"beta.vitessce.io")," to view the next version of the Vitessce home page and documentation!")),s.a.createElement("div",{className:"react-grid-layout container-fluid",style:{height:"max(100vh, 100%)"}},s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"welcome-col-left"},s.a.createElement("div",{className:"card card-body bg-primary"},s.a.createElement(xt,{configs:e,theme:A}))),s.a.createElement("div",{className:"welcome-col-right"},s.a.createElement("div",{className:"card card-body bg-primary"},s.a.createElement(Ot,null))))))}var Lt=A(206);function _t(t){var e=t.title,A=t.preformatted,n=t.unformatted,r=t.theme;return s.a.createElement("div",{className:"vitessce-container vitessce-theme-".concat(r)},s.a.createElement("div",{className:"warning-layout container-fluid"},s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-12"},s.a.createElement("div",{className:Lt.b},s.a.createElement("h1",null,e),s.a.createElement("pre",null,A),s.a.createElement("div",null,n))))))}var Jt=A(904),Tt=A(940),jt=A(10),Ht=(A(25),A(417)),Yt=A(753),Vt=A(418);var Zt=function(t){var e=t.children,A=t.theme,n=Object(Yt.a)(),r=s.a.useMemo((function(){var t=null===n?A:function(t,e){return"function"===typeof e?e(t):Object(jt.a)({},t,{},e)}(n,A);return null!=t&&(t[Vt.a]=null!==n),t}),[A,n]);return s.a.createElement(Ht.a.Provider,{value:r},e)},Wt=A(215),Kt=A(1428),Pt=A(1429),qt=A(1430),Xt=A(1431),zt=A(1116),$t=A.n(zt),te=A(140);function ee(t,e,A){var n,r=Object.keys(A["".concat(t,"Zoom")]),i=Object.keys(A["".concat(t,"TargetX")]),a=Object.keys(A["".concat(t,"TargetY")]),s=Object(f.c)(r),g=Object(f.c)(i),c=Object(f.c)(a),I=e.zoom,u=Object(o.a)(e.target,2),l=u[0],C=u[1];return A["".concat(t,"Zoom")][s]=I,A["".concat(t,"TargetX")][g]=l,A["".concat(t,"TargetY")][c]=C,n={},Object(p.a)(n,"".concat(t,"Zoom"),s),Object(p.a)(n,"".concat(t,"TargetX"),g),Object(p.a)(n,"".concat(t,"TargetY"),c),n}var Ae={"0.1.0":[(new v.a).compile(Kt),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,A={embeddingType:{},embeddingZoom:{},embeddingTargetX:{},embeddingTargetY:{},spatialZoom:{},spatialTargetX:{},spatialTargetY:{}},n=[];t.staticLayout.forEach((function(t){var e,r=Object(z.a)({},t,{coordinationScopes:{}});if("scatterplot"===t.component&&(t.props.mapping&&(A.embeddingType[t.props.mapping]=t.props.mapping,r=Object(z.a)({},r,{coordinationScopes:Object(z.a)({},r.coordinationScopes,{embeddingType:t.props.mapping})})),t.props.view)){var i=ee("embedding",t.props.view,A);r=Object(z.a)({},r,{coordinationScopes:Object(z.a)({},r.coordinationScopes,{},i)})}if("spatial"===t.component&&(null===t||void 0===t||null===(e=t.props)||void 0===e?void 0:e.view)){var o=ee("spatial",t.props.view,A);r=Object(z.a)({},r,{coordinationScopes:Object(z.a)({},r.coordinationScopes,{},o)})}n.push(r)}));var r=e||b()();return{version:"1.0.1",name:t.name,description:t.description,public:t.public,datasets:[{uid:r,name:r,files:t.layers.map((function(t){return{type:t.type.toLowerCase(),fileType:t.fileType,url:t.url}}))}],initStrategy:"auto",coordinationSpace:A,layout:n}}],"1.0.0":[(new v.a).addSchema(N).addSchema(G).compile(Pt),function(t){var e=Object(z.a)({},t.coordinationSpace);function A(t){var A="raster"===t;e["spatial".concat(Object(f.a)(t),"Layer").concat(A?"s":"")]={},Object.entries(e.spatialLayers).forEach((function(n){var r=Object(o.a)(n,2),i=r[0],a=r[1];if(Array.isArray(a)&&a.find((function(e){return e.type===t}))){var s=a.filter((function(e){return e.type===t})).map((function(t){var e=Object(z.a)({},t);return delete e.type,e}));e["spatial".concat(Object(f.a)(t),"Layer").concat(A?"s":"")][i]=A?s:s[0]}else e["spatial".concat(Object(f.a)(t),"Layer").concat(A?"s":"")][i]=null}))}e.spatialLayers&&(A("raster"),A("cells"),A("molecules"),A("neighborhoods"),delete e.spatialLayers);var n=t.layout.map((function(t){var e=Object(z.a)({},t);function A(t){var A="raster"===t;te.b[e.component].includes("spatial".concat(Object(f.a)(t),"Layer").concat(A?"s":""))&&(e.coordinationScopes["spatial".concat(Object(f.a)(t),"Layer").concat(A?"s":"")]=e.coordinationScopes.spatialLayers)}return e.coordinationScopes&&e.coordinationScopes.spatialLayers&&(A("raster"),A("cells"),A("molecules"),A("neighborhoods"),delete e.coordinationScopes.spatialLayers),e}));return Object(z.a)({},t,{coordinationSpace:e,layout:n,version:"1.0.1"})}],"1.0.1":[(new v.a).addSchema(N).addSchema(G).compile(qt),function(t){var e,A=t.layout.map((function(t){var e=Object(z.a)({},t);return"layerController"===e.component&&(e.props=Object(z.a)({},e.props,{globalDisable3d:!0})),e})),n=$t()(t);return Object.keys((null===n||void 0===n||null===(e=n.coordinationSpace)||void 0===e?void 0:e.spatialRasterLayers)||{}).forEach((function(t){n.coordinationSpace.spatialRasterLayers[t]&&n.coordinationSpace.spatialRasterLayers[t].forEach((function(e,A){n.coordinationSpace.spatialRasterLayers[t][A].type=["bitmask","raster"].includes(e.type)?e.type:"raster"}))})),Object(z.a)({},n,{layout:A,version:"1.0.2"})}],"1.0.2":[(new v.a).addSchema(N).addSchema(G).compile(Xt),null]};function ne(t){var e=t.onWarn,A=t.onConfigChange,n=t.onLoaderChange,r=t.validateOnConfigChange,i=Object(Qt.r)(),o=Object(Qt.j)();return Object(a.useEffect)((function(){return Qt.q.subscribe((function(t){r&&t&&function(t){try{var e=Ae["1.0.2"][0];if(!e(t)){var A=JSON.stringify(e.errors,null,2);throw new Error("Config validation failed: ".concat(A))}}catch(n){console.error(n)}}(t),A&&t&&A(t)}),(function(t){return t.viewConfig}))}),[A,r]),Object(a.useEffect)((function(){e&&i&&e(i)}),[i,e]),Object(a.useEffect)((function(){n&&o&&n(o)}),[o,n]),null}var re=A(145),ie=A(150),oe=A(213);function ae(t){var e=t.description,A=t.metadata;return s.a.createElement("div",{className:"description"},s.a.createElement("p",null,e),A&&Array.from(A.entries()).map((function(t){var e=Object(o.a)(t,2),A=e[0],n=e[1],r=n.name,i=n.metadata;return i&&Object.entries(i).length>0?s.a.createElement("details",{key:A},s.a.createElement("summary",null,r),s.a.createElement("div",{className:"metadata-container"},s.a.createElement("table",null,s.a.createElement("tbody",null,Object.entries(i).map((function(t){var e=Object(o.a)(t,2),A=e[0],n=e[1];return s.a.createElement("tr",{key:A},s.a.createElement("th",{title:A},A),s.a.createElement("td",{title:n},n))})))))):null})))}var se=["raster"];var ge=A(1117),ce=A(1118),Ie=A(1119),ue=A(945),le=A(944),Ce=A(946),he=A(1121),Be=A(68),fe=A.n(Be);var de=Object.freeze({initialize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.modulePath,A=void 0===e?".":e,n=t.importFunctionName,r=void 0===n?"__import__":n;try{self[r]=new Function("u","return import(u)")}catch(a){var i=new URL(A,location),o=function(t){URL.revokeObjectURL(t.src),t.remove()};self[r]=function(t){return new Promise((function(e,A){var n=new URL(t,i);if(self[r].moduleMap[n])return e(self[r].moduleMap[n]);var a=new Blob(["import * as m from '".concat(n,"';"),"".concat(r,".moduleMap['").concat(n,"']=m;")],{type:"text/javascript"}),s=Object.assign(document.createElement("script"),{type:"module",src:URL.createObjectURL(a),onerror:function(){A(new Error("Failed to import: ".concat(t))),o(s)},onload:function(){e(self[r].moduleMap[n]),o(s)}});document.head.appendChild(s)}))},self[r].moduleMap={}}}});window.higlassTracks=window.higlassTracks||{},window.higlassTracksByType=window.higlassTracksByType||{},window.higlassDataFetchersByType=window.higlassDataFetchersByType||{};var Qe=function(){return Math.random().toString(36).substring(2,8)},Ee=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.force,n=void 0!==A&&A,r=Qe();window.higlassTracks[r];)r=Qe();t.name=r,window.higlassTracks[t.name]=t,window.higlassTracksByType[t.config.type]&&!n?console.warn("A track with the same type (".concat(t.config.type,") was already ")+"registered. To override it, set force to true."):window.higlassTracksByType[t.config.type]=t},pe=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.force,n=void 0!==A&&A;window.higlassDataFetchersByType[t.config.type]&&!n?console.warn("A data fetcher with the same type (".concat(t.config.type,") was already ")+"registered. To override it, set force to true."):window.higlassDataFetchersByType[t.config.type]=t},ye=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=e.pluginType,n=void 0===A?"track":A;"track"===n?Ee(t,e):"dataFetcher"===n&&pe(t,e)},ve=A(1144);function me(t,e,A){return(me=be()?Reflect.construct:function(t,e,A){var n=[null];n.push.apply(n,e);var r=new(Function.bind.apply(t,n));return A&&Fe(r,A.prototype),r}).apply(null,arguments)}function be(){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(t){return!1}}function Fe(t,e){return(Fe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function we(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var A=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done)&&(A.push(o.value),!e||A.length!==e);n=!0);}catch(s){r=!0,i=s}finally{try{n||null==a.return||a.return()}finally{if(r)throw i}}return A}(t,e)||xe(t,e)||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 Se(t,e){var A=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),A.push.apply(A,n)}return A}function De(t){for(var e=1;e<arguments.length;e++){var A=null!=arguments[e]?arguments[e]:{};e%2?Se(Object(A),!0).forEach((function(e){Re(t,e,A[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(A)):Se(Object(A)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(A,e))}))}return t}function Re(t,e,A){return e in t?Object.defineProperty(t,e,{value:A,enumerable:!0,configurable:!0,writable:!0}):t[e]=A,t}function Ue(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ge(t,e){for(var A=0;A<e.length;A++){var n=e[A];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ne(t,e,A){return e&&Ge(t.prototype,e),A&&Ge(t,A),t}function ke(t,e){var A;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(A=xe(t))||e&&t&&"number"===typeof t.length){A&&(t=A);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}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,o=!0,a=!1;return{s:function(){A=t[Symbol.iterator]()},n:function(){var t=A.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==A.return||A.return()}finally{if(a)throw i}}}}function xe(t,e){if(t){if("string"===typeof t)return Oe(t,e);var A=Object.prototype.toString.call(t).slice(8,-1);return"Object"===A&&t.constructor&&(A=t.constructor.name),"Map"===A||"Set"===A?Array.from(t):"Arguments"===A||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?Oe(t,e):void 0}}function Oe(t,e){(null==e||e>t.length)&&(e=t.length);for(var A=0,n=new Array(e);A<e;A++)n[A]=t[A];return n}function Me(t,e,A){var n=A?e[1]:e[0]*e[1],r=new Float32Array(n),i=0;if(A){var o,a=ke(t);try{for(a.s();!(o=a.n()).done;){var s=o.value.data;r.set(s,i),i+=s.length}}catch(C){a.e(C)}finally{a.f()}}else for(var g=e[0],c=0;c<g;c++){var I,u=ke(t);try{for(u.s();!(I=u.n()).done;){var l=I.value.data[c];r.set(l,i),i+=l.length}}catch(C){u.e(C)}finally{u.f()}}return r}var Le=function t(e){if(!(this instanceof t?this.constructor:void 0))throw new Error('Uncaught TypeError: Class constructor cannot be invoked without "new"');for(var A=e.libraries.slugid,n=e.utils,r=n.absToChr,i=n.parseChromsizesRows,o=n.genomicRangeToChromosomeChunks,a=n.DenseDataExtrema1D,s=n.minNonZero,g=n.maxNonZero,c=function(){function t(e){Ue(this,t),this.dataConfig=e,this.trackUid=A.nice(),e.url&&(this.store=new ve.a(e.url)),void 0!==e.row&&(this.row=e.row)}return Ne(t,[{key:"tilesetInfo",value:function(t){var e=this;return this.tilesetInfoLoading=!0,this.store.getItem(".zattrs").then((function(t){var e=new TextDecoder("utf-8");return JSON.parse(e.decode(t))})).then((function(A){e.tilesetInfoLoading=!1;var n=A.multiscales.map((function(t){return[t.name,t.metadata.chromsize]})),r=A.multiscales[A.multiscales.length-1],i=r.metadata.chromoffset+r.metadata.chromsize,o=A.shape[1],a=De(De({},A),{},{shape:[A.shape[1],A.shape[0]],chromSizes:n,tile_size:o,max_width:i,min_pos:[0],max_pos:[i],max_zoom:Math.ceil(Math.log(i/o)/Math.log(2))});return t&&t(a),a})).catch((function(A){e.tilesetInfoLoading=!1,t&&t({error:"Error parsing zarr multivec: ".concat(A)})}))}},{key:"fetchTilesDebounced",value:function(t,e){var A,n={},r=[],i=[],o=ke(e);try{for(o.s();!(A=o.n()).done;){var a=A.value,s=a.split("."),g=parseInt(s[0],10),c=parseInt(s[1],10);Number.isNaN(c)||Number.isNaN(g)?console.warn("Invalid tile zoom or position:",g,c):(r.push(a),i.push(this.tile(g,c,a)))}}catch(I){o.e(I)}finally{o.f()}return Promise.all(i).then((function(e){for(var A=0;A<e.length;A++){var i=r[A];n[i]=e[A],n[i].tilePositionId=i}t(n)})),n}},{key:"tile",value:function(t,e,A){var n=this,c=this.store;return this.tilesetInfo().then((function(I){var u=+I.resolutions[t],l=+I.tile_size,C=u,h=e*l*u,B=h+l*u,f=I.chromSizes,d=i(f),Q=we(r(h,d),2),E=Q[0],p=Q[1],y=we(r(B,d),2),v=y[0],m=y[1],b=o(f,{chr:E,pos:p},{chr:v,pos:m},C,l);return Promise.all(b.map((function(t){var e=we(t,3),A=e[0],r=e[1],i=e[2];return Object(ve.b)({store:c,path:"/chromosomes/".concat(A,"/").concat(u,"/"),mode:"r"}).then((function(t){return void 0!==n.row?t.getRaw([n.row,Object(ve.c)(r,i)]):t.get([null,Object(ve.c)(r,i)])}))}))).then((function(r){var i=Me(r,[I.shape[1],I.shape[0]],void 0!==n.row);return Promise.resolve({dense:i,denseDataExtrema:new a(i),dtype:"float32",min_value:Math.min.apply(null,i),max_value:Math.max.apply(null,i),minNonZero:s(i),maxNonZero:g(i),server:null,size:1,shape:I.shape,tileId:A,tilePos:[e],tilePositionId:A,tilesetUid:null,zoomLevel:t})}))}))}}]),t}(),I=arguments.length,u=new Array(I>1?I-1:0),l=1;l<I;l++)u[l-1]=arguments[l];return me(c,u)};Le.config={type:"zarr-multivec"};var _e=A(611),Je=A(87),Te=_e.dependencies["window-pixi"],je=_e.dependencies.higlass,He="https://unpkg.com/window-pixi@".concat(Te,"/dist/pixi.").concat("min.js"),Ye="https://unpkg.com/higlass@".concat(je,"/dist/hglib.").concat("min.js");de.initialize(),ye({dataFetcher:Le,config:Le.config},{pluginType:"dataFetcher"});var Ve=s.a.lazy((function(){return window.React||(window.React=s.a),window.ReactDOM||(window.ReactDOM=fe.a),new Promise((function(t){var e=function(e){console.warn(e),t(Object(Je.f)(Object(Je.l)({title:"Could not load HiGlass",message:"The HiGlass scripts could not be dynamically imported."})))};__import__(He).then((function(){__import__(Ye).then((function(){t(Object(Je.f)(window.hglib.HiGlassComponent))})).catch(e)})).catch(e)}))}));function Ze(t){var e=t.coordinationScopes,A=t.theme,n=t.hgViewConfig,r=t.hgOptions,i=t.genomeSize,g=t.height,c=Object(Qt.f)(te.b.higlass,e),I=Object(o.a)(c,2),u=I[0],l=u.genomicZoomX,C=u.genomicZoomY,h=u.genomicTargetX,B=u.genomicTargetY,f=I[1],d=f.setGenomicZoomX,Q=f.setGenomicZoomY,E=f.setGenomicTargetX,p=f.setGenomicTargetY,y=Object(re.c)(),v=Object(o.a)(y,3),m=v[0],b=(v[1],v[2]),F=Object(a.useState)(),w=Object(o.a)(F,2),S=w[0],D=w[1],R=Object(a.useRef)(),U=Object(a.useMemo)((function(){return Object(z.a)({},r,{theme:A})}),[r,A]),G=Object(a.useMemo)((function(){var t=h,e=i/Math.pow(2,l),A=m/800,r=[t-e*A/2,t+e*A/2],o=B,a=i/Math.pow(2,C),s=g/800,c=[o-a*s/2,o+a*s/2];return{editable:!1,zoomFixed:!1,trackSourceServers:["//higlass.io/api/v1"],exportViewUrl:"//higlass.io/api/v1/viewconfs",views:[Object(z.a)({uid:"main"},n,{initialXDomain:r,initialYDomain:c})],zoomLocks:{locksByViewUid:{},locksDict:{}},locationLocks:{locksByViewUid:{},locksDict:{}},valueScaleLocks:{locksByViewUid:{},locksDict:{}}}}),[h,i,l,m,B,C,g,n]);return Object(a.useEffect)((function(){var t=function(){R.current=!0},e=function(){R.current=!1},A=b.current;return A.addEventListener("mouseenter",t),A.addEventListener("mouseleave",e),function(){A.removeEventListener("mouseenter",t),A.removeEventListener("mouseenter",e)}}),[b]),Object(a.useEffect)((function(){return S?(S.api.on("viewConfig",(function(t){if(R.current){var e=JSON.parse(t),A=e.views[0].initialXDomain,n=e.views[0].initialYDomain,r=Math.log2(i/((A[1]-A[0])*(800/m))),o=Math.log2(i/((n[1]-n[0])*(800/g))),a=A[0]+(A[1]-A[0])/2,s=n[0]+(n[1]-n[0])/2;d(r),Q(o),E(a),p(s)}})),function(){return S.api.off("viewConfig")}):function(){}}),[S,i,m,g,d,Q,E,p]),s.a.createElement("div",{className:"higlass-wrapper-parent"},s.a.createElement("div",{className:"higlass-wrapper",ref:b,style:{height:"".concat(g,"px")}},s.a.createElement(a.Suspense,{fallback:s.a.createElement("div",null,"Loading...")},s.a.createElement(Ve,{ref:D,zoomFixed:!1,viewConfig:G,options:U}))))}Ze.defaultProps={hgOptions:{bounded:!0,pixelPreciseMarginPadding:!0,containerPaddingX:0,containerPaddingY:0,sizeMode:"default"},genomeSize:31e8};var We=[];var Ke=A(1120),Pe=A(17);function qe(t,e){var A=0;if(void 0===e){var n,r=Object(Pe.a)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i=+i)&&(A+=i)}}catch(c){r.e(c)}finally{r.f()}}else{var o,a=-1,s=Object(Pe.a)(t);try{for(s.s();!(o=s.n()).done;){var g=o.value;(g=+e(g,++a,t))&&(A+=g)}}catch(c){s.e(c)}finally{s.f()}}return A}var Xe=["genomic-profiles"],ze={hg38:{chromosomes:"NyITQvZsS_mOFNlz5C2LJg",genes:"P0PLbQMwTYGy-5uPIQid7A"},hg19:{chromosomes:"N12wVGG9SPiTkk03yUayUw",genes:"OHJakQICQD6gTD7skx4EWA"},mm9:{chromosomes:"WAVhNHYxQVueq6KulwgWiQ",genes:"GUm5aBiLRCyz2PsBea7Yzg"},mm10:{chromosomes:"EtrWT0VtScixmsmwFSd7zg",genes:"QDutvmyiSrec5nX4pA5WGQ"}};var $e=A(298),tA=A.n($e),eA=A(575);function AA(t){var e=t.geneSelection,A=t.data,n=t.theme,r=t.width,i=t.height,o=t.marginRight,a=void 0===o?90:o,g=t.marginBottom,c=void 0===g?50:g,I={mark:{type:"bar"},encoding:{x:{field:"value",type:"quantitative",bin:{maxbins:50},title:e&&e.length>=1?"Normalized Expression Value":"Total Normalized Transcript Count"},y:{type:"quantitative",aggregate:"count",title:"Number of Cells"},color:{value:"gray"}},width:tA()(r-a,10,1/0),height:tA()(i-c,10,1/0),config:eA.b[n]};return s.a.createElement(eA.c,{data:A,spec:I})}var nA=["expression-matrix"];var rA=A(1141),iA=A(881),oA=A(1143),aA=A(530),sA=A(754);function gA(t){var e=t.toggleGeneExpressionTransform,A=t.useGeneExpressionTransform,n=Object(aA.a)();return s.a.createElement(sA.a,null,s.a.createElement(oA.a,null,s.a.createElement(iA.a,{className:n.labelCell},"Log Transform"),s.a.createElement(iA.a,{className:n.inputCell},s.a.createElement(rA.a,{className:n.checkbox,checked:Boolean(A),onChange:function(){e()},name:"scatterplot-option-cell-set-labels",color:"default"}))))}var cA=A(131);function IA(t){var e=t.domainMax,A=void 0===e?100:e,n=t.colors,r=t.data,i=t.theme,o=t.width,a=t.height,g=t.marginRight,c=void 0===g?90:g,I=t.marginBottom,u=t.useGeneExpressionTransform,l=r.reduce((function(t,e){return t=void 0===t||e.set.length>t?e.set.length:t}),0),C=I||30+30*Math.sqrt(l/2),h={domain:n.map((function(t){return t.name})),range:n.map((function(t){return Object(cA.c)(t.color)}))},B=tA()(o-c,10,1/0),f=tA()(a-C,10,1/0),d=B/n.length,Q="dark"===i?"white":"black",E={$schema:"https://vega.github.io/schema/vega/v5.json",description:"A violin plot showing distributions of expression levels for selected cell sets.",width:B,height:f,config:Object(z.a)({},eA.b[i],{axisBand:{bandPosition:1,tickExtra:!0,tickOffset:0}}),signals:[{name:"bandWidth",value:d},{name:"width",value:B},{name:"height",value:f},{name:"trim",value:!0}],data:[{name:"density",source:eA.a,transform:[{type:"kde",field:"value",groupby:["set"],bandwidth:0,extent:[0,A]}]},{name:"stats",source:eA.a,transform:[{type:"aggregate",groupby:["set"],fields:["value","value","value"],ops:["q1","median","q3"],as:["q1","median","q3"]}]}],scales:[{name:"layout",type:"band",range:"width",domain:{data:eA.a,field:"set"}},{name:"yscale",type:"linear",range:"height",domain:[0,A]},{name:"wscale",type:"linear",range:[0,{signal:"bandWidth"}],domain:{data:"density",field:"density"}},{name:"wscaleReversed",type:"linear",reverse:!0,range:[0,{signal:"bandWidth"}],domain:{data:"density",field:"density"}},Object(z.a)({name:"color",type:"ordinal"},h)],axes:[{orient:"left",scale:"yscale",zindex:1,title:u?["Log-Transformed","Normalized Expression Values"]:"Normalized Expression Values"},{orient:"bottom",scale:"layout",tickCount:5,zindex:1,title:"Cell Set",labelAngle:-45,labelAlign:"right"}],marks:[{type:"group",from:{facet:{data:"density",name:"violin",groupby:"set"}},encode:{enter:{xc:{scale:"layout",field:"set",band:.5},width:{signal:"bandWidth"},height:{signal:"height"}}},data:[{name:"summary",source:"stats",transform:[{type:"filter",expr:"datum.set === parent.set"}]}],marks:[{type:"area",orient:"vertical",from:{data:"violin"},encode:{enter:{fill:{scale:"color",field:{parent:"set"}}},update:{width:{scale:"wscale",field:"density"},xc:{signal:"bandWidth / 2"},y2:{scale:"yscale",field:"value"},y:{scale:"yscale",value:0}}}},{type:"area",orient:"vertical",from:{data:"violin"},encode:{enter:{fill:{scale:"color",field:{parent:"set"}}},update:{width:{scale:"wscaleReversed",field:"density"},xc:{signal:"bandWidth"},y2:{scale:"yscale",field:"value"},y:{scale:"yscale",value:0}}}},{type:"rect",from:{data:"summary"},encode:{enter:{fill:{value:Q},width:{value:2}},update:{y:{scale:"yscale",field:"q1"},y2:{scale:"yscale",field:"q3"},xc:{signal:"bandWidth / 2"}}}},{type:"rect",from:{data:"summary"},encode:{enter:{fill:{value:Q},height:{value:2},width:{value:8}},update:{y:{scale:"yscale",field:"median"},xc:{signal:"bandWidth / 2"}}}}]}]};return s.a.createElement(eA.c,{data:r,spec:E})}var uA=["cell-sets","expression-matrix"];var lA={description:function(t){var e=t.coordinationScopes,A=t.description,n=t.removeGridComponent,r=t.theme,i=t.title,g=void 0===i?"Data Set":i,c=Object(Qt.j)(),I=Object(Qt.f)(te.b.description,e),u=Object(o.a)(I,1)[0],l=u.dataset,C=u.spatialRasterLayers,h=Object(re.d)(se),B=Object(o.a)(h,3),f=B[0],d=B[1],Q=B[2];Object(a.useEffect)((function(){Q()}),[c,l]);var E=Object(ie.c)(c,l),p=Object(o.a)(E,1)[0],y=Object(ie.j)(c,l,d,(function(){}),!1),v=Object(o.a)(y,3),m=v[0],b=v[1],F=v[2],w=Object(a.useMemo)((function(){var t=new Map;return C&&C.length>0&&m&&F&&b&&C.forEach((function(e){if(F[e.index]){var A=b[e.index].metadata.format;t.set("".concat(e.index),{name:m.meta[e.index].name,metadata:A&&A()})}})),t}),[m,C,F,b]);return s.a.createElement(oe.a,{title:g,removeGridComponent:n,isScroll:!0,theme:r,isReady:f},s.a.createElement(ae,{description:A||p,metadata:w}))},status:ge.a,genes:ce.a,cellSets:Ie.a,scatterplot:ue.a,spatial:le.a,heatmap:Ce.a,layerController:he.a,cellSetSizes:Ke.a,expressionHistogram:function(t){var e=t.coordinationScopes,A=t.removeGridComponent,n=t.theme,r=Object(Qt.j)(),i=Object(Qt.f)(te.b.expressionHistogram,e),g=Object(o.a)(i,1)[0],c=g.dataset,I=g.geneSelection,u=Object(re.c)(),l=Object(o.a)(u,3),C=l[0],h=l[1],B=l[2],f=Object(re.e)(),d=Object(o.a)(f,3),Q=d[0],E=d[1],p=d[2],y=Object(re.d)(nA),v=Object(o.a)(y,3),m=v[0],b=v[1],F=v[2];Object(a.useEffect)((function(){p(),F()}),[r,c]);var w=Object(ie.e)(r,c,b,E,!0),S=Object(o.a)(w,1)[0],D=Object(ie.f)(r,c,b,!1,I),R=Object(o.a)(D,1)[0],U=I&&I.length>=1?I[0]:null,G=Object(a.useMemo)((function(){if(U&&S&&R)return Array.from(R[0]).map((function(t,e){return{value:100*R[0][e]/255,gene:U}}));if(S){var t=S.cols.length;return S.rows.map((function(e,A){return{value:100*qe(S.matrix.subarray(A*t,(A+1)*t))/255,gene:null}}))}return null}),[S,U,R]);return s.a.createElement(oe.a,{title:"Expression Histogram".concat(U?" (".concat(U,")"):""),removeGridComponent:A,urls:Q,theme:n,isReady:m},s.a.createElement("div",{ref:B,className:"vega-container"},s.a.createElement(AA,{geneSelection:I,data:G,theme:n,width:C,height:h})))},genomicProfiles:function(t){var e=t.coordinationScopes,A=t.theme,n=t.removeGridComponent,r=t.profileTrackUidKey,i=void 0===r?"path":r,g=t.profileTrackNameKey,c=void 0===g?null:g,I=t.higlassServer,u=void 0===I?"https://higlass.io/api/v1":I,l=t.assembly,C=void 0===l?"hg38":l,f=t.title,d=void 0===f?"Genomic Profiles":f,Q=Object(re.c)(),E=Object(o.a)(Q,3),p=(E[0],E[1]),y=E[2],v=Object(Qt.j)(),m=Object(Qt.f)(te.b.genomicProfiles,e),b=Object(o.a)(m,1)[0],F=b.dataset,w=b.cellSetColor,S=b.cellSetSelection,D=Object(re.d)(Xe),R=Object(o.a)(D,3),U=R[0],G=R[1],N=R[2],k=Object(re.e)(),x=Object(o.a)(k,3),O=x[0],M=x[1],L=x[2],_=Object(ie.g)(v,F,G,M,!0),J=Object(o.a)(_,1)[0],T=Object(a.useMemo)((function(){if(!J||1!==O.length)return null;var t=O[0].url,e="dark"===A?"#C0C0C0":"#000000",n="dark"===A?"#000000":"#f1f1f1",r="dark"===A?"dimgray":"silver",o=[{type:"horizontal-chromosome-labels",server:u,tilesetUid:ze[C].chromosomes,uid:"chromosome-labels",options:{color:e,fontSize:12,fontIsLeftAligned:!1,showMousePosition:!0,mousePositionColor:e},height:30},{type:"horizontal-gene-annotations",server:u,tilesetUid:ze[C].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:e,plusStrandColor:e,minusStrandColor:e,labelColor:"black",labelBackgroundColor:n,trackBorderWidth:0,trackBorderColor:"black"},height:70}],a=qe(o.map((function(t){return t.height}))),s=(p-a-10)/J.row_infos.length,g=J.row_infos.map((function(n,o){var a,g=n[i],I=Array.isArray(g),u=c?n[c]:I?g[g.length-1]:g,l=!!I&&(null===S||void 0===S?void 0:S.find((function(t){return h()(t,g)}))),C=I?null===w||void 0===w||null===(a=w.find((function(t){return h()(t.path,g)})))||void 0===a?void 0:a.color:null,B=I?g.join("__"):g,f={type:"horizontal-bar",uid:"bar-track-".concat(B),data:{type:"zarr-multivec",url:t,row:o},options:{name:u,showMousePosition:!0,mousePositionColor:e,labelColor:"dark"===A?"white":"black",labelBackgroundColor:"dark"===A?"black":"white",labelShowAssembly:!1},height:s};if(C&&l){var d=C;f.options.barFillColor="rgb(".concat(d[0],",").concat(d[1],",").concat(d[2],")")}else f.options.barFillColor=r;return f}));return{tracks:{top:[].concat(o,Object(B.a)(g)),left:[],center:[],right:[],bottom:[],whole:[],gallery:[]},layout:{w:12,h:12,x:0,y:0,static:!1}}}),[J,O,A,p,i,c,S,w,u,C]);return Object(a.useEffect)((function(){L(),N()}),[v,F]),s.a.createElement("div",{className:"higlass-title-wrapper"},s.a.createElement(oe.a,{title:d,removeGridComponent:n,theme:A,isReady:U,urls:O},s.a.createElement("div",{className:"higlass-lazy-wrapper",ref:y},T?s.a.createElement(Ze,{coordinationScopes:e,theme:A,hgViewConfig:T,height:p}):null)))},cellSetExpression:function(t){var e=t.coordinationScopes,A=t.removeGridComponent,n=t.theme,r=Object(Qt.j)(),i=Object(Qt.f)(te.b.cellSetExpression,e),g=Object(o.a)(i,2),c=g[0],I=c.dataset,u=c.geneSelection,l=c.geneExpressionTransform,C=c.cellSetSelection,h=c.cellSetColor,B=c.additionalCellSets,f=g[1].setGeneExpressionTransform,d=Object(re.c)(),Q=Object(o.a)(d,3),E=Q[0],p=Q[1],y=Q[2],v=Object(re.e)(),m=Object(o.a)(v,3),b=m[0],F=m[1],w=m[2],S=Object(re.d)(uA),D=Object(o.a)(S,3),R=D[0],U=D[1],G=D[2],N=Object(a.useReducer)((function(t){var e=!t;return f(e?"log1p":null),e}),l),k=Object(o.a)(N,2),x=k[0],O=k[1];Object(a.useEffect)((function(){w(),G()}),[r,I]);var M=Object(ie.f)(r,I,U,!1,u),L=Object(o.a)(M,1)[0],_=Object(ie.d)(r,I,U,F,!1),J=Object(o.a)(_,1)[0],T=Object(ie.a)(r,I,U,F,!0),j=function(t,e,A,n,r,i,s,g){var c=Object(a.useMemo)((function(){return Object(Je.n)(A,n)}),[A,n]),I=Object(a.useMemo)((function(){if(c&&i&&r&&r.length>=1&&t){for(var A=Object(at.r)(c,i,s),n=r[0],o=-1/0,a={},I=0;I<e.rows.length;I+=1)a[e.rows[I]]=I;return[A.map((function(e){var A=a[e.obsId],r=100*t[0][A]/255,i=g?Math.log(1+r):r;return o=Math.max(i,o),{value:i,gene:n,set:e.name}})),o]}return[null,null]}),[t,e,r,c,i,s,g]),u=Object(o.a)(I,2),l=u[0],C=u[1];return[l,Object(a.useMemo)((function(){return c&&i&&s?Object(at.s)(c,i,s):[]}),[c,i,s]),C]}(L,J,Object(o.a)(T,1)[0],B,u,C,h,x),H=Object(o.a)(j,3),Y=H[0],V=H[1],Z=H[2],W=u&&u.length>=1?u[0]:null;return s.a.createElement(oe.a,{title:"Expression by Cell Set".concat(W?" (".concat(W,")"):""),removeGridComponent:A,urls:b,theme:n,isReady:R,options:s.a.createElement(gA,{useGeneExpressionTransform:x,toggleGeneExpressionTransform:O})},s.a.createElement("div",{ref:y,className:"vega-container"},Y?s.a.createElement(IA,{domainMax:Z,colors:V,data:Y,theme:n,width:E,height:p,useGeneExpressionTransform:x}):s.a.createElement("span",null,"Select a gene.")))},higlass:function(t){var e=t.coordinationScopes,A=t.theme,n=t.hgViewConfig,r=t.removeGridComponent,i=Object(re.c)(),a=Object(o.a)(i,3),g=(a[0],a[1]),c=a[2],I=Object(re.d)(We),u=Object(o.a)(I,3),l=u[0],C=(u[1],u[2],Object(re.e)()),h=Object(o.a)(C,3),B=h[0];return h[1],h[2],s.a.createElement("div",{className:"higlass-title-wrapper"},s.a.createElement(oe.a,{title:"HiGlass",removeGridComponent:r,theme:A,isReady:l,urls:B},s.a.createElement("div",{className:"higlass-lazy-wrapper",ref:c},s.a.createElement(Ze,{coordinationScopes:e,theme:A,hgViewConfig:n,height:g}))))}};function CA(t){if(void 0===lA[t])throw new Error('Could not find definition for "'.concat(t,'" in registry.'));return lA[t]}function hA(t,e){var A,n=Object.keys((null===t||void 0===t||null===(A=t.coordinationSpace)||void 0===A?void 0:A[e])||{}),r=t.layout.map((function(t){var A;return null===(A=t.coordinationScopes)||void 0===A?void 0:A[e]}));return Array.from(new Set([].concat(Object(B.a)(n),Object(B.a)(r))))}function BA(t){var e=t,A=e,n=A.layout,r=A.datasets;return Object.values(te.c).forEach((function(t){if(!n.every((function(e){var A;return!te.b[e.component].includes(t)||(null===(A=e.coordinationScopes)||void 0===A?void 0:A[t])}))){var A=te.d[t];"dataset"===t&&r.length>=1&&(A=r[0].uid),e=te.a.includes(t)?function(t,e,A){var n=Object(z.a)({},t,{layout:Object(B.a)(t.layout)}),r={};return n.layout.forEach((function(i,o){var a;if(te.b[i.component].includes(e)&&!(null===(a=i.coordinationScopes)||void 0===a?void 0:a[e])){var s=Object(f.c)([].concat(Object(B.a)(hA(t,e)),Object(B.a)(Object.keys(r))));r[s]=A,n.layout[o]=Object(z.a)({},i,{coordinationScopes:Object(z.a)({},i.coordinationScopes,Object(p.a)({},e,s))})}})),n.coordinationSpace=Object(z.a)({},n.coordinationSpace,Object(p.a)({},e,Object(z.a)({},n.coordinationSpace[e],{},r))),n}(e,t,A):function(t,e,A){var n,r=Object(f.c)(hA(t,e));return Object(z.a)({},t,{coordinationSpace:Object(z.a)({},t.coordinationSpace,Object(p.a)({},e,Object(z.a)({},null===t||void 0===t||null===(n=t.coordinationSpace)||void 0===n?void 0:n[e],Object(p.a)({},r,A)))),layout:t.layout.map((function(t){var A;return Object(z.a)({},t,{coordinationScopes:Object(z.a)({},t.coordinationScopes,{},te.b[t.component].includes(e)&&!(null===(A=t.coordinationScopes)||void 0===A?void 0:A[e])?Object(p.a)({},e,r):{})})}))})}(e,t,A)}})),e}var fA=Object(Jt.a)({disableGlobal:!0});function dA(t){var e=t.config,A=t.rowHeight,n=t.height,r=t.theme,i=t.onWarn,g=t.onConfigChange,c=t.onLoaderChange,I=t.validateOnConfigChange,u=void 0!==I&&I,l=Object(a.useMemo)((function(){if(!e)return[{title:"No such dataset",unformatted:"The dataset configuration could not be found."},!1];if(!e.version)return[{title:"Missing version",unformatted:"The dataset configuration is missing a version, preventing validation."},!1];var t=function(t){var e,A,n,r=t;do{if(e=r.version,!Object.keys(Ae).includes(e))return[{title:"Config validation failed",preformatted:"Unknown config version."},!1];var i=Object(o.a)(Ae[e],2);if(n=i[0],A=i[1],!n(r))return[{title:"Config validation failed",preformatted:JSON.stringify(n.errors,null,2)},!1];A&&(r=A(r))}while(A);return console.groupCollapsed("\ud83d\ude84 Vitessce (".concat(_e.version,") view configuration")),console.info("data:,".concat(JSON.stringify(r))),console.info(JSON.stringify(r,null,2)),console.groupEnd(),[r,!0]}(e),A=Object(o.a)(t,2),n=A[0];return A[1]?[function(t){return"auto"===t.initStrategy?BA(t):t}(n),!0]:[n,!1]}),[e]),C=Object(o.a)(l,2),B=C[0],f=C[1];return Object(a.useEffect)((function(){f&&!h()(B,e)&&g&&g(B)}),[f,e,B,g]),f?s.a.createElement(Tt.b,{generateClassName:fA},s.a.createElement(Zt,{theme:Wt.a[r]},s.a.createElement(Et,{config:B,getComponent:CA,rowHeight:A,height:n,theme:r}),s.a.createElement(ne,{onWarn:i,onConfigChange:g,onLoaderChange:c,validateOnConfigChange:u}))):s.a.createElement(_t,Object.assign({theme:r},B))}A(1469),A(1470),A(1471);function QA(t){var e=t.response,A=t.theme,n=Object(a.useState)(!0),r=Object(o.a)(n,2),i=r[0],g=r[1],c=Object(a.useRef)();return Object(a.useEffect)((function(){e.then((function(t){c.current=t,g(!1)}))}),[e]),i?s.a.createElement(_t,{title:"Loading...",theme:A}):s.a.createElement(c.current)}function EA(t){return"\n    ok: ".concat(t.ok,"\n    status: ").concat(t.status,"\n    statusText: ").concat(t.statusText,"\n    redirected: ").concat(t.redirected,"\n    type: ").concat(t.type,"\n    url: ").concat(t.url)}function pA(t){var e=t.rowHeight,A=void 0===e?null:e,n=t.showBetaHeader,r=void 0!==n&&n,i=new URLSearchParams(window.location.search),a=i.get("dataset"),g="true"===i.get("debug"),c=i.get("url"),I="all"===i.get("show"),u=function(t){return["light","dark"].includes(t)?t:"dark"}(i.get("theme"));if(a){var l=Gt[a];return s.a.createElement(dA,{config:l,rowHeight:A,theme:u,onConfigChange:g?console.log:void 0,validateOnConfigChange:g})}if(c){var C=fetch(c).then((function(t){return function(t,e,A){return t.ok?t.text().then((function(n){try{var r=JSON.parse(n);return Promise.resolve((function(){return s.a.createElement(dA,{config:r,theme:e,onConfigChange:A?console.log:void 0,validateOnConfigChange:A})}))}catch(i){return Promise.resolve((function(){return s.a.createElement(_t,{title:"Error parsing JSON",preformatted:EA(t),unformatted:"".concat(i.message,": ").concat(n),theme:e})}))}})):Promise.resolve((function(){return s.a.createElement(_t,{title:"Fetch response not OK",preformatted:EA(t),theme:e})}))}(t,u,g)})).catch((function(t){return Promise.resolve((function(){return s.a.createElement(_t,{title:"Error fetching",unformatted:t.message,theme:u})}))}));return s.a.createElement(QA,{response:C,theme:u})}var h=function(t){return Object.entries(Gt).filter((function(e){return t||e[1].public})).map((function(t){var e=Object(o.a)(t,2),A=e[0],n=e[1];return{id:A,name:n.name,description:n.description}}))}(I);return s.a.createElement(Mt,{configs:h,theme:u,showBetaHeader:r})}var yA=A(1432),vA=A.n(yA),mA=A(1394);var bA={Chrome:32779,"Internet Explorer":2047,Edge:2047,Safari:65e3,Firefox:65e3},FA=function t(e){Object(g.a)(this,t),this.message=e};function wA(t){var e=t.conf,A=t.onOverMaximumUrlLength,n=void 0===A?function(){}:A,r=Object(mA.compressToEncodedURIComponent)(JSON.stringify(e)),i="".concat("vitessce_conf_length","=").concat(r.length,"&").concat("vitessce_conf_version","=").concat("0.0.1","&").concat("vitessce_conf","=").concat(r),o=vA.a.parse(window.navigator.userAgent).browser.name,a=bA[o];if(i.length>a){var s=Object.entries(bA).filter((function(t){return t[1]>i.length})).map((function(t){return t[0]})),g="Configuration is ".concat(r.length," characters; max URL for ").concat(o," is ").concat(a,": it will work on ").concat(s.join(", ")||"no browser",".");console.error(g),n({message:g,willWorkOn:s})}return i}function SA(t){var e=new URLSearchParams(t.replace("#","&")),A=e.get("vitessce_conf"),n=Number(e.get("vitessce_conf_length"));if(n!==A.length)throw new FA("Compressed conf length (".concat(A.length,") != expected (").concat(n,"). URL truncated?"));if("0.0.1"===e.get("vitessce_conf_version"))return JSON.parse(Object(mA.decompressFromEncodedURIComponent)(A));throw new Error("Unrecognized URL Param Version")}var DA=function(){function t(e,A,n){Object(g.a)(this,t),this.file={url:e,type:A,fileType:n}}return Object(c.a)(t,[{key:"toJSON",value:function(){return this.file}}]),t}(),RA=function(){function t(e,A,n){Object(g.a)(this,t),this.dataset={uid:e,name:A,description:n,files:[]}}return Object(c.a)(t,[{key:"addFile",value:function(t,e,A){return this.dataset.files.push(new DA(t,e,A)),this}},{key:"toJSON",value:function(){return Object(z.a)({},this.dataset,{files:this.dataset.files.map((function(t){return t.toJSON()}))})}}]),t}(),UA=function(){function t(e,A,n,r,i,o){Object(g.a)(this,t),this.view={component:e,coordinationScopes:A,x:n,y:r,w:i,h:o}}return Object(c.a)(t,[{key:"useCoordination",value:function(){for(var t=this,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];var r=A;return r.forEach((function(e){t.view.coordinationScopes[e.cType]=e.cScope})),this}},{key:"setXYWH",value:function(t,e,A,n){this.view.x=t,this.view.y=e,this.view.w=A,this.view.h=n}},{key:"toJSON",value:function(){return this.view}}]),t}(),GA=function t(e){Object(g.a)(this,t),this.views=e},NA=function t(e){Object(g.a)(this,t),this.views=e};function kA(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];var n=new GA(e);return n}function xA(){for(var t=arguments.length,e=new Array(t),A=0;A<t;A++)e[A]=arguments[A];var n=new NA(e);return n}var OA=function(){function t(e,A){Object(g.a)(this,t),this.cType=e,this.cScope=A,this.cValue=null}return Object(c.a)(t,[{key:"setValue",value:function(t){return this.cValue=t,this}}]),t}(),MA=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;Object(g.a)(this,t),this.config={version:"1.0.0",name:e,description:A,datasets:[],coordinationSpace:{},layout:[],initStrategy:"auto"}}return Object(c.a)(t,[{key:"addDataset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=A||{},r=n.uid,i=this.config.datasets.map((function(t){return t.dataset.uid})),a=r||Object(f.c)(i),s=new RA(a,t,e);this.config.datasets.push(s);var g=this.addCoordination(te.c.DATASET),c=Object(o.a)(g,1),I=c[0];return I.setValue(a),s}},{key:"addView",value:function(t,e,A){var n,r=A||{},i=r.x,a=void 0===i?0:i,s=r.y,g=void 0===s?0:s,c=r.w,I=void 0===c?1:c,u=r.h,l=void 0===u?1:u,C=r.mapping,h=void 0===C?null:C,B=this.config.coordinationSpace[te.c.DATASET]?Object.entries(this.config.coordinationSpace[te.c.DATASET]).filter((function(e){var A=Object(o.a)(e,2);A[0];return A[1].cValue===t.dataset.uid})).map((function(t){return Object(o.a)(t,1)[0]})):[];if(1!==B.length)throw new Error("No coordination scope matching the dataset parameter could be found in the coordination space.");n=Object(o.a)(B,1)[0];var f=Object(p.a)({},te.c.DATASET,n),d=new UA(e,f,a,g,I,l);if(h){var Q=this.addCoordination(te.c.EMBEDDING_TYPE),E=Object(o.a)(Q,1)[0];E.setValue(h),d.useCoordination(E)}return this.config.layout.push(d),d}},{key:"addCoordination",value:function(){for(var t=this,e=arguments.length,A=new Array(e),n=0;n<e;n++)A[n]=arguments[n];var r=A,i=[];return r.forEach((function(e){var A=t.config.coordinationSpace[e]?Object.keys(t.config.coordinationSpace[e]):[],n=new OA(e,Object(f.c)(A));t.config.coordinationSpace[n.cType]||(t.config.coordinationSpace[n.cType]={}),t.config.coordinationSpace[n.cType][n.cScope]=n,i.push(n)})),i}},{key:"linkViews",value:function(t,e){var A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.addCoordination.apply(this,Object(B.a)(e));return t.forEach((function(t){n.forEach((function(e){t.useCoordination(e)}))})),Array.isArray(A)&&A.length===e.length&&n.forEach((function(t,e){t.setValue(A[e])})),this}},{key:"layout",value:function(t){return function t(e,A,n,r,i){var o=n-A,a=i-r;if(e instanceof UA)e.setXYWH(A,r,o,a);else if(e instanceof GA){var s=e.views,g=s.length;s.forEach((function(e,n){t(e,A+o/g*n,A+o/g*(n+1),r,i)}))}else if(e instanceof NA){var c=e.views,I=c.length;c.forEach((function(e,i){t(e,A,n,r+a/I*i,r+a/I*(i+1))}))}}(t,0,12,0,12),this}},{key:"toJSON",value:function(){return Object(z.a)({},this.config,{datasets:this.config.datasets.map((function(t){return t.toJSON()})),coordinationSpace:Object(f.b)(Object.entries(this.config.coordinationSpace).map((function(t){var e=Object(o.a)(t,2),A=e[0],n=e[1];return[A,Object(f.b)(Object.entries(n).map((function(t){var e=Object(o.a)(t,2);return[e[0],e[1].cValue]})))]}))),layout:this.config.layout.map((function(t){return t.toJSON()}))})}}],[{key:"fromJSON",value:function(e){var A=new t(e.name,e.description);return e.datasets.forEach((function(t){var e=A.addDataset(t.name,t.description,{uid:t.uid});t.files.forEach((function(t){e.addFile(t.url,t.type,t.fileType)}))})),Object.keys(e.coordinationSpace).forEach((function(t){if(t!==te.c.DATASET){var n=e.coordinationSpace[t];A.config.coordinationSpace[t]={},Object.entries(n).forEach((function(e){var n=Object(o.a)(e,2),r=n[0],i=n[1],a=new OA(t,r);a.setValue(i),A.config.coordinationSpace[t][r]=a}))}})),e.layout.forEach((function(t){var e=new UA(t.component,t.coordinationScopes,t.x,t.y,t.w,t.h);A.config.layout.push(e)})),A}}]),t}();A.d(e,"Heatmap",(function(){return n.Heatmap})),A.d(e,"Spatial",(function(){return r.Spatial})),A.d(e,"Scatterplot",(function(){return i.Scatterplot})),A.d(e,"VitessceGrid",(function(){return Et})),A.d(e,"createApp",(function(){return pA})),A.d(e,"Vitessce",(function(){return dA})),A.d(e,"encodeConfInUrl",(function(){return wA})),A.d(e,"decodeURLParamsToConf",(function(){return SA})),A.d(e,"VitessceConfig",(function(){return MA})),A.d(e,"hconcat",(function(){return kA})),A.d(e,"vconcat",(function(){return xA}))},function(t,e,A){"use strict";var n=A(10),r=A(30),i=A(0),o=(A(25),A(32)),a=A(296),s=A(297),g=A(41),c=A(66),I=i.forwardRef((function(t,e){var A=t.children,g=t.classes,I=t.className,u=(t.color,t.component),l=void 0===u?"label":u,C=(t.disabled,t.error,t.filled,t.focused,t.required,Object(r.a)(t,["children","classes","className","color","component","disabled","error","filled","focused","required"])),h=Object(s.a)(),B=Object(a.a)({props:t,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]});return i.createElement(l,Object(n.a)({className:Object(o.a)(g.root,g["color".concat(Object(c.a)(B.color||"primary"))],I,B.disabled&&g.disabled,B.error&&g.error,B.filled&&g.filled,B.focused&&g.focused,B.required&&g.required),ref:e},C),A,B.required&&i.createElement("span",{className:Object(o.a)(g.asterisk,B.error&&g.error)},"\u2009","*"))})),u=Object(g.a)((function(t){return{root:Object(n.a)({color:t.palette.text.secondary},t.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:t.palette.primary.main},"&$disabled":{color:t.palette.text.disabled},"&$error":{color:t.palette.error.main}}),colorSecondary:{"&$focused":{color:t.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:t.palette.error.main}}}}),{name:"MuiFormLabel"})(I),l=i.forwardRef((function(t,e){var A=t.classes,g=t.className,c=t.disableAnimation,I=void 0!==c&&c,l=(t.margin,t.shrink),C=(t.variant,Object(r.a)(t,["classes","className","disableAnimation","margin","shrink","variant"])),h=Object(s.a)(),B=l;"undefined"===typeof B&&h&&(B=h.filled||h.focused||h.adornedStart);var f=Object(a.a)({props:t,muiFormControl:h,states:["margin","variant"]});return i.createElement(u,Object(n.a)({"data-shrink":B,className:Object(o.a)(A.root,g,h&&A.formControl,!I&&A.animated,B&&A.shrink,"dense"===f.margin&&A.marginDense,{filled:A.filled,outlined:A.outlined}[f.variant]),classes:{focused:A.focused,disabled:A.disabled,error:A.error,required:A.required,asterisk:A.asterisk},ref:e},C))}));e.a=Object(g.a)((function(t){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:t.transitions.create(["color","transform"],{duration:t.transitions.duration.shorter,easing:t.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"})(l)}])}));
//# 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.3\",\"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\",\"@jupyterlab/builder\":\"^3.0.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 || ^4\",\"lodash\":\"^4.17.4\",\"pubsub-js\":\"^1.9.0\",\"react\":\"^17.0.1\",\"react-dom\":\"^17.0.1\",\"vitessce\":\"^1.1.12\"},\"jupyterlab\":{\"extension\":\"dist/labplugin\",\"outputDir\":\"../vitessce/static\",\"sharedPackages\":{\"@jupyter-widgets/base\":{\"bundled\":false,\"singleton\":true}}},\"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